@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
    --bg: #171a20;
    --bg-alt: #1f242b;
    --surface: #20242b;
    --surface-alt: #252b33;
    --surface-soft: #2a313a;
    --ink: #f4f4f2;
    --muted: #c8c9ce;
    --line: rgba(255, 255, 255, 0.14);
    --line-strong: rgba(255, 214, 79, 0.45);
    --accent: #ffd64f;
    --accent-strong: #f0c62c;
    --accent-soft: rgba(255, 214, 79, 0.12);
    --success: #82d7a4;
    --danger: #ff9e92;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 10px 22px rgba(0, 0, 0, 0.22);
    --radius: 22px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--ink);
    line-height: 1.6;
    background:
        radial-gradient(circle at top left, rgba(255, 214, 79, 0.08), transparent 22%),
        linear-gradient(180deg, #171a20 0%, #1b2027 100%);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}

.login-card {
    width: min(520px, 100%);
}

.login-card__intro {
    margin-bottom: 1.25rem;
}

.dashboard-shell {
    width: min(1400px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 1.5rem 0 2rem;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.25rem;
}

.dashboard-sidebar {
    position: sticky;
    top: 1.5rem;
    height: fit-content;
    display: grid;
    gap: 1.5rem;
}

.dashboard-brand h1 {
    font-size: 3rem;
}

.sidebar-copy {
    margin: 0.7rem 0 0;
}

.dashboard-nav {
    display: grid;
    gap: 0.6rem;
}

.dashboard-nav__link {
    display: block;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-weight: 600;
}

.dashboard-nav__link.is-active,
.dashboard-nav__link:hover {
    color: var(--ink);
    border-color: rgba(255, 214, 79, 0.24);
    background: rgba(255, 214, 79, 0.08);
}

.dashboard-sidebar__footer {
    display: grid;
    gap: 0.75rem;
}

.dashboard-main {
    display: grid;
    gap: 1.25rem;
}

.dashboard-view {
    display: none;
}

.dashboard-view.is-active {
    display: block;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
}

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

.stat-card {
    margin-top: 0;
}

.stat-card__value {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 3rem;
    line-height: 1;
    color: var(--accent);
    margin: 0.4rem 0;
}

.stat-card__meta {
    margin: 0;
}

.dashboard-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.dashboard-grid--details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-card {
    margin-top: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
}

.page-shell--narrow {
    width: min(980px, calc(100% - 2rem));
}

.quote-page-intro {
    padding: 1rem 0 0.75rem;
}

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

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.05;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 600;
}

h1 {
    font-size: clamp(2.7rem, 6vw, 4.6rem);
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.55rem;
    margin-bottom: 0.85rem;
}

.hero__copy,
p,
label span,
legend,
.hint,
.notice {
    color: var(--muted);
}

.hero__copy {
    max-width: 58ch;
    font-size: 1.02rem;
    margin: 0.9rem 0 0;
}

.actions-row,
.toolbar,
.section-heading,
.lookup-grid {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    flex-wrap: wrap;
}

.section-heading,
.toolbar {
    justify-content: space-between;
}

.actions-row--end {
    justify-content: space-between;
}

.button {
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 0.9rem 1.4rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(255, 214, 79, 0.2);
    outline-offset: 2px;
}

.button--primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #18150f;
}

.button--secondary {
    background: #f4f4f2;
    color: #171a20;
}

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

.card {
    background: linear-gradient(180deg, rgba(36, 41, 49, 0.96), rgba(30, 34, 41, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.7rem;
    margin-top: 1.25rem;
}

.card--form {
    padding: 1.9rem;
}

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

.stack {
    display: grid;
    gap: 1.25rem;
}

.stack--compact {
    gap: 0.75rem;
}

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

.form-grid__wide {
    grid-column: 1 / -1;
}

label,
fieldset {
    display: grid;
    gap: 0.45rem;
}

label span,
legend {
    font-size: 0.96rem;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.95rem 1rem;
    background: #1a1f25;
    font: inherit;
    color: var(--ink);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input::placeholder,
textarea::placeholder {
    color: rgba(200, 201, 206, 0.7);
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(255, 214, 79, 0.32);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(255, 214, 79, 0.08);
}

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

fieldset,
.branch-panel {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255, 214, 79, 0.05), rgba(255, 255, 255, 0.015));
}

fieldset {
    margin: 0;
}

legend {
    padding: 0 0.35rem;
}

.checkbox-grid {
    display: grid;
    gap: 0.65rem;
}

.checkbox {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    align-items: start;
}

.checkbox input {
    width: auto;
    margin-top: 0.22rem;
    accent-color: var(--accent);
}

.status,
.slot-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    font-size: 0.92rem;
    font-weight: 700;
}

.status--neutral,
.slot-pill--neutral {
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.status--success,
.slot-pill--free {
    background: rgba(130, 215, 164, 0.12);
    color: var(--success);
}

.status--danger,
.slot-pill--busy {
    background: rgba(255, 158, 146, 0.12);
    color: var(--danger);
}

.notice {
    padding: 1rem 1.1rem;
    background: rgba(255, 214, 79, 0.08);
    border: 1px solid rgba(255, 214, 79, 0.18);
    border-radius: 16px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.015);
    border-radius: 14px;
    overflow: hidden;
}

th,
td {
    text-align: left;
    padding: 0.95rem 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: top;
}

th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

tbody tr {
    transition: background-color 0.18s ease;
}

tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

tbody tr:hover,
tbody tr.is-selected {
    background: rgba(255, 214, 79, 0.08);
}

.detail-list {
  display: grid;
  gap: 0.6rem;
  max-height: 300px;
  overflow-y: scroll;
}

.detail-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.detail-label {
    color: var(--accent);
    font-weight: 700;
}

.empty-state {
    color: var(--muted);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
}

.hidden {
    display: none;
}

.is-revealed {
    animation: riseIn 0.45s ease;
}

.is-subtle-glow {
    box-shadow: 0 0 0 4px rgba(255, 214, 79, 0.07);
}

.actions-row--sticky {
    position: sticky;
    bottom: 1rem;
    justify-content: flex-end;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(25, 29, 35, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-soft);
}

.toast-stack {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 1200;
    display: grid;
    gap: 0.75rem;
    width: min(360px, calc(100vw - 2rem));
}

.toast {
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(24, 28, 33, 0.96);
    color: var(--ink);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.toast--success {
    border-color: rgba(130, 215, 164, 0.34);
    background: rgba(25, 46, 35, 0.96);
    color: #dff7e7;
}

.toast--danger {
    border-color: rgba(255, 158, 146, 0.34);
    background: rgba(63, 29, 26, 0.96);
    color: #ffe0dc;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .dashboard-shell,
    .dashboard-grid,
    .dashboard-grid--details,
    .stats-grid,
    .grid-columns,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-shell {
        width: min(1120px, calc(100% - 2rem));
    }

    .dashboard-header {
        align-items: start;
        flex-direction: column;
    }

    .dashboard-sidebar {
        position: static;
    }

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

    .actions-row--end {
        justify-content: flex-start;
    }

    h2 {
        font-size: 1.9rem;
    }
}
