:root {
    --teal-950: #031a1d;
    --teal-925: #052126;
    --teal-900: #06282d;
    --teal-850: #083238;
    --teal-800: #0a3d42;
    --teal-750: #0b4b4d;
    --teal-700: #0c5c59;
    --teal-650: #0d6d67;
    --teal-600: #0e7e75;
    --teal-550: #109187;
    --teal-500: #14a89a;
    --teal-450: #1ab9a8;
    --teal-400: #27c9b7;
    --teal-350: #45d5c5;
    --teal-300: #69e0d3;
    --teal-250: #88e8dd;
    --teal-200: #acefe7;
    --teal-150: #c8f4ee;
    --teal-100: #dcf8f4;
    --teal-75: #e8faf7;
    --teal-50: #f0fbf9;

    --ink-950: #102426;
    --ink-900: #173235;
    --ink-800: #294346;
    --ink-700: #3e595c;
    --ink-600: #587073;
    --ink-500: #708689;
    --ink-400: #93a5a7;
    --ink-300: #b6c4c5;
    --ink-200: #d0dada;
    --ink-100: #e8eeee;
    --ink-50: #f6f8f8;

    --background: #f2f7f6;
    --background-deep: #e8f0ef;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --surface-soft: #edf5f3;
    --surface-softer: #f7faf9;
    --surface-dark: #092d32;

    --text: var(--ink-900);
    --text-strong: var(--ink-950);
    --text-muted: var(--ink-600);
    --text-subtle: var(--ink-500);
    --text-light: #edf9f7;
    --text-light-muted: #9fbfbc;

    --border: #d5e3e1;
    --border-soft: #e2ecea;
    --border-strong: #b9d0cd;
    --border-dark: rgba(255, 255, 255, 0.11);

    --success: #117761;
    --success-strong: #0b5f4d;
    --success-background: #def5ed;
    --success-border: #b7e5d7;

    --warning: #93610c;
    --warning-strong: #764b06;
    --warning-background: #fff2d8;
    --warning-border: #efd39d;

    --danger: #b3424c;
    --danger-strong: #8f3039;
    --danger-background: #fbe9eb;
    --danger-border: #efc1c6;

    --info: #296d82;
    --info-background: #e4f3f7;
    --info-border: #bfdde5;

    --sidebar-width: 286px;

    --radius-xs: 6px;
    --radius-sm: 9px;
    --radius-md: 13px;
    --radius-lg: 18px;
    --radius-xl: 27px;
    --radius-2xl: 36px;

    --shadow-xs:
        0 1px 3px rgba(5, 42, 45, 0.05);

    --shadow-small:
        0 4px 14px rgba(5, 42, 45, 0.065);

    --shadow-medium:
        0 16px 40px rgba(5, 42, 45, 0.10);

    --shadow-large:
        0 30px 80px rgba(2, 26, 29, 0.26);

    --focus-ring:
        0 0 0 4px rgba(39, 201, 183, 0.14);

    --transition-fast: 130ms ease;
    --transition: 190ms ease;
    --transition-slow: 280ms ease;
}

/* Reset */

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

html {
    min-height: 100%;
    scroll-behavior: smooth;
    background: var(--background);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        linear-gradient(
            180deg,
            #f4f8f7 0%,
            var(--background) 42%,
            #edf4f3 100%
        );
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: 0.56;
}

button {
    border: 0;
}

a {
    color: inherit;
}

img,
svg {
    display: block;
    max-width: 100%;
}

.hidden {
    display: none !important;
}

.noscript-message {
    padding: 18px 22px;
    color: white;
    background: var(--danger);
    text-align: center;
    font-weight: 750;
}

::selection {
    color: var(--teal-950);
    background: var(--teal-250);
}

/* Typography */

.eyebrow {
    display: block;
    margin: 0 0 6px;
    color: var(--teal-600);
    font-size: 0.69rem;
    font-weight: 900;
    letter-spacing: 0.135em;
    text-transform: uppercase;
}

.eyebrow-light {
    color: var(--teal-300);
}

.muted-copy {
    color: var(--text-muted);
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-symbol {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(104, 224, 211, 0.34);
    border-radius: 15px;
    color: var(--teal-950);
    background:
        linear-gradient(
            145deg,
            var(--teal-300),
            var(--teal-500)
        );
    font-size: 0.86rem;
    font-weight: 950;
    letter-spacing: -0.03em;
    box-shadow:
        0 12px 30px rgba(20, 168, 154, 0.23);
}

.brand-symbol-small {
    width: 43px;
    height: 43px;
    border-radius: 13px;
    font-size: 0.78rem;
}

.brand-kicker,
.brand-name {
    display: block;
}

.brand-kicker {
    color: var(--teal-300);
    font-size: 0.67rem;
    font-weight: 900;
    letter-spacing: 0.115em;
    text-transform: uppercase;
}

.brand-name {
    margin-top: 2px;
    color: white;
    font-size: 1.14rem;
    letter-spacing: -0.025em;
}

/* Authentication */

.auth-screen {
    min-height: 100vh;
    color: var(--text-light);
    background:
        radial-gradient(
            circle at 16% 8%,
            rgba(39, 201, 183, 0.18),
            transparent 30%
        ),
        radial-gradient(
            circle at 86% 82%,
            rgba(105, 224, 211, 0.11),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            var(--teal-950),
            var(--teal-850)
        );
}

.auth-shell {
    display: grid;
    width: min(1180px, calc(100% - 44px));
    min-height: 100vh;
    margin: 0 auto;
    grid-template-columns:
        minmax(0, 1.2fr)
        minmax(360px, 470px);
    gap: clamp(48px, 7vw, 90px);
    align-items: center;
    padding: 58px 0;
}

.auth-brand-panel {
    max-width: 690px;
}

.auth-message {
    margin: 50px 0 34px;
}

.auth-message h1 {
    max-width: 680px;
    margin: 0;
    color: white;
    font-size: clamp(2.55rem, 4.4vw, 4.25rem);
    font-weight: 780;
    line-height: 1.015;
    letter-spacing: -0.057em;
}

.auth-message p {
    max-width: 620px;
    margin: 18px 0 0;
    color: #b5cfcc;
    font-size: 0.98rem;
    line-height: 1.65;
}

.auth-feature-grid {
    display: grid;
    gap: 14px;
}

.auth-feature-grid article {
    display: grid;
    max-width: 620px;
    grid-template-columns: 44px 1fr;
    gap: 14px;
}

.auth-feature-grid article > span {
    color: var(--teal-300);
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.11em;
}

.auth-feature-grid strong {
    display: block;
    color: white;
    font-size: 0.9rem;
}

.auth-feature-grid p {
    margin: 3px 0 0;
    color: #90b0ad;
    font-size: 0.79rem;
}

.auth-card {
    border: 1px solid rgba(255, 255, 255, 0.70);
    border-radius: var(--radius-xl);
    color: var(--text);
    background: rgba(255, 255, 255, 0.975);
    padding: 39px;
    box-shadow: var(--shadow-large);
    backdrop-filter: blur(22px);
}

.auth-card-header h2 {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.auth-card-header p {
    margin: 7px 0 0;
    color: var(--text-muted);
}

.auth-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    margin: 27px 0;
    border-radius: 12px;
    background: var(--surface-soft);
    padding: 5px;
}

.auth-tab {
    min-height: 42px;
    border-radius: 9px;
    color: var(--text-muted);
    background: transparent;
    padding: 9px 12px;
    font-weight: 850;
    transition:
        color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.auth-tab.active {
    color: var(--teal-800);
    background: white;
    box-shadow: var(--shadow-xs);
}

.auth-footnote {
    margin: 21px 0 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-align: center;
}

.auth-reset-link {
    display: block;
    margin: 10px auto 0;
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 70px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    color: var(--teal-700);
    background: transparent;
    padding: 7px 8px;
    font-size: 0.72rem;
    font-weight: 900;
    transform: translateY(-50%);
}

.otp-modal {
    position: fixed;
    z-index: 210;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(3, 21, 23, 0.62);
    backdrop-filter: blur(3px);
}

.otp-modal-card {
    width: min(420px, calc(100vw - 32px));
    border: 1px solid var(--border);
    border-radius: 14px;
    background: white;
    padding: 22px;
    box-shadow: var(--shadow-large);
}

.otp-modal-card h3 {
    margin: 0;
    font-size: 1.1rem;
}

.otp-modal-message {
    margin: 9px 0 16px;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.otp-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

/* Forms */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 17px;
}

.form-group label,
.report-source-actions label {
    color: var(--text);
    font-size: 0.79rem;
    font-weight: 830;
}

.form-group input,
.form-group select,
.form-group textarea,
.report-source-actions select,
.analysis-header-actions select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    color: var(--text);
    background: white;
    padding: 10px 12px;
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--ink-400);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.mapping-select:focus,
.report-source-actions select:focus,
.analysis-header-actions select:focus {
    border-color: var(--teal-400);
    box-shadow: var(--focus-ring);
}

.field-hint {
    color: var(--text-muted);
    font-size: 0.7rem;
    line-height: 1.45;
}

.form-error {
    margin: 0 0 15px;
    border: 1px solid var(--danger-border);
    border-radius: 10px;
    color: var(--danger-strong);
    background: var(--danger-background);
    padding: 10px 12px;
    font-size: 0.79rem;
}

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

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 7px;
}

.opening-hours-editor {
    display: grid;
    gap: 10px;
}

.opening-hours-row {
    display: grid;
    grid-template-columns: minmax(92px, 110px) minmax(92px, 108px) minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: linear-gradient(160deg, var(--teal-50), white);
    padding: 12px;
}

.opening-hours-row.is-closed {
    background: var(--surface-softer);
}

.opening-hours-day {
    color: var(--text-strong);
    font-size: 0.77rem;
    font-weight: 820;
}

.opening-hours-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.opening-hours-toggle input {
    width: 16px;
    height: 16px;
    min-height: auto;
    margin: 0;
}

.opening-hours-time {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.opening-hours-time span {
    color: var(--text-muted);
    font-size: 0.67rem;
    font-weight: 720;
}

.opening-hours-time input[type="time"]:disabled {
    background: var(--surface-softer);
    color: var(--text-subtle);
}

/* Buttons */

.btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 15px;
    font-size: 0.79rem;
    font-weight: 880;
    line-height: 1.2;
    text-decoration: none;
    transition:
        transform var(--transition-fast),
        color var(--transition),
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary {
    color: #03221f;
    background:
        linear-gradient(
            135deg,
            var(--teal-300),
            var(--teal-400)
        );
    box-shadow:
        0 10px 24px rgba(20, 168, 154, 0.21);
}

.btn-primary:hover:not(:disabled) {
    background:
        linear-gradient(
            135deg,
            #7be5d9,
            #34cfbd
        );
    box-shadow:
        0 13px 28px rgba(20, 168, 154, 0.25);
}

.btn-secondary {
    border-color: var(--border);
    color: var(--teal-800);
    background: white;
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--teal-300);
    background: var(--teal-50);
}

.btn-danger {
    border-color: var(--danger-border);
    color: var(--danger-strong);
    background: var(--danger-background);
}

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

.btn-dark-secondary {
    border-color: rgba(255, 255, 255, 0.20);
    color: white;
    background: rgba(255, 255, 255, 0.06);
}

.btn-dark-secondary:hover:not(:disabled) {
    border-color: rgba(105, 224, 211, 0.42);
    background: rgba(255, 255, 255, 0.10);
}

.btn-block {
    width: 100%;
}

.btn-small {
    min-height: 34px;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.69rem;
}

.btn-sidebar {
    border-color: rgba(255, 255, 255, 0.12);
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.btn-sidebar:hover:not(:disabled) {
    border-color: rgba(105, 224, 211, 0.28);
    background: rgba(255, 255, 255, 0.09);
}

.icon-button {
    display: inline-grid;
    width: 39px;
    height: 39px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--teal-800);
    background: white;
    font-weight: 850;
    transition:
        border-color var(--transition),
        background var(--transition),
        transform var(--transition-fast);
}

.icon-button:hover:not(:disabled) {
    border-color: var(--teal-300);
    background: var(--teal-50);
    transform: translateY(-1px);
}

.text-link-button {
    align-self: flex-start;
    color: var(--teal-600);
    background: transparent;
    padding: 0;
    font-size: 0.79rem;
    font-weight: 900;
}

.text-link-button:hover {
    color: var(--teal-800);
}

/* App shell */

.application-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow-y: auto;
    color: var(--text-light);
    background:
        radial-gradient(
            circle at 8% 1%,
            rgba(39, 201, 183, 0.11),
            transparent 24%
        ),
        linear-gradient(
            180deg,
            var(--teal-950),
            #082a2f 57%,
            #052329
        );
    padding: 22px 17px;
    box-shadow:
        12px 0 45px rgba(3, 27, 30, 0.10);
}

.sidebar::-webkit-scrollbar {
    width: 7px;
}

.sidebar::-webkit-scrollbar-thumb {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.10);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 5px 22px;
}

.sidebar-brand-copy strong,
.sidebar-brand-copy span {
    display: block;
}

.sidebar-brand-copy strong {
    color: white;
    font-size: 0.92rem;
}

.sidebar-brand-copy span {
    margin-top: 1px;
    color: var(--text-light-muted);
    font-size: 0.66rem;
}

.sidebar-close-button {
    display: none;
    border-color: rgba(255, 255, 255, 0.13);
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-section-label {
    display: block;
    margin: 0 0 8px;
    padding: 0 8px;
    color: #739c99;
    font-size: 0.62rem;
    font-weight: 930;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.venue-switcher {
    margin-bottom: 20px;
}

.active-venue-button {
    display: flex;
    width: 100%;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid rgba(105, 224, 211, 0.15);
    border-radius: 13px;
    color: white;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.07),
            rgba(255, 255, 255, 0.035)
        );
    padding: 12px;
    text-align: left;
    transition:
        border-color var(--transition),
        background var(--transition);
}

.active-venue-button:hover {
    border-color: rgba(105, 224, 211, 0.32);
    background: rgba(255, 255, 255, 0.08);
}

.active-venue-button strong,
.active-venue-button small {
    display: block;
}

.active-venue-button strong {
    margin-bottom: 2px;
    font-size: 0.78rem;
}

.active-venue-button small {
    color: var(--text-light-muted);
    font-size: 0.65rem;
}

.venue-switcher-arrow {
    color: var(--teal-300);
    font-size: 1.15rem;
}

.sidebar-nav {
    display: grid;
    gap: 5px;
}

.nav-item {
    display: flex;
    width: 100%;
    min-height: 45px;
    align-items: center;
    gap: 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #a7c1be;
    background: transparent;
    padding: 9px 10px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 770;
    transition:
        color var(--transition),
        border-color var(--transition),
        background var(--transition),
        transform var(--transition-fast);
}

.nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.055);
    transform: translateX(1px);
}

.nav-item.active {
    border-color: rgba(105, 224, 211, 0.17);
    color: white;
    background:
        linear-gradient(
            90deg,
            rgba(39, 201, 183, 0.19),
            rgba(39, 201, 183, 0.055)
        );
}

.nav-symbol {
    display: grid;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 7px;
    color: var(--teal-300);
    background: rgba(39, 201, 183, 0.085);
    font-size: 0.72rem;
    font-weight: 900;
}

.journey-panel {
    margin-top: 27px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 22px;
}

.journey-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0 7px;
    list-style: none;
}

.journey-item {
    display: grid;
    grid-template-columns: 27px 1fr;
    gap: 10px;
    color: #6c928f;
}

.journey-number {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    font-size: 0.61rem;
    font-weight: 930;
}

.journey-item strong,
.journey-item small {
    display: block;
}

.journey-item strong {
    color: #80a39f;
    font-size: 0.69rem;
}

.journey-item small {
    margin-top: 1px;
    color: #648783;
    font-size: 0.61rem;
}

.journey-item.active .journey-number {
    border-color: var(--teal-300);
    color: var(--teal-950);
    background: var(--teal-300);
    box-shadow:
        0 0 0 4px rgba(105, 224, 211, 0.08);
}

.journey-item.complete .journey-number {
    border-color: var(--teal-400);
    color: var(--teal-950);
    background: var(--teal-400);
}

.journey-item.active strong,
.journey-item.complete strong {
    color: white;
}

.journey-item.complete small {
    color: #91b4b0;
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 18px;
}

.sidebar-user {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.user-avatar,
.topbar-avatar {
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--teal-950);
    background:
        linear-gradient(
            145deg,
            var(--teal-300),
            var(--teal-400)
        );
    font-weight: 950;
}

.user-avatar {
    width: 38px;
    height: 38px;
}

.topbar-avatar {
    width: 39px;
    height: 39px;
    box-shadow:
        0 7px 18px rgba(20, 168, 154, 0.17);
}

.sidebar-user strong,
.sidebar-user span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user strong {
    color: white;
    font-size: 0.69rem;
}

.sidebar-user span {
    color: var(--text-light-muted);
    font-size: 0.62rem;
}

/* Main layout */

.main-content {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.topbar {
    position: sticky;
    z-index: 25;
    top: 0;
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid rgba(213, 227, 225, 0.92);
    background: rgba(244, 248, 247, 0.91);
    padding: 10px 28px;
    box-shadow:
        0 8px 24px rgba(5, 42, 45, 0.025);
    backdrop-filter: blur(18px);
}

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

.topbar h1 {
    margin: 0;
    font-size: 1.29rem;
    letter-spacing: -0.035em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-menu-button {
    display: none;
}

.page-container {
    width: min(1460px, 100%);
    margin: 0 auto;
    padding: 18px 28px 28px;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: page-enter 220ms ease;
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

/* Shared page components */

.section-heading {
    margin: 0 0 10px;
}

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

.section-heading h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.55rem;
    letter-spacing: -0.038em;
}

.section-heading p {
    max-width: 860px;
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}


/* Billing choice and checkout context */

#billingChoicePanel {
    margin-bottom: 18px;
    scroll-margin-top: 88px;
}

#billingChoicePanel .panel-header {
    margin-bottom: 14px;
}

#billingChoicePanel .readiness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

#billingChoicePanel .readiness-card {
    min-height: 0;
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        opacity var(--transition),
        transform var(--transition);
}

#billingChoicePanel .readiness-card.active {
    border-color: rgba(9, 119, 111, 0.58);
    box-shadow:
        0 0 0 3px rgba(9, 119, 111, 0.09),
        var(--shadow-small);
    transform: translateY(-1px);
}

#billingChoicePanel .billing-card-secondary {
    opacity: 0.76;
}

#billingChoicePanel .readiness-card.active
.btn-primary {
    color: #03221f;
}

.billing-context-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 14px;
    border: 1px solid rgba(9, 119, 111, 0.22);
    border-radius: var(--radius-md);
    background: rgba(225, 243, 240, 0.58);
    padding: 14px 16px;
}

.billing-context-banner strong {
    display: block;
    margin-top: 2px;
    color: var(--text-strong);
}

.billing-context-banner p {
    margin: 3px 0 0;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    padding: 23px;
    box-shadow: var(--shadow-small);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 19px;
}

.panel-header h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.08rem;
    letter-spacing: -0.027em;
}

.panel-header p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.77rem;
}

.empty-state {
    display: grid;
    min-height: 245px;
    place-items: center;
    align-content: center;
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
}

.empty-state.compact {
    min-height: 190px;
    padding: 20px;
}

.empty-state-symbol {
    display: grid;
    width: 51px;
    height: 51px;
    margin-bottom: 12px;
    place-items: center;
    border-radius: 15px;
    color: var(--teal-700);
    background:
        linear-gradient(
            145deg,
            var(--teal-100),
            var(--teal-50)
        );
    font-size: 1.05rem;
    font-weight: 900;
}

.empty-state h3 {
    margin: 0;
    color: var(--text);
    font-size: 0.95rem;
}

.empty-state p {
    max-width: 430px;
    margin: 6px 0 0;
    font-size: 0.77rem;
}

.two-column-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
    margin-top: 17px;
}

/* Overview */

.overview-hero {
    display: grid;
    min-height: 300px;
    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(250px, 0.55fr);
    gap: 38px;
    align-items: end;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-xl);
    color: white;
    background:
        radial-gradient(
            circle at 83% 18%,
            rgba(105, 224, 211, 0.26),
            transparent 29%
        ),
        radial-gradient(
            circle at 19% 115%,
            rgba(39, 201, 183, 0.10),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            var(--teal-950),
            var(--teal-800)
        );
    padding: 40px;
    box-shadow: var(--shadow-medium);
}

.overview-hero-copy h2 {
    max-width: 750px;
    margin: 0;
    color: white;
    font-size: clamp(2.2rem, 4vw, 4rem);
    font-weight: 780;
    line-height: 1.02;
    letter-spacing: -0.057em;
}

.overview-hero-copy > p {
    max-width: 660px;
    margin: 17px 0 0;
    color: #b6d0cd;
    font-size: 0.97rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 26px;
}

.current-step-card {
    display: flex;
    min-height: 175px;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.075),
            rgba(255, 255, 255, 0.035)
        );
    padding: 23px;
    backdrop-filter: blur(14px);
}

.current-step-card > span {
    color: var(--teal-200);
    font-size: 0.64rem;
    font-weight: 930;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.current-step-card strong {
    margin-top: 6px;
    color: white;
    font-size: 1.43rem;
    line-height: 1.18;
}

.current-step-card p {
    margin: 6px 0 0;
    color: #aac6c3;
    font-size: 0.77rem;
}

.readiness-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.readiness-card {
    display: flex;
    min-height: 216px;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(
            160deg,
            white,
            #fbfdfd
        );
    padding: 21px;
    box-shadow: var(--shadow-small);
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.readiness-card:hover {
    border-color: var(--teal-200);
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.readiness-number {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 10px;
    color: var(--teal-700);
    background: var(--teal-100);
    font-size: 0.65rem;
    font-weight: 950;
}

.card-label {
    display: block;
    margin: 17px 0 5px;
    color: var(--teal-600);
    font-size: 0.64rem;
    font-weight: 930;
    letter-spacing: 0.105em;
    text-transform: uppercase;
}

.readiness-card h3 {
    margin: 0;
    font-size: 0.97rem;
}

.readiness-card p {
    margin: 7px 0 17px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.activity-list {
    display: grid;
    gap: 10px;
}

.activity-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--border-soft);
    border-radius: 13px;
    background: var(--surface-softer);
    padding: 12px;
}

.activity-symbol {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 11px;
    color: var(--teal-700);
    background: var(--teal-100);
    font-weight: 900;
}

.activity-copy {
    min-width: 0;
}

.activity-copy strong,
.activity-copy span {
    display: block;
}

.activity-copy strong {
    overflow: hidden;
    font-size: 0.79rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-copy span {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.68rem;
}

/* Venue */

.venue-page-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 0.9fr)
        minmax(390px, 1.1fr);
    gap: 18px;
    align-items: start;
}

.venue-list {
    display: grid;
    gap: 10px;
}

.venue-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 15px;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: white;
    padding: 15px;
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.venue-card:hover {
    border-color: var(--teal-300);
    box-shadow: var(--shadow-small);
    transform: translateY(-1px);
}

.venue-card.active {
    border-color: var(--teal-400);
    background:
        linear-gradient(
            135deg,
            var(--teal-50),
            white
        );
    box-shadow:
        0 0 0 3px rgba(39, 201, 183, 0.07);
}

.venue-card-main {
    display: grid;
    min-width: 0;
    grid-template-columns: 43px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.venue-card-icon {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    border-radius: 12px;
    color: var(--teal-800);
    background: var(--teal-100);
    font-size: 0.78rem;
    font-weight: 950;
}

.venue-card-copy {
    min-width: 0;
}

.venue-card-copy h3 {
    overflow: hidden;
    margin: 0;
    font-size: 0.89rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.venue-card-copy p,
.venue-card-copy small {
    display: block;
    margin: 0;
    color: var(--text-muted);
}

.venue-card-copy p {
    margin-top: 3px;
    font-size: 0.72rem;
}

.venue-card-copy small {
    margin-top: 1px;
    font-size: 0.64rem;
}

.venue-card-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

.venue-card-actions .btn {
    min-height: 35px;
    padding: 7px 10px;
    font-size: 0.69rem;
}

.venue-card-actions .icon-button {
    width: 35px;
    height: 35px;
}

.mini-badge,
.required-badge,
.partial-badge,
.dataset-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 900;
}

.mini-badge {
    margin-left: 6px;
    color: var(--success);
    background: var(--success-background);
    padding: 3px 7px;
    font-size: 0.55rem;
}

.required-badge {
    color: var(--warning);
    background: var(--warning-background);
    padding: 3px 7px;
    font-size: 0.54rem;
}

.partial-badge {
    border: 1px solid var(--warning-border);
    color: var(--warning);
    background: var(--warning-background);
    padding: 4px 8px;
    font-size: 0.59rem;
}

.dataset-badge {
    border: 1px solid var(--border);
    color: var(--teal-700);
    background: var(--teal-50);
    padding: 4px 8px;
    font-size: 0.59rem;
}

/* Import */

.import-panel {
    display: grid;
    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(230px, 0.5fr);
    gap: 23px;
}

.upload-dropzone {
    display: grid;
    min-height: 325px;
    place-items: center;
    align-content: center;
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(105, 224, 211, 0.10),
            transparent 37%
        ),
        linear-gradient(
            145deg,
            var(--teal-50),
            white
        );
    padding: 34px;
    text-align: center;
    transition:
        border-color var(--transition),
        background var(--transition),
        box-shadow var(--transition);
}

.upload-dropzone:hover {
    border-color: var(--teal-300);
}

.upload-dropzone.drag-active {
    border-color: var(--teal-400);
    background: var(--teal-100);
    box-shadow: var(--focus-ring);
}

.upload-symbol {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 14px;
    place-items: center;
    border-radius: 17px;
    color: var(--teal-700);
    background:
        linear-gradient(
            145deg,
            var(--teal-100),
            white
        );
    font-size: 1.35rem;
    font-weight: 900;
    box-shadow: var(--shadow-small);
}

.upload-dropzone h3 {
    margin: 0;
    font-size: 1.08rem;
}

.upload-dropzone > p {
    max-width: 470px;
    margin: 7px 0 18px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.import-options {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(
            160deg,
            var(--surface-soft),
            #f4f8f7
        );
    padding: 20px;
}

.import-method-group {
    display: grid;
    gap: 10px;
}

.import-method-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 0;
    cursor: pointer;
    transition: color 0.18s ease;
}

.import-method-option:hover {
    color: var(--teal-700);
}

.import-method-option input {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px dotted var(--teal-600);
    background: transparent;
    position: relative;
    top: 0;
}

.import-method-option input:checked::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--teal-700);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.import-method-copy {
    display: inline;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-strong);
    line-height: 1.2;
}

.import-method-option:has(input:checked) {
    color: var(--teal-800);
}

.import-help {
    margin: 13px 0 0;
    color: var(--text-muted);
    font-size: 0.67rem;
}

.selected-file {
    width: min(100%, 500px);
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: white;
    padding: 11px 12px;
    text-align: left;
    box-shadow: var(--shadow-xs);
}

.selected-file strong,
.selected-file small {
    display: block;
}

.selected-file strong {
    overflow: hidden;
    font-size: 0.77rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-file small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.66rem;
}

.mapping-panel {
    margin-top: 18px;
}

.inspection-summary-grid,
.result-stat-grid,
.analysis-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.inspection-summary-grid article,
.result-stat-grid article,
.analysis-kpi-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background:
        linear-gradient(
            145deg,
            var(--surface-soft),
            white
        );
    padding: 13px;
}

.inspection-summary-grid span,
.result-stat-grid span,
.analysis-kpi-card span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-size: 0.63rem;
    font-weight: 820;
}

.inspection-summary-grid strong,
.result-stat-grid strong,
.analysis-kpi-card strong {
    display: block;
    overflow: hidden;
    color: var(--text-strong);
    font-size: 0.85rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mapping-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 25px 0 14px;
}

.mapping-toolbar h3 {
    margin: 0;
    font-size: 0.95rem;
}

.mapping-toolbar p {
    max-width: 670px;
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 0.73rem;
}

.mapping-toolbar select {
    min-width: 235px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: white;
    padding: 9px 11px;
}

.mapping-list {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.mapping-row {
    display: grid;
    grid-template-columns:
        minmax(210px, 0.8fr)
        34px
        minmax(220px, 1fr);
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding: 13px 15px;
}

.mapping-row:last-child {
    border-bottom: 0;
}

.mapping-row:nth-child(even) {
    background: #fbfdfd;
}

.mapping-field-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.mapping-field-copy strong {
    font-size: 0.76rem;
}

.mapping-field-copy small {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.64rem;
}

.mapping-arrow {
    color: var(--teal-500);
    text-align: center;
    font-weight: 950;
}

.mapping-select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    color: var(--text);
    background: white;
    padding: 8px 10px;
    font-size: 0.73rem;
}

.preview-details {
    margin-top: 17px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
}

.preview-details summary {
    cursor: pointer;
    padding: 12px 14px;
    color: var(--teal-700);
    font-size: 0.73rem;
    font-weight: 900;
}

.table-scroll {
    overflow-x: auto;
    border-top: 1px solid var(--border);
}

.data-preview-table,
.metrics-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
    font-size: 0.68rem;
}

.data-preview-table th,
.data-preview-table td,
.metrics-table th,
.metrics-table td {
    max-width: 230px;
    overflow: hidden;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-preview-table th,
.metrics-table th {
    color: var(--teal-800);
    background: var(--teal-50);
    font-weight: 850;
}

.data-preview-table tr:hover td,
.metrics-table tr:hover td {
    background: #fbfdfd;
}

.mapping-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.completion-panel {
    display: flex;
    gap: 17px;
    align-items: center;
    border: 1px solid var(--success-border);
    border-radius: 15px;
    background:
        linear-gradient(
            135deg,
            var(--success-background),
            white
        );
    padding: 20px;
}

.completion-icon {
    display: grid;
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 14px;
    color: white;
    background:
        linear-gradient(
            145deg,
            var(--success),
            var(--teal-600)
        );
    font-size: 1.12rem;
    font-weight: 950;
    box-shadow:
        0 10px 25px rgba(17, 119, 97, 0.18);
}

.completion-panel h2 {
    margin: 0;
    font-size: 1.11rem;
}

.completion-panel p:not(.eyebrow) {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.result-stat-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 15px;
}

.result-stat-grid article {
    background: white;
}

/* Report periods */

.report-source-panel {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    background:
        radial-gradient(
            circle at 95% 0%,
            rgba(105, 224, 211, 0.12),
            transparent 30%
        ),
        white;
}

.report-source-panel h2 {
    margin: 0;
    font-size: 1.08rem;
}

.report-source-panel p {
    max-width: 680px;
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.report-source-actions {
    width: min(360px, 100%);
}

.report-source-actions label {
    display: block;
    margin-bottom: 7px;
}

.report-period-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(285px, 1fr)
        );
    gap: 16px;
}

.report-period-grid > .empty-state {
    grid-column: 1 / -1;
}

.report-period-card {
    position: relative;
    display: flex;
    min-height: 270px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(
            160deg,
            white,
            #fbfdfd
        );
    padding: 20px;
    box-shadow: var(--shadow-small);
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.report-period-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    content: "";
    background:
        linear-gradient(
            90deg,
            var(--teal-400),
            var(--teal-600)
        );
}

.report-period-card:hover {
    border-color: var(--teal-250);
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.report-period-card.completed::before {
    background:
        linear-gradient(
            90deg,
            var(--success),
            var(--teal-400)
        );
}

.report-period-card.awaiting-payment::before,
.report-period-card.unpaid::before {
    background:
        linear-gradient(
            90deg,
            #e6a72b,
            var(--warning)
        );
}

.report-period-card.failed::before {
    background:
        linear-gradient(
            90deg,
            #d85d67,
            var(--danger)
        );
}

.report-period-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.report-period-index {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 11px;
    color: var(--teal-800);
    background: var(--teal-100);
    font-size: 0.67rem;
    font-weight: 950;
}

.report-period-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.report-period-card h3 {
    margin: 18px 0 0;
    color: var(--text-strong);
    font-size: 1.14rem;
    letter-spacing: -0.028em;
}

.report-period-dates {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.73rem;
}

.report-period-coverage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.report-period-coverage article {
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--surface-soft);
    padding: 10px;
}

.report-period-coverage span,
.report-period-coverage strong {
    display: block;
}

.report-period-coverage span {
    color: var(--text-muted);
    font-size: 0.6rem;
}

.report-period-coverage strong {
    margin-top: 2px;
    font-size: 0.75rem;
}

.report-period-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    border-top: 1px solid var(--border-soft);
    padding-top: 14px;
}

.report-period-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
}

/* Analysis */

.analysis-header-actions {
    display: flex;
    min-width: min(460px, 100%);
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
}

.analysis-header-actions select {
    width: min(330px, 100%);
}

.analysis-workspace {
    display: grid;
    gap: 17px;
}

.analysis-summary-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    color: white;
    background:
        radial-gradient(
            circle at 92% 4%,
            rgba(105, 224, 211, 0.23),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            var(--teal-950),
            var(--teal-800)
        );
    padding: 28px;
    box-shadow: var(--shadow-medium);
}

.analysis-summary-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.analysis-summary-header h2 {
    margin: 0;
    color: white;
    font-size: 1.52rem;
    letter-spacing: -0.04em;
}

.analysis-summary-header p {
    margin: 6px 0 0;
    color: #aec9c6;
    font-size: 0.78rem;
}

.analysis-status-cluster {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

.analysis-summary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 21px;
}

.analysis-kpi-grid {
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(155px, 1fr)
        );
    margin-top: 18px;
}

.analysis-kpi-card {
    min-height: 106px;
    background:
        linear-gradient(
            160deg,
            rgba(255, 255, 255, 0.10),
            rgba(255, 255, 255, 0.045)
        );
    border-color: rgba(255, 255, 255, 0.10);
}

.analysis-kpi-card span {
    color: #a9c7c3;
}

.analysis-kpi-card strong {
    margin-top: 8px;
    color: white;
    font-size: 1.25rem;
}

.analysis-kpi-card small {
    display: block;
    margin-top: 5px;
    color: #8eafac;
    font-size: 0.62rem;
}

.analysis-content-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(330px, 0.85fr);
    gap: 17px;
}

.analysis-section {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: white;
    padding: 22px;
    box-shadow: var(--shadow-small);
}

.analysis-section h3 {
    margin: 0;
    font-size: 1.03rem;
    letter-spacing: -0.025em;
}

.analysis-section-description {
    margin: 5px 0 17px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.report-status-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
    border-color: rgba(20, 168, 154, 0.18);
    background:
        linear-gradient(180deg, rgba(240, 251, 249, 0.96), rgba(255, 255, 255, 0.98));
}

.report-status-copy h3 {
    margin: 5px 0 0;
    font-size: 1rem;
}

.report-status-copy p {
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.report-status-actions {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.business-driver-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.business-driver-card {
    display: grid;
    gap: 10px;
    align-content: start;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        linear-gradient(160deg, white, #fbfdfd);
    padding: 16px;
    box-shadow: var(--shadow-xs);
}

.business-driver-card.tone-positive {
    border-color: rgba(20, 168, 154, 0.18);
}

.business-driver-card.tone-negative {
    border-color: var(--danger-border);
}

.business-driver-card.tone-neutral {
    border-color: var(--info-border);
}

.business-driver-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.business-driver-header h4 {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: -0.01em;
}

.business-driver-trend {
    color: var(--text-muted);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: right;
}

.business-driver-card strong {
    color: var(--teal-800);
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.business-driver-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.45;
}

.business-driver-card.tone-negative strong {
    color: var(--danger-strong);
}

.business-driver-card.tone-positive strong {
    color: var(--teal-700);
}

.business-driver-card.tone-neutral strong {
    color: var(--text-strong);
}

.action-plan-guidance {
    border-color: var(--teal-200);
    background:
        linear-gradient(
            180deg,
            rgba(105, 224, 211, 0.15),
            rgba(255, 255, 255, 0.98) 34%
        );
}

.action-plan-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.action-plan-list li {
    position: relative;
    padding: 11px 14px 11px 36px;
    border: 1px solid rgba(20, 168, 154, 0.14);
    border-radius: 14px;
    background: rgba(240, 251, 249, 0.92);
    color: var(--text-strong);
    font-size: 0.78rem;
    line-height: 1.5;
}

.action-plan-list li::before {
    content: "";
    position: absolute;
    top: 17px;
    left: 15px;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background:
        linear-gradient(
            145deg,
            var(--teal-350),
            var(--teal-550)
        );
    box-shadow: 0 0 0 5px rgba(105, 224, 211, 0.18);
}

.phased-rollout-panel {
    margin-top: 15px;
    border-color: rgba(20, 168, 154, 0.18);
    background:
        radial-gradient(
            circle at top right,
            rgba(172, 239, 231, 0.7),
            transparent 32%
        ),
        linear-gradient(
            180deg,
            rgba(232, 250, 247, 0.9),
            rgba(255, 255, 255, 0.96)
        );
}

.phased-rollout-panel .panel-header {
    margin-bottom: 14px;
}

.financial-breakdown {
    display: grid;
    gap: 9px;
}

.financial-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--border-soft);
    padding: 9px 0;
}

.financial-row:last-child {
    border-bottom: 0;
}

.financial-row span {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.financial-row strong {
    color: var(--text-strong);
    font-size: 0.79rem;
}

.financial-row.total {
    margin-top: 5px;
    border-top: 1px solid var(--border);
    border-bottom: 0;
    padding-top: 14px;
}

.financial-row.total span,
.financial-row.total strong {
    color: var(--teal-800);
    font-weight: 900;
}

.positive-value {
    color: var(--success) !important;
}

.negative-value {
    color: var(--danger) !important;
}

.neutral-value {
    color: var(--text-muted) !important;
}

.quality-card {
    border: 1px solid var(--border-soft);
    border-radius: 13px;
    background: var(--surface-soft);
    padding: 15px;
}

.quality-score {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
}

.quality-score strong {
    color: var(--teal-700);
    font-size: 1.65rem;
    line-height: 1;
}

.quality-score span {
    color: var(--text-muted);
    font-size: 0.67rem;
}

.quality-bar {
    height: 8px;
    overflow: hidden;
    margin-top: 12px;
    border-radius: 999px;
    background: #dce9e7;
}

.quality-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            var(--teal-500),
            var(--teal-300)
        );
}

.warning-list,
.findings-list,
.recommendation-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.warning-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 9px;
    border: 1px solid var(--warning-border);
    border-radius: 11px;
    color: var(--warning-strong);
    background: var(--warning-background);
    padding: 11px 12px;
    font-size: 0.72rem;
}

.warning-symbol {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 7px;
    background: rgba(147, 97, 12, 0.10);
    font-weight: 900;
}

.confidence-reasons-list.level-high .warning-item {
    border-color: rgba(10, 122, 108, 0.35);
    background: rgba(10, 122, 108, 0.10);
    color: #0a6f64;
}

.confidence-reasons-list.level-high .warning-symbol {
    background: rgba(10, 122, 108, 0.20);
}

.confidence-reasons-list.level-poor .warning-item,
.confidence-reasons-list.level-moderate .warning-item {
    border-color: var(--warning-border);
    background: var(--warning-background);
    color: var(--warning-strong);
}

.confidence-reasons-list.level-extreme-poor .warning-item {
    border-color: rgba(154, 29, 55, 0.45);
    background: rgba(154, 29, 55, 0.10);
    color: #8b2138;
}

.confidence-reasons-list.level-extreme-poor .warning-symbol {
    background: rgba(154, 29, 55, 0.20);
}

.findings-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(250px, 1fr)
        );
    gap: 12px;
}

.finding-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
        linear-gradient(
            160deg,
            white,
            #fbfdfd
        );
    padding: 16px;
}

.finding-card.severity-high {
    border-color: var(--danger-border);
}

.finding-card.severity-medium {
    border-color: var(--warning-border);
}

.finding-card.severity-low {
    border-color: var(--info-border);
}

.finding-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.finding-card h4 {
    margin: 0;
    font-size: 0.87rem;
}

.finding-card p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.severity-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 7px;
    font-size: 0.55rem;
    font-weight: 900;
    text-transform: uppercase;
}

.severity-high .severity-badge {
    color: var(--danger-strong);
    background: var(--danger-background);
}

.severity-medium .severity-badge {
    color: var(--warning-strong);
    background: var(--warning-background);
}

.severity-low .severity-badge {
    color: var(--info);
    background: var(--info-background);
}

.finding-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.finding-metric {
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 6px 8px;
    font-size: 0.62rem;
}

.metrics-panel {
    overflow: hidden;
    padding: 0;
}

.metrics-panel .panel-header {
    margin: 0;
    padding: 20px 22px;
}

.metrics-panel .table-scroll {
    border-top: 1px solid var(--border);
}

.metrics-table {
    min-width: 1120px;
}

.metrics-table td.numeric,
.metrics-table th.numeric {
    text-align: right;
}

/* Analysis state cards */

.analysis-state-card {
    display: grid;
    min-height: 320px;
    place-items: center;
    align-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(105, 224, 211, 0.12),
            transparent 34%
        ),
        white;
    padding: 34px;
    text-align: center;
    box-shadow: var(--shadow-small);
}

.analysis-state-card h3 {
    margin: 14px 0 0;
    font-size: 1.25rem;
}

.analysis-state-card p {
    max-width: 520px;
    margin: 7px 0 20px;
    color: var(--text-muted);
    font-size: 0.79rem;
}

.analysis-state-icon {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    border-radius: 18px;
    color: var(--teal-800);
    background: var(--teal-100);
    font-size: 1.25rem;
    font-weight: 950;
}

.analysis-state-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
}

/* Action plan */

.action-plan-summary {
    display: grid;
    grid-template-columns:
        minmax(0, 1.3fr)
        minmax(250px, 0.7fr);
    gap: 17px;
    margin-bottom: 17px;
}

.action-plan-hero {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(
            circle at 95% 10%,
            rgba(105, 224, 211, 0.15),
            transparent 30%
        ),
        white;
    padding: 24px;
    box-shadow: var(--shadow-small);
}

.action-plan-hero h2 {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: -0.035em;
}

.action-plan-hero p {
    max-width: 650px;
    margin: 7px 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.savings-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: var(--radius-lg);
    color: white;
    background:
        linear-gradient(
            135deg,
            var(--teal-850),
            var(--teal-650)
        );
    padding: 23px;
    box-shadow: var(--shadow-small);
}

.savings-card span {
    color: var(--teal-200);
    font-size: 0.65rem;
    font-weight: 850;
    text-transform: uppercase;
}

.savings-card strong {
    margin-top: 7px;
    color: white;
    font-size: 1.8rem;
}

.savings-card small {
    margin-top: 5px;
    color: #a9c8c5;
    font-size: 0.68rem;
}

.savings-projection-meta {
    display: grid;
    gap: 2px;
}

.savings-projection-meta span {
    color: #a9c8c5;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.savings-implemented-block {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    border-top: 1px solid rgba(172, 239, 231, 0.36);
    padding-top: 13px;
}

.savings-implemented-block span,
.savings-implemented-block strong,
.savings-implemented-block small {
    display: block;
}

.savings-implemented-block span {
    margin: 0;
}

.savings-implemented-block strong {
    margin-top: 2px;
}

.savings-implemented-block small {
    margin-top: 1px;
}

.action-headlines-panel {
    margin-top: 8px;
    border-color: rgba(20, 168, 154, 0.2);
    background:
        radial-gradient(
            circle at top right,
            rgba(172, 239, 231, 0.62),
            transparent 36%
        ),
        linear-gradient(
            180deg,
            rgba(232, 250, 247, 0.88),
            rgba(255, 255, 255, 0.97)
        );
}

.action-headlines-panel .analysis-section-description {
    margin-bottom: 14px;
}

.recommendation-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: flex-start;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: white;
    padding: 16px;
    box-shadow: var(--shadow-xs);
}

.action-headlines-panel .recommendation-card {
    border-color: rgba(20, 168, 154, 0.18);
    border-radius: 14px;
    background: rgba(240, 251, 249, 0.94);
}

.action-headlines-panel .recommendation-priority {
    color: var(--teal-700);
    background: linear-gradient(145deg, #d8f7f0, #eefbf8);
    box-shadow: inset 0 0 0 1px rgba(20, 168, 154, 0.18);
}

.action-headlines-panel .recommendation-content h3 {
    color: var(--text-strong);
    font-size: 0.92rem;
    font-weight: 850;
    letter-spacing: -0.01em;
}

.recommendation-priority {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    color: var(--teal-800);
    background: var(--teal-100);
    font-size: 0.71rem;
    font-weight: 950;
}

.recommendation-content h3 {
    margin: 0;
    font-size: 0.9rem;
}

.action-headline-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 750;
}

.action-headline-toggle input {
    width: 16px;
    height: 16px;
    min-height: auto;
    margin: 0;
}

.implemented-recommendation {
    border-color: rgba(11, 95, 77, 0.35);
    background:
        linear-gradient(
            155deg,
            rgba(222, 245, 237, 0.72),
            rgba(255, 255, 255, 0.98)
        );
}

.action-headlines-panel .implemented-recommendation {
    border-color: rgba(11, 95, 77, 0.34);
    background:
        linear-gradient(
            145deg,
            rgba(216, 244, 233, 0.92),
            rgba(250, 255, 253, 0.97)
        );
}

.recommendation-content p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.72rem;
}

.recommendation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.recommendation-meta span {
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 5px 7px;
    color: var(--text-muted);
    font-size: 0.59rem;
}

.recommendation-savings {
    min-width: 110px;
    text-align: right;
}

.recommendation-savings span,
.recommendation-savings strong {
    display: block;
}

.recommendation-savings span {
    color: var(--text-muted);
    font-size: 0.61rem;
}

.recommendation-savings strong {
    margin-top: 3px;
    color: var(--success);
    font-size: 0.9rem;
}

/* Status */

.status-pill {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.65rem;
    font-weight: 850;
    white-space: nowrap;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-neutral {
    color: var(--text-muted);
    background: white;
}

.status-success {
    border-color: var(--success-border);
    color: var(--success);
    background: var(--success-background);
}

.status-warning {
    border-color: var(--warning-border);
    color: var(--warning);
    background: var(--warning-background);
}

.status-error {
    border-color: var(--danger-border);
    color: var(--danger);
    background: var(--danger-background);
}

.status-info {
    border-color: var(--info-border);
    color: var(--info);
    background: var(--info-background);
}

/* Notifications */

.notification-region {
    position: fixed;
    z-index: 150;
    top: 18px;
    right: 18px;
    display: grid;
    width: min(390px, calc(100% - 36px));
    gap: 9px;
}

.notification {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
    padding: 13px 14px;
    box-shadow: var(--shadow-medium);
    animation: notification-enter 210ms ease;
}

@keyframes notification-enter {
    from {
        opacity: 0;
        transform: translateY(-7px);
    }

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

.notification.success {
    border-color: var(--success-border);
}

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

.notification.warning {
    border-color: var(--warning-border);
}

.notification strong,
.notification p {
    margin: 0;
}

.notification strong {
    font-size: 0.78rem;
}

.notification p {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.71rem;
}

.notification-close {
    align-self: start;
    color: var(--text-muted);
    background: transparent;
    padding: 0 2px;
    font-size: 1rem;
}

/* Loader */

.global-loader {
    position: fixed;
    z-index: 200;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(4, 27, 29, 0.58);
    backdrop-filter: blur(5px);
}

.loader-dialog {
    min-width: 195px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    background: white;
    padding: 23px;
    text-align: center;
    box-shadow: var(--shadow-large);
}

.loader-dialog strong {
    display: block;
    margin-top: 11px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto;
    border: 3px solid var(--teal-100);
    border-top-color: var(--teal-500);
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

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

.sidebar-backdrop {
    position: fixed;
    z-index: 35;
    inset: 0;
    background: rgba(3, 21, 23, 0.65);
    backdrop-filter: blur(2px);
}

/* Responsive */

@media (max-width: 1180px) {
    .analysis-content-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 1060px) {
    .auth-shell {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .auth-card {
        width: min(530px, 100%);
    }

    .auth-message {
        margin: 54px 0 38px;
    }

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

    .venue-page-grid,
    .import-panel {
        grid-template-columns: 1fr;
    }

    .report-source-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .report-source-actions {
        width: 100%;
    }

    .action-plan-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 850px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close-button,
    .mobile-menu-button {
        display: inline-grid;
    }

    .main-content {
        margin-left: 0;
    }

    .two-column-grid {
        grid-template-columns: 1fr;
    }

    .overview-hero {
        grid-template-columns: 1fr;
    }

    .analysis-header-actions {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
    }

    .section-heading-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .recommendation-card {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .recommendation-savings {
        grid-column: 2;
        text-align: left;
    }
}

@media (max-width: 680px) {
    .auth-shell {
        width: min(100% - 28px, 1180px);
        padding: 28px 0;
    }

    .auth-message {
        margin: 42px 0 30px;
    }

    .auth-message h1 {
        font-size: 2.42rem;
    }

    .auth-feature-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 4px;
    }

    .auth-feature-grid article {
        max-width: none;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
        border: 1px solid rgba(105, 224, 211, 0.12);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.035);
        padding: 11px 12px;
    }

    .auth-feature-grid strong {
        font-size: 0.82rem;
    }

    .auth-feature-grid p {
        margin-top: 2px;
        font-size: 0.7rem;
        line-height: 1.45;
    }

    .auth-card {
        padding: 27px 21px;
    }

    .topbar {
        padding: 11px 14px;
    }

    .topbar .status-pill {
        display: none;
    }

    .page-container {
        padding: 18px 13px 35px;
    }

    .overview-hero {
        min-height: 0;
        padding: 27px 21px;
    }

    .overview-hero-copy h2 {
        font-size: 2.22rem;
    }

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

    .opening-hours-row {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 18px;
    }

    .venue-card {
        grid-template-columns: 1fr;
    }

    .venue-card-actions {
        justify-content: flex-end;
    }

    .mapping-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .mapping-toolbar select {
        min-width: 0;
        width: 100%;
    }

    .mapping-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .mapping-arrow {
        display: none;
    }

    .inspection-summary-grid,
    .result-stat-grid {
        grid-template-columns: 1fr;
    }

    .completion-panel {
        align-items: flex-start;
    }

    .report-period-grid {
        grid-template-columns: 1fr;
    }

    .report-period-coverage {
        grid-template-columns: 1fr;
    }

    .analysis-header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .analysis-header-actions select {
        width: 100%;
    }

    .report-status-panel {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .report-status-actions {
        justify-items: start;
    }

    .analysis-summary-panel {
        padding: 21px;
    }

    .analysis-summary-header {
        flex-direction: column;
    }

    .analysis-status-cluster {
        justify-content: flex-start;
    }

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

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

    .recommendation-card {
        grid-template-columns: 1fr;
    }

    .recommendation-priority {
        width: 38px;
        height: 38px;
    }

    .recommendation-savings {
        grid-column: auto;
    }

    .activity-item {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .activity-item > .status-pill {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 430px) {
    .auth-message h1,
    .overview-hero-copy h2 {
        font-size: 2rem;
    }

    .hero-actions,
    .mapping-actions,
    .analysis-summary-actions,
    .analysis-state-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions .btn,
    .mapping-actions .btn,
    .analysis-summary-actions .btn,
    .analysis-state-actions .btn {
        width: 100%;
    }

    .analysis-kpi-grid {
        grid-template-columns: 1fr;
    }

    .report-period-header {
        flex-direction: column;
    }

    .report-period-meta {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* Analysis provenance styles intentionally retained only if technical panel
   is re-enabled in a restricted admin context. */

.provenance-details {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: white;
}

.provenance-details summary {
    cursor: pointer;
    color: var(--teal-700);
    background: var(--teal-50);
    padding: 12px 14px;
    font-size: 0.73rem;
    font-weight: 900;
}

.provenance-details pre {
    max-height: 380px;
    overflow: auto;
    margin: 0;
    border-top: 1px solid var(--border);
    color: var(--ink-800);
    background: var(--surface-softer);
    padding: 14px;
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 0.67rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 1060px) {
    .provenance-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .provenance-heading {
        flex-direction: column;
    }

    .provenance-summary-grid,
    .provenance-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Phase 3–6: dashboards, charts, portfolio and admin */
.dashboard-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}
.chart-panel { min-width: 0; }
.analytics-chart { width: 100%; height: 300px; }
.dashboard-insight-list { display: grid; gap: 10px; }
.dashboard-insight { border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface-softer); padding: 13px; }
.dashboard-insight strong, .dashboard-insight p, .dashboard-insight small { display: block; }
.dashboard-insight p { margin: 5px 0 0; color: var(--text-muted); font-size: 0.73rem; }
.dashboard-insight small { margin-top: 7px; color: var(--success); font-weight: 850; }
.profit-heatmap-panel { padding: 0; overflow: hidden; }
.profit-heatmap-panel .panel-header { margin: 0; padding: 20px 22px; }
.profit-heatmap-table { min-width: 880px; }
.profit-heatmap-table th,
.profit-heatmap-table td { white-space: nowrap; }
.heatmap-cell { font-size: 0.67rem; font-weight: 820; color: var(--text-strong); }
.heatmap-empty { color: var(--text-muted); background: var(--surface-soft); }
.portfolio-kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.portfolio-kpi span, .portfolio-kpi strong, .portfolio-kpi small { display: block; }
.portfolio-kpi span { color: var(--text-muted); font-size: 0.67rem; font-weight: 850; text-transform: uppercase; }
.portfolio-kpi strong { margin-top: 8px; color: var(--teal-800); font-size: 1.55rem; }
.portfolio-kpi small { margin-top: 5px; color: var(--text-muted); font-size: 0.66rem; }
.portfolio-table-panel { padding: 0; overflow: hidden; }
.portfolio-table-panel .panel-header { padding: 20px 22px; margin: 0; }
.portfolio-table { min-width: 900px; }
.portfolio-section-divider { height: 1px; margin: 18px 0; background: linear-gradient(90deg, rgba(8, 36, 42, 0.05), rgba(8, 36, 42, 0.3), rgba(8, 36, 42, 0.05)); }
.deleted-tag { display: inline-block; margin-left: 8px; border: 1px solid rgba(139, 24, 44, 0.35); border-radius: 999px; background: rgba(139, 24, 44, 0.08); color: #8b182c; padding: 2px 8px; font-size: 0.63rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.portfolio-row-inactive td { opacity: 0.75; }
.muted-copy { color: var(--text-muted); font-size: 0.7rem; font-weight: 700; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; margin-bottom: 17px; }
.diagnostic-json { max-height: 360px; overflow: auto; border: 1px solid var(--border-soft); border-radius: 12px; color: var(--teal-850); background: var(--surface-soft); padding: 14px; font-size: 0.72rem; white-space: pre-wrap; }
.admin-definition-list { display: grid; gap: 0; margin: 0; }
.admin-definition-list div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; border-bottom: 1px solid var(--border-soft); padding: 10px 0; }
.admin-definition-list div:last-child { border-bottom: 0; }
.admin-definition-list dt { color: var(--text-muted); font-size: 0.72rem; }
.admin-definition-list dd { margin: 0; font-size: 0.75rem; font-weight: 800; }
@media (max-width: 1060px) { .dashboard-chart-grid, .admin-grid { grid-template-columns: 1fr; } .portfolio-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .portfolio-kpi-grid { grid-template-columns: 1fr; } .analytics-chart { height: 250px; } }
@media print {
    body.print-dashboard { background: white; }
    body.print-dashboard .sidebar, body.print-dashboard .topbar, body.print-dashboard #notificationRegion, body.print-dashboard #globalLoader, body.print-dashboard .section-heading-actions .analysis-header-actions { display: none !important; }
    body.print-dashboard .main-content { margin-left: 0 !important; }
    body.print-dashboard .page { display: none !important; }
    body.print-dashboard #dashboardPage { display: block !important; }
    body.print-dashboard .page-container { width: 100%; padding: 0; }
    body.print-dashboard .panel, body.print-dashboard .analysis-summary-panel { break-inside: avoid; box-shadow: none; }
}

@media (max-width: 720px) {
    #billingChoicePanel .readiness-grid {
        grid-template-columns: 1fr;
    }

    .billing-context-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .billing-context-banner .btn {
        width: 100%;
    }
}

/* Authentication branding polish */

.auth-product-brand {
    display: block;
}

.auth-company-logo {
    display: block;
    width: min(250px, 80%);
    height: auto;
    object-fit: contain;
}

.auth-product-copy {
    margin-top: 4px;
}

.auth-product-copy .brand-name {
    margin: 0;
    color: white;
    font-size: 1.2rem;
    line-height: 1.2;
}

.auth-product-copy .brand-kicker {
    max-width: 520px;
    margin-top: 6px;
    margin-bottom: 6px;
    color: var(--teal-200);
    font-size: 0.64rem;
    line-height: 1.45;
    letter-spacing: 0.085em;
}

.sidebar-brand-icon {
    display: block;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    object-fit: contain;
}

@media (max-width: 680px) {
    .auth-brand-panel {
        max-width: none;
    }

    .auth-company-logo {
        width: min(220px, 78%);
    }

    .auth-product-copy {
        margin-top: 4px;
    }

    .auth-product-copy .brand-name {
        font-size: 1.08rem;
    }

    .auth-product-copy .brand-kicker {
        margin-top: 5px;
        font-size: 0.6rem;
    }
}

@media (max-width: 430px) {
    .auth-message {
        margin: 28px 0 22px;
    }

    .auth-message p {
        font-size: 0.88rem;
    }

    .auth-feature-grid p {
        display: none;
    }
}

/* Final authentication three-zone layout */

.auth-shell {
    padding-top: 34px;
    padding-bottom: 46px;
}

.auth-brand-panel {
    display: flex;
    min-height: calc(100vh - 80px);
    max-width: 690px;
    flex-direction: column;
}

.auth-brand-header {
    flex: 0 0 auto;
}

.auth-brand-message {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    padding: 32px 0;
}

.auth-product-brand {
    display: block;
}

.auth-company-logo {
    display: block;
    width: min(220px, 78%);
    height: auto;
    object-fit: contain;
}

.auth-product-copy {
    margin-top: 2px;
}

.auth-product-copy .brand-name {
    margin: 0;
    color: white;
    font-size: 1.2rem;
    line-height: 1.2;
}

.auth-message {
    margin: 0;
}

.auth-message .eyebrow {
    margin: 0 0 12px;
    font-size: 0.67rem;
    line-height: 1.45;
}

.auth-message p {
    max-width: 650px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.55rem, 4.6vw, 4.45rem);
    font-weight: 780;
    line-height: 1.04;
    letter-spacing: -0.055em;
    text-wrap: balance;
}

.auth-feature-grid {
    flex: 0 0 auto;
    margin-top: auto;
    padding-bottom: 18px;
}

.auth-feature-grid article {
    max-width: 620px;
}

.auth-card {
    align-self: center;
}

.sidebar-brand-icon {
    width: 42px;
    height: 42px;
}

@media (max-width: 980px) {
    .auth-shell {
        width: min(100% - 32px, 760px);
        grid-template-columns: 1fr;
        gap: 28px;
        align-items: start;
        padding: 24px 0 34px;
    }

    .auth-brand-panel {
        min-height: auto;
    }

    .auth-brand-message {
        display: block;
        margin: 24px 0 22px;
        padding: 0;
    }

    .auth-message p {
        max-width: 680px;
        font-size: clamp(2.15rem, 7vw, 3.35rem);
        line-height: 1.08;
    }

    .auth-feature-grid {
        margin-top: 0;
        padding-bottom: 0;
    }

    .auth-card {
        align-self: auto;
        width: 100%;
    }
}

@media (max-width: 680px) {
    .auth-company-logo {
        width: min(205px, 78%);
    }

    .auth-product-copy .brand-name {
        font-size: 1.08rem;
    }

    .auth-brand-message {
        margin: 20px 0;
    }

    .auth-message p {
        font-size: clamp(1.9rem, 10vw, 2.65rem);
        line-height: 1.09;
        letter-spacing: -0.045em;
    }

    .auth-feature-grid {
        gap: 9px;
    }
}


@media (max-width: 430px) {
    .auth-message .eyebrow {
        max-width: 300px;
        margin-bottom: 10px;
        font-size: 0.61rem;
    }

    .auth-message p {
        max-width: 100%;
        font-size: clamp(1.72rem, 9.2vw, 2.25rem);
        line-height: 1.1;
    }
}