@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #0F4C81;
    --primary-rgb: 15, 76, 129;
    --secondary: #1F7AE0;
    --secondary-rgb: 31, 122, 224;
    --success: #22C55E;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #F59E0B;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #EF4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --neutral-50: #F8FAFC;
    --neutral-100: #F1F5F9;
    --neutral-200: #E2E8F0;
    --neutral-300: #CBD5E1;
    --neutral-400: #94A3B8;
    --neutral-500: #64748B;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1E293B;
    --neutral-900: #0F172A;
    
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --header-height: 70px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--neutral-50);
    color: var(--neutral-800);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-400);
}

/* Helper Utility Classes */
.hidden {
    display: none !important;
}

.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }
.text-muted { color: var(--neutral-500); }

.bg-success-subtle { background-color: var(--success-bg); }
.bg-warning-subtle { background-color: var(--warning-bg); }
.bg-danger-subtle { background-color: var(--danger-bg); }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    line-height: 1;
}

.badge-success { background-color: var(--success-bg); color: var(--success); }
.badge-warning { background-color: var(--warning-bg); color: var(--warning); }
.badge-danger { background-color: var(--danger-bg); color: var(--danger); }
.badge-info { background-color: rgba(31, 122, 224, 0.1); color: var(--secondary); }

/* --- 1. GLOBAL LAYOUT --- */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Dynamic Role Selector Widget (Fixed Floating for simulation) */
.role-simulation-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(15, 76, 129, 0.95);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

.role-simulation-bar span {
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--neutral-300);
}

.role-btn {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transition: var(--transition-fast);
}

.role-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.role-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* --- 2. PUBLIC VIEW PORTAL --- */
.public-portal {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--neutral-50);
}

.public-header {
    background-color: white;
    border-bottom: 1px solid var(--neutral-200);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    height: 44px;
    width: 44px;
    object-fit: contain;
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--neutral-500);
    font-weight: 500;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: #0c3e6a;
}

.btn-secondary {
    background-color: white;
    color: var(--neutral-700);
    border: 1px solid var(--neutral-300);
}

.btn-secondary:hover {
    background-color: var(--neutral-100);
    border-color: var(--neutral-400);
}

.btn-icon {
    padding: 0.6rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    background: white;
    color: var(--neutral-600);
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background: var(--neutral-50);
    color: var(--primary);
}

/* Public Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0F4C81 0%, #155e9c 60%, #1F7AE0 100%);
    color: white;
    padding: 4.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.05);
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 10% 20%, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 90%);
    pointer-events: none;
}

.hero-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Public Content Container */
.public-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 2.5rem 2rem;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: -4rem;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 10;
}

.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-900);
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--neutral-500);
    font-weight: 600;
}

/* Charts Grid */
.charts-grid-layout {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.chart-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-200);
    display: flex;
    flex-direction: column;
}

.chart-card.col-6 { grid-column: span 6; }
.chart-card.col-4 { grid-column: span 4; }
.chart-card.col-8 { grid-column: span 8; }
.chart-card.col-12 { grid-column: span 12; }

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--neutral-800);
}

.chart-canvas-container {
    position: relative;
    width: 100%;
    min-height: 280px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Summary Table Section */
.summary-table-section {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    margin-bottom: 4rem;
}

.table-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.table-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neutral-900);
}

.table-search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    width: 280px;
    outline: none;
    transition: var(--transition-fast);
}

.table-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

.table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

.custom-table th {
    background-color: var(--neutral-100);
    color: var(--neutral-700);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--neutral-200);
}

.custom-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--neutral-200);
    color: var(--neutral-800);
    vertical-align: middle;
}

.custom-table tbody tr:hover {
    background-color: var(--neutral-50);
}

/* Footer styling */
.public-footer {
    margin-top: auto;
    background-color: var(--neutral-900);
    color: var(--neutral-400);
    padding: 3rem 2rem 2rem;
    border-top: 1px solid var(--neutral-800);
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.footer-info-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo {
    height: 48px;
    width: 48px;
}

.footer-brand-title {
    color: white;
    font-weight: 700;
    font-size: 1.15rem;
}

.footer-brand-subtitle {
    font-size: 0.75rem;
    color: var(--neutral-400);
}

.footer-desc {
    font-size: 0.85rem;
    line-height: 1.6;
}

.footer-title {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid var(--neutral-800);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
}

/* --- 3. LOGIN PAGE --- */
.login-portal {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

.login-illustration-side {
    background: linear-gradient(135deg, #0F4C81 0%, #155e9c 50%, #1F7AE0 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-ill-overlay {
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 80%);
    pointer-events: none;
}

.login-ill-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 2;
}

.login-ill-logo {
    height: 48px;
    width: 48px;
}

.login-ill-brand {
    font-size: 1.25rem;
    font-weight: 700;
}

.login-ill-center {
    margin: auto 0;
    z-index: 2;
    max-width: 500px;
}

.login-ill-tag {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.login-ill-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.login-ill-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

/* Beautiful dynamic SVG Map graphics mock */
.login-map-svg-mockup {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-ill-footer {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    z-index: 2;
}

.login-form-side {
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem;
}

.login-form-container {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

.login-form-header {
    margin-bottom: 2.25rem;
}

.login-form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
}

.login-form-subtitle {
    font-size: 0.9rem;
    color: var(--neutral-500);
}

.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--neutral-700);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

.form-row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    font-size: 0.825rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: var(--neutral-600);
}

.remember-me input {
    cursor: pointer;
}

.forgot-password {
    color: var(--secondary);
    font-weight: 600;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-block {
    width: 100%;
    padding: 0.85rem;
    font-size: 0.95rem;
}

.back-to-public-btn {
    text-align: center;
    margin-top: 1.5rem;
}

.back-to-public-btn a {
    font-size: 0.875rem;
    color: var(--neutral-500);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.back-to-public-btn a:hover {
    color: var(--primary);
}

/* --- 4. SECURE AUTHENTICATED INTERNAL LAYOUT --- */
.internal-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    background-color: var(--neutral-50);
    overflow: hidden;
}

/* Sidebar Navigation */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--neutral-900);
    color: var(--neutral-300);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width var(--transition-normal);
    z-index: 101;
    border-right: 1px solid var(--neutral-800);
    position: relative;
}

.sidebar-brand-wrapper {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--neutral-800);
    overflow: hidden;
    gap: 0.75rem;
}

.sidebar-logo {
    height: 38px;
    width: 38px;
    flex-shrink: 0;
}

.sidebar-title-box {
    display: flex;
    flex-direction: column;
    transition: opacity var(--transition-normal);
    white-space: nowrap;
}

.sidebar-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.sidebar-subtitle {
    font-size: 0.65rem;
    color: var(--neutral-500);
    font-weight: 500;
}

.sidebar-menu-list {
    list-style: none;
    padding: 1.25rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--neutral-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 0.5rem 0.25rem;
    white-space: nowrap;
    transition: opacity var(--transition-normal);
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--neutral-400);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.sidebar-menu-item a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.sidebar-menu-item a:hover {
    background-color: var(--neutral-800);
    color: white;
}

.sidebar-menu-item a:hover svg {
    color: var(--secondary);
}

.sidebar-menu-item.active a {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
}

.sidebar-menu-item.active a svg {
    color: white;
}

.sidebar-footer {
    border-top: 1px solid var(--neutral-800);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.sidebar-footer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    border: 2px solid var(--neutral-700);
}

.sidebar-footer-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity var(--transition-normal);
}

.sidebar-footer-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.sidebar-footer-role {
    font-size: 0.7rem;
    color: var(--neutral-500);
    font-weight: 500;
}

/* Collapsed Sidebar Logic */
.app-sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.app-sidebar.collapsed .sidebar-title-box,
.app-sidebar.collapsed .sidebar-section-title,
.app-sidebar.collapsed .sidebar-footer-info {
    opacity: 0;
    pointer-events: none;
    width: 0;
}

.app-sidebar.collapsed .sidebar-menu-item a {
    justify-content: center;
    padding: 0.75rem;
}

.app-sidebar.collapsed .sidebar-brand-wrapper {
    justify-content: center;
    padding: 0;
}

/* Main Content Workspace wrapper */
.main-workspace {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Internal Workspace Header */
.workspace-header {
    height: var(--header-height);
    background-color: white;
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    flex-shrink: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle-btn {
    color: var(--neutral-500);
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.sidebar-toggle-btn:hover {
    background-color: var(--neutral-100);
    color: var(--neutral-800);
}

.global-search-bar {
    display: flex;
    align-items: center;
    background-color: var(--neutral-100);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.75rem;
    width: 320px;
    gap: 0.5rem;
}

.global-search-bar svg {
    color: var(--neutral-400);
    width: 16px;
    height: 16px;
}

.global-search-input {
    border: none;
    background: none;
    outline: none;
    font-size: 0.85rem;
    width: 100%;
    color: var(--neutral-800);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-bell-box {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
    border: 1px solid white;
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    cursor: pointer;
    transition: var(--transition-fast);
}

.user-profile-menu:hover {
    background-color: var(--neutral-50);
}

.user-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

.user-meta-sm {
    display: flex;
    flex-direction: column;
}

.user-name-sm {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--neutral-800);
    line-height: 1.2;
}

.user-role-sm {
    font-size: 0.65rem;
    color: var(--neutral-500);
    font-weight: 500;
}

/* Workspace main content panels */
.workspace-content-scroller {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Page containers inside scroller */
.page-container {
    animation: fadeIn 0.25s ease-out;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Internal Dashboard quick action styles */
.quick-actions-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.quick-action-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-fast);
    cursor: pointer;
}

.quick-action-card:hover {
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-action-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.quick-action-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--neutral-800);
}

.quick-action-desc {
    font-size: 0.75rem;
    color: var(--neutral-500);
}

/* Layout for Dashboard splits */
.dashboard-split-grid {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.recent-activity-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    height: 100%;
}

.timeline-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    position: relative;
    padding-left: 1.25rem;
    border-left: 2px solid var(--neutral-200);
    margin-top: 1rem;
}

.timeline-item {
    position: relative;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--neutral-300);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--neutral-200);
}

.timeline-dot.success { background-color: var(--success); box-shadow: 0 0 0 2px rgba(34,197,94,0.2); }
.timeline-dot.warning { background-color: var(--warning); box-shadow: 0 0 0 2px rgba(245,158,11,0.2); }
.timeline-dot.danger { background-color: var(--danger); box-shadow: 0 0 0 2px rgba(239,68,68,0.2); }
.timeline-dot.info { background-color: var(--secondary); box-shadow: 0 0 0 2px rgba(31,122,224,0.2); }

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.timeline-time {
    font-size: 0.7rem;
    color: var(--neutral-400);
    font-weight: 600;
}

.timeline-text {
    font-size: 0.8rem;
    color: var(--neutral-800);
}

.timeline-user {
    font-weight: 700;
    color: var(--neutral-900);
}

/* --- 5. DATABASE RTLH VIEW SYSTEM --- */
.toolbar-row {
    background-color: white;
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.toolbar-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-filter-select {
    padding: 0.5rem 1.75rem 0.5rem 0.75rem;
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
    background-color: white;
    color: var(--neutral-700);
    cursor: pointer;
    transition: var(--transition-fast);
}

.table-filter-select:focus {
    border-color: var(--primary);
}

.data-table-container {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-pagination-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-top: 1px solid var(--neutral-200);
    font-size: 0.8rem;
    color: var(--neutral-500);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.page-link-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--neutral-200);
    background-color: white;
    color: var(--neutral-700);
    transition: var(--transition-fast);
    font-weight: 600;
}

.page-link-btn:hover {
    background-color: var(--neutral-50);
    color: var(--primary);
}

.page-link-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Actions styling in table */
.action-btns-box {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-table-action {
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    color: var(--neutral-500);
    transition: var(--transition-fast);
}

.btn-table-action:hover {
    background-color: var(--neutral-100);
}

.btn-table-action.view-btn:hover { color: var(--secondary); }
.btn-table-action.edit-btn:hover { color: var(--warning); }
.btn-table-action.delete-btn:hover { color: var(--danger); }

/* Sliding Slide-Out Detail Preview Panel */
.sliding-preview-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background-color: white;
    box-shadow: var(--shadow-xl);
    border-left: 1px solid var(--neutral-200);
    z-index: 1000;
    transition: right var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.sliding-preview-panel.open {
    right: 0;
}

.preview-panel-header {
    height: var(--header-height);
    border-bottom: 1px solid var(--neutral-200);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--neutral-50);
}

.preview-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--neutral-800);
}

.preview-panel-close {
    font-size: 1.25rem;
    color: var(--neutral-400);
    cursor: pointer;
}

.preview-panel-close:hover {
    color: var(--neutral-700);
}

.preview-panel-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-house-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
}

.preview-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.preview-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    border-bottom: 1px solid var(--neutral-100);
    padding-bottom: 0.25rem;
}

.preview-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.preview-data-item {
    display: flex;
    flex-direction: column;
}

.preview-data-label {
    font-size: 0.7rem;
    color: var(--neutral-400);
    font-weight: 600;
}

.preview-data-value {
    font-size: 0.8rem;
    color: var(--neutral-800);
    font-weight: 600;
}

.preview-panel-footer {
    border-top: 1px solid var(--neutral-200);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--neutral-50);
}

/* --- 6. DETAIL RTLH PAGE (FULL PROFILE) --- */
.detail-layout-grid {
    display: grid;
    grid-template-columns: 7.5fr 4.5fr;
    gap: 1.5rem;
}

.profile-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.75rem;
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.profile-header-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--neutral-100);
    padding-bottom: 1.25rem;
}

.profile-name-box {
    display: flex;
    flex-direction: column;
}

.profile-title-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--neutral-900);
}

.profile-title-id {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 600;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.profile-data-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.profile-group-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 2px solid var(--neutral-100);
    padding-bottom: 0.35rem;
}

.profile-field-row {
    display: grid;
    grid-template-columns: 4.5fr 7.5fr;
    font-size: 0.85rem;
    padding: 0.25rem 0;
}

.profile-field-label {
    color: var(--neutral-500);
    font-weight: 500;
}

.profile-field-value {
    color: var(--neutral-800);
    font-weight: 600;
}

.detail-sidebar-block {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-map-box {
    height: 220px;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    overflow: hidden;
    position: relative;
}

.detail-gallery-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.gallery-img-box {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--neutral-200);
    position: relative;
    cursor: pointer;
    height: 100px;
}

.gallery-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-fast);
}

.gallery-img-box img:hover {
    transform: scale(1.05);
}

/* --- 7. WEBGIS PAGE FULLSCREEN WORKSPACE --- */
.gis-workspace {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.gis-header {
    height: var(--header-height);
    background-color: white;
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    flex-shrink: 0;
    z-index: 110;
    box-shadow: var(--shadow-sm);
}

.gis-body {
    flex-grow: 1;
    display: flex;
    height: calc(100vh - var(--header-height));
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Left GIS Panel */
.gis-left-sidebar {
    width: 320px;
    background-color: white;
    border-right: 1px solid var(--neutral-200);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 99;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
}

.gis-left-sidebar.collapsed {
    transform: translateX(-100%);
    position: absolute;
}

.gis-left-tabs {
    display: flex;
    border-bottom: 1px solid var(--neutral-200);
    background-color: var(--neutral-50);
}

.gis-left-tab {
    flex: 1;
    text-align: center;
    padding: 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--neutral-500);
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
}

.gis-left-tab:hover {
    color: var(--primary);
    background-color: white;
}

.gis-left-tab.active {
    color: var(--primary);
    border-color: var(--primary);
    background-color: white;
}

.gis-left-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.gis-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.layer-list-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.layer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.layer-item:hover {
    background-color: var(--neutral-50);
}

.layer-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.layer-symbol {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.layer-symbol.point { border-radius: 50%; background-color: var(--danger); border: 2px solid white; box-shadow: 0 0 0 1px var(--neutral-400); }
.layer-symbol.polygon { background-color: rgba(31, 122, 224, 0.2); border: 1.5px solid var(--secondary); }
.layer-symbol.district { background-color: transparent; border: 2px dashed #475569; }
.layer-symbol.village { background-color: transparent; border: 1px dashed #94a3b8; }

.layer-controls-btn {
    color: var(--neutral-400);
    padding: 0.2rem;
}

.layer-controls-btn:hover {
    color: var(--neutral-700);
}

/* Legend items in panel */
.legend-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background-color: var(--neutral-50);
    padding: 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* GIS Map Container */
.gis-map-container {
    flex-grow: 1;
    height: 100%;
    position: relative;
    background-color: #E2E8F0;
    z-index: 1;
}

/* Map Canvas (Leaflet Target) */
.gis-map-canvas {
    width: 100%;
    height: 100%;
}

/* Custom Floating HUD Toolbars on Map */
.gis-floating-tool {
    position: absolute;
    background-color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
    z-index: 10;
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

.gis-tool-vertical {
    flex-direction: column;
}

.gis-tool-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-600);
    transition: var(--transition-fast);
    font-size: 1.1rem;
    position: relative;
}

.gis-tool-btn:hover {
    background-color: var(--neutral-100);
    color: var(--primary);
}

.gis-tool-btn.active {
    background-color: var(--primary);
    color: white !important;
}

.gis-tool-btn:not(:last-child) {
    border-bottom: 1px solid var(--neutral-200);
}

.gis-tool-btn:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.gis-tool-btn:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); }

/* Specific Placements */
.gis-nav-tools { top: 20px; left: 20px; }
.gis-draw-tools { top: 20px; left: 70px; }
.gis-basemap-tool { bottom: 20px; left: 20px; padding: 0.25rem; }

/* Custom Basemap Popover */
.basemap-popover {
    position: absolute;
    bottom: 50px;
    left: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--neutral-200);
    padding: 0.75rem;
    display: grid;
    grid-template-columns: repeat(3, 80px);
    gap: 0.5rem;
    z-index: 12;
}

.basemap-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 600;
}

.basemap-option-thumb {
    width: 80px;
    height: 50px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    object-fit: cover;
}

.basemap-option.active .basemap-option-thumb {
    border-color: var(--secondary);
}

/* Floating Status Box */
.gis-scale-hud {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(15, 76, 129, 0.9);
    color: white;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Right GIS Panel Overlay (Info panel) */
.gis-right-sidebar {
    width: 340px;
    background-color: white;
    border-left: 1px solid var(--neutral-200);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 99;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-normal);
}

.gis-right-sidebar.collapsed {
    transform: translateX(100%);
    position: absolute;
    right: 0;
}

/* Leaflet Custom Marker popup */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-md) !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: var(--shadow-lg) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 260px !important;
}

.gis-popup-card {
    display: flex;
    flex-direction: column;
}

.gis-popup-header {
    background-color: var(--primary);
    color: white;
    padding: 0.75rem 1rem;
}

.gis-popup-title {
    font-weight: 700;
    font-size: 0.9rem;
}

.gis-popup-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
}

.gis-popup-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.gis-popup-row {
    display: flex;
    justify-content: space-between;
}

.gis-popup-label { color: var(--neutral-500); font-weight: 500; }
.gis-popup-val { color: var(--neutral-800); font-weight: 600; }

.gis-popup-footer {
    border-top: 1px solid var(--neutral-100);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    background-color: var(--neutral-50);
}

.btn-popup {
    flex: 1;
    font-size: 0.7rem;
    padding: 0.4rem;
    text-align: center;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* --- 8. IMPORT DATA SYSTEM --- */
.import-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.import-tabs-bar {
    display: flex;
    border-bottom: 2px solid var(--neutral-200);
    gap: 1.5rem;
}

.import-tab {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--neutral-500);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
}

.import-tab:hover {
    color: var(--primary);
}

.import-tab.active {
    color: var(--primary);
    border-color: var(--primary);
}

.drag-drop-zone {
    border: 2.5px dashed var(--neutral-300);
    border-radius: var(--radius-lg);
    background-color: var(--neutral-50);
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.drag-drop-zone:hover, .drag-drop-zone.dragover {
    border-color: var(--secondary);
    background-color: rgba(31, 122, 224, 0.03);
}

.drag-drop-icon {
    font-size: 3.5rem;
    color: var(--neutral-400);
}

.drag-drop-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-700);
    text-align: center;
}

.drag-drop-subtext {
    font-size: 0.8rem;
    color: var(--neutral-400);
}

/* Validation Results Overlay */
.validation-results-panel {
    background-color: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.validation-header {
    background-color: var(--neutral-50);
    padding: 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.validation-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.validation-progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--neutral-200);
    border-radius: 9999px;
    overflow: hidden;
}

.validation-progress-fill {
    width: 0%;
    height: 100%;
    background-color: var(--success);
    transition: width 1.5s ease-out;
}

.validation-item-log {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.8rem;
    padding: 0.5rem 0;
}

.validation-item-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* --- 9. MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.15s ease-out;
}

.modal-card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: scaleIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    background-color: var(--neutral-50);
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neutral-900);
}

.modal-close-btn {
    font-size: 1.25rem;
    color: var(--neutral-400);
    cursor: pointer;
}

.modal-close-btn:hover {
    color: var(--neutral-700);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.modal-footer {
    padding: 1rem 1.5rem;
    background-color: var(--neutral-50);
    border-top: 1px solid var(--neutral-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Empty States */
.empty-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background-color: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--neutral-300);
    margin-bottom: 1rem;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: 0.25rem;
}

.empty-state-desc {
    font-size: 0.85rem;
    color: var(--neutral-500);
    max-width: 320px;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    backdrop-filter: blur(2px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3.5px solid var(--neutral-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--neutral-600);
}

/* --- 10. RESPONSIVE DESIGN BREAKPOINTS --- */
@media (max-width: 1400px) {
    .charts-grid-layout .chart-card.col-6 { grid-column: span 12; }
    .charts-grid-layout .chart-card.col-4 { grid-column: span 6; }
    .charts-grid-layout .chart-card.col-8 { grid-column: span 12; }
    .detail-layout-grid { grid-template-columns: 1fr; }
    .detail-sidebar-block { flex-direction: row; flex-wrap: wrap; }
    .detail-sidebar-block > * { flex: 1; min-width: 300px; }
}

@media (max-width: 1100px) {
    .login-portal { grid-template-columns: 1fr; }
    .login-illustration-side { display: none; }
    .login-form-side { padding: 3rem 2rem; }
    .dashboard-split-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 1.75rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .public-header { padding: 0 1rem; }
    .brand-title { font-size: 0.95rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .global-search-bar { width: 200px; }
    .toolbar-row { flex-direction: column; align-items: stretch; }
    .toolbar-left, .toolbar-right { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stats-grid { margin-top: -2rem; }
    .btn { padding: 0.5rem 1rem; font-size: 0.8rem; }
    .global-search-bar { display: none; }
}
