/* ========================================================
   BORO — Bureau of River Ops
   WPA Retro Poster Palette
   ======================================================== */

:root {
    --rust:    #D95F3A;
    --blue:    #3A7CA5;
    --green:   #4C6B4A;
    --sand:    #F2E2C4;
    --mustard: #D9A441;
    --brown:   #3B2F2F;
    --sand-dark: #E5D0A8;
    --teal:    #2A8A7A;
    --plum:    #7B4F6A;
    --slate:   #5A6E78;
}

/* ── Reset & Base ─────────────────────────────────────── */

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

body {
    font-family: 'Segoe UI', system-ui, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--sand);
    color: var(--brown);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3 {
    font-family: 'Georgia', 'Times New Roman', serif;
    margin-top: 0;
}

.hidden { display: none; }

/* ── Logo Bar ─────────────────────────────────────────── */

/* ── Hero ─────────────────────────────────────────────── */

.hero {
    text-align: center;
    padding: 0;
    max-width: 900px;
    margin: 0 auto 1rem;
}

.hero-image-wrap {
    position: relative;
    overflow: visible;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 2rem;
    text-align: center;
}

.hero-overlay h1 {
    font-size: 2.2rem;
    color: var(--brown);
    margin: 0 0 0.2em;
    text-shadow:
        0 0 8px var(--sand),
        0 0 16px var(--sand),
        0 0 24px var(--sand);
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--brown);
    margin: 0 0 1rem;
    font-weight: bold;
    text-shadow:
        0 0 8px var(--sand),
        0 0 16px var(--sand),
        0 0 24px var(--sand);
}

.hero-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
}

.hero-buttons .btn-primary {
    justify-self: end;
}

.hero-buttons .btn-secondary {
    justify-self: start;
}

/* ── Buttons ──────────────────────────────────────────── */

.btn-primary {
    display: inline-block;
    padding: 0.7em 1.6em;
    border: none;
    border-radius: 6px;
    background-color: var(--rust);
    color: var(--sand);
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary:hover {
    background-color: var(--brown);
    color: var(--sand);
}

.btn-secondary {
    display: inline-block;
    padding: 0.7em 1.6em;
    border: none;
    border-radius: 6px;
    background-color: var(--green);
    color: var(--sand);
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-secondary:hover {
    background-color: var(--brown);
    color: var(--sand);
}

/* ── Feature Cards ────────────────────────────────────── */

.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
    padding: 0;
    text-align: left;
}

.feature-card {
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    position: relative;
    overflow: visible;
}

.feature-header {
    padding: 0.6rem 1rem;
    border-radius: 10px 10px 0 0;
}

.feature-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--sand);
}

.feature-body {
    background-color: var(--sand-dark);
    padding: 0.8rem 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 60px;
    border-radius: 0 0 10px 10px;
}

.feature-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--brown);
}

.feature-card--rust .feature-header  { background-color: var(--rust); }
.feature-card--blue .feature-header  { background-color: var(--blue); }
.feature-card--green .feature-header { background-color: var(--green); }
.feature-card--teal .feature-header  { background-color: var(--mustard); }

.feature-icon-placeholder {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: -50px;
    margin-bottom: -10px;
}

/* ── Process Flow (Map Pin Style) ─────────────────────── */

.process {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 800px;
    margin: 1rem auto 2.5rem;
    padding: 0 1rem;
    flex-wrap: wrap;
}

.process-step {
    display: flex;
    align-items: center;
    position: relative;
}

/* Map pin shape */
.pin {
    position: relative;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
}

.pin-number {
    transform: rotate(45deg);
    font-family: 'Georgia', serif;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
}

.pin--rust    { background-color: var(--rust); }
.pin--blue    { background-color: var(--blue); }
.pin--green   { background-color: var(--green); }
.pin--mustard { background-color: var(--mustard); }
.pin--mustard .pin-number { color: var(--brown); }

.process-label {
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brown);
    padding: 0.25em 0.6em 0.25em 1.4em;
    margin-left: -1rem;
    border: 2px solid var(--brown);
    border-radius: 20px;
}

/* ── Footer ───────────────────────────────────────────── */

.site-footer {
    background-color: var(--green);
    color: var(--sand);
    padding: 2rem 1rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.footer-logo-link {
    flex-shrink: 0;
    line-height: 0;
}

.footer-logo {
    height: 150px;
    width: auto;
    flex-shrink: 0;
    margin-top: -75px;
}

.footer-text {
    flex: 1;
    text-align: center;
}

.footer-spacer {
    width: 150px;
    flex-shrink: 0;
}

.footer-tagline {
    font-family: 'Georgia', serif;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 0 0.3em;
}

.footer-sub {
    font-size: 0.9rem;
    margin: 0 0 1rem;
    opacity: 0.85;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--sand);
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid transparent;
}

.footer-links a:hover {
    border-bottom-color: var(--sand);
}

/* ── Form Pages (Create / Find / Confirmation / Trip) ── */

.form-page {
    max-width: 520px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border: none;
    border-radius: 10px;
}

/* ── River Selection Page ─────────────────────────────── */

.river-select-page {
    max-width: 700px;
    margin: 2rem auto;
    padding: 2rem;
}

.river-search {
    width: 100%;
    padding: 0.65em 0.8em;
    border: 2px solid var(--sand-dark);
    border-radius: 6px;
    background-color: #fff;
    font-size: 1rem;
    color: var(--brown);
    margin-bottom: 1.2rem;
}

.river-search:focus {
    outline: none;
    border-color: var(--blue);
}

.river-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.river-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
}

.river-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    gap: 0.5rem;
}

.river-card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.river-card-name {
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--blue);
    text-decoration: none;
}

.river-card-name:hover {
    color: var(--brown);
}

.river-card-meta {
    font-size: 0.85rem;
    color: var(--green);
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.river-card-chevron {
    font-size: 1.2rem;
    color: var(--brown);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.river-card.expanded .river-card-chevron {
    transform: rotate(90deg);
}

.river-card-detail {
    display: none;
    background-color: var(--sand);
    padding: 1rem;
}

.river-card.expanded .river-card-detail {
    display: block;
}

.river-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
    margin-bottom: 1rem;
}

.river-detail-item {
    font-size: 0.88rem;
}

.river-detail-label {
    font-weight: bold;
    color: var(--brown);
}

.river-detail-value {
    color: var(--green);
}

.river-card .btn-primary {
    width: 100%;
}

.river-no-results {
    text-align: center;
    color: var(--green);
    font-style: italic;
    padding: 2rem 0;
}

/* ── River Detail Page ─────────────────────────────────── */

.river-detail-page {
    max-width: 960px;
    margin: 2rem auto;
    padding: 2rem;
}

.river-detail-page h2 {
    font-family: 'Georgia', serif;
    color: var(--brown);
    margin-bottom: 0.5em;
}

.river-detail-overview {
    background-color: #fff;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.river-detail-section-title {
    font-family: 'Georgia', serif;
    color: var(--brown);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3em;
    border-bottom: 2px solid var(--sand-dark);
}

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

.camps-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    min-width: 600px;
}

.camps-table th {
    background-color: var(--blue);
    color: #fff;
    font-weight: 600;
    padding: 0.5rem 0.6rem;
    text-align: left;
}

.camps-table td {
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
    color: var(--brown);
    border-bottom: 1px solid var(--sand-dark);
}

.camps-table tr:last-child td {
    border-bottom: none;
}

.camps-table td:first-child {
    font-weight: bold;
    white-space: nowrap;
}

.camps-note {
    font-size: 0.85rem;
    color: var(--brown);
    margin: 0.3rem 0 0.8rem;
    font-style: italic;
}

.river-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.river-links-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--sand-dark);
}

.river-links-list li:last-child {
    border-bottom: none;
}

.river-links-list a {
    color: var(--blue);
    text-decoration: none;
    font-weight: bold;
}

.river-links-list a:hover {
    color: var(--brown);
}

/* ── Gauges Page ──────────────────────────────────────── */

.gauges-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gauge-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 1rem;
    overflow: hidden;
}

.gauge-card-title {
    font-family: 'Georgia', serif;
    color: var(--brown);
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.gauge-card-mile {
    font-family: 'Segoe UI', system-ui, Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: normal;
    color: var(--green);
}

.gauge-img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    background-color: var(--sand);
}

.gauge-external-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--blue);
    text-decoration: none;
    font-weight: bold;
}

.gauge-external-link:hover {
    color: var(--brown);
}

.gauge-links {
    display: flex;
    gap: 1.5rem;
}


/* ── Selected River Banner ────────────────────────────── */

.selected-river-banner {
    background-color: var(--sand);
    padding: 0.7rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--brown);
}

.selected-river-banner strong {
    font-family: 'Georgia', serif;
}

.form-page h2 {
    color: var(--brown);
    margin-bottom: 0.5em;
}

.form-intro {
    color: var(--green);
    margin: 0 0 1.2em;
}

.back-link {
    background: none;
    border: none;
    color: var(--blue);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0;
    margin-bottom: 1rem;
    display: inline-block;
}

.back-link:hover {
    color: var(--brown);
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 0.25em;
    margin-top: 0.75em;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--brown);
}

label:first-of-type {
    margin-top: 0;
}

input[type="text"],
input[type="date"],
select {
    padding: 0.55em;
    margin-bottom: 0.5em;
    border: 2px solid var(--sand-dark);
    background-color: #fff;
    font-size: 1rem;
    color: var(--brown);
}

input[type="text"]:focus,
input[type="date"]:focus,
select:focus {
    outline: none;
    border-color: var(--blue);
}

.field-hint {
    font-size: 0.8rem;
    color: var(--green);
    margin-bottom: 0.3em;
}

.form-page .btn-primary,
.form-page .btn-secondary {
    margin-top: 1rem;
}

.button-row {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* ── Invitation Code Display ──────────────────────────── */

.invitation-code {
    font-family: 'Georgia', serif;
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-align: center;
    color: var(--rust);
    padding: 0.4em;
    margin: 0.5em 0;
    background-color: var(--sand);
    border: 3px dashed var(--rust);
    border-radius: 8px;
}

.invitation-code-details {
    text-align: center;
    color: var(--green);
}

.editable-title {
    cursor: pointer;
}

.editable-title:hover {
    color: var(--blue);
}

.editable-title-input {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--brown);
    border: 2px solid var(--blue);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.5rem;
}

.trip-meta {
    color: var(--green);
    margin-bottom: 1rem;
}

.trip-river-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

.trip-river-link:hover {
    text-decoration: underline;
}

/* ── Trip Dashboard ───────────────────────────────────── */

.trip-dashboard {
    padding: 2rem 1.5rem;
}

.trip-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.trip-nav-link {
    padding: 0.4rem 1rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 2px solid var(--sand-dark);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: var(--sand-dark);
    color: var(--brown);
    opacity: 0.6;
    transition: opacity 0.15s, background 0.15s;
    margin-bottom: -2px;
    z-index: 0;
}

.trip-nav-link:hover {
    opacity: 0.8;
}

.trip-nav-link.active {
    opacity: 1;
    z-index: 3;
}

/* Per-tab colors */
.trip-nav-link[data-section="calendar"] {
    border-color: var(--rust);
}
.trip-nav-link[data-section="calendar"].active {
    background: var(--rust);
    color: #fff;
}

.trip-nav-link[data-section="people"] {
    border-color: var(--blue);
}
.trip-nav-link[data-section="people"].active {
    background: var(--blue);
    color: #fff;
}

.trip-nav-link[data-section="roles"] { border-color: var(--green); }
.trip-nav-link[data-section="roles"].active { background: var(--green); color: #fff; }

.trip-nav-link[data-section="boats"] { border-color: var(--brown); }
.trip-nav-link[data-section="boats"].active { background: var(--brown); color: #fff; }

.trip-nav-link[data-section="gear"] { border-color: var(--mustard); }
.trip-nav-link[data-section="gear"].active { background: var(--mustard); color: #fff; }

.trip-nav-link[data-section="meals"] { border-color: var(--rust); }
.trip-nav-link[data-section="meals"].active { background: var(--rust); color: #fff; }

.trip-nav-link[data-section="camps"] { border-color: var(--blue); }
.trip-nav-link[data-section="camps"].active { background: var(--blue); color: #fff; }

.trip-nav-link[data-section="chores"] { border-color: var(--green); }
.trip-nav-link[data-section="chores"].active { background: var(--green); color: #fff; }

.trip-nav-link[data-section="shuttle"] { border-color: var(--mustard); }
.trip-nav-link[data-section="shuttle"].active { background: var(--mustard); color: #fff; }

.trip-nav-link[data-section="home"] { border-color: var(--brown); }
.trip-nav-link[data-section="home"].active { background: var(--brown); color: #fff; }

/* Section header bar — color matches its tab, overlaps inactive tabs */
.trip-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    border-radius: 0 6px 0 0;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

#trip-home-section .trip-section-header        { background: var(--brown); }
#trip-calendar-section .trip-section-header   { background: var(--rust); }
#trip-people-section .trip-section-header     { background: var(--blue); }
#trip-roles-section .trip-section-header       { background: var(--green); }
#trip-boats-section .trip-section-header       { background: var(--brown); }
#trip-gear-section .trip-section-header        { background: var(--mustard); }
#trip-meals-section .trip-section-header       { background: var(--rust); }
#trip-camps-section .trip-section-header       { background: var(--blue); }
#trip-chores-section .trip-section-header      { background: var(--green); }
#trip-shuttle-section .trip-section-header     { background: var(--mustard); }

.section-tbd-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-style: italic;
}

/* Section notes — editable text between header and content */
.section-note {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--brown);
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.section-note-text {
    flex: 1;
    user-select: text;
}

.section-note-text p {
    margin: 0;
}

.section-note-text a {
    color: var(--blue);
}

.section-note-edit-btn {
    flex-shrink: 0;
    order: 1;
    border: none;
    background: transparent;
    color: #bbb;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.section-note-edit-btn:hover {
    color: var(--brown);
}

.section-note-empty {
    opacity: 0.4;
    font-style: italic;
}

.section-note-input {
    display: block;
    width: 100%;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--brown);
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.75rem;
    border: 2px solid var(--blue);
    border-radius: 4px;
    resize: vertical;
    line-height: 1.4;
    box-sizing: border-box;
}

.cal-days-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
}

.cal-days-input {
    width: 4rem;
    padding: 0.15rem 0.4rem;
    border: 2px solid var(--blue);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    text-align: center;
}

.empty-state {
    color: var(--green);
    font-style: italic;
    padding: 1rem 0;
}

/* ── Calendar Grid (Sun–Sat weekly view) ──────────────── */

.calendar-grid-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.calendar-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar-grid th {
    background: var(--rust);
    color: var(--sand);
    padding: 0.4rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.calendar-grid td {
    border: 1px solid #ddd;
    padding: 0.4rem;
    vertical-align: top;
    height: 5.5rem;
}

.cal-trip-day {
    background: #fff;
}

.cal-empty {
    background: var(--sand);
    opacity: 0.45;
}

.cal-date-row {
    margin-bottom: 0.15rem;
    white-space: nowrap;
}

.cal-date {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brown);
}

.cal-date-muted {
    color: #aaa;
    font-weight: 400;
}

.cal-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rust);
    cursor: pointer;
}

.cal-label-input {
    width: 60%;
    padding: 0.1rem 0.2rem;
    border: 2px solid var(--rust);
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    box-sizing: border-box;
}

.cal-notes {
    font-size: 0.8rem;
    color: var(--green);
    cursor: pointer;
    min-height: 1.5em;
    line-height: 1.3;
    white-space: pre-line;
}

.cal-notes:empty::after {
    content: "click to add...";
    color: #bbb;
    font-style: italic;
}

.cal-note-input {
    width: 100%;
    padding: 0.2rem;
    border: 2px solid var(--blue);
    font-size: 0.8rem;
    font-family: inherit;
    resize: vertical;
    min-height: 3em;
    box-sizing: border-box;
}

.cal-add-slot {
    opacity: 1;
    text-align: center;
}

.cal-add-day-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-top: 0.4rem;
    border: 2px dashed var(--rust);
    border-radius: 50%;
    background: transparent;
    color: var(--rust);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.cal-add-day-btn:hover {
    background: var(--rust);
    color: #fff;
}

.cal-remove-day-btn {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    width: 1.2rem;
    height: 1.2rem;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #bbb;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.cal-remove-day-btn:hover {
    background: var(--rust);
    color: #fff;
}

@media (max-width: 600px) {
    .calendar-grid {
        min-width: 600px;
    }
}

/* ── People ────────────────────────────────────────────── */

.people-table-wrapper {
    overflow-x: auto;
}

.people-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.people-table th,
.people-table td {
    border: 1px solid var(--sand-dark);
    padding: 0.4rem 0.5rem;
    vertical-align: top;
}

.people-th {
    text-align: left;
    background: var(--blue);
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}
.people-th-email,
.people-td-email {
    display: flex;
    align-items: center;
}

.people-td-name {
    font-weight: 600;
    color: var(--brown);
    white-space: nowrap;
}

.people-td-name .manifest-delete-btn {
    float: right;
    opacity: 0.3;
}

.people-td-name:hover .manifest-delete-btn {
    opacity: 1;
}

.people-editable {
    cursor: pointer;
}

.people-editable:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
}

.people-field-empty {
    opacity: 0.4;
}

.people-inline-input {
    width: 100%;
    padding: 0.2rem 0.3rem;
    border: 2px solid var(--blue);
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.85rem;
    box-sizing: border-box;
}

.people-td-actions {
    white-space: nowrap;
}

.people-edit-row td {
    padding: 0;
    background: var(--sand);
}

/* Add person form */
.add-person-form {
    background: var(--sand);
    border: 2px solid var(--sand-dark);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.add-person-heading {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--brown);
}

.add-person-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.add-person-input {
    width: 100%;
    padding: 0.4rem;
    border: 2px solid var(--sand-dark);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.85rem;
    background: #fff;
    box-sizing: border-box;
}

.add-person-input:focus {
    border-color: var(--blue);
    outline: none;
}

.add-person-row .btn-primary {
    align-self: flex-start;
}

/* People status sections */
.people-section-divider {
    border: none;
    border-top: 3px solid var(--sand-dark);
    margin: 1.2rem 0 0.6rem;
}

.people-section-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--brown);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.people-regrets-label {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--rust);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.people-regrets-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.people-regrets-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
    color: var(--brown);
    opacity: 0.6;
}

.people-regrets-row .people-regrets-name {
    text-decoration: line-through;
}

.people-status-table {
    border-collapse: collapse;
    width: auto;
    font-size: 0.85rem;
}

.people-status-table td {
    padding: 0.2rem 0.5rem;
    color: var(--brown);
}

.people-status-name {
    font-weight: 600;
}

.people-regrets-name {
    text-decoration: line-through;
    opacity: 0.6;
}

.people-status-actions {
    text-align: right;
    white-space: nowrap;
}

.people-status-btn {
    background: none;
    border: 1px solid var(--sand-dark);
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.1rem 0.35rem;
    color: var(--brown);
    line-height: 1;
}

.people-status-btn:hover {
    background: var(--sand);
    border-color: var(--brown);
}

/* ── Boats ─────────────────────────────────────────────── */

.manifest-add-vessel-btn {
    margin-bottom: 1rem;
}

.manifest-vessel-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.manifest-vessel-card-body {
    flex: 1;
    background: #fff;
    border: 2px solid var(--sand-dark);
    border-radius: 6px;
    padding: 1rem;
}

/* Vessel icon — colored circle with boat image */
.vessel-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 5px solid #2196F3;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.5rem;
    overflow: visible;
}

.vessel-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

/* Color picker row in add/edit forms */
.vessel-color-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.vessel-color-heading {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brown);
}

.vessel-color-label {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--brown);
    padding-top: 0.2rem;
}

/* Color swatch grid picker */
.color-swatch-picker {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 3px;
}

.color-swatch {
    width: 1.4rem;
    height: 1.4rem;
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 3px;
    cursor: pointer;
    padding: 0;
}

.color-swatch:hover {
    border-color: var(--brown);
    transform: scale(1.15);
}

.color-swatch-selected {
    border-color: var(--brown);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brown);
}

/* Color edit popup */
.vessel-color-popup {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 20;
    background: #fff;
    border: 2px solid var(--sand-dark);
    border-radius: 6px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.manifest-vessel-actions {
    flex: 0 0 auto;
    align-self: flex-start;
}

.manifest-vessel-columns {
    display: flex;
    gap: 1rem;
}

.manifest-vessel-col-left {
    flex: 1;
    min-width: 0;
}

.manifest-vessel-col-right {
    flex: 0 0 auto;
    border-left: 1px solid var(--sand-dark);
    padding-left: 0.75rem;
    font-size: 0.8rem;
    color: var(--slate, #666);
}

.manifest-vessel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.manifest-vessel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.manifest-vessel-type {
    font-size: 0.95rem;
    color: var(--brown);
    cursor: pointer;
}

.manifest-vessel-type:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
}

.manifest-vessel-length {
    font-size: 0.95rem;
    color: var(--brown);
    cursor: pointer;
}

.manifest-vessel-length:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
}

.manifest-vessel-placeholder {
    opacity: 0.4;
    font-style: italic;
}

.manifest-vessel-nick {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brown);
    cursor: pointer;
}

.manifest-vessel-nick:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
}

.manifest-crew-text {
    display: block;
    font-size: 0.9rem;
    color: var(--brown);
    cursor: pointer;
    padding: 0.3rem 0;
}

.manifest-crew-text:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
}

.manifest-vessel-gear {
    font-size: 0.8rem;
    color: var(--slate, #666);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.manifest-vessel-detail {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--brown);
    padding: 0.15rem 0;
}

.manifest-vessel-detail-label {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #888;
}

.manifest-crew-select,
.manifest-crew-popup {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    background: #fff;
    border: 2px solid var(--sand-dark);
    border-radius: 6px;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 14rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.popup-close-btn {
    position: absolute;
    top: 0.2rem;
    right: 0.3rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--brown);
    opacity: 0.5;
    line-height: 1;
    padding: 0;
}

.popup-close-btn:hover {
    opacity: 1;
}

.manifest-crew-select option:disabled {
    color: #aaa;
}

.manifest-vessel-actions {
    display: flex;
    gap: 0.25rem;
}

.manifest-inline-btn {
    background: none;
    border: 1px solid var(--sand-dark);
    border-radius: 3px;
    padding: 0.15em 0.5em;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--brown);
    font-family: inherit;
}

.manifest-inline-btn:hover {
    background: var(--sand-dark);
}

.manifest-delete-btn {
    color: #c0392b;
    border-color: #e6b0aa;
}

.manifest-delete-btn:hover {
    background: #fce4e4;
}

.manifest-captain-active {
    background: var(--mustard);
    color: #fff;
    border-color: var(--mustard);
    font-weight: 600;
}

.manifest-captain-active:hover {
    background: #c4912e;
}

.manifest-crew-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.manifest-person-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--sand-dark);
}

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

.manifest-person-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.manifest-person-name {
    font-weight: 600;
    color: var(--brown);
}

.manifest-person-actions {
    display: flex;
    gap: 0.25rem;
}

.manifest-person-details {
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.2rem;
}

.manifest-add-person-btn {
    margin-top: 0.5rem;
    color: var(--green);
    border-color: var(--green);
}

.manifest-add-person-btn:hover {
    background: #e8f0e8;
}

/* Manifest forms */

.manifest-vessel-form,
.manifest-person-form {
    background: var(--sand);
    border: 2px solid var(--sand-dark);
    border-radius: 6px;
    padding: 0.75rem;
    margin: 0.5rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 0.75rem;
}

.manifest-vessel-form label,
.manifest-person-form label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brown);
    margin-bottom: -0.4rem;
}

.manifest-input {
    width: 100%;
    padding: 0.3rem 0.5rem;
    border: 2px solid var(--sand-dark);
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
    box-sizing: border-box;
}

.manifest-input:focus {
    border-color: var(--blue);
    outline: none;
}

.manifest-inline-edit {
    width: auto;
    max-width: 12rem;
}

.manifest-form-actions {
    display: flex;
    gap: 0.5rem;
    grid-column: 1 / -1;
}

.manifest-form-actions .btn-primary,
.manifest-form-actions .btn-secondary {
    font-size: 0.8rem;
    padding: 0.3rem 1rem;
}

/* Assign picker & Unassigned section */

.manifest-unassigned {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    border: 1px dashed var(--sand-dark);
}

.manifest-unassigned-header {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: var(--brown);
}

.manifest-assign-picker {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
}

.manifest-assign-label {
    display: block;
    padding: 0.2rem 0;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Badge */

.people-mail-icon {
    margin-left: auto;
    text-decoration: none;
    font-size: 0.95rem;
    color: var(--blue);
    opacity: 0.6;
}
.people-mail-icon:hover {
    opacity: 1;
}
.people-mail-all {
    margin-left: auto;
    text-decoration: none;
    font-size: 1.1rem;
    color: #fff;
    opacity: 0.7;
}
.people-mail-all:hover {
    opacity: 1;
}

.manifest-count-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.1em 0.6em;
    border-radius: 999px;
    margin-left: 0.5rem;
}

.manifest-count-badge:empty {
    display: none;
}

/* Relative position for reassign anchoring */

.manifest-person-actions {
    position: relative;
}

@media (max-width: 600px) {
    .manifest-vessel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .manifest-person-name-row {
        flex-direction: column;
        align-items: flex-start;
    }

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

/* ── Shared Add Item Form ─────────────────────────────── */

.add-item-form {
    background: var(--sand);
    border: 2px solid var(--sand-dark);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.add-item-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brown);
}

.add-item-input {
    padding: 0.4rem;
    border: 2px solid var(--sand-dark);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
}

.add-item-input:focus {
    border-color: var(--blue);
    outline: none;
}

.add-item-form .btn-primary {
    align-self: flex-start;
}

.add-item-preview {
    font-size: 0.85rem;
    color: #555;
    font-style: italic;
    padding: 0.4rem 0.5rem;
    background: #fff;
    border-left: 3px solid var(--green);
    border-radius: 2px;
}

/* ── Roles ────────────────────────────────────────────── */

.roles-count-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.1em 0.6em;
    border-radius: 999px;
    margin-left: 0.5rem;
}

.roles-count-badge:empty {
    display: none;
}

.role-card {
    background: #fff;
    border: 2px solid var(--sand-dark);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.role-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.role-card-name {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brown);
    cursor: pointer;
}

.role-card-name:hover {
    text-decoration: underline;
}

.role-card-actions {
    display: flex;
    gap: 0.25rem;
}

.role-card-description {
    color: #666;
    font-size: 0.9rem;
    margin: 0.25rem 0 0.5rem;
    cursor: pointer;
}

.role-card-description:hover {
    text-decoration: underline;
}

.role-card-assignees {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.role-unassigned {
    color: var(--rust);
    font-style: italic;
}

.role-card-assignee-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.role-card-assign-label {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
}

.role-assign-select {
    flex: 1;
    max-width: 14rem;
}

/* ── Gear ─────────────────────────────────────────────── */

.gear-profile-loader {
    text-align: center;
    padding: 1rem 0;
}

.gear-profile-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
}

.gear-table-wrapper {
    overflow-x: auto;
}

.gear-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.gear-table th,
.gear-table td {
    border: 1px solid var(--sand-dark);
    padding: 0.4rem 0.5rem;
    vertical-align: top;
}

.gear-th-item {
    text-align: left;
    background: var(--mustard);
    color: #fff;
    font-weight: 600;
    min-width: 12rem;
    position: sticky;
    left: 0;
    z-index: 1;
}

.gear-th-vessel {
    text-align: center;
    background: var(--mustard);
    color: #fff;
    font-weight: 600;
    min-width: 8rem;
}

.gear-category-row td {
    background: var(--sand-dark);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brown);
    padding: 0.3rem 0.5rem;
}

.gear-td-name {
    background: #fff;
    position: sticky;
    left: 0;
    z-index: 1;
}

.gear-item-name {
    font-weight: 600;
    cursor: pointer;
}

.gear-item-name:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
}

.gear-item-desc {
    font-size: 0.78rem;
    color: #666;
    margin-top: 0.15rem;
    cursor: pointer;
}

.gear-item-desc:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
}

.gear-delete-btn {
    float: right;
    opacity: 0.4;
}

.gear-td-name:hover .gear-delete-btn {
    opacity: 1;
}

.gear-td-cell {
    background: #fff;
    text-align: center;
    min-width: 8rem;
}

.gear-offer-btn {
    background: none;
    border: 2px dashed var(--sand-dark);
    border-radius: 4px;
    color: var(--brown);
    cursor: pointer;
    padding: 0.2rem 0.6rem;
    font-size: 1rem;
    opacity: 0.4;
}

.gear-offer-btn:hover {
    opacity: 1;
    border-color: var(--mustard);
    color: var(--mustard);
}

/* Offering cell */
.gear-offering {
    font-size: 0.8rem;
    text-align: left;
    height: 100%;
}

.gear-td-confirmed {
    outline: 3px solid var(--green);
    outline-offset: -3px;
}

.gear-offering-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.2rem;
}

.gear-offering-desc {
    cursor: pointer;
    word-break: break-word;
}

.gear-count-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.1em 0.6em;
    border-radius: 999px;
    margin-left: 0.5rem;
}

.gear-count-badge:empty {
    display: none;
}

.gear-condition-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    cursor: pointer;
}

.condition-good { background: #4CAF50; }
.condition-fair { background: var(--mustard); }
.condition-poor { background: var(--rust); }

.gear-offering-desc:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
}

.gear-remove-offering {
    opacity: 0.3;
    font-size: 0.75rem;
    line-height: 1;
}

.gear-offering:hover .gear-remove-offering {
    opacity: 1;
}

/* Offer form (inline in cell) */
.gear-offer-form {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.2rem;
}

.gear-offer-input {
    padding: 0.25rem;
    border: 1px solid var(--sand-dark);
    border-radius: 3px;
    font-size: 0.8rem;
    font-family: inherit;
}

.gear-offer-input:focus {
    border-color: var(--blue);
    outline: none;
}

.gear-offer-btn-row {
    display: flex;
    gap: 0.3rem;
}

.gear-inline-edit {
    font-size: 0.85rem;
    padding: 0.2rem 0.3rem;
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
}

/* ── Meals ─────────────────────────────────────────────── */

.meals-count-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.1em 0.6em;
    border-radius: 999px;
    margin-left: 0.5rem;
}

.meals-count-badge:empty {
    display: none;
}

.meals-table-wrapper {
    overflow-x: auto;
}

.meals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.meals-table th,
.meals-table td {
    border: 1px solid var(--sand-dark);
    padding: 0.4rem 0.5rem;
    vertical-align: top;
}

.meals-table th {
    background: var(--rust);
    color: #fff;
    font-weight: 600;
    text-align: center;
}

.meals-slot-header {
    cursor: pointer;
}

.meals-slot-header:hover {
    opacity: 0.8;
}

.meals-slot-disabled {
    text-decoration: line-through;
    opacity: 0.5;
}

.meals-td-disabled {
    background: var(--sand-light);
    text-align: center;
    color: #999;
    opacity: 0.4;
}

.meals-table th:first-child {
    text-align: left;
}

.meals-td-day {
    background: #fff;
    white-space: nowrap;
    font-weight: 600;
    min-width: 6rem;
}

.meals-day-date {
    font-size: 0.75rem;
    font-weight: 400;
    color: #888;
}

.meals-td-slot {
    background: #fff;
    min-width: 10rem;
}

.meals-cell {
    font-size: 0.8rem;
}

.meals-cell-skip {
    color: #999;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meals-assign-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.2rem;
}

.meals-assign-select {
    flex: 1;
    padding: 0.2rem;
    border: 1px solid var(--sand-dark);
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.8rem;
    background: #fff;
}

.meals-assign-select:focus {
    border-color: var(--blue);
    outline: none;
}

.meals-skip-btn {
    font-size: 0.7rem;
    color: #999;
}

.meals-desc {
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.1rem 0;
}

.meals-desc:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
}

.meals-desc-empty {
    color: #aaa;
    font-style: italic;
}

.meals-desc-input {
    width: 100%;
    padding: 0.2rem 0.3rem;
    border: 1px solid var(--sand-dark);
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.8rem;
}

.meals-desc-input:focus {
    border-color: var(--blue);
    outline: none;
}

/* Cook Teams */

.cook-teams-section {
    margin-top: 1.5rem;
}

.cook-teams-heading {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--brown);
}

.cook-teams-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.cook-teams-table th,
.cook-teams-table td {
    border: 1px solid var(--sand-dark);
    padding: 0.3rem 0.5rem;
    text-align: left;
}

.cook-teams-table th {
    background: var(--sand-dark);
    font-weight: 600;
    font-size: 0.8rem;
}

.cook-team-name-cell {
    white-space: nowrap;
}

.cook-team-name {
    font-weight: 600;
    cursor: pointer;
}

.cook-team-name:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
}

.cook-team-delete {
    float: right;
    opacity: 0.3;
}

.cook-team-name-cell:hover .cook-team-delete {
    opacity: 1;
}

.cook-team-members {
    cursor: pointer;
}

.cook-team-members:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
}

.cook-team-count {
    text-align: center;
    font-weight: 600;
}

.cook-team-member-picker {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.4rem 0;
}

.cook-team-member-option {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}

.cook-team-member-taken {
    opacity: 0.5;
    cursor: default;
    font-style: italic;
}

.cook-team-member-picker-inline {
    border: 1px solid var(--sand-dark);
    border-radius: 4px;
    padding: 0.4rem;
    background: var(--sand-light);
}

/* ── Shuttle ───────────────────────────────────────────── */

.shuttle-section {
    margin-top: 1.5rem;
}

.shuttle-heading {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--brown);
}

.shuttle-table-wrapper {
    overflow-x: auto;
    margin-bottom: 1rem;
    position: relative;
}

.shuttle-table-wrapper.popup-open {
    overflow: visible;
}

.shuttle-table {
    min-width: 900px;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.shuttle-table th,
.shuttle-table td {
    border: 1px solid var(--sand-dark);
    padding: 0.3rem 0.5rem;
    text-align: left;
    vertical-align: top;
}

.shuttle-table th {
    background: var(--mustard);
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.shuttle-vehicle-name-cell {
    white-space: nowrap;
}

.shuttle-vehicle-name {
    font-weight: 600;
    cursor: pointer;
}

.shuttle-vehicle-name:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
}

.shuttle-vehicle-delete {
    float: right;
    opacity: 0.3;
}

.shuttle-vehicle-name-cell:hover .shuttle-vehicle-delete {
    opacity: 1;
}

.shuttle-editable {
    cursor: pointer;
}

.shuttle-editable:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
}

.shuttle-passengers {
    cursor: pointer;
}

.shuttle-passengers:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
}

.shuttle-toggle-cell {
    text-align: center;
}

.shuttle-toggle-btn {
    background: none;
    border: 1px solid var(--sand-dark);
    border-radius: 4px;
    padding: 0.1rem 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
}

.shuttle-toggle-btn:hover {
    background: var(--sand-light);
}

.shuttle-capacity-cell {
    text-align: center;
}

.shuttle-inline-input {
    width: 100%;
    min-width: 60px;
    box-sizing: border-box;
}

.shuttle-count-badge {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
}

.shuttle-passenger-picker {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.4rem 0;
}

.shuttle-passenger-option {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
}

.shuttle-passenger-taken {
    opacity: 0.5;
    cursor: default;
    font-style: italic;
}

.shuttle-passenger-picker-inline {
    border: 1px solid var(--sand-dark);
    border-radius: 4px;
    padding: 0.4rem;
    background: var(--sand-light);
}

.shuttle-form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    margin: 0.3rem 0;
    cursor: pointer;
}

.shuttle-form-section-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    margin-bottom: 0.15rem;
    color: var(--brown);
}

/* ── Camps ────────────────────────────────────────────── */

.camps-count-badge {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.2rem 0.8rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
}

.camps-table-wrapper {
    overflow-x: auto;
}

.camps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.camps-table th,
.camps-table td {
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--sand-dark);
    vertical-align: top;
    white-space: nowrap;
}

.camps-td-night {
    font-weight: 700;
    white-space: nowrap;
}

.camps-day-date {
    font-size: 0.75rem;
    font-weight: 400;
    color: #888;
}

.camps-td-note {
    position: relative;
}

.camps-td-layover {
    text-align: center;
    width: 3rem;
}
.camps-layover-cb {
    accent-color: var(--green);
}
.camps-layover-cb:disabled {
    opacity: 0.3;
}

.camps-note-text {
    display: block;
    max-width: 300px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.camps-td-choice {
    width: 25%;
    white-space: normal;
    overflow: hidden;
}

.camps-td-miles {
    text-align: center;
    font-weight: 600;
}

.camps-miles-error {
    color: #c62828;
    font-weight: 700;
    font-size: 0.75rem;
}
.camps-miles-layover {
    color: var(--green);
    font-style: italic;
    font-weight: 400;
}

.camps-cell-na {
    color: var(--brown);
    opacity: 0.5;
    text-align: center;
    font-style: italic;
}

.camps-row-confirmed {
    background: rgba(255, 235, 59, 0.1);
}

.camps-td-confirmed {
    outline: 3px solid var(--green);
    outline-offset: -3px;
}

.camps-row-confirmed .camps-td-night {
    background: var(--mustard);
    color: var(--brown);
}

.camps-choice-info {
    font-size: 0.7rem;
    color: var(--brown);
    opacity: 0.75;
    margin-top: 0.2rem;
    line-height: 1.2;
}

.camps-select {
    width: 100%;
    min-width: 0;
    padding: 0.2rem;
    border: 1px solid var(--sand-dark);
    border-radius: 3px;
    background: var(--sand-light);
    font-size: 0.8rem;
}

.camps-select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.camps-note-text {
    cursor: pointer;
}

.camps-note-text:hover {
    text-decoration: underline;
    text-decoration-style: dashed;
}

.camps-note-empty {
    color: var(--brown);
    opacity: 0.4;
}

.camps-inline-input {
    position: absolute;
    left: 0;
    top: 0;
    min-width: 12rem;
    padding: 0.2rem;
    border: 1px solid var(--sand-dark);
    border-radius: 3px;
    font-size: 0.85rem;
    background: #fff;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.camps-mileage-summary {
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ── Messages ─────────────────────────────────────────── */

.message {
    padding: 0.75em;
    margin: 1em 0;
    text-align: center;
    border: 2px solid;
}

.message.error {
    background-color: #fce4e4;
    color: #c0392b;
    border-color: #e6b0aa;
}

.message.success {
    background-color: #e8f8e8;
    color: #27ae60;
    border-color: #a9dfbf;
}

/* ── Responsive ───────────────────────────────────────── */

@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.7rem;
    }

    .hero-overlay h1 {
        font-size: 1.4rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

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

    .process-connector {
        width: 1.5rem;
    }

    .form-page {
        margin: 1rem;
        padding: 1.2rem;
    }

    .invitation-code {
        font-size: 1.5rem;
    }

    .logo-placeholder {
        font-size: 1.5rem;
    }
}

/* ===== Home Tab Content ===== */
.home-content {
    max-width: 700px;
    line-height: 1.7;
}

.home-content h1 {
    color: var(--brown);
    font-size: 1.8rem;
    margin-top: 0;
}

.home-content h2 {
    color: var(--rust);
    font-size: 1.3rem;
    margin-top: 2rem;
    border-bottom: 2px solid var(--sand-dark);
    padding-bottom: 0.3rem;
}

.home-content h3 {
    color: var(--brown);
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

.home-content a {
    color: var(--blue);
}

.home-content hr {
    border: none;
    border-top: 2px solid var(--sand-dark);
    margin: 1.5rem 0;
}

.home-content ul,
.home-content ol {
    padding-left: 1.5rem;
}

.home-content li {
    margin-bottom: 0.3rem;
}

.home-content code {
    background: var(--sand);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.home-content strong {
    color: var(--brown);
}

.home-edited-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.25);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
}

.home-edited-badge:empty {
    display: none;
}

.home-edit-btn {
    margin-top: 1.5rem;
}

.home-edit-textarea {
    width: 100%;
    max-width: 700px;
    min-height: 500px;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0.75rem;
    border: 2px solid var(--sand-dark);
    border-radius: 4px;
    background: #fff;
    color: var(--brown);
    resize: vertical;
}

.home-edit-textarea:focus {
    outline: none;
    border-color: var(--brown);
}
