/* ================================================================
   MAVERAA â€” WhatsApp Management Platform
   Master Stylesheet (style.css)
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ================================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ================================================================ */
:root {
    /* Brand Colors */
    --primary: #6366F1;
    --primary-hover: #4F46E5;
    --primary-light: #EEF2FF;
    --primary-dark: #3730A3;
    --primary-glow: rgba(99, 102, 241, 0.35);

    /* Semantic Colors */
    --success: #10B981;
    --success-light: #D1FAE5;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    /* Neutrals */
    --bg-body: #F1F5F9;
    --bg-surface: #FFFFFF;
    --bg-surface-hover: #F8FAFC;
    --bg-elevated: #FFFFFF;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --text-inverse: #FFFFFF;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --divider: #E2E8F0;

    /* Shadows */
    --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-primary: 0 4px 14px 0 rgba(99, 102, 241, 0.35);

    /* Layout */
    --sidebar-width: 272px;
    --sidebar-collapsed: 80px;
    --navbar-height: 72px;

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
}

/* ================================================================
   2. RESET & BASE
   ================================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

ul, ol {
    list-style: none;
}

/* ================================================================
   3. TYPOGRAPHY
   ================================================================ */
.text-xs { font-size: 12px; line-height: 1.4; }
.text-sm { font-size: 13px; line-height: 1.5; }
.text-base { font-size: 14px; line-height: 1.6; }
.text-md { font-size: 16px; line-height: 1.5; }
.text-lg { font-size: 18px; line-height: 1.4; }
.text-xl { font-size: 20px; line-height: 1.3; }
.text-2xl { font-size: 24px; line-height: 1.3; }
.text-3xl { font-size: 30px; line-height: 1.2; }
.text-4xl { font-size: 36px; line-height: 1.1; }
.text-5xl { font-size: 48px; line-height: 1.05; }
.text-6xl { font-size: 60px; line-height: 1; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary-color { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

/* ================================================================
   4. BUTTONS
   ================================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
    outline: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-primary);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--text-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 8px;
}

.btn-ghost:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--danger);
    color: var(--text-inverse);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #DC2626;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.btn-success {
    background: var(--success);
    color: var(--text-inverse);
    border-color: var(--success);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-icon {
    padding: 10px;
    border-radius: var(--radius-md);
}

/* ================================================================
   5. FORM ELEMENTS
   ================================================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(255, 255, 255, 0.04);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    background: var(--bg-surface);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ================================================================
   6. CARDS
   ================================================================ */
.card {
    background: var(--bg-surface);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0.5;
}

.card-hover:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Stat Cards */
.stat-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon-primary { background: var(--primary-light); color: var(--primary); }
.stat-icon-success { background: var(--success-light); color: var(--success); }
.stat-icon-warning { background: var(--warning-light); color: var(--warning); }
.stat-icon-danger { background: var(--danger-light); color: var(--danger); }
.stat-icon-info { background: var(--info-light); color: var(--info); }

.stat-info { flex: 1; }

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-primary);
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.stat-change-up { background: var(--success-light); color: var(--success); }
.stat-change-down { background: var(--danger-light); color: var(--danger); }

/* ================================================================
   7. BADGES & TAGS
   ================================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-neutral { background: var(--bg-body); color: var(--text-secondary); }

/* ================================================================
   8. TABLE
   ================================================================ */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 20px;
    text-align: left;
    white-space: nowrap;
}

.table th {
    background: var(--bg-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.table td {
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.table tbody tr {
    transition: background var(--duration-fast) var(--ease-smooth);
}

.table tbody tr:hover {
    background: var(--bg-surface-hover);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ================================================================
   9. MODAL
   ================================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--ease-smooth), visibility var(--duration-normal) var(--ease-smooth);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: transform var(--duration-normal) var(--ease-smooth);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--duration-fast);
}

.modal-close:hover {
    background: var(--bg-body);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 24px 24px;
}

/* ================================================================
   10. DASHBOARD LAYOUT
   ================================================================ */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    transition: transform var(--duration-normal) var(--ease-smooth);
}

.sidebar-header {
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.sidebar-logo i {
    font-size: 28px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.nav-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 16px 16px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--duration-fast) var(--ease-smooth);
    cursor: pointer;
    position: relative;
}

.nav-item i {
    font-size: 20px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item:hover {
    background: var(--bg-body);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.nav-item-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    transition: background var(--duration-fast);
    cursor: pointer;
}

.sidebar-user:hover {
    background: var(--bg-body);
}

.sidebar-user-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 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* NAVBAR */
.navbar {
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 20px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.navbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.navbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

.navbar-breadcrumb span {
    color: var(--text-primary);
    font-weight: 600;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-search {
    position: relative;
    margin-right: 8px;
}

.navbar-search input {
    width: 240px;
    padding: 8px 14px 8px 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-body);
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.navbar-search input:focus {
    background: var(--bg-surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    width: 300px;
}

.navbar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}

.navbar-notification {
    position: relative;
}

.navbar-notification .notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-surface);
}

.navbar-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
    margin: 0 8px;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 6px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--duration-fast);
}

.navbar-user:hover {
    background: var(--bg-body);
}

.navbar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.navbar-user-info {
    display: flex;
    flex-direction: column;
}

.navbar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.navbar-user-plan {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 32px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.page-description {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Grid helpers */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ================================================================
   11. DROPDOWN
   ================================================================ */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all var(--duration-fast) var(--ease-smooth);
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast);
}

.dropdown-item:hover {
    background: var(--bg-body);
    color: var(--text-primary);
}

.dropdown-item i {
    font-size: 18px;
    width: 18px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

/* ================================================================
   12. TOAST / ALERTS
   ================================================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 320px;
    max-width: 420px;
    animation: slideInRight var(--duration-normal) var(--ease-smooth);
}

.toast-success { border-left: 4px solid var(--success); }
.toast-danger { border-left: 4px solid var(--danger); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info { border-left: 4px solid var(--info); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ================================================================
   13. EMPTY STATE
   ================================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-xl);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 360px;
    margin-bottom: 24px;
}

/* ================================================================
   14. INBOX / CHAT LAYOUT
   ================================================================ */
.inbox-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    height: calc(100vh - var(--navbar-height));
    border-radius: 0;
    overflow: hidden;
    background: #efeae2;
    border: none;
}

.inbox-sidebar {
    border-right: 1px solid #d1d7db;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.inbox-sidebar-header {
    padding: 16px;
    background: #f0f2f5;
    border-bottom: 1px solid #d1d7db;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inbox-search {
    position: relative;
    background: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.inbox-search input {
    width: 100%;
    padding: 10px 10px 10px 10px;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: #111b21;
}

.inbox-search input:focus {
    background: transparent;
}

.inbox-search i {
    color: #54656f;
    font-size: 18px;
}

.inbox-list {
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
}

.inbox-list::-webkit-scrollbar { width: 6px; }
.inbox-list::-webkit-scrollbar-thumb { background: rgba(11,20,26,.2); border-radius: 4px; }

.inbox-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #f2f2f2;
    cursor: pointer;
    transition: background 0.2s ease;
}

.inbox-item:hover {
    background: #f5f6f6;
}

.inbox-item.active {
    background: #f0f2f5;
}

.inbox-item-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #dfe5e7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
    color: #ffffff;
    flex-shrink: 0;
}

.inbox-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.inbox-item-name {
    font-size: 16px;
    color: #111b21;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-item-preview {
    font-size: 14px;
    color: #667781;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.inbox-item-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.inbox-item-time {
    font-size: 12px;
    color: #667781;
}

.inbox-item-unread {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #25d366;
    color: white;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chat Panel */
.chat-panel {
    display: flex;
    flex-direction: column;
    background: #efeae2 url("https://web.whatsapp.com/img/bg-chat-tile-dark_a4be512e7195b6b733d9110b408f075d.png");
    background-blend-mode: overlay;
    position: relative;
}

.chat-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    z-index: 0;
}

.chat-panel-header {
    padding: 10px 16px;
    background: #f0f2f5;
    border-left: 1px solid #d1d7db;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1;
}

.chat-panel-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chat-panel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dfe5e7;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
}

.chat-panel-name {
    font-size: 16px;
    color: #111b21;
}

.chat-panel-status {
    font-size: 13px;
    color: #667781;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 64px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1;
}

.chat-bubble {
    max-width: 65%;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14.5px;
    line-height: 1.4;
    position: relative;
    color: #111b21;
    box-shadow: 0 1px 1px rgba(11,20,26,.1);
}

.chat-bubble-in {
    background: #ffffff;
    align-self: flex-start;
    border-top-left-radius: 0;
    margin-bottom: 8px;
}

.chat-bubble-out {
    background: #d9fdd3;
    align-self: flex-end;
    border-top-right-radius: 0;
    margin-bottom: 8px;
}

.chat-bubble-time {
    font-size: 11px;
    margin-top: 2px;
    opacity: 0.6;
    float: right;
    margin-left: 12px;
}

.chat-input-area {
    padding: 12px 16px;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 1;
}

.chat-input-area .btn-ghost {
    color: #54656f;
    font-size: 24px;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    background: #ffffff;
}

.chat-input-area input::placeholder {
    color: #8696a0;
}

.chat-input-area .btn-primary {
    background: transparent;
    color: #54656f;
    font-size: 24px;
    border: none;
    box-shadow: none;
}
.chat-input-area .btn-primary:hover {
    color: #111b21;
}

/* ================================================================
   15. LANDING PAGE
   ================================================================ */
.landing-body {
    background: var(--bg-surface);
}

/* Landing Navbar */
.landing-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid transparent;
    transition: all var(--duration-normal);
}

.landing-navbar.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.landing-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}

.landing-nav-logo i {
    font-size: 30px;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.landing-nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--duration-fast);
}

.landing-nav-link:hover {
    color: var(--primary);
}

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 80px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 28px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.hero-title {
    font-size: 64px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -2px;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    margin-top: 64px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.hero-stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
}

.hero-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Features Section */
.section {
    padding: 100px 60px;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    padding: 32px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: var(--bg-surface);
    transition: all var(--duration-normal) var(--ease-smooth);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.feature-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feature-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    padding: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--bg-surface);
    text-align: center;
    transition: all var(--duration-normal);
}

.pricing-card.popular {
    border-color: var(--primary);
    box-shadow: var(--shadow-primary);
    position: relative;
}

.pricing-card.popular::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.pricing-plan {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.pricing-price {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 4px;
}

.pricing-period {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.pricing-features {
    text-align: left;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.pricing-feature i {
    color: var(--success);
    font-size: 18px;
}

/* Footer */
.landing-footer {
    padding: 48px 60px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

/* ================================================================
   16. AUTH PAGES
   ================================================================ */
.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 40px;
}

.auth-logo i {
    font-size: 30px;
}

.auth-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.auth-footer-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 24px;
    text-align: center;
}

.auth-footer-text a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer-text a:hover {
    text-decoration: underline;
}

.auth-right {
    background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.auth-right::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    top: -100px;
    right: -200px;
}

.auth-right::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    bottom: -100px;
    left: -100px;
}

.auth-right-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 400px;
}

.auth-right-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
}

.auth-right-text {
    font-size: 15px;
    opacity: 0.85;
    line-height: 1.7;
}

/* ================================================================
   17. RESPONSIVE
   ================================================================ */
@media (max-width: 1200px) {
    .grid-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .features-grid,
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .navbar-toggle {
        display: flex;
    }
    .navbar-search {
        display: none;
    }
    .page-content {
        padding: 20px;
    }
    .grid-stats {
        grid-template-columns: 1fr;
    }
    .inbox-layout {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 36px;
        letter-spacing: -1px;
    }
    .hero-subtitle {
        font-size: 16px;
    }
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    .features-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    .section {
        padding: 60px 20px;
    }
    .landing-navbar {
        padding: 0 20px;
    }
    .landing-nav-links {
        display: none;
    }
    .auth-layout {
        grid-template-columns: 1fr;
    }
    .auth-right {
        display: none;
    }
}

/* ================================================================
   18. ANIMATIONS & UTILITIES
   ================================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-fadeIn { animation: fadeIn var(--duration-normal) var(--ease-smooth); }
.animate-fadeInUp { animation: fadeInUp var(--duration-slow) var(--ease-smooth); }
.animate-pulse { animation: pulse 2s var(--ease-smooth) infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* Utility */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-auto { margin-top: auto; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.hidden { display: none; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ================================================================
   11. GRID SYSTEM & LAYOUT
   ================================================================ */
.page-content {
    padding: 32px;
    flex: 1;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.page-description {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .page-content { padding: 20px; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .grid-stats { grid-template-columns: 1fr; }
}
/* Dropdown Styles */
.dropdown {
    position: relative;
}
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    min-width: 200px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
    cursor: pointer;
}
.dropdown-item:hover {
    background: var(--bg-body);
}
.dropdown-divider {
    height: 1px;
    background-color: var(--border);
    margin: 4px 0;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}
