:root {
    --ink: #10233a;
    --muted: #5e6f84;
    --paper: #f6f2e8;
    --paper-strong: #fffaf0;
    --line: rgba(16, 35, 58, 0.12);
    --accent: #d0672f;
    --accent-deep: #9f3c16;
    --teal: #0f6a74;
    --card-shadow: 0 18px 45px rgba(16, 35, 58, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(208, 103, 47, 0.16), transparent 34%),
        radial-gradient(circle at 85% 10%, rgba(15, 106, 116, 0.18), transparent 28%),
        linear-gradient(180deg, #efe7d4 0%, #f7f3ea 42%, #fcfaf5 100%);
    font-family: "Avenir Next", "Trebuchet MS", "Lucida Grande", sans-serif;
    min-height: 100vh;
}

.page-glow {
    position: fixed;
    inset: auto;
    width: 28rem;
    height: 28rem;
    filter: blur(32px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.page-glow-left {
    left: -8rem;
    top: 18rem;
    background: rgba(208, 103, 47, 0.25);
}

.page-glow-right {
    right: -8rem;
    top: 5rem;
    background: rgba(15, 106, 116, 0.22);
}

.topbar,
.layout {
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.25rem 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: inherit;
    text-decoration: none;
}

.brand small {
    display: block;
    color: var(--muted);
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--accent), var(--teal));
    color: white;
    font-weight: 700;
}

.nav-links,
.session-panel,
.hero-actions,
.search-actions,
.order-actions,
.ticket-details,
.order-topline,
.results-head,
.hero-panel,
.ticket-route,
.ticket-details {
    display: flex;
    gap: 1rem;
}

.nav-links a,
.ghost-button,
.primary-button {
    text-decoration: none;
}

.nav-links a {
    color: var(--ink);
    opacity: 0.85;
}

.nav-links a:hover {
    opacity: 1;
}

.layout {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto 3rem;
}

.flash-stack {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.flash {
    border-radius: 1rem;
    padding: 0.95rem 1.1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
}

.flash-success {
    border-color: rgba(15, 106, 116, 0.3);
}

.flash-error {
    border-color: rgba(159, 60, 22, 0.3);
}

.flash-warning {
    border-color: rgba(208, 103, 47, 0.3);
}

.card {
    background: rgba(255, 250, 240, 0.85);
    border: 1px solid rgba(16, 35, 58, 0.1);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
}

.hero-panel {
    align-items: stretch;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.hero-panel > * {
    flex: 1;
}

.hero-note {
    max-width: 30rem;
}

.eyebrow {
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--teal);
    font-size: 0.78rem;
    font-weight: 700;
}

h1,
h2,
h3 {
    font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
    margin: 0 0 0.75rem;
    line-height: 1.08;
}

h1 {
    font-size: clamp(2.2rem, 4vw, 4.2rem);
}

h2 {
    font-size: clamp(1.45rem, 2.6vw, 2.25rem);
}

.lede {
    max-width: 46rem;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.primary-button,
.ghost-button,
button,
input,
select {
    font: inherit;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.8rem 1.2rem;
    border: 1px solid transparent;
    cursor: pointer;
}

.primary-button {
    background: linear-gradient(135deg, var(--accent), var(--accent-deep));
    color: white;
}

.ghost-button {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.ghost-button[disabled],
.primary-button[disabled] {
    cursor: not-allowed;
    opacity: 0.55;
}

.session-chip {
    display: grid;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(255, 250, 240, 0.75);
    border: 1px solid var(--line);
}

.session-chip small {
    color: var(--muted);
}

.grid.two-up {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.accent-card {
    background: linear-gradient(180deg, rgba(15, 106, 116, 0.08), rgba(255, 250, 240, 0.88));
}

.flow-list,
.stat-list {
    padding-left: 1.2rem;
    margin: 0;
    color: var(--muted);
}

.stat-list {
    list-style: none;
    padding-left: 0;
    display: grid;
    gap: 0.75rem;
}

.stat-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--line);
}

.stack-form,
.search-form {
    display: grid;
    gap: 1rem;
}

.stack-form label,
.search-form label {
    display: grid;
    gap: 0.45rem;
}

label span {
    font-weight: 600;
}

input {
    width: 100%;
    padding: 0.85rem 0.95rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(16, 35, 58, 0.14);
    background: rgba(255, 255, 255, 0.88);
}

.single-column {
    max-width: 38rem;
    margin: 3rem auto;
}

.login-card {
    padding: 2rem;
}

.search-shell,
.orders-shell {
    display: grid;
    gap: 1.25rem;
}

.search-panel {
    padding: 1.5rem;
}

.search-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
}

.search-actions {
    align-items: center;
    grid-column: span 3;
}

.results-head {
    align-items: baseline;
    justify-content: space-between;
}

.ticket-grid,
.order-grid {
    display: grid;
    gap: 1rem;
}

.ticket-card,
.order-card {
    background: rgba(255, 255, 255, 0.76);
    border-radius: 1.5rem;
    border: 1px solid rgba(16, 35, 58, 0.09);
    padding: 1.35rem;
    box-shadow: var(--card-shadow);
}

.ticket-route {
    align-items: center;
    justify-content: space-between;
}

.route-code,
.fare-title {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--teal);
    font-size: 0.78rem;
    font-weight: 700;
}

.route-meta {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    color: var(--muted);
}

.route-line {
    width: 6rem;
    height: 2px;
    background: linear-gradient(90deg, var(--teal), var(--accent));
}

.ticket-details {
    justify-content: space-between;
    color: var(--muted);
    margin: 1rem 0 1.1rem;
    flex-wrap: wrap;
}

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

.fare-box {
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: rgba(246, 242, 232, 0.72);
    display: grid;
    gap: 0.65rem;
}

.fare-box strong {
    font-size: 1.35rem;
}

.order-topline {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.order-meta {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    color: var(--muted);
}

.order-meta div {
    padding: 0.8rem 0.9rem;
    border-radius: 1rem;
    background: rgba(246, 242, 232, 0.7);
}

.order-meta dt {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.3rem;
    color: var(--teal);
}

.order-meta dd {
    margin: 0;
}

.order-actions {
    margin-top: 1rem;
}

.status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-booked {
    background: rgba(15, 106, 116, 0.13);
    color: var(--teal);
}

.status-cancelled {
    background: rgba(208, 103, 47, 0.14);
    color: var(--accent-deep);
}

.empty-state {
    text-align: center;
    padding: 2.5rem;
}

code {
    padding: 0.1rem 0.4rem;
    border-radius: 0.5rem;
    background: rgba(16, 35, 58, 0.08);
}

@media (max-width: 900px) {
    .topbar,
    .hero-panel,
    .nav-links,
    .session-panel,
    .results-head,
    .ticket-route,
    .ticket-details {
        flex-direction: column;
        align-items: stretch;
    }

    .grid.two-up,
    .search-form,
    .fare-grid,
    .order-meta {
        grid-template-columns: 1fr;
    }

    .search-actions {
        grid-column: auto;
    }

    .layout {
        width: min(100% - 1rem, 1180px);
    }

    .topbar {
        padding: 1rem;
    }
}
