/* ═══════════════════════════════════════════
   ASR FORM — Design System
   Light Modern Premium UI (Inter + Tailwind-inspired Tokens)
   ═══════════════════════════════════════════ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── CSS Variables (Light Modern Tokens) ─── */
:root {
    /* Primary Palette (Indigo / Violet) */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;

    /* Light Theme Backgrounds */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-input: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);

    /* Surface & Hover */
    --surface-1: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f1f5f9;
    --surface-hover: rgba(79, 70, 229, 0.05);

    /* Borders */
    --border-primary: rgba(79, 70, 229, 0.2);
    --border-subtle: #e2e8f0;
    --border-glass: rgba(226, 232, 240, 0.8);
    --border-input: #cbd5e1;
    --border-focus: var(--primary-600);

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    /* Status Colors */
    --success-50: #ecfdf5;
    --success-400: #34d399;
    --success-500: #10b981;
    --success-600: #059669;
    --success-bg: rgba(16, 185, 129, 0.1);
    --success-text: #065f46;

    --warning-50: #fffbeb;
    --warning-400: #fbbf24;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --warning-text: #92400e;

    --danger-50: #fef2f2;
    --danger-400: #f87171;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --danger-text: #991b1b;

    --info-50: #f0f9ff;
    --info-400: #38bdf8;
    --info-500: #0ea5e9;
    --info-600: #0284c7;
    --info-bg: rgba(14, 165, 233, 0.1);
    --info-text: #075985;

    /* 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.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.04), 0 12px 24px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.18);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 76px;
    --topbar-height: 68px;

    /* Z-Index Scale */
    --z-sidebar: 40;
    --z-topbar: 50;
    --z-modal-backdrop: 60;
    --z-modal: 70;
    --z-toast: 80;
    --z-tooltip: 90;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--primary-700);
}

img {
    max-width: 100%;
    height: auto;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ═══════════════════════════════════════════
   LAYOUT (DASHBOARD & ADMIN)
   ═══════════════════════════════════════════ */

.app-layout {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-primary);
}

.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-base);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.sidebar-collapsed .main-wrapper {
    margin-left: var(--sidebar-collapsed);
}

.main-content {
    flex: 1;
    padding: 28px 32px;
    margin-top: var(--topbar-height);
}

/* ═══════════════════════════════════════════
   SIDEBAR (LIGHT MODERN)
   ═══════════════════════════════════════════ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    z-index: var(--z-sidebar);
    transition: width var(--transition-base);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-subtle);
    min-height: var(--topbar-height);
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.sidebar-brand {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition-fast);
}

body.sidebar-collapsed .sidebar-brand {
    opacity: 0;
    width: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 18px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section {
    margin-bottom: 22px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: var(--text-tertiary);
    padding: 0 12px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition-fast);
}

body.sidebar-collapsed .nav-section-title {
    opacity: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-fast);
    white-space: nowrap;
    position: relative;
    margin-bottom: 3px;
}

.nav-link:hover {
    background: var(--surface-hover);
    color: var(--primary-600);
}

.nav-link.active {
    background: var(--primary-50);
    color: var(--primary-600);
    font-weight: 700;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3.5px;
    height: 20px;
    background: var(--primary-600);
    border-radius: 0 4px 4px 0;
}

.nav-link svg, .nav-link .nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.8;
}

.nav-link.active svg, .nav-link.active .nav-icon {
    opacity: 1;
    color: var(--primary-600);
}

.nav-link-text {
    overflow: hidden;
    transition: opacity var(--transition-fast), width var(--transition-base);
}

body.sidebar-collapsed .nav-link-text {
    opacity: 0;
    width: 0;
}

body.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 10px;
}

.sidebar-footer {
    padding: 14px 12px;
    border-top: 1px solid var(--border-subtle);
}

/* ─── Sidebar Overlay (Mobile) ─── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    z-index: calc(var(--z-sidebar) - 1);
}

/* ═══════════════════════════════════════════
   TOPBAR (LIGHT FROSTED)
   ═══════════════════════════════════════════ */

.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    z-index: var(--z-topbar);
    transition: left var(--transition-base);
}

body.sidebar-collapsed .topbar {
    left: var(--sidebar-collapsed);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-toggle {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.topbar-toggle:hover {
    background: var(--surface-3);
    color: var(--primary-600);
    border-color: var(--primary-200);
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.topbar-btn:hover {
    background: var(--surface-3);
    color: var(--primary-600);
}

.topbar-btn .badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger-500);
    border-radius: 50%;
    border: 2px solid white;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 6px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
}

.user-menu:hover {
    border-color: var(--primary-300);
    box-shadow: var(--shadow-sm);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
}

.user-info {
    line-height: 1.25;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.user-role {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all var(--transition-fast);
    z-index: var(--z-tooltip);
}

.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--primary-50);
    color: var(--primary-600);
}

.dropdown-item.danger {
    color: var(--danger-500);
}
.dropdown-item.danger:hover {
    background: var(--danger-50);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 4px 0;
}

/* ═══════════════════════════════════════════
   CARDS (LIGHT CLEAN)
   ═══════════════════════════════════════════ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: all var(--transition-base);
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    background: #fbfcfe;
}

/* ─── Stat Cards ─── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-primary);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-card.primary .stat-icon { background: var(--primary-50); color: var(--primary-600); }
.stat-card.success .stat-icon { background: var(--success-50); color: var(--success-600); }
.stat-card.warning .stat-icon { background: var(--warning-50); color: var(--warning-600); }
.stat-card.danger .stat-icon  { background: var(--danger-50); color: var(--danger-600); }
.stat-card.info .stat-icon    { background: var(--info-50); color: var(--info-600); }

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

/* ═══════════════════════════════════════════
   TABLES (LIGHT CRISP)
   ═══════════════════════════════════════════ */

.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #ffffff;
    border-radius: inherit;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
}

.table thead th {
    padding: 14px 18px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    background: #f8fafc;
    border-bottom: 1px solid var(--border-subtle);
    text-align: left;
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 18px;
    font-size: 13.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    transition: background var(--transition-fast);
}

.table tbody tr:hover td {
    background: #f8fafc;
    color: var(--text-primary);
}

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

/* Page Header Action Bar */
.page-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

/* Filter Bar & Search Input */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-input-wrapper .form-control {
    padding-left: 40px;
    width: 100%;
}

.filter-bar select.form-control {
    min-width: 160px;
    width: auto;
}

/* ═══════════════════════════════════════════
   BUTTONS (MODERN PILLS & SOLID)
   ═══════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

.btn:active {
    transform: scale(0.98);
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* Primary */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
    box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
    color: white;
    transform: translateY(-1px);
}

/* Secondary / Ghost */
.btn-secondary {
    background: #ffffff;
    color: var(--text-secondary);
    border-color: var(--border-input);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    background: var(--surface-3);
    color: var(--text-primary);
    border-color: #94a3b8;
}

/* Success */
.btn-success {
    background: linear-gradient(135deg, var(--success-600), var(--success-500));
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35);
    color: white;
}

/* Danger */
.btn-danger {
    background: linear-gradient(135deg, var(--danger-600), var(--danger-500));
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
    color: white;
}

/* Light / Soft */
.btn-soft-primary {
    background: var(--primary-50);
    color: var(--primary-600);
}
.btn-soft-primary:hover {
    background: var(--primary-100);
    color: var(--primary-700);
}

/* Small Button */
.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-sm svg {
    width: 15px;
    height: 15px;
}

.btn-lg {
    padding: 13px 28px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

/* ═══════════════════════════════════════════
   FORMS & INPUTS (LIGHT CRISP)
   ═══════════════════════════════════════════ */

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--danger-500);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition-fast);
    outline: none;
    box-shadow: var(--shadow-xs);
}

.form-control:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    background: #ffffff;
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-help {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 12px;
    color: var(--danger-500);
    margin-top: 4px;
    font-weight: 500;
}

.form-control.is-invalid {
    border-color: var(--danger-500);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* ─── Search Input ─── */
.search-input-wrapper {
    position: relative;
}

.search-input-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
}

.search-input-wrapper .form-control {
    padding-left: 42px;
}

/* ═══════════════════════════════════════════
   BADGES (LIGHT PILLS)
   ═══════════════════════════════════════════ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-primary { background: var(--primary-50); color: var(--primary-700); }
.badge-success { background: var(--success-50); color: var(--success-text); }
.badge-warning { background: var(--warning-50); color: var(--warning-text); }
.badge-danger  { background: var(--danger-50); color: var(--danger-text); }
.badge-info    { background: var(--info-50); color: var(--info-text); }
.badge-muted   { background: #f1f5f9; color: var(--text-muted); }

/* ═══════════════════════════════════════════
   TOAST & MODALS (LIGHT)
   ═══════════════════════════════════════════ */

.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 320px;
    max-width: 440px;
    pointer-events: auto;
    animation: toastSlideIn 0.4s var(--transition-spring);
}

.toast.toast-exit {
    animation: toastSlideOut 0.3s ease forwards;
}

.toast-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.toast-message {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}

.toast-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.toast-close:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

.toast.success { border-left: 4px solid var(--success-500); }
.toast.success .toast-icon { color: var(--success-500); }
.toast.error { border-left: 4px solid var(--danger-500); }
.toast.error .toast-icon { color: var(--danger-500); }
.toast.warning { border-left: 4px solid var(--warning-500); }
.toast.warning .toast-icon { color: var(--warning-500); }
.toast.info { border-left: 4px solid var(--info-500); }
.toast.info .toast-icon { color: var(--info-500); }

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(40px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
    to { opacity: 0; transform: translateX(40px) scale(0.95); }
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: var(--z-modal);
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

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

.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #fbfcfe;
}

/* ═══════════════════════════════════════════
   PAGINATION (LIGHT)
   ═══════════════════════════════════════════ */

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

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

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
}

.pagination-link:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

.pagination-link.active {
    background: var(--primary-600);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.pagination-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ═══════════════════════════════════════════
   ACTIVITY LIST
   ═══════════════════════════════════════════ */

.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-dot.primary { background: var(--primary-500); }
.activity-dot.success { background: var(--success-500); }
.activity-dot.warning { background: var(--warning-500); }
.activity-dot.danger  { background: var(--danger-500); }

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.activity-text strong {
    color: var(--text-primary);
    font-weight: 700;
}

.activity-time {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* ═══════════════════════════════════════════
   LOGIN PAGE (LIGHT MODERN MESH)
   ═══════════════════════════════════════════ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at 10% 20%, rgba(224, 231, 255, 0.6) 0%, rgba(248, 250, 252, 1) 90%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(165, 180, 252, 0.4) 0%, transparent 70%);
    top: -150px;
    right: -150px;
    border-radius: 50%;
    filter: blur(60px);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 40px;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-xl);
    animation: loginAppear 0.5s ease;
}

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

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-weight: 800;
    font-size: 22px;
    color: white;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.login-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.login-btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 8px;
}

.login-error {
    background: var(--danger-50);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 20px;
    color: var(--danger-text);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ═══════════════════════════════════════════
   LANDING PAGE STYLES (MODERN, CLEAN, INTERACTIVE)
   ═══════════════════════════════════════════ */

.landing-nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
    padding: 16px 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.landing-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.brand-badge {
    background: var(--primary-50);
    color: var(--primary-700);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-link-item {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    transition: color var(--transition-fast);
}
.nav-link-item:hover {
    color: var(--primary-600);
}

/* Hero Section */
.hero-section {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    color: var(--primary-700);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    color: var(--text-primary);
    max-width: 860px;
    margin: 0 auto 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-600) 0%, #8b5cf6 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 660px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

/* Hero Interactive Mockup */
.hero-mockup-wrapper {
    max-width: 1040px;
    margin: 0 auto;
    position: relative;
}

.hero-mockup {
    background: #ffffff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
    overflow: hidden;
    text-align: left;
}

.mockup-header {
    background: #f8fafc;
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mockup-dots {
    display: flex;
    gap: 6px;
}

.mockup-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}
.mockup-dot.red { background: #ff5f56; }
.mockup-dot.yellow { background: #ffbd2e; }
.mockup-dot.green { background: #27c93f; }

.mockup-tabs {
    display: flex;
    gap: 8px;
    margin-left: 20px;
}

.mockup-tab-btn {
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mockup-tab-btn.active {
    background: #ffffff;
    border-color: var(--border-subtle);
    color: var(--primary-600);
    box-shadow: var(--shadow-xs);
}

.mockup-content {
    padding: 32px;
}

/* Feature Grid */
.features-section {
    padding: 90px 0;
    background: #ffffff;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}

.section-tag {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--primary-600);
    margin-bottom: 8px;
}

.section-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.8px;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-secondary);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-base);
    position: relative;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-primary);
    background: #ffffff;
}

.feature-icon-box {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow-xs);
    color: var(--primary-600);
}

.feature-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Stats Counter Section */
.stats-section {
    padding: 70px 0;
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    color: white;
    text-align: center;
}

.stats-grid-landing {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.stat-item-landing .stat-num {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.stat-item-landing .stat-lbl {
    font-size: 15px;
    opacity: 0.85;
    font-weight: 500;
}

/* Footer */
.landing-footer {
    padding: 50px 0 30px;
    background: #ffffff;
    border-top: 1px solid var(--border-subtle);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════ */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-muted); }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease;
}

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

/* ═══════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════ */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }
    
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    
    body.sidebar-open .sidebar-overlay {
        display: block;
    }
    
    .main-wrapper {
        margin-left: 0 !important;
    }
    
    .topbar {
        left: 0 !important;
    }
    
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid-landing { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px 16px;
    }

    .hero-title {
        font-size: 34px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid-landing {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .nav-links {
        display: none;
    }

    .pagination-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .user-info {
        display: none;
    }
}

/* ═══════════════════════════════════════════
   ADSENSE & AD CONTAINERS
   ═══════════════════════════════════════════ */

.ad-container {
    width: 100%;
    max-width: 728px;
    margin: 28px auto;
    padding: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    text-align: center;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.ad-container:hover {
    border-color: #94a3b8;
}

.ad-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.ad-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
    width: 100%;
    overflow: hidden;
}

.ad-container ins.adsbygoogle {
    display: block !important;
    max-width: 100%;
}

/* Specific Slot Positioning */
.ad-container[data-ad-slot="form_bottom"] {
    margin-top: 24px;
    margin-bottom: 20px;
}

.ad-container[data-ad-slot="form_success"] {
    margin-top: 20px;
    margin-bottom: 20px;
}

/* ═══════════════════════════════════════════
   PUBLIC PAGES LAYOUT & NAV
   ═══════════════════════════════════════════ */

.public-body {
    background-color: #f8fafc;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.public-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.public-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.public-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.public-nav-links .nav-link-item {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.public-nav-links .nav-link-item:hover {
    color: var(--primary-600);
}

.public-nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 16px;
}

.public-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 6px;
}

.public-main {
    flex: 1;
}

/* Page Hero */
.page-hero {
    padding: 64px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--border-subtle);
}

.page-hero-title {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.page-hero-subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

.page-section {
    padding: 56px 0;
}

.page-content-card {
    max-width: 860px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

/* Legal Content Typography */
.legal-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.legal-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-subtle);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 8px;
}

.legal-content p {
    margin-bottom: 16px;
}

.legal-content ul, .legal-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.legal-content li {
    margin-bottom: 6px;
}

.vision-box {
    margin-top: 36px;
    padding: 24px;
    background: linear-gradient(135deg, #eef2ff 0%, #f0fdf4 100%);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-lg);
}

.vision-box h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 8px;
}

.vision-box p {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
}

/* ═══════════════════════════════════════════
   FEATURES PAGE GRID
   ═══════════════════════════════════════════ */

.feature-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card-page {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all var(--transition-base);
}

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

.feature-card-icon {
    font-size: 32px;
    margin-bottom: 16px;
    display: inline-block;
}

.feature-card-page h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-card-page p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ═══════════════════════════════════════════
   PRICING PAGE
   ═══════════════════════════════════════════ */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    max-width: 1040px;
    margin: 0 auto;
}

.pricing-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-base);
}

.pricing-card:hover {
    box-shadow: var(--shadow-lg);
}

.pricing-card.pricing-highlighted {
    border: 2px solid var(--primary-600);
    box-shadow: 0 12px 32px -4px rgba(79, 70, 229, 0.15);
    transform: scale(1.02);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-600);
    color: white;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 14px;
    border-radius: var(--radius-full);
}

.pricing-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.pricing-price {
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.pricing-amount {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.pricing-period {
    font-size: 14px;
    color: var(--text-secondary);
}

.pricing-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-primary);
}

.pricing-features li svg {
    color: var(--success-500);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   CONTACT PAGE
   ═══════════════════════════════════════════ */

.contact-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 32px;
    max-width: 960px;
    margin: 0 auto;
}

.contact-info-card {
    background: #ffffff;
    height: 100%;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.contact-info-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--primary-50);
    color: var(--primary-600);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ═══════════════════════════════════════════
   PUBLIC FOOTER
   ═══════════════════════════════════════════ */

.public-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-subtle);
    padding: 56px 0 24px;
    margin-top: auto;
}

.public-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.public-footer-brand {
    max-width: 320px;
}

.public-footer-links h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.public-footer-links a {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color var(--transition-fast);
}

.public-footer-links a:hover {
    color: var(--primary-600);
}

.public-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 12px;
}

/* ═══════════════════════════════════════════
   ADMIN SETTINGS TABS & TOGGLES
   ═══════════════════════════════════════════ */

.page-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border-subtle);
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.page-tab {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: -2px;
    white-space: nowrap;
}

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

.page-tab.active {
    color: var(--primary-600);
    border-bottom-color: var(--primary-600);
}

.page-tab-content {
    display: none;
}

.page-tab-content.active {
    display: block;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .25s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .25s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--primary-600);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* ═══════════════════════════════════════════
   COMPREHENSIVE PROFESSIONAL RESPONSIVE SUITE
   Supports Mobile (XS < 480px, SM 480-768px),
   Tablet (MD 769-1024px), Laptop (LG 1025-1280px),
   and Desktop (XL > 1280px)
   ═══════════════════════════════════════════ */

/* ─── Form Builder Responsive Grid ─── */
.builder-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1200px) {
    .builder-grid {
        grid-template-columns: 250px minmax(0, 1fr);
    }
    .builder-settings-panel {
        grid-column: span 2;
        position: static !important;
        max-height: none !important;
    }
}

@media (max-width: 768px) {
    .builder-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .builder-settings-panel {
        grid-column: span 1;
    }
}

/* ─── Global Touch & Mobile Input Optimizations ─── */
@media (max-width: 768px) {
    /* Prevent iOS auto-zoom on input focus by ensuring minimum 16px font */
    input[type="text"],
    input[type="email"],
    input[type="number"],
    input[type="password"],
    input[type="tel"],
    input[type="url"],
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Touch-friendly touch targets */
    .btn, 
    .nav-link,
    .dropdown-item,
    .palette-item,
    .page-tab {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
    }

    /* Topbar mobile adjustments */
    .topbar {
        padding: 0 16px;
        height: 60px;
    }
    .topbar-left .page-title {
        font-size: 16px;
        max-width: 180px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .user-info {
        display: none;
    }

    /* Main content padding on mobile */
    .main-content {
        padding: 16px 12px 32px !important;
    }

    /* Stat Cards Grid */
    .stat-grid,
    .stats-grid,
    .dashboard-stats {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }

    .stat-card {
        padding: 14px !important;
    }
    .stat-value {
        font-size: 22px !important;
    }
    .stat-label {
        font-size: 12px !important;
    }

    /* Action bar / Filter Bar wrapping */
    .page-header,
    .filter-bar,
    .table-actions,
    .card-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .filter-bar input,
    .filter-bar select,
    .filter-bar .btn,
    .page-header .btn {
        width: 100% !important;
    }

    /* Public Form Submit Bar */
    .form-submit-bar {
        flex-direction: column-reverse !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    .form-submit-bar .btn {
        width: 100% !important;
        justify-content: center;
    }

    /* Public Form Container */
    .public-container {
        padding: 0 4px;
    }
    .form-header-card {
        padding: 20px 16px !important;
    }
    .field-box {
        padding: 16px 14px !important;
    }

    /* Signature Pad Mobile Canvas */
    .signature-pad-wrapper canvas {
        width: 100% !important;
        height: 180px !important;
    }

    /* Responsive Tables */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-md);
        margin-bottom: 16px;
    }
    .table {
        min-width: 600px;
    }

    /* Modals on Mobile */
    .modal {
        width: 92% !important;
        max-width: 480px !important;
        margin: 20px auto;
        padding: 20px 16px !important;
    }

    /* Toast Notifications */
    .toast-container {
        left: 16px !important;
        right: 16px !important;
        bottom: 16px !important;
        max-width: none !important;
    }

    /* Landing Page Mobile */
    .hero-section {
        padding: 40px 16px !important;
        text-align: center;
    }
    .hero-title {
        font-size: 28px !important;
        line-height: 1.25 !important;
    }
    .hero-subtitle {
        font-size: 15px !important;
    }
    .hero-cta-group {
        flex-direction: column !important;
        width: 100%;
    }
    .hero-cta-group .btn {
        width: 100% !important;
    }
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* ─── Extra Small Mobile (iPhone SE, etc < 480px) ─── */
@media (max-width: 480px) {
    .stat-grid,
    .stats-grid,
    .dashboard-stats {
        grid-template-columns: 1fr !important;
    }
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    .btn-group .btn {
        width: 100%;
    }
    .scale-options {
        gap: 4px;
    }
    .scale-item {
        font-size: 11px;
    }
    .rating-stars {
        font-size: 24px;
        gap: 6px;
    }
}

/* ─── Tablet Optimizations (769px - 1024px) ─── */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-content {
        padding: 20px 16px;
    }
    .stat-grid,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ─── High DPI / Retina Display & Dark Support Hooks ─── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

/* ─── Print Stylesheet ─── */
@media print {
    .sidebar,
    .topbar,
    .public-footer,
    .btn,
    .ad-container,
    .no-print {
        display: none !important;
    }
    body, .main-wrapper, .main-content {
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .card {
        box-shadow: none !important;
        border: none !important;
    }
}


