﻿
/* ============================================================
   THE HUMAN DILEMMA LAB
   PREMIUM INSIGHTS DASHBOARD
   Inspired by Apple's editorial and glass interface language
   ============================================================ */

:root {
    --dash-bg: #f3f2ed;
    --dash-surface: rgba(255, 255, 255, 0.72);
    --dash-white: #ffffff;
    --dash-ink: #242820;
    --dash-muted: #85877d;
    --dash-olive: #626d4d;
    --dash-olive-dark: #414a36;
    --dash-olive-soft: #e9ece2;
    --dash-gold: #b29a70;
    --dash-line: rgba(40, 45, 35, 0.09);
    --dash-shadow: 0 20px 60px rgba(36, 40, 32, 0.055);
    --dash-radius: 24px;
}

/* ============================================================
   GLOBAL FOUNDATION
   ============================================================ */

.dashboard-page {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient( circle at 12% 8%, rgba(166, 177, 143, 0.16), transparent 30% ), radial-gradient( circle at 90% 35%, rgba(178, 154, 112, 0.09), transparent 28% ), var(--dash-bg);
    color: var(--dash-ink);
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

    .dashboard-page *,
    .dashboard-page *::before,
    .dashboard-page *::after {
        box-sizing: border-box;
    }

    .dashboard-page a {
        color: inherit;
        text-decoration: none;
    }

    .dashboard-page button,
    .dashboard-page input,
    .dashboard-page select {
        font: inherit;
    }

    /* ============================================================
   HEADER — TRANSLUCENT NAVIGATION
   ============================================================ */

    .dashboard-page .site-header {
        position: sticky;
        top: 0;
        z-index: 100;
        width: 100%;
        border-bottom: 1px solid rgba(40, 45, 35, 0.07);
        background: rgba(247, 246, 241, 0.78);
        -webkit-backdrop-filter: blur(22px) saturate(160%);
        backdrop-filter: blur(22px) saturate(160%);
    }

    .dashboard-page .nav-container {
        width: min(1180px, calc(100% - 64px));
        min-height: 76px;
        margin: auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 30px;
    }

    .dashboard-page .brand {
        display: inline-flex;
        align-items: center;
        gap: 11px;
        transition: opacity 0.25s ease;
    }

        .dashboard-page .brand:hover {
            opacity: 0.75;
        }

    .dashboard-page .brand-mark {
        display: grid;
        place-items: center;
        width: 37px;
        height: 37px;
        border-radius: 12px;
        background: linear-gradient( 145deg, #747f5e, #424b37 );
        box-shadow: 0 5px 14px rgba(65, 74, 54, 0.2);
        color: white;
        font-family: "Playfair Display", Georgia, serif;
        font-size: 21px;
    }

    .dashboard-page .brand-name {
        font-family: "Playfair Display", Georgia, serif;
        font-size: 17px;
        font-weight: 600;
        letter-spacing: -0.4px;
    }

    .dashboard-page .main-nav {
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .dashboard-page .main-nav a {
            position: relative;
            padding: 10px 15px;
            border-radius: 30px;
            color: var(--dash-muted);
            font-size: 12px;
            font-weight: 600;
            transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
        }

            .dashboard-page .main-nav a:hover {
                transform: translateY(-1px);
                background: rgba(98, 109, 77, 0.08);
                color: var(--dash-olive-dark);
            }

            .dashboard-page .main-nav a.active {
                background: var(--dash-olive-soft);
                color: var(--dash-olive-dark);
            }

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

.dashboard-main {
    width: min(1180px, calc(100% - 64px));
    margin: 0 auto;
    padding: 65px 0 100px;
}

/* ============================================================
   HERO — EDITORIAL INTRODUCTION
   ============================================================ */

.dashboard-hero {
    position: relative;
    display: grid;
    grid-template-columns: 1.5fr 0.75fr;
    align-items: center;
    gap: 55px;
    min-height: 340px;
    padding: 54px 58px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 30px;
    background: radial-gradient( circle at 85% 15%, rgba(255, 255, 255, 0.14), transparent 30% ), linear-gradient( 125deg, #343d2e, #4e5941 65%, #667153 );
    box-shadow: 0 25px 65px rgba(42, 49, 35, 0.16);
    color: white;
    isolation: isolate;
    animation: dashboardReveal 0.8s ease both;
}

    .dashboard-hero::before {
        content: "";
        position: absolute;
        z-index: -1;
        top: -150px;
        right: -70px;
        width: 440px;
        height: 440px;
        border: 1px solid rgba(255, 255, 255, 0.11);
        border-radius: 50%;
        box-shadow: 0 0 0 35px rgba(255, 255, 255, 0.025), 0 0 0 75px rgba(255, 255, 255, 0.02);
        animation: orbitFloat 18s linear infinite;
    }

    .dashboard-hero::after {
        content: "";
        position: absolute;
        z-index: -1;
        right: 15%;
        bottom: -180px;
        width: 320px;
        height: 320px;
        border-radius: 50%;
        background: rgba(202, 194, 160, 0.09);
        filter: blur(2px);
    }

    .dashboard-hero .hero-content {
        max-width: 620px;
    }

    .dashboard-hero .eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin: 0 0 22px;
        color: #d4d9c9;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 3px;
    }

        .dashboard-hero .eyebrow::before {
            content: "";
            width: 23px;
            height: 1px;
            background: #c2b18d;
        }

    .dashboard-hero h1 {
        margin: 0;
        font-family: "Playfair Display", Georgia, serif;
        font-size: clamp(40px, 5vw, 62px);
        font-weight: 500;
        line-height: 1.13;
        letter-spacing: -1.8px;
    }

        .dashboard-hero h1 span {
            display: block;
            color: #d6c8a8;
            font-style: italic;
        }

    .dashboard-hero .hero-description {
        max-width: 490px;
        margin: 22px 0 0;
        color: rgba(255, 255, 255, 0.76);
        font-size: 13px;
        line-height: 1.9;
    }

    .dashboard-hero .hero-note {
        position: relative;
        padding: 26px 25px;
        border: 1px solid rgba(255, 255, 255, 0.19);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.085);
        -webkit-backdrop-filter: blur(18px);
        backdrop-filter: blur(18px);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
        animation: noteFloat 5s ease-in-out infinite;
    }

    .dashboard-hero .note-label {
        display: block;
        margin-bottom: 14px;
        color: #d8c9a9;
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 2px;
    }

    .dashboard-hero .hero-note p {
        margin: 0;
        color: rgba(255, 255, 255, 0.88);
        font-family: "Playfair Display", Georgia, serif;
        font-size: 19px;
        line-height: 1.55;
    }

/* ============================================================
   STATISTICS
   ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 19px;
    margin-top: 28px;
}

.stat-card {
    position: relative;
    min-height: 180px;
    padding: 27px 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: var(--dash-radius);
    background: var(--dash-surface);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: var(--dash-shadow);
    animation: dashboardReveal 0.75s ease both;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

    .stat-card:nth-child(2) {
        animation-delay: 0.1s;
    }

    .stat-card:nth-child(3) {
        animation-delay: 0.2s;
    }

    .stat-card:hover {
        transform: translateY(-7px);
        border-color: rgba(98, 109, 77, 0.2);
        box-shadow: 0 25px 55px rgba(36, 40, 32, 0.09);
    }

    .stat-card::after {
        content: "";
        position: absolute;
        right: -30px;
        bottom: -55px;
        width: 145px;
        height: 145px;
        border: 1px solid rgba(98, 109, 77, 0.09);
        border-radius: 50%;
        box-shadow: 0 0 0 19px rgba(98, 109, 77, 0.025);
        transition: transform 0.5s ease;
    }

    .stat-card:hover::after {
        transform: scale(1.2);
    }

.stat-label {
    display: block;
    color: var(--dash-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.stat-number {
    position: relative;
    z-index: 1;
    margin: 19px 0 7px;
    color: var(--dash-olive-dark);
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(39px, 4vw, 49px);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.stat-description {
    display: block;
    color: #999a90;
    font-size: 10px;
}

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

.dashboard-section {
    margin-top: 88px;
    animation: dashboardReveal 0.8s ease both;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

    .section-heading .eyebrow {
        margin: 0 0 12px;
        color: var(--dash-olive);
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 2.5px;
    }

    .section-heading h2 {
        margin: 0;
        font-family: "Playfair Display", Georgia, serif;
        font-size: clamp(30px, 4vw, 40px);
        font-weight: 500;
        letter-spacing: -0.8px;
    }

.section-description {
    margin: 11px 0 0;
    color: var(--dash-muted);
    font-size: 12px;
    line-height: 1.7;
}

/* ============================================================
   RESPONSE GROUPS
   ============================================================ */

.response-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px;
}

.response-card {
    position: relative;
    min-width: 0;
    padding: 25px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 21px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 10px 35px rgba(36, 40, 32, 0.045);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .response-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 45px rgba(36, 40, 32, 0.075);
    }

.response-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.card-index {
    display: block;
    margin-bottom: 10px;
    color: var(--dash-gold);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.8px;
}

.response-card-header h3 {
    max-width: 300px;
    margin: 0;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.response-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    padding: 10px 13px;
    border: 1px solid rgba(98, 109, 77, 0.1);
    border-radius: 13px;
    background: var(--dash-olive-soft);
}

    .response-total strong {
        color: var(--dash-olive-dark);
        font-family: "Playfair Display", Georgia, serif;
        font-size: 22px;
        font-weight: 500;
    }

    .response-total span {
        color: var(--dash-muted);
        font-size: 9px;
    }

/* ============================================================
   DATA TABLE
   ============================================================ */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--dash-line);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.65);
}

.response-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

    .response-table th {
        padding: 13px 14px;
        border-bottom: 1px solid var(--dash-line);
        background: rgba(98, 109, 77, 0.045);
        color: var(--dash-muted);
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        white-space: nowrap;
    }

    .response-table td {
        padding: 16px 14px;
        border-bottom: 1px solid rgba(40, 45, 35, 0.055);
        color: #686b60;
        font-size: 11px;
    }

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

    .response-table tbody tr {
        transition: background 0.2s ease;
    }

        .response-table tbody tr:hover {
            background: rgba(98, 109, 77, 0.055);
        }

    .response-table .choice-name {
        max-width: 230px;
        color: var(--dash-ink);
        font-weight: 600;
        line-height: 1.5;
    }

.percentage-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 49px;
    padding: 6px 9px;
    border: 1px solid rgba(98, 109, 77, 0.12);
    border-radius: 30px;
    background: var(--dash-olive-soft);
    color: var(--dash-olive-dark);
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   EMPTY STATES
   ============================================================ */

.empty-message {
    margin: 0;
    padding: 25px 15px;
    border: 1px dashed var(--dash-line);
    border-radius: 13px;
    color: var(--dash-muted);
    font-size: 12px;
    line-height: 1.7;
    text-align: center;
}

.empty-state {
    padding: 65px 30px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: var(--dash-shadow);
    text-align: center;
}

.empty-state-label {
    color: var(--dash-gold);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
}

.empty-state h3 {
    margin: 17px 0 10px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: 31px;
    font-weight: 500;
}

.empty-state p {
    max-width: 460px;
    margin: 0 auto;
    color: var(--dash-muted);
    font-size: 12px;
    line-height: 1.8;
}

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

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-height: 46px;
    padding: 0 21px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
    margin-top: 24px;
    background: var(--dash-olive-dark);
    color: white !important;
    box-shadow: 0 7px 18px rgba(65, 74, 54, 0.16);
}

    .primary-button:hover {
        transform: translateY(-3px);
        background: var(--dash-olive);
        box-shadow: 0 12px 24px rgba(65, 74, 54, 0.2);
    }

/* ============================================================
   BOTTOM CALL TO ACTION
   ============================================================ */

.dashboard-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    margin-top: 90px;
    padding: 37px 42px;
    border: 1px solid rgba(98, 109, 77, 0.12);
    border-radius: 23px;
    background: linear-gradient( 115deg, rgba(233, 236, 226, 0.95), rgba(250, 249, 244, 0.92) );
    box-shadow: 0 12px 35px rgba(36, 40, 32, 0.035);
}

    .dashboard-bottom .eyebrow {
        margin: 0 0 11px;
        color: var(--dash-olive);
        font-size: 9px;
        font-weight: 700;
        letter-spacing: 2px;
    }

    .dashboard-bottom h2 {
        margin: 0;
        font-family: "Playfair Display", Georgia, serif;
        font-size: 29px;
        font-weight: 500;
    }

    .dashboard-bottom p:not(.eyebrow) {
        max-width: 540px;
        margin: 10px 0 0;
        color: var(--dash-muted);
        font-size: 11px;
        line-height: 1.8;
    }

.secondary-button {
    flex-shrink: 0;
    border: 1px solid rgba(65, 74, 54, 0.2);
    background: rgba(255, 255, 255, 0.6);
    color: var(--dash-olive-dark);
}

    .secondary-button:hover {
        transform: translateY(-3px);
        background: white;
        box-shadow: 0 8px 22px rgba(36, 40, 32, 0.08);
    }

    .secondary-button span {
        font-size: 17px;
        transition: transform 0.25s ease;
    }

    .secondary-button:hover span {
        transform: translateX(4px);
    }

/* ============================================================
   FOOTER
   ============================================================ */

.dashboard-page .site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 27px max(32px, calc((100% - 1180px) / 2));
    border-top: 1px solid var(--dash-line);
    background: rgba(255, 255, 255, 0.3);
}

    .dashboard-page .site-footer p {
        margin: 0;
        color: var(--dash-muted);
        font-size: 10px;
        letter-spacing: 0.2px;
    }

/* ============================================================
   ACCESSIBILITY WIDGET — DASHBOARD
   ============================================================ */

.dashboard-page .accessibility-toggle {
    z-index: 10001;
}

.dashboard-page .accessibility-panel {
    z-index: 10002;
}

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

@keyframes dashboardReveal {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes orbitFloat {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes noteFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-7px);
    }
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */

@media (max-width: 900px) {
    .dashboard-hero {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 42px;
    }

        .dashboard-hero .hero-note {
            max-width: 500px;
        }

    .response-groups {
        grid-template-columns: 1fr;
    }

    .dashboard-bottom {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

@media (max-width: 600px) {
    .dashboard-page .nav-container {
        width: calc(100% - 30px);
        min-height: 67px;
        gap: 12px;
    }

    .dashboard-page .brand {
        gap: 8px;
    }

    .dashboard-page .brand-mark {
        width: 33px;
        height: 33px;
        font-size: 18px;
    }

    .dashboard-page .brand-name {
        font-size: 13px;
    }

    .dashboard-page .main-nav {
        gap: 2px;
    }

        .dashboard-page .main-nav a {
            padding: 8px 9px;
            font-size: 10px;
        }

    .dashboard-main {
        width: calc(100% - 30px);
        padding: 35px 0 65px;
    }

    .dashboard-hero {
        min-height: auto;
        gap: 26px;
        padding: 34px 25px;
        border-radius: 23px;
    }

        .dashboard-hero h1 {
            font-size: clamp(38px, 10vw, 49px);
        }

        .dashboard-hero .hero-description {
            font-size: 12px;
        }

        .dashboard-hero .hero-note {
            padding: 21px;
        }

            .dashboard-hero .hero-note p {
                font-size: 17px;
            }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 16px;
    }

    .stat-card {
        min-height: 140px;
        padding: 22px;
    }

    .stat-number {
        margin-top: 13px;
        font-size: 39px;
    }

    .dashboard-section {
        margin-top: 62px;
    }

    .section-heading h2 {
        font-size: 31px;
    }

    .response-card {
        padding: 19px;
    }

    .response-card-header h3 {
        font-size: 17px;
    }

    .response-table th,
    .response-table td {
        padding: 12px 10px;
    }

    .dashboard-bottom {
        margin-top: 65px;
        padding: 27px 23px;
    }

        .dashboard-bottom h2 {
            font-size: 25px;
        }

    .dashboard-page .site-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 23px 20px;
        gap: 8px;
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .dashboard-page *,
    .dashboard-page *::before,
    .dashboard-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
/* ANIMATED RESPONSE PERCENTAGE BARS */

.percentage-cell {
    min-width: 190px;
}

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

.percentage-track {
    flex: 1;
    height: 8px;
    min-width: 65px;
    overflow: hidden;
    border-radius: 20px;
    background: #e8e9df;
}

.percentage-fill {
    display: block;
    height: 100%;
    max-width: 100%;
    border-radius: inherit;
    transform-origin: left;
    background: linear-gradient(90deg, #9ba587, #536044);
    animation: percentageReveal 1.1s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes percentageReveal {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}
