/* Global layout & components (from base.html) */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --bg-light: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
    --shadow-soft: 0 12px 40px rgba(20, 20, 40, 0.04);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05), transparent 30%),
                radial-gradient(circle at 90% 60%, rgba(139, 92, 246, 0.06), transparent 30%),
                var(--bg-light);
    color: #1e293b;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Outfit', sans-serif;
}

.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 1050;
    padding: 0.75rem 0;
}

.dropdown-menu {
    z-index: 1100;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.main-container {
    background: white;
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    margin: 2rem auto;
    padding: 2.5rem;
    min-height: calc(100vh - 200px);
    border: 1px solid rgba(255,255,255,0.8);
}

/* ===== Landing page styling ===== */
.landing-body {
    background: radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.12), transparent 40%),
                radial-gradient(circle at 85% 20%, rgba(139, 92, 246, 0.12), transparent 40%),
                #f8fafc;
}

.landing-body .main-container {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 1.5rem auto;
}

.landing-hero {
    background: linear-gradient(120deg, #6366f1, #8b5cf6);
    color: #fff;
    border-radius: 24px;
    padding: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(99, 102, 241, 0.35);
    z-index: 1;
}

.landing-hero::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    right: -80px;
    top: -60px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #c7d2fe;
    font-size: 12px;
}

.landing-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    min-width: 150px;
    backdrop-filter: blur(4px);
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
}

.metric-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.preview-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.preview-body {
    background: #f3f5fb;
    border-radius: 12px;
    padding: 1rem;
}

.placeholder-line {
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    margin-bottom: 0.6rem;
}

.landing-section {
    margin-top: 2rem;
    background: #fff;
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

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

.feature-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.12);
    border-color: #c7d2fe;
}

.icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #f6f7fb;
    border-radius: 14px;
    border: 1px solid #ececf5;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.landing-cta {
    margin-top: 2rem;
    padding: 1.75rem 2rem;
    border-radius: 18px;
    background: linear-gradient(120deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 18px 40px rgba(99, 102, 241, 0.3);
}

.landing-cta .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}

.card {
    border: 1px solid rgba(0,0,0,0.03);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.04);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.12);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px 15px 0 0 !important;
    padding: 1.25rem;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 12px;
    padding: 0.65rem 1.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    border: none;
    border-radius: 10px;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    border: none;
    border-radius: 10px;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    border: none;
    border-radius: 10px;
}

.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-weight: 500;
}

/* ===== Responsive mobile ===== */
@media (max-width: 768px) {
    body {
        background: #f5f7fa;
    }

    .landing-hero {
        padding: 2rem;
    }

    .landing-section {
        padding: 1.5rem;
    }

    .landing-cta {
        padding: 1.5rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .main-container {
        margin: 1rem;
        padding: 1.25rem;
        min-height: auto;
    }

    .card {
        margin-bottom: 1rem;
    }

    .card-header {
        padding: 1rem;
        font-size: 1rem;
    }

    .form-control,
    .form-select {
        padding: 0.65rem;
        font-size: 0.95rem;
    }

    .btn,
    .btn-primary,
    .btn-success,
    .btn-warning,
    .btn-danger {
        width: 100%;
        margin-top: 0.35rem;
    }

    /* Auth pages */
    .auth-container {
        max-width: 100%;
        margin: 1.5rem 1rem;
    }

    .auth-card {
        padding: 1.5rem;
        box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    }

    .auth-header h2 {
        font-size: 20px;
    }

    .auth-header p {
        font-size: 13px;
    }

    /* Survey builder tweaks */
    .question-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .question-text {
        min-width: 100%;
    }

    .choices-container {
        padding-left: 0;
    }

    .choice-item {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* Navbar spacing */
    .navbar .container,
    .navbar .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

.form-control,
.form-select {
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.alert {
    border-radius: 12px;
    border: none;
}

.list-group-item {
    border-radius: 10px !important;
    margin-bottom: 0.5rem;
    border: 1px solid #e5e7eb;
}

.progress {
    height: 25px;
    border-radius: 12px;
    background-color: #e5e7eb;
    width: 100%;
    flex: 1 1 auto;
}

.progress-bar {
    border-radius: 12px;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 0;
    border-radius: 20px;
    margin-bottom: 2rem;
    text-align: center;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
    color: #6b7280;
}

/* Auth pages (login/register shared) */
.auth-container {
    max-width: 480px;
    margin: 4rem auto;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05);
    padding: 3rem 2.5rem;
}

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

.auth-header h2 {
    color: #202124;
    font-weight: 400;
    font-size: 24px;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #5f6368;
    font-size: 14px;
}

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

.auth-form-label,
.form-label {
    color: #202124;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.auth-form-text,
.form-text {
    font-size: 12px;
    color: #5f6368;
    margin-top: 0.25rem;
}

.btn-register,
.btn-login {
    width: 100%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 10px;
    padding: 0.75rem;
    font-size: 16px;
    font-weight: 500;
    color: white;
    transition: all 0.3s;
}

.btn-register:hover,
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

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

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #dadce0;
}

.divider span {
    background: white;
    padding: 0 1rem;
    color: #5f6368;
    position: relative;
}

.login-link,
.register-link {
    text-align: center;
    margin-top: 1.5rem;
    color: #5f6368;
}

.login-link a,
.register-link a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover,
.register-link a:hover {
    text-decoration: underline;
}

.errorlist {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
}

.errorlist li {
    color: #d93025;
    font-size: 12px;
    margin-top: 0.25rem;
}


/* ===== Dashboard / Home ===== */
.dashboard-hero {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    margin-bottom: 2.5rem;
}

.dashboard-hero-main {
    flex: 1;
}

.dashboard-hero-main h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.dashboard-hero-main p {
    color: #4b5563;
    font-size: 0.98rem;
    max-width: 520px;
}

.dashboard-hero-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dashboard-hero-preview {
    width: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-hero-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    width: 100%;
    border: 1px solid rgba(0,0,0,0.03);
}

.dashboard-hero-card-header {
    height: 80px;
    background: linear-gradient(135deg, #6366f1, #ec4899);
}

.dashboard-hero-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.skeleton-line {
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    margin-bottom: 0.4rem;
}

.skeleton-line.w-75 {
    width: 75%;
}

.skeleton-line.w-50 {
    width: 50%;
}

.skeleton-pill {
    width: 120px;
    height: 20px;
    border-radius: 999px;
    background: #e0f2fe;
    margin: 0.75rem 0 1rem;
}

.skeleton-choice-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.skeleton-choice {
    height: 14px;
    border-radius: 999px;
    background: #f3f4f6;
}

.skeleton-choice.short {
    width: 60%;
}

.home-search-card .card-title {
    font-weight: 600;
}

.survey-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.survey-card {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.survey-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.1);
    border-color: #c7d2fe;
}

.survey-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.survey-title {
    font-size: 1.15rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.survey-desc {
    font-size: 0.9rem;
}

.survey-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.survey-card-meta span i {
    margin-right: 0.25rem;
}

.survey-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

@media (max-width: 767.98px) {
    .dashboard-hero {
        flex-direction: column;
    }

    .dashboard-hero-main h1 {
        font-size: 1.8rem;
    }

    .survey-card {
        padding: 0.85rem 1rem;
    }
}
