/* Mobile-first UI without build steps (no Tailwind required). */

:root {
    --bg0: #f7f1e7;
    --bg1: #e7f1ee;
    --panel: rgba(255, 255, 255, 0.88);
    --panel2: rgba(255, 255, 255, 0.72);
    --text: #0b1b1a;
    --muted: #4a6461;
    --border: rgba(11, 27, 26, 0.14);
    --shadow: 0 18px 40px rgba(11, 27, 26, 0.10);
    --accent: #0f766e;
    --accent2: #e76f51;
    --danger: #b91c1c;
    --warn: #b45309;
    --ok: #166534;

    --radius: 16px;
    --tap: 46px;
    --max: 1100px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    color: var(--text);
    font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Atmosphere */
.bg {
    position: fixed;
    inset: 0;
    background: radial-gradient(1200px 800px at 15% 10%, var(--bg1), transparent 55%),
                radial-gradient(900px 700px at 90% 0%, rgba(231, 111, 81, 0.20), transparent 60%),
                linear-gradient(180deg, var(--bg0), #ffffff 60%);
    z-index: -2;
}
.bg__glow {
    position: absolute;
    filter: blur(40px);
    opacity: 0.55;
}
.bg__glow--a { width: 520px; height: 520px; left: -140px; top: 120px; background: rgba(15, 118, 110, 0.25); border-radius: 50%; }
.bg__glow--b { width: 520px; height: 520px; right: -200px; top: 260px; background: rgba(231, 111, 81, 0.22); border-radius: 50%; }
.bg__grain {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
    pointer-events: none;
}

.shell {
    max-width: var(--max);
    margin: 0 auto;
    padding: 14px 14px 88px;
    animation: fadeIn 420ms ease-out both;
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 10px;
    background: rgba(247, 241, 231, 0.65);
    border: 1px solid rgba(11, 27, 26, 0.06);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 28px rgba(11, 27, 26, 0.06);
}
.topbar__right { display: flex; align-items: center; gap: 10px; }
.topbar__user { color: var(--muted); font-size: 14px; max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand__mark {
    width: 14px; height: 14px; border-radius: 6px;
    background: conic-gradient(from 180deg, var(--accent), var(--accent2));
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}
.brand__text { font-family: "Palatino Linotype", Palatino, "Book Antiqua", serif; font-weight: 700; letter-spacing: 0.2px; }

.main { padding: 14px 2px 0; }

.pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 10px 0 12px; }
.pagehead__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.h1 {
    font-family: "Palatino Linotype", Palatino, "Book Antiqua", serif;
    margin: 0;
    font-size: 28px;
    letter-spacing: 0.1px;
}
.h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: 0.1px;
}
.kicker { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(74, 100, 97, 0.9); }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 0.95em; }
.big { font-size: 18px; font-weight: 800; }
.link { color: inherit; text-decoration: none; }
.link:hover { text-decoration: underline; }

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
}
.card--item { transition: transform 120ms ease, box-shadow 120ms ease; }
.card--item:hover { transform: translateY(-1px); box-shadow: 0 22px 50px rgba(11, 27, 26, 0.12); }
.card--auth { max-width: 520px; width: 100%; }
.card--danger { background: rgba(255, 255, 255, 0.78); border-color: rgba(185, 28, 28, 0.18); }

.center { display: grid; place-items: center; min-height: calc(100vh - 150px); padding: 10px 0; }
.stack { display: grid; gap: 12px; margin-top: 12px; }

.sep { border: 0; border-top: 1px solid rgba(11, 27, 26, 0.10); margin: 18px 0; }
.hint { margin-top: 14px; font-size: 13px; color: var(--muted); }
.note { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--panel2); border: 1px dashed rgba(11, 27, 26, 0.16); }

.field { display: grid; gap: 6px; }
.field__label { font-weight: 700; font-size: 13px; letter-spacing: 0.02em; }
.field__input {
    width: 100%;
    min-height: var(--tap);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(11, 27, 26, 0.20);
    background: rgba(255, 255, 255, 0.85);
    color: var(--text);
    outline: none;
}
.field__input:focus {
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}
textarea.field__input { min-height: 120px; resize: vertical; }

.check { display: flex; align-items: center; gap: 10px; user-select: none; }
.check__box { width: 18px; height: 18px; }
.check__label { font-weight: 650; color: var(--muted); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap);
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 0.02em;
    transition: transform 120ms ease, filter 120ms ease, background 120ms ease, border-color 120ms ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { filter: brightness(1.02); }
.btn--ghost {
    background: rgba(255, 255, 255, 0.45);
    color: var(--text);
    border-color: rgba(11, 27, 26, 0.14);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.65); }
.btn--danger { background: var(--danger); color: #fff; }

.notice {
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    font-weight: 700;
}
.notice--ok { background: rgba(220, 252, 231, 0.8); border-color: rgba(22, 101, 52, 0.22); color: #14532d; }
.notice--err { background: rgba(254, 226, 226, 0.86); border-color: rgba(185, 28, 28, 0.24); color: #7f1d1d; }

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 900;
    border: 1px solid rgba(11, 27, 26, 0.12);
    background: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}
.badge--ok { background: rgba(220, 252, 231, 0.72); border-color: rgba(22, 101, 52, 0.18); color: #14532d; }
.badge--warn { background: rgba(255, 237, 213, 0.76); border-color: rgba(180, 83, 9, 0.18); color: #7c2d12; }

.grid { display: grid; gap: 12px; }
.grid--two { grid-template-columns: 1fr; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row--space { justify-content: space-between; align-items: flex-start; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.filters { display: grid; gap: 10px; }
.filters__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.availability { text-align: right; }
.availability__sub { font-size: 13px; margin-top: 6px; }

.tablewrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 10px; border-bottom: 1px solid rgba(11, 27, 26, 0.10); vertical-align: top; }
.table th { text-align: left; font-size: 12px; letter-spacing: 0.10em; text-transform: uppercase; color: rgba(74, 100, 97, 0.9); }
.tr { text-align: right; }

/* Bottom navigation */
.bottomnav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 10px;
    width: min(var(--max), calc(100vw - 28px));
    display: flex;
    gap: 8px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(11, 27, 26, 0.10);
    box-shadow: 0 18px 55px rgba(11, 27, 26, 0.12);
}
.bottomnav__item {
    display: grid;
    place-items: center;
    flex: 1 1 0;
    min-height: 44px;
    border-radius: 14px;
    text-decoration: none;
    color: rgba(11, 27, 26, 0.72);
    font-weight: 900;
}
.bottomnav__item.is-active {
    background: rgba(15, 118, 110, 0.14);
    color: rgba(11, 27, 26, 0.92);
}
.bottomnav__label { font-size: 13px; letter-spacing: 0.01em; }

@media (min-width: 860px) {
    .shell { padding-bottom: 20px; }
    .bottomnav { display: none; }
    .grid--two { grid-template-columns: 1fr 1fr; }
    .filters { grid-template-columns: repeat(6, 1fr); align-items: end; }
    .filters__actions { grid-column: span 6; justify-content: flex-end; }
    .availability { min-width: 220px; }
}
