:root {
    --bg: #07111f;
    --bg-deep: #040b14;
    --panel: rgba(255, 255, 255, .06);
    --panel-solid: #ffffff;
    --border: rgba(255, 255, 255, .12);
    --border-soft: #e8ecef;
    --ink: #f4f7f5;
    --ink-dark: #1a2b33;
    --muted: #8fa0ab;
    --muted-dark: #6b7c86;
    --green: #4caf50;
    --green-bright: #66bb6a;
    --green-deep: #2e7d32;
    --green-soft: #e8f5e9;
    --green-glow: rgba(76, 175, 80, .35);
    --ok: #34d399;
    --danger: #f87171;
    --warn: #f59e0b;
    --warn-deep: #d97706;
    --warn-glow: rgba(245, 158, 11, .45);
    --radius-card: 22px;
    --shadow-card: 0 24px 60px rgba(0, 0, 0, .35);
    --font: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.wrap {
    max-width: 720px; margin: 0 auto;
    padding: 1.25rem;
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
}
.wrap.wrap-wide { max-width: 960px; }

/* ——— Auth shell (login / code) ——— */
body.page-auth {
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 70% 55% at 12% 35%, rgba(76, 175, 80, .28), transparent 55%),
        radial-gradient(ellipse 55% 45% at 0% 85%, rgba(46, 125, 50, .35), transparent 50%),
        radial-gradient(ellipse 40% 40% at 35% 10%, rgba(102, 187, 106, .18), transparent 45%),
        linear-gradient(160deg, #06101c 0%, #0a1a2a 45%, #07111f 100%);
    overflow-x: hidden;
}
body.page-auth::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 900' preserveAspectRatio='none'%3E%3Cpath d='M-40 180C80 120 160 260 280 220C420 170 460 40 580 90C700 140 760 40 840 80L840 920L-40 920Z' fill='%234caf50' opacity='.16'/%3E%3Cpath d='M-40 320C100 260 180 420 320 360C470 290 520 160 650 220C760 270 800 180 860 230L860 920L-40 920Z' fill='%2366bb6a' opacity='.22'/%3E%3Cpath d='M-40 480C120 420 200 580 340 520C490 450 560 340 680 400C780 450 820 360 880 410L880 920L-40 920Z' fill='%232e7d32' opacity='.28'/%3E%3C/svg%3E")
        left center / min(62vw, 720px) 100% no-repeat;
    opacity: .95;
}
.auth-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem);
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    min-height: 100vh;
}
.auth-hero {
    color: #e8f5e9;
    padding: 1rem 0.5rem 1rem 0;
}
.auth-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(232, 245, 233, .75);
    margin-bottom: 1rem;
}
.auth-hero__eyebrow::before {
    content: '';
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
    background: var(--green-bright);
    box-shadow: 0 0 0 6px rgba(76, 175, 80, .2);
}
.auth-hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4.2vw, 3rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -.02em;
}
.auth-hero h1 span {
    color: var(--green-bright);
}
.auth-hero p {
    margin: 0;
    max-width: 34ch;
    color: rgba(232, 245, 233, .72);
    font-size: 1.05rem;
    line-height: 1.55;
}
.auth-card {
    background: var(--panel-solid);
    color: var(--ink-dark);
    border-radius: var(--radius-card);
    padding: clamp(1.75rem, 3.5vw, 2.5rem);
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 440px;
    margin-left: auto;
}
.auth-card__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.75rem;
}
.auth-card__logo img {
    height: 56px;
    width: auto;
    max-width: min(240px, 100%);
    object-fit: contain;
    display: block;
}
.auth-card h2 {
    margin: 0 0 .35rem;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--ink-dark);
    text-align: center;
}
.auth-card .lead {
    margin: 0 0 1.5rem;
    text-align: center;
    color: var(--muted-dark);
    font-size: .95rem;
    line-height: 1.45;
}
.auth-card label {
    color: var(--muted-dark);
    font-weight: 500;
}
.auth-card input {
    background: #f3f6f8;
    border: 1px solid #e1e7eb;
    color: var(--ink-dark);
    border-radius: 12px;
    padding: .95rem 1rem;
}
.auth-card input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, .18);
    background: #fff;
}
.auth-card input::placeholder { color: #9aabB4; }
.auth-card .btn-primary {
    background: linear-gradient(180deg, var(--green-bright), var(--green));
    color: #fff;
    border: 0;
    box-shadow: 0 10px 24px rgba(76, 175, 80, .35);
}
.auth-card .btn-primary:hover { filter: brightness(1.05); }
.auth-card .muted { color: var(--muted-dark); }
.auth-card .flash {
    background: var(--green-soft);
    color: var(--green-deep);
    border-color: rgba(76, 175, 80, .25);
}
.auth-card .flash-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: rgba(248, 113, 113, .35);
}
.auth-footer-link {
    display: block;
    text-align: center;
    margin-top: 1.15rem;
    color: var(--muted-dark);
    font-size: .9rem;
}
.auth-footer-link a {
    color: var(--green-deep);
    font-weight: 600;
}
.auth-demo {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-soft);
    font-size: .8rem;
    color: var(--muted-dark);
    text-align: center;
    line-height: 1.45;
}
.auth-demo code {
    font-size: .78rem;
    background: #f3f6f8;
    padding: .1rem .35rem;
    border-radius: 6px;
    word-break: break-all;
}
@media (max-width: 860px) {
    .auth-shell {
        grid-template-columns: 1fr;
        align-content: start;
        gap: 1.25rem;
        padding: 1.25rem;
        padding-left: max(1.25rem, env(safe-area-inset-left));
        padding-right: max(1.25rem, env(safe-area-inset-right));
        min-height: auto;
    }
    .auth-hero { text-align: center; padding: 0; }
    .auth-hero p { margin: 0 auto; }
    .auth-card { margin: 0 auto; max-width: 100%; }
    body.page-auth {
        align-items: flex-start;
        overflow-y: auto;
    }
    body.page-auth::before {
        background-size: 140% 70%;
        background-position: center bottom;
        opacity: .55;
    }
}
@media (max-width: 480px) {
    .auth-shell { padding: 1rem; gap: .85rem; }
    .auth-hero h1 { font-size: clamp(1.55rem, 7vw, 2rem); margin-bottom: .55rem; }
    .auth-hero p { font-size: .92rem; max-width: 36ch; }
    .auth-card { padding: 1.25rem 1.1rem; border-radius: 18px; }
    .auth-card__logo { margin-bottom: 1.1rem; }
    .auth-card__logo img { height: 44px; }
    .auth-card h2 { font-size: 1.25rem; }
    .auth-card .lead { font-size: .88rem; margin-bottom: 1.1rem; }
}
@media (max-height: 720px) and (max-width: 860px) {
    .auth-hero__eyebrow { margin-bottom: .5rem; }
    .auth-hero h1 { margin-bottom: .4rem; }
    .auth-hero p { display: none; }
}

/* ——— App chrome ——— */
.nav-shell { margin-bottom: 1.5rem; display: grid; gap: .55rem; }
.nav {
    display: flex; justify-content: space-between; align-items: center;
    gap: .75rem; min-height: 2.5rem;
}
.nav-group {
    display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
    padding: .45rem .55rem; border: 1px solid var(--border); border-radius: 14px;
    background: rgba(255,255,255,.03);
}
.nav-group__label {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); padding: 0 .35rem; white-space: nowrap;
}
.nav-group-scroll {
    display: flex; align-items: center; gap: .45rem; flex-wrap: wrap;
    min-width: 0;
}
.nav-group .nav-link,
.nav-group-scroll .nav-link {
    display: inline-flex; align-items: center; justify-content: center;
    height: 2.25rem; padding: 0 .85rem; border-radius: 999px;
    border: 1px solid transparent; color: var(--muted); white-space: nowrap;
    line-height: 1; font-size: .85rem;
}
.nav-group .nav-link:hover,
.nav-group-scroll .nav-link:hover { color: var(--ink); background: rgba(255,255,255,.06); }
.nav-group .nav-link.is-active,
.nav-group-scroll .nav-link.is-active {
    color: var(--ink); border-color: rgba(76, 175, 80, .35);
    background: rgba(76, 175, 80, .14);
}
.brand {
    font-weight: 700; letter-spacing: .2px;
    display: inline-flex; align-items: center; gap: .55rem;
    height: 2.25rem; line-height: 1; flex-shrink: 0;
    background: #fff;
    border-radius: 10px;
    padding: .3rem .55rem;
    max-width: min(180px, 48vw);
}
.brand img {
    height: 24px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}
.nav-links {
    display: flex; align-items: center; gap: .5rem;
    flex-wrap: nowrap; color: var(--muted); font-size: .85rem;
    margin-left: auto;
}
.nav-links a.nav-link {
    display: inline-flex; align-items: center; justify-content: center;
    height: 2.25rem; padding: 0 .9rem; border-radius: 999px;
    border: 1px solid transparent; color: var(--muted); white-space: nowrap;
    line-height: 1;
}
.nav-links a.nav-link:hover { color: var(--ink); background: rgba(255,255,255,.06); }
.nav-links a.nav-link.is-active {
    color: var(--ink); border-color: rgba(76, 175, 80, .35);
    background: rgba(76, 175, 80, .14);
}
.nav-links form { display: inline-flex; align-items: center; margin: 0; }
.nav-links .btn-logout {
    height: 2.25rem; padding: 0 .9rem; font-size: .85rem; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center;
}
@media (max-width: 720px) {
    .nav { flex-wrap: wrap; }
    .nav-links {
        width: 100%; justify-content: flex-start; flex-wrap: wrap; margin-left: 0;
    }
    .nav-group {
        display: grid;
        grid-template-columns: 1fr;
        gap: .35rem;
        padding: .55rem .65rem;
    }
    .nav-group__label {
        display: block;
        padding: 0;
    }
    .nav-group-scroll {
        display: flex;
        flex-wrap: nowrap;
        gap: .35rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: .15rem;
    }
    .nav-group .nav-link,
    .nav-group-scroll .nav-link {
        flex: 0 0 auto;
        padding: 0 .75rem;
        font-size: .8rem;
    }
    .btn-logout { padding: 0 .75rem; }
}
@media (max-width: 400px) {
    .wrap { padding: .9rem; }
    .brand { max-width: 42vw; padding: .25rem .4rem; }
    .brand img { height: 20px; }
    .nav-links a.nav-link { padding: 0 .7rem; font-size: .8rem; }
}

.card {
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 16px; padding: 1.25rem; backdrop-filter: blur(12px);
}
.muted { color: var(--muted); }
.stack { display: grid; gap: 1rem; }
.btn {
    appearance: none; border: 0; cursor: pointer;
    border-radius: 999px; padding: .85rem 1.25rem; font-weight: 600;
    background: linear-gradient(180deg, var(--green-bright), var(--green));
    color: white;
    font-family: inherit;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-secondary {
    background: rgba(255,255,255,.08);
    border: 1px solid var(--border);
    color: var(--ink);
}
.btn-danger { background: rgba(248,113,113,.2); color: #fecaca; border: 1px solid rgba(248,113,113,.35); }
.btn-warning {
    background: linear-gradient(180deg, #fbbf24, var(--warn-deep));
    color: #1a1205;
    border: 1px solid rgba(251, 191, 36, .55);
}
.btn-block { width: 100%; display: inline-block; text-align: center; }

.push-wrap {
    --push-size: clamp(168px, 48vw, 220px);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 100%; margin: .75rem 0 .25rem; padding: .5rem 0;
    text-align: center;
    min-height: calc(var(--push-size) + 36px);
}
.push-wrap form,
#clock-form {
    display: flex; justify-content: center; align-items: center;
    width: 100%; margin: 0;
}
.btn-push {
    --push-size: clamp(168px, 48vw, 220px);
    appearance: none; cursor: pointer; position: relative;
    width: var(--push-size); height: var(--push-size); border-radius: 50%;
    border: 0; padding: 0; color: #1a1205;
    display: inline-flex; align-items: center; justify-content: center;
    margin: 0 auto;
    flex-direction: column;
    box-shadow:
        0 0 0 10px rgba(255,255,255,.04),
        0 0 0 18px rgba(0,0,0,.35),
        0 14px 24px rgba(0,0,0,.45),
        inset 0 2px 0 rgba(255,255,255,.35),
        inset 0 -10px 18px rgba(0,0,0,.28);
    transition: filter .12s ease, box-shadow .12s ease;
    -webkit-tap-highlight-color: transparent; user-select: none;
    touch-action: manipulation;
}
.btn-push::before {
    content: ''; position: absolute; inset: 14%; border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.55), transparent 42%);
    pointer-events: none;
}
.btn-push:hover { filter: brightness(1.05); }
.btn-push:active, .btn-push.is-pressed {
    filter: brightness(.96);
    box-shadow:
        0 0 0 10px rgba(255,255,255,.04),
        0 0 0 18px rgba(0,0,0,.35),
        0 8px 14px rgba(0,0,0,.4),
        inset 0 2px 0 rgba(255,255,255,.2),
        inset 0 -6px 14px rgba(0,0,0,.35);
}
.btn-push:disabled { opacity: .65; cursor: wait; filter: grayscale(.15); }
.btn-push .push-label {
    position: relative; z-index: 1; line-height: .9;
    display: flex; align-items: center; justify-content: center;
    width: 100%; text-align: center;
    font-size: clamp(2.6rem, 12vw, 4.25rem);
    font-weight: 900; letter-spacing: -.02em;
    text-transform: uppercase;
}
.btn-push-warning {
    background:
        radial-gradient(circle at 32% 28%, #fde68a 0%, transparent 40%),
        linear-gradient(160deg, #fbbf24 0%, var(--warn) 45%, var(--warn-deep) 100%);
    color: #1a1205;
}
.btn-push-danger {
    background:
        radial-gradient(circle at 32% 28%, #fecaca 0%, transparent 40%),
        linear-gradient(160deg, #f87171 0%, #ef4444 45%, #b91c1c 100%);
    color: #fff;
    box-shadow:
        0 0 0 10px rgba(255,255,255,.04),
        0 0 0 18px rgba(0,0,0,.35),
        0 14px 24px rgba(0,0,0,.45),
        0 0 28px rgba(239, 68, 68, .22),
        inset 0 2px 0 rgba(255,255,255,.35),
        inset 0 -10px 18px rgba(0,0,0,.28);
}
.btn-icon-edit,
.btn-icon-delete {
    appearance: none; border: 0; background: transparent; cursor: pointer;
    color: var(--muted); width: 1.75rem; height: 1.75rem; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; line-height: 1; padding: 0;
    text-decoration: none; vertical-align: middle;
}
.btn-icon-edit:hover { color: var(--ink); background: rgba(255,255,255,.08); }
.btn-icon-delete:hover { color: #fecaca; background: rgba(248,113,113,.12); }
.month-row {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
    flex-wrap: nowrap;
}
.month-row:last-child { border-bottom: 0; }
.month-row__main { flex: 1 1 auto; min-width: 0; }
.month-row__title { font-weight: 600; margin-bottom: .2rem; }
.month-row__meta { font-size: .9rem; }
.month-row__actions {
    display: flex; align-items: center; gap: .5rem;
    flex: 0 0 auto; margin-left: auto;
}
.month-row__pdf {
    padding: .55rem 1rem; font-size: .9rem; flex-shrink: 0;
    white-space: nowrap;
}
.month-row__pdf:hover { border-color: rgba(76,175,80,.55); color: #a7f3d0; }
@media (max-width: 520px) {
    .month-row { flex-wrap: wrap; gap: .75rem; padding: .9rem 1rem; }
    .month-row__actions {
        width: 100%; margin-left: 0;
        display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
    }
    .month-row__pdf { width: 100%; text-align: center; }
}
select,
input,
textarea {
    width: 100%; padding: .85rem 1rem; border-radius: 12px;
    border: 1px solid var(--border); background: rgba(255,255,255,.04); color: var(--ink);
    font-family: inherit; font-size: 16px; /* évite le zoom iOS */
}
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.field { margin-bottom: .9rem; }
.flash {
    padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1rem;
    border: 1px solid var(--border); background: rgba(52,211,153,.1); color: #a7f3d0;
    overflow-wrap: anywhere;
}
.flash-error { background: rgba(248,113,113,.12); color: #fecaca; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.clock {
    font-size: clamp(2.1rem, 8vw, 3.5rem); font-weight: 700;
    background: linear-gradient(135deg, var(--green-bright), #a5d6a7, #4caf50);
    -webkit-background-clip: text; background-clip: text; color: transparent; text-align: center;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.switch-row {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.switch-row__title { font-weight: 600; }
.switch {
    display: inline-flex; align-items: center; gap: .65rem; cursor: pointer; user-select: none;
}
.switch input {
    position: absolute; opacity: 0; width: 0; height: 0;
}
.switch__track {
    width: 48px; height: 28px; border-radius: 999px; background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18); position: relative; transition: background .15s ease;
    flex-shrink: 0;
}
.switch__track::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
    border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35);
    transition: transform .15s ease;
}
.switch input:checked + .switch__track {
    background: rgba(76, 175, 80, .55); border-color: rgba(76, 175, 80, .8);
}
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch__label { min-width: 2.2rem; font-weight: 600; font-size: .9rem; }
.stat {
    background: rgba(255,255,255,.03); border: 1px solid var(--border);
    border-radius: 12px; padding: .85rem;
}
.stat .label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat .value { font-size: 1.15rem; margin-top: .25rem; word-break: break-word; }
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}
/* Cartes contenant un tableau : scroll horizontal sur mobile */
.card:has(> table),
.card:has(> .table-scroll) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .7rem .4rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 500; }
.pill {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .75rem; padding: .25rem .55rem; border-radius: 999px;
    background: rgba(76,175,80,.15); color: #a5d6a7;
}
.pill-ok { background: rgba(52,211,153,.15); color: #6ee7b7; }
.pill-warn { background: rgba(251,191,36,.15); color: #fcd34d; }
.actions {
    display: grid; gap: .65rem; margin-top: 1rem;
    justify-items: center; text-align: center;
}
.actions .btn-block { max-width: 280px; }
.stats-row { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) {
    .grid-2 { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr; }
    .card { padding: 1rem; }
    .table-scroll table,
    .card:has(> table) > table { min-width: 560px; }
    .push-wrap { --push-size: clamp(148px, 56vw, 200px); }
    .btn-push { --push-size: clamp(148px, 56vw, 200px); }
}
@media (min-width: 480px) and (max-width: 640px) {
    .stats-row { grid-template-columns: repeat(3, 1fr); }
}

/* ——— Planning hebdo ——— */
.planning-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.planning-week-nav {
    display: flex;
    align-items: center;
    gap: .65rem;
}
.planning-nav-btn {
    min-width: 2.4rem;
    padding: .4rem .65rem;
    font-size: 1.1rem;
    line-height: 1;
}
.planning-week-label {
    font-size: .95rem;
    font-weight: 600;
}
.planning-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    font-size: .78rem;
    color: var(--muted);
}
.planning-legend span {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.planning-swatch {
    display: inline-block;
    width: .55rem;
    height: .55rem;
    border-radius: 3px;
}
.planning-swatch--planned { background: #818cf8; }
.planning-swatch--done { background: var(--ok); }
.planning-swatch--open { background: var(--green-bright); }
.planning-swatch--late { background: var(--warn); }
.planning-swatch--absent { background: var(--danger); }
.planning-swatch--vacation { background: #60a5fa; }
.planning-swatch--sick { background: #fb923c; }
.planning-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: 14px;
}
.planning-grid {
    min-width: 720px;
}
.planning-grid__head,
.planning-grid__row {
    display: grid;
    grid-template-columns: 140px repeat(7, minmax(0, 1fr));
}
.planning-grid__head {
    background: rgba(255, 255, 255, .04);
    border-bottom: 1px solid var(--border);
}
.planning-grid__corner,
.planning-grid__day {
    padding: .65rem .5rem;
    font-size: .72rem;
    color: var(--muted);
    text-transform: capitalize;
    text-align: center;
}
.planning-grid__corner { text-align: left; }
.planning-grid__day { border-left: 1px solid var(--border); }
.planning-grid__row { border-bottom: 1px solid var(--border); }
.planning-grid__row:last-child { border-bottom: none; }
.planning-grid__name {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem .5rem;
    font-size: .85rem;
}
.planning-avatar {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 600;
    flex-shrink: 0;
}
.planning-grid__cell {
    padding: .4rem;
    border-left: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
}
.planning-pill {
    display: block;
    width: 100%;
    text-align: center;
    font-size: .7rem;
    font-weight: 600;
    padding: .35rem .3rem;
    border-radius: 8px;
    line-height: 1.2;
}
.planning-pill-wrap {
    position: relative;
    width: 100%;
}
.planning-pill--planned {
    background: rgba(129, 140, 248, .22);
    color: #a5b4fc;
}
.planning-pill--done {
    background: rgba(52, 211, 153, .18);
    color: #6ee7b7;
}
.planning-pill--open {
    background: rgba(76, 175, 80, .22);
    color: #a5d6a7;
}
.planning-pill--late {
    background: rgba(245, 158, 11, .2);
    color: #fcd34d;
}
.planning-pill--absent {
    background: rgba(248, 113, 113, .18);
    color: #fca5a5;
}
.planning-pill--vacation {
    background: rgba(96, 165, 250, .18);
    color: #93c5fd;
}
.planning-pill--sick {
    background: rgba(251, 146, 60, .2);
    color: #fdba74;
}
.planning-delete-form {
    position: absolute;
    top: -0.35rem;
    right: -0.25rem;
    margin: 0;
}
.planning-delete-btn {
    width: 1.15rem;
    height: 1.15rem;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: .75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.planning-delete-btn:hover { background: rgba(248, 113, 113, .85); }
.planning-grid__empty {
    padding: 1.25rem .75rem;
    font-size: .9rem;
}
.planning-hint {
    margin: .9rem 0 0;
    font-size: .82rem;
}
.planning-cell-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2rem;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
}
.planning-cell-link:hover {
    background: rgba(255, 255, 255, .06);
}
.planning-cell-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, .2);
    color: var(--muted);
    font-size: 1rem;
    line-height: 1;
}
.planning-segments {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    width: 100%;
}
.planning-segment-row {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--border);
}
.planning-segment-row:last-child { border-bottom: 0; }
.planning-segment-row .planning-pill { width: auto; min-width: 5.5rem; }
