/**
 * ==========================================================================
 * PANACEE CRM - MASTER STYLESHEET
 * Dental Clinic Lead Management System
 * ==========================================================================
 */

:root {
    /* Brand Gradient Colors */
    --color-pink: #E6338A;
    --color-purple: #7B3FBF;
    --color-blue: #3B6FD4;
    --color-heading-blue: #4A78C2;
    --color-heading-dark: #1E293B;

    /* Primary Gradient */
    --gradient-primary: linear-gradient(135deg, #E6338A 0%, #7B3FBF 50%, #3B6FD4 100%);
    --gradient-primary-hover: linear-gradient(135deg, #d32076 0%, #6830a7 50%, #2f5eb8 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(230, 51, 138, 0.08) 0%, rgba(123, 63, 191, 0.08) 50%, rgba(59, 111, 212, 0.08) 100%);
    --gradient-card-top: linear-gradient(90deg, #E6338A, #7B3FBF, #3B6FD4);

    /* Neutral & Background Tones */
    --color-bg: #F6F8FC;
    --color-card: #FFFFFF;
    --color-border: #E5EBF5;
    --color-border-subtle: #F1F4FA;
    --color-text-main: #2D3748;
    --color-text-muted: #64748B;
    --color-text-light: #94A3B8;

    /* Status Badges */
    --status-new-bg: #EBF3FE;
    --status-new-text: #2563EB;
    --status-new-border: #BFDBFE;

    --status-progress-bg: #FFF7ED;
    --status-progress-text: #D97706;
    --status-progress-border: #FED7AA;

    --status-completed-bg: #ECFDF5;
    --status-completed-text: #059669;
    --status-completed-border: #A7F3D0;

    /* Danger / Warning */
    --color-danger: #EF4444;
    --color-danger-bg: #FEF2F2;

    /* Layout & Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
    --shadow-md: 0 4px 16px rgba(59, 111, 212, 0.06), 0 2px 6px rgba(0, 0, 0, 0.02);
    --shadow-lg: 0 10px 25px rgba(123, 63, 191, 0.09), 0 4px 10px rgba(0, 0, 0, 0.03);
    --shadow-glow: 0 8px 24px rgba(123, 63, 191, 0.25);

    /* Dimensions & Transitions */
    --sidebar-width: 260px;
    --topbar-height: 72px;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 'Inter', sans-serif;
}

/* ==========================================================================
   Base & Resets
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    color: var(--color-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-purple);
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading-dark);
    font-weight: 600;
    line-height: 1.25;
}

.text-blue { color: var(--color-blue) !important; }
.text-orange { color: #D97706 !important; }
.text-green { color: #059669 !important; }
.text-muted { color: var(--color-text-muted) !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background-color: var(--color-purple);
    color: #FFFFFF;
}

.btn-gradient {
    background: var(--gradient-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(123, 63, 191, 0.28);
}

.btn-gradient:hover {
    background: var(--gradient-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(123, 63, 191, 0.38);
    color: #FFFFFF;
}

.btn-gradient:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
}

.btn-secondary:hover {
    background-color: #E2E8F0;
    color: #1E293B;
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--color-purple);
    color: var(--color-purple);
}

.btn-outline-primary:hover {
    background: rgba(123, 63, 191, 0.08);
}

.btn-outline-secondary {
    background: #FFFFFF;
    border-color: var(--color-border);
    color: var(--color-text-main);
}

.btn-outline-secondary:hover {
    background: #F8FAFC;
    border-color: var(--color-text-muted);
}

.btn-danger {
    background-color: var(--color-danger);
    color: #FFFFFF;
}

.btn-danger:hover {
    background-color: #DC2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-white {
    background: #FFFFFF;
    color: var(--color-heading-blue);
    border: 1px solid rgba(74, 120, 194, 0.2);
    font-weight: 600;
}

.btn-white:hover {
    background: #F8FAFC;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

.btn-xs {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

.btn-icon-only {
    padding: 8px 11px;
}

.btn-block {
    width: 100%;
}

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    margin-bottom: 20px;
}

.alert-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.alert-error {
    background-color: #FEF2F2;
    border: 1px solid #FEE2E2;
    color: #B91C1C;
}

.alert-success {
    background-color: #F0FDF4;
    border: 1px solid #DCFCE7;
    color: #15803D;
}

.alert-info {
    background-color: #EFF6FF;
    border: 1px solid #DBEAFE;
    color: #1E40AF;
}

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-pill {
    border-radius: var(--radius-pill);
}

.badge-primary {
    background: var(--gradient-primary);
    color: #FFFFFF;
}

.badge-info {
    background: #EBF3FE;
    color: var(--color-blue);
    border: 1px solid #BFDBFE;
}

/* Status Pills */
.badge-status {
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    text-transform: capitalize;
    letter-spacing: normal;
}

.badge-status-new {
    background-color: var(--status-new-bg);
    color: var(--status-new-text);
    border-color: var(--status-new-border);
}

.badge-status-progress {
    background-color: var(--status-progress-bg);
    color: var(--status-progress-text);
    border-color: var(--status-progress-border);
}

.badge-status-completed {
    background-color: var(--status-completed-bg);
    color: var(--status-completed-text);
    border-color: var(--status-completed-border);
}

.badge-status-failed {
    background-color: #FEF2F2;
    color: #DC2626;
    border-color: #FECACA;
}

.status-quick-select {
    padding: 5px 28px 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='%2364748b'%3E%3Cpath d='M0 0l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    outline: none;
    transition: all var(--transition-fast);
}

.status-quick-select:hover {
    filter: brightness(0.97);
}

.status-quick-select:focus {
    box-shadow: 0 0 0 2px rgba(123, 63, 191, 0.2);
}

/* ==========================================================================
   Form Controls
   ========================================================================== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.form-label.required::after {
    content: " *";
    color: var(--color-pink);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.92rem;
    background-color: #FFFFFF;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-main);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-purple);
    box-shadow: 0 0 0 3px rgba(123, 63, 191, 0.12);
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 14px;
    color: var(--color-text-light);
    font-size: 0.95rem;
    pointer-events: none;
}

.input-icon-wrapper .form-control {
    padding-left: 40px;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-password:hover {
    color: var(--color-text-main);
}

/* Status Radio Group (Badge Only) */
.status-radio-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.status-radio-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    padding: 4px 6px;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}

.status-radio-item:hover {
    background-color: #F1F5F9;
}

.status-radio-item input[type="radio"] {
    accent-color: var(--color-blue);
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

.status-radio-item .badge-status {
    cursor: pointer;
}

/* ==========================================================================
   AUTH / LOGIN PAGE STYLES
   ========================================================================== */
.auth-body {
    background: linear-gradient(135deg, #F0F4FC 0%, #E9EFFC 50%, #F6F8FC 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    padding: 24px;
}

.auth-wrapper {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: auto;
    z-index: 10;
}

/* Ambient glow background effects */
.ambient-circle {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    pointer-events: none;
    z-index: 1;
}

.ambient-1 {
    width: 420px;
    height: 420px;
    background: var(--color-pink);
    top: -100px;
    right: -100px;
}

.ambient-2 {
    width: 480px;
    height: 480px;
    background: var(--color-purple);
    bottom: -120px;
    left: -120px;
}

.ambient-3 {
    width: 350px;
    height: 350px;
    background: var(--color-blue);
    top: 40%;
    left: 50%;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    background: var(--color-card);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 45px rgba(59, 111, 212, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 1px solid rgba(229, 235, 245, 0.8);
}

.auth-container-simple {
    display: block !important;
    grid-template-columns: none !important;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    background: var(--color-card);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 50px rgba(59, 111, 212, 0.14), 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(229, 235, 245, 0.9);
}

.auth-card-simple {
    padding: 42px 38px 34px;
}

/* Left Brand Panel */
.auth-brand-panel {
    background: var(--gradient-primary);
    color: #FFFFFF;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-brand-panel::before {
    content: "";
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, transparent 70%);
    top: -60px;
    right: -60px;
    border-radius: 50%;
}

.auth-brand-panel h2 {
    color: #FFFFFF;
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1.3;
}

.auth-brand-panel p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 28px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 28px;
    align-self: flex-start;
}

.feature-pills {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.pill-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
}

.pill-item i {
    font-size: 1.1rem;
    color: #FFFFFF;
}

.brand-footer-quote {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 18px;
}

.quote-text {
    font-size: 0.86rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

.quote-author {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 4px;
    color: #FFFFFF;
}

/* Right Login Card */
.auth-card {
    padding: 48px 42px;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-header {
    margin-bottom: 28px;
    text-align: center;
}

.logo-wrapper {
    display: inline-block;
    padding: 10px 18px;
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    margin-bottom: 18px;
    border: 1px solid var(--color-border);
}

.auth-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
}

.auth-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-heading-blue);
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

.auth-form {
    margin-bottom: 20px;
}

.demo-credentials-card {
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-top: 6px;
    margin-bottom: 18px;
}

.demo-cred-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.demo-cred-body {
    display: flex;
    gap: 20px;
    font-size: 0.82rem;
    color: #475569;
}

.demo-cred-body code {
    background: #E2E8F0;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: #0F172A;
}

.demo-cred-note {
    font-size: 0.72rem;
    color: var(--color-text-light);
    margin-top: 6px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--color-purple);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    color: var(--color-pink);
}

.auth-footer {
    text-align: center;
    font-size: 0.76rem;
    color: var(--color-text-light);
}

/* ==========================================================================
   APP MAIN LAYOUT (DASHBOARD)
   ========================================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--color-bg);
}

/* ==========================================================================
   SIDEBAR NAVIGATION
   ========================================================================== */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: #FFFFFF;
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: transform var(--transition-normal);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 999;
}

.sidebar-brand-wrapper {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--color-border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand-card {
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

.sidebar-brand-sub {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--color-heading-blue);
    text-transform: uppercase;
    margin-top: 4px;
}

.btn-close-sidebar {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 14px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-text-light);
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-left: 12px;
}

.nav-list {
    list-style: none;
    margin-bottom: 24px;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--color-text-main);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.nav-icon-box {
    width: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.nav-text {
    flex: 1;
}

.nav-link:hover {
    background-color: #F8FAFC;
    color: var(--color-purple);
}

.nav-link:hover .nav-icon-box {
    color: var(--color-purple);
}

/* Active Sidebar Navigation Item: Brand Gradient */
.nav-link.active {
    background: var(--gradient-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(123, 63, 191, 0.25);
}

.nav-link.active .nav-icon-box {
    color: #FFFFFF;
}

.nav-link.active .badge-primary {
    background: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
}

.nav-link-logout {
    color: #DC2626;
}

.nav-link-logout:hover {
    background-color: #FEF2F2;
    color: #B91C1C;
}

.nav-link-logout:hover .nav-icon-box {
    color: #B91C1C;
}

.sync-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-demo { background-color: #F59E0B; }
.dot-live { background-color: #10B981; }

/* Sidebar Footer & Profile Popup (Image 2 Design) */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--color-border);
    background: #FAFCFE;
    position: relative;
}

.sidebar-profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    user-select: none;
}

.sidebar-profile-card:hover {
    background-color: #EEF2F6;
}

.sidebar-profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #0F3A4A;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.92rem;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.sidebar-profile-meta {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.sidebar-profile-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1E293B;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-email {
    font-size: 0.74rem;
    color: #64748B;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-chevron {
    color: #94A3B8;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Profile Popup Dropdown Card */
.profile-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 12px;
    right: 12px;
    background: #FFFFFF;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
    padding: 14px 14px 10px;
    z-index: 999;
    transform: translateY(8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.profile-popup.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.profile-popup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
}

.profile-popup-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #0F3A4A;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.profile-popup-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0F172A;
    line-height: 1.2;
}

.profile-popup-email {
    font-size: 0.78rem;
    color: #64748B;
    margin-top: 2px;
}

.profile-popup-divider {
    height: 1px;
    background-color: #E2E8F0;
    margin: 0 -14px 8px;
}

.profile-popup-menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-popup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: #334155;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    cursor: pointer;
}

.profile-popup-item i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    color: #64748B;
}

.profile-popup-item:hover {
    background-color: #F1F5F9;
    color: #0F172A;
}

.profile-popup-item:hover i {
    color: #0F172A;
}

.profile-item-logout {
    color: #EF4444 !important;
}

.profile-item-logout i {
    color: #EF4444 !important;
}

.profile-item-logout:hover {
    background-color: #FEF2F2 !important;
    color: #DC2626 !important;
}

/* ==========================================================================
   MAIN CONTENT AREA & TOP BAR
   ========================================================================== */
.app-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: var(--topbar-height);
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--color-text-main);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
}

.btn-sidebar-toggle:hover {
    background-color: #F1F5F9;
}

.page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-heading-blue);
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.connection-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
}

.pill-demo {
    background: #FFFBEB;
    color: #B45309;
    border: 1px solid #FDE68A;
}

.pill-live {
    background: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
}

.pulse-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}

.pill-demo .pulse-indicator { background-color: #F59E0B; }
.pill-live .pulse-indicator { background-color: #10B981; }

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.7; }
}

.topbar-user-badge .user-avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(123, 63, 191, 0.25);
}

.btn-icon-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rotating {
    animation: spin 0.8s linear infinite;
}

/* ==========================================================================
   CONTENT CONTAINER
   ========================================================================== */
.content-container {
    padding: 28px 32px 48px;
    flex: 1;
}

/* Banner */
.banner-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.banner-info {
    background: linear-gradient(90deg, #EFF6FF 0%, #F5F3FF 100%);
    border: 1px solid #DBEAFE;
    color: #1E3A8A;
}

.banner-icon-col {
    font-size: 1.3rem;
    color: var(--color-blue);
    flex-shrink: 0;
}

.banner-body {
    flex: 1;
    font-size: 0.86rem;
    line-height: 1.5;
}

.banner-body code {
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--color-purple);
}

/* ==========================================================================
   STATISTICS GRID
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
    align-items: stretch;
}

.stat-card {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

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

.stat-card-inner {
    padding: 22px 22px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 12px;
}

.stat-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    white-space: nowrap;
}

.stat-value {
    font-size: 1.95rem;
    font-weight: 700;
    color: var(--color-heading-dark);
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-subtext {
    font-size: 0.75rem;
    color: var(--color-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.icon-total {
    background: rgba(123, 63, 191, 0.1);
    color: var(--color-purple);
}

.icon-new {
    background: var(--status-new-bg);
    color: var(--color-blue);
}

.icon-progress {
    background: var(--status-progress-bg);
    color: #D97706;
}

.icon-completed {
    background: var(--status-completed-bg);
    color: #059669;
}

.stat-card-bar {
    height: 4px;
    width: 100%;
    margin-top: auto;
}

.bar-total { background: var(--gradient-primary); }
.bar-new { background: var(--color-blue); }
.bar-progress { background: #D97706; }
.bar-completed { background: #10B981; }

/* ==========================================================================
   LEADS TABLE CARD
   ========================================================================== */
.card {
    background: var(--color-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.leads-card {
    display: flex;
    flex-direction: column;
}

.leads-card-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    border-bottom: 1px solid var(--color-border);
}

.card-header-titles {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-heading-dark);
}

.leads-counter-pill {
    background: #F1F5F9;
    color: var(--color-text-muted);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    font-weight: 600;
}

.card-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box-wrapper {
    position: relative;
    width: 260px;
}

.search-box-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
    font-size: 0.88rem;
    pointer-events: none;
}

.search-box-wrapper .search-input {
    padding-left: 36px;
    padding-right: 32px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 0.86rem;
    height: 38px;
}

.btn-clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 4px;
    display: none;
}

.btn-clear-search:hover {
    color: var(--color-text-main);
}

.filter-dropdown-wrapper {
    position: relative;
}

.filter-dropdown-wrapper .filter-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
    font-size: 0.85rem;
    pointer-events: none;
}

.filter-dropdown-wrapper .select-filter {
    padding-left: 32px;
    padding-right: 28px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 0.86rem;
    height: 38px;
    background-color: #FFFFFF;
    cursor: pointer;
}

/* ==========================================================================
   TABLE STYLES
   ========================================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.leads-table thead {
    background-color: #F8FAFC;
    border-bottom: 1.5px solid var(--color-border);
}

.leads-table th {
    padding: 13px 20px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.leads-table td {
    padding: 14px 20px;
    font-size: 0.88rem;
    color: var(--color-text-main);
    border-bottom: 1px solid var(--color-border-subtle);
    vertical-align: middle;
}

.leads-table tbody tr {
    transition: background-color var(--transition-fast);
}

.leads-table tbody tr:hover {
    background-color: #F8FAFD;
}

.patient-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.patient-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(230, 51, 138, 0.15) 0%, rgba(59, 111, 212, 0.15) 100%);
    color: var(--color-purple);
    font-weight: 700;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.patient-name-block {
    display: flex;
    flex-direction: column;
}

.patient-name {
    font-weight: 600;
    color: var(--color-heading-dark);
}

.patient-id-sub {
    font-size: 0.72rem;
    color: var(--color-text-light);
    font-family: monospace;
}

.table-contact-link {
    color: var(--color-text-main);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.table-contact-link:hover {
    color: var(--color-blue);
    text-decoration: underline;
}

/* Action Buttons inside Table */
.action-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all var(--transition-fast);
}

.btn-view {
    color: #4F46E5;
    background: #EEF2FF;
    border-color: #E0E7FF;
}

.btn-view:hover {
    background: #4F46E5;
    color: #FFFFFF;
}

.btn-edit {
    color: var(--color-blue);
    background: #EFF6FF;
    border-color: #DBEAFE;
}

.btn-edit:hover {
    background: var(--color-blue);
    color: #FFFFFF;
}

.btn-delete {
    color: #DC2626;
    background: #FEF2F2;
    border-color: #FEE2E2;
}

.btn-delete:hover {
    background: #DC2626;
    color: #FFFFFF;
}

/* Screenshot Preview Styles */
.screenshot-thumb-wrapper {
    margin-top: 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    padding: 6px;
    background: #F8FAFC;
    display: inline-block;
    max-width: 100%;
}

.screenshot-thumbnail {
    max-width: 100%;
    max-height: 180px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    display: block;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.screenshot-thumbnail:hover {
    transform: scale(1.02);
}

/* View Details Modal Grid */
.view-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.view-detail-item {
    background: #F8FAFD;
    border: 1px solid var(--color-border-subtle);
    padding: 12px 14px;
    border-radius: var(--radius-md);
}

.view-detail-label {
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 4px;
}

.view-detail-val {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-heading-dark);
    word-break: break-word;
}

.view-screenshot-card {
    background: #F8FAFD;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: center;
}

.view-screenshot-img {
    max-width: 100%;
    max-height: 260px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: block;
    margin: 8px auto 0;
    cursor: pointer;
}

/* Live Auto-Sync Badge in Top Bar */
.live-sync-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    font-weight: 600;
    user-select: none;
    transition: all 0.3s ease;
}

.live-sync-pill.live-pulse-active {
    background: #D1FAE5;
    border-color: #34D399;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
    transform: scale(1.05);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10B981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Table Empty & Loading States */
.table-loading-cell,
.table-empty-cell {
    padding: 60px 20px;
    text-align: center;
    color: var(--color-text-muted);
}

.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(123, 63, 191, 0.15);
    border-top-color: var(--color-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.empty-state-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-text-light);
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-heading-dark);
    margin-bottom: 6px;
}

.empty-state-desc {
    font-size: 0.86rem;
    color: var(--color-text-muted);
    max-width: 320px;
    margin-bottom: 18px;
}

/* ==========================================================================
   PAGINATION FOOTER
   ========================================================================== */
.table-pagination-footer {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: 12px;
    background: #FAFCFE;
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
}

.pagination-info {
    font-size: 0.84rem;
    color: var(--color-text-muted);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
    background-color: #F1F5F9;
    border-color: #CBD5E1;
}

.page-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #FFFFFF;
    font-weight: 600;
}

.page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    padding: 16px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    overflow-y: auto;
    transition: opacity var(--transition-normal);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-dialog {
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    margin: auto;
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-dialog {
    transform: scale(1);
}

.modal-dialog-sm {
    max-width: 420px;
}

.modal-dialog-lg {
    max-width: 680px;
}

.modal-content {
    background: #FFFFFF;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
    background: #FAFCFE;
    flex-shrink: 0;
}

.modal-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--gradient-subtle);
    color: var(--color-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-heading-dark);
}

.modal-subtitle {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}

.btn-modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-modal-close:hover {
    color: var(--color-text-main);
    background-color: #F1F5F9;
}

.modal-body {
    padding: 22px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    flex: 1 1 auto;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 #F8FAFC;
}

/* Custom Sleek Scrollbar for Modal Body */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #F8FAFC;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.modal-footer {
    padding: 16px 24px;
    background-color: #F8FAFC;
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}

.modal-footer-center {
    justify-content: center;
}

/* Danger Modal */
.modal-header-danger {
    justify-content: space-between;
    background: #FEF2F2;
    border-bottom-color: #FEE2E2;
}

.modal-icon-danger {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #FEE2E2;
    color: #DC2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.modal-danger-title {
    font-size: 1.25rem;
    color: #991B1B;
    margin-bottom: 8px;
}

.modal-danger-desc {
    font-size: 0.88rem;
    color: #4B5563;
    line-height: 1.5;
    margin-bottom: 16px;
}

/* Setup Guide Modal */
.modal-guide-body {
    max-height: 70vh;
    overflow-y: auto;
}

.guide-step {
    display: flex;
    gap: 16px;
    margin-bottom: 22px;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 0.98rem;
    color: var(--color-heading-blue);
    margin-bottom: 4px;
}

.step-content p {
    font-size: 0.85rem;
    color: var(--color-text-main);
    line-height: 1.5;
    margin-bottom: 8px;
}

.code-box-inline {
    background: #F1F5F9;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    border: 1px solid var(--color-border);
    margin-bottom: 6px;
}

.code-box-inline code {
    color: var(--color-purple);
    font-weight: 600;
}

.code-snippet-box {
    background: #1E293B;
    color: #E2E8F0;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    overflow-x: auto;
}

.code-snippet-box code {
    color: #38BDF8;
}

.guide-bullets {
    padding-left: 20px;
    font-size: 0.85rem;
    color: var(--color-text-main);
    margin-bottom: 10px;
}

.guide-note {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    width: 340px;
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--color-border);
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-heading-dark);
    margin-bottom: 2px;
}

.toast-msg {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 2px;
    font-size: 0.88rem;
}

.toast-close:hover {
    color: var(--color-text-main);
}

.toast-success .toast-icon { color: #10B981; }
.toast-success { border-left: 4px solid #10B981; }

.toast-error .toast-icon { color: #EF4444; }
.toast-error { border-left: 4px solid #EF4444; }

.toast-info .toast-icon { color: var(--color-blue); }
.toast-info { border-left: 4px solid var(--color-blue); }

/* ==========================================================================
   RESPONSIVE DESIGN (BREAKPOINTS)
   ========================================================================== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-card {
        padding: 36px 24px;
    }

    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-backdrop.active {
        display: block;
    }

    .btn-close-sidebar {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .btn-sidebar-toggle {
        display: block;
    }

    .top-bar {
        padding: 0 18px;
    }

    .content-container {
        padding: 20px 18px 40px;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .top-bar-right .btn-label,
    .top-bar-right .pill-text {
        display: none;
    }

    .top-bar-right {
        gap: 8px;
    }

    .search-box-wrapper {
        width: 100%;
    }

    .filter-dropdown-wrapper {
        width: 100%;
    }

    .filter-dropdown-wrapper .select-filter {
        width: 100%;
    }

    .card-header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .leads-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .toast {
        width: calc(100vw - 32px);
    }

    .toast-container {
        right: 16px;
        left: 16px;
    }
}
