:root {
    --gt-black: #000000;
    --gt-ink: #000000;
    --gt-gold: #F6D24D;
    --gt-gold-deep: #c8a93b;
    --gt-cream: #f5f5f5;
    --gt-ivory: #ffffff;
    --gt-sand: #ededed;
    --gt-muted: #7A7A7A;
    --gt-border: rgba(0, 0, 0, 0.12);
    --gt-border-strong: rgba(0, 0, 0, 0.22);
    --gt-shadow: 0 24px 60px rgba(20, 19, 20, 0.12);
    --gt-card-shadow: 0 14px 32px rgba(20, 19, 20, 0.08);
    --gt-radius-lg: 18px;
    --gt-radius-md: 12px;
    --gt-radius-sm: 8px;

    --font-heading: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--gt-sand);
    background-image:
        radial-gradient(circle at 12% -8%, rgba(246, 210, 77, 0.07), transparent 52%),
        radial-gradient(circle at 80% 0%, rgba(0, 0, 0, 0.08), transparent 45%),
        linear-gradient(135deg, var(--gt-ivory) 0%, var(--gt-cream) 55%, var(--gt-sand) 100%);
    color: var(--gt-ink);
    margin: 0;
    min-height: 100vh;
}

a {
    color: inherit;
}

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

header {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--gt-border);
    box-shadow: 0 10px 30px rgba(20, 19, 20, 0.05);
    padding: 18px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

header .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
}

header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(246, 210, 77, 0.95), rgba(246, 210, 77, 0.25), transparent);
}

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

header .brand img {
    height: 36px;
}

header .brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

header .brand-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gt-muted);
    font-weight: 600;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin: 0;
    line-height: 1.1;
}

header .title-context {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gt-muted);
    margin-left: 8px;
}

header nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

header nav a {
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--gt-border);
    background: rgba(255, 255, 255, 0.98);
    transition: all 0.2s ease;
}

header nav a:hover {
    border-color: rgba(246, 210, 77, 0.7);
    background: var(--gt-cream);
}

.status {
    font-size: 13px;
    color: var(--gt-muted);
    background: var(--gt-ivory);
    border: 1px solid rgba(246, 210, 77, 0.35);
    padding: 6px 12px;
    border-radius: 999px;
}

main {
    padding: 32px 24px 64px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--gt-ivory);
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-lg);
    padding: 22px;
    box-shadow: var(--gt-card-shadow);
    position: relative;
    overflow: hidden;
}

/* Some pages need sticky elements inside cards. */
.card--overflow-visible {
    overflow: visible;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at top left, rgba(246, 210, 77, 0.06), transparent 62%);
    opacity: 0.8;
    pointer-events: none;
}

.card > * {
    position: relative;
    z-index: 1;
}

.card + .card {
    margin-top: 24px;
}

.hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border-left: 6px solid var(--gt-gold);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.hero-pill {
    background: var(--gt-cream);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--gt-muted);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.hero-chip {
    background: var(--gt-cream);
    border: 1px solid rgba(246, 210, 77, 0.6);
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 13px;
}

.subsection-block {
    margin-top: 18px;
}

.subsection-block:first-of-type {
    margin-top: 0;
}

.subsection-title {
    font-family: var(--font-heading);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gt-muted);
    margin: 0 0 10px;
}

@media (min-width: 860px) {
    .field.compact {
        max-width: 220px;
        width: 100%;
        justify-self: start;
    }
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 11px;
    font-weight: 600;
    color: var(--gt-muted);
    margin: 0 0 6px;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 30px;
    margin: 0 0 6px;
    color: var(--gt-black);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 15px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gt-muted);
    margin: 0 0 12px;
}

.section-title + .notice {
    margin-top: -6px;
}

.notice {
    margin: 0;
    color: var(--gt-muted);
    font-size: 14px;
    line-height: 1.5;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    font-size: 14px;
}

.summary-item {
    background: var(--gt-cream);
    padding: 12px 14px;
    border-radius: var(--gt-radius-sm);
    border: 1px solid rgba(20, 19, 20, 0.08);
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--gt-ink);
}

.required {
    color: var(--gt-gold-deep);
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 12px;
    border-radius: var(--gt-radius-sm);
    border: 1px solid var(--gt-border-strong);
    font-size: 14px;
    font-family: inherit;
    background: var(--gt-ivory);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--gt-gold);
    box-shadow: 0 0 0 3px rgba(246, 210, 77, 0.3);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--gt-muted) 50%),
        linear-gradient(135deg, var(--gt-muted) 50%, transparent 50%),
        linear-gradient(to right, transparent, transparent);
    background-position: calc(100% - 18px) calc(1.2em),
        calc(100% - 13px) calc(1.2em),
        0 0;
    background-size: 5px 5px, 5px 5px, 100% 100%;
    background-repeat: no-repeat;
}

button,
.button-link {
    background: linear-gradient(135deg, var(--gt-gold), var(--gt-gold-deep));
    color: var(--gt-black);
    border: 1px solid rgba(20, 19, 20, 0.18);
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 700;
    font-family: var(--font-heading);
    letter-spacing: 0.02em;
    min-height: 44px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover,
.button-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(20, 19, 20, 0.16);
}

button.secondary,
.button-link.secondary {
    background: var(--gt-ivory);
    border: 1px solid rgba(122, 122, 122, 0.5);
    color: var(--gt-ink);
    box-shadow: none;
}

button.secondary:hover,
.button-link.secondary:hover {
    box-shadow: 0 6px 16px rgba(20, 19, 20, 0.08);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.actions-spaced {
    margin-top: 24px;
}

.phase-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.phase-tab {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--gt-border);
    color: var(--gt-ink);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
}

.phase-tab.active {
    background: var(--gt-gold);
    border-color: var(--gt-gold);
    color: var(--gt-black);
    box-shadow: 0 10px 20px rgba(246, 210, 77, 0.35);
}

.phase {
    margin-top: 16px;
}

.phase-title {
    font-family: var(--font-heading);
    font-size: 16px;
    margin: 0 0 12px;
}

.phase-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.phase-panel {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-md);
    background: var(--gt-cream);
}

.phase-panel h4 {
    margin: 0 0 8px;
    font-size: 15px;
    font-family: var(--font-heading);
}

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

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

@media (min-width: 860px) {
    .form-grid.two-column-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.form-grid .span-2 {
    grid-column: 1 / -1;
}

.short-input {
    max-width: 240px;
}

.short-field {
    max-width: 260px;
    width: 100%;
}

.creative-panels {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
    width: 100%;
}

.creative-panel,
.collapsible-panel {
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-md);
    padding: 12px 16px;
    background: var(--gt-cream);
    width: 100%;
}

.creative-panel summary,
.collapsible-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.creative-panel summary::-webkit-details-marker,
.collapsible-panel summary::-webkit-details-marker {
    display: none;
}

.creative-panel summary::after,
.collapsible-panel summary::after {
    content: "+";
    margin-left: auto;
    font-weight: 700;
}

.creative-panel[open] summary::after,
.collapsible-panel[open] summary::after {
    content: "-";
}

.creative-panel textarea,
.collapsible-panel textarea {
    margin-top: 12px;
    min-height: 180px;
    background: var(--gt-cream);
}

.multiline-textarea {
    min-height: 200px;
}

.creative-textarea {
    min-height: 200px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.success-actions .button-link,
.success-actions button {
    min-height: 44px;
    width: 100%;
}

.button-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.button-row > * {
    width: 100%;
    min-width: 0;
}

.button-stack {
    display: grid;
    gap: 10px;
}

.action-item {
    background: var(--gt-cream);
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-md);
    padding: 16px;
}

.action-item h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    margin: 0 0 10px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
    font-size: 14px;
}

.copy-area,
.mono-block {
    min-height: 140px;
    resize: vertical;
    background: var(--gt-cream);
    border-color: var(--gt-border);
    margin-bottom: 10px;
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
}

.audience-input {
    min-height: 200px;
    font-family: var(--font-body);
    font-size: 14px;
    background: var(--gt-ivory);
    border: 1px solid var(--gt-border-strong);
}

.mono-block {
    min-height: 160px;
    margin: 0;
}

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

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll .dashboard-table {
    min-width: 720px;
}

@media (max-width: 600px) {
    .table-scroll .dashboard-table {
        min-width: 560px;
    }
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dashboard-table th,
.dashboard-table td {
    border-bottom: 1px solid var(--gt-border);
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

.dashboard-table th {
    font-family: var(--font-heading);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gt-muted);
}

.dashboard-table tbody tr:hover {
    background: var(--gt-cream);
}

.queue-card {
    background: var(--gt-cream);
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-md);
    padding: 16px;
}

.queue-item {
    display: grid;
    gap: 6px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gt-border);
}

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

.queue-meta {
    font-size: 13px;
    color: var(--gt-muted);
}

.inline-link {
    color: var(--gt-ink);
    text-decoration: underline;
    font-weight: 600;
}

.stack {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.success-layout {
    display: grid;
    gap: 16px;
}

.success-overview .notice {
    margin-bottom: 16px;
}

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

.detail-row {
    display: grid;
    grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
    align-items: baseline;
    gap: 12px;
}

.detail-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gt-muted);
    font-weight: 600;
}

.detail-value {
    font-weight: 600;
    color: var(--gt-black);
}

.success-actions-card .button-stack {
    margin-bottom: 12px;
}

.success-audience .audience-input {
    min-height: 220px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (min-width: 980px) {
    .success-layout {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
        align-items: start;
    }
}

@media (max-width: 720px) {
    .detail-row {
        grid-template-columns: 1fr;
    }
}

.intake-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.demo-bar {
    display: none;
    justify-content: flex-end;
}

body.demo-mode .demo-bar {
    display: flex;
}

.section-card {
    background: var(--gt-cream);
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-lg);
    padding: 18px;
    box-shadow: var(--gt-card-shadow);
}

.intake-form .section-card {
    border-left: 4px solid rgba(246, 210, 77, 0.7);
    padding: 0;
    overflow: hidden;
}

.intake-form .section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--gt-black);
}

.section-summary .section-title {
    margin: 0;
    line-height: 1.3;
}

.intake-form .section-index {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--gt-gold);
    color: var(--gt-black);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.section-summary {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 10px;
    padding: 18px;
    cursor: pointer;
    background: var(--gt-ivory);
    list-style: none;
}

.intake-section[data-locked="true"] .section-summary {
    opacity: 0.6;
    cursor: not-allowed;
}

.section-summary-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.section-summary::marker {
    content: "";
}

.section-summary::-webkit-details-marker {
    display: none;
}

.section-toggle {
    justify-self: end;
    font-weight: 700;
    color: var(--gt-muted);
}

.section-toggle::before {
    content: "+";
}

.intake-section[open] .section-toggle {
    color: var(--gt-black);
}

.intake-section[open] .section-toggle::before {
    content: "-";
}

.success-section[open] .section-toggle {
    color: var(--gt-black);
}

.success-section[open] .section-toggle::before {
    content: "-";
}

.section-preview {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 6px 12px;
    font-size: 13px;
    color: var(--gt-muted);
}

.preview-item {
    display: grid;
    gap: 2px;
}

.preview-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
    color: var(--gt-muted);
}

.preview-value {
    color: var(--gt-black);
    font-weight: 600;
    font-size: 13px;
    word-break: break-word;
}

.intake-section[open] .section-preview {
    display: none;
}

.success-section[open] .section-preview {
    display: none;
}

.section-body {
    padding: 18px;
    border-top: 1px solid var(--gt-border);
}

.section-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.section-actions button {
    min-width: 220px;
}

.section-status {
    margin-left: auto;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--gt-border);
    background: var(--gt-ivory);
    font-size: 12px;
    color: var(--gt-muted);
    font-weight: 600;
}

.intake-section[data-complete="true"] .section-status {
    border-color: rgba(246, 210, 77, 0.7);
    background: rgba(246, 210, 77, 0.2);
    color: var(--gt-black);
}

@media (max-width: 720px) {
    .section-summary {
        padding: 16px;
    }

    .section-status {
        margin-left: 0;
    }

    .section-body {
        padding: 16px;
    }

    .section-preview {
        grid-template-columns: 1fr;
    }

    .section-actions {
        justify-content: stretch;
    }

    .section-actions button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 520px) {
    .time-select {
        grid-template-columns: 1fr;
    }
}

.section-card .section-title {
    margin-bottom: 12px;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px 16px;
}

.time-select {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px;
    gap: 8px;
}

.time-select .time-period {
    min-width: 90px;
}

@media (min-width: 860px) {
    .section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 18px;
    }
}

.grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 6px;
}

.row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.field.span-2 {
    grid-column: 1 / -1;
}

.rep-combobox {
    position: relative;
}

.rep-results {
    margin-top: 8px;
    border: 1px solid var(--gt-border-strong);
    border-radius: var(--gt-radius-sm);
    background: var(--gt-ivory);
    box-shadow: 0 14px 28px rgba(20, 19, 20, 0.12);
    max-height: min(260px, 42vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.rep-results[hidden] {
    display: none;
}

.rep-result {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
    background: transparent;
    color: var(--gt-ink);
    box-shadow: none;
    text-align: left;
    min-height: 48px;
}

.rep-result:last-child {
    border-bottom: 0;
}

.rep-result:hover,
.rep-result:focus {
    background: rgba(246, 210, 77, 0.16);
    color: var(--gt-ink);
    transform: none;
}

.rep-result-name {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
}

.rep-result-meta {
    color: var(--gt-muted);
    font-size: 12px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.rep-result-empty {
    padding: 12px;
    color: var(--gt-muted);
    font-size: 13px;
}

@media (min-width: 860px) {
    .row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.qualification-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 8px;
}

@media (min-width: 860px) {
    .qualification-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.qual-card {
    border: 1px solid var(--gt-border);
    border-radius: var(--gt-radius-md);
    padding: 14px;
    background: var(--gt-cream);
    display: flex;
    flex-direction: column;
}

.qual-question {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 10px;
    color: var(--gt-black);
}

.segmented {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.seg-option {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.seg-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.seg-option span {
    display: block;
    text-align: center;
    padding: 10px 10px;
    border-radius: 10px;
    border: 1px solid var(--gt-border-strong);
    background: var(--gt-ivory);
    font-weight: 600;
}

.seg-option input:checked + span {
    border-color: var(--gt-gold);
    box-shadow: 0 0 0 3px rgba(246, 210, 77, 0.25);
    background: rgba(246, 210, 77, 0.2);
}

.seg-option span:hover {
    border-color: rgba(20, 19, 20, 0.3);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer {
    text-align: center;
    margin-top: 18px;
    color: var(--gt-muted);
    font-size: 12px;
}

@media (max-width: 900px) {
    header {
        padding: 16px 18px;
    }

    main {
        padding: 24px 16px 48px;
    }
}

@media (max-width: 720px) {
    header .header-top {
        align-items: flex-start;
    }

    header nav {
        width: 100%;
        justify-content: flex-start;
    }

    header .title-context {
        display: none;
    }
}

/* ---------- UI polish helpers ---------- */

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 18px;
    right: 18px;
    display: grid;
    gap: 10px;
    z-index: 1000;
    width: min(380px, calc(100vw - 36px));
}

.toast {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--gt-border);
    border-left: 6px solid rgba(0, 0, 0, 0.25);
    border-radius: 14px;
    box-shadow: 0 18px 36px rgba(20, 19, 20, 0.12);
    padding: 12px 12px 12px 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 4px;
    cursor: pointer;
    animation: toast-in 180ms ease-out;
}

.toast-title {
    font-family: var(--font-heading);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gt-muted);
}

.toast-message {
    grid-column: 1 / -1;
    font-size: 14px;
    line-height: 1.4;
    color: var(--gt-black);
}

.toast-close {
    grid-row: 1;
    grid-column: 2;
    align-self: start;
    justify-self: end;
    border: 1px solid var(--gt-border);
    background: rgba(255, 255, 255, 0.96);
    border-radius: 10px;
    width: 34px;
    height: 34px;
    box-shadow: none;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    color: var(--gt-muted);
}

.toast-close:hover {
    transform: none;
    color: var(--gt-black);
    border-color: rgba(0, 0, 0, 0.2);
}

.toast-info { border-left-color: rgba(0, 0, 0, 0.25); }
.toast-success { border-left-color: rgba(30, 160, 90, 0.75); }
.toast-warning { border-left-color: rgba(246, 210, 77, 0.95); }
.toast-error { border-left-color: rgba(220, 60, 60, 0.85); }

.toast-exit {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 160ms ease, transform 160ms ease;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Busy state (prevents double clicks) */
button.is-busy,
.button-link.is-busy {
    opacity: 0.85;
    cursor: progress;
}

/* Inline validation */
.field.invalid input,
.field.invalid textarea,
.field.invalid select,
.qual-card.invalid {
    border-color: rgba(220, 60, 60, 0.65) !important;
    box-shadow: 0 0 0 3px rgba(220, 60, 60, 0.12) !important;
}

/* Inline status banners (used in pitch builder actions) */
#action-status,
#download-link {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--gt-radius-md);
    border: 1px solid rgba(246, 210, 77, 0.35);
    background: rgba(246, 210, 77, 0.12);
    display: none;
}

#action-status.status-active,
#download-link.status-active {
    display: block;
}

#action-status.status-error {
    border-color: rgba(220, 60, 60, 0.28);
    background: rgba(220, 60, 60, 0.08);
}

#action-status.status-success {
    border-color: rgba(30, 160, 90, 0.28);
    background: rgba(30, 160, 90, 0.08);
}

.error-text {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(220, 60, 60, 0.95);
}

/* Make the pitch phase nav feel anchored */
.phase-nav {
    position: sticky;
    top: 98px;
    z-index: 5;
    padding: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--gt-border);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

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


/* ---------- Modern app theme (AI Studio-ish) ----------
   Goal: keep GeoTarget colors, but make the UI feel like a modern product UI
   (consistent surfaces, typography, elevation, and component states).
*/

:root {
    /* Softer neutrals (keeps the brand gold/black) */
    --gt-sand: #f6f7fb;
    --gt-cream: #f3f4f7;

    --gt-border: rgba(17, 17, 17, 0.10);
    --gt-border-strong: rgba(17, 17, 17, 0.16);

    --gt-muted: rgba(17, 17, 17, 0.62);

    /* Cleaner shadows */
    --gt-shadow: 0 18px 50px rgba(17, 17, 17, 0.12);
    --gt-card-shadow: 0 1px 2px rgba(17, 17, 17, 0.06), 0 10px 26px rgba(17, 17, 17, 0.08);

    /* Slightly tighter radii for “app UI” consistency */
    --gt-radius-lg: 16px;
    --gt-radius-md: 12px;
    --gt-radius-sm: 10px;

    /* Use one typeface family for a more “React app” feel */
    --font-heading: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--gt-sand);
    background-image:
        radial-gradient(circle at 12% -10%, rgba(246, 210, 77, 0.12), transparent 56%),
        linear-gradient(180deg, var(--gt-ivory) 0%, var(--gt-sand) 62%);
}

header {
    padding: 16px 22px;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid var(--gt-border);
    box-shadow: 0 1px 2px rgba(17, 17, 17, 0.06);
}

header::after {
    height: 2px;
    background: linear-gradient(90deg, rgba(246, 210, 77, 0.9), rgba(246, 210, 77, 0.0));
}

header nav a {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

header nav a:hover {
    background: rgba(17, 17, 17, 0.04);
    border-color: rgba(17, 17, 17, 0.08);
}

header nav a.active {
    background: rgba(246, 210, 77, 0.22);
    border-color: rgba(246, 210, 77, 0.55);
}

.status {
    background: rgba(17, 17, 17, 0.04);
    border-color: rgba(17, 17, 17, 0.10);
}

main {
    padding-top: 28px;
}

/* Unify “surface” styling across cards/panels */
.card,
.section-card,
.queue-card,
.action-item,
.creative-panel,
.collapsible-panel,
.phase-panel {
    background: var(--gt-ivory);
    border: 1px solid var(--gt-border);
    box-shadow: var(--gt-card-shadow);
}

.card::before {
    display: none;
}

/* Reduce visual “mismatch” from mixed light-gray blocks */
.summary-item,
.hero-pill,
.hero-chip {
    background: rgba(17, 17, 17, 0.03);
    border-color: rgba(17, 17, 17, 0.08);
}

/* Typography hierarchy */
.section-title {
    font-size: 16px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--gt-black);
}

.subsection-title,
.detail-label,
.toast-title,
.brand-kicker {
    letter-spacing: 0.12em;
}

/* Form controls: cleaner “product UI” look */
input,
textarea,
select {
    border-color: var(--gt-border-strong);
    background: var(--gt-ivory);
}

input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 4px rgba(246, 210, 77, 0.22);
}

/* Buttons: flatten gradients + remove jumpy hover translate */
button,
.button-link {
    background: var(--gt-gold);
    border: 1px solid rgba(17, 17, 17, 0.12);
    box-shadow: 0 1px 2px rgba(17, 17, 17, 0.10);
    transform: none;
}

button:hover,
.button-link:hover {
    transform: none;
    filter: brightness(0.98);
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.12);
}

button:active,
.button-link:active {
    filter: brightness(0.96);
}

button.secondary,
.button-link.secondary {
    background: var(--gt-ivory);
    border-color: rgba(17, 17, 17, 0.16);
}

button.secondary:hover,
.button-link.secondary:hover {
    background: rgba(17, 17, 17, 0.03);
}

button:disabled,
.button-link:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    filter: none;
    box-shadow: none;
}

/* Phase nav: less “pill-y” to match modern app shells */
.phase-nav {
    border-radius: var(--gt-radius-lg);
    padding: 10px 12px;
}

/* Details sections: keep headers aligned with new surfaces */
.section-summary {
    background: rgba(255, 255, 255, 0.92);
}

.section-body {
    background: rgba(17, 17, 17, 0.02);
}

/* Tables */
.dashboard-table tbody tr:hover {
    background: rgba(17, 17, 17, 0.03);
}

/* ---------- CommandCenter dark theme ---------- */
body.theme-dark {
    --gt-black: #f8fafc;
    --gt-ink: #e2e8f0;
    --gt-gold: #facc15;
    --gt-gold-deep: #eab308;
    --gt-cream: #111827;
    --gt-ivory: #0f172a;
    --gt-sand: #0b1220;
    --gt-muted: rgba(148, 163, 184, 0.78);
    --gt-border: rgba(148, 163, 184, 0.18);
    --gt-border-strong: rgba(148, 163, 184, 0.32);
    --gt-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    --gt-card-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --gt-accent: #2563eb;
    --gt-link: #93c5fd;
    --gt-link-strong: #60a5fa;

    background-color: #eef2f7;
    background-image:
        radial-gradient(circle at 20% -10%, rgba(250, 204, 21, 0.06), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.06), transparent 45%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: var(--gt-ink);
}

/* Login page keeps the dark CommandCenter look */
body.login-page {
    background-color: #0b1220;
    background-image:
        radial-gradient(circle at 12% -10%, rgba(250, 204, 21, 0.12), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.12), transparent 45%),
        linear-gradient(180deg, #0f172a 0%, #0b1220 65%);
    color: #e2e8f0;
}

body.login-page .login-panel {
    background: transparent;
}

body.login-page .login-card {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.25);
    color: #e2e8f0;
}

body.login-page .login-header h1 {
    color: #f8fafc;
}

body.login-page .login-header p {
    color: rgba(148, 163, 184, 0.75);
}

body.login-page label {
    color: rgba(148, 163, 184, 0.85);
}

body.login-page input,
body.login-page textarea,
body.login-page select {
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.25);
}

body.login-page input::placeholder,
body.login-page textarea::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

body.login-page .login-logo {
    max-width: 220px;
}

body.theme-dark header {
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid var(--gt-border);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

body.theme-dark header::after {
    background: linear-gradient(90deg, rgba(250, 204, 21, 0.85), rgba(37, 99, 235, 0.35), transparent);
}

body.theme-dark header .brand-kicker {
    color: rgba(148, 163, 184, 0.7);
}

body.theme-dark header h1 {
    color: var(--gt-black);
}

body.theme-dark header nav a {
    color: var(--gt-muted);
    background: transparent;
    border-color: transparent;
}

body.theme-dark header nav a:hover {
    color: var(--gt-black);
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.25);
}

body.theme-dark header nav a.active {
    color: var(--gt-black);
    background: rgba(37, 99, 235, 0.24);
    border-color: rgba(37, 99, 235, 0.45);
}

body.theme-dark .status {
    color: var(--gt-muted);
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.25);
}

body.theme-dark .card,
body.theme-dark .section-card,
body.theme-dark .queue-card,
body.theme-dark .action-item,
body.theme-dark .creative-panel,
body.theme-dark .collapsible-panel,
body.theme-dark .phase-panel {
    background: var(--gt-ivory);
    border-color: var(--gt-border);
    box-shadow: var(--gt-card-shadow);
}

body.theme-dark .summary-item,
body.theme-dark .hero-pill,
body.theme-dark .hero-chip {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--gt-ink);
}

body.theme-dark .section-summary {
    background: rgba(15, 23, 42, 0.86);
    border-bottom: 1px solid var(--gt-border);
}

body.theme-dark .section-body {
    background: rgba(15, 23, 42, 0.6);
}

body.theme-dark .section-status {
    background: rgba(15, 23, 42, 0.7);
    border-color: var(--gt-border);
    color: var(--gt-muted);
}

body.theme-dark .phase-nav {
    background: rgba(15, 23, 42, 0.92);
    border-color: var(--gt-border);
}

body.theme-dark .phase-tab {
    background: rgba(15, 23, 42, 0.72);
    color: var(--gt-ink);
    border-color: var(--gt-border);
}

body.theme-dark .phase-tab.active {
    background: var(--gt-accent);
    border-color: rgba(37, 99, 235, 0.6);
    color: #f8fafc;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
    background: rgba(15, 23, 42, 0.9);
    color: var(--gt-black);
    border-color: var(--gt-border-strong);
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

body.theme-dark input:focus,
body.theme-dark textarea:focus,
body.theme-dark select:focus {
    border-color: rgba(37, 99, 235, 0.7);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

body.theme-dark button,
body.theme-dark .button-link {
    color: #111827;
    border-color: rgba(250, 204, 21, 0.6);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

body.theme-dark button.secondary,
body.theme-dark .button-link.secondary {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(148, 163, 184, 0.35);
    color: var(--gt-ink);
    box-shadow: none;
}

body.theme-dark button.secondary:hover,
body.theme-dark .button-link.secondary:hover {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.5);
    color: #f8fafc;
}

body.theme-dark .inline-link {
    color: var(--gt-link);
}

body.theme-dark .inline-link:hover {
    color: var(--gt-link-strong);
}

body.theme-dark .dashboard-table tbody tr:hover {
    background: rgba(148, 163, 184, 0.08);
}

body.theme-dark .toast {
    background: rgba(15, 23, 42, 0.98);
    border-color: var(--gt-border);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

body.theme-dark .toast-message {
    color: var(--gt-black);
}

body.theme-dark .toast-close {
    background: rgba(15, 23, 42, 0.9);
    border-color: var(--gt-border);
    color: var(--gt-muted);
}

/* ---------- Login page ---------- */
.login-page {
    min-height: 100vh;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.login-hero {
    position: relative;
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    border-right: 1px solid var(--gt-border);
    color: var(--gt-black);
    background:
        radial-gradient(circle at 12% 0%, rgba(250, 204, 21, 0.18), transparent 55%),
        radial-gradient(circle at 80% 12%, rgba(37, 99, 235, 0.18), transparent 45%),
        linear-gradient(160deg, rgba(15, 23, 42, 0.98), rgba(8, 14, 27, 0.98));
}

.login-hero-content {
    max-width: 420px;
}

.login-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.login-hero-tag {
    margin: 24px 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 12px;
    font-weight: 600;
    color: var(--gt-muted);
}

.login-hero-copy {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(226, 232, 240, 0.8);
    margin: 0;
}

.login-hero-footer {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: rgba(148, 163, 184, 0.7);
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: rgba(8, 12, 22, 0.88);
}

.login-card {
    width: min(420px, 100%);
    background: var(--gt-ivory);
    border: 1px solid var(--gt-border);
    border-radius: 20px;
    padding: 36px;
    box-shadow: var(--gt-shadow);
}

.login-mobile-brand {
    display: none;
    text-align: center;
    margin-bottom: 24px;
}

.login-mobile-tag {
    margin: 12px 0 0;
    font-size: 12px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gt-muted);
    font-weight: 600;
}

.login-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
    color: var(--gt-black);
}

.login-header p {
    margin: 0 0 24px;
    color: var(--gt-muted);
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label {
    font-size: 13px;
    color: var(--gt-muted);
}

.login-submit {
    margin-top: 10px;
    width: 100%;
}

.login-error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: rgba(248, 113, 113, 0.95);
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-hero {
        display: none !important;
    }

    .login-panel {
        padding: 36px 20px;
    }

    .login-card {
        padding: 32px 24px;
    }

    .login-mobile-brand {
        display: block;
    }
}

@media (max-width: 980px) {
    body.login-page .login-panel {
        padding: 28px 18px;
    }

    body.login-page .login-card {
        padding: 26px 22px;
        box-shadow: none;
    }

    body.login-page .login-logo {
        height: 40px;
    }
}

/* ---------- Logged-in shell polish ---------- */
body.theme-dark .app-header {
    min-height: 56px;
    height: auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid var(--gt-border);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

body.theme-dark .app-header .header-top {
    align-items: center;
    width: 100%;
    gap: 24px;
}

body.theme-dark .brand {
    gap: 12px;
}

body.theme-dark .brand-link img {
    height: 30px;
}

body.theme-dark .brand-text {
    gap: 2px;
}

body.theme-dark .brand-kicker {
    font-size: 10px;
    letter-spacing: 0.24em;
    color: rgba(148, 163, 184, 0.7);
}

body.theme-dark .app-header h1 {
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.92);
}

body.theme-dark nav {
    gap: 8px;
}

body.theme-dark nav a {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.78);
    background: transparent;
    border: 1px solid transparent;
    padding: 6px 12px;
}

body.theme-dark nav a.active {
    color: #f8fafc;
    background: rgba(37, 99, 235, 0.22);
    border-color: rgba(37, 99, 235, 0.5);
}

body.theme-dark main {
    padding: 28px 24px 60px;
}

body.theme-dark .card,
body.theme-dark .section-card,
body.theme-dark .queue-card,
body.theme-dark .action-item,
body.theme-dark .creative-panel,
body.theme-dark .collapsible-panel,
body.theme-dark .phase-panel {
    background: #f8fafc;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

body.theme-dark .summary-item,
body.theme-dark .hero-pill,
body.theme-dark .hero-chip {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

body.theme-dark .section-summary {
    background: #0f172a;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

body.theme-dark .section-body {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

body.theme-dark .section-status {
    background: rgba(148, 163, 184, 0.18);
    border-color: rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
}

body.theme-dark .section-toggle {
    color: #cbd5f5;
}

body.theme-dark .section-index {
    background: #facc15;
    color: #0f172a;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.16);
}

body.theme-dark .preview-label {
    color: rgba(226, 232, 240, 0.7);
}

body.theme-dark .preview-value {
    color: #f8fafc;
}

body.theme-dark .section-summary .section-title {
    color: #f8fafc;
}

body.theme-dark .qual-card {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.theme-dark .seg-option span {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

body.theme-dark .seg-option input:checked + span {
    border-color: #facc15;
    background: rgba(250, 204, 21, 0.22);
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.22);
}

body.theme-dark .seg-option span:hover {
    border-color: #94a3b8;
}

/* Qualification cards: keep dark like CommandCenter */
body.theme-dark .qualification-grid .qual-card {
    background: #0f172a;
    border-color: #1e293b;
    color: #e2e8f0;
}

body.theme-dark .qualification-grid .qual-question {
    color: #f8fafc;
}

body.theme-dark .qualification-grid .seg-option span {
    background: #111827;
    border-color: #1f2937;
    color: #e2e8f0;
}

body.theme-dark .qualification-grid .seg-option input:checked + span {
    background: #facc15;
    border-color: #facc15;
    color: #0f172a;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
}

body.theme-dark .qualification-grid .seg-option span:hover {
    border-color: #334155;
}

body.theme-dark .phase-nav {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

body.theme-dark .phase-tab {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #0f172a;
}

body.theme-dark .phase-tab.active {
    background: #2563eb;
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

body.theme-dark .section-title {
    color: #0f172a;
    font-weight: 600;
}

body.theme-dark .subsection-title,
body.theme-dark .notice {
    color: rgba(15, 23, 42, 0.62);
}

body.theme-dark label {
    color: #475569;
    font-weight: 600;
}

body.theme-dark .subsection-title {
    color: #475569;
    font-weight: 700;
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.2);
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
    color: #94a3b8;
}

body.theme-dark input:focus,
body.theme-dark textarea:focus,
body.theme-dark select:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

body.theme-dark .dashboard-table th {
    color: rgba(15, 23, 42, 0.6);
}

/* ---------- Compact density (CommandCenter-ish) ---------- */
body.theme-dark:not(.login-page) {
    font-size: 14.5px;
}

body.theme-dark:not(.login-page) .app-header {
    min-height: 56px;
    height: auto;
    padding: 8px 20px;
}

body.theme-dark:not(.login-page) nav a {
    padding: 4px 9px;
}

body.theme-dark:not(.login-page) main {
    padding: 22px 18px 48px;
}

body.theme-dark:not(.login-page) .card {
    padding: 18px;
}

body.theme-dark:not(.login-page) .section-summary {
    padding: 12px 14px;
}

body.theme-dark:not(.login-page) .section-body {
    padding: 12px 14px;
}

body.theme-dark:not(.login-page) input,
body.theme-dark:not(.login-page) textarea,
body.theme-dark:not(.login-page) select {
    padding: 9px 11px;
    font-size: 0.94em;
}

body.theme-dark:not(.login-page) button,
body.theme-dark:not(.login-page) .button-link {
    padding: 8px 12px;
    min-height: 38px;
}

body.theme-dark:not(.login-page) .phase-nav {
    padding: 7px 9px;
}

body.theme-dark:not(.login-page) .phase-tab {
    padding: 5px 10px;
    font-size: 11px;
}

body.theme-dark:not(.login-page) .qual-card {
    padding: 10px;
}

body.theme-dark:not(.login-page) .seg-option span {
    padding: 7px 9px;
}

/* Audience phase spacing + cleanliness */
body.theme-dark .phase[data-phase="audience"] {
    margin-top: 12px;
}

body.theme-dark .phase[data-phase="audience"] .form-grid {
    gap: 12px;
}

body.theme-dark .phase[data-phase="audience"] .form-grid.two-column-grid {
    gap: 12px;
}

body.theme-dark .phase[data-phase="audience"] .collapsible-panel {
    padding: 10px 12px;
}

body.theme-dark .phase[data-phase="audience"] .phase-panel {
    margin-top: 12px;
}

body.theme-dark .phase[data-phase="audience"] .phase-actions {
    margin-top: 14px;
}

/* Force dark qualification cards + buttons (final override) */
body.theme-dark .intake-form .qualification-grid .qual-card {
    background: #0f172a;
    border-color: #1e293b;
    color: #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
}

body.theme-dark .intake-form .qualification-grid .qual-question {
    color: #f8fafc;
}

body.theme-dark .intake-form .qualification-grid .seg-option span {
    background: #111827;
    border-color: #1f2937;
    color: #e2e8f0;
}

body.theme-dark .intake-form .qualification-grid .seg-option span:hover {
    border-color: #334155;
}

body.theme-dark .intake-form .qualification-grid .seg-option input:checked + span {
    background: #facc15;
    border-color: #facc15;
    color: #0f172a;
    box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
}

/* Dashboard spacing + table density */
body.theme-dark .dashboard-section {
    margin-top: 16px;
}

body.theme-dark .queue-card {
    padding: 12px;
}

body.theme-dark .queue-item {
    gap: 4px;
    padding: 10px 0;
}

body.theme-dark .queue-meta {
    font-size: 12px;
    color: #64748b;
}

body.theme-dark .card.table-scroll {
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

body.theme-dark .dashboard-table {
    font-size: 13px;
}

body.theme-dark .dashboard-table th {
    padding: 10px 12px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 11px;
    letter-spacing: 0.12em;
}

body.theme-dark .dashboard-table td {
    padding: 12px;
    border-bottom: 1px solid #eef2f7;
}

body.theme-dark .dashboard-table tbody tr:hover {
    background: #f1f5f9;
}

/* ---------- Crisp cleanup override ---------- */
body.theme-dark {
    -webkit-font-smoothing: antialiased;
    text-rendering: auto;
}

body.theme-dark .card,
body.theme-dark .section-card,
body.theme-dark .queue-card,
body.theme-dark .action-item,
body.theme-dark .creative-panel,
body.theme-dark .collapsible-panel,
body.theme-dark .phase-panel {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

body.theme-dark .summary-item,
body.theme-dark .hero-pill,
body.theme-dark .hero-chip {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.theme-dark .section-body {
    background: #ffffff;
}

body.theme-dark .phase-nav {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: none;
}

body.theme-dark .phase-tab {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}

body.theme-dark .phase-tab.active {
    box-shadow: none;
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
    border-color: #cbd5e1;
    box-shadow: none;
}

body.theme-dark button,
body.theme-dark .button-link {
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}

body.theme-dark button.secondary,
body.theme-dark .button-link.secondary {
    box-shadow: none;
}

/* ---------- Mobile optimization ---------- */
@media (max-width: 820px) {
    body.theme-dark:not(.login-page) .app-header {
        height: auto;
        padding: 10px 14px;
    }

    body.theme-dark:not(.login-page) .app-header .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    body.theme-dark:not(.login-page) .brand-text {
        display: none;
    }

    body.theme-dark:not(.login-page) nav {
        width: 100%;
        flex-wrap: wrap;
        gap: 6px;
    }

    body.theme-dark:not(.login-page) nav a {
        font-size: 10px;
        letter-spacing: 0.12em;
        padding: 4px 8px;
    }

    body.theme-dark .status {
        margin-left: 0;
    }

    body.theme-dark:not(.login-page) main {
        padding: 16px 12px 32px;
    }

    body.theme-dark .card,
    body.theme-dark .section-card,
    body.theme-dark .queue-card,
    body.theme-dark .action-item,
    body.theme-dark .creative-panel,
    body.theme-dark .collapsible-panel,
    body.theme-dark .phase-panel {
        border-radius: 14px;
    }

    body.theme-dark .section-summary {
        padding: 12px 14px;
        gap: 8px;
    }

    body.theme-dark .section-summary-main {
        width: 100%;
    }

    body.theme-dark .section-status {
        margin-left: 0;
    }

    body.theme-dark .section-preview {
        grid-template-columns: 1fr;
    }

    body.theme-dark .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    body.theme-dark .form-actions button {
        width: 100%;
    }

    body.theme-dark .phase-nav {
        position: static;
        padding: 6px;
        flex-wrap: wrap;
        border-radius: 12px;
    }

    body.theme-dark .phase-tab {
        flex: 1 1 120px;
        text-align: center;
    }

    body.theme-dark .qualification-grid {
        gap: 10px;
    }

    body.theme-dark .summary-grid {
        grid-template-columns: 1fr;
    }

    body.theme-dark .action-grid {
        grid-template-columns: 1fr;
    }

    body.theme-dark .button-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    body.theme-dark .dashboard-table th,
    body.theme-dark .dashboard-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    body.theme-dark .queue-card {
        padding: 10px;
    }

    body.theme-dark .queue-item {
        padding: 8px 0;
    }

    body.theme-dark .dashboard-table td form {
        gap: 8px;
    }

    body.theme-dark .dashboard-table td form select,
    body.theme-dark .dashboard-table td form button {
        min-height: 34px;
        font-size: 12px;
    }
}

/* ---------- Typography + reassign cleanup ---------- */
body.theme-dark .section-title,
body.theme-dark .phase-title,
body.theme-dark .qual-question,
body.theme-dark label,
body.theme-dark .dashboard-table th {
    letter-spacing: 0;
}

body.theme-dark .detail-label {
    color: #475569;
}

body.theme-dark .detail-value {
    color: #0f172a;
    font-weight: 600;
}

/* Card headers like intake */
body.theme-dark .card--header {
    padding: 16px;
}

body.theme-dark .card--header > .section-title {
    margin: -16px -16px 16px;
    padding: 12px 16px;
    background: #0f172a;
    color: #f8fafc;
    border-bottom: 1px solid #1e293b;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

body.theme-dark .card--header > .section-title + * {
    margin-top: 0;
}

/* Pitch builder alignment with intake styling */
body.theme-dark #pitch-form {
    background: #ffffff;
}

body.theme-dark #pitch-form .phase-nav {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px;
    border-radius: 12px;
}

body.theme-dark #pitch-form .phase-tab {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
    font-weight: 600;
}

body.theme-dark #pitch-form .phase-tab.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

body.theme-dark #pitch-form .phase {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    padding: 16px;
    margin-top: 16px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

body.theme-dark #pitch-form .phase-title {
    margin: -16px -16px 14px;
    padding: 12px 16px;
    background: #0f172a;
    color: #f8fafc;
    border-bottom: 1px solid #1e293b;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

body.theme-dark #pitch-form .form-grid {
    gap: 12px;
}

body.theme-dark #pitch-form .form-grid + .form-grid.two-column-grid {
    margin-top: 12px;
}

body.theme-dark #pitch-form .form-grid + .phase-panel {
    margin-top: 12px;
}

body.theme-dark #pitch-form .creative-panel,
body.theme-dark #pitch-form .collapsible-panel {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.theme-dark #pitch-form .creative-panel summary,
body.theme-dark #pitch-form .collapsible-panel summary {
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 12px;
}

body.theme-dark #pitch-form .phase-panel {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.theme-dark .success-overview .notice {
    color: #475569;
}

body.theme-dark .dashboard-table th {
    font-size: 12px;
    font-weight: 600;
}

body.theme-dark .dashboard-table td {
    font-size: 13px;
    line-height: 1.35;
    vertical-align: middle;
}

body.theme-dark .dashboard-table td form {
    display: grid;
    gap: 6px;
}

body.theme-dark .dashboard-table td form select,
body.theme-dark .dashboard-table td form button {
    width: 100%;
    min-height: 32px;
    font-size: 12px;
    padding: 6px 10px;
}

.handoff2-shell {
    display: grid;
    gap: 22px;
}

.handoff2-hero {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-left: 6px solid var(--gt-gold);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--gt-card-shadow);
}

.handoff2-hero h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
}

.handoff2-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.handoff2-meta span,
.handoff2-client {
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #f8f8f8;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
}

.handoff2-client {
    min-width: 240px;
    display: grid;
    gap: 4px;
}

.handoff2-client span,
.handoff2-summary span {
    color: var(--gt-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.handoff2-client small {
    color: var(--gt-muted);
}

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

.handoff2-actions button,
.handoff2-actions .button-link {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.disabled-link {
    opacity: 0.48;
    cursor: not-allowed;
}

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

.handoff2-summary > div {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 16px;
    display: grid;
    gap: 8px;
}

.handoff2-dialog {
    width: min(780px, calc(100vw - 32px));
    border: 0;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.handoff2-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.dialog-shell {
    padding: 22px;
    background: #ffffff;
}

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

.dialog-header h3 {
    margin: 0;
    font-size: 22px;
}

.dialog-close {
    width: auto;
}

body.theme-dark .handoff2-hero,
body.theme-dark .handoff2-summary > div,
body.theme-dark .dialog-shell {
    background: #101012;
    color: #f7f7f7;
    border-color: rgba(255, 255, 255, 0.14);
}

body.theme-dark .handoff2-meta span,
body.theme-dark .handoff2-client {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

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

    .handoff2-client {
        width: 100%;
        min-width: 0;
    }
}

/* Handoff2 visual system: scoped so legacy Handoff pages keep their current UI. */
.handoff2-shell {
    width: min(1180px, calc(100vw - 32px));
    margin: -8px auto 0;
    gap: 18px;
    color: #f8fafc;
}

.handoff2-stage {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(246, 210, 77, 0.16), transparent 34%),
        radial-gradient(circle at 88% 14%, rgba(68, 68, 68, 0.9), transparent 32%),
        linear-gradient(145deg, #08090b 0%, #111317 46%, #191b1f 100%);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.handoff2-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(135deg, rgba(0, 0, 0, 0.8), transparent 72%);
    pointer-events: none;
}

.handoff2-hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 28px;
    align-items: end;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 34px 34px 24px;
}

.handoff2-hero-copy {
    min-width: 0;
}

.handoff2-hero .eyebrow,
.handoff2-panel-head .eyebrow,
.handoff2-dialog .eyebrow {
    color: #f6d24d;
    letter-spacing: 0.16em;
}

.handoff2-hero h2 {
    max-width: 820px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 0.96;
    font-weight: 800;
}

.handoff2-meta {
    gap: 10px;
    margin-top: 18px;
}

.handoff2-meta span {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.handoff2-client {
    min-width: 0;
    padding: 18px;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    backdrop-filter: blur(14px);
}

.handoff2-client span,
.handoff2-client small {
    color: #a1a1aa;
}

.handoff2-client strong {
    font-size: 20px;
}

.handoff2-workspace {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.handoff2-rail {
    padding: 28px;
    display: grid;
    gap: 12px;
    align-content: start;
    background: rgba(0, 0, 0, 0.18);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.handoff2-step {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 4px 12px;
    padding: 12px 0;
    color: #a1a1aa;
}

.handoff2-step span {
    grid-row: span 2;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
}

.handoff2-step strong {
    color: #f8fafc;
    font-size: 14px;
}

.handoff2-step small {
    font-size: 12px;
}

.handoff2-step.is-active span,
.handoff2-step.is-complete span {
    color: #111111;
    background: #f6d24d;
    border-color: #f6d24d;
}

.handoff2-action-panel {
    padding: 28px;
}

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

.handoff2-panel-head h3 {
    margin: 0;
    font-size: 24px;
    color: #ffffff;
}

.handoff2-state {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    color: #f6d24d;
    border: 1px solid rgba(246, 210, 77, 0.38);
    background: rgba(246, 210, 77, 0.1);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.handoff2-state.is-ready {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.38);
    background: rgba(34, 197, 94, 0.12);
}

.handoff2-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.handoff2-actions button,
.handoff2-actions .button-link {
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-shadow: none;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.handoff2-actions button:hover,
.handoff2-actions .button-link:hover {
    transform: translateY(-1px);
    border-color: rgba(246, 210, 77, 0.62);
    background: rgba(255, 255, 255, 0.16);
}

.handoff2-primary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.handoff2-action-card {
    justify-content: flex-start !important;
    gap: 10px;
    min-height: 48px !important;
    padding: 9px 12px !important;
    text-align: left !important;
    font-size: 13px;
    line-height: 1.2;
}

.handoff2-action-number {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #111111;
    background: #f6d24d;
    font-size: 12px;
    font-weight: 900;
}

.handoff2-advanced-options {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}

.handoff2-advanced-options summary {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    list-style: none;
}

.handoff2-advanced-options summary::-webkit-details-marker {
    display: none;
}

.handoff2-advanced-options summary::after {
    content: "+";
    margin-left: auto;
    color: #f6d24d;
    font-size: 16px;
    line-height: 1;
}

.handoff2-advanced-options[open] summary::after {
    content: "-";
}

.handoff2-advanced-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0 10px 10px;
}

.handoff2-advanced-actions button,
.handoff2-advanced-actions .button-link {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 12px;
}

.handoff2-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.handoff2-summary > div {
    color: #f8fafc;
    background: #101114;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 18px;
    box-shadow: none;
}

.handoff2-summary span {
    color: #a1a1aa;
}

.handoff2-summary strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.handoff2-queue {
    width: min(1180px, calc(100vw - 32px));
    gap: 16px;
}

.handoff2-queue .handoff2-stage {
    border-radius: 22px;
    box-shadow: 0 24px 68px rgba(0, 0, 0, 0.32);
}

.handoff2-queue .handoff2-hero {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 24px;
    padding: 30px 34px 22px;
    align-items: end;
}

.handoff2-queue .handoff2-hero h2 {
    font-size: clamp(34px, 4.6vw, 56px);
    line-height: 0.98;
}

.handoff2-queue .handoff2-meta {
    gap: 8px;
    margin-top: 14px;
}

.handoff2-queue .handoff2-meta span {
    padding: 7px 11px;
    font-size: 12px;
}

.handoff2-queue .handoff2-client {
    padding: 16px;
    border-radius: 16px;
}

.handoff2-queue .handoff2-client strong {
    font-size: 18px;
}

.handoff2-queue .handoff2-client small {
    font-size: 12px;
    line-height: 1.35;
}

.handoff2-queue .handoff2-action-panel {
    padding: 22px 34px 26px;
}

.handoff2-queue .handoff2-panel-head {
    margin-bottom: 12px;
}

.handoff2-queue .handoff2-panel-head h3 {
    font-size: 19px;
}

.handoff2-queue .handoff2-list {
    gap: 7px;
}

.handoff2-queue .handoff2-row-shell {
    gap: 8px;
}

.handoff2-queue .handoff2-row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(92px, auto));
    gap: 7px;
    align-items: stretch;
}

.handoff2-queue .handoff2-row {
    grid-template-columns: minmax(0, 1.5fr) minmax(150px, 0.65fr) auto;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 11px;
}

.handoff2-queue .handoff2-row strong {
    font-size: 14px;
    line-height: 1.25;
}

.handoff2-queue .handoff2-row small {
    font-size: 11px;
    line-height: 1.25;
}

.handoff2-queue .handoff2-state {
    min-height: 28px;
    padding: 0 9px;
    font-size: 11px;
}

.handoff2-queue .handoff2-invalidate,
.handoff2-queue .handoff2-reschedule {
    min-width: 96px;
    position: relative;
}

.handoff2-queue .handoff2-invalidate summary,
.handoff2-queue .handoff2-reschedule summary {
    min-height: 38px;
    border-radius: 11px;
    font-size: 11px;
}

.handoff2-queue .handoff2-reschedule summary {
    display: grid;
    place-items: center;
    height: 100%;
    padding: 0 12px;
    border: 1px solid rgba(96, 165, 250, 0.38);
    color: #bfdbfe;
    background: rgba(30, 64, 175, 0.3);
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.handoff2-queue .handoff2-reschedule summary::-webkit-details-marker {
    display: none;
}

.handoff2-queue .handoff2-reschedule[open] summary,
.handoff2-queue .handoff2-reschedule summary:hover {
    border-color: rgba(96, 165, 250, 0.72);
    color: #eff6ff;
    background: rgba(37, 99, 235, 0.45);
}

.handoff2-queue .handoff2-reschedule form {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 8;
    display: grid;
    grid-template-columns: 260px auto;
    gap: 8px;
    width: max-content;
    max-width: min(460px, calc(100vw - 48px));
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: #111317;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
}

.handoff2-queue .handoff2-reschedule label {
    display: grid;
    gap: 4px;
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.handoff2-queue .handoff2-reschedule input {
    min-height: 36px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 9px;
    background: #ffffff;
    color: #111111;
}

.handoff2-queue .handoff2-reschedule button {
    align-self: end;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid rgba(96, 165, 250, 0.45);
    border-radius: 9px;
    color: #eff6ff;
    background: rgba(37, 99, 235, 0.64);
    font-weight: 800;
    cursor: pointer;
}

.handoff2-queue .handoff2-empty {
    padding: 14px;
    border-radius: 12px;
    font-size: 13px;
}

.handoff2-queue-summary {
    display: none;
}

.handoff2-previous-panel {
    margin: 0 22px 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
}

.handoff2-previous-panel > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 14px;
    color: #f8fafc;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    list-style: none;
}

.handoff2-previous-panel > summary::-webkit-details-marker {
    display: none;
}

.handoff2-previous-panel > summary strong {
    display: grid;
    min-width: 28px;
    min-height: 24px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 12px;
}

.handoff2-list--previous {
    padding: 0 12px 12px;
}

.handoff2-row--previous {
    opacity: 0.82;
}

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

.handoff2-delete-notice {
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid rgba(52, 211, 153, 0.24);
    border-radius: 14px;
    color: #bbf7d0;
    background: rgba(22, 163, 74, 0.16);
}

.handoff2-row-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.handoff2-row,
.handoff2-summary-link {
    text-decoration: none;
    color: #f8fafc;
}

.handoff2-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.8fr) auto;
    gap: 14px;
    align-items: center;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.handoff2-row:hover,
.handoff2-summary-link:hover {
    transform: translateY(-2px);
    border-color: rgba(246, 210, 77, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

.handoff2-row span,
.handoff2-summary-link {
    display: grid;
    gap: 4px;
}

.handoff2-row small,
.handoff2-empty {
    color: #a1a1aa;
}

.handoff2-empty {
    padding: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 16px;
}

.handoff2-invalidate {
    position: relative;
    align-self: stretch;
    min-width: 118px;
}

.handoff2-invalidate summary {
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: 16px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.28);
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
    font-size: 12px;
    font-weight: 800;
    list-style: none;
}

.handoff2-invalidate summary::-webkit-details-marker {
    display: none;
}

.handoff2-invalidate summary:hover,
.handoff2-invalidate[open] summary {
    border-color: rgba(248, 113, 113, 0.72);
    color: #fff1f2;
    background: rgba(185, 28, 28, 0.42);
}

.handoff2-invalidate form {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 6;
    display: grid;
    grid-template-columns: minmax(180px, 240px) auto;
    gap: 8px;
    width: max-content;
    max-width: min(420px, calc(100vw - 48px));
    margin: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: #111317;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.36);
}

.handoff2-invalidate input {
    min-height: 40px;
    border-radius: 10px;
    background: #ffffff;
    color: #111111;
}

.handoff2-invalidate button {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(248, 113, 113, 0.45);
    border-radius: 10px;
    color: #fff1f2;
    background: rgba(185, 28, 28, 0.58);
    font-weight: 800;
    cursor: pointer;
}

.handoff2-invalidate--pitch {
    width: fit-content;
    margin: 0 28px 22px auto;
}

.handoff2-invalidate--pitch form {
    right: 0;
}

.handoff2-invalidate--summary {
    align-self: stretch;
}

.handoff2-summary-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.handoff2-summary-link {
    background: #101114;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 18px;
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.handoff2-dialog {
    border-radius: 20px;
    background: #0f1115;
    color: #f8fafc;
}

.handoff2-dialog::backdrop {
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
}

.handoff2-dialog .dialog-shell,
body.theme-dark .handoff2-dialog .dialog-shell {
    background: #0f1115;
    color: #f8fafc;
}

.handoff2-dialog input,
.handoff2-dialog textarea {
    background: #171a20;
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.14);
}

.handoff2-dialog label {
    color: #d4d4d8;
}

.handoff2-dialog .notice {
    color: #d4d4d8;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 960px) {
    .handoff2-hero,
    .handoff2-workspace,
    .handoff2-summary {
        grid-template-columns: 1fr;
    }

    .handoff2-rail {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .handoff2-actions {
        grid-template-columns: 1fr;
    }

    .handoff2-primary-actions,
    .handoff2-advanced-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .handoff2-shell {
        width: min(100%, calc(100vw - 20px));
        margin-top: -16px;
    }

    .handoff2-stage {
        border-radius: 18px;
    }

    .handoff2-row-shell,
    .handoff2-summary-item {
        grid-template-columns: 1fr;
    }

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

    .handoff2-invalidate {
        width: 100%;
        min-height: 44px;
    }

    .handoff2-invalidate form {
        position: static;
        width: 100%;
        max-width: 100%;
        margin-top: 8px;
        grid-template-columns: 1fr;
    }

    .handoff2-hero,
    .handoff2-action-panel,
    .handoff2-rail {
        padding: 20px;
    }

    .handoff2-rail,
    .handoff2-actions {
        grid-template-columns: 1fr;
    }

    .handoff2-primary-actions,
    .handoff2-advanced-actions {
        grid-template-columns: 1fr;
    }

    .handoff2-queue {
        width: min(100%, calc(100vw - 20px));
    }

    .handoff2-queue .handoff2-hero,
    .handoff2-queue .handoff2-row {
        grid-template-columns: 1fr;
    }

    .handoff2-queue .handoff2-row-shell,
    .handoff2-queue .handoff2-row-actions,
    .handoff2-queue .handoff2-reschedule form {
        grid-template-columns: 1fr;
    }

    .handoff2-queue .handoff2-reschedule form,
    .handoff2-queue .handoff2-invalidate form {
        left: 0;
        right: auto;
        width: min(100%, calc(100vw - 48px));
    }

    .handoff2-queue .handoff2-hero,
    .handoff2-queue .handoff2-action-panel {
        padding: 16px;
    }

    .handoff2-previous-panel {
        margin: 0 16px 16px;
    }

    .handoff2-panel-head {
        flex-direction: column;
    }
}

.handoff2-markup-shell {
    width: min(1180px, calc(100vw - 32px));
    margin: -8px auto 0;
    display: grid;
    gap: 16px;
}

.handoff2-markup-toolbar {
    position: sticky;
    top: 92px;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    background: rgba(12, 13, 16, 0.92);
    color: #f8fafc;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(14px);
}

.handoff2-markup-toolbar h2 {
    margin: 0;
    font-size: 24px;
}

.handoff2-toolset {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.handoff2-toolset button {
    border-radius: 12px;
}

.handoff2-toolset button.is-active {
    background: #f6d24d;
    border-color: #f6d24d;
    color: #111111;
}

.handoff2-page-stack {
    display: grid;
    gap: 18px;
}

.markup-page {
    position: relative;
    width: min(100%, 920px);
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.markup-page img {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

.markup-page canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: crosshair;
    z-index: 1;
}

.markup-edit-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.markup-edit-box {
    position: absolute;
    box-sizing: border-box;
    margin: 0;
    padding: 0 3px;
    border: 1px solid rgba(17, 24, 39, 0.45);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.96);
    color: #111111;
    font-family: Helvetica, Arial, sans-serif;
    font-weight: 600;
    resize: none;
    pointer-events: auto;
    min-height: 0;
    min-width: 0;
    line-height: 1;
    box-shadow: inset 0 0 0 1px rgba(246, 210, 77, 0);
}

.markup-edit-box.is-single-line {
    overflow: hidden;
    white-space: nowrap;
}

.markup-edit-box.is-multiline {
    padding: 2px 3px;
    overflow: auto;
    white-space: pre-wrap;
    line-height: 1.12;
}

.markup-edit-box:focus {
    border-color: #f6d24d;
    outline: none;
    box-shadow: 0 0 0 2px rgba(246, 210, 77, 0.3);
}

@media (max-width: 760px) {
    .handoff2-markup-toolbar {
        position: relative;
        top: auto;
        align-items: flex-start;
        flex-direction: column;
    }

    .handoff2-toolset {
        justify-content: flex-start;
    }
}

/* Final override: keep the Assigned Rep picker as list rows, not primary buttons. */
.rep-results .rep-result,
body.theme-dark .rep-results .rep-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    width: 100%;
    min-height: 48px;
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
    background: transparent;
    color: var(--gt-ink);
    box-shadow: none;
    text-align: left;
    transform: none;
}

.rep-results .rep-result-name,
body.theme-dark .rep-results .rep-result-name,
.rep-results .rep-result-meta,
body.theme-dark .rep-results .rep-result-meta {
    display: block;
    width: 100%;
}

.rep-results .rep-result:hover,
.rep-results .rep-result:focus,
body.theme-dark .rep-results .rep-result:hover,
body.theme-dark .rep-results .rep-result:focus {
    background: rgba(246, 210, 77, 0.16);
    color: var(--gt-ink);
    transform: none;
}
