:root {
    --ink: #18231f;
    --muted: #5d6b65;
    --line: #dbe5e0;
    --paper: #ffffff;
    --wash: #f5faf7;
    --brand: #1a7a5e;
    --brand-dark: #0f5b45;
    --blue: #2563eb;
    --amber: #a16207;
    --red: #b42318;
    --green-soft: #e1f5ee;
    --amber-soft: #fff7d6;
    --red-soft: #fde8e5;
    --shadow: 0 10px 30px rgba(18, 35, 31, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--wash);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    padding-bottom: 150px;
}

a {
    color: var(--brand-dark);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-shell {
    min-height: 100vh;
}

.topbar {
    align-items: center;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 16px clamp(18px, 4vw, 48px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand-mark {
    color: var(--brand-dark);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0;
}

.nav-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.container {
    margin: 0 auto;
    max-width: 1180px;
    padding: 28px clamp(18px, 4vw, 48px) 56px;
}

.page-head {
    align-items: end;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 24px;
}

.eyebrow {
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0 0 6px;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    line-height: 1.15;
    margin: 0;
}

h1 {
    font-size: clamp(30px, 4vw, 54px);
    max-width: 780px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 17px;
}

.lead {
    color: var(--muted);
    font-size: 18px;
    max-width: 780px;
}

.button,
button,
input[type='submit'] {
    align-items: center;
    background: var(--brand);
    border: 1px solid var(--brand);
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    text-decoration: none;
}

.button:hover,
button:hover,
input[type='submit']:hover {
    background: var(--brand-dark);
    text-decoration: none;
}

.button.secondary,
button.secondary {
    background: #fff;
    border-color: var(--line);
    color: var(--brand-dark);
}

.button.danger,
button.danger {
    background: var(--red);
    border-color: var(--red);
}

.grid {
    display: grid;
    gap: 16px;
}

.grid.rooms {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid.stats {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.card,
.panel {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.card {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.room-photo {
    align-items: center;
    aspect-ratio: 16 / 9;
    background: #dfeee7;
    border: 1px solid #c7ddd3;
    border-radius: 6px;
    color: var(--brand-dark);
    display: flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    overflow: hidden;
}

.room-photo img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.room-meta {
    color: var(--muted);
    margin: 0;
}

.amenities {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.price {
    color: var(--brand-dark);
    font-size: 24px;
    font-weight: 800;
}

.status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 9px;
    text-transform: capitalize;
    width: fit-content;
}

.status-good {
    background: var(--green-soft);
    color: var(--brand-dark);
}

.status-warn {
    background: var(--amber-soft);
    color: var(--amber);
}

.status-bad {
    background: var(--red-soft);
    color: var(--red);
}

.status-neutral {
    background: #edf2f7;
    color: #46515c;
}

.panel {
    padding: 18px;
}

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

table {
    border-collapse: collapse;
    min-width: 760px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 11px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

tr:last-child td {
    border-bottom: 0;
}

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

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

label {
    color: var(--muted);
    display: grid;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid #cddbd4;
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    min-height: 40px;
    padding: 9px 10px;
    width: 100%;
}

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

.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.flash {
    border-radius: 6px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.flash.success {
    background: var(--green-soft);
    color: var(--brand-dark);
}

.flash.warning {
    background: var(--amber-soft);
    color: var(--amber);
}

.flash.error {
    background: var(--red-soft);
    color: var(--red);
}

.admin-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: #10231d;
    color: #fff;
    padding: 22px 16px;
}

.sidebar a {
    border-radius: 6px;
    color: #dcebe5;
    display: block;
    font-weight: 700;
    padding: 10px 12px;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.sidebar .brand-mark {
    color: #fff;
    display: block;
    margin-bottom: 18px;
    padding: 0 12px;
}

.admin-main {
    min-width: 0;
}

.metric {
    display: grid;
    gap: 4px;
}

.metric strong {
    font-size: 30px;
}

.muted {
    color: var(--muted);
}

.app-footer {
    align-items: center;
    background: #ffffff;
    border: 0;
    border-top: 4px solid var(--brand);
    border-radius: 0;
    bottom: 0;
    box-shadow: 0 -10px 34px rgba(18, 35, 31, 0.18);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    left: 0;
    margin: 0;
    max-width: none;
    outline: 0;
    padding: 12px clamp(18px, 4vw, 48px);
    position: fixed;
    transform: none;
    width: 100vw;
    z-index: 1000;
}

.install-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.install-link {
    align-items: center;
    background: var(--wash);
    border: 2px solid #c7ddd3;
    border-radius: 8px;
    color: var(--ink);
    display: inline-flex;
    gap: 11px;
    min-height: 54px;
    min-width: 230px;
    padding: 8px 12px;
    text-decoration: none;
}

.install-link:hover {
    border-color: var(--brand);
    text-decoration: none;
}

.install-link img {
    flex: 0 0 auto;
}

.install-link span {
    display: grid;
    gap: 1px;
}

.install-link small {
    color: var(--muted);
    font-size: 12px;
}

.footer-credit {
    border-left: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    margin: 0;
    max-width: 360px;
    padding-left: 18px;
}

@media (max-width: 820px) {
    .admin-layout,
    .page-head,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

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

@media (max-width: 640px) {
    body {
        font-size: 16px;
        padding-bottom: 270px;
    }

    .container {
        padding: 18px 14px 34px;
    }

    .topbar {
        gap: 14px;
        padding: 14px;
    }

    .nav-links {
        align-items: stretch;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .nav-links a,
    .nav-links .button {
        min-width: 0;
        width: 100%;
    }

    h1 {
        font-size: 34px;
    }

    .lead {
        font-size: 16px;
    }

    .panel,
    .card {
        border-radius: 6px;
        padding: 14px;
    }

    .sidebar {
        display: grid;
        gap: 4px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 12px;
    }

    .sidebar .brand-mark {
        grid-column: 1 / -1;
        margin-bottom: 4px;
    }

    .sidebar a {
        min-height: 42px;
    }

    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .actions .button,
    .actions button,
    .actions input[type='submit'] {
        width: 100%;
    }

    table {
        min-width: 680px;
    }

    .install-row,
    .install-link {
        width: 100%;
    }

    .app-footer {
        align-items: stretch;
        bottom: 0;
        flex-direction: column;
        gap: 12px;
        left: 0;
        padding: 12px;
        transform: none;
        width: 100vw;
    }

    .footer-credit {
        border-left: 0;
        border-top: 1px solid var(--line);
        max-width: none;
        padding-left: 0;
        padding-top: 10px;
    }
}
