/* ============================================
   Démo-Mission APP THEME (Dark Mode / Cyan)
   Replicates the React App "Vibe"
   ============================================ */

:root {
    --app-bg: #09090b;
    --app-bg-surface: #18181b;
    --app-bg-surface-light: #27272a;

    --app-cyan: #06b6d4;
    --app-cyan-dim: rgba(6, 182, 212, 0.1);
    --app-cyan-glow: rgba(6, 182, 212, 0.25);

    --app-text: #e4e4e7;
    --app-text-muted: #a1a1aa;

    --app-border: rgba(255, 255, 255, 0.1);
    --app-border-focus: rgba(6, 182, 212, 0.5);

    --radius-lg: 1rem;
    --radius-full: 9999px;
    --app-section-gap: 1.1rem;
    --app-panel-text-offset: 0.3rem;
    --app-safe-top: env(safe-area-inset-top, 0px);
    --app-safe-right: env(safe-area-inset-right, 0px);
    --app-safe-bottom: env(safe-area-inset-bottom, 0px);
    --app-safe-left: env(safe-area-inset-left, 0px);
}

/* --- Background System (Gemini-Style Mesh Gradients) --- */
body.app-mode {
    --app-glow-1: rgba(6, 182, 212, 0.22);
    --app-glow-2: rgba(14, 165, 233, 0.18);
    --app-glow-3: rgba(34, 211, 238, 0.14);
    --app-glow-4: rgba(148, 163, 184, 0.08);

    background-color: #050507;
    background-image:
        radial-gradient(1200px 700px at 12% 8%, var(--app-glow-1), transparent 60%),
        radial-gradient(900px 600px at 88% 16%, var(--app-glow-2), transparent 58%),
        radial-gradient(1000px 750px at 22% 92%, var(--app-glow-3), transparent 62%),
        radial-gradient(1200px 900px at 82% 82%, var(--app-glow-4), transparent 65%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--app-text) !important;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    transition: background 1.2s ease, background-position 1.2s ease;
}

/* Default / Demo Mode: Primary Cyan with Subtle Warm Accent */
body.app-mode.bg-demo {
    --app-glow-1: rgba(6, 182, 212, 0.26);
    --app-glow-2: rgba(14, 165, 233, 0.2);
    --app-glow-3: rgba(34, 211, 238, 0.16);
    --app-glow-4: rgba(148, 163, 184, 0.06);
}

/* Pickup Mode: Energy Orange + Cyan Balance */
body.app-mode.bg-pickup {
    --app-glow-1: rgba(6, 182, 212, 0.22);
    --app-glow-2: rgba(14, 165, 233, 0.18);
    --app-glow-3: rgba(34, 211, 238, 0.14);
    --app-glow-4: rgba(148, 163, 184, 0.06);
}

/* Info Mode: Warmer Top Glow + Cooler Base */
body.app-mode.bg-info {
    --app-glow-1: rgba(6, 182, 212, 0.2);
    --app-glow-2: rgba(14, 165, 233, 0.16);
    --app-glow-3: rgba(34, 211, 238, 0.12);
    --app-glow-4: rgba(148, 163, 184, 0.08);
}

@media (max-width: 600px) {

    body.app-mode,
    body.app-mode.bg-demo,
    body.app-mode.bg-pickup,
    body.app-mode.bg-info {
        --app-glow-1: rgba(6, 182, 212, 0.12);
        --app-glow-2: rgba(14, 165, 233, 0.1);
        --app-glow-3: rgba(34, 211, 238, 0.08);
        --app-glow-4: rgba(148, 163, 184, 0.06);
        background-attachment: scroll;
    }
}


/* --- Layout --- */
.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding:
        calc(0.9rem + var(--app-safe-top))
        calc(1.5rem + var(--app-safe-right))
        calc(6rem + var(--app-safe-bottom))
        calc(1.5rem + var(--app-safe-left));
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.app-container>*+* {
    margin-top: var(--app-section-gap);
}

.mode-header {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0;
}

.mode-description {
    margin: 0;
    font-size: 0.75rem;
    color: var(--app-text-muted);
    opacity: 0.9;
    text-align: left;
    line-height: 1.3;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    display: block;
}

.mode-description:empty {
    display: none;
}

.mode-intro {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0;
}

.mode-intro .inline-notice {
    margin: 0 !important;
}


.mode-stack {
    display: flex;
    flex-direction: column;
    gap: var(--app-section-gap) !important;
    margin-top: 0;
}


.mode-stack .estimate-display,
.mode-stack .app-card,
.mode-stack .step-meta,
.mode-stack .step-indicator,
.mode-stack .inline-notice {
    margin: 0 !important;
}

.mode-stack>* {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.step-section {
    display: flex;
    flex-direction: column;
    gap: var(--app-section-gap);
}


/* --- Estimate Header --- */
.estimate-display {
    margin-bottom: 0;
    padding: 1.35rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(20, 20, 24, 0.92), rgba(12, 12, 16, 0.92));
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 4px;
}

.estimate-split {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.estimate-split-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.estimate-split-container {
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 992px) {
    .estimate-split {
        flex-direction: row;
        align-items: center;
        gap: 0;
    }

    .estimate-split-item {
        flex: 1;
    }

    .estimate-split-container {
        padding-top: 0;
        margin-top: 0;
        border-top: none;
        padding-left: 2rem;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
    }
}


.estimate-label {
    letter-spacing: 0.12em;
    font-size: 0.6rem;
    text-transform: uppercase;
    color: rgba(228, 228, 231, 0.6);
    font-weight: 700;
    margin-bottom: 0.4rem;
    display: block;
}

.estimate-price {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--app-cyan);
    line-height: 1;
}

.estimate-promo {
    color: #4ade80;
    font-size: 0.7rem;
    margin-top: 4px;
    display: none;
    font-weight: 800;
    text-transform: uppercase;
}

/* --- Step Meta --- */
.step-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(228, 228, 231, 0.6);
    font-weight: 700;
}

.step-indicator {
    margin: 0 !important;
}

/* --- Inline Notice --- */
.inline-notice {
    display: none;
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(6, 182, 212, 0.35);
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.14), rgba(12, 12, 16, 0.92));
    color: rgba(228, 228, 231, 0.9);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 18px rgba(6, 182, 212, 0.2);
}

.inline-notice.active {
    display: block;
}

/* --- Confirm Modal --- */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 4, 6, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1.5rem;
}

.confirm-overlay.active {
    display: flex;
}

.confirm-modal {
    width: 100%;
    max-width: 520px;
    background: linear-gradient(180deg, rgba(22, 22, 26, 0.98), rgba(12, 12, 16, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.2rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
}

.confirm-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    color: #fff;
}

.confirm-body {
    font-size: 0.9rem;
    color: rgba(228, 228, 231, 0.85);
    line-height: 1.6;
    background: rgba(12, 12, 16, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.9rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.confirm-body>div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.confirm-body>div:last-child {
    border-bottom: none;
}

.confirm-body strong {
    color: rgba(228, 228, 231, 0.65);
    font-weight: 700;
    min-width: 110px;
}

.confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* --- Field Hint --- */
.field-hint {
    font-size: 0.7rem;
    color: rgba(228, 228, 231, 0.55);
    margin: 0.25rem 0 0.75rem 0;
}

/* --- Step 2 Layout --- */
.app-step-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--app-section-gap);
}

.app-card-full {
    grid-column: 1 / -1;
}

@media (min-width: 900px) {
    .app-container {
        max-width: 920px;
    }

    .app-step-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--app-section-gap);
    }
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    text-align: left;
    padding: 1rem 0.45rem 1.08rem;
    margin-bottom: 0;
}

.app-header + .mode-header {
    margin-top: 0.72rem;
}

.app-header .logo {
    --app-header-logo-size: 66px;
    display: flex;
    align-items: center;
    gap: calc(var(--app-header-logo-size) * 0.25);
    text-decoration: none;
    min-width: 0;
    flex: 1 1 auto;
}

.app-header .logo-image {
    height: var(--app-header-logo-size);
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) saturate(1.28) contrast(1.08);
    opacity: 0.85;
    transform: rotate(-2deg);
    transform-origin: 72% 78%;
    transition: transform 0.28s cubic-bezier(0.22, 0.9, 0.2, 1.2), filter 0.28s ease;
}

.app-header .logo:hover .logo-image {
    animation: logo-punch 280ms cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

@keyframes logo-punch {
    0% {
        transform: rotate(-2deg) scale(1);
    }

    45% {
        transform: rotate(1deg) scale(1.08);
    }

    100% {
        transform: rotate(0deg) scale(1.06);
    }
}

.app-header .logo-text {
    font-family: 'Saira Stencil One', sans-serif;
    font-size: 1.95rem;
    font-weight: 400;
    margin-left: 0;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 1;
    max-width: none;
    overflow: visible;
    color: #fff;
}

.app-header .logo-text .highlight {
    display: inline-block;
    margin-left: 0.3rem;
    background: linear-gradient(135deg, var(--accent-primary-strong), var(--accent-secondary-strong));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 560px) {
    .app-container {
        padding-top: 0.78rem;
    }

    .app-header {
        gap: 0.6rem;
        padding: 0.92rem 0.35rem 0.98rem;
    }

    .app-header .logo {
        --app-header-logo-size: 56px;
    }

    .app-header .logo-text {
        font-size: 1.58rem;
        letter-spacing: 0.04em;
        margin-left: 0;
    }

    .app-header .logo-text .highlight {
        margin-left: 0.22rem;
    }
}

@media (max-width: 420px) {
    .app-header .logo {
        --app-header-logo-size: 46px;
    }

    .app-header .logo-text {
        font-size: 1.28rem;
    }
}

/* Gradient accent for symbols/words in titles */
.accent-amp {
    background: none;
    color: #fff;
    font-weight: 800;
    text-shadow: none;
}

.btn-app-primary .accent-amp,
.btn-app-primary .accent-word {
    color: inherit;
}

/* Gradient keyword treatment */
.accent-word {
    background: none;
    color: #fff;
}

/* --- Mode Selector (Tabs) --- */
.mode-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    row-gap: 0.5rem;
    column-gap: 0.5rem;
    background: var(--app-bg-surface);
    border: 1px solid var(--app-border);
    padding: 0.45rem;
    border-radius: 0.85rem;
    margin-bottom: 0;
    position: static;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.mode-progress {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0;
    margin: 0.85rem 0 0.5rem;
    align-items: center;
    text-align: center;
    width: 100%;
    min-height: 2.8rem;
}

.mode-progress .step-meta {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding: 0 0.9rem;
    gap: 0.6rem;
    flex-wrap: wrap;
    min-height: 2.6rem;
}

.mode-progress .step-meta>* {
    align-self: center;
}

.mode-progress .step-meta span:last-child {
    text-align: right;
}

#mode-step-title {
    flex: 0 0 auto;
}

#mode-step-title:empty {
    display: none;
}

@media (max-width: 480px) {
    .mode-progress .step-meta {
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        padding: 0 0.5rem;
        text-align: center;
    }

    .mode-description {
        text-align: center;
        white-space: normal;
        line-height: 1.35;
        max-width: 100%;
    }

    #mode-step-title {
        font-size: 0.65rem;
        letter-spacing: 0.1em;
        text-align: center;
    }
}

@media (max-width: 720px) {
    .mode-progress {
        min-height: 3.2rem;
    }
}

@media (max-width: 840px) {
    .mode-progress .step-meta {
        padding: 0 0.5rem;
    }

    .mode-description {
        font-size: 0.7rem;
    }
}

.mode-progress .step-meta,
.mode-progress .step-indicator {
    margin: 0 !important;
}

.mode-progress .step-indicator {
    display: flex;
    justify-content: center;
}

.mode-tab {
    padding: 0.85rem 0.35rem;
    text-align: center;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--app-text-muted);
    cursor: pointer;
    border-radius: 0.65rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-height: 68px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.mode-tab i {
    font-size: 1rem;
    margin-bottom: 2px;
}

.mode-tab:hover {
    border-color: rgba(6, 182, 212, 0.35);
    color: #e4e4e7;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.mode-tab:hover i {
    color: var(--app-cyan);
}

.mode-tab.active {
    background: var(--app-bg-surface-light);
    color: var(--app-cyan);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* --- Components: Cards --- */
.app-card {
    background: linear-gradient(180deg, rgba(22, 22, 26, 0.95), rgba(16, 16, 20, 0.92)) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 1.5rem;
    padding: 1.6rem;
    margin-bottom: 0;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.45), transparent);
}

.app-card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
    color: #fff;
    letter-spacing: 0.08em;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.card-title-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-title-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.agenda-title-block {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
    flex-wrap: wrap;
}

.agenda-title-main {
    font: inherit;
    color: inherit;
    white-space: nowrap;
}

.agenda-title-sub {
    font-size: 0.68em;
    letter-spacing: 0.08em;
    color: rgba(228, 228, 231, 0.68);
    text-transform: uppercase;
    white-space: nowrap;
}

.agenda-intro {
    font-size: 0.75rem;
    color: var(--app-text-main);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.agenda-intro-meta {
    color: var(--app-text-muted);
    font-size: 0.7rem;
    display: inline-block;
    margin-top: 0.3rem;
}

.agenda-intro-meta i {
    color: var(--app-cyan);
    margin-right: 0.2rem;
    opacity: 0.8;
}

.label-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    row-gap: 0.25rem;
    position: relative;
    margin-bottom: 0.3rem;
    min-height: 1.6rem;
    flex-wrap: wrap;
}

/* Slight right nudge for panel content text (excluding panel titles). */
.app-card .label-row,
.app-card .field-hint,
.app-card .control-sub-label,
.app-card .date-labels,
.app-card .photo-count,
.app-card .app-form-group>p {
    padding-left: var(--app-panel-text-offset);
}

.app-card .segment-btn {
    justify-content: flex-start;
    padding-left: 1rem;
}

.label-row.inline {
    flex-wrap: nowrap;
}

.label-row.inline .app-label {
    white-space: nowrap;
}

.label-row .app-label {
    margin-bottom: 0;
    line-height: 1.2;
    min-width: 0;
    color: rgba(228, 228, 231, 0.92);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.info-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(18, 18, 22, 0.7);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transform: none;
    flex: 0 0 auto;
    line-height: 1;
}

.info-btn:hover {
    border-color: rgba(6, 182, 212, 0.45);
    color: var(--app-cyan);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.18);
}

.info-btn:active {
    transform: scale(0.96);
}

.info-btn:focus-visible {
    outline: 2px solid var(--app-cyan);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.info-tip {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 6px;
    background: rgba(12, 12, 16, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.6rem;
    padding: 0.5rem 0.7rem;
    color: rgba(228, 228, 231, 0.9);
    font-size: 0.7rem;
    line-height: 1.4;
    max-width: 260px;
    z-index: 10;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.info-tip.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

.collapse-cta {
    width: 100%;
    margin: 0.75rem 0 0;
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(28, 28, 34, 0.95), rgba(18, 18, 22, 0.95));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collapse-cta:focus-visible {
    outline: 2px solid var(--app-cyan);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

.collapse-cta i {
    font-size: 0.75rem;
}

.collapse-cta:hover {
    border-color: rgba(6, 182, 212, 0.45);
    transform: translateY(-1px);
}

.collapse-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.7rem;
    border-radius: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(18, 18, 22, 0.6);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collapse-btn i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.collapse-btn.open i {
    transform: rotate(180deg);
}

.collapsible-body.hidden {
    display: none;
}

.label-required {
    color: rgba(74, 222, 128, 0.55);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
}

.label-optional {
    color: rgba(228, 228, 231, 0.55);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
}

.label-recommended {
    color: rgba(251, 191, 36, 0.6);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
}

[data-collapse-target] .collapse-close {
    display: none;
}

[data-collapse-target].collapse-open .collapse-close {
    display: inline-flex;
}

[data-collapse-target].collapse-open .collapse-cta {
    display: none;
}

[data-collapse-target].collapse-locked .collapse-close {
    display: none !important;
}

.icon-box {
    width: 32px;
    height: 32px;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.45);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--app-cyan);
    font-size: 0.9rem;
}

/* --- Components: Forms --- */
.app-form-group {
    margin-bottom: 1.5rem;
}

.app-checkbox {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(9, 9, 11, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    cursor: pointer;
    position: relative;
    transition: all 0.18s ease;
}

.app-checkbox:hover {
    border-color: rgba(6, 182, 212, 0.35);
    background: rgba(14, 14, 18, 0.96);
}

.app-checkbox:checked {
    background: rgba(6, 182, 212, 0.18);
    border-color: rgba(6, 182, 212, 0.55);
}

.app-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 11px;
    border: solid var(--app-cyan);
    border-width: 0 2.25px 2.25px 0;
    transform: translate(-47%, -56%) rotate(45deg);
    transform-origin: center;
}

.app-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(228, 228, 231, 0.6);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.app-input,
.app-select,
.app-textarea {
    width: 100%;
    background: rgba(39, 39, 42, 0.9) !important;
    border: 1px solid var(--app-border) !important;
    color: #fff !important;
    padding: 1rem 1.1rem;
    border-radius: 0.85rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}

.app-input:hover,
.app-select:hover,
.app-textarea:hover {
    border-color: rgba(6, 182, 212, 0.35) !important;
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.08);
}

.flatpickr-input:hover {
    border-color: rgba(6, 182, 212, 0.45) !important;
    background: rgba(39, 39, 42, 0.85) !important;
}

.app-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2306b6d4'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

.app-input:focus,
.app-select:focus,
.app-textarea:focus {
    outline: none;
    border-color: var(--app-cyan) !important;
    background: rgba(39, 39, 42, 0.8) !important;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
}

/* Date input specific styling for SOTA feel & native dark picker */
input[type="date"] {
    cursor: pointer;
    color-scheme: dark;
    /* Forces native dark picker */
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(1);
    /* Ensure icon is white/visible on dark theme */
    opacity: 0.6;
    transition: opacity 0.2s;
    background-size: contain;
}

input[type="date"]:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

/* --- Components: Buttons --- */
.btn-app-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.25rem;
    background: var(--app-cyan);
    color: #000;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    border-radius: 0.85rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.15);
    margin-top: 1rem;
}

.btn-app-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.3);
    filter: brightness(1.1);
}

.btn-app-primary:active {
    transform: translateY(-1px);
}

.btn-app-primary:focus-visible {
    outline: 2px solid var(--app-cyan);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.2);
}

.contact-direct-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.9rem;
}

.contact-direct-grid.is-stacked {
    grid-template-columns: minmax(0, 1fr);
}

.contact-direct-card {
    container-type: inline-size;
}

.contact-direct-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--app-border);
    border-radius: 0.95rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.02);
}

.contact-direct-entry-copy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    padding-right: 0.35rem;
}

.contact-direct-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--app-text-dim);
}

.contact-direct-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.98rem;
    color: #fff;
    line-height: 1.2;
}

.contact-direct-text-email {
    font-size: 0.88rem;
    white-space: nowrap;
}

.contact-direct-grid.is-stacked .contact-direct-text-email {
    white-space: normal;
    overflow-wrap: anywhere;
}

.contact-direct-entry-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-direct-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 999px;
    border: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
}

.contact-direct-action:hover {
    border-color: rgba(6, 182, 212, 0.5);
    color: var(--app-cyan);
    transform: translateY(-2px);
}

.contact-direct-action:focus-visible {
    outline: 2px solid var(--app-cyan);
    outline-offset: 3px;
}

.contact-direct-action.is-copied {
    color: var(--app-cyan);
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.js-phone-only-cta {
    display: none !important;
}

@media (hover: none) and (pointer: coarse) and (max-width: 900px) {
    .js-phone-only-cta {
        display: flex !important;
    }
}

@container (max-width: 700px) {
    .contact-direct-entry {
        align-items: flex-start;
    }

    .contact-direct-text {
        font-size: 0.92rem;
    }

    .contact-direct-text-email {
        white-space: normal;
    }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-app-entry {
    animation: fadeInUp 0.5s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}

.hidden {
    display: none !important;
}

/* --- Info Section --- */
.info-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.2rem;
    padding: 1.15rem 1rem;
    border-bottom: 1px solid var(--app-border);
    border-radius: 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
        rgba(255, 255, 255, 0.02);
    margin-top: 0.8rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.info-label {
    color: #f4f4f5;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.info-value {
    display: inline-flex;
    align-items: baseline;
    gap: 0.65rem;
    color: #fff;
    font-weight: 800;
    font-family: 'Space Mono', monospace;
    text-align: right;
    white-space: nowrap;
}

.info-rate-number {
    font-size: 1.28rem;
    line-height: 1;
    color: #fff;
}

.info-rate-unit {
    font-size: 1.02rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.06em;
}

@media (max-width: 860px) {
    .info-row {
        grid-template-columns: minmax(0, 1fr);
        align-items: flex-start;
    }

    .info-value {
        text-align: left;
        white-space: normal;
    }
}

@media (max-width: 560px) {
    .info-row {
        padding: 1rem 0.9rem;
    }

    .info-label {
        font-size: 0.95rem;
    }

    .info-rate-number {
        font-size: 1.18rem;
    }

    .info-rate-unit {
        font-size: 0.96rem;
    }
}

.pickup-dynamic-note {
    margin: 1rem 0 1.25rem;
    padding: 1rem 1.1rem;
    border-radius: 0.85rem;
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.pickup-dynamic-note p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--app-text-muted);
    line-height: 1.5;
}

.pickup-dynamic-note strong {
    color: var(--app-text-main);
}

.pickup-dynamic-note em {
    font-style: normal;
    color: var(--app-cyan);
    font-weight: 700;
}

.pickup-dynamic-note .note-accent {
    color: var(--app-cyan);
    font-weight: 700;
}

@media (max-width: 720px) {
    .agenda-title-block {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.08rem;
    }

    .agenda-title-sub {
        font-size: 0.58em;
        letter-spacing: 0.1em;
    }

    .card-head {
        align-items: flex-start;
    }

    .card-title-actions {
        flex: 0 0 auto;
        align-self: flex-start;
    }

    .agenda-nav-arrows {
        gap: 0.45rem;
        flex-wrap: nowrap;
    }
}

@media (max-width: 560px) {
    .card-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        column-gap: 0.9rem;
    }

    .card-title-left {
        align-items: flex-start;
    }

    .agenda-title-main {
        line-height: 1.05;
    }

    .agenda-title-sub {
        font-size: 0.55em;
        letter-spacing: 0.08em;
    }

    .agenda-nav-arrows {
        display: flex;
        gap: 0.45rem;
        justify-content: flex-end;
        white-space: nowrap;
    }
}

/* --- Custom Project Controls (Arrow Style) --- */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.custom-control-container {
    display: flex;
    align-items: center;
    background: #1e1e21;
    border: 1px solid var(--app-border);
    border-radius: 0.85rem;
    height: 64px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.custom-control-container:focus-within,
.custom-control-container:hover:not(.disabled) {
    border-color: var(--app-border-focus);
    box-shadow: 0 0 15px var(--app-cyan-dim);
}

.control-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    background: rgba(39, 39, 42, 0.3);
    height: 100%;
    cursor: grab;
    user-select: none;
}

.control-input-value {
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Saira Stencil One', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    width: 100%;
    height: 1.8rem;
    outline: none;
    appearance: none;
    line-height: 1.8rem;
    padding: 0;
    margin-top: 5px;
}

/* Chrome, Safari, Edge, Opera */
.control-input-value::-webkit-outer-spin-button,
.control-input-value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
.control-input-value[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.control-sub-label {
    font-size: 0.6rem;
    color: var(--app-text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
}

.control-arrows {
    display: flex;
    flex-direction: column;
    width: 54px;
    height: 100%;
    border-left: 1px solid var(--app-border);
    background: var(--app-bg-surface);
}

.arrow-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--app-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.arrow-btn:hover {
    color: var(--app-cyan);
    background: rgba(255, 255, 255, 0.05);
}

.arrow-btn:active {
    background: rgba(6, 182, 212, 0.1);
}

.arrow-separator {
    height: 1px;
    width: 10px;
    background: var(--app-border);
    margin: 0 auto;
}

/* --- Plus/Minus Style (for Units) --- */
.counter-btn {
    width: 54px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--app-bg-surface);
    border: none;
    color: var(--app-text-muted);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.counter-btn:first-child {
    border-right: 1px solid var(--app-border);
}

.counter-btn:last-child {
    border-left: 1px solid var(--app-border);
}

.counter-btn:hover {
    color: var(--app-cyan);
    background: rgba(255, 255, 255, 0.05);
}

.agenda-scroll-container {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--app-cyan) transparent;
    scroll-snap-type: x mandatory;
}

.agenda-day-column {
    min-width: 100px;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.agenda-day-header {
    text-align: center;
    padding: 0.75rem 0;
    background: var(--app-bg-surface);
    border: 1px solid var(--app-border);
    border-radius: 0.75rem 0.75rem 0 0;
    display: flex;
    flex-direction: column;
}

.day-name {
    font-size: 0.6rem;
    text-transform: uppercase;
    color: var(--app-text-muted);
    font-weight: 800;
}

.day-num {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

/* --- SOTA Segment Controls --- */
.segment-control {
    display: flex;
    background: rgba(10, 10, 12, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 10px;
    gap: 10px;
    position: relative;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.segment-btn {
    flex: 1;
    padding: 0.9rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(28, 28, 34, 0.98), rgba(18, 18, 22, 0.98));
    color: rgba(228, 228, 231, 0.72);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 0;
    z-index: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 22px rgba(0, 0, 0, 0.38);
}

@media (max-width: 520px) {
    .segment-control {
        padding: 0.6rem;
        gap: 0.5rem;
    }

    .segment-btn {
        flex: 1 1 100px;
        padding: 0.75rem 0.6rem;
        font-size: 0.7rem;
    }
}

.segment-btn i {
    font-size: 0.9rem;
    opacity: 0.8;
    color: #9ca3af;
}

.segment-btn:hover {
    border-color: rgba(6, 182, 212, 0.45);
    transform: translateY(-1px);
    color: #e4e4e7;
}

.segment-btn:focus-visible {
    outline: 2px solid var(--app-cyan);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

.segment-btn.selected {
    background: var(--app-cyan);
    color: #fff;
    box-shadow: 0 6px 18px rgba(6, 182, 212, 0.35);
    border-color: rgba(6, 182, 212, 0.9);
}

.segment-btn.just-selected {
    box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.4), 0 8px 20px rgba(6, 182, 212, 0.25);
}

.segment-btn.selected i {
    opacity: 1;
    color: #fff;
}

.segment-btn.with-desc {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    padding: 0.92rem 0.55rem;
}

.segment-btn.with-price-badge {
    position: relative;
    gap: 0.28rem;
    padding: 0.95rem 0.7rem 2.5rem;
}

.segment-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
}

.segment-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.05rem;
    height: 1.5rem;
    color: rgba(255, 255, 255, 0.72);
    flex: 0 0 auto;
}

.segment-btn-icon svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.segment-btn-icon .icon-stroke {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.segment-btn-icon .icon-fill {
    fill: currentColor;
    opacity: 0.24;
}

.segment-btn-icon .icon-load {
    fill: rgba(226, 232, 242, 0.88);
}

.segment-btn-icon .icon-load-line {
    fill: none;
    stroke: rgba(232, 238, 247, 0.98);
    stroke-width: 1.15;
    stroke-linecap: round;
}

.segment-btn-icon .icon-wheel {
    fill: rgba(234, 239, 247, 0.98);
    stroke: rgba(17, 18, 22, 0.96);
    stroke-width: 0.75;
}

.segment-btn.selected .segment-btn-icon {
    color: #fff;
}

.segment-btn-subline {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.segment-btn-desc {
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--app-text-muted);
    text-transform: none;
    text-align: center;
    line-height: 1.2;
    letter-spacing: normal;
}

.segment-btn-meta {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
    line-height: 1.2;
    letter-spacing: 0.03em;
}

.segment-btn.selected .segment-btn-desc {
    color: rgba(255, 255, 255, 0.9);
}

.segment-btn.selected .segment-btn-meta {
    color: #fff;
}

.segment-btn-price-badge {
    position: absolute;
    left: 50%;
    bottom: 0.72rem;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.8rem;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.64rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.84);
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.segment-btn.selected .segment-btn-price-badge {
    border-color: rgba(6, 182, 212, 0.38);
    background: rgba(6, 182, 212, 0.1);
    color: #fff;
}

@media (max-width: 640px) {
    .segment-btn.with-price-badge {
        padding-bottom: 2.35rem;
    }

    .segment-btn.with-price-badge .segment-btn-content {
        flex-direction: column;
        gap: 0.22rem;
    }

    .segment-btn.with-price-badge .segment-btn-icon {
        width: 1.75rem;
        height: 1.22rem;
    }

    .segment-btn-price-badge {
        min-width: 5.25rem;
        font-size: 0.6rem;
        padding: 0.26rem 0.56rem;
    }
}

/* --- Enhanced Floor Chips with Checkmark --- */
.floor-chip {
    position: relative;
    overflow: hidden;
}

.floor-chip .check-icon {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.7rem;
    color: var(--app-cyan);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floor-chip.selected .check-icon {
    opacity: 1;
}

/* --- Validation & Dynamic Feedback --- */
.section-validated {
    transition: all 0.5s ease;
}

.dynamic-badge {
    font-size: 0.6rem;
    background: rgba(6, 182, 212, 0.1);
    color: var(--app-cyan);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.price-breakdown {
    font-size: 0.65rem;
    color: var(--app-text-muted);
    margin-top: 0.25rem;
    font-family: 'Space Mono', monospace;
    opacity: 0.8;
}

.counter-value {
    transition: transform 0.1s ease;
}

.counter-value.changing {
    transform: scale(1.05);
    color: var(--app-cyan);
}

.agenda-slots-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.agenda-slot {
    background: var(--app-bg-surface-light);
    border: 1px solid var(--app-border);
    padding: 0.75rem 0.25rem;
    border-radius: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}

.agenda-slot:hover {
    border-color: var(--app-cyan-glow);
    background: rgba(255, 255, 255, 0.05);
}

.agenda-slot.selected {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--app-cyan);
    box-shadow: 0 0 15px -5px var(--app-cyan-glow);
}

.slot-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--app-text-muted);
}

.agenda-slot.selected .slot-label {
    color: var(--app-cyan);
}

.slot-time {
    font-size: 0.55rem;
    opacity: 0.5;
    font-weight: 600;
}

/* --- Preview Area --- */
.preview-area {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.preview-item {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 0.8rem;
    overflow: hidden;
    border: 1px solid var(--app-border);
    background: rgba(255, 255, 255, 0.04);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(10, 10, 12, 0.78);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 0.8rem;
}

.preview-remove-btn:hover,
.preview-remove-btn:focus-visible {
    background: rgba(220, 38, 38, 0.92);
    border-color: rgba(255, 255, 255, 0.3);
    outline: none;
}

.photo-count {
    margin-top: 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--app-text-muted);
}

.app-textarea {
    resize: vertical;
    min-height: 80px;
}

.btn-upload {
    border: 2px dashed var(--app-border);
    padding: 1.5rem;
    text-align: center;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(39, 39, 42, 0.2);
    color: var(--app-text-muted);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.btn-upload i {
    font-size: 1.5rem;
    color: var(--app-cyan);
}

/* --- Sending Overlay --- */
.sending-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 9, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 9999;
}

.sending-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sending-card {
    min-width: min(92vw, 420px);
    padding: 1.25rem 1.4rem;
    border-radius: 1rem;
    background: rgba(20, 24, 28, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.95rem;
}

.sending-spinner {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--app-cyan);
    animation: spin 0.8s linear infinite;
}

.sending-copy {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.sending-text {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--app-text);
}

.sending-subtext {
    color: rgba(228, 228, 231, 0.72);
    font-size: 0.92rem;
    line-height: 1.45;
}

@media (max-width: 640px) {
    .sending-card {
        padding: 1.1rem 1rem;
        border-radius: 0.9rem;
    }

    .sending-subtext {
        font-size: 0.88rem;
    }
}

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

.agenda-slot.is-reserved {
    opacity: 0.6;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.slot-time-reserved {
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.btn-upload:hover {
    border-color: var(--app-cyan);
    background: rgba(6, 182, 212, 0.05);
    color: #fff;
}

/* --- Form Grid --- */
.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: stretch;
}

.form-grid-2col .app-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    /* Let the grid handle gaps */
}

.form-grid-2col .app-form-group> :last-child {
    margin-top: auto;
}

/* --- Pickup: 3-column layout on desktop --- */
.pickup-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--app-section-gap);
    container-type: inline-size;
}

.pickup-grid .segment-control {
    flex-direction: row;
}

.pickup-grid .segment-btn {
    width: auto;
}

.pickup-grid .label-row {
    align-items: center;
}

.pickup-grid .label-row .app-label {
    white-space: normal;
}

@media (max-width: 720px) {
    .label-row .app-label {
        font-size: 0.74rem;
    }
}

@media (max-width: 420px) {
    .label-row .app-label {
        font-size: 0.7rem;
    }
}

.date-labels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 0.15rem 0 0.35rem;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(228, 228, 231, 0.55);
    font-weight: 700;
}

@media (min-width: 720px) {
    .mode-progress .step-meta {
        align-items: baseline;
    }

    .mode-description {
        max-width: 75%;
    }
}

@container (min-width: 760px) {
    .pickup-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
    }

    .pickup-grid .segment-control {
        flex-direction: column;
    }

    .pickup-grid .segment-btn {
        width: 100%;
    }
}

@media (min-width: 900px) {
    .pickup-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
    }

    .pickup-grid .segment-control {
        flex-direction: column;
    }

    .pickup-grid .segment-btn {
        width: 100%;
    }
}

/* --- Mobile Optimizations --- */
@media (max-width: 820px) {
    .form-grid-2col {
        grid-template-columns: 1fr;
    }

    .app-container {
        padding: 1rem 1rem 6rem 1rem;
    }

    .app-header h1 {
        font-size: 1.5rem;
    }

    .mode-tab {
        font-size: 0.62rem;
        padding: 0.72rem 0.25rem;
        min-height: 62px;
    }

    .mode-tab i {
        font-size: 0.9rem;
    }

    .app-card {
        padding: 1.25rem;
    }

    .app-card-title {
        font-size: 0.9rem;
    }

    .control-input-value {
        font-size: 1.3rem;
    }

    .control-sub-label {
        font-size: 0.55rem;
    }

    .counter-btn {
        width: 48px;
        font-size: 1.3rem;
        min-height: 64px;
        /* Ensure touch target */
    }

    .custom-control-container {
        min-height: 64px;
    }

    /* Ensure buttons are always tappable */
    .btn-app-primary {
        min-height: 52px;
        font-size: 0.85rem;
    }

    .floor-chip {
        min-height: 56px;
        padding: 0.6rem 0.4rem;
    }
}

/* Ensure touch-action is properly set */
body.app-mode {
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
}

.app-input,
.app-select,
.app-textarea {
    -webkit-user-select: text;
    user-select: text;
}
