:root {
    --bg: #f5f7f6;
    --surface: #ffffff;
    --ink: #17201b;
    --muted: #66736d;
    --line: #dce4df;
    --accent: #236b8e;
    --red: #c83b3b;
    --yellow: #d4a21e;
    --green: #25865a;
    --shadow: 0 18px 50px rgba(24, 36, 30, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

a {
    color: inherit;
}

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

.brand {
    font-weight: 800;
    text-decoration: none;
}

.nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    min-height: 44px;
}

.clock {
    color: var(--ink);
    font-weight: 800;
    white-space: nowrap;
}

.nav a,
.link-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    line-height: 1.2;
    min-height: auto;
    padding: 0;
    text-decoration: none;
}

.nav a:hover,
.link-button:hover {
    color: var(--ink);
}

.inline-form {
    align-items: center;
    display: flex;
    margin: 0;
}

.page {
    margin: 0 auto;
    max-width: 1120px;
    padding: 42px clamp(18px, 4vw, 48px);
}

.login-body {
    min-height: 100vh;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
}

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

.login-panel {
    max-width: 460px;
    padding: 32px;
    width: 100%;
}

.copy h1,
.section-heading h1,
.hero h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    margin: 0 0 12px;
}

.copy p,
.section-heading p,
.hero p {
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 18px;
}

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

label {
    color: var(--muted);
    display: grid;
    font-size: 0.92rem;
    gap: 7px;
}

input,
select {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    font: inherit;
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
}

input:focus,
select:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(35, 107, 142, 0.16);
}

button,
.primary-button,
.secondary-button,
.danger-button {
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    min-height: 44px;
    padding: 11px 16px;
    text-decoration: none;
}

.primary-button {
    background: var(--accent);
    color: #fff;
}

.secondary-button {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
}

.danger-button {
    background: #8d2424;
    color: #fff;
}

.hero {
    align-items: stretch;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    margin-bottom: 28px;
}

.eyebrow {
    color: var(--accent) !important;
    font-weight: 800;
    margin-bottom: 8px !important;
}

.current-status {
    border-radius: 8px;
    color: #fff;
    display: grid;
    gap: 12px;
    padding: 24px;
}

.current-status span {
    opacity: 0.85;
}

.current-status strong {
    font-size: 1.4rem;
}

.status-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.status-button {
    align-items: flex-start;
    border: 3px solid transparent;
    border-radius: 8px;
    color: #fff;
    display: grid;
    gap: 14px;
    min-height: 170px;
    padding: 22px;
    text-align: left;
    width: 100%;
}

.status-button span {
    font-size: 0.92rem;
    opacity: 0.88;
}

.status-button strong {
    font-size: clamp(1.3rem, 2.4vw, 2rem);
    line-height: 1.1;
}

.status-button.is-active {
    border-color: #17201b;
}

.status-away {
    background: var(--red);
}

.status-busy {
    background: var(--yellow);
}

.status-available {
    background: var(--green);
}

.admin-status {
    background: var(--accent);
}

.status-schedule {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.status-schedule .status-button {
    border-radius: 0;
}

.schedule-fields {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.toggle-row {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.toggle-row input {
    min-height: auto;
    width: auto;
}

.lunch-fields {
    display: grid;
    gap: 12px;
}

.lunch-fields[hidden] {
    display: none;
}

.admin-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.section-heading {
    margin-bottom: 24px;
    max-width: 760px;
}

.stats-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 28px;
}

.stat-card {
    border-radius: 8px;
    color: #fff;
    display: grid;
    gap: 16px;
    min-height: 130px;
    padding: 20px;
}

.stat-card.total {
    background: #28352f;
}

.stat-card span {
    opacity: 0.86;
}

.stat-card strong {
    font-size: 3rem;
    line-height: 1;
}

.table-wrap,
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 0.9rem;
}

.two-column {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.panel {
    box-shadow: var(--shadow);
    padding: 22px;
}

.panel h2 {
    font-size: 1.2rem;
    margin: 0 0 18px;
}

.user-list {
    display: grid;
    gap: 14px;
}

.user-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.notice {
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.notice.success {
    background: #dff3e9;
    color: #155236;
}

.notice.error {
    background: #f9dddd;
    color: #7b1d1d;
}

@media (max-width: 820px) {
    .hero,
    .status-grid,
    .stats-grid,
    .two-column {
        grid-template-columns: 1fr;
    }

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