/* ==========================================================================
   Karthick Growth Admin Panel Stylesheet (admin-style.css)
   A premium, modern, responsive SaaS Dashboard design with Dark/Light modes.
   ========================================================================== */

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

/* ==========================================================================
   1. DESIGN SYSTEM & CSS VARIABLES
   ========================================================================== */
:root {
    /* Dark Theme (Default) */
    --bg-main: #0B0F19;
    --bg-sidebar: #050811;
    --bg-card: rgba(16, 24, 48, 0.6);
    --bg-card-hover: rgba(22, 34, 68, 0.85);
    --bg-input: #0F1626;
    --bg-active: rgba(0, 82, 255, 0.15);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 82, 255, 0.3);
    
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    
    --color-accent: #0052FF;
    --color-accent-hover: #1A70FF;
    --color-accent-glow: rgba(0, 82, 255, 0.4);
    
    --color-success: #10B981;
    --color-success-bg: rgba(16, 185, 129, 0.15);
    --color-success-border: rgba(16, 185, 129, 0.3);
    
    --color-warning: #F59E0B;
    --color-warning-bg: rgba(245, 158, 11, 0.15);
    --color-warning-border: rgba(245, 158, 11, 0.3);
    
    --color-danger: #EF4444;
    --color-danger-bg: rgba(239, 68, 68, 0.15);
    --color-danger-border: rgba(239, 68, 68, 0.3);
    
    --color-whatsapp: #25D366;
    --color-whatsapp-bg: rgba(37, 211, 102, 0.15);
    --color-whatsapp-border: rgba(37, 211, 102, 0.3);

    /* Fonts & Effects */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 15px var(--color-accent-glow);
    
    --glass-blur: blur(12px);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* Light Theme overrides */
body.light-theme {
    --bg-main: #F3F4F6;
    --bg-sidebar: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F9FAFB;
    --bg-input: #F3F4F6;
    --bg-active: rgba(0, 82, 255, 0.08);
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 82, 255, 0.2);
    
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    
    --color-accent-glow: rgba(0, 82, 255, 0.25);
    
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   2. BASIC RESET & DOCUMENT GENERAL
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================================================
   3. BLURRED SECURITY LOCK SCREEN
   ========================================================================== */
.lock-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 17, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.lock-screen-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
}

.lock-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: lockCardEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lockCardEntrance {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lock-icon-container {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: var(--bg-active);
    border: 1px solid var(--border-hover);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-glow);
}

.lock-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.lock-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
    line-height: 1.5;
}

.pin-input-group {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.pin-digit-input {
    width: 52px;
    height: 52px;
    border-radius: var(--border-radius-md);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    transition: var(--transition-fast);
}

.pin-digit-input:focus {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-glow);
}

.pin-digit-input.filled {
    border-color: var(--color-accent-hover);
}

.lock-error {
    color: var(--color-danger);
    font-size: 14px;
    height: 20px;
    margin-bottom: 16px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.lock-error.visible {
    opacity: 1;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.lock-hint {
    color: var(--text-muted);
    font-size: 12px;
    background: var(--bg-input);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
    display: inline-block;
    border: 1px dashed var(--border-color);
}

/* ==========================================================================
   4. CORE DASHBOARD LAYOUT
   ========================================================================== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR STYLE --- */
.main-sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: width var(--transition-normal), background-color var(--transition-normal);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-md);
    background: linear-gradient(135deg, var(--color-accent), #7C3AED);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(0, 82, 255, 0.3);
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.brand-tag {
    font-size: 9px;
    text-transform: uppercase;
    background: var(--color-accent);
    color: #FFF;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 6px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--border-radius-md);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-fast);
    width: 100%;
}

.nav-item svg {
    transition: transform var(--transition-fast);
}

.nav-item:hover {
    color: var(--text-primary);
    background-color: var(--bg-active);
}

.nav-item:hover svg {
    transform: translateX(2px);
}

.nav-item.active {
    color: #FFFFFF;
    background: var(--color-accent);
    box-shadow: 0 4px 14px var(--color-accent-glow);
}

.nav-item.active svg {
    color: #FFFFFF;
}

.sidebar-status-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 16px;
    margin-top: 30px;
    text-align: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-success);
    background: var(--color-success-bg);
    border: 1px solid var(--color-success-border);
    padding: 4px 10px;
    border-radius: 20px;
}

.status-dot-pulse {
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: 50%;
    position: relative;
}

.status-dot-pulse::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: var(--color-success);
    border-radius: 50%;
    animation: statusPulse 1.8s infinite ease-in-out;
}

@keyframes statusPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0052FF, #0A2540);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #FFF;
    border: 2px solid var(--color-accent);
}

.admin-info h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-info p {
    font-size: 11px;
    color: var(--text-muted);
}

/* --- MAIN PANEL CONTENT --- */
.main-content {
    flex-grow: 1;
    margin-left: 260px;
    padding: 30px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-normal);
}

/* ==========================================================================
   5. HEADER PANEL SECTION
   ========================================================================== */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.panel-header-title h1 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.panel-header-title p {
    color: var(--text-secondary);
    font-size: 14px;
}

.panel-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.date-badge {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--border-radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.theme-toggle-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--bg-active);
}

.theme-toggle-btn .sun-icon {
    display: none;
}

body.light-theme .theme-toggle-btn .sun-icon {
    display: block;
}

body.light-theme .theme-toggle-btn .moon-icon {
    display: none;
}

/* ==========================================================================
   6. TAB & PANEL VIEW CONTAINERS
   ========================================================================== */
.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    flex-grow: 1;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   7. WIDGETS & STAT CARDS (OVERVIEW TAB)
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--card-accent-color, var(--color-accent));
}

.stat-card.blue { --card-accent-color: var(--color-accent); }
.stat-card.emerald { --card-accent-color: var(--color-success); }
.stat-card.amber { --card-accent-color: var(--color-warning); }
.stat-card.purple { --card-accent-color: #8B5CF6; }

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-active);
    color: var(--card-accent-color, var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-value {
    font-size: 28px;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}

.stat-trend.up { color: var(--color-success); }
.stat-trend.neutral { color: var(--text-muted); }

/* --- TWO-COLUMN DASHBOARD SECTION --- */
.overview-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.dashboard-panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.panel-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.panel-card-header h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
}

/* Shortcut buttons in dashboard */
.shortcut-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background: var(--color-accent-hover);
    box-shadow: var(--shadow-glow);
}

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

.btn-outline:hover {
    border-color: var(--text-muted);
    background: var(--bg-active);
}

.btn-danger {
    background: var(--color-danger-bg);
    border-color: var(--color-danger-border);
    color: var(--color-danger);
}

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

/* ==========================================================================
   8. FILTER CONTROLS & UTILITIES (LEADS TAB)
   ========================================================================== */
.table-filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filters-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    min-width: 250px;
    flex-grow: 1;
    max-width: 400px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition-fast);
}

.search-input-wrapper input:focus {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-glow);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.filter-select-wrapper {
    min-width: 160px;
}

.filter-select {
    width: 100%;
    padding: 10px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239CA3AF' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 36px;
}

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

/* ==========================================================================
   9. INTERACTIVE LEADS TABLE
   ========================================================================== */
.leads-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

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

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

.leads-table th {
    background: rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-heading);
    letter-spacing: 0.2px;
}

.leads-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.leads-table th.sortable:hover {
    color: var(--text-primary);
}

.sort-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    vertical-align: middle;
    color: var(--text-muted);
}

.leads-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.leads-table tr:last-child td {
    border-bottom: none;
}

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

.leads-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Table Name Avatar Cell */
.lead-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.lead-letter-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #FFFFFF;
}

/* Badges for Table Categories */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-blue { background: rgba(0, 82, 255, 0.15); color: #60A5FA; border: 1px solid rgba(0, 82, 255, 0.25); }
.badge-purple { background: rgba(139, 92, 246, 0.15); color: #A78BFA; border: 1px solid rgba(139, 92, 246, 0.25); }
.badge-orange { background: rgba(249, 115, 22, 0.15); color: #FDBA74; border: 1px solid rgba(249, 115, 22, 0.25); }
.badge-pink { background: rgba(236, 72, 153, 0.15); color: #FBCFE8; border: 1px solid rgba(236, 72, 153, 0.25); }
.badge-gray { background: rgba(107, 114, 128, 0.15); color: #D1D5DB; border: 1px solid rgba(107, 114, 128, 0.25); }

/* Interactive lead contacted status toggler */
.status-pill {
    cursor: pointer;
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.status-pill.status-new {
    background-color: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

.status-pill.status-new:hover {
    background-color: rgba(59, 130, 246, 0.22);
}

.status-pill.status-contacted {
    background-color: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: var(--color-success);
}

.status-pill.status-contacted:hover {
    background-color: rgba(16, 185, 129, 0.25);
}

/* Action buttons in row */
.action-buttons-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.action-icon-btn.btn-call {
    color: var(--color-accent);
}
.action-icon-btn.btn-call:hover {
    background: var(--bg-active);
    border-color: var(--color-accent);
}

.action-icon-btn.btn-wa {
    color: var(--color-whatsapp);
}
.action-icon-btn.btn-wa:hover {
    background: var(--color-whatsapp-bg);
    border-color: var(--color-whatsapp);
}

.action-icon-btn.btn-delete {
    color: var(--color-danger);
}
.action-icon-btn.btn-delete:hover {
    background: var(--color-danger-bg);
    border-color: var(--color-danger);
}

/* Empty Table state */
.table-empty-state {
    padding: 60px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.table-empty-state h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.table-empty-state p {
    font-size: 14px;
    max-width: 320px;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ==========================================================================
   10. ANALYTICS GRAPHS & WIDGETS
   ========================================================================== */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.chart-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 300px;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 10px 0;
}

/* Pure CSS SVG/Flex Bar Chart */
.chart-container-flex {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding-top: 20px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.chart-flex-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 14%;
    height: 100%;
    justify-content: flex-end;
}

.chart-flex-bar {
    width: 100%;
    background: linear-gradient(180deg, var(--color-accent-hover), var(--color-accent));
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    transition: height 1s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    min-height: 4px;
    cursor: pointer;
}

.chart-flex-bar:hover {
    filter: brightness(1.2);
    box-shadow: 0 -4px 12px var(--color-accent-glow);
}

.chart-bar-value {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-bar-label {
    margin-top: 12px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Pure CSS Doughnut Chart representation in SVG */
.donut-svg {
    transform: rotate(-90deg);
}

.donut-segment {
    fill: none;
    stroke-width: 10px;
    transition: stroke-dasharray 1s ease;
}

.donut-center {
    fill: transparent;
}

.donut-label-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 20px;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.legend-color-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-count {
    font-weight: 600;
}

/* ==========================================================================
   11. SETTINGS TAB STYLES
   ========================================================================== */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.settings-section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 30px;
}

.settings-card-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}

.settings-card-desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition-fast);
}

.form-input:focus {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-glow);
}

.webhook-test-box {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: monospace;
    font-size: 12px;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-all;
}

/* ==========================================================================
   12. NOTIFICATION TOAST MESSAGES
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: var(--bg-card);
    border-left: 4px solid var(--color-accent);
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

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

.toast.toast-success { border-left-color: var(--color-success); }
.toast.toast-warning { border-left-color: var(--color-warning); }
.toast.toast-danger { border-left-color: var(--color-danger); }

/* ==========================================================================
   13. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Tablet Optimization */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .overview-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile Portrait Optimization */
@media (max-width: 768px) {
    .main-sidebar {
        width: 70px;
        padding: 30px 10px;
    }
    
    .brand-text, .brand-tag, .sidebar-status-card, .admin-info, .sidebar-footer {
        display: none;
    }
    
    .sidebar-footer {
        justify-content: center;
        border-top: none;
        padding-top: 0;
    }
    
    .nav-item {
        padding: 12px;
        justify-content: center;
    }
    
    .nav-item span {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
        padding: 20px;
    }
    
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .panel-header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters-left {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input-wrapper {
        max-width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    /* Table Responsive Columns hide */
    .leads-table th:nth-child(5),
    .leads-table td:nth-child(5) {
        display: none; /* Hide service column on small mobile */
    }
    
    .toast-container {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}
