/* ========================================
   1. DESIGN TOKENS — Light Theme
   ======================================== */
:root {
    --primary: #0D9373;
    --primary-hover: #0A7A60;
    --primary-active: #086650;
    --primary-light: #E6F5F0;
    --primary-50: #F0FAF7;
    --primary-text: #065F46;
    --accent: #D4940A;
    --accent-hover: #B87E08;
    --accent-light: #FDF5E0;
    --success: #10B981;
    --success-light: #D1FAE5;
    --success-text: #065F46;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --warning-text: #92400E;
    --error: #EF4444;
    --error-light: #FEE2E2;
    --error-text: #991B1B;
    --info: #06B6D4;
    --info-light: #CFFAFE;
    --info-text: #155E75;
    --bg: #F5F6F8;
    --bg-elevated: #FFFFFF;
    --bg-hover: #F0F1F3;
    --bg-active: #E8EAED;
    --border: #E5E7EB;
    --border-light: #F0F1F3;
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --text-inverse: #FFFFFF;
    --sidebar-bg: #0F172A;
    --sidebar-text: #94A3B8;
    --sidebar-text-active: #FFFFFF;
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active: rgba(13, 147, 115, 0.2);
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;
    --mobile-nav-height: 64px;
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   2. DARK THEME
   ======================================== */
[data-theme="dark"] {
    --bg: #0B0D14;
    --bg-elevated: #151821;
    --bg-hover: #1C1F2B;
    --bg-active: #252837;
    --border: #252837;
    --border-light: #1C1F2B;
    --text-primary: #F1F3F9;
    --text-secondary: #9CA3B8;
    --text-muted: #5C6378;
    --primary-light: #0D2E25;
    --primary-50: #091E18;
    --success-light: #052E16;
    --warning-light: #422006;
    --error-light: #450A0A;
    --info-light: #083344;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.5);
    --sidebar-bg: #0A0C12;
    --sidebar-border: rgba(255, 255, 255, 0.05);
    --sidebar-hover: rgba(255, 255, 255, 0.04);
    --sidebar-active: rgba(13, 147, 115, 0.15);
}

/* ========================================
   3. RESET & BASE
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
}

img {
    display: block;
    max-width: 100%;
}

input,
select,
textarea,
button {
    font-family: inherit;
    font-size: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

::selection {
    background: var(--primary);
    color: #fff;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.hidden {
    display: none !important;
}

/* ========================================
   4. LOGIN SCREEN
   ======================================== */
#login-screen {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

.login-left {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #064E3B 0%, #0D9373 50%, #0D9373 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-12);
    overflow: hidden;
}

.login-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 50%), radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.login-bg-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.login-left-content {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.login-brand {
    margin-bottom: var(--space-12);
}

.login-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.login-logo span {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.login-left h1 {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: var(--space-4);
    letter-spacing: -0.5px;
}

.login-left .login-brand p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.login-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    color: rgba(255, 255, 255, 0.85);
}

.login-feature i {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 8px;
    color: #fff;
}

.login-feature strong {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.login-feature span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-12);
    background: var(--bg-elevated);
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-form-header {
    margin-bottom: var(--space-8);
}

.login-form-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: var(--space-2);
    letter-spacing: -0.3px;
}

.login-form-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ========================================
   5. FORM COMPONENTS
   ======================================== */
.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon>i {
    position: absolute;
    left: var(--space-3);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.input-icon input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-size: 14px;
}

.input-icon input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: var(--bg-elevated);
}

.input-icon input::placeholder {
    color: var(--text-muted);
}

.input-action {
    position: absolute;
    right: var(--space-2);
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    transition: color var(--transition-fast);
}

.input-action:hover {
    color: var(--text-secondary);
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.checkbox-label input:checked+.checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked+.checkbox-custom::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.form-link {
    font-size: 13px;
    font-weight: 500;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-6) 0;
    color: var(--text-muted);
    font-size: 13px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.social-buttons {
    display: flex;
    gap: var(--space-3);
}

.btn-social {
    flex: 1;
    justify-content: center;
    gap: var(--space-2);
    font-size: 13px;
    font-weight: 500;
}

.login-footer-text {
    text-align: center;
    margin-top: var(--space-6);
    font-size: 13px;
    color: var(--text-secondary);
}

/* ========================================
   6. BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
    border: 1.5px solid transparent;
    line-height: 1.4;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--bg-active);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--error);
    color: #fff;
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #059669;
}

.btn-full {
    width: 100%;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-xs {
    padding: 3px 8px;
    font-size: 11px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   7. SIDEBAR
   ======================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-base);
    border-right: 1px solid var(--sidebar-border);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    height: var(--topbar-height);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.sidebar-close-btn {
    display: none;
    color: var(--sidebar-text);
}

.sidebar-close-btn:hover {
    color: #fff;
    background: var(--sidebar-hover);
}

.sidebar-search {
    padding: 0 var(--space-4);
    margin-bottom: var(--space-2);
    flex-shrink: 0;
    position: relative;
}

.sidebar-search-icon {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--sidebar-text);
    pointer-events: none;
}

.sidebar-search input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: var(--sidebar-hover);
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.sidebar-search input::placeholder {
    color: var(--sidebar-text);
}

.sidebar-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(13, 147, 115, 0.1);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-2) var(--space-3);
}

.nav-section {
    margin-bottom: var(--space-4);
}

.nav-section-title {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--sidebar-text);
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--space-2) var(--space-3);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 8px var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 13.5px;
    font-weight: 450;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    position: relative;
    cursor: pointer;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    font-weight: 550;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.nav-badge {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    line-height: 1.4;
}

.nav-badge-warning {
    background: var(--warning);
    color: #fff;
}

.nav-badge-error {
    background: var(--error);
    color: #fff;
}

.nav-badge-info {
    background: var(--info);
    color: #fff;
}

.sidebar-footer {
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    display: block;
    font-size: 11px;
    color: var(--sidebar-text);
}

.sidebar-logout {
    color: var(--sidebar-text);
}

.sidebar-logout:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    display: block;
}

/* ========================================
   8. TOPBAR
   ======================================== */
#main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-base);
    display: flex;
    flex-direction: column;
}

#topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 var(--space-6);
    z-index: 50;
    gap: var(--space-4);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.breadcrumb-root {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.breadcrumb-sep {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.breadcrumb-current {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-center {
    flex: 1;
    max-width: 480px;
    margin: 0 auto;
}

.topbar-search {
    position: relative;
    display: flex;
    align-items: center;
}

.topbar-search i {
    position: absolute;
    left: var(--space-3);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.topbar-search input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 13px;
    transition: all var(--transition-fast);
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-elevated);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.topbar-search input::placeholder {
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.topbar-notification {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
    border: 2px solid var(--bg-elevated);
}

.topbar-divider {
    width: 1px;
    height: 28px;
    background: var(--border);
    margin: 0 var(--space-2);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 4px 8px 4px 4px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.topbar-user:hover {
    background: var(--bg-hover);
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.topbar-user-info {
    text-align: left;
}

.topbar-user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.topbar-user-role {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
}

.topbar-chevron {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.theme-icon-dark {
    display: none;
}

[data-theme="dark"] .theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-icon-dark {
    display: block;
}

/* ========================================
   9. CONTENT
   ======================================== */
#content {
    flex: 1;
    padding: var(--space-6);
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

/* ========================================
   10. CARDS
   ======================================== */
.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: box-shadow var(--transition-fast);
}

.card:hover {
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.card-body {
    padding: var(--space-6);
}

.card-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-light);
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

.kpi-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kpi-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.kpi-card.kpi-revenue::after {
    background: var(--primary);
}

.kpi-card.kpi-sales::after {
    background: var(--accent);
}

.kpi-card.kpi-available::after {
    background: var(--info);
}

.kpi-card.kpi-booked::after {
    background: var(--success);
}

.kpi-card.kpi-pending::after {
    background: var(--warning);
}

.kpi-card.kpi-customers::after {
    background: #8B5CF6;
}

.kpi-card.kpi-leads::after {
    background: var(--info);
}

.kpi-card.kpi-agents::after {
    background: var(--primary);
}

.kpi-card.kpi-sold::after {
    background: var(--success);
}

.kpi-card.kpi-reserved::after {
    background: #8B5CF6;
}

.kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.kpi-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon svg {
    width: 20px;
    height: 20px;
}

.kpi-icon.icon-revenue {
    background: var(--primary-light);
    color: var(--primary);
}

.kpi-icon.icon-sales {
    background: var(--accent-light);
    color: var(--accent);
}

.kpi-icon.icon-available {
    background: var(--info-light);
    color: var(--info);
}

.kpi-icon.icon-booked {
    background: var(--success-light);
    color: var(--success);
}

.kpi-icon.icon-pending {
    background: var(--warning-light);
    color: var(--warning);
}

.kpi-icon.icon-customers {
    background: #EDE9FE;
    color: #8B5CF6;
}

.kpi-icon.icon-leads {
    background: var(--info-light);
    color: var(--info);
}

.kpi-icon.icon-agents {
    background: var(--primary-light);
    color: var(--primary);
}

.kpi-icon.icon-sold {
    background: var(--success-light);
    color: var(--success);
}

.kpi-icon.icon-reserved {
    background: #EDE9FE;
    color: #8B5CF6;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-2);
    letter-spacing: -0.5px;
}

.kpi-change {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.kpi-change.up {
    background: var(--success-light);
    color: var(--success-text);
}

.kpi-change.down {
    background: var(--error-light);
    color: var(--error-text);
}

.kpi-change svg {
    width: 12px;
    height: 12px;
}

.kpi-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: var(--space-2);
}

/* ========================================
   11. CHARTS GRID
   ======================================== */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

.charts-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

.charts-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

.chart-container {
    position: relative;
    width: 100%;
    min-height: 280px;
}

.chart-container canvas {
    width: 100% !important;
}

/* ========================================
   12. DATA TABLES
   ======================================== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.data-table thead {
    background: var(--bg);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   13. BADGES
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-available {
    background: var(--info-light);
    color: var(--info-text);
}

.badge-available::before {
    background: var(--info);
}

.badge-booked {
    background: var(--warning-light);
    color: var(--warning-text);
}

.badge-booked::before {
    background: var(--warning);
}

.badge-sold {
    background: var(--success-light);
    color: var(--success-text);
}

.badge-sold::before {
    background: var(--success);
}

.badge-reserved {
    background: #EDE9FE;
    color: #6D28D9;
}

.badge-reserved::before {
    background: #8B5CF6;
}

.badge-blocked {
    background: var(--error-light);
    color: var(--error-text);
}

.badge-blocked::before {
    background: var(--error);
}

.badge-pending {
    background: var(--warning-light);
    color: var(--warning-text);
}

.badge-pending::before {
    background: var(--warning);
}

.badge-paid {
    background: var(--success-light);
    color: var(--success-text);
}

.badge-paid::before {
    background: var(--success);
}

.badge-overdue {
    background: var(--error-light);
    color: var(--error-text);
}

.badge-overdue::before {
    background: var(--error);
}

.badge-partial {
    background: #FEF3C7;
    color: #92400E;
}

.badge-partial::before {
    background: #F59E0B;
}

.badge-active {
    background: var(--success-light);
    color: var(--success-text);
}

.badge-active::before {
    background: var(--success);
}

.badge-inactive {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.badge-inactive::before {
    background: var(--text-muted);
}

.badge-new {
    background: var(--info-light);
    color: var(--info-text);
}

.badge-new::before {
    background: var(--info);
}

.badge-contacted {
    background: #DBEAFE;
    color: #1E40AF;
}

.badge-contacted::before {
    background: #3B82F6;
}

.badge-qualified {
    background: var(--primary-light);
    color: var(--primary-text);
}

.badge-qualified::before {
    background: var(--primary);
}

.badge-visit {
    background: var(--accent-light);
    color: #92400E;
}

.badge-visit::before {
    background: var(--accent);
}

.badge-negotiation {
    background: #FCE7F3;
    color: #9D174D;
}

.badge-negotiation::before {
    background: #EC4899;
}

.badge-lost {
    background: var(--bg-hover);
    color: var(--text-muted);
}

.badge-lost::before {
    background: var(--text-muted);
}

.badge-high {
    background: var(--error-light);
    color: var(--error-text);
}

.badge-medium {
    background: var(--warning-light);
    color: var(--warning-text);
}

.badge-low {
    background: var(--success-light);
    color: var(--success-text);
}

/* ========================================
   14. PAGE HEADER
   ======================================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.page-header-left h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: var(--space-1);
}

.page-header-left p {
    font-size: 14px;
    color: var(--text-secondary);
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* ========================================
   15. FILTERS
   ======================================== */
.filters-bar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
}

.search-input {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.search-input i {
    position: absolute;
    left: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.search-input input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 13px;
    transition: all var(--transition-fast);
}

.search-input input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-input input::placeholder {
    color: var(--text-muted);
}

.filter-select {
    padding: 8px 32px 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: all var(--transition-fast);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ========================================
   16. TABS
   ======================================== */
.tabs {
    display: flex;
    gap: var(--space-1);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-5);
    overflow-x: auto;
}

.tab {
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
    cursor: pointer;
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

/* ========================================
   17. PAGINATION
   ======================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.pagination-buttons {
    display: flex;
    gap: var(--space-1);
}

.page-btn {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    background: var(--bg-elevated);
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ========================================
   18. KANBAN
   ======================================== */
.kanban-board {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    padding-bottom: var(--space-4);
    min-height: 500px;
}

.kanban-column {
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

.kanban-column-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 13px;
    font-weight: 600;
}

.kanban-column-count {
    padding: 1px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.kanban-cards {
    flex: 1;
    padding: var(--space-3);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    overflow-y: auto;
    max-height: calc(100vh - 240px);
}

.kanban-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.kanban-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

.kanban-card-name {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
}

.kanban-card-project {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: var(--space-3);
}

.kanban-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kanban-card-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.kanban-card-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

/* ========================================
   19. ACTIVITY LIST
   ======================================== */
.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    position: relative;
}

.activity-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 38px;
    bottom: -4px;
    width: 2px;
    background: var(--border);
}

.activity-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-dot svg {
    width: 14px;
    height: 14px;
}

.activity-dot.dot-booking {
    background: var(--primary-light);
    color: var(--primary);
}

.activity-dot.dot-payment {
    background: var(--success-light);
    color: var(--success);
}

.activity-dot.dot-lead {
    background: var(--info-light);
    color: var(--info);
}

.activity-dot.dot-task {
    background: var(--warning-light);
    color: var(--warning);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 13px;
    line-height: 1.4;
}

.activity-text strong {
    font-weight: 600;
}

.activity-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ========================================
   20. MOBILE CARDS
   ======================================== */
.mobile-cards {
    display: none;
}

.mobile-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    transition: box-shadow var(--transition-fast);
}

.mobile-card:hover {
    box-shadow: var(--shadow-sm);
}

.mobile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}

.mobile-card-title {
    font-size: 14px;
    font-weight: 600;
}

.mobile-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.mobile-card-field-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.mobile-card-field-value {
    font-size: 13px;
    font-weight: 500;
}

.mobile-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-light);
}

.mobile-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.mobile-card-actions {
    display: flex;
    gap: var(--space-2);
}

/* ========================================
   21. PROJECT CARDS
   ======================================== */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}

.project-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.project-card-image {
    height: 180px;
    background: var(--bg-hover);
    position: relative;
    overflow: hidden;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card-status {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
}

.project-card-body {
    padding: var(--space-5);
}

.project-card-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.project-card-location {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.project-card-location svg {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.project-card-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
}

.project-stat {
    text-align: center;
}

.project-stat-value {
    font-size: 18px;
    font-weight: 700;
}

.project-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ========================================
   22. AGENT CARDS
   ======================================== */
.agent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}

.agent-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
    transition: all var(--transition-fast);
}

.agent-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.agent-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto var(--space-3);
    border: 3px solid var(--border);
}

.agent-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.agent-role {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: var(--space-4);
}

.agent-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.agent-stat {
    padding: var(--space-2);
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.agent-stat-value {
    font-size: 18px;
    font-weight: 700;
}

.agent-stat-label {
    font-size: 11px;
    color: var(--text-muted);
}

.agent-actions {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
}

/* ========================================
   23. TASK LIST
   ======================================== */
.task-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.task-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.task-item:hover {
    background: var(--bg-hover);
}

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.task-item.completed .task-checkbox {
    background: var(--primary);
    border-color: var(--primary);
}

.task-item.completed .task-checkbox::after {
    content: '';
    width: 6px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-text {
    flex: 1;
    font-size: 13.5px;
    font-weight: 450;
}

.task-due {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.task-priority {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-priority.high {
    background: var(--error);
}

.task-priority.medium {
    background: var(--warning);
}

.task-priority.low {
    background: var(--success);
}

/* ========================================
   24. OVERLAYS
   ======================================== */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 200ms ease;
}

.modal {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-2xl);
    animation: slideUp 250ms ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
}

.modal-body {
    padding: var(--space-6);
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    max-width: 90vw;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-2xl);
    display: flex;
    flex-direction: column;
    z-index: 201;
    animation: slideLeft 250ms ease;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.drawer-title {
    font-size: 17px;
    font-weight: 700;
}

.drawer-body {
    padding: var(--space-6);
    overflow-y: auto;
    flex: 1;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-4) var(--space-6) var(--space-8);
    z-index: 201;
    animation: slideUp 300ms ease;
    max-height: 80vh;
    overflow-y: auto;
}

.bottom-sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto var(--space-4);
}

.bottom-sheet-header {
    margin-bottom: var(--space-4);
}

.bottom-sheet-title {
    font-size: 17px;
    font-weight: 700;
}

/* ========================================
   25. TOAST
   ======================================== */
#toast-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    min-width: 320px;
    max-width: 440px;
    pointer-events: auto;
    animation: slideInRight 300ms ease;
    font-size: 13.5px;
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.toast-icon.success {
    color: var(--success);
}

.toast-icon.error {
    color: var(--error);
}

.toast-icon.warning {
    color: var(--warning);
}

.toast-icon.info {
    color: var(--info);
}

.toast-message {
    flex: 1;
}

.toast-close {
    flex-shrink: 0;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
}

.toast-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.toast.removing {
    animation: slideOutRight 250ms ease forwards;
}

/* ========================================
   26. CONFIRM DIALOG
   ======================================== */
.confirm-dialog {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-2xl);
    animation: slideUp 250ms ease;
}

.confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-4);
}

.confirm-icon.danger {
    background: var(--error-light);
    color: var(--error);
}

.confirm-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.confirm-icon svg {
    width: 28px;
    height: 28px;
}

.confirm-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.confirm-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

/* ========================================
   27. EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: var(--space-16) var(--space-8);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-5);
    color: var(--text-muted);
}

.empty-state-icon svg {
    width: 36px;
    height: 36px;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 360px;
    margin: 0 auto var(--space-6);
}

/* ========================================
   28. SKELETON
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-active) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 14px;
    margin-bottom: var(--space-2);
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-title {
    height: 22px;
    width: 40%;
    margin-bottom: var(--space-3);
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-lg);
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-chart {
    height: 280px;
    border-radius: var(--radius-lg);
}

/* ========================================
   29. MOBILE NAV
   ======================================== */
#mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mobile-nav-height);
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    z-index: 90;
    padding: 0 var(--space-2);
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    transition: color var(--transition-fast);
    padding: var(--space-2) 0;
}

.mobile-nav-item svg {
    width: 20px;
    height: 20px;
}

.mobile-nav-item.active {
    color: var(--primary);
}

/* ========================================
   30. FAB
   ======================================== */
.fab {
    display: none;
    position: fixed;
    bottom: calc(var(--mobile-nav-height) + 16px);
    right: var(--space-4);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(13, 147, 115, 0.4);
    z-index: 91;
    transition: all var(--transition-base);
    align-items: center;
    justify-content: center;
}

.fab svg {
    width: 24px;
    height: 24px;
}

.fab:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(13, 147, 115, 0.5);
}

.fab.open {
    transform: rotate(45deg);
    background: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

.fab-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 90;
}

.fab-menu {
    position: fixed;
    bottom: calc(var(--mobile-nav-height) + 80px);
    right: var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 91;
    padding: var(--space-2);
    min-width: 180px;
    animation: slideUp 200ms ease;
}

.fab-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    transition: background var(--transition-fast);
    cursor: pointer;
}

.fab-menu-item:hover {
    background: var(--bg-hover);
}

.fab-menu-item svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

/* ========================================
   31. SETTINGS / FORMS
   ======================================== */
.settings-section {
    margin-bottom: var(--space-8);
}

.settings-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.settings-section>p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: var(--space-5);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
}

.form-grid .form-group.full-width {
    grid-column: 1 / -1;
}

.form-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    background: var(--bg-elevated);
}

.form-input::placeholder {
    color: var(--text-muted);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: var(--space-1);
}

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--border-light);
}

.toggle-row:last-child {
    border-bottom: none;
}

.toggle-label-text {
    font-size: 14px;
    font-weight: 500;
}

.toggle-label-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.toggle {
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.toggle.active {
    background: var(--primary);
}

.toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform var(--transition-fast);
    box-shadow: var(--shadow-xs);
}

.toggle.active::after {
    transform: translateX(20px);
}

/* ========================================
   32. ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(60px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.page-enter {
    animation: fadeIn 200ms ease, slideUp 250ms ease;
}

/* ========================================
   33. LAPTOP
   ======================================== */
@media (max-width: 1439px) {
    .kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .agent-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   34. TABLET
   ======================================== */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close-btn {
        display: flex;
    }

    #main-wrapper {
        margin-left: 0;
    }

    .topbar-center {
        display: none;
    }

    #content {
        padding: var(--space-4);
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .charts-grid-3 {
        grid-template-columns: 1fr;
    }

    .charts-grid-2 {
        grid-template-columns: 1fr;
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }

    .agent-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .kanban-column {
        min-width: 260px;
        max-width: 260px;
    }

    .desktop-table {
        display: none;
    }

    .mobile-cards {
        display: block;
    }
}

/* ========================================
   35. MOBILE
   ======================================== */
@media (max-width: 767px) {
    #login-screen {
        flex-direction: column;
    }

    .login-left {
        display: none;
    }

    .login-right {
        padding: var(--space-6);
    }

    .login-form-header h2 {
        font-size: 22px;
    }

    #mobile-nav {
        display: flex;
    }

    .fab {
        display: flex;
    }

    #content {
        padding: var(--space-3);
        padding-bottom: calc(var(--mobile-nav-height) + var(--space-6));
    }

    #topbar {
        padding: 0 var(--space-3);
    }

    .topbar-user-info {
        display: none;
    }

    .topbar-divider {
        display: none;
    }

    .topbar-chevron {
        display: none;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .kpi-card {
        padding: var(--space-4);
    }

    .kpi-value {
        font-size: 22px;
    }

    .kpi-icon {
        width: 34px;
        height: 34px;
    }

    .kpi-icon svg {
        width: 16px;
        height: 16px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .project-card-image {
        height: 160px;
    }

    .agent-grid {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        max-width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .kanban-board {
        flex-direction: column;
    }

    .kanban-column {
        min-width: 100%;
        max-width: 100%;
    }

    .kanban-cards {
        max-height: 300px;
    }

    .mobile-card-body {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2);
    }

    .chart-container {
        min-height: 220px;
    }

    .modal {
        width: 95%;
        max-height: 90vh;
        margin: var(--space-4);
    }

    .modal-body {
        padding: var(--space-4);
    }

    .drawer {
        width: 100%;
        max-width: 100%;
    }

    .page-header-left h1 {
        font-size: 20px;
    }

    .page-header-actions {
        width: 100%;
    }

    .page-header-actions .btn {
        flex: 1;
    }

    .social-buttons {
        flex-direction: column;
    }

    #toast-container {
        top: auto;
        bottom: calc(var(--mobile-nav-height) + var(--space-4));
        right: var(--space-3);
        left: var(--space-3);
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    .breadcrumb-root,
    .breadcrumb-sep {
        display: none;
    }

    .activity-item:not(:last-child)::after {
        left: 13px;
        top: 34px;
    }

    .activity-dot {
        width: 28px;
        height: 28px;
    }

    .activity-dot svg {
        width: 12px;
        height: 12px;
    }
}

/* ========================================
   36. SMALL MOBILE
   ======================================== */
@media (max-width: 374px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .mobile-card-body {
        grid-template-columns: 1fr;
    }

    .project-card-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2);
    }
}

/* ========================================
   37. PRINT
   ======================================== */
@media print {

    .sidebar,
    #topbar,
    #mobile-nav,
    .fab,
    .fab-menu,
    .fab-backdrop,
    .page-header-actions,
    .filters-bar,
    .pagination {
        display: none !important;
    }

    #main-wrapper {
        margin-left: 0 !important;
    }

    #content {
        padding: 0 !important;
    }

    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}