:root {
    --navy-950: #0a1f3d;
    --navy-800: #123a6b;
    --blue-600: #1d5fd6;
    --blue-500: #2f74e6;
    --blue-100: #dbe7f8;
    --blue-50: #f2f6fc;
    --slate-600: #4f637d;
    --ink: #0f2340;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, Segoe UI, Roboto, sans-serif;
    background: var(--blue-50);
    color: var(--ink);
}

.container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

nav.topbar {
    background: var(--navy-950);
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
}

nav.topbar a {
    color: #dbe7f8;
    text-decoration: none;
    font-size: 0.95rem;
}

nav.topbar a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--navy-950);
}

.card {
    background: #fff;
    border: 1px solid var(--blue-100);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

form.stack label {
    display: block;
    margin-bottom: 0.9rem;
    font-size: 0.9rem;
}

/* Keep text-style form controls a comfortable reading width even inside a
   wide .card — only the tables/checkbox-lists should use the extra room. */
form.stack input:not([type="checkbox"]):not([type="radio"]),
form.stack select {
    display: block;
    width: 100%;
    max-width: 480px;
    padding: 0.55rem 0.6rem;
    margin-top: 0.3rem;
    border: 1px solid #c3d3ea;
    border-radius: 6px;
    font-size: 0.95rem;
}

form.stack input[type="checkbox"],
form.stack input[type="radio"] {
    width: auto;
    margin-top: 0;
}

button, .btn {
    background: var(--blue-600);
    color: #fff;
    border: none;
    padding: 0.6rem 1.1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-block;
}

button.danger, .btn.danger {
    background: #c62828;
}

button:hover, .btn:hover {
    background: var(--blue-500);
    opacity: 1;
}

.error {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    color: #611a15;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--blue-100);
}

.muted {
    color: var(--slate-600);
    font-size: 0.85rem;
}

/* Stacked-field record layout (e.g. recipients) — used instead of a wide
   table when there are too many per-row fields to fit without overflow. */
.record-row {
    border-bottom: 1px solid var(--blue-100);
    padding: 1rem 0;
}

.record-row:first-child {
    padding-top: 0;
}

.record-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.record-grid {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-width: 480px;
}

.record-grid label {
    display: block;
    font-size: 0.8rem;
    color: var(--slate-600);
}

.record-grid input,
.record-grid select {
    display: block;
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.55rem 0.6rem;
    border: 1px solid #c3d3ea;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
}

.record-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-top: 0.85rem;
}

.record-actions form {
    display: inline;
}

.dropzone {
    border: 2px dashed #c3d3ea;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    margin-bottom: 0.9rem;
    background: var(--blue-50);
}

.dropzone-active {
    border-color: var(--blue-600);
    background: var(--blue-100);
}

.dropzone-hint {
    margin: 0;
    color: var(--slate-600);
    font-size: 0.9rem;
}

.dropzone-browse {
    color: var(--blue-600);
    text-decoration: underline;
    cursor: pointer;
}

.file-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    text-align: left;
    font-size: 0.85rem;
    color: var(--ink);
}

.file-list li {
    padding: 0.15rem 0;
}

code, .secret {
    font-family: ui-monospace, Consolas, monospace;
    background: var(--blue-100);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    word-break: break-all;
}

/* ---- Public marketing pages ---- */

.container-wide {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

.container-narrow {
    max-width: 760px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

.topbar-public {
    justify-content: space-between;
    position: relative;
}

.topbar-public .brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
}

.topbar-public .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    align-items: center;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #dbe7f8;
    font-size: 1.4rem;
    padding: 0.2rem 0.4rem;
}

.hero {
    background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
    color: #fff;
    padding: 3.5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.2rem;
    max-width: 780px;
    margin: 0 auto 1rem;
    line-height: 1.25;
    color: #fff;
}

.hero-sub {
    max-width: 640px;
    margin: 0 auto 1.75rem;
    color: #c3d4ec;
    font-size: 1.05rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    justify-content: center;
}

.btn-lg {
    padding: 0.85rem 1.6rem;
    font-size: 1rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

.section {
    padding: 3rem 0;
}

.section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    text-align: center;
    color: var(--navy-950);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
}

.cta-band {
    text-align: center;
    background: #fff;
    border: 1px solid var(--blue-100);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0 3rem;
}

.price-card {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.price-amount {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.25rem 0 1rem;
    color: var(--blue-600);
}

.price-interval {
    font-size: 1rem;
    font-weight: 400;
    color: var(--slate-600);
}

.price-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    text-align: left;
    flex-grow: 1;
}

.price-features li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--blue-100);
    font-size: 0.92rem;
}


.feature-desc {
    display: inline-block;
    margin-top: 0.2rem;
}

.legal h2 {
    font-size: 1.15rem;
    margin: 1.75rem 0 0.5rem;
    color: var(--navy-950);
}

.legal p, .legal li {
    line-height: 1.6;
    font-size: 0.95rem;
    color: #2c3e57;
}

.site-footer {
    text-align: center;
    padding: 2.5rem 1.25rem;
    border-top: 1px solid var(--blue-100);
    margin-top: 1rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--navy-950);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ---- Check-in countdown (dashboard) ---- */

.countdown-heading {
    font-size: 1rem;
    margin: 0 0 0.75rem;
    color: var(--navy-950);
}

.countdown-bar {
    background: var(--blue-100);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.countdown-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--blue-600);
    border-radius: 999px;
    transition: width 1s linear, background-color 0.3s ease;
}

.countdown-warning .countdown-bar-fill {
    background: #c9860a;
}

.countdown-overdue .countdown-bar-fill {
    background: #c62828;
}

.countdown-time {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0.75rem 0 0.25rem;
    color: var(--navy-950);
    font-variant-numeric: tabular-nums;
}

.countdown-overdue .countdown-time {
    color: #c62828;
}

.countdown-sub {
    margin: 0;
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
    .container, .container-wide, .container-narrow {
        padding: 1.25rem 1rem;
    }

    h1 {
        font-size: 1.3rem;
    }

    .hero {
        padding: 2.5rem 0;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-sub {
        font-size: 0.95rem;
    }

    .nav-toggle {
        display: block;
    }

    .topbar-public .nav-links {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0.75rem;
        margin-top: 0.75rem;
    }

    .topbar-public .nav-links.open {
        display: flex;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
