/* ============================================================
   Infowise Platform - Complete Stylesheet
   ============================================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary: #7c3aed;
    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --info: #0891b2;
    --dark: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 64px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --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);
    --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.5;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }

/* ============================================================
   PUBLIC NAVBAR & FOOTER
   ============================================================ */

.navbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem; height: 64px;
    background: white; border-bottom: 1px solid var(--gray-200);
    position: sticky; top: 0; z-index: 100;
}

.nav-brand { display: flex; align-items: center; gap: 0.5rem; font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.nav-brand i { font-size: 1.5rem; }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { color: var(--gray-600); font-weight: 500; transition: var(--transition); }
.nav-links a:hover { color: var(--primary); }

.public-main { min-height: calc(100vh - 64px - 200px); }

.public-footer { background: var(--gray-900); color: white; padding: 3rem 2rem; text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.footer-brand i { color: var(--primary); }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin: 1.5rem 0; }
.footer-links a { color: var(--gray-400); transition: var(--transition); }
.footer-links a:hover { color: white; }
.copyright { color: var(--gray-500); font-size: 0.875rem; }

/* ============================================================
   SIDEBAR (APP LAYOUT)
   ============================================================ */

.app-layout { display: flex; }

.sidebar {
    width: var(--sidebar-width); height: 100vh;
    background: var(--gray-900); color: white;
    position: fixed; left: 0; top: 0;
    display: flex; flex-direction: column;
    transition: var(--transition); z-index: 100;
    overflow-y: auto;
}

.sidebar-brand { padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.logo { display: flex; align-items: center; gap: 0.75rem; font-size: 1.125rem; font-weight: 700; }
.logo i { color: var(--primary); font-size: 1.5rem; }

.sidebar-nav { flex: 1; padding: 1rem 0.75rem; }

.nav-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.625rem 1rem; margin: 0.25rem 0.5rem;
    border-radius: var(--radius);
    color: var(--gray-400); font-size: 0.875rem; font-weight: 500;
    transition: var(--transition); position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: white; }
.nav-item.active { background: var(--primary); color: white; }
.nav-item i { width: 20px; text-align: center; }

.nav-section-title {
    padding: 1rem 1.25rem 0.5rem; font-size: 0.6875rem;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--gray-500); font-weight: 600;
}

.badge-ai {
    margin-left: auto; background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white; font-size: 0.625rem; padding: 0.125rem 0.5rem;
    border-radius: 100px; font-weight: 700;
}

.sidebar-footer { padding: 1rem; border-top: 1px solid rgba(255,255,255,0.1); }

.ai-usage-mini { margin-bottom: 1rem; padding: 0.75rem; background: rgba(255,255,255,0.05); border-radius: var(--radius); }
.ai-usage-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--gray-400); margin-bottom: 0.5rem; }
.ai-usage-label i { color: #fbbf24; }
.ai-usage-bar { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
.ai-usage-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #60a5fa); border-radius: 2px; transition: width 0.3s; }
.ai-usage-text { font-size: 0.6875rem; color: var(--gray-500); margin-top: 0.375rem; }

.user-menu { display: flex; align-items: center; gap: 0.75rem; position: relative; cursor: pointer; padding: 0.5rem; border-radius: var(--radius); transition: var(--transition); user-select: none; }
.user-menu:hover { background: rgba(255,255,255,0.05); }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tier-badge { font-size: 0.625rem; padding: 0.125rem 0.375rem; border-radius: 4px; font-weight: 600; }
.tier-free { background: var(--gray-700); color: var(--gray-400); }
.tier-basic { background: #065f46; color: #6ee7b7; }
.tier-pro { background: var(--primary); color: white; }
.tier-enterprise { background: linear-gradient(135deg, var(--secondary), #db2777); color: white; }
.user-menu-chevron { font-size: 0.625rem; color: var(--gray-500); transition: transform 0.2s ease; margin-left: auto; }
.user-menu.open .user-menu-chevron { transform: rotate(180deg); }

.user-dropdown { 
    display: none; 
    position: absolute; 
    bottom: calc(100% + 0.25rem); 
    left: 0; 
    right: 0; 
    background: var(--gray-800); 
    border: 1px solid rgba(255,255,255,0.1); 
    border-radius: var(--radius); 
    padding: 0.5rem; 
    box-shadow: var(--shadow-lg); 
    animation: dropdownIn 0.2s ease;
    z-index: 200;
}
.user-dropdown a { display: block; padding: 0.5rem; font-size: 0.8125rem; color: var(--gray-300); border-radius: var(--radius); }
.user-dropdown a:hover { background: rgba(255,255,255,0.05); color: white; }
.user-dropdown hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 0.5rem 0; }
.user-dropdown .logout-link { color: var(--danger); }
.user-menu.open .user-dropdown { display: block; }

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

/* ============================================================
   MAIN CONTENT
   ============================================================ */

.main-content {
    flex: 1; margin-left: var(--sidebar-width);
    padding: 1.5rem 2rem; min-height: 100vh;
}

.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem;
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); }
.page-actions { display: flex; gap: 0.75rem; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.625rem 1.25rem; border-radius: var(--radius);
    font-size: 0.875rem; font-weight: 600; border: none;
    transition: var(--transition); cursor: pointer;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline { background: transparent; border: 1.5px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--gray-500); }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   CARDS
   ============================================================ */

.card {
    background: white; border-radius: var(--radius-lg);
    box-shadow: var(--shadow); border: 1px solid var(--gray-200);
    overflow: hidden;
}
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-100); display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 1rem; font-weight: 600; }
.card-body { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-100); background: var(--gray-50); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: white; border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.stat-label { font-size: 0.8125rem; color: var(--gray-500); margin-bottom: 0.5rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); }
.stat-change { font-size: 0.75rem; margin-top: 0.25rem; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ============================================================
   FORMS
   ============================================================ */

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--gray-700); margin-bottom: 0.375rem; }
.form-label .required { color: var(--danger); }
.form-control {
    width: 100%; padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--gray-200); border-radius: var(--radius);
    font-size: 0.875rem; transition: var(--transition); background: white;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-control::placeholder { color: var(--gray-400); }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { cursor: pointer; appearance: none; 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='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-position: right 0.5rem center; background-repeat: no-repeat; background-size: 1.5em; padding-right: 2.5rem; }
.form-text { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.25rem; }
.form-error { font-size: 0.75rem; color: var(--danger); margin-top: 0.25rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ============================================================
   ALERTS
   ============================================================ */

.alert {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.875rem 1rem; border-radius: var(--radius);
    font-size: 0.875rem; font-weight: 500; margin-bottom: 1rem;
}
.alert-success { background: var(--success-light); color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: var(--danger-light); color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-light); color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #cffafe; color: #155e75; border: 1px solid #a5f3fc; }

/* ============================================================
   TABLES
   ============================================================ */

.table-container { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 0.75rem 1rem; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; color: var(--gray-500); background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }
.table td { padding: 0.875rem 1rem; font-size: 0.875rem; border-bottom: 1px solid var(--gray-100); }
.table tr:hover td { background: var(--gray-50); }
.table .actions { display: flex; gap: 0.5rem; }
.table .actions a { color: var(--gray-400); padding: 0.25rem; border-radius: 4px; transition: var(--transition); }
.table .actions a:hover { color: var(--primary); background: var(--primary-light); }

.status-badge { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem; border-radius: 100px; font-size: 0.75rem; font-weight: 600; }
.status-draft { background: var(--gray-100); color: var(--gray-600); }
.status-published { background: var(--success-light); color: var(--success); }
.status-paused { background: var(--warning-light); color: #92400e; }
.status-closed { background: var(--danger-light); color: var(--danger); }

/* ============================================================
   SURVEY BUILDER
   ============================================================ */

.builder-container { display: grid; grid-template-columns: 280px 1fr 320px; gap: 1rem; height: calc(100vh - 120px); }
.question-palette { background: white; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); overflow-y: auto; }
.palette-title { padding: 1rem; font-weight: 600; font-size: 0.875rem; border-bottom: 1px solid var(--gray-100); }
.palette-items { padding: 0.5rem; }
.palette-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem; border-radius: var(--radius); cursor: pointer; transition: var(--transition); font-size: 0.8125rem; }
.palette-item:hover { background: var(--primary-light); color: var(--primary); }
.palette-item i { width: 20px; text-align: center; color: var(--gray-400); }
.palette-item:hover i { color: var(--primary); }

.builder-canvas { background: white; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); overflow-y: auto; padding: 1.5rem; }
.builder-canvas .empty-state { text-align: center; padding: 4rem 2rem; color: var(--gray-400); }
.builder-canvas .empty-state i { font-size: 3rem; margin-bottom: 1rem; }

.question-item {
    background: white; border: 1.5px solid var(--gray-200); border-radius: var(--radius-lg);
    margin-bottom: 0.75rem; padding: 1rem; transition: var(--transition);
}
.question-item:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.question-item.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.question-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.question-number { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; flex-shrink: 0; }
.question-type-badge { font-size: 0.6875rem; padding: 0.125rem 0.5rem; border-radius: 4px; background: var(--gray-100); color: var(--gray-500); text-transform: uppercase; }
.question-actions { margin-left: auto; display: flex; gap: 0.25rem; }
.question-actions button { background: none; border: none; padding: 0.25rem; color: var(--gray-400); border-radius: 4px; }
.question-actions button:hover { background: var(--gray-100); color: var(--danger); }

.question-body .q-label { font-weight: 500; margin-bottom: 0.5rem; }
.question-body .q-help { font-size: 0.8125rem; color: var(--gray-500); margin-bottom: 0.5rem; }

.option-list { display: flex; flex-direction: column; gap: 0.375rem; }
.option-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.option-item input[type="radio"], .option-item input[type="checkbox"] { margin: 0; }

.builder-sidebar { background: white; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); overflow-y: auto; padding: 1rem; }
.builder-sidebar h4 { font-size: 0.875rem; font-weight: 600; margin-bottom: 1rem; }

/* AI Generator Panel */
.ai-generator { background: linear-gradient(135deg, #1e1b4b, #312e81); border-radius: var(--radius-lg); padding: 1.25rem; color: white; margin-bottom: 1rem; }
.ai-generator h4 { font-size: 1rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.ai-generator h4 i { color: #fbbf24; }
.ai-generator p { font-size: 0.8125rem; color: #a5b4fc; margin-bottom: 1rem; }
.ai-generator textarea { width: 100%; padding: 0.75rem; border-radius: var(--radius); border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1); color: white; font-size: 0.8125rem; margin-bottom: 0.75rem; resize: vertical; min-height: 80px; }
.ai-generator textarea::placeholder { color: rgba(255,255,255,0.5); }
.ai-generator textarea:focus { outline: none; border-color: #818cf8; }
.ai-generate-btn { width: 100%; padding: 0.625rem; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; border: none; border-radius: var(--radius); font-weight: 600; cursor: pointer; transition: var(--transition); }
.ai-generate-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4); }
.ai-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.ai-generating { display: none; align-items: center; justify-content: center; gap: 0.5rem; }
.ai-generating .spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.8s linear infinite; }

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

/* ============================================================
   SURVEY RESPONSE PAGE
   ============================================================ */

.respond-container { max-width: 720px; margin: 2rem auto; padding: 0 1rem; }
.respond-header { text-align: center; margin-bottom: 2rem; }
.respond-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin-bottom: 0.5rem; }
.respond-header p { color: var(--gray-500); font-size: 0.9375rem; }
.respond-form .question-block { background: white; border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1rem; box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.respond-form .q-label { font-weight: 600; font-size: 1rem; margin-bottom: 0.375rem; }
.respond-form .q-required { color: var(--danger); }
.respond-form .q-help { color: var(--gray-500); font-size: 0.875rem; margin-bottom: 1rem; }
.respond-form .options label { display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem; border-radius: var(--radius); cursor: pointer; transition: var(--transition); margin-bottom: 0.25rem; }
.respond-form .options label:hover { background: var(--gray-50); }
.respond-form .options input { margin: 0; }
.respond-form .rating-options { display: flex; gap: 0.5rem; }
.respond-form .rating-options label { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--gray-200); display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 600; transition: var(--transition); }
.respond-form .rating-options label:hover, .respond-form .rating-options label.selected { background: var(--primary); border-color: var(--primary); color: white; }
.respond-form .nps-options { display: flex; gap: 0.25rem; }
.respond-form .nps-options label { flex: 1; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); border: 2px solid var(--gray-200); cursor: pointer; font-weight: 600; font-size: 0.8125rem; transition: var(--transition); }
.respond-form .nps-options label:hover, .respond-form .nps-options label.selected { background: var(--primary); border-color: var(--primary); color: white; }
.respond-form .likert-options { display: flex; justify-content: space-between; gap: 0.5rem; }
.respond-form .likert-options label { flex: 1; text-align: center; padding: 0.75rem 0.5rem; border-radius: var(--radius); border: 2px solid var(--gray-200); cursor: pointer; font-size: 0.8125rem; transition: var(--transition); }
.respond-form .likert-options label:hover, .respond-form .likert-options label.selected { background: var(--primary); border-color: var(--primary); color: white; }

.respond-footer { text-align: center; margin-top: 2rem; padding-bottom: 2rem; }
.respond-footer .powered-by { font-size: 0.75rem; color: var(--gray-400); }
.respond-footer .powered-by a { color: var(--primary); font-weight: 600; }

/* ============================================================
   HOME PAGE
   ============================================================ */

.hero { background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%); color: white; padding: 5rem 2rem; text-align: center; }
.hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.1; }
.hero h1 span { background: linear-gradient(90deg, #60a5fa, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.25rem; color: #a5b4fc; max-width: 600px; margin: 0 auto 2rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; }
.hero .btn-primary { background: white; color: var(--primary); font-size: 1rem; padding: 0.875rem 2rem; }
.hero .btn-primary:hover { background: var(--gray-100); }
.hero .btn-outline { border-color: rgba(255,255,255,0.3); color: white; font-size: 1rem; padding: 0.875rem 2rem; }
.hero .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: white; }

.features { padding: 4rem 2rem; max-width: 1200px; margin: 0 auto; }
.features h2 { text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 3rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.feature-card { background: white; border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--gray-200); transition: var(--transition); }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature-icon { width: 48px; height: 48px; border-radius: var(--radius); background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { color: var(--gray-500); font-size: 0.875rem; }

.ai-showcase { background: var(--gray-900); color: white; padding: 4rem 2rem; }
.ai-showcase-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.ai-showcase h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
.ai-showcase p { color: var(--gray-400); margin-bottom: 1.5rem; }
.ai-features-list { list-style: none; }
.ai-features-list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; color: #a5b4fc; }
.ai-features-list li i { color: #34d399; }
.ai-demo { background: rgba(255,255,255,0.05); border-radius: var(--radius-lg); padding: 1.5rem; border: 1px solid rgba(255,255,255,0.1); }
.ai-demo-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; color: #fbbf24; font-weight: 600; }
.ai-demo-content { font-family: monospace; font-size: 0.8125rem; color: #a5b4fc; line-height: 1.6; }
.ai-demo-content .prompt { color: #60a5fa; }
.ai-demo-content .response { color: #34d399; }

/* ============================================================
   PRICING PAGE
   ============================================================ */

.pricing-page { padding: 4rem 2rem; max-width: 1200px; margin: 0 auto; }
.pricing-header { text-align: center; margin-bottom: 3rem; }
.pricing-header h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.pricing-header p { color: var(--gray-500); font-size: 1.125rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.pricing-card { background: white; border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow); border: 2px solid var(--gray-200); transition: var(--transition); position: relative; }
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card.popular { border-color: var(--primary); }
.popular-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; padding: 0.25rem 1rem; border-radius: 100px; font-size: 0.75rem; font-weight: 600; }
.pricing-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.pricing-card .price { font-size: 2.5rem; font-weight: 800; color: var(--gray-900); margin-bottom: 0.25rem; }
.pricing-card .price span { font-size: 1rem; font-weight: 400; color: var(--gray-500); }
.pricing-card .description { color: var(--gray-500); font-size: 0.875rem; margin-bottom: 1.5rem; }
.pricing-features { list-style: none; margin-bottom: 1.5rem; }
.pricing-features li { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0; font-size: 0.875rem; }
.pricing-features li i { color: var(--success); font-size: 0.875rem; }
.pricing-features li.not-included { color: var(--gray-400); }
.pricing-features li.not-included i { color: var(--gray-300); }
.pricing-card .btn { width: 100%; }
.billing-toggle .save-badge { background: var(--success); color: white; font-size: 0.75rem; font-weight: 700; padding: 0.25rem 0.625rem; border-radius: 100px; margin-left: 0.25rem; }
.pricing-card .price-equivalent { font-size: 0.8125rem; color: var(--gray-500); margin-bottom: 0.75rem; }
.pricing-card .contact-sales { background: var(--gray-100); color: var(--gray-700); }

/* ============================================================
   AUTH PAGES
   ============================================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 15% 25%, rgba(37, 99, 235, 0.25) 0%, transparent 40%),
        radial-gradient(circle at 85% 75%, rgba(124, 58, 237, 0.25) 0%, transparent 40%),
        linear-gradient(135deg, #0f172a, #1e293b);
    padding: 2rem;
    position: relative;
}
.auth-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}
.auth-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    padding: 2.75rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 80px rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease;
}
.auth-card .auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-card .auth-logo i {
    font-size: 2.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-card .auth-logo h2 { font-size: 1.625rem; font-weight: 800; margin-top: 0.75rem; color: var(--gray-900); }
.auth-card .auth-logo p { color: var(--gray-500); font-size: 0.9375rem; margin-top: 0.375rem; }
.auth-card .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    transition: all 0.3s ease;
}
.auth-card .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(37, 99, 235, 0.45); }
.auth-footer { text-align: center; margin-top: 1.75rem; font-size: 0.9375rem; color: var(--gray-500); }
.auth-footer a { color: var(--primary); font-weight: 700; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   DASHBOARD
   ============================================================ */

.dashboard-welcome { margin-bottom: 1.5rem; }
.dashboard-welcome h2 { font-size: 1.25rem; font-weight: 600; }
.dashboard-welcome p { color: var(--gray-500); }

.recent-surveys { margin-top: 1.5rem; }
.empty-surveys { text-align: center; padding: 3rem; color: var(--gray-400); }
.empty-surveys i { font-size: 3rem; margin-bottom: 1rem; }
.empty-surveys h3 { font-size: 1.125rem; margin-bottom: 0.5rem; color: var(--gray-700); }

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

.mobile-header { display: none; }

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 0 1rem; height: 56px; background: var(--gray-900); color: white; position: sticky; top: 0; z-index: 99; }
    .mobile-menu-btn { background: none; border: none; color: white; font-size: 1.25rem; }
    .mobile-brand { font-weight: 700; }
    .mobile-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--secondary)); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; }
    .builder-container { grid-template-columns: 1fr; height: auto; }
    .question-palette, .builder-sidebar { display: none; }
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .ai-showcase-content { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .pricing-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .hero-buttons { flex-direction: column; }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.animate-pulse { animation: pulse 2s ease infinite; }

/* Loading overlay */
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; z-index: 1000; }
.loading-spinner { width: 40px; height: 40px; border: 3px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* ============================================================
   DASHBOARD V2 - Data-driven decision stacks
   ============================================================ */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-header h2 { font-size: 1.75rem; font-weight: 800; color: var(--dark); margin-bottom: 0.25rem; }
.dashboard-subtitle { color: var(--gray-500); font-size: 0.9375rem; margin: 0; }

.range-picker .form-control {
    min-width: 150px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-300);
    background: white;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    cursor: pointer;
}

/* KPI Grid */
.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.kpi-label { font-size: 0.8125rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.03em; }
.kpi-value { font-size: 1.75rem; font-weight: 800; color: var(--dark); line-height: 1.2; margin: 0.125rem 0; }
.kpi-trend { font-size: 0.8125rem; color: var(--gray-500); }
.kpi-trend.kpi-warning { color: var(--danger); font-weight: 600; }

/* Dashboard rows & cards */
.dashboard-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.dashboard-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

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

.dashboard-card .card-header h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.dashboard-card .card-body { padding: 1.25rem 1.5rem; }

.chart-card .card-body { position: relative; height: 300px; }

/* Decision stack */
.decision-card .card-body { padding: 0; }
.attention-empty { text-align: center; padding: 2rem; color: var(--gray-500); }
.attention-empty i { font-size: 2.5rem; color: var(--success); margin-bottom: 0.75rem; display: block; }

.attention-list { list-style: none; }
.attention-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}
.attention-item:last-child { border-bottom: none; }

.attention-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}
.attention-warning .attention-icon { background: rgba(220,38,38,0.1); color: var(--danger); }
.attention-info .attention-icon { background: rgba(59,130,246,0.1); color: #3b82f6; }
.attention-tip .attention-icon { background: rgba(245,158,11,0.1); color: var(--warning); }

.attention-text { flex: 1; font-size: 0.9375rem; color: var(--gray-700); font-weight: 500; }

/* Activity feed */
.activity-card .card-body { max-height: 340px; overflow-y: auto; }
.activity-list { list-style: none; }
.activity-list li { display: flex; align-items: flex-start; gap: 0.875rem; padding: 0.875rem 0; border-bottom: 1px solid var(--gray-100); }
.activity-list li:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 0.5rem; flex-shrink: 0; }
.activity-title { font-size: 0.9375rem; font-weight: 600; color: var(--dark); }
.activity-meta { font-size: 0.8125rem; color: var(--gray-500); margin-top: 0.125rem; }

/* Plan usage grid */
.plan-usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.plan-usage-item {}
.plan-usage-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.plan-usage-name { font-size: 0.875rem; font-weight: 600; color: var(--gray-700); }
.plan-usage-value { font-size: 0.75rem; font-weight: 600; color: var(--gray-500); }
.plan-usage-bar-bg { height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.plan-usage-bar-fill { height: 100%; border-radius: 4px; transition: width 0.4s ease; }

/* Responsive dashboard */
@media (max-width: 1200px) {
    .dashboard-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .dashboard-header { flex-direction: column; align-items: flex-start; }
    .dashboard-kpi-grid { grid-template-columns: 1fr; }
    .dashboard-row { grid-template-columns: 1fr; }
    .kpi-card { padding: 1rem; }
}

/* Team / organization page helpers */
.role-badge { display: inline-block; padding: 0.25rem 0.625rem; background: var(--gray-100); color: var(--gray-700); border-radius: 100px; font-size: 0.75rem; font-weight: 600; text-transform: capitalize; }
.form-control-sm { padding: 0.375rem 0.625rem; font-size: 0.875rem; min-height: 34px; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b91c1c; }
.text-muted { color: var(--gray-500); }
