:root {
    --navy: #1f3864;
    --light-blue: #dce6f1;
    --green: #d9ead3;
    --border: #d0d5dd;
    --text: #222;
    --muted: #666;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background: #f7f8fa;
    color: var(--text);
}

.topbar {
    background: var(--navy);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    flex-wrap: wrap;
    gap: 8px;
}
.topbar-title { font-weight: 700; font-size: 18px; }
.topbar-nav { display: flex; gap: 16px; align-items: center; font-size: 14px; }
.topbar-nav a { color: #fff; text-decoration: none; opacity: 0.9; }
.topbar-nav a:hover { text-decoration: underline; }
.topbar-nav .muted { color: #cbd6e8; }

.container { max-width: 1400px; margin: 24px auto; padding: 0 16px; }
.container.narrow { max-width: 600px; }

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

.month-nav { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.month-nav h2 { margin: 0; color: var(--navy); }

.btn, button {
    background: var(--navy);
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}
.btn:hover, button:hover { opacity: 0.9; }
.btn-danger { background: #b3261e; }

.rota-scroll { overflow-x: auto; background: #fff; border-radius: 8px; border: 1px solid var(--border); }

.rota-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.rota-table th, .rota-table td {
    border: 1px solid var(--border);
    padding: 6px 8px;
    text-align: left;
    white-space: nowrap;
}
.rota-table th {
    background: var(--navy);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}
.rota-table .sticky-col {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
    font-weight: 600;
}
.rota-table th.sticky-col { z-index: 3; background: var(--navy); }
.rota-table tr.weekend td.sticky-col,
.rota-table tr.weekend { background: #fafafa; }
.rota-table td.mine,
.rota-table tr.mine td {
    font-weight: 700;
    box-shadow: inset 0 0 0 2px var(--navy);
}
.rota-table .empty { color: #bbb; }

.rota-table td.vacancy-green { background: var(--green); }
.rota-table td.vacancy-amber { background: #ffe8b3; }
.rota-table td.vacancy-red { background: #fbdada; }

.slot-cell { min-width: 160px; }
.slot-select {
    width: 100%;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
    cursor: grab;
    background: transparent;
}
.slot-select.drag-over { outline: 2px solid var(--navy); }

.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-card {
    background: #fff;
    padding: 32px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 380px;
}
.auth-card h1 { color: var(--navy); font-size: 20px; margin-top: 0; }

.card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
}

label { font-size: 13px; font-weight: 600; color: var(--muted); }
input[type=text], input[type=email], select {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}
.checkbox-row { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--text); }
fieldset { border: 1px solid var(--border); border-radius: 6px; padding: 10px; }
legend { font-size: 13px; color: var(--muted); padding: 0 6px; }

.alert { padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 12px; }
.alert-success { background: var(--green); color: #2e5b1c; }
.alert-error { background: #fbdada; color: #7a1c1c; }

.simple-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
.simple-table th, .simple-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
.simple-table th { background: var(--light-blue); color: var(--navy); }

#save-status { font-weight: 600; color: var(--navy); }
