/* ========================================
   AI SaaS Platform - Main Stylesheet
   ======================================== */

/* === CSS Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
}

body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utility: use Inter font explicitly where needed */
.font-inter { font-family: var(--font-sans) !important; }

/* Button variants enhancements for consistency */
.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 1px solid transparent;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--gray-300);
}

.btn-dark {
    background: #0b3d91; /* dark-blue fallback */
    color: white;
}

/* Ensure buttons on dark backgrounds always show legible text */
.on-dark { color: white !important; }

/* Sidebar specific styles to unify admin and app look */
.sidebar-link { transition: all 0.15s; font-size: 0.875rem; color: var(--gray-700); }
.sidebar-link:hover { background-color: rgba(99, 102, 241, 0.08); color: var(--primary); }
.sidebar-link.active { background-color: var(--primary); color: white; }
.sidebar-link svg { color: inherit; }

/* Sidebar dark variant support */
.sidebar-dark .sidebar-link { color: #e5e7eb; }
.sidebar-dark .sidebar-link.active { background-color: rgba(255,255,255,0.06); color: white; }

/* === Admin Sidebar Light Theme === */
.admin-sidebar-light {
    background: #f8f9fb;
    border-right: 1px solid #e5e7eb;
    font-family: var(--font-sans);
}
.admin-sidebar-light .sidebar-link {
    color: #4b5563;
    font-weight: 500;
    border-radius: 0.375rem;
    margin: 0.0625rem 0.375rem;
}
.admin-sidebar-light .sidebar-link:hover {
    background: #e5e7eb;
    color: #1f2937;
}
.admin-sidebar-light .sidebar-link.active {
    background: #3b82f6;
    color: #ffffff;
    font-weight: 600;
}
.admin-sidebar-light .sidebar-link.active:hover {
    background: #2563eb;
    color: #ffffff;
}
.admin-sidebar-light .sidebar-link i {
    color: inherit;
}
.admin-sidebar-light .sidebar-link-logout {
    color: #dc2626;
}
.admin-sidebar-light .sidebar-link-logout:hover {
    background: #fef2f2;
    color: #b91c1c;
}
.admin-sidebar-divider {
    border-top: 1px solid #e5e7eb;
    margin: 0.5rem 0.75rem;
}
.admin-submenu {
    background: #f0f1f3;
}
.admin-sidebar-light .admin-submenu .sidebar-link {
    font-size: 0.8125rem;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* === Accessibility Utilities === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Focus ring for accessibility */
.focus-ring:focus,
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Skip to content link - visible on focus */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 var(--radius-md) 0;
}

.skip-link:focus {
    top: 0;
}

/* === Layout === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--spacing-lg);
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-900);
}

.btn-secondary:hover {
    background-color: var(--gray-300);
    color: var(--gray-900);
    text-decoration: none;
}

/* Small button sizes that follow the primary hover style */
.btn-sm:hover {
    /* No transform on hover */
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-danger {
    background-color: var(--error);
    color: white;
}

.btn-warning {
    background-color: var(--warning);
    color: white;
}

.btn-warning:hover {
    background-color: #d97706; /* slightly darker */
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.875rem;
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.125rem;
}

/* === Forms === */
.form-group {
    margin-bottom: var(--spacing-lg);
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--gray-700);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background-color: white;
    transition: border-color 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* === Auth Pages === */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 1.25rem 1rem 2rem;
    background-color: var(--gray-50);
}

.auth-card {
    max-width: 28rem;
    width: 100%;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}

.auth-card-wide {
    max-width: 38rem;
    width: 100%;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.75rem 2rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 1rem;
}

.auth-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.2rem;
}

.auth-subtitle {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-bottom: 0;
}

.auth-form {
    margin-top: 0.75rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.3rem;
}

.form-input {
    width: 100%;
    height: 2.375rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--gray-900);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background-color: white;
    box-sizing: border-box;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    font-size: 0.8rem;
    font-family: var(--font-sans);
    color: var(--gray-400);
    font-weight: 400;
    letter-spacing: 0.01em;
}

select.form-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.625rem center;
    background-repeat: no-repeat;
    background-size: 1.125em 1.125em;
    padding-right: 2.25rem;
}

textarea.form-input {
    height: auto;
    padding: 0.75rem 1rem;
}

.input-error {
    border-color: var(--error);
}

.input-error:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
    display: block;
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 0.25rem;
}

.form-hint {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.375rem;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.form-row-2col {
    display: flex;
    gap: 0.875rem;
    margin-bottom: 0.75rem;
}

.form-row-2col > .form-group {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.form-feedback {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 500;
    min-height: 0;
    margin-top: 0.2rem;
}

.form-feedback svg {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
}

.form-feedback-success { color: var(--success); }
.form-feedback-error { color: var(--error); }
.form-feedback-muted { color: var(--gray-500); }

.consent-group {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.consent-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin-top: 0.125rem;
    accent-color: var(--primary);
    flex-shrink: 0;
    cursor: pointer;
}

@media (max-width: 576px) {
    .form-row-2col {
        flex-direction: column;
        gap: 0;
    }
    .auth-card-wide {
        padding: 1.25rem;
    }
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.link-text {
    font-size: 0.875rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.link-text:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.link-primary {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.link-primary:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.btn-full {
    width: 60%;
    margin: 0 auto 0.75rem;
    justify-content: center;
    display: flex;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 1rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--gray-200);
}

.auth-divider span {
    position: relative;
    background-color: white;
    padding: 0 0.75rem;
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.auth-footer {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

.error-list {
    list-style: disc;
    margin-left: 1.25rem;
    font-size: 0.8125rem;
}

.error-list li {
    margin-bottom: 0.25rem;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.8125rem;
}

.alert svg {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    margin-top: 0.0625rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error);
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info);
}

/* === Cards === */
.card {
    background-color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.card-header {
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
}

/* === Tables === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--spacing-lg);
}

th, td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    font-weight: 700;
    background-color: var(--gray-50);
    color: var(--gray-700);
}

tr:hover {
    background-color: var(--gray-50);
}

/* === Utility Classes === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }

/* === Responsive === */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}
/* === Security & 2FA Specific Classes === */
.qr-code-container {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--gray-200);
}

.qr-code-svg {
    max-width: 250px;
    margin: 0 auto;
    display: block;
}

.recovery-codes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.recovery-code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    padding: var(--spacing-md);
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: 1px solid var(--gray-300);
}

.session-item {
    padding: var(--spacing-md);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    transition: all 0.2s;
}

.session-item:hover {
    background: var(--gray-50);
}

.session-current {
    border-color: var(--primary);
    background: var(--gray-50);
    border-width: 2px;
}

.session-device {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.session-device-icon {
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Admin/settings code block — scoped to avoid conflict with dashboard chat code-block */
.admin-content .code-block,
.settings-content .code-block,
.security-grid ~ .code-block {
    background: var(--gray-800);
    color: var(--gray-100);
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    overflow-x: auto;
    margin: var(--spacing-md) 0;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-status.active {
    background: var(--success);
    color: white;
}

.badge-status.inactive {
    background: var(--gray-300);
    color: var(--gray-700);
}

.badge-status.locked {
    background: var(--error);
    color: white;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gap-4 {
    gap: var(--spacing-lg);
}

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

.flex-col {
    display: flex;
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.font-medium {
    font-weight: 500;
}

/* General interactive hover style (like homepage CTA) */
.interactive {
    transition: background-color 0.15s ease;
}
.interactive:hover { /* No transform on hover */ }

/* =====================
   Admin Theme Overrides
   ===================== */
/* Smaller base font for admin pages for a compact layout */
body.admin-theme {
    font-size: 0.90rem; /* slightly smaller */
}

/* Admin-specific button (compact variant) - add this to admin button class lists */
.btn-admin {
    padding: 0.375rem 0.75rem; /* smaller than default */
    font-size: 0.875rem; /* small text */
    font-weight: 600;
    border-radius: var(--radius-sm);
    min-height: 36px; /* consistent height */
    height: 36px; /* lock height for consistent buttons */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    min-width: 90px; /* default base width */
}
.btn-admin.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
.btn-admin.btn-lg { padding: 0.5rem 1rem; font-size: 1rem; }

/* Admin Icon Buttons - Fixed size square buttons for table actions */
.btn-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    border: none !important;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.1s ease;
}
.btn-icon:hover {
    transform: scale(1.05);
}
.btn-icon i,
.btn-icon svg {
    font-size: 12px !important;
    width: 12px !important;
    height: 12px !important;
}
.btn-icon.btn-view { background-color: #2563eb; color: white; }
.btn-icon.btn-view:hover { background-color: #1d4ed8; }
.btn-icon.btn-archive { background-color: #eab308; color: white; }
.btn-icon.btn-archive:hover { background-color: #ca8a04; }
.btn-icon.btn-unarchive { background-color: #06b6d4; color: white; }
.btn-icon.btn-unarchive:hover { background-color: #0891b2; }
.btn-icon.btn-delete { background-color: #dc2626; color: white; }
.btn-icon.btn-delete:hover { background-color: #b91c1c; }
.btn-icon.btn-edit { background-color: #10b981; color: white; }
.btn-icon.btn-edit:hover { background-color: #059669; }

/* Don't apply hover transform / box-shadow to admin buttons or interactive controls */
body.admin-theme .interactive:hover { transform: none; box-shadow: none; }
body.admin-theme .btn:hover { transform: none; box-shadow: none; }
body.admin-theme .btn-admin:hover { transform: none; box-shadow: none; }

/* Admin form sizing - unify inputs, selects and textareas to smaller sizes */
body.admin-theme input[type="text"],
body.admin-theme input[type="email"],
body.admin-theme input[type="password"],
body.admin-theme input[type="number"],
body.admin-theme textarea,
body.admin-theme select,
body.admin-theme .form-input {
    padding: 0.5rem 0.75rem; /* smaller padding */
    font-size: 0.875rem; /* match small font */
    border-radius: var(--radius-sm);
    min-height: 36px; /* consistent form field height */
}

/* Admin labels should be a bit larger and more readable in compact admin UI */
body.admin-theme label {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Revert labels for excluded forms */
#editUserForm label,
.provider-card label,
#addProviderForm label { font-size: 0.75rem; font-weight: 600; }
/* Dropdowns (select) should match input sizes */
body.admin-theme select { -webkit-appearance: none; -moz-appearance: none; appearance: none; }

/* Fix sidebar active hover: keep same color on hover and ensure strong contrast */
.sidebar-link.active:hover { background-color: var(--primary); color: white; }
.sidebar-link.active { background-color: var(--primary); color: white; }
.sidebar-link:hover:not(.active) { background-color: rgba(99, 102, 241, 0.08); color: var(--primary); }

/* Make hover more visible on dark sidebars (left sidebar) - avoid white color as background */
.sidebar-dark .sidebar-link:hover:not(.active) { background-color: rgba(59, 130, 246, 0.20); color: #dbeafe; }
.sidebar-dark .sidebar-link:focus { background-color: rgba(59, 130, 246, 0.24); color: #dbeafe; }

/* Ensure icon-only admin buttons are square and consistent */
.btn-admin.icon-only { width: 36px; height: 36px; padding: 0; }
.btn-admin i { line-height: 1; }
body.admin-theme .btn-admin.btn-sm { height: 34px !important; min-width: 42px !important; }
body.admin-theme .btn-admin.icon-only { width: 36px !important; height: 36px !important; }
body.admin-theme .btn-admin.btn-sm.icon-only { width: 32px !important; height: 32px !important; min-width: 32px !important; }

/* === EXCLUDE EDIT USER & API KEYS PAGES === */
/* Revert admin-theme uniform styles for the Edit User form (#editUserForm) */
#editUserForm input,
#editUserForm select,
#editUserForm textarea,
#editUserForm .form-input {
    padding: 0.375rem 0.75rem; /* preserve existing small look */
    font-size: 0.75rem;
    min-height: auto;
    height: auto;
}

/* Revert admin-theme uniform styles for Manage API keys (forms inside .provider-card) */
.provider-card input,
.provider-card select,
.provider-card textarea,
.provider-card .form-input,
#addProviderForm input {
    padding: 0.75rem 1rem; /* keep the existing, larger look */
    font-size: 1rem;
    min-height: auto;
    height: auto;
}

/* Enforce uniform sizes for generic buttons and anchors in the admin theme 
   while keeping edits below excluded for the edit user form and provider forms */
body.admin-theme button,
body.admin-theme a.btn {
    min-height: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem !important;
    font-size: 0.875rem !important;
}

/* Exclude Edit User form and provider-card buttons from uniformization */
#editUserForm button,
.provider-card button,
#addProviderForm button {
    min-height: auto !important;
    height: auto !important;
    padding: initial !important;
    font-size: initial !important;
}

/* Enforce uniform admin button size (overrides per-button padding) */
body.admin-theme .btn-admin {
    padding: 0 0.75rem !important; /* left/right padding only */
    min-width: 100px !important; /* widen base for readability */
    height: 40px !important; /* unify height */
}

/* ===========================
   Compact Admin Form Utility
   Use this wrapper on admin form/filter containers to ensure a uniform
   field spacing and label sizing across admin pages, using `#editUserForm`
   as the exact visual reference. Do not modify `#editUserForm` directly.
   =========================== */
.admin-compact {
    --admin-form-font-size: 0.75rem; /* 12px -> matches text-xs */
}
.admin-compact label {
    font-size: var(--admin-form-font-size);
    font-weight: 600;
}
.admin-compact input[type="text"],
.admin-compact input[type="email"],
.admin-compact input[type="password"],
.admin-compact input[type="number"],
.admin-compact input[type="date"],
.admin-compact textarea,
.admin-compact select,
.admin-compact .form-input {
    font-size: var(--admin-form-font-size) !important;
    padding: 0.375rem 0.75rem !important; /* px-3 py-1.5 */
    border-radius: var(--radius-sm) !important;
    min-height: auto !important;
    height: auto !important;
}
.admin-compact .btn-admin {
    font-size: 0.75rem;
    padding: 0 0.5rem;
    min-width: 88px;
    height: 36px !important;
}

/* Explicit helper class to force EditUser-like sizes across admin forms */
.admin-field {
    font-size: 0.75rem !important; /* text-xs */
    padding: 0.375rem 0.75rem !important; /* px-3 py-1.5 */
    border-radius: var(--radius-sm) !important;
    min-height: auto !important;
    height: auto !important;
}

.admin-form-label {
    font-size: 0.75rem !important; /* text-xs */
    font-weight: 600 !important;
    color: var(--gray-700) !important;
    margin-bottom: 0.25rem !important;
}

/* ===========================
   Quick Actions Bar (Ticket View)
   Ultra-compact inline dropdowns for quick ticket management
   =========================== */
.quick-actions-bar {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 5px 14px;
    font-family: 'Inter', sans-serif;
}
.quick-actions-bar .action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.quick-actions-bar .action-label {
    font-size: 12px;
    font-weight: 600;
    color: #111827;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.quick-actions-bar .action-label i {
    font-size: 10px;
    color: #374151;
}
.quick-actions-bar .action-divider {
    width: 1px;
    height: 12px;
    background: #7dd3fc;
    margin: 0 8px;
}
.quick-actions-bar select {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    padding: 2px 18px 2px 6px;
    height: 20px;
    line-height: 16px;
    min-width: 85px;
    border: 1px solid #7dd3fc;
    border-radius: 4px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%230284c7' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 3px center;
    background-repeat: no-repeat;
    background-size: 10px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    color: #1e3a5f;
}
.quick-actions-bar select:hover {
    border-color: #38bdf8;
    background-color: #f0f9ff;
}
.quick-actions-bar select:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

/* Main Quick Actions Bar (Ticket controls) - lighter purple tone */
.quick-actions-bar.quick-actions-bar--main {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #ddd6fe;
}
.quick-actions-bar.quick-actions-bar--main .action-divider {
    background: #c4b5fd;
}
.quick-actions-bar.quick-actions-bar--main select {
    border-color: #c4b5fd;
    color: #4c1d95;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b21a8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}
.quick-actions-bar.quick-actions-bar--main select:hover {
    border-color: #a78bfa;
    background-color: #f5f3ff;
}
.quick-actions-bar.quick-actions-bar--main select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

/* Back Button - Compact styled button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #475569;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}
.back-btn:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    border-color: #94a3b8;
    color: #1e293b;
}
.back-btn i {
    font-size: 10px;
}

/* Apply admin-field to combined .admin-compact children where needed */
.admin-compact .admin-field { /* already inherits, but ensure higher specificity */ }

/* Override specific large-margin/rounded items inside admin-compact */
.admin-compact .rounded-lg { border-radius: var(--radius-sm) !important; }

/* Ensure the edit page remains excluded (explicitly) */
.admin-compact #editUserForm,
.admin-compact .provider-card,
.admin-compact #addProviderForm { all: unset; }


/* Full width buttons still allowed. Icon-only use icon-only class for square control */
body.admin-theme .btn-admin.w-full { min-width: auto !important; width: 100% !important; }

/* Tighter tables and cards in admin for compactness */
body.admin-theme .bg-white {
    padding: 0.6rem;
}


/* ========================================
   DASHBOARD CHAT INTERFACE STYLES
   ======================================== */

/* === Chat Container & Layout === */

/* Full viewport height for immersive chat experience */
body:has(.chat-root) {
    height: 100vh;
    overflow: hidden;
}

.chat-root {
    display: flex;
    flex-direction: column;
    height: 100vh; /* Full viewport height */
    overflow: hidden;
}

.chat-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.chat-sidebar {
    width: 240px;
    background-color: #fff;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
    height: 100%;
    min-width: 240px;
    max-width: 240px;
    position: relative;
}

/* Logo in sidebar */
.chat-sidebar-logo {
    padding: 1.15rem 0.75rem 1.00rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.sidebar-logo-img {
    margin: 0;
}

.sidebar-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: filter 0.2s ease;
}

.sidebar-logo-link:hover {
    filter: brightness(1.15) contrast(1.05);
}

.sidebar-logo-img {
    height: 36px;
    width: auto;
    display: block;
    max-width: 100%;
    object-fit: contain;
}

.chat-sidebar-header {
    padding: 1rem 1rem 0.5rem 1rem;
    border-bottom: none;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(59, 130, 246, 0.06) 100%);
}

/* Light blue sidebar background modifier */
.chat-area-light-blue {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(59, 130, 246, 0.06) 100%);
}

/* Blue-tinted chat history icon */
.chat-icon-colored {
    color: #3b82f6;
}

.chat-sidebar-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.125rem 0.125rem 0.125rem 0.125rem; /* reduce to use full width */
    padding-bottom: 4.5rem; /* Space for absolute footer */
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(59, 130, 246, 0.06) 100%);
}

.chat-sidebar-footer {
    padding: 0;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

/* Sidebar User Profile */
.sidebar-user-profile {
    position: relative;
}

.sidebar-user-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.sidebar-user-trigger:hover {
    background-color: #f3f4f6;
}

.sidebar-user-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: white;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18);
    border: 2px solid #fff;
    letter-spacing: 0.02em;
    user-select: none;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-bottom: 0.125rem;
}

.sidebar-user-plan {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.75rem;
    font-size: 0.625rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    user-select: none;
}

.sidebar-user-plan-free {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.sidebar-user-plan-premium {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.sidebar-user-plan i {
    font-size: 0.55rem;
}

.sidebar-user-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 0.5rem);
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    z-index: 50;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.chat-history-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.chat-history-item {
    width: 100%;
    text-align: left;
    padding: 0.12rem 0.06rem; /* compact */
    border-radius: 0.5rem;
    margin-bottom: 0.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.08rem;
    color: #1f2937;
    font-size: 0.875rem;
}

.chat-history-item:hover {
    background-color: #f3f4f6;
}

.chat-history-item.active {
    background-color: #e5e7eb;
}

.chat-history-item i {
    color: #6b7280;
    font-size: 0.875rem;
}

/* chat entry compact and truncation */
.chat-entry { display:flex; align-items:center; gap:0.08rem; flex:1 1 auto; min-width: 0; padding: 0; border: none; background: transparent; }
.chat-entry i { margin-right: 0.5rem; width: 16px; height: 16px; display:inline-flex; align-items:center; justify-content:center; color: #3b82f6; /* blue color instead of gray */ }
.chat-entry span { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; flex:1 1 auto; text-align: left; font-size: 0.9rem; font-weight: 500; color: #374151; }

/* menu trigger and menu behavior */
.menu-trigger { padding: 0.4rem 0.5rem; border-radius: 0.25rem; color:#9ca3af; display:inline-flex; align-items:center; justify-content:center; border:none; background:transparent; cursor: pointer; }
.menu-trigger:hover { color: #374151; background: rgba(0,0,0,0.03); }
.chat-history-menu { position: fixed; background: #fff; border: 1px solid #a855f7; border-radius: 6px; box-shadow: 0 10px 30px rgba(15,23,42,0.18); min-width: 110px; z-index: 999999; pointer-events: auto; }
.chat-history-menu .menu-item { width:100%; padding: 0.35rem 0.6rem; border: none; background: transparent; text-align:left; color:#ef4444; cursor:pointer; }
.chat-history-menu .menu-item.download-item { color: #059669; /* green color for download */ }
.chat-history-menu .menu-item:hover { background:#fff5f5; }
.chat-history-menu .menu-item.download-item:hover { background:#f0fdf4; /* light green hover */ }

/* delete modal overlay (ensure it's above everything) */
#delete-confirm-modal { position: fixed; inset: 0; z-index: 1000000; display:flex; align-items:center; justify-content:center; }
#delete-confirm-modal .modal-panel { z-index: 1000001; }

.usage-item {
    display: flex;
    align-items: center;
    font-size: 0.7rem;
    margin-bottom: 0.35rem;
    color: #000000;
}

.usage-item > span:first-child {
    width: 35px;
    flex-shrink: 0;
    color: #000000;
    font-weight: 500;
    margin-right: 0.5rem;
}

.usage-meter {
    width: 90px;
    height: 6px;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.7);
    border-radius: 3px;
    overflow: hidden;
}

.usage-item > span:last-child {
    width: 60px;
    flex-shrink: 0;
    text-align: right;
    font-size: 0.65rem;
    color: #000000;
}

.usage-meter-bar {
    height: 100%;
    min-width: 2px;
    background: #10b981;
    border-radius: 3px;
    transition: width 0.3s ease, background 0.3s ease;
}

.usage-meter-bar.yellow {
    background: #fbbf24;
}

.usage-meter-bar.orange {
    background: #f97316;
}

.usage-meter-bar.red {
    background: #ef4444;
}

.usage-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.usage-reset-info {
    font-size: 0.65rem;
    color: #6b7280;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    min-height: 0;
}

/* === Chat Tabs (Bottom Position) === */

.chat-tabs-bottom {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background-color: #ffffff;
    border-top: none; /* removed horizontal line above tabs as requested */
    flex-shrink: 0;
}

.chat-tab-bottom {
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.8125rem;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    white-space: nowrap;
    color: #6b7280;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    line-height: 1;
    min-width: 80px;
    justify-content: center;
}

.chat-tab-bottom i {
    font-size: 0.875rem;
}

.chat-tab-bottom:hover {
    background-color: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.chat-tab-bottom:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.chat-tab-bottom.active {
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(118,75,162,0.3);
    transform: translateY(-2px);
}

.chat-tab-bottom.active:hover {
    transform: translateY(-2px);
}

/* === Mobile Responsive - Chat Interface === */

/* Mobile close button (hidden on desktop) */
.mobile-sidebar-close {
    display: none;
}

/* Mobile header (hidden on desktop) */
.mobile-chat-header {
    display: none;
}

/* Tablet and smaller */
@media (max-width: 1024px) {
    .chat-sidebar {
        width: 200px;
        min-width: 200px;
        max-width: 200px;
    }
    
    .sidebar-logo-img {
        height: 30px;
    }
    
    .chat-tab-bottom {
        padding: 0.4rem 0.75rem;
        min-width: 70px;
        font-size: 0.75rem;
    }
    
    .chat-tab-bottom i {
        font-size: 0.8125rem;
    }
}

/* Mobile - Hide sidebar and show hamburger menu */
@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
    }
    
    .chat-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 280px;
        min-width: 280px;
        max-width: 280px;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }
    
    .chat-sidebar.mobile-open {
        left: 0;
    }
    
    .mobile-sidebar-close {
        display: flex;
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        width: 32px;
        height: 32px;
        align-items: center;
        justify-content: center;
        background: #f3f4f6;
        border: none;
        border-radius: 0.375rem;
        cursor: pointer;
        color: #6b7280;
        font-size: 0.875rem;
        z-index: 10;
        transition: all 0.2s ease;
    }
    
    .mobile-sidebar-close:hover {
        background: #e5e7eb;
        color: #374151;
    }
    
    .chat-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .chat-sidebar-overlay.active {
        display: block;
    }
    
    .chat-main {
        width: 100%;
    }
    
    .mobile-chat-header {
        display: flex;
        align-items: center;
        padding: 0.5rem 1rem;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
        gap: 0.75rem;
    }
    
    .chat-messages {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 1rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .chat-input-area {
        padding: 0.5rem 0.75rem 0.125rem 0.75rem;
    }
    
    .chat-tabs-bottom {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        gap: 0.375rem;
        padding: 0.5rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        background-color: #ffffff !important;
        border-top: 1px solid #e5e7eb !important;
        position: relative;
        z-index: 10;
    }
    
    .chat-tab-bottom {
        padding: 0.625rem 0.875rem;
        min-width: 48px;
        min-height: 48px;
        font-size: 0.75rem;
        flex-shrink: 0;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        justify-content: center;
        align-items: center;
    }
    
    .chat-tab-bottom span {
        display: none;
    }
    
    .chat-tab-bottom i {
        font-size: 1.25rem;
        margin: 0;
    }
    
    .chat-welcome h2 {
        font-size: 1.25rem;
    }
    
    .chat-welcome-icon {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .chat-welcome-icon i {
        font-size: 1.5rem;
    }
    
    .chat-info-cards {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Mobile header with menu toggle */
    .mobile-chat-header {
        display: flex;
        align-items: center;
        padding: 0.5rem 1rem;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
        gap: 0.75rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: none;
        background: #f3f4f6;
        border-radius: 0.5rem;
        cursor: pointer;
        color: #374151;
        font-size: 1.125rem;
        transition: all 0.2s ease;
    }
    
    .mobile-menu-toggle:hover {
        background: #e5e7eb;
    }
    
    .mobile-logo-img {
        height: 28px;
        width: auto;
    }
    
    /* Toolbar adjustments for mobile */
    .input-toolbar {
        flex-wrap: wrap;
        gap: 0.375rem;
    }
    
    .toolbar-left {
        flex: 1 1 100%;
        justify-content: space-between;
    }
    
    .toolbar-right {
        flex: 1 1 100%;
        justify-content: flex-end;
    }
    
    .model-btn {
        max-width: 150px;
    }
    
    .model-label {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .icon-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8125rem;
    }

    .resolution-trigger {
        height: 26px;
        font-size: 10px;
        padding: 2px 6px;
    }

    .resolution-trigger-dims {
        display: none;
    }

    .credit-prediction {
        font-size: 9px;
        padding: 1px 4px;
    }

    .resolution-dropdown {
        min-width: 190px;
    }
    
    .submit-btn {
        width: 34px;
        height: 34px;
    }
    
    .ai-disclaimer {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
        margin-top: 0.25rem;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .chat-tabs-bottom {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        justify-content: flex-start;
        padding: 0.5rem;
        gap: 0.375rem;
        background-color: #ffffff !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .chat-tab-bottom {
        padding: 0.625rem 0.75rem;
        min-width: 44px;
        min-height: 44px;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex-shrink: 0;
    }
    
    .chat-tab-bottom i {
        font-size: 1.25rem;
    }
    
    .modern-textarea-seamless {
        padding: 0.75rem 1rem;
        font-size: 14px;
        min-height: 44px;
    }
    
    .chat-input-container {
        padding: 0;
    }
    
    .toolbar-left, .toolbar-right {
        flex: 1 1 auto;
    }
    
    .chat-messages {
        padding: 0.75rem;
    }
    
    .message-bubble {
        max-width: 90%;
    }
}

/* === Old Chat Tabs (Top Position - Now Unused) === */

.chat-tabs {
    display: none; /* Hidden as tabs moved to bottom */
}

.chat-tab {
    padding: 0.375rem 0.875rem;
    font-weight: 700;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 1.25rem;
    cursor: pointer;
    white-space: nowrap;
    color: #374151;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    line-height: 1.2;
}

.chat-tab:hover {
    background-color: #ffffff;
    border-color: #d1d5db;
}

.chat-tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.chat-tab.active {
    color: #ffffff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    box-shadow: 0 6px 14px rgba(118,75,162,0.25);
}

/* === Chat Messages Area === */

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    -webkit-overflow-scrolling: touch;
}

/* === Chat Welcome Message === */

.chat-welcome {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
}

.chat-welcome-content {
    max-width: 600px;
}

.chat-welcome-icon {
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.chat-welcome-icon i {
    font-size: 2rem;
    color: white;
}

.chat-welcome h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.chat-welcome p {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.chat-info-cards {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.chat-info-card {
    background: white;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.chat-info-card p {
    font-weight: 700;
}

.chat-info-card i {
    font-size: 1rem;
    margin-bottom: 0.375rem;
}

.chat-info-card .plan-icon {
    color: #6366f1;
}

.chat-info-card .models-icon {
    color: #8b5cf6;
}

/* Model Count Boxes in Welcome Area */
.chat-model-counts {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.chat-model-count-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 2rem;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    white-space: nowrap;
}

.chat-model-count-box:hover {
    border-color: #8b5cf6;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.chat-model-count-box i {
    font-size: 11px;
    color: #8b5cf6;
}

.chat-model-count-num {
    font-weight: 700;
    color: #1f2937;
}

.chat-model-count-label {
    color: #6b7280;
    font-weight: 500;
}

/* === Message Display === */

.message-list {
    max-width: 900px;
    margin: 0 auto;
}

.message {
    display: flex;
    gap: 0.5rem;
    position: relative;
    overflow: visible;
    margin-bottom: 1.25rem;
}

.message.assistant {
    margin-bottom: 1.25rem; /* ensure assistant message has spacing from following content */
}

.message.user {
    justify-content: flex-end;
}

/* Persistent spacer at the bottom of the chat messages to prevent overlap with input */
.chat-bottom-spacer {
    height: 160px;
    width: 100%;
    pointer-events: none;
}

@media (max-width: 640px) {
    .chat-bottom-spacer { height: 120px; }
}

.message-avatar {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.message-avatar.ai {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-avatar.user-avatar {
    background-color: #374151;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
}

.message-bubble {
    max-width: clamp(18rem, 70%, 40rem);
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    font-size: 0.875rem;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    transition: all 0.2s ease;
}

.message.assistant .message-bubble {
    background-color: white;
    color: #111827;
    border-top-left-radius: 0.25rem;
}

.message.user .message-bubble {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    color: #f9fafb;
    border-top-right-radius: 0.25rem;
    max-width: none; /* Width controlled by parent .user-message-col */
}

/* Assistant message text — base + remove trailing margins */
.assistant-message-text {
    color: #1e293b;
    word-break: break-word;
}

.assistant-message-text :last-child {
    margin-bottom: 0 !important;
}

.assistant-message-text p:last-of-type {
    margin-bottom: 0 !important;
}

.assistant-message-text h1:last-child,
.assistant-message-text h2:last-child,
.assistant-message-text h3:last-child,
.assistant-message-text h4:last-child,
.assistant-message-text h5:last-child,
.assistant-message-text h6:last-child {
    margin-bottom: 0 !important;
}

/* Model avatar image for dynamic AI logos */
.model-avatar-img {
    width: 75%;
    height: 75%;
    object-fit: contain;
}

.message-avatar.ai {
    background: white;
    border: 1px solid #e5e7eb;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    opacity: 1;
}

.ai-copy-btn {
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0.25rem;
    color: #6b7280;
    background: transparent;
    border: 1px solid #d1d5db;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.ai-copy-btn:hover {
    color: #374151;
    background: #f3f4f6;
    border-color: #9ca3af;
}

.ai-copy-btn i {
    font-size: 0.875rem;
}

.model-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    background-color: #f3f4f6;
    color: #374151;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.6875rem;
}

.message.user .model-badge {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Typing indicator animation defined in dashboard.css */

/* === Chat Input Area === */

.chat-input-area {
    background-color: #ffffff;
    border-top: none;
    padding: 0.5rem 1rem 0.25rem 1rem;
    flex-shrink: 0;
}

.chat-input-container {
    max-width: 900px;
    margin: 0 auto;
}

/* === Input Wrapper === */

.modern-input-wrapper {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1.75rem;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.modern-input-wrapper:focus-within {
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

/* Seamless Textarea (White box IS the textarea) */
/* === Textarea === */

/* Seamless Textarea (White box IS the textarea) */
.modern-textarea-seamless {
    width: 100%;
    min-height: 48px;
    max-height: 200px;
    padding: 1rem 1.25rem;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    line-height: 24px;
    resize: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1f2937;
    overflow-y: auto;
}

/* Hide scrollbar but keep functionality */
.modern-textarea-seamless::-webkit-scrollbar {
    display: none;
}

.modern-textarea-seamless {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modern-textarea-seamless::placeholder {
    color: #9ca3af;
}

/* === Toolbar === */

/* Toolbar at Bottom */
.input-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border-top: 1px solid #e5e7eb;
    min-height: 48px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* === Attachment Indicator === */
.attachment-indicator {
    padding: 0.375rem 0.75rem 0;
    display: flex;
    align-items: center;
}

.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    border: 1px solid #c4b5fd;
    border-radius: 1.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 12px;
    color: #5b21b6;
    max-width: 300px;
    animation: attachFadeIn 0.2s ease-out;
}

.attachment-chip i {
    font-size: 11px;
    color: #7c3aed;
    flex-shrink: 0;
}

.attachment-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
    font-weight: 500;
}

.attachment-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: none;
    background: rgba(124, 58, 237, 0.15);
    border-radius: 50%;
    cursor: pointer;
    color: #7c3aed;
    font-size: 9px;
    flex-shrink: 0;
    transition: background 0.15s;
    padding: 0;
}

.attachment-remove:hover {
    background: rgba(124, 58, 237, 0.3);
    color: #5b21b6;
}

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

/* === Model Selector === */

.model-selector-container {
    position: relative;
    overflow: visible;
    z-index: 10;
}

.model-selector-inline {
    position: relative;
}
.model-selector-inline {
    position: relative;
}

.model-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 13px;
}

.model-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.model-btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.04);
}

/* Auto Label */
.auto-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    margin-left: 0.25rem;
}

.model-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-avatar {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 4px;
    color: white;
    font-size: 10px;
}

.model-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.model-avatar:has(.model-logo-img) {
    background: transparent;
}

.model-avatar.placeholder {
    background: #d1d5db;
    color: #6b7280;
}

.model-label {
    font-weight: 600;
    color: #1f2937;
    font-size: 13px;
}

.placeholder-text {
    color: #9ca3af;
    font-weight: 500;
}

.chevron {
    font-size: 10px;
    color: #9ca3af;
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
}

.chevron.open {
    transform: rotate(180deg);
}

/* === Toggle Switch === */

.toggle-wrapper {
    display: flex;
    align-items: center;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    margin: 0;
}

.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: #e5e7eb;
    transition: 0.3s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

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

/* Model Dropdown */
.model-menu {
    position: fixed;
    width: 660px;
    max-height: 420px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 20px -6px rgba(0, 0, 0, 0.12), 0 4px 8px -2px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    padding: 0.375rem;
    display: flex;
    flex-direction: column;
}

/* Model Overlay (backdrop for Vue modal) */
.model-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
}

/* When model-menu is inside overlay, override position to relative */
.model-overlay .model-menu {
    position: relative;
    width: 660px;
    max-height: 420px;
}

/* Model Menu Header (Select Model title + close button) */
.model-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.model-menu-header h3 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.model-menu-close {
    padding: 0.25rem;
    border: none;
    background: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.model-menu-close:hover {
    color: #374151;
    background: #f3f4f6;
}

/* Model selection check mark */
.model-check {
    color: #3b82f6;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Model capability badge */
.model-capability {
    color: #8b5cf6;
    font-weight: 500;
}

@media (max-width: 640px) {
    .model-overlay .model-menu {
        width: 95%;
        max-height: 85vh;
    }
    .model-tier-columns {
        flex-direction: column;
    }
    .model-tier-column:first-child {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    .model-tier-scroll {
        max-height: 200px;
    }
}

/* Two-column tier layout */
.model-tier-columns {
    display: flex;
    gap: 6px;
    height: 100%;
    max-height: 400px;
}

.model-tier-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.no-models {
    padding: 1rem;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

.model-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
    position: relative;
}

.model-option:hover {
    background-color: #f9fafb;
}

.model-option.selected {
    background-color: #eff6ff;
}

.model-option-avatar {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 6px;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
    overflow: hidden;
}

.model-option-avatar .model-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.model-option-avatar:has(.model-logo-img) {
    background: transparent;
}

.model-option-info {
    flex: 1;
    min-width: 0;
}

.model-option-name {
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.model-option-capability {
    font-size: 11px;
    color: #8b5cf6;
    font-weight: 500;
    line-height: 1.3;
}

.model-option-meta {
    font-size: 11px;
    color: #6b7280;
}

.model-tier-scroll {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: auto;
    scrollbar-color: rgba(107, 114, 128, 0.45) rgba(243, 244, 246, 0.5);
    padding: 2px;
}

.model-tier-scroll::-webkit-scrollbar {
    width: 6px;
}

.model-tier-scroll::-webkit-scrollbar-track {
    background: rgba(243, 244, 246, 0.5);
    border-radius: 3px;
}

.model-tier-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(107, 114, 128, 0.45);
    border-radius: 3px;
}

.model-tier-scroll::-webkit-scrollbar-thumb:hover {
    background-color: rgba(107, 114, 128, 0.65);
}

.model-option.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.model-option.disabled:hover {
    background-color: transparent;
}

.model-free-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.model-upgrade-badge {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Model Tier Headers */
.model-tier-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 0.5rem;
    pointer-events: none;
}

/* Premium Tier - Blue to Purple Gradient */
.model-tier-header.premium-tier {
    background: linear-gradient(135deg, #dbeafe 0%, #e9d5ff 100%);
}

.model-tier-header.premium-tier .model-tier-title {
    color: #1e3a8a;
}

.model-tier-header.premium-tier .model-tier-desc {
    color: #4c1d95;
}

.model-tier-header.premium-tier i.fa-crown {
    color: #f59e0b;
}

/* Basic Tier - Sky Blue Gradient */
.model-tier-header.basic-tier {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
}

.model-tier-header.basic-tier .model-tier-title {
    color: #0c4a6e;
}

.model-tier-header.basic-tier .model-tier-desc {
    color: #0369a1;
}

.model-tier-header.basic-tier i.fa-bolt {
    color: #0ea5e9;
}

.model-tier-header i.fa-crown {
    color: #f59e0b;
    font-size: 16px;
    flex-shrink: 0;
}

.model-tier-header i.fa-bolt {
    color: #3b82f6;
    font-size: 16px;
    flex-shrink: 0;
}

.model-tier-info {
    flex: 1;
    min-width: 0;
}

.model-tier-title {
    font-size: 11px;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.model-tier-desc {
    font-size: 10px;
    color: #6b7280;
    line-height: 1.3;
}

/* Icon Buttons */
.icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: #374151;
}

.submit-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

.submit-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.submit-btn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

/* === Image Resolution Selector === */
.resolution-selector-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: visible;
    z-index: 10;
}

.resolution-selector-inline {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* "Resolution:" label */
.resolution-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

/* Trigger button - info badge style */
.resolution-trigger {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 4px 10px;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border: 1px solid #ddd6fe;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 12px;
    height: 28px;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(124, 58, 237, 0.08);
}

.resolution-trigger:hover {
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    border-color: #c4b5fd;
}

.resolution-trigger i.fa-expand-arrows-alt {
    font-size: 10px;
    color: #7c3aed;
}

.resolution-trigger-label {
    font-weight: 600;
    color: #7c3aed;
    font-size: 12px;
}

.resolution-trigger-dims {
    color: #8b5cf6;
    font-size: 11px;
}

.resolution-chevron {
    font-size: 9px;
    color: #a78bfa;
    margin-left: 0.125rem;
    transition: transform 0.2s ease;
}

.resolution-chevron.open {
    transform: rotate(180deg);
}

/* N/A badge for per-image pricing models */
.resolution-na-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 11px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
}

.resolution-na-badge i {
    font-size: 10px;
    color: #9ca3af;
}

/* Credits info badge - matches resolution trigger style */
.credits-info-badge {
    font-size: 11px;
    color: #7c3aed;
    font-weight: 600;
    white-space: nowrap;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #ddd6fe;
    box-shadow: 0 1px 2px rgba(124, 58, 237, 0.08);
}

/* Fixed-position dropdown menu (like model dropdown) */
.resolution-menu {
    position: fixed;
    width: 280px;
    max-height: 380px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 20px -6px rgba(0, 0, 0, 0.12), 0 4px 8px -2px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    padding: 0.5rem;
}

/* Group header */
.resolution-group {
    margin-bottom: 4px;
}

.resolution-group:last-child {
    margin-bottom: 0;
}

.resolution-group-header {
    font-size: 10px;
    font-weight: 700;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 10px 4px;
    border-bottom: 1px solid #ede9fe;
    margin-bottom: 2px;
}

/* Option buttons */
.resolution-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s ease;
    font-family: inherit;
    font-size: 13px;
}

.resolution-option:hover {
    background-color: #f5f3ff;
}

.resolution-option.active {
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
}

.resolution-option-ratio {
    font-weight: 500;
    color: #374151;
}

.resolution-option.active .resolution-option-ratio {
    color: #5b21b6;
    font-weight: 600;
}

.resolution-option-dims {
    font-size: 12px;
    color: #9ca3af;
    font-variant-numeric: tabular-nums;
}

.resolution-option.active .resolution-option-dims {
    color: #7c3aed;
}


.model-selector {
    margin-top: 0.75rem;
}

.model-selector select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background-color: white;
    transition: all 0.15s;
}

.model-selector.compact select {
    width: auto;
    min-width: 220px;
    max-width: 100%;
}

.model-selector select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.selected-model-badge {
    margin-top: 0.5rem;
}

.input-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.input-row textarea,
.input-row input[type="text"] {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    resize: none;
    transition: all 0.15s;
    background-color: #f9fafb;
}

.input-row textarea:focus,
.input-row input[type="text"]:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background-color: white;
}

.input-row button {
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-row button:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.input-row button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.selected-model-badge {
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.selected-model-badge i {
    font-size: 1rem;
}

/* Error Banner - Dismissible temporary notification */
.error-banner {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    overflow: hidden;
}

.error-banner-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: white;
}

/* Error types - different colors */
.error-banner-error .error-banner-content {
    border-left: 4px solid #dc2626;
    background: linear-gradient(to right, #fee2e2 0%, #ffffff 15%);
}

.error-banner-rate-limit .error-banner-content {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(to right, #fef3c7 0%, #ffffff 15%);
}

.error-banner-quota .error-banner-content {
    border-left: 4px solid #dc2626;
    background: linear-gradient(to right, #fee2e2 0%, #ffffff 15%);
}

.error-banner-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.error-banner-error .error-banner-icon {
    color: #dc2626;
}

.error-banner-rate-limit .error-banner-icon {
    color: #f59e0b;
}

.error-banner-quota .error-banner-icon {
    color: #dc2626;
}

.error-banner-message {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #1f2937;
    font-weight: 500;
}

.error-banner-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.error-banner-upgrade {
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: #dc2626;
    color: white;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.8125rem;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.error-banner-upgrade:hover {
    background: #b91c1c;
}

.error-banner-close {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.error-banner-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Transition animations */
.error-banner-enter {
    transition: all 0.3s ease-out;
}

.error-banner-enter-start {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
}

.error-banner-enter-end {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.error-banner-leave {
    transition: all 0.2s ease-in;
}

.error-banner-leave-start {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.error-banner-leave-end {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .error-banner {
        width: 95%;
        max-width: none;
    }
    
    .error-banner-content {
        padding: 0.875rem 1rem;
    }
    
    .error-banner-message {
        font-size: 0.8125rem;
    }
    
    .error-banner-upgrade {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
}

.no-models-note {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #9ca3af;
}

/* AI Disclaimer - Below chat input */
.ai-disclaimer {
    margin-top: 0.25rem;
    margin-bottom: 0;
    padding-bottom: 0;
    font-size: 0.75rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    justify-content: center;
}

.ai-disclaimer i {
    font-size: 0.875rem;
    color: #9ca3af;
    flex-shrink: 0;
}

.ai-disclaimer span {
    line-height: 1.4;
}

.loading-indicator {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.loading-dots {
    display: flex;
    gap: 0.375rem;
    align-items: center;
    padding: 1rem 1.25rem;
}

.loading-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: #9ca3af;
    border-radius: 50%;
    animation: loading-bounce 1.4s infinite ease-in-out;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}



@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.media-content {
    background: #ffffff;
    border: 2px solid #3b82f6;
    border-radius: 0.75rem;
    padding: 1rem;
    margin: 0.5rem 0;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1), 0 2px 4px -1px rgba(59, 130, 246, 0.06);
    position: relative;
}

.media-content img {
    max-width: 100%;
    border-radius: 0.5rem;
    margin: 0;
    display: block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.media-content video {
    max-width: 100%;
    border-radius: 0.5rem;
    margin: 0;
    display: block;
    background: #000;
}

.media-content audio {
    width: 100%;
    margin: 0;
    border-radius: 0.5rem;
}

.media-caption {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    line-height: 1.5;
}

.code-output {
    background-color: #1f2937;
    color: #e5e7eb;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

.font-semibold {
    font-weight: 600;
}

.text-gray-500 {
    color: var(--gray-500);
}

.text-gray-600 {
    color: var(--gray-600);
}

.text-gray-700 {
    color: var(--gray-700);
}

@media (max-width: 768px) {
    .recovery-codes-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .security-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* === HOMEPAGE & LAYOUT STYLES === */

/* Header & Navigation */
.header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

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

.top-nav {
    background-color: #ffffff;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-left: 0.5rem;
    padding: 0.5rem 1rem;
}

.logo-img {
    height: 36px;
    width: auto;
    display: block;
    max-width: 100%;
    object-fit: contain;
}

/* Responsive logo sizing - Mobile First Approach */

/* Extra Small Devices - Small Phones (Portrait) */
@media (max-width: 375px) {
    .logo-img {
        height: 24px;
    }
}

/* Small Devices - Phones (Portrait & Landscape) */
@media (min-width: 376px) and (max-width: 576px) {
    .logo-img {
        height: 28px;
    }
}

/* Medium Small Devices - Large Phones & Small Tablets */
@media (min-width: 577px) and (max-width: 768px) {
    .logo-img {
        height: 30px;
    }
}

/* Medium Devices - Tablets (Portrait) */
@media (min-width: 769px) and (max-width: 1024px) {
    .logo-img {
        height: 32px;
    }
}

/* Large Devices - Laptops & Desktops */
@media (min-width: 1025px) and (max-width: 1440px) {
    .logo-img {
        height: 36px;
    }
}

/* Extra Large Devices - Large Desktops */
@media (min-width: 1441px) and (max-width: 1920px) {
    .logo-img {
        height: 38px;
    }
}

/* Ultra Large Devices - 4K & Ultra-wide Monitors */
@media (min-width: 1921px) {
    .logo-img {
        height: 40px;
    }
}

.nav-links {
    display: flex;
    gap: var(--spacing-sm);
}

.nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #000000;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.nav-link:hover {
    color: #000000;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(59, 130, 246, 0.12) 100%);
    text-decoration: none;
}

.nav-actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--primary);
}

.btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    border-radius: var(--radius-md);
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary-sm:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
    color: white;
    text-decoration: none;
}

.btn-secondary-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
}

.btn-secondary-sm:hover {
    background: var(--gray-50);
    color: var(--gray-700);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(233, 213, 255, 0.5) 0%, rgba(199, 210, 254, 0.5) 100%), #ffffff;
    padding: 1rem 1rem 0;
    text-align: center;
    position: relative;
}

/* Logos in horizontal line below CTA buttons */
.hero-logos-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: nowrap;
    margin-top: 1.5rem;
    margin-bottom: 0;
    pointer-events: none;
}

.hero-logo {
    width: 26px;
    height: 26px;
    object-fit: contain;
    opacity: 1.0;
    flex-shrink: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

.hero-description {
    font-size: 1.125rem;
    color: #000000;
    max-width: 42rem;
    margin: 0 auto 2rem;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

/* Featured $4.99 CTA button with attention-grabbing gradient */
.btn-featured {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
    border: none;
}

.btn-featured:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
    color: white;
    text-decoration: none;
}

@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem 1.5rem;
    }
    
    .hero-logos-row {
        gap: 0.25rem;
        top: 0.25rem;
    }
    
    .hero-logo {
        width: 20px;
        height: 20px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .btn-featured {
        font-size: 0.9375rem;
        padding: 0.75rem 1.25rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Section Styles */
.section {
    padding: 1.5rem 1rem;
}

.section-white {
    background: white;
}

.section-gray {
    background: var(--gray-50);
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    text-align: center;
}

.feature-card:hover {
    /* No hover effect */
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.feature-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

/* Footer */
.footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 2rem 1rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-col h4 {
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-text {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--gray-400);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.3125rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 1rem;
    padding-bottom: 1rem;
    text-align: center;
    font-size: 0.75rem;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-16 {
    margin-bottom: 4rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.max-w-7xl {
    max-width: 80rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.flex {
    display: flex;
}

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

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    .grid-cols-4 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    .footer-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .hero-title {
        font-size: 2rem;
    }
    .section-title {
        font-size: 1.75rem;
    }
}

/* How It Works Section */
.step-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.step-card:hover {
    /* No hover effect */
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.step-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

/* Pricing Preview Section */
.pricing-card {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--gray-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    /* No hover effect */
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

.pricing-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.375rem;
}

.pricing-price {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.125rem;
    line-height: 1.1;
}

.pricing-period {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-bottom: 0.625rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
    text-align: left;
    flex: 1;
}

.pricing-features li {
    font-size: 0.8125rem;
    color: var(--gray-700);
    padding: 0.3125rem 0;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li svg {
    width: 14px;
    height: 14px;
    color: var(--success);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* Pricing Comparison Table */
.pricing-table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pricing-table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.pricing-table thead tr {
    background: var(--gray-50);
}

.pricing-table th {
    padding: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    border-bottom: 2px solid var(--gray-200);
}

.pricing-table th.featured-column {
    background: rgba(59, 130, 246, 0.05);
}

.pricing-table td {
    padding: 0.875rem 1rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.pricing-table td.featured-column {
    background: rgba(59, 130, 246, 0.02);
}

.pricing-table tbody tr:hover {
    background: var(--gray-50);
}

.pricing-table .check-icon {
    width: 20px;
    height: 20px;
    color: var(--success);
    margin: 0 auto;
    display: block;
}

.pricing-table .text-muted {
    color: var(--gray-400);
}

/* FAQ Section */
.faq-container {
    max-width: 48rem;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    transition: background-color 0.2s;
}

.faq-question:hover {
    background: var(--gray-50);
}

.faq-question svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-question.active svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.5rem;
}

.faq-answer.active {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem;
    transition: max-height 0.3s ease-in;
}

.faq-answer p {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}

/* Final CTA Section */
.cta-section {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    padding: 1.5rem 1rem;
    text-align: center;
    color: white;
}

.cta-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cta-description {
    font-size: 1rem;
    margin-bottom: 1rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.btn-cta {
    background: white;
    color: var(--primary);
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-cta:hover {
    background: var(--gray-50);
    color: var(--primary);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Help & FAQ Page
   ======================================== */

/* ── Hero ──────────────────────────────────────────────────── */
.faq-page-hero {
    background: linear-gradient(135deg, rgba(233, 213, 255, 0.5) 0%, rgba(199, 210, 254, 0.5) 100%), #ffffff;
    padding: 1.25rem 1rem 1rem;
    text-align: center;
}

.faq-page-hero__content {
    max-width: 42rem;
    margin: 0 auto;
}

.faq-page-hero__icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: #ffffff;
    font-size: 1.125rem;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.faq-page-hero__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.375rem;
    line-height: 1.2;
}

.faq-page-hero__subtitle {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 0.875rem;
}

/* ── Search Bar ────────────────────────────────────────────── */
.faq-page-search {
    max-width: 32rem;
    margin: 0 auto;
}

.faq-page-search__wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.faq-page-search__icon {
    position: absolute;
    right: 1rem;
    color: var(--gray-400);
    font-size: 0.875rem;
    pointer-events: none;
}

.faq-page-search__input {
    width: 100%;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    font-size: 0.875rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    background: #ffffff;
    color: var(--gray-900);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-page-search__input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.faq-page-search__input::placeholder {
    color: var(--gray-400);
}

.faq-page-search__clear {
    position: absolute;
    right: 2.25rem;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.875rem;
    line-height: 1;
    transition: color 0.2s;
}

.faq-page-search__clear:hover {
    color: var(--gray-600);
}

.faq-page-search__hint {
    font-size: 0.6875rem;
    color: var(--gray-500);
    margin-top: 0.375rem;
}

/* ── Category Quick Navigation ─────────────────────────────── */
.faq-page-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem;
}

.faq-page-nav__links {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    justify-content: center;
    flex-wrap: wrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.faq-page-nav__links::-webkit-scrollbar {
    display: none;
}

.faq-page-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s;
}

.faq-page-nav__link:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    text-decoration: none;
}

.faq-page-nav__link i {
    font-size: 0.75rem;
}

.faq-page-nav__count {
    font-size: 0.6875rem;
    font-weight: 700;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    line-height: 1.4;
}

.faq-page-nav__link:hover .faq-page-nav__count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* ── Category Sections ─────────────────────────────────────── */
.faq-page-category {
    max-width: 52rem;
    margin: 0 auto 3rem;
    scroll-margin-top: 5rem;
}

.faq-page-category__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-100);
}

.faq-page-category__icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(129, 140, 248, 0.1));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.125rem;
    flex-shrink: 0;
}

.faq-page-category__title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    line-height: 1.3;
}

.faq-page-category__desc {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin: 0.125rem 0 0;
    line-height: 1.4;
}

/* ── Accordion ─────────────────────────────────────────────── */
.faq-page-accordion {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.faq-page-accordion__item {
    border: 1px solid var(--gray-200);
    background: #ffffff;
    transition: all 0.2s;
}

.faq-page-accordion__item:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.faq-page-accordion__item:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.faq-page-accordion__item:only-child {
    border-radius: var(--radius-lg);
}

.faq-page-accordion__item + .faq-page-accordion__item {
    border-top: none;
}

.faq-page-accordion__item.active {
    background: var(--gray-50);
    box-shadow: var(--shadow-sm);
}

.faq-page-accordion__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 1rem;
    transition: background-color 0.15s;
}

.faq-page-accordion__trigger:hover {
    background: var(--gray-50);
}

.faq-page-accordion__question {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.5;
}

.faq-page-accordion__icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.faq-page-accordion__item.active .faq-page-accordion__icon {
    background: var(--primary);
    color: #ffffff;
    transform: rotate(45deg);
}

.faq-page-accordion__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-page-accordion__answer {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.faq-page-accordion__answer p {
    margin: 0 0 0.5rem;
}

.faq-page-accordion__answer p:last-child {
    margin-bottom: 0;
}

.faq-page-accordion__answer strong {
    color: var(--gray-800);
}

.faq-page-accordion__answer a {
    color: var(--primary);
    text-decoration: underline;
}

.faq-page-accordion__answer a:hover {
    color: var(--primary-dark);
}

/* ── Still Need Help CTA ───────────────────────────────────── */
.faq-page-cta {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    padding: 2rem 1rem;
    text-align: center;
}

.faq-page-cta__content {
    max-width: 36rem;
    margin: 0 auto;
}

.faq-page-cta__icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.875rem;
    color: #ffffff;
    font-size: 1.125rem;
}

.faq-page-cta__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.375rem;
}

.faq-page-cta__text {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.faq-page-cta__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.faq-page-cta__actions .btn-primary {
    background: #ffffff;
    color: var(--primary);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.faq-page-cta__actions .btn-primary:hover {
    background: var(--gray-50);
    color: var(--primary-dark);
}

.faq-page-cta__actions .btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.4);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
}

.faq-page-cta__actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

/* ── FAQ Page Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
    .faq-page-hero {
        padding: 1.5rem 1rem 1rem;
    }

    .faq-page-hero__title {
        font-size: 1.75rem;
    }

    .faq-page-hero__subtitle {
        font-size: 1rem;
    }

    .faq-page-nav__links {
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .faq-page-category {
        margin-bottom: 2rem;
    }

    .faq-page-category__header {
        gap: 0.75rem;
    }

    .faq-page-category__title {
        font-size: 1.125rem;
    }

    .faq-page-accordion__trigger {
        padding: 1rem;
    }

    .faq-page-accordion__question {
        font-size: 0.875rem;
    }

    .faq-page-accordion__answer {
        padding: 0 1rem 1rem;
        font-size: 0.8125rem;
    }

    .faq-page-cta {
        padding: 1.5rem 1rem;
    }

    .faq-page-cta__title {
        font-size: 1.25rem;
    }
}

/* Grid variations */
.grid-cols-1 {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}

/* ========================================
   AI Models Page
   ======================================== */

/* Hero — matches homepage gradient */
.models-hero {
    background: linear-gradient(135deg, rgba(233, 213, 255, 0.5) 0%, rgba(199, 210, 254, 0.5) 100%), #ffffff;
    padding: 2.5rem 1rem 2rem;
    text-align: center;
}

.models-hero-content {
    max-width: 640px;
    margin: 0 auto;
}

.models-hero-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.375rem 1rem;
    border-radius: 2rem;
    margin-bottom: 1rem;
    letter-spacing: 0.025em;
}

.models-hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

.models-hero-subtitle {
    font-size: 1.0625rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.models-hero .hero-actions {
    justify-content: center;
}

/* Browse Section */
.models-browse {
    background: var(--gray-50);
    padding: 2rem 1rem 3rem;
    min-height: 60vh;
}

.models-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: flex-start;
}

/* Sidebar */
.models-sidebar {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: sticky;
    top: 5rem;
}

/* Search */
.models-search {
    margin-bottom: 1.25rem;
}

.models-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.models-search-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--gray-400);
    pointer-events: none;
    flex-shrink: 0;
}

.models-search-input {
    width: 100%;
    padding: 0.625rem 2rem 0.625rem 2.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--gray-700);
    background: var(--gray-50);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: var(--font-sans);
}

.models-search-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}

.models-search-input::placeholder {
    color: var(--gray-400);
}

.models-search-clear {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.125rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}

.models-search-clear:hover {
    color: var(--gray-600);
}

/* Filters */
.models-filters {
    margin-bottom: 1.25rem;
}

.models-filters-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.models-filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.models-filter-item:hover {
    background: var(--gray-50);
}

.models-filter-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    background: white;
}

.models-filter-checkbox.checked {
    background: var(--primary);
    border-color: var(--primary);
}

.models-filter-checkbox.checked svg {
    color: white;
}

.models-filter-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.models-filter-dot--text { background: var(--primary); }
.models-filter-dot--image { background: #db2777; }
.models-filter-dot--voice { background: #059669; }
.models-filter-dot--video { background: #d97706; }
.models-filter-dot--code { background: #2563eb; }

.models-filter-label {
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
}

.models-filter-count {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-400);
    min-width: 1.5rem;
    text-align: right;
}

/* Stats */
.models-stats {
    border-top: 1px solid var(--gray-100);
    padding-top: 1rem;
}

.models-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

.models-stats-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.models-stats-value {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* Content Area */
.models-content {
    min-width: 0;
}

/* Toolbar */
.models-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.models-toolbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.models-result-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.models-search-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 2rem;
}

.models-tag-clear {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.875rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
}

.models-tag-clear:hover {
    opacity: 1;
}

.models-reset-btn {
    background: none;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font-sans);
    white-space: nowrap;
}

.models-reset-btn:hover {
    border-color: var(--gray-300);
    color: var(--gray-700);
    background: white;
}

/* Category Blocks */
.models-category-block {
    margin-bottom: 2rem;
}

.models-category-block:last-child {
    margin-bottom: 0;
}

.models-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.375rem;
    gap: 1rem;
}

.models-category-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.models-category-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.models-category-count {
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 2rem;
}

.models-category-desc {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Model Rows — clean list layout */
.models-list {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.model-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.1s;
}

.model-row:last-child {
    border-bottom: none;
}

.model-row:hover {
    background: var(--gray-50);
}

.model-row-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.model-row-dot--text { background: var(--primary); }
.model-row-dot--image { background: #db2777; }
.model-row-dot--voice { background: #059669; }
.model-row-dot--video { background: #d97706; }
.model-row-dot--code { background: #2563eb; }

.model-row-name {
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.model-row-category {
    font-size: 0.6875rem;
    padding: 0.1875rem 0.5rem;
    border-radius: 2rem;
    flex-shrink: 0;
}

/* No Results */
.models-no-results {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.models-no-results svg {
    display: inline-block;
}

/* CTA */
.models-cta {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    padding: 3rem 1rem;
    text-align: center;
    color: white;
}

.models-cta-content {
    max-width: 560px;
    margin: 0 auto;
}

.models-cta-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
}

.models-cta-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.models-cta .hero-actions {
    justify-content: center;
}

/* AI Models Page Responsive */
@media (max-width: 900px) {
    .models-layout {
        grid-template-columns: 220px 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .models-hero {
        padding: 2rem 1rem 1.5rem;
    }

    .models-hero-title {
        font-size: 1.75rem;
    }

    .models-hero-subtitle {
        font-size: 0.9375rem;
    }

    .models-layout {
        grid-template-columns: 1fr;
    }

    .models-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .models-search {
        grid-column: 1 / -1;
        margin-bottom: 0;
    }

    .models-filters {
        margin-bottom: 0;
    }

    .models-stats {
        border-top: none;
        border-left: 1px solid var(--gray-100);
        padding-top: 0;
        padding-left: 1rem;
        align-self: center;
    }

    .model-row-category {
        display: none;
    }

    .models-cta {
        padding: 2rem 1rem;
    }

    .models-cta-title {
        font-size: 1.375rem;
    }
}

@media (max-width: 480px) {
    .models-sidebar {
        grid-template-columns: 1fr;
    }

    .models-stats {
        border-left: none;
        border-top: 1px solid var(--gray-100);
        padding-left: 0;
        padding-top: 1rem;
    }

    .model-row {
        padding: 0.5rem 0.75rem;
    }

    .model-row-name {
        font-size: 0.75rem;
    }
}

/* Compact dashboard input wrapper */
.dashboard-input-compact .modern-input-wrapper {
    border-radius: 1.5rem;
    min-height: auto;
    border: 2px solid #8b5cf6;
}

/* Compact textarea for dashboard */
.dashboard-input-compact .modern-textarea-seamless {
    min-height: 70px;
    max-height: 160px;
    padding: 0.875rem 1rem;
    font-size: 15px;
    line-height: 1.6;
}

/* Compact toolbar for dashboard */
.dashboard-input-compact .input-toolbar {
    padding: 0.375rem 0.625rem;
    min-height: 36px;
    gap: 0.75rem;
}

/* Compact model button */
.dashboard-input-compact .model-btn {
    padding: 0.15rem 0.375rem;
    gap: 0.375rem;
    font-size: 12px;
    border-radius: 0.25rem;
}

/* Compact model avatar */
.dashboard-input-compact .model-avatar {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    font-size: 9px;
}

/* Compact model label */
.dashboard-input-compact .model-label {
    font-size: 12px;
    font-weight: 600;
}

/* Compact Auto label */
.dashboard-input-compact .auto-label {
    font-size: 12px;
    font-weight: 600;
    margin-left: 0.375rem;
}

/* Compact toggle switch */
.dashboard-input-compact .toggle-switch {
    width: 36px;
    height: 18px;
}

.dashboard-input-compact .toggle-slider:before {
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
}

.dashboard-input-compact input:checked + .toggle-slider:before {
    transform: translateX(18px);
}

/* Compact icon buttons */
.dashboard-input-compact .icon-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-radius: 6px;
    background-color: #f3f4f6;
}

.dashboard-input-compact .icon-btn:hover {
    background-color: #e5e7eb;
}

/* Compact resolution selector */
.dashboard-input-compact .resolution-trigger {
    height: 24px;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 5px;
}

.dashboard-input-compact .credit-prediction {
    font-size: 9px;
    padding: 1px 4px;
}

/* Compact submit button */
.dashboard-input-compact .submit-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
    border-radius: 6px;
}

/* Compact toolbar spacing */
.dashboard-input-compact .toolbar-left {
    gap: 0.5rem;
}

.dashboard-input-compact .toolbar-right {
    gap: 0.1875rem;
}

/* Compact chevron */
.dashboard-input-compact .chevron {
    font-size: 9px;
    margin-left: 0.125rem;
}

/* === User Dropdown Styling === */
.user-menu-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    margin-right: 1rem;
}

.user-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.12rem 0.45rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 1rem;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.14);
    user-select: none;
}

.user-plan-badge-free {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 2px 4px rgba(251, 191, 36, 0.14);
}

.user-plan-badge-premium {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.14);
}

.user-plan-badge i {
    font-size: 0.6rem;
}

.user-dropdown-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.user-dropdown-arrow:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.user-dropdown-arrow i {
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.user-dropdown-arrow.open i {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    width: 12rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    z-index: 50;
    overflow: hidden;
}

.user-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.user-dropdown-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.875rem;
    margin: 0;
}

.user-dropdown-email {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    margin-top: 0.125rem;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
    text-decoration: none;
    color: #374151;
    font-size: 0.82rem;
    transition: all 0.15s ease;
    border-bottom: 1px solid #f3f4f6;
}

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

.user-dropdown-item:hover {
    background-color: #f9fafb;
    color: #1f2937;
}

.user-dropdown-item i {
    width: 1rem;
    text-align: center;
}

.user-logout-form {
    width: 100%;
}

.user-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.45rem 0.8rem;
    background: none;
    border: none;
    text-align: left;
    color: #dc2626;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border-top: 1px solid #e5e7eb;
}

.user-logout-btn:hover {
    background-color: #fef2f2;
}

.user-avatar-circle {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18);
    border: 2px solid #fff;
    letter-spacing: 0.02em;
    user-select: none;
}

/* === New Page Styles === */

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--gray-900);
    background: white;
    transition: all 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input-error {
    border-color: var(--error);
}

.form-error {
    display: block;
    color: var(--error);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

.form-help {
    display: block;
    color: var(--gray-600);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Card Styles */
.card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.card-danger {
    border: 2px solid #fee2e2;
}

/* Setting Info Box */
.setting-info-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.setting-info-label {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.setting-info-value {
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Danger Zone */
.danger-zone-warning {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #fef2f2;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.danger-zone-warning i {
    color: var(--error);
    font-size: 1.5rem;
}

.danger-zone-warning h4 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.danger-zone-warning p {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-content {
    background: white;
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ======================== */
/* Attachment Viewer Modal  */
/* ======================== */

/* User-side attachment modal extends .modal */
.modal.attachment-viewer .modal-content {
    max-width: 800px;
    background: #ffffff;
    color: #111827;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal.attachment-viewer .modal-header {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1.25rem;
}

.modal.attachment-viewer .modal-header h3 {
    color: #111827;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modal.attachment-viewer .modal-close {
    color: #6b7280;
    font-size: 1.25rem;
}

.modal.attachment-viewer .modal-close:hover {
    color: #111827;
}

.modal.attachment-viewer .modal-body {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 300px;
    max-height: 70vh;
    background: #f3f4f6;
}

.modal.attachment-viewer .modal-body img {
    max-width: 100%;
    max-height: 68vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 0.25rem;
}

.modal.attachment-viewer .modal-footer {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 0.5rem 1.25rem;
    justify-content: space-between;
    align-items: center;
}

.attachment-viewer-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.attachment-viewer-nav button {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

.attachment-viewer-nav button:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

.attachment-viewer-nav button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.attachment-viewer-counter {
    font-size: 0.75rem;
    color: #6b7280;
}

.attachment-viewer-info {
    font-size: 0.75rem;
    color: #6b7280;
}

.attachment-viewer-download {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #3b82f6;
    border: 1px solid #2563eb;
    color: #ffffff;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
}

.attachment-viewer-download:hover {
    background: #2563eb;
    color: #ffffff;
}

/* Admin-side attachment modal extends admin-modal */
.admin-attachment-viewer {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.admin-attachment-viewer.hidden {
    display: none;
}

.admin-attachment-viewer .admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9998;
}

.admin-attachment-viewer-content {
    position: relative;
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid #e5e7eb;
    max-width: 800px;
    width: 100%;
    z-index: 9999;
    animation: modalSlideIn 0.2s ease;
    overflow: hidden;
}

.admin-attachment-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.admin-attachment-viewer-header h3 {
    color: #111827;
    font-size: 0.8125rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-attachment-viewer-header button {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.admin-attachment-viewer-header button:hover {
    color: #111827;
}

.admin-attachment-viewer-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    max-height: 65vh;
    background: #f3f4f6;
    position: relative;
    padding: 1rem;
}

.admin-attachment-viewer-body img {
    max-width: 100%;
    max-height: 63vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 0.25rem;
}

.admin-attachment-viewer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

/* Responsive adjustments for attachment viewers */
@media (max-width: 640px) {
    .modal.attachment-viewer .modal-content {
        max-width: calc(100% - 1rem);
        width: 100%;
    }

    .modal.attachment-viewer .modal-body {
        min-height: 200px;
        max-height: 55vh;
    }

    .modal.attachment-viewer .modal-body img {
        max-height: 55vh;
    }

    .admin-attachment-viewer {
        padding: 0.5rem;
    }

    .admin-attachment-viewer-content {
        max-width: calc(100% - 1rem);
    }

    .admin-attachment-viewer-body {
        min-height: 180px;
        max-height: 50vh;
    }

    .admin-attachment-viewer-body img {
        max-height: 50vh;
    }

    .attachment-viewer-download {
        display: none;
    }
}

/* Attachment thumbnail (clickable) */
.attachment-thumb {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.attachment-thumb:hover {
    opacity: 0.85;
}

/* ============================== */
/* Canned Response Modal          */
/* ============================== */

.canned-modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.2s ease;
}

.canned-search-bar {
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.canned-search-wrap {
    position: relative;
}

.canned-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.8125rem;
    pointer-events: none;
}

.canned-search-field {
    padding-left: 2.25rem !important;
    height: 2.25rem !important;
    font-size: 0.8125rem !important;
}

.canned-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Left panel: categories & items */
.canned-list-panel {
    width: 50%;
    overflow-y: auto;
    border-right: 1px solid var(--gray-200);
    background: #ffffff;
}

/* Right panel: preview */
.canned-preview-panel {
    width: 50%;
    display: flex;
    flex-direction: column;
    background: var(--gray-50);
    overflow: hidden;
}

.canned-preview-label {
    padding: 0.625rem 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--gray-200);
    background: #ffffff;
}

.canned-preview-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    font-size: 0.8125rem;
    line-height: 1.7;
    color: var(--gray-700);
    white-space: pre-wrap;
    word-break: break-word;
}

.canned-preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 100%;
    color: var(--gray-400);
    font-size: 0.8125rem;
    text-align: center;
    padding: 2rem;
}

.canned-preview-placeholder i {
    font-size: 1.5rem;
    opacity: 0.5;
}

/* Category accordion */
.canned-category {
    border-bottom: 1px solid var(--gray-100);
}

.canned-category:last-child {
    border-bottom: none;
}

.canned-category-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    background: var(--gray-50);
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s;
}

.canned-category-header:hover {
    background: var(--gray-100);
}

.canned-category-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.canned-cat-chevron {
    font-size: 0.625rem;
    color: var(--gray-400);
    flex-shrink: 0;
    width: 0.75rem;
}

.canned-category-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.canned-category-count {
    font-size: 0.6875rem;
    color: var(--gray-400);
    background: var(--gray-200);
    padding: 0.0625rem 0.4375rem;
    border-radius: 9999px;
    font-weight: 500;
}

.canned-category-body {
    background: #ffffff;
}

/* Individual canned response item */
.canned-item {
    padding: 0.5rem 1rem 0.5rem 2rem;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-50);
    transition: background-color 0.1s;
}

.canned-item:hover {
    background: rgba(59, 130, 246, 0.04);
}

.canned-item-selected {
    background: rgba(59, 130, 246, 0.08) !important;
    border-left: 3px solid #3b82f6;
    padding-left: calc(2rem - 3px);
}

.canned-item-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.125rem;
}

.canned-item-shortcode {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 0.6875rem;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
    padding: 0.0625rem 0.375rem;
    border-radius: 0.25rem;
    margin-right: 0.375rem;
    font-weight: 500;
}

.canned-item-snippet {
    font-size: 0.6875rem;
    color: var(--gray-500);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Empty state */
.canned-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    color: var(--gray-400);
    text-align: center;
    gap: 0.75rem;
}

.canned-empty i {
    font-size: 1.5rem;
    opacity: 0.4;
}

.canned-empty p {
    font-size: 0.8125rem;
    margin: 0;
}

/* Footer buttons */
.canned-btn-cancel {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    background: #ffffff;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s;
}

.canned-btn-cancel:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.canned-btn-insert {
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #ffffff;
    background: #3b82f6;
    border: 1px solid #2563eb;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s;
}

.canned-btn-insert:hover:not(:disabled) {
    background: #2563eb;
}

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

/* Responsive: stack panels on mobile */
@media (max-width: 768px) {
    .canned-modal-content {
        max-width: 100%;
        width: 100%;
        max-height: 90vh;
        border-radius: 0.5rem;
    }

    .canned-modal-body {
        flex-direction: column;
    }

    .canned-list-panel {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
        max-height: 45vh;
    }

    .canned-preview-panel {
        width: 100%;
        max-height: 30vh;
    }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.billing-stats-grid,
.support-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-icon-wrapper {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.stat-icon-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-icon-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.stat-icon-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-icon-inactive {
    background: rgba(107, 114, 128, 0.1);
    color: var(--gray-500);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Plan Overview */
.plan-overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.plan-badge-free {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.plan-badge-premium {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.price-currency {
    font-size: 1.5rem;
    vertical-align: super;
}

.price-period {
    font-size: 1rem;
    color: var(--gray-600);
    font-weight: 400;
}

.plan-billing-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.plan-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.plan-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.plan-feature-item i {
    color: var(--primary);
    font-size: 1.25rem;
}

.feature-label {
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.feature-value {
    font-weight: 600;
    color: var(--gray-900);
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--gray-50);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-900);
}

.code-inline {
    background: var(--gray-100);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--gray-700);
}

/* Badge Styles */
.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-status.inactive {
    background: rgba(107, 114, 128, 0.1);
    color: var(--gray-600);
}

.badge-status.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-status.info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge-payment-gateway {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-stripe {
    background: #635bff;
    color: white;
}

.badge-payhere {
    background: #ff6b00;
    color: white;
}

.badge-verifone {
    background: #00a0e3;
    color: white;
}

.badge-modality {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-text {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.badge-image {
    background: rgba(236, 72, 153, 0.1);
    color: #db2777;
}

.badge-voice {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-video {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-code {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge-priority {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge-purple {
    background: rgba(147, 51, 234, 0.1);
    color: #9333ea;
}

.badge-gray {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
}

/* Button Extra Small */
.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

/* Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.plan-card {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.plan-card:hover {
    /* No hover effect */
}

.plan-card-current {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.02);
}

.plan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.plan-card-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.plan-card-price {
    margin-bottom: 1.5rem;
}

.plan-card-features {
    margin-bottom: 1.5rem;
}

.plan-card-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.plan-card-feature i {
    color: var(--success);
}

/* Usage Filters */
.usage-filters {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-label {
    display: block;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
}

/* Timestamp */
.timestamp {
    display: flex;
    flex-direction: column;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* Support Tickets */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.ticket-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.ticket-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.ticket-link {
    color: var(--gray-900);
    text-decoration: none;
    font-size: 1rem;
}

.ticket-link:hover {
    color: var(--primary);
}

.ticket-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

.ticket-number {
    font-family: var(--font-mono);
    background: var(--gray-100);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.ticket-separator {
    color: var(--gray-400);
}

.ticket-item-badges {
    display: flex;
    gap: 0.5rem;
}

.ticket-description {
    color: var(--gray-700);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.ticket-item-footer {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.ticket-category,
.ticket-replies {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Support Tips */
.support-tips {
    display: grid;
    gap: 1rem;
}

.support-tip {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.support-tip i {
    color: var(--success);
    margin-top: 0.125rem;
}

/* Ticket Detail */
.ticket-detail-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

.ticket-message {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-message-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.avatar-admin {
    background: var(--success);
}

.author-name {
    font-weight: 600;
    color: var(--gray-900);
}

.author-time {
    font-size: 0.8125rem;
    color: var(--gray-600);
}

.ticket-message-body {
    color: var(--gray-700);
    line-height: 1.6;
}

.card-admin-reply {
    background: rgba(16, 185, 129, 0.02);
    border-left: 3px solid var(--success);
}

.ticket-info-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.ticket-info-label {
    font-size: 0.8125rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.ticket-info-value {
    font-weight: 500;
    color: var(--gray-900);
}

/* Pagination */
.pagination-wrapper {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .ticket-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .plan-overview {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ========================================
   COMPACT LAYOUT STYLES - ENTERPRISE GRADE
   ======================================== */

/* Compact Container */
.container-compact {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Compact Page Header */
.page-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.page-header-compact h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.page-header-compact .text-muted {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Settings Card - Compact */
.settings-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.settings-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.settings-card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-card-header h3 i {
    font-size: 0.875rem;
    color: var(--primary);
}

.settings-card-body {
    padding: 1.5rem;
}

/* Form Grid Layouts */
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

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

@media (max-width: 1024px) {
    .form-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Stats Grid - Compact */
.stats-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stats-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
    .stats-grid-3,
    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Stat Card - Compact */
.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 0.625rem 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.stat-icon-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.stat-icon-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-icon-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-icon-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.stat-icon-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.stat-icon-inactive {
    background: var(--gray-100);
    color: var(--gray-500);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--gray-600);
    margin-bottom: 0;
    line-height: 1.2;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-subtitle {
    font-size: 0.65rem;
    color: var(--gray-500);
    line-height: 1;
}

.stat-value small {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gray-500);
    margin-left: 0.5rem;
}

/* Plan Overview - Compact */
.plan-overview-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.plan-info-compact {
    flex: 1;
}

.plan-badge-lg {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.plan-badge-free {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.plan-badge-premium {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.plan-price-compact {
    margin-bottom: 0.5rem;
}

.price-currency {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-600);
}

.price-big {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.price-period {
    font-size: 1rem;
    color: var(--gray-500);
}

.billing-date {
    font-size: 0.875rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.plan-quotas-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.quota-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.quota-item i {
    color: var(--primary);
}

/* Plans Grid - Compact */
.plans-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.plan-card-compact {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.plan-card-compact:hover {
    /* No hover effect */
}

.plan-card-compact.current-plan {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.02);
}

.plan-card-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.plan-card-header-compact h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.badge-current {
    background: var(--success);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.plan-card-price-compact {
    margin-bottom: 1rem;
}

.plan-card-features-compact {
    margin-bottom: 1rem;
}

.feature-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.feature-compact i {
    color: var(--success);
    font-size: 0.75rem;
}

.plan-card-action {
    margin-top: 1rem;
}

/* Table - Compact */
.table-compact {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table-compact thead {
    background: var(--gray-50);
}

.table-compact th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border-bottom: 1px solid var(--gray-200);
}

.table-compact td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-900);
}

.table-compact tbody tr:hover {
    background: var(--gray-50);
}

/* Badge Variants - Small */
.badge-status-sm {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-status-sm.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-status-sm.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-status-sm.inactive {
    background: var(--gray-100);
    color: var(--gray-500);
}

.badge-priority-sm {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-priority-sm.badge-low {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.badge-priority-sm.badge-medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-priority-sm.badge-high,
.badge-priority-sm.badge-urgent {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.badge-gateway {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-stripe {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.badge-paypal {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.badge-razorpay {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.code-sm {
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--gray-700);
}

/* Empty State - Compact */
.empty-state-compact {
    text-align: center;
    padding: 2rem 1rem;
}

.empty-state-compact i {
    font-size: 2.5rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.empty-state-compact h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.empty-state-compact p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

/* User Plan Badge */
.user-plan-badge-free {
    background: rgba(245, 158, 11, 0.1) !important;
    color: var(--warning) !important;
}

.user-plan-badge-premium {
    background: rgba(16, 185, 129, 0.1) !important;
    color: var(--success) !important;
}

/* Premium Badge */
.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Ticket Message - Compact */
.avatar-circle-sm {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    flex-shrink: 0;
}

.avatar-circle-sm.avatar-admin {
    background: var(--success);
}

/* Filter Bar - Compact */
.filter-bar-compact {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-bar-compact .form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

/* Chart Container - Compact */
.chart-container-compact {
    position: relative;
    height: 250px;
    margin-top: 1rem;
}

/* Button Variants */
.btn-full {
    width: 60%;
    margin: 0 auto 0.75rem;
    display: flex;
    justify-content: center;
}

.btn-outline-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-700);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline-sm:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Responsive Compact Layouts */
@media (max-width: 768px) {
    .container-compact {
        padding: 1rem;
    }
    
    .page-header-compact {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .plan-overview-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .filter-bar-compact {
        flex-direction: column;
    }
    
    .filter-bar-compact .form-group {
        width: 100%;
        min-width: 100%;
    }
    
    .settings-card-header,
    .settings-card-body {
        padding: 1rem;
    }
}

/* === Usage Analytics Styles === */
.usage-meters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.usage-meter-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.75rem;
}

.usage-meter-card:hover {
    /* No hover effect */
}

.meter-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.5rem;
}

.meter-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: white;
}

.meter-icon.text { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.meter-icon.image { background: linear-gradient(135deg, var(--success), #059669); }
.meter-icon.voice { background: linear-gradient(135deg, var(--warning), #d97706); }
.meter-icon.video { background: linear-gradient(135deg, var(--error), #dc2626); }
.meter-icon.code { background: linear-gradient(135deg, var(--info), #2563eb); }

.meter-info h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.125rem;
    line-height: 1.2;
}

.meter-count {
    font-size: 0.7rem;
    color: var(--gray-600);
    font-weight: 500;
    display: block;
    line-height: 1.3;
}

.meter-percentage {
    font-size: 0.65rem;
    color: var(--gray-500);
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
    min-width: 2px; /* Ensure very small percentages are still visible */
}

/* Default progress bar colors by type */
.progress-bar.text-progress { background: linear-gradient(90deg, var(--primary), var(--primary-dark)); }
.progress-bar.image-progress { background: linear-gradient(90deg, var(--success), #059669); }
.progress-bar.voice-progress { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.progress-bar.video-progress { background: linear-gradient(90deg, #ec4899, #db2777); }
.progress-bar.code-progress { background: linear-gradient(90deg, var(--info), #2563eb); }

/* Usage warning/critical states - override type colors when approaching limits */
.progress-bar.usage-warning {
    background: linear-gradient(90deg, #f59e0b, #d97706) !important;
}

.progress-bar.usage-critical {
    background: linear-gradient(90deg, #ef4444, #dc2626) !important;
}

.progress-bar.usage-exhausted {
    background: linear-gradient(90deg, #6b7280, #4b5563) !important;
}

/* Exhausted meter card state */
.usage-meter-card.exhausted {
    opacity: 0.9;
    border-color: #fca5a5;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.usage-meter-card.exhausted .meter-icon {
    background: #6b7280 !important;
}

.meter-status.exhausted {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.65rem;
}

/* Not available meter card state (for plans that don't include this modality) */
.usage-meter-card.not-available {
    opacity: 0.75;
    border-color: var(--gray-300);
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.usage-meter-card.not-available .meter-icon {
    background: #9ca3af !important;
}

.usage-meter-card.not-available .meter-count {
    color: var(--gray-500);
    font-style: italic;
}

.meter-status.not-available {
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.65rem;
}

/* Activity status exhausted */
.activity-status.exhausted {
    color: #dc2626;
    font-weight: 600;
}

/* Activity List Styles */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: white;
    border-color: var(--primary-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

.activity-icon.activity-text { background: var(--primary); }
.activity-icon.activity-image { background: var(--success); }
.activity-icon.activity-voice { background: var(--warning); }
.activity-icon.activity-video { background: var(--error); }
.activity-icon.activity-code { background: var(--info); }
.activity-icon.activity-unknown { background: var(--gray-500); }

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

.activity-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.activity-header h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    white-space: nowrap;
}

.activity-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.activity-type {
    font-size: 0.875rem;
    color: var(--gray-700);
    font-weight: 500;
}

.activity-separator {
    color: var(--gray-400);
    font-size: 0.75rem;
}

.activity-tokens {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.activity-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.activity-status.success {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.activity-status.error {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

/* Header Actions */
.card-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-form-inline {
    display: flex;
    align-items: center;
}

.form-select-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: white;
    color: var(--gray-700);
    min-width: 120px;
}

.form-select-sm:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.stat-subtitle {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* Responsive Design for Usage Analytics */
@media (max-width: 768px) {
    .usage-meters-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .meter-header {
        gap: 0.75rem;
    }
    
    .meter-icon {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }
    
    .activity-item {
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .activity-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .activity-details {
        font-size: 0.75rem;
    }
    
    .card-header-actions {
        margin-top: 0.5rem;
        width: 100%;
    }
    
    .filter-form-inline {
        width: 100%;
    }
    
    .form-select-sm {
        width: 100%;
    }
}

/* === Support Page Styles === */
.support-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.support-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
}

.support-tip i {
    color: var(--success);
    font-size: 1.125rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.support-tip p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.support-tip strong {
    color: var(--gray-900);
}

/* ========================================
   Billing Page Enhancements
   ======================================== */

.billing-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .billing-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.plan-overview-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.account-dates-section {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
}

.section-subtitle {
    font-size: 0.875rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-subtitle i {
    color: #8b5cf6;
}

.date-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.date-info-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.date-info-item:hover {
    border-color: #8b5cf6;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.1);
}

.date-info-item.highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fbbf24;
}

.date-info-item.highlight:hover {
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}

.date-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-label i {
    color: #9ca3af;
    font-size: 0.875rem;
}

.date-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
}

.date-time {
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: right;
}

.date-info-item.highlight .date-label {
    color: #92400e;
}

.date-info-item.highlight .date-label i {
    color: #d97706;
}

.date-info-item.highlight .date-value {
    color: #92400e;
}


/* ========================================
   ADMIN DASHBOARD UTILITIES - COMPACT & PROFESSIONAL
   Enterprise-grade styling for information-dense admin interface
   ======================================== */

/* === COMPACT STAT CARDS === */
.admin-stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.admin-stat-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-color: #d1d5db;
}

.admin-stat-card-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.admin-stat-card-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.admin-stat-card-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.admin-stat-card-icon.blue { background: #dbeafe; color: #3b82f6; }
.admin-stat-card-icon.green { background: #d1fae5; color: #10b981; }
.admin-stat-card-icon.yellow { background: #fef3c7; color: #f59e0b; }
.admin-stat-card-icon.red { background: #fee2e2; color: #ef4444; }
.admin-stat-card-icon.purple { background: #ede9fe; color: #8b5cf6; }
.admin-stat-card-icon.indigo { background: #e0e7ff; color: #6366f1; }
.admin-stat-card-icon.orange { background: #ffedd5; color: #f97316; }
.admin-stat-card-icon.cyan { background: #cffafe; color: #06b6d4; }

.admin-stat-card-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    font-family: 'Inter', sans-serif;
}

.admin-stat-card-label {
    font-size: 0.625rem;
    color: #6b7280;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 500;
}

.admin-stat-card-footer {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6875rem;
}

.admin-stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.admin-stat-trend.up {
    color: #10b981;
    background: #d1fae5;
}

.admin-stat-trend.down {
    color: #ef4444;
    background: #fee2e2;
}

.admin-stat-trend.neutral {
    color: #6b7280;
    background: #f3f4f6;
}

/* === COMPACT FORMS === */
.admin-form-group {
    margin-bottom: 0.75rem;
}

.admin-form-label {
    display: block;
    font-size: 0.75rem; /* text-xs */
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.admin-form-label.required::after {
    content: '*';
    color: #ef4444;
    margin-left: 0.25rem;
}

.admin-form-input,
.admin-form-select,
.admin-form-textarea {
    width: 100%;
    font-size: 0.75rem; /* text-xs */
    padding: 0.375rem 0.5rem; /* py-1.5 px-2 */
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    color: #111827;
    transition: all 0.2s ease;
}

.admin-form-input:focus,
.admin-form-select:focus,
.admin-form-textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.admin-form-input:disabled,
.admin-form-select:disabled,
.admin-form-textarea:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.admin-form-input.error,
.admin-form-select.error,
.admin-form-textarea.error {
    border-color: #ef4444;
}

.admin-form-error {
    font-size: 0.75rem; /* text-xs */
    color: #ef4444;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.admin-form-help {
    font-size: 0.75rem; /* text-xs */
    color: #6b7280;
    margin-top: 0.25rem;
}

.admin-form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.admin-form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.admin-form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

@media (max-width: 1024px) {
    .admin-form-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .admin-form-grid-2,
    .admin-form-grid-3,
    .admin-form-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* === COMPACT TABLES === */
.admin-table-container {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem; /* text-xs */
}

.admin-table thead {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.admin-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-size: 0.6875rem; /* slightly smaller than text-xs */
}

.admin-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: #111827;
}

.admin-table tbody tr:hover {
    background: #f9fafb;
}

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

.admin-table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-table-action-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.admin-table-action-btn.view {
    background: #dbeafe;
    color: #3b82f6;
}

.admin-table-action-btn.view:hover {
    background: #bfdbfe;
}

.admin-table-action-btn.edit {
    background: #fef3c7;
    color: #f59e0b;
}

.admin-table-action-btn.edit:hover {
    background: #fde68a;
}

.admin-table-action-btn.delete {
    background: #fee2e2;
    color: #ef4444;
}

.admin-table-action-btn.delete:hover {
    background: #fecaca;
}

/* === PROFESSIONAL MODALS === */
/* Modal wrapper (contains backdrop + content) */
.admin-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.admin-modal.hidden {
    display: none;
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9998;
}

/* Modal content box - used by confirm-modal component */
.admin-modal-content {
    position: relative;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 32rem;
    width: 100%;
    z-index: 9999;
    animation: modalSlideIn 0.2s ease;
    padding: 1.5rem;
}

/* Wide modal variant: slightly wider and limited height to prevent page scrolling */
.admin-modal-content.wide {
    max-width: 44rem; /* ~704px */
    width: 100%;
    padding: 1.75rem;
    max-height: 70vh; /* limit height so modal body scrolls instead of page */
    overflow-y: auto; /* allow modal to scroll internally when content exceeds viewport */
    box-sizing: border-box;
}

/* Modal body: constrain height so modal content scrolls internally on small screens */
.admin-modal-body {
    padding: 1rem 0;
    /* Remove max-height and overflow-y from body when modal content handles scrolling */
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .admin-modal {
        padding: 0.5rem;
        align-items: flex-start; /* allow scrolling from top on mobile */
        padding-top: 1rem; /* add top padding for better UX */
    }

    .admin-modal-content,
    .admin-modal-content.wide {
        max-width: calc(100% - 2rem) !important;
        width: 100% !important;
        padding: 1rem !important;
        border-radius: 0.5rem !important;
        max-height: 85vh !important; /* increased from 90vh for better scrolling */
        overflow-y: auto;
    }

    .admin-modal-body {
        max-height: none !important; /* let the modal content handle scrolling */
        padding-right: 0.5rem;
        overflow-y: visible; /* prevent double scrolling */
    }
}

@media (min-width: 641px) {
    .admin-modal-content {
        max-width: 36rem;
    }
    .admin-modal-content.wide {
        max-width: 44rem;
    }
}

/* Wide modal variant: slightly wider and limited height to prevent page scrolling */
.admin-modal-content.wide {
    max-width: 44rem; /* ~704px */
    width: 100%;
    padding: 1.75rem;
    max-height: 70vh; /* limit height so modal body scrolls instead of page */
} 

/* Legacy: direct .admin-modal as content box (support-tickets uses this) */
.admin-modal:not(:has(.admin-modal-backdrop)) {
    position: relative;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 32rem;
    width: 100%;
    z-index: 9999;
    animation: modalSlideIn 0.2s ease;
    padding: 0;
    display: block;
    inset: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-modal-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.admin-modal-icon.delete {
    background: #fee2e2;
    color: #ef4444;
}

.admin-modal-icon.update {
    background: #dbeafe;
    color: #3b82f6;
}

.admin-modal-icon.status {
    background: #fef3c7;
    color: #f59e0b;
}

.admin-modal-icon.bulk {
    background: #ffedd5;
    color: #f97316;
}

.admin-modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    flex: 1;
}

.admin-modal-body {
    padding: 1.5rem;
}

.admin-modal-message {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.admin-modal-impact {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    color: #92400e;
    display: flex;
    align-items: start;
    gap: 0.5rem;
}

.admin-modal-impact.danger {
    background: #fee2e2;
    border-left-color: #ef4444;
    color: #991b1b;
}

.admin-modal-impact i {
    margin-top: 0.125rem;
}

.admin-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #f9fafb;
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.admin-modal-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-modal-btn-cancel {
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.admin-modal-btn-cancel:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.admin-modal-btn-confirm {
    background: #6366f1;
    color: white;
}

.admin-modal-btn-confirm:hover {
    background: #4f46e5;
}

.admin-modal-btn-confirm.delete {
    background: #ef4444;
}

.admin-modal-btn-confirm.delete:hover {
    background: #dc2626;
}

.admin-modal-btn-confirm.warning {
    background: #f59e0b;
}

.admin-modal-btn-confirm.warning:hover {
    background: #d97706;
}

/* Compact (delete) modal adjustments - smaller vertical footprints */
.admin-modal-compact{max-width:420px;padding:0}
.admin-modal-compact .admin-modal-header{padding:.6rem 1rem}
.admin-modal-compact .admin-modal-body{padding:.4rem 1rem}
.admin-modal-compact .admin-modal-footer{padding:.5rem 1rem}
.admin-modal-compact .admin-modal-title{font-size:1rem}
.admin-modal-compact .admin-modal-message{margin:0}
.admin-modal-compact .admin-modal-icon{width:34px;height:34px;font-size:14px;margin-right:.5rem}
.admin-modal-compact .admin-modal-header{gap:.5rem}
.admin-modal-compact .admin-modal-title{font-size:0.95rem;margin-bottom:0}
.admin-modal-compact .admin-modal-header .modal-close{margin-left:.5rem}
.admin-modal-compact .admin-modal-body{padding-top:.4rem;padding-bottom:.35rem}
.admin-modal-compact .admin-modal-body p{margin:0}
.admin-modal-compact .admin-modal-body i.fas.fa-exclamation-circle{font-size:14px;margin-top:.125rem}
.admin-modal-compact .admin-modal-footer .admin-modal-btn{padding:.4rem .75rem;font-size:.875rem}
.admin-modal-compact{max-height: 65vh; overflow: auto}
.admin-modal-compact .admin-modal-impact{padding:.3rem}
.admin-modal-compact .admin-modal-body strong{font-weight:600}
.admin-modal-compact .admin-modal-icon.delete{border-radius:.375rem;color:var(--error);border:1px solid var(--gray-200);background:transparent}

/* === COMPACT BADGES === */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem; /* text-xs */
    font-weight: 600;
    border-radius: 9999px;
    white-space: nowrap;
}

.admin-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.admin-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.admin-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

.admin-badge.info {
    background: #dbeafe;
    color: #1e40af;
}

.admin-badge.neutral {
    background: #f3f4f6;
    color: #374151;
}

.admin-badge.purple {
    background: #ede9fe;
    color: #6b21a8;
}

.admin-badge.indigo {
    background: #e0e7ff;
    color: #3730a3;
}

.admin-badge i {
    font-size: 0.625rem;
}

/* === BUTTONS === */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem; /* text-sm */
    font-weight: 600;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.25;
}

.admin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-btn-primary {
    background: #6366f1;
    color: white;
}

.admin-btn-primary:hover:not(:disabled) {
    background: #4f46e5;
    color: white;
}

.admin-btn-secondary {
    background: #10b981;
    color: white;
}

.admin-btn-secondary:hover:not(:disabled) {
    background: #059669;
    color: white;
}

.admin-btn-tertiary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.admin-btn-tertiary:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.admin-btn-success {
    background: #10b981;
    color: white;
}

.admin-btn-success:hover:not(:disabled) {
    background: #059669;
}

.admin-btn-danger {
    background: #ef4444;
    color: white;
}

.admin-btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.admin-btn-warning {
    background: #f59e0b;
    color: white;
}

.admin-btn-warning:hover:not(:disabled) {
    background: #d97706;
}

.admin-btn-info {
    background: #3b82f6;
    color: white;
}

.admin-btn-info:hover:not(:disabled) {
    background: #2563eb;
}

.admin-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.admin-btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.admin-btn-block {
    width: 100%;
    justify-content: center;
}

/* === COMPACT CARDS === */
.admin-card {
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.admin-card-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.admin-card-body {
    padding: 1rem;
}

.admin-card-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* === ADMIN SECTIONS === */
.admin-section {
    background: white;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
}

/* === SECTION HEADERS === */
.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.admin-section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    font-family: 'Inter', sans-serif;
}

.admin-section-title i {
    font-size: 0.875rem;
}

/* === PAGE HEADERS === */
.admin-page-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.admin-page-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

.admin-page-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

/* === PAGINATION === */
.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    font-size: 0.75rem;
}

.admin-pagination-info {
    color: #6b7280;
}

.admin-pagination-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.admin-pagination-link {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.admin-pagination-link:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.admin-pagination-link.active {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

.admin-pagination-link:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === FILTERS === */
.admin-filters {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.admin-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.admin-filters-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
}

/* === ALERTS === */
.admin-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border-left: 3px solid;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.admin-alert i {
    margin-top: 0.125rem;
}

.admin-alert.success {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.admin-alert.warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.admin-alert.error {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.admin-alert.info {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

/* === LOADING STATES === */
.admin-loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: adminSpin 0.6s linear infinite;
}

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

.admin-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: adminSkeleton 1.5s ease-in-out infinite;
    border-radius: 0.25rem;
}

@keyframes adminSkeleton {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* === UTILITY CLASSES === */
.admin-text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 1rem 0;
}

.admin-spacer {
    height: 1rem;
}

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

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

.admin-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .admin-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .admin-grid-2,
    .admin-grid-3,
    .admin-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   FAQ CHATBOT — Floating Widget Styles
   ============================================================================= */

/* Wrapper */
.faq-chatbot-wrapper {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
}

/* ── Trigger Button ────────────────────────────────────────── */
.faq-chatbot-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    border: none;
    border-radius: 2rem;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
    transition: all 0.25s ease;
    position: relative;
}

.faq-chatbot-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.45);
}

.faq-chatbot-trigger--hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

.faq-chatbot-trigger--unread {
    animation: faqPulse 2s infinite;
}

.faq-chatbot-trigger__icon {
    font-size: 1.125rem;
}

.faq-chatbot-trigger__badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

@keyframes faqPulse {
    0%, 100% { box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35); }
    50% { box-shadow: 0 8px 30px rgba(99, 102, 241, 0.55); }
}

/* ── Chat Window ───────────────────────────────────────────── */
.faq-chatbot-window {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 380px;
    height: 540px;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
}

/* ── Transitions ───────────────────────────────────────────── */
.faq-chatbot-enter { transition: all 0.25s ease-out; }
.faq-chatbot-enter-start { opacity: 0; transform: scale(0.9) translateY(10px); }
.faq-chatbot-enter-end { opacity: 1; transform: scale(1) translateY(0); }
.faq-chatbot-leave { transition: all 0.15s ease-in; }
.faq-chatbot-leave-start { opacity: 1; transform: scale(1) translateY(0); }
.faq-chatbot-leave-end { opacity: 0; transform: scale(0.9) translateY(10px); }

/* ── Header ────────────────────────────────────────────────── */
.faq-chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    flex-shrink: 0;
}

.faq-chatbot-header__left {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.faq-chatbot-header__avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.faq-chatbot-header__title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.faq-chatbot-header__status {
    font-size: 0.6875rem;
    opacity: 0.85;
    margin: 0;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.faq-chatbot-header__dot {
    width: 7px;
    height: 7px;
    background: #34d399;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.3);
}

.faq-chatbot-header__actions {
    display: flex;
    gap: 0.25rem;
}

.faq-chatbot-header__btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    transition: background 0.2s;
}

.faq-chatbot-header__btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ── Messages Area ─────────────────────────────────────────── */
.faq-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scroll-behavior: smooth;
}

.faq-chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

.faq-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.faq-chatbot-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

/* ── Message Types ─────────────────────────────────────────── */
.faq-chatbot-msg--system {
    text-align: center;
    padding: 0.5rem 0;
}

.faq-chatbot-msg--system span {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
}

.faq-chatbot-msg--system strong {
    font-weight: 700;
    color: #6366f1;
}

.faq-chatbot-msg--user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.faq-chatbot-msg--bot {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* ── Bubbles ───────────────────────────────────────────────── */
.faq-chatbot-bubble {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    word-wrap: break-word;
    word-break: break-word;
}

.faq-chatbot-bubble--user {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #ffffff;
    border-radius: 1rem 1rem 0.25rem 1rem;
}

.faq-chatbot-bubble--user p {
    margin: 0;
}

.faq-chatbot-bubble--bot {
    background: #f3f4f6;
    color: #1f2937;
    border-radius: 1rem 1rem 1rem 0.25rem;
    border: 1px solid #e5e7eb;
    max-width: 92%;
}

.faq-chatbot-bubble--ai {
    background: #eef2ff;
    color: #1f2937;
    border-radius: 1rem 1rem 1rem 0.25rem;
    border: 1px solid #c7d2fe;
    max-width: 92%;
}

.faq-chatbot-time {
    font-size: 0.625rem;
    color: #9ca3af;
    margin-top: 0.25rem;
    padding: 0 0.25rem;
}

/* ── AI Badge ──────────────────────────────────────────────── */
.faq-chatbot-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    padding: 0.125rem 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0.25rem;
}

/* ── FAQ Results ───────────────────────────────────────────── */
.faq-chatbot-result {
    margin-bottom: 0.5rem;
}

.faq-chatbot-result--border {
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.faq-chatbot-result__category {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.375rem;
}

.faq-chatbot-result__icon {
    font-size: 0.625rem;
}

.faq-chatbot-result__question {
    font-weight: 600;
    font-size: 0.8125rem;
    color: #111827;
    margin: 0 0 0.375rem 0;
}

.faq-chatbot-result__answer {
    font-size: 0.8125rem;
    color: #374151;
    line-height: 1.55;
    margin: 0;
}

.faq-chatbot-result__answer strong {
    font-weight: 600;
    color: #111827;
}

/* ── Feedback ──────────────────────────────────────────────── */
.faq-chatbot-feedback {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.625rem;
    border-top: 1px solid #e5e7eb;
}

.faq-chatbot-feedback__label {
    font-size: 0.6875rem;
    color: #9ca3af;
    flex-shrink: 0;
}

.faq-chatbot-feedback__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: 1rem;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
}

.faq-chatbot-feedback__btn--yes:hover {
    border-color: #10b981;
    color: #10b981;
    background: #ecfdf5;
}

.faq-chatbot-feedback__btn--no:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

.faq-chatbot-feedback--given {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.625rem;
    padding-top: 0.625rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.6875rem;
    color: #10b981;
}

/* ── Suggestion Chips ──────────────────────────────────────── */
.faq-chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0 1rem 0.75rem;
    flex-shrink: 0;
}

.faq-chatbot-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #6366f1;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 1.5rem;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    line-height: 1.3;
}

.faq-chatbot-chip:hover {
    background: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
}

.faq-chatbot-chip__icon {
    font-size: 0.625rem;
    flex-shrink: 0;
}

/* ── Bot Avatar Row ────────────────────────────────────────── */
.faq-chatbot-avatar-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    max-width: 100%;
}

.faq-chatbot-msg-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.6875rem;
    margin-top: 2px;
}

/* ── Category Picker (in-chat) ─────────────────────────────── */
.faq-chatbot-bubble--categories {
    padding: 0.75rem 0.875rem;
}

.faq-chatbot-categories__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.625rem 0;
}

.faq-chatbot-categories-grid {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.faq-chatbot-category-btn {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.faq-chatbot-category-btn:hover {
    border-color: #6366f1;
    background: #eef2ff;
    transform: translateX(2px);
}

.faq-chatbot-category-btn__icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    background: #eef2ff;
    color: #6366f1;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.15s;
}

.faq-chatbot-category-btn:hover .faq-chatbot-category-btn__icon {
    background: #6366f1;
    color: #ffffff;
}

.faq-chatbot-category-btn__name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    line-height: 1.3;
}

.faq-chatbot-category-btn__count {
    font-size: 0.6875rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* ── FAQ List (questions for a category) ───────────────────── */
.faq-chatbot-bubble--faq-list {
    padding: 0.75rem 0.875rem;
}

.faq-chatbot-faqlist__title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #6366f1;
    margin: 0 0 0.25rem 0;
}

.faq-chatbot-faqlist__title i {
    font-size: 0.75rem;
}

.faq-chatbot-faqlist__subtitle {
    font-size: 0.75rem;
    color: #9ca3af;
    margin: 0 0 0.625rem 0;
}

.faq-chatbot-faqlist {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.faq-chatbot-faqlist__item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.625rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    font-size: 0.8125rem;
    color: #374151;
    line-height: 1.4;
}

.faq-chatbot-faqlist__item:hover {
    border-color: #6366f1;
    background: #eef2ff;
    color: #4338ca;
}

.faq-chatbot-faqlist__arrow {
    font-size: 0.5rem;
    color: #c7d2fe;
    margin-top: 0.25rem;
    flex-shrink: 0;
    transition: all 0.15s;
}

.faq-chatbot-faqlist__item:hover .faq-chatbot-faqlist__arrow {
    color: #6366f1;
    transform: translateX(2px);
}

/* ── Quick Actions ─────────────────────────────────────────── */
.faq-chatbot-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding: 0.25rem 0 0.25rem 2.25rem;
}

/* ── Loading Animation ─────────────────────────────────────── */
.faq-chatbot-loading {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0;
}

.faq-chatbot-loading__dot {
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: faqBounce 1.2s infinite ease-in-out;
}

.faq-chatbot-loading__dot:nth-child(2) {
    animation-delay: 0.15s;
}

.faq-chatbot-loading__dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes faqBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-6px); opacity: 1; }
}

/* ── Input Area ────────────────────────────────────────────── */
.faq-chatbot-input-area {
    padding: 0.625rem 0.875rem;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #ffffff;
}

.faq-chatbot-input-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-chatbot-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
    background: #ffffff;
    color: #1f2937;
}

.faq-chatbot-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.faq-chatbot-input--main {
    border-radius: 1.5rem;
    padding: 0.625rem 1rem;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    font-size: 0.8125rem;
    color: #1f2937;
    transition: all 0.2s ease;
}

.faq-chatbot-input--main::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.faq-chatbot-input--main:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.faq-chatbot-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
    background: #ffffff;
    color: #1f2937;
    resize: vertical;
    min-height: 60px;
}

.faq-chatbot-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.faq-chatbot-send-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8125rem;
    transition: all 0.15s;
}

.faq-chatbot-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.faq-chatbot-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.faq-chatbot-limit-msg {
    font-size: 0.6875rem;
    color: #f59e0b;
    text-align: center;
    margin-top: 0.375rem;
}

/* ── Powered by Combily ────────────────────────────────────── */
.faq-chatbot-powered {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 1rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.faq-chatbot-powered span {
    font-size: 0.625rem;
    color: #9ca3af;
    letter-spacing: 0.02em;
}

.faq-chatbot-powered strong {
    color: #6366f1;
    font-weight: 700;
}

.faq-chatbot-disclaimer {
    display: block;
    font-size: 0.5625rem;
    color: #b0b5be;
    margin-top: 0.125rem;
    letter-spacing: 0.01em;
}

/* ── Escalation ────────────────────────────────────────────── */
.faq-chatbot-escalate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.625rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
}

.faq-chatbot-escalate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.faq-chatbot-escalation {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #fafafa;
}

.faq-chatbot-escalation__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.faq-chatbot-escalation__header h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.faq-chatbot-escalation__field {
    margin-bottom: 0.625rem;
}

.faq-chatbot-escalation__field label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.faq-chatbot-escalation__submit {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s;
}

.faq-chatbot-escalation__submit:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.faq-chatbot-escalation__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.faq-chatbot-login-hint {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0.5rem 0 0;
}

.faq-chatbot-login-link {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
}

.faq-chatbot-login-link:hover {
    text-decoration: underline;
}

/* ── Mobile Responsive ─────────────────────────────────────── */
@media (max-width: 640px) {
    .faq-chatbot-wrapper {
        bottom: 1rem;
        right: 1rem;
    }

    .faq-chatbot-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .faq-chatbot-trigger {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .faq-chatbot-window {
        width: 340px;
        height: 480px;
    }
}

/* ============================================================================
   DASHBOARD CHAT STYLES
   Markdown rendering, media players, message bubbles, and dashboard-specific
   styles. These are global (not scoped) because they style v-html rendered
   content (markdown, code blocks, etc.) generated by useMarkdown.ts.
   ============================================================================ */

/* Enhanced Markdown Styling for AI Responses */
.message.assistant .message-bubble {
    font-size: 0.9375rem;
    line-height: 1.75;
    letter-spacing: 0.01em;
}

.markdown-h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #0f172a;
    border-bottom: 3px solid #e2e8f0;
    padding-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.markdown-h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: #0f172a;
    letter-spacing: -0.0125em;
}

.markdown-h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.625rem;
    color: #1e293b;
}

.markdown-p {
    margin-bottom: 1.125rem;
    line-height: 1.8;
    color: #0f172a;
}

/* --- Code Blocks --- */

.code-block {
    background: #ffffff;
    color: #1f2937;
    padding: 0;
    border-radius: 0.625rem;
    overflow: hidden;
    margin: 1.25rem 0;
    border: 2px solid #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1), 0 2px 4px -1px rgba(59, 130, 246, 0.06);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;
    position: relative;
}

.code-block-header {
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    padding: 0.625rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    color: #475569;
    font-weight: 500;
}

.code-block-lang {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-block-lang i {
    color: #3b82f6;
}

.code-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    font-weight: 500;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.code-copy-btn i {
    font-size: 0.75rem;
}

.code-copy-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.code-block code {
    display: block;
    padding: 1.25rem;
    padding-top: 3rem;
    overflow-x: auto;
    background: transparent;
    color: #1f2937;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.7;
    tab-size: 4;
}

/* Syntax highlighting colors for light theme */
.code-block code .keyword { color: #d73a49; font-weight: 600; }
.code-block code .string { color: #22863a; }
.code-block code .number { color: #005cc5; }
.code-block code .comment { color: #6a737d; font-style: italic; }
.code-block code .function { color: #6f42c1; font-weight: 500; }
.code-block code .variable { color: #e36209; }
.code-block code .operator { color: #d73a49; }
.code-block code .punctuation { color: #24292e; }

.code-block code::-webkit-scrollbar {
    height: 8px;
}

.code-block code::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.code-block code::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.code-block code::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- Code Response Wrapper (code tab AI response) --- */

.code-response-wrapper {
    font-size: 0.9375rem;
    line-height: 1.75;
    color: #0f172a;
}

.code-response-wrapper .code-block {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin: 0.75rem 0;
}

.code-response-wrapper .code-block code {
    padding: 1rem 1.125rem;
    padding-top: 2.25rem;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.code-response-wrapper .code-block-header {
    padding: 0.375rem 0.75rem;
    font-size: 0.6875rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

/* --- Inline Meta Copy Button --- */

.meta-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #94a3b8;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s ease;
    vertical-align: middle;
    line-height: 1;
}
.meta-copy-btn:hover {
    color: #3b82f6;
    border-color: #3b82f6;
    background: #eff6ff;
}
.meta-copy-btn i {
    font-size: 0.6rem;
}

/* --- Inline Code --- */

.inline-code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 0.15rem 0.5rem;
    border-radius: 0.375rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 0.875em;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* --- Markdown Lists --- */

.markdown-ul,
.markdown-ol {
    margin: 0.75rem 0;
    padding-left: 0;
    list-style: none;
}

.markdown-li,
.markdown-li-ordered {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #374151;
    padding-left: 1.75rem;
    position: relative;
}

.markdown-li:before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: #3b82f6;
    font-weight: bold;
    font-size: 1.2em;
}

.markdown-li-ordered {
    counter-increment: list-counter;
}

.markdown-ol {
    counter-reset: list-counter;
}

.markdown-li-ordered:before {
    content: counter(list-counter) '.';
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: 600;
    min-width: 1.5rem;
}

/* --- Markdown Blockquote --- */

.markdown-quote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #4b5563;
    background: #eff6ff;
    padding: 0.75rem 1rem;
    border-radius: 0 0.375rem 0.375rem 0;
    position: relative;
}

.markdown-quote:before {
    content: '\f10d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: -0.5rem;
    top: -0.5rem;
    background: #3b82f6;
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
}

/* --- Markdown Links --- */

.markdown-link {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.markdown-link:after {
    content: '\f35d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75em;
    opacity: 0.6;
}

.markdown-link:hover {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
}

/* --- Markdown Horizontal Rule --- */

.markdown-hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 1.5rem 0;
    position: relative;
}

.markdown-hr:after {
    content: '\f068';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 50%;
    top: -0.625rem;
    transform: translateX(-50%);
    background: white;
    color: #9ca3af;
    padding: 0 0.5rem;
    font-size: 0.75rem;
}

/* --- Callout Boxes (Info/Warning/Error) --- */

.markdown-callout {
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.markdown-callout-info {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}

.markdown-callout-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.markdown-callout-error {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
}

.markdown-callout i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.markdown-callout-info i {
    color: #3b82f6;
}

.markdown-callout-warning i {
    color: #f59e0b;
}

.markdown-callout-error i {
    color: #ef4444;
}

/* --- Message Bubble Hover Hit Area --- */

/* Expand mouse hit area under bubble so hover persists when moving to icon */
.message-bubble::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1.5rem;
    height: 1.6rem;
    background: transparent;
    pointer-events: auto;
    z-index: 10;
}

/* Disable the ::after overlay on user bubbles so the copy button underneath is clickable */
.message.user .message-bubble::after {
    pointer-events: none;
    z-index: 0;
}

.message.assistant .message-bubble {
    background: #ffffff;
    border: none;
    box-shadow: none;
}

/* Smooth transitions for interactive elements */
.markdown-link,
.code-copy-btn {
    transition: all 0.2s ease;
}

/* Responsive code blocks */
@media (max-width: 768px) {
    .code-block code {
        font-size: 0.75rem;
    }
    
    .code-block-header {
        font-size: 0.625rem;
    }
}

/* --- Image Player --- */

.image-player-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0;
    max-width: 100%;
}

.image-preview-container {
    position: relative;
    overflow: hidden;
}

.image-preview-container img {
    width: auto;
    max-width: 100%;
    max-height: 500px;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 0.5rem;
}

.image-actions {
    display: flex;
    justify-content: flex-start;
}

.image-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: #3b82f6;
    color: #ffffff;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.image-download-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    color: #ffffff;
    text-decoration: none;
}

/* --- Video Player --- */

.video-player-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.75rem;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
    margin: 0.5rem 0;
    max-width: 450px;
}

.video-preview-container {
    position: relative;
    background: #000;
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-preview-container video {
    width: 100%;
    max-height: 280px;
    display: block;
    border-radius: 0.5rem;
}

.video-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.video-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.video-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.video-play-btn i {
    font-size: 0.875rem;
    color: #d97706;
}

.video-progress-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.video-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.video-progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 3px;
    transition: width 0.1s linear;
}

.video-time-display {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.video-time-sep {
    opacity: 0.6;
}

.video-fullscreen-btn {
    width: 28px;
    height: 28px;
    border-radius: 0.25rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.video-fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.video-fullscreen-btn i {
    font-size: 0.75rem;
    color: #fff;
}

.video-actions {
    display: flex;
    justify-content: flex-start;
}

.video-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.video-download-btn:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #667eea;
    text-decoration: none;
}

.video-error-badge {
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    flex-shrink: 0;
}

.video-controls.is-error .video-error-badge {
    display: flex;
}

.video-error-badge i {
    color: #fef2f2;
    font-size: 0.75rem;
}

/* --- Legacy Media Download & Info --- */

.media-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.75rem;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.media-download-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.media-download-btn i {
    font-size: 1rem;
}

.media-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
}

.media-info-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.media-info-item i {
    color: #3b82f6;
}

/* --- Media Generation Info --- */

.media-generation-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0;
    font-size: 0.7rem;
    color: #94a3b8;
}

.media-generation-info .media-info-model,
.media-generation-info .media-info-timestamp {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.media-generation-info i {
    font-size: 0.65rem;
    opacity: 0.7;
}

/* --- Media Loading Indicator --- */

.media-loading-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(99,102,241,0.08) 0%, rgba(139,92,246,0.08) 100%);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 0.75rem;
    color: #7c3aed;
}

.media-loading-status .typing-indicator span {
    background: #7c3aed;
}

.media-loading-status .status-text {
    font-size: 0.8125rem;
    font-weight: 500;
}

/* --- SSE Streaming Cursor --- */

.streaming-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background-color: #7c3aed;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: streaming-blink 0.7s steps(2) infinite;
}
@keyframes streaming-blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* --- STT / Transcription Result Card --- */

.stt-result-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 4px 20px rgba(30, 41, 59, 0.3);
    max-width: 100%;
}

.stt-result-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stt-result-header i {
    font-size: 0.85rem;
    color: #60a5fa;
}

.stt-result-text {
    color: #f1f5f9;
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
}

.stt-result-text::-webkit-scrollbar {
    width: 4px;
}

.stt-result-text::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 2px;
}

/* --- Custom Audio Player --- */

.audio-player-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
    margin: 0.5rem 0;
    min-width: 320px;
    max-width: 100%;
    color: #fff;
}

.custom-audio-player {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.custom-audio-player.is-error {
    background: rgba(239, 68, 68, 0.2);
}

.audio-play-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.audio-play-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.audio-play-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.audio-play-btn i {
    font-size: 0.875rem;
    color: #667eea;
}

.audio-progress-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.audio-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.audio-progress-fill {
    height: 100%;
    background: #fff;
    border-radius: 3px;
    transition: width 0.1s linear;
}

.audio-time-display {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.audio-time-sep {
    opacity: 0.6;
}

.audio-error-badge {
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    flex-shrink: 0;
}

.custom-audio-player.is-error .audio-error-badge {
    display: flex;
}

.audio-error-badge i {
    color: #fef2f2;
    font-size: 0.75rem;
}

.audio-actions {
    display: flex;
    justify-content: flex-start;
}

.audio-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.audio-download-btn:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #667eea;
    text-decoration: none;
}

/* --- User Message Copy Button --- */

.user-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    height: auto;
    color: #818cf8;
    border-radius: 0.25rem;
    background: #ffffff;
    border: 1px solid #818cf8;
    transition: all 0.15s ease;
    font-size: 0.6875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}
.user-copy-btn i { font-size: 0.6rem; }
.user-copy-btn:hover {
    color: #6366f1;
    background: #f5f3ff;
    border-color: #6366f1;
}
.user-message-meta { font-size: 0.75rem; color: #6b7280; }
.user-message-content { word-break: break-word; }

/* Copy container that sits below the message bubble, right-aligned */
.user-copy-container { 
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.25rem;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    pointer-events: none;
}

/* Reveal the copy button when hovering the message row */
.message:hover .user-copy-container,
.message:focus-within .user-copy-container,
.message .user-copy-container:focus-within,
.message .user-copy-container:focus {
    opacity: 1; 
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 640px) {
    .message .user-copy-container { 
        opacity: 1; 
        transform: translateY(0); 
        pointer-events: auto; 
    }
}

/* --- Typing Indicator (Loading dots) --- */

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- Cancelled Message State --- */

.message-cancelled {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #9ca3af;
    font-size: 0.8125rem;
    font-style: italic;
}

.message-cancelled > i.fa-ban {
    color: #ef4444;
    font-size: 0.875rem;
    margin-right: 0.25rem;
}

.message-cancelled > span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.cancelled-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.6875rem;
    color: #9ca3af;
    font-style: normal;
    margin-top: 0.125rem;
}

.cancelled-meta .meta-model,
.cancelled-meta .meta-timestamp,
.cancelled-meta .meta-credits {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.cancelled-meta i {
    font-size: 0.6rem;
    opacity: 0.6;
}

/* --- Generation Error State (media components) --- */

.message-generation-error {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #f87171;
    font-size: 0.8125rem;
}

.generation-error-header {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
}

.generation-error-header > i {
    font-size: 0.875rem;
    color: #ef4444;
}

.generation-error-detail {
    margin: 0;
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.4;
    word-break: break-word;
    max-height: 4.5rem;
    overflow-y: auto;
}

/* --- Text Message Meta Row --- */

.text-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.7rem;
    color: #94a3b8;
}

.text-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.text-meta-item i {
    font-size: 0.625rem;
    opacity: 0.7;
}

/* --- Vue Component Styles --- */

.assistant-message-content {
    width: 100%;
}

/* --- Error State for Assistant Messages --- */
.message-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    color: #dc2626;
    font-size: 0.875rem;
}
.message-error i {
    flex-shrink: 0;
}

/* --- Assistant Message Meta Row --- */
.assistant-message-meta {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
}

.meta-info {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.meta-info i {
    font-size: 0.625rem;
    opacity: 0.6;
}

.meta-model,
.meta-timestamp,
.meta-credits {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Code Response variant */
.code-response .assistant-message-meta {
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .meta-info {
        font-size: 0.6875rem;
    }
}

/* --- Image Error Fallback --- */
.image-error-fallback {
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
}
.image-error-fallback i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    color: #f59e0b;
}

/* --- Video Play Overlay --- */
.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background 0.2s ease;
}
.video-play-overlay:hover {
    background: rgba(0, 0, 0, 0.4);
}
.video-play-overlay i {
    font-size: 2.5rem;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* --- User Message Wrapper --- */
.user-message-wrapper {
    padding: 0;
}

/* Column wrapper for user message: bubble + copy below */
.user-message-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: clamp(18rem, 70%, 40rem);
}

.user-attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    color: #3b82f6;
    margin-bottom: 0.5rem;
}
.user-attachment-chip i {
    font-size: 0.6875rem;
}
.attachment-file-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-copy-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.375rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.user-message-wrapper:hover .user-copy-actions {
    opacity: 1;
}

.copy-feedback {
    font-size: 0.625rem;
    color: #22c55e;
    font-weight: 500;
}

/* --- Media Info Credits --- */
.media-info-credits {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* --- Status Text (loading states) --- */
.status-text {
    font-size: 0.8125rem;
    color: #64748b;
    font-style: italic;
}

/* --- Callout Blocks (from useMarkdown.ts) --- */
.callout {
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.callout-note,
.callout-tip {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}
.callout-note i,
.callout-tip i {
    color: #3b82f6;
    font-size: 1.25rem;
    margin-top: 0.125rem;
}
.callout-warning,
.callout-caution {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}
.callout-warning i,
.callout-caution i {
    color: #f59e0b;
    font-size: 1.25rem;
    margin-top: 0.125rem;
}
.callout-important {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
}
.callout-important i {
    color: #ef4444;
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

/* --- Markdown Blockquote (from useMarkdown.ts) --- */
.markdown-blockquote {
    border-left: 4px solid #3b82f6;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    color: #4b5563;
    background: #eff6ff;
    border-radius: 0 0.375rem 0.375rem 0;
}

/* --- Ordered List Items (from useMarkdown.ts) --- */
.markdown-oli {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #374151;
    padding-left: 1.75rem;
    position: relative;
    counter-increment: list-counter;
}
.markdown-oli:before {
    content: counter(list-counter) '.';
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: 600;
    min-width: 1.5rem;
}


/* =============================================================
   MOBILE RESPONSIVE OVERRIDES — GLOBAL
   Consolidated mobile-first fixes for components lacking
   proper breakpoints. Touch targets, overflow, layout stacking.
   ============================================================= */

/* --- Model Menu: Fit to viewport on mobile --- */
@media (max-width: 768px) {
    .model-menu {
        width: 95vw !important;
        max-width: 95vw !important;
        left: 2.5vw !important;
        right: 2.5vw !important;
        max-height: 70vh;
    }
    .model-overlay .model-menu {
        width: 95vw !important;
        max-width: 95vw !important;
        max-height: 75vh;
    }
}

/* --- Quick Actions Bar: Stack & enlarge on mobile --- */
@media (max-width: 768px) {
    .quick-actions-bar {
        flex-wrap: wrap;
        gap: 6px;
        padding: 6px 8px;
    }
    .quick-actions-bar .action-group {
        flex-wrap: wrap;
        gap: 4px;
    }
    .quick-actions-bar .action-divider {
        display: none;
    }
    .quick-actions-bar select {
        font-size: 13px;
        height: 36px;
        min-width: 100px;
        padding: 4px 24px 4px 8px;
        background-size: 12px;
        background-position: right 6px center;
    }
    .quick-actions-bar .action-label {
        font-size: 12px;
    }
}
@media (max-width: 480px) {
    .quick-actions-bar .action-group {
        width: 100%;
    }
    .quick-actions-bar select {
        width: 100%;
        min-width: unset;
    }
}

/* --- Touch Target Minimums (44px) for interactive elements --- */
@media (max-width: 1024px) {
    .btn-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px;
        min-height: 36px;
    }
    .back-btn {
        font-size: 13px;
        padding: 8px 14px;
        min-height: 36px;
    }
    .back-btn i {
        font-size: 12px;
    }
}
@media (max-width: 768px) {
    .btn-icon {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px;
        min-height: 40px;
    }
    body.admin-theme .btn-admin.btn-sm.icon-only {
        width: 40px !important;
        height: 40px !important;
    }
}

/* --- Tables: Allow horizontal scroll instead of clipping --- */
.admin-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 768px) {
    .admin-table {
        min-width: 600px;
    }
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* --- Resolution Menu: Constrain on mobile --- */
@media (max-width: 480px) {
    .resolution-menu {
        width: calc(100vw - 2rem) !important;
        max-width: 280px;
        left: 1rem !important;
        right: 1rem !important;
    }
}

/* --- Admin Pagination: Wrap on mobile --- */
@media (max-width: 768px) {
    .admin-pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
        text-align: center;
    }
}

/* --- Ticket Detail Grid: Tablet intermediate breakpoint --- */
@media (max-width: 1024px) and (min-width: 769px) {
    .ticket-detail-grid {
        grid-template-columns: 1fr 260px;
    }
}

/* --- Price & Section Titles: Reduce on small phones --- */
@media (max-width: 480px) {
    .price-big {
        font-size: 2rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
}

/* --- Audio Player: Safe min-width --- */
@media (max-width: 480px) {
    .audio-player-card {
        min-width: min(320px, 100%);
    }
}

/* --- Usage Filters: Full width on phone --- */
@media (max-width: 480px) {
    .usage-filters .filter-group {
        min-width: 100%;
        flex-basis: 100%;
    }
}

/* --- Chat History Context Menu: Contain to viewport --- */
@media (max-width: 768px) {
    .chat-history-menu {
        max-width: calc(100vw - 2rem);
    }
}

/* --- Plan Overview: Better tablet handling --- */
@media (max-width: 1024px) and (min-width: 769px) {
    .plan-overview {
        gap: 1rem;
    }
}

/* --- Admin Filters Grid: Force single column on small phones --- */
@media (max-width: 480px) {
    .admin-filters-grid {
        grid-template-columns: 1fr !important;
    }
}


/* =============================================================
   COMPREHENSIVE MOBILE RESPONSIVE SYSTEM
   Complete mobile optimization for all user-facing pages:
   - Mobile hamburger menu navigation
   - Responsive pricing grid
   - Modal viewport safety
   - Table responsive cards
   - Dashboard mobile layout
   - Footer mobile stacking
   - Support ticket pages
   - Organization pages
   - Payment/checkout pages
   - Touch target enforcement
   - Typography scaling
   - Safe viewport handling
   ============================================================= */

/* ── Mobile Hamburger Menu ─────────────────────────────────── */
.mobile-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: var(--gray-700);
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-hamburger:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.mobile-nav-menu {
    display: none;
    flex-direction: column;
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 0.5rem 1rem 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.mobile-nav-link {
    display: block;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background: var(--gray-50);
    color: var(--primary);
    text-decoration: none;
}

.mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
}

.mobile-nav-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.75rem 1rem !important;
    font-size: 0.9375rem !important;
    min-height: 48px;
}

/* Mobile menu transitions */
.mobile-menu-enter { transition: all 0.2s ease-out; }
.mobile-menu-enter-start { opacity: 0; transform: translateY(-8px); }
.mobile-menu-enter-end { opacity: 1; transform: translateY(0); }
.mobile-menu-leave { transition: all 0.15s ease-in; }
.mobile-menu-leave-start { opacity: 1; transform: translateY(0); }
.mobile-menu-leave-end { opacity: 0; transform: translateY(-8px); }

/* ── Pricing Grid Responsive Classes ───────────────────────── */
/* Custom responsive grid since Tailwind isn't fully available */
/* Default: 1 column from grid-cols-1 */
/* 640px+: 2 columns */
@media (min-width: 640px) {
    .sm-grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
/* 1024px+: 4 columns */
@media (min-width: 1024px) {
    .lg-grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

/* ── Mobile Breakpoint: 768px and below ────────────────────── */
@media (max-width: 768px) {

    /* --- Show hamburger, hide desktop nav --- */
    .mobile-hamburger {
        display: flex;
    }

    .nav-links {
        display: none !important;
    }

    .nav-actions {
        display: none !important;
    }

    .mobile-nav-menu {
        display: flex;
    }

    /* --- Navigation height reduction --- */
    .nav {
        height: 56px;
        padding: 0 0.75rem;
    }

    .header {
        position: sticky;
        top: 0;
        z-index: 100;
    }

    /* --- Logo sizing for mobile --- */
    .logo {
        padding: 0.25rem 0.5rem;
        margin-left: 0;
    }

    /* --- Pricing grid: 1 column on mobile --- */
    .grid.grid-cols-1.sm-grid-cols-2.lg-grid-cols-4,
    .grid.grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    /* --- Footer: single column --- */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .footer {
        padding: 1.5rem 1rem 0;
    }

    .footer-bottom {
        padding: 0.75rem 0;
    }

    .footer-bottom p {
        font-size: 0.6875rem;
        line-height: 1.5;
    }

    /* --- Hero section mobile --- */
    .hero {
        padding: 1.5rem 1rem 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.25;
    }

    .hero-description {
        font-size: 0.9375rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 0.625rem;
        align-items: stretch;
    }

    .hero-actions .btn,
    .hero-actions .btn-primary,
    .hero-actions .btn-featured {
        width: 100%;
        text-align: center;
    }

    /* --- Section spacing mobile --- */
    .section {
        padding: 1.25rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-description {
        font-size: 0.9375rem;
    }

    /* --- Grid responsive overrides --- */
    .grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    .grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    /* --- Container padding --- */
    .container {
        padding: 0 1rem;
    }

    .container-compact {
        padding: 1rem;
    }

    /* --- Tables: horizontal scroll + card patterns --- */
    table {
        font-size: 0.8125rem;
    }

    th, td {
        padding: 0.625rem 0.5rem;
    }

    /* --- Modal viewport safety --- */
    .fixed.inset-0 > .relative {
        margin: 1rem;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }

    /* --- Form adjustments --- */
    .form-row-2col {
        flex-direction: column;
        gap: 0;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* --- Auth card mobile --- */
    .auth-card {
        padding: 1.5rem;
        max-width: 100%;
        margin: 0 0.5rem;
    }

    .auth-card-wide {
        padding: 1.25rem;
        max-width: 100%;
        margin: 0 0.5rem;
    }

    /* --- Button mobile sizes --- */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    /* --- Pricing cards mobile --- */
    .pricing-card {
        margin-bottom: 0;
    }

    /* --- Compare table scroll indicator --- */
    .pricing-table {
        font-size: 0.8125rem;
    }

    .pricing-table th,
    .pricing-table td {
        padding: 0.625rem 0.5rem;
        font-size: 0.75rem;
    }

    /* --- Stats grid mobile --- */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .billing-stats-grid,
    .support-stats-grid {
        grid-template-columns: 1fr;
    }

    /* --- Page header mobile --- */
    .page-header-compact {
        flex-direction: column;
        gap: 0.75rem;
    }

    .page-header-compact h1 {
        font-size: 1.375rem;
    }

    /* --- Card mobile padding --- */
    .card {
        padding: 1rem;
    }

    .settings-card-body {
        padding: 1rem;
    }

    .settings-card-header {
        padding: 0.75rem 1rem;
    }

    /* --- Quick actions --- */
    .quick-actions-bar {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* --- FAQ page mobile --- */
    .faq-page-hero__title {
        font-size: 1.375rem;
    }

    .faq-page-category__header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .faq-page-accordion__trigger {
        padding: 0.875rem 1rem;
    }

    .faq-page-nav__links {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    /* --- CTA section mobile --- */
    .cta-section {
        padding: 1.5rem 1rem;
    }

    .cta-title {
        font-size: 1.375rem;
    }

    /* --- Organization pages --- */
    /* Org dashboard responsive grids already uses Tailwind md: classes */
    /* Ensure the org create slug input wraps properly */
    .flex.items-center > span + input {
        min-width: 0;
    }

    /* --- Org member table responsive styling --- */
    .min-w-\[700px\] {
        min-width: 600px;
    }

    /* --- Org show 5-column grid fix --- */
    /* Tailwind md:grid-cols-5 is too aggressive for tablets */
}

/* ── Tablet Breakpoint: 1024px ─────────────────────────────── */
@media (max-width: 1024px) {

    /* --- Pricing grid: 2 columns on tablet --- */
    .grid.grid-cols-1.sm-grid-cols-2.lg-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* --- Footer: 2 columns on tablet --- */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- Container compact --- */
    .container-compact {
        padding: 1.25rem;
    }
}

/* ── Small Phone Breakpoint: 480px ─────────────────────────── */
@media (max-width: 480px) {

    /* --- Pricing grid: 1 column on small phones --- */
    .grid.grid-cols-1.sm-grid-cols-2.lg-grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    /* --- Very small nav --- */
    .nav {
        height: 50px;
    }

    /* --- Smaller typography --- */
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.125rem; }

    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    /* --- Cards tighter padding --- */
    .card {
        padding: 0.875rem;
    }

    .auth-card,
    .auth-card-wide {
        padding: 1rem;
    }

    /* --- Button full-width on small phones --- */
    .btn-primary-sm,
    .btn-secondary-sm {
        font-size: 0.8125rem;
        padding: 0.4375rem 0.875rem;
    }

    /* --- Container padding reduction --- */
    .container {
        padding: 0 0.75rem;
    }

    /* --- Table smaller text --- */
    table {
        font-size: 0.75rem;
    }

    th, td {
        padding: 0.5rem 0.375rem;
    }

    /* --- Stats grid single column --- */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* --- Footer spacing --- */
    .footer {
        padding: 1rem 0.75rem 0;
    }

    /* --- Price display --- */
    .price-big {
        font-size: 1.75rem;
    }

    /* --- Smaller stat values --- */
    .stat-value {
        font-size: 1.25rem;
    }

    /* --- Modal top position adjustment --- */
    .fixed.inset-0 > .relative.top-20 {
        top: 0.5rem;
    }
}

/* ── Extra Small: 375px and below ──────────────────────────── */
@media (max-width: 375px) {
    .nav {
        height: 48px;
    }

    .logo-img {
        height: 22px;
    }

    .hero-title {
        font-size: 1.375rem;
    }

    .container {
        padding: 0 0.625rem;
    }

    /* --- Force everything to single column --- */
    .grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── Universal Mobile Modal Safety ─────────────────────────── */
/* All modals: prevent viewport overflow on any screen */
@media (max-width: 768px) {
    /* Ensure modal inner containers are viewport-safe */
    .w-full.max-w-md {
        max-width: calc(100vw - 2rem);
    }

    .w-full.max-w-sm {
        max-width: calc(100vw - 2rem);
    }

    .w-full.max-w-lg {
        max-width: calc(100vw - 2rem);
    }

    /* Modals with top-20 positioning */
    .relative.top-20 {
        top: 1rem;
        margin-left: auto;
        margin-right: auto;
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
}

/* ── Dashboard Page (Standalone HTML) Mobile ───────────────── */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 0.75rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .dashboard-main {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .dashboard-container {
        padding: 0.5rem;
    }
}

/* ── Payment Pages Mobile ──────────────────────────────────── */
@media (max-width: 768px) {
    /* Checkout form grids */
    .form-grid-3 {
        grid-template-columns: 1fr !important;
    }

    .form-grid-2 {
        grid-template-columns: 1fr !important;
    }

    /* span-2 collapse on mobile */
    [style*="grid-column: span 2"] {
        grid-column: span 1 !important;
    }

    /* Stats grid collapse */
    .stats-grid-3 {
        grid-template-columns: 1fr !important;
    }

    .stats-grid-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .stats-grid-4 {
        grid-template-columns: 1fr !important;
    }
}

/* ── Support Ticket Pages Enhancements ─────────────────────── */
@media (max-width: 768px) {
    /* Ticket detail sidebar collapse */
    .ticket-detail-grid {
        grid-template-columns: 1fr !important;
    }

    /* Ticket header wrap */
    .ticket-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
}

/* ── Receipt Pages Mobile ──────────────────────────────────── */
@media (max-width: 768px) {
    /* Receipt show page */
    .grid.grid-cols-2 {
        grid-template-columns: 1fr;
    }

    /* Receipt header actions */
    .flex.items-center.justify-between {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* ── Org Pages Mobile Enhancements ─────────────────────────── */
@media (max-width: 768px) {
    /* Org create slug input wrapping */
    .flex.items-center:has(> span:first-child + input) {
        flex-wrap: wrap;
    }

    /* Org audit logs table */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }

    /* Org member-usage table */
    .min-w-full {
        min-width: 100%;
    }
}

/* ── Cookie Consent Mobile Fixes ───────────────────────────── */
@media (max-width: 640px) {
    .cookie-consent-banner {
        padding: 1rem;
    }

    .cookie-consent-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cookie-consent-buttons button {
        width: 100%;
    }
}

/* ── FAQ Chatbot Widget Mobile ─────────────────────────────── */
@media (max-width: 768px) {
    .faq-chatbot-window {
        width: calc(100vw - 2rem) !important;
        max-width: 100% !important;
        right: 1rem !important;
        bottom: 80px !important;
        max-height: 60vh !important;
    }

    .faq-chatbot-toggle {
        width: 48px;
        height: 48px;
        bottom: 1rem;
        right: 1rem;
    }
}

/* ── Touch Target Enforcement ──────────────────────────────── */
/* Ensure all interactive elements meet 44px minimum touch target */
@media (max-width: 768px) {
    a.nav-link,
    .mobile-nav-link,
    .mobile-nav-btn,
    button[type="submit"],
    .btn,
    .btn-sm,
    .btn-primary-sm,
    .btn-secondary-sm {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Table action buttons */
    td .btn-sm,
    td a.btn {
        min-height: 36px;
        padding: 0.375rem 0.625rem;
    }

    /* Form inputs */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="date"],
    textarea,
    select,
    .form-input {
        min-height: 44px;
        font-size: 16px; /* Prevent iOS zoom on focus */
    }

    /* Checkboxes and radio buttons */
    input[type="checkbox"],
    input[type="radio"] {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* ── Prevent Horizontal Overflow ───────────────────────────── */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Images should never overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Pre/code blocks should scroll, not overflow */
pre, code {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
}

/* ── Viewport Meta Safety ──────────────────────────────────── */
/* Prevent text from being too small on mobile */
@media (max-width: 768px) {
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
}

/* ── Print Safety (ensures mobile layouts don't break print) ─ */
@media print {
    .mobile-hamburger,
    .mobile-nav-menu,
    .faq-chatbot-toggle,
    .faq-chatbot-window,
    .cookie-consent-banner {
        display: none !important;
    }
}

/* ── Org Activation Progress Stepper Mobile ────────────────── */
@media (max-width: 768px) {
    /* Progress stepper connector lines - shorter on mobile */
    .w-16.h-1 {
        width: 1.5rem !important;
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
    }

    /* Progress step circles smaller on mobile */
    .w-10.h-10.rounded-full {
        width: 2rem !important;
        height: 2rem !important;
        font-size: 0.75rem;
    }

    /* Step labels smaller */
    .ml-2.text-sm.font-medium {
        font-size: 0.6875rem;
        margin-left: 0.25rem;
    }
}

@media (max-width: 480px) {
    /* Hide step labels on very small phones, show icon only */
    .flex.items-center > .ml-2.text-sm.font-medium {
        display: none;
    }

    .w-16.h-1 {
        width: 1rem !important;
        margin-left: 0.25rem !important;
        margin-right: 0.25rem !important;
    }
}

/* ── Org Create Slug Input Mobile ──────────────────────────── */
@media (max-width: 640px) {
    .flex.items-center > span:first-child {
        font-size: 0.75rem;
        word-break: break-all;
    }
}

/* ── User Layout Header Mobile ─────────────────────────────── */
@media (max-width: 480px) {
    .header .nav-actions .btn-primary-sm {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }
}

/* ── Pricing Card Mobile Enhancements ──────────────────────── */
@media (max-width: 768px) {
    /* Plan featured label position fix */
    .pricing-card .absolute {
        position: absolute;
    }

    /* Pricing card internal spacing */
    .pricing-card {
        padding: 1.25rem;
    }
}

/* ── Contact Page Mobile ───────────────────────────────────── */
@media (max-width: 480px) {
    .contact-wrapper {
        padding: 0.75rem;
    }
}

/* ── Feature Cards Grid Mobile ─────────────────────────────── */
@media (max-width: 768px) {
    .feature-card {
        padding: 1.25rem;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
    }

    .feature-icon svg {
        width: 20px;
        height: 20px;
    }

    .feature-title {
        font-size: 1rem;
    }
}

/* ── AI Models Page Sidebar Mobile Enhancements ────────────── */
@media (max-width: 768px) {
    .models-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ── Responsive Table-to-Card Pattern (reusable) ──────────── */
/* Add class "responsive-table" to any table element for 
   automatic card-style display on mobile */
@media (max-width: 768px) {
    table.responsive-table thead {
        display: none;
    }

    table.responsive-table tbody tr {
        display: block;
        padding: 0.75rem;
        margin-bottom: 0.5rem;
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-md);
        background: white;
    }

    table.responsive-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.375rem 0;
        border-bottom: 1px solid var(--gray-100);
        font-size: 0.8125rem;
    }

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

    table.responsive-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-600);
        font-size: 0.75rem;
        text-transform: uppercase;
        min-width: 40%;
    }
}

/* ── Safe Area Insets (for notched phones) ──────────────────── */
@supports (padding: env(safe-area-inset-bottom)) {
    .footer {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-nav-menu {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .chat-input-area {
        padding-bottom: calc(0.125rem + env(safe-area-inset-bottom));
    }
}

/* ── Landscape Phone Handling ──────────────────────────────── */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 1rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .nav {
        height: 48px;
    }

    /* Modals in landscape */
    .relative.top-20 {
        top: 0.5rem;
        max-height: calc(100vh - 1rem);
    }
}

/* ========================================
   LEGAL PAGES STYLES
   ======================================== */
.legal-hero { background: linear-gradient(135deg, rgba(233, 213, 255, 0.5) 0%, rgba(199, 210, 254, 0.5) 100%), #ffffff; padding: 2.5rem 0 2rem; text-align: center; }
.legal-hero h1 { color: var(--gray-900); font-family: var(--font-sans); font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.legal-hero p { color: var(--gray-600); font-size: 1rem; font-family: var(--font-sans); }
.legal-hero-meta { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem; padding: 0.4rem 1rem; background: rgba(99, 102, 241, 0.1); border-radius: 100px; color: var(--gray-600); font-size: 0.8rem; font-family: var(--font-sans); }

.legal-wrap { max-width: 820px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.legal-nav { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem 2rem; margin-bottom: 3rem; }
.legal-nav h3 { font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-500); margin-bottom: 1rem; }
.legal-nav ol { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 2rem; }
.legal-nav ol li { margin-bottom: 0.35rem; }
.legal-nav ol li a { font-family: var(--font-sans); font-size: 0.85rem; color: var(--primary); text-decoration: none; transition: color 0.15s; }
.legal-nav ol li a:hover { color: var(--primary-dark); text-decoration: underline; }

.legal-section { margin-bottom: 3rem; scroll-margin-top: 100px; }
.legal-section h2 { font-family: var(--font-sans); font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 2px solid var(--gray-100); letter-spacing: -0.01em; }
.legal-section h3 { font-family: var(--font-sans); font-size: 1.1rem; font-weight: 600; color: var(--gray-800); margin: 1.5rem 0 0.75rem; }
.legal-section p, .legal-section li { font-family: var(--font-sans); font-size: 0.938rem; color: var(--gray-700); line-height: 1.75; }
.legal-section ul, .legal-section ol { padding-left: 1.5rem; margin: 0.75rem 0; }
.legal-section ul li, .legal-section ol li { margin-bottom: 0.5rem; }
.legal-section ul { list-style: disc; }
.legal-section ol { list-style: decimal; }
.legal-section a { color: var(--primary); text-decoration: none; }
.legal-section a:hover { text-decoration: underline; }

.legal-callout { background: var(--gray-50); border-left: 4px solid var(--primary); border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: 1.25rem 1.5rem; margin: 1.25rem 0; }
.legal-callout p { margin: 0; color: var(--gray-700); }
.legal-callout-warn { background: #fef3c7; border-left-color: var(--warning); }
.legal-callout-warn p { color: #92400e; }
.legal-callout-danger { background: #fef2f2; border-left-color: var(--error); }
.legal-callout-danger p { color: #991b1b; }

.legal-contact { background: linear-gradient(135deg, var(--gray-50), #eef2ff); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 2rem; text-align: center; margin-top: 3rem; }
.legal-contact h3 { font-family: var(--font-sans); font-size: 1.15rem; font-weight: 600; color: var(--gray-900); margin-bottom: 0.5rem; }
.legal-contact p { font-family: var(--font-sans); font-size: 0.9rem; color: var(--gray-600); margin-bottom: 0.25rem; }
.legal-contact a { color: var(--primary); font-weight: 500; text-decoration: none; }
.legal-contact a:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .legal-hero h1 { font-size: 1.75rem; }
    .legal-nav ol { columns: 1; }
    .legal-wrap { padding: 2rem 1rem 3rem; }
}

/* ========================================
   CONTACT PAGE STYLES
   ======================================== */
.contact-hero { background: linear-gradient(135deg, rgba(233, 213, 255, 0.5) 0%, rgba(199, 210, 254, 0.5) 100%), #ffffff; padding: 3rem 0 2.5rem; text-align: center; }
.contact-hero h1 { color: var(--gray-900); font-family: var(--font-sans); font-size: 2.25rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.contact-hero p { color: var(--gray-600); font-size: 1.05rem; font-family: var(--font-sans); max-width: 480px; margin: 0 auto; line-height: 1.6; }

.contact-wrap { max-width: 760px; margin: 0 auto; padding: 3.5rem 1.5rem 5rem; }
.contact-grid { max-width: 420px; margin: 0 auto; }

.contact-card { background: #ffffff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 2.25rem 2rem; transition: box-shadow 0.2s ease; }
.contact-card:hover { box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1); }

.contact-card-icon { width: 48px; height: 48px; background: linear-gradient(135deg, rgba(233, 213, 255, 0.6), rgba(199, 210, 254, 0.6)); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.contact-card-icon i { font-size: 1.2rem; color: var(--primary); }

.contact-card h2 { font-family: var(--font-sans); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-500); margin-bottom: 0.6rem; }
.contact-card .contact-value { font-family: var(--font-sans); font-size: 0.9rem; font-weight: 600; color: var(--gray-900); line-height: 1.5; margin-bottom: 0.5rem; }
.contact-card .contact-value a { color: var(--primary); text-decoration: none; font-weight: 600; }
.contact-card .contact-value a:hover { text-decoration: underline; color: var(--primary-dark); }
.contact-card .contact-note { font-family: var(--font-sans); font-size: 0.85rem; color: var(--gray-500); line-height: 1.5; }

.contact-divider { border: none; border-top: 1px solid var(--gray-100); margin: 2.5rem 0; }

.contact-footer-note { text-align: center; font-family: var(--font-sans); font-size: 0.875rem; color: var(--gray-500); line-height: 1.7; }
.contact-footer-note a { color: var(--primary); text-decoration: none; }
.contact-footer-note a:hover { text-decoration: underline; }

@media (max-width: 600px) {
    .contact-hero h1 { font-size: 1.75rem; }
    .contact-wrap { padding: 2rem 1rem 3.5rem; }
}

/* ========================================
   LAUNCHING SOON MODAL
   ======================================== */
.launch-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.launch-modal-overlay.active {
    display: flex;
}

.launch-modal {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.launch-modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: white;
}

.launch-modal h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.launch-modal p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.launch-modal .btn-close-modal {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: white;
    padding: 0.75rem 2rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.launch-modal .btn-close-modal:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* ========================================
   PRIVACY PAGE — Hero Badges & Tables
   ======================================== */
.legal-hero-badges { display: flex; justify-content: center; gap: 0.75rem; margin-top: 1rem; flex-wrap: wrap; }
.legal-hero-badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.3rem 0.75rem; background: rgba(99, 102, 241, 0.1); border-radius: 100px; color: var(--primary-dark); font-size: 0.72rem; font-family: var(--font-sans); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }

.legal-table-wrap { overflow-x: auto; margin: 1rem 0; }
.legal-table { width: 100%; border-collapse: collapse; font-family: var(--font-sans); font-size: 0.875rem; }
.legal-table th { background: var(--gray-100); text-align: left; padding: 0.75rem 1rem; font-weight: 600; color: var(--gray-800); border-bottom: 2px solid var(--gray-200); }
.legal-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); vertical-align: top; }
.legal-table tr:hover td { background: var(--gray-50); }

.legal-callout-info { background: #eff6ff; border-left-color: var(--info); }
.legal-callout-info p { color: #1e40af; }

@media (max-width: 640px) {
    .legal-table { font-size: 0.78rem; }
}

/* ========================================
   USAGE POLICY — Rule Cards
   ======================================== */
.rule-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem 2rem; margin: 1.25rem 0; transition: border-color 0.2s, box-shadow 0.2s; }
.rule-card:hover { border-color: var(--primary-light); box-shadow: 0 2px 12px rgba(99, 102, 241, 0.08); }
.rule-card-header { display: flex; align-items: start; gap: 0.75rem; margin-bottom: 0.75rem; }
.rule-card-icon { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.9rem; }
.rule-card-icon.red { background: #fef2f2; color: #dc2626; }
.rule-card-icon.amber { background: #fef3c7; color: #d97706; }
.rule-card-icon.blue { background: #eff6ff; color: #2563eb; }
.rule-card-icon.green { background: #f0fdf4; color: #16a34a; }
.rule-card-title { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 600; color: var(--gray-900); line-height: 1.3; padding-top: 0.35rem; }
.rule-card p { font-family: var(--font-sans); font-size: 0.9rem; color: var(--gray-600); line-height: 1.7; margin: 0 0 0.5rem; }
.rule-card ul { padding-left: 1.25rem; margin: 0.5rem 0 0; }
.rule-card ul li { font-family: var(--font-sans); font-size: 0.85rem; color: var(--gray-600); line-height: 1.6; margin-bottom: 0.3rem; list-style: disc; }

/* ========================================
   USER SAFETY POLICY — Pillars & Timeline
   ======================================== */
.safety-pillar { display: flex; gap: 1rem; align-items: start; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 1.5rem; margin: 1rem 0; }
.safety-pillar-icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem; background: #eef2ff; color: var(--primary); }
.safety-pillar h4 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; color: var(--gray-900); margin-bottom: 0.35rem; }
.safety-pillar p { font-family: var(--font-sans); font-size: 0.875rem; color: var(--gray-600); line-height: 1.65; margin: 0; }

.timeline-item { position: relative; padding-left: 2rem; margin-bottom: 1.5rem; }
.timeline-item::before { content: ''; position: absolute; left: 0; top: 0.35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline-item::after { content: ''; position: absolute; left: 4px; top: 1rem; width: 2px; height: calc(100% + 0.5rem); background: var(--gray-200); }
.timeline-item:last-child::after { display: none; }
.timeline-item h4 { font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600; color: var(--gray-800); margin-bottom: 0.25rem; }
.timeline-item p { font-family: var(--font-sans); font-size: 0.875rem; color: var(--gray-600); line-height: 1.65; margin: 0; }

@media (max-width: 640px) {
    .safety-pillar { flex-direction: column; gap: 0.75rem; }
}

/* ========================================
   X-CLOAK for Alpine.js
   ======================================== */
[x-cloak] { display: none !important; }
