:root {
    color-scheme: light;
    --ink: #102b25;
    --muted: #4e635d;
    --green: #075642;
    --line: #d8e4df;
    --surface: #fff;
    --background: #edf4f0;
    font-family: 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at top right, #d9ece1, transparent 58%), var(--background); min-height: 100vh; color: var(--ink); }
a { color: var(--green); text-underline-offset: .2em; }
.wrap { width: min(100% - 2.5rem, 1380px); margin-inline: auto; }
.top { background: #10362c; color: white; }
.top-inner, .top nav, .page-heading, .document-heading, .upload, .month-form, .alert, .pagination { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.top-inner, .page-heading, .document-heading, .alert { justify-content: space-between; }
.top-inner { min-height: 74px; padding-block: .8rem; }
.top a, .nav-button { color: white; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.25rem; font-weight: 750; text-decoration: none; }
.brand small { font-size: .8rem; font-weight: 500; }
.brand-mark { display: grid; place-items: center; background: #b8e7c6; color: #10362c; width: 2.2rem; height: 2.2rem; border-radius: .7rem; }
main { padding-block: clamp(2rem, 5vw, 4rem); }
main.guest { display: grid; place-items: center; }
.page-heading { margin-bottom: 1.5rem; }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.05; letter-spacing: -.045em; margin: 0; }
h2 { font-size: 1.15rem; margin: 0; }
p { margin-block: .6rem; }
.eyebrow { color: var(--green); font-size: .76rem; letter-spacing: .13em; font-weight: 750; text-transform: uppercase; }
.muted, small { color: var(--muted); }
.brand small { color: #c9e6d5; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; box-shadow: 0 6px 20px #183c2c0a; }
.login { width: min(100%, 460px); padding: clamp(1.25rem, 4vw, 2.5rem); }
.login h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 1.5rem; }
.microsoft-login { margin-top: 1.25rem; padding-top: 1.15rem; border-top: 1px solid var(--line); }
.microsoft-login p { margin-bottom: 0; font-size: .82rem; }
.microsoft-button { width: 100%; display: flex; align-items: center; justify-content: center; gap: .65rem; border: 1px solid #9cafaa; border-radius: .55rem; padding: .6rem .85rem; background: #fff; color: var(--ink); font-weight: 650; text-decoration: none; }
.microsoft-button:hover { background: #f3f6f4; filter: none; }
.microsoft-button:disabled { color: #4e635d; cursor: default; }
.microsoft-mark { width: 1rem; aspect-ratio: 1; display: inline-block; background: conic-gradient(#7fba00 90deg, #ffb900 0 180deg, #00a4ef 0 270deg, #f25022 0); position: relative; }
.microsoft-mark::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 45%, #fff 45% 55%, transparent 55%), linear-gradient(90deg, transparent 45%, #fff 45% 55%, transparent 55%); }
.stack, .documents { display: grid; gap: 1rem; }
.documents { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); }
label { display: grid; gap: .35rem; font-weight: 650; font-size: .9rem; }
input, textarea, button { font: inherit; }
input:not([type=file]), textarea { width: 100%; padding: .55rem .65rem; border-radius: .5rem; border: 1px solid #9cafaa; background: white; color: var(--ink); }
input[type=file] { max-width: 100%; font-size: .88rem; }
button { cursor: pointer; border: 1px solid transparent; border-radius: .55rem; background: var(--green); color: white; padding: .55rem .85rem; font-weight: 650; }
button:hover { filter: brightness(.9); }
button.secondary { background: white; color: var(--green); border-color: #9cafaa; }
button.danger { background: #a02b31; }
.nav-button { background: transparent; border-color: #799e8e; }
.month-form { align-items: end; }
.upload { margin-top: 1rem; }
.status, .count { display: inline-block; border-radius: 999px; padding: .28rem .62rem; font-size: .75rem; font-weight: 700; }
.status.missing { background: #edf0ef; color: #41524b; }
.status.pending { background: #ffead2; color: #803900; }
.status.approved, .count { background: #d9f2e4; color: #12543a; }
.status.rejected { background: #ffe0e0; color: #8b2027; }
.table-wrap { overflow: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; min-width: 840px; }
th, td { padding: .85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: #e4f0e9; }
tbody td { width: 15%; }
tbody th small, td small { display: block; margin-top: .35rem; }
tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
summary { cursor: pointer; color: var(--green); }
details, .review { margin-top: .55rem; }
.file, .feedback { overflow-wrap: anywhere; }
.feedback { white-space: pre-wrap; font-size: .9rem; }
.notice { margin: 0 0 1rem; padding: .75rem 1rem; background: #d9f2e4; border-radius: .65rem; }
.notice.error { background: #ffe0e0; color: #8b2027; }
.notice ul { padding-left: 1.2rem; margin: 0; }
.alert { padding: .8rem 0; }
.alert + .alert { border-top: 1px solid var(--line); }
.pagination { margin-top: 1rem; }
:focus-visible { outline: 2px solid #357f68; outline-offset: 3px; }

.franchise-page { background: #fff; color: #171a18; }
.franchise-page .wrap { width: min(100% - 3rem, 1120px); }
.franchise-page .top { background: #fff; color: inherit; border-bottom: 1px solid #e6e8e6; }
.franchise-page .top a, .franchise-page .nav-button { color: inherit; }
.franchise-page .brand { gap: .8rem; font: 700 2.15rem/1 Georgia, serif; }
.franchise-page .brand small { border-left: 1px solid #d9dedb; padding-left: .8rem; color: #565c58; font: 500 .9rem/1.2 system-ui, sans-serif; }
.franchise-mark { font: 1.9rem/1 Georgia, serif; }
.franchise-account { text-align: right; display: grid; }
.franchise-account strong { font-size: .9rem; }
.franchise-account small { font-size: .8rem; }
.franchise-page .nav-button { border-color: #d7dcd8; font-size: .9rem; }
.franchise-page main { padding-block: 2.45rem 4rem; }
.delivery-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 240px); align-items: end; gap: 1.5rem; }
.delivery-heading .eyebrow { margin: 0 0 .7rem; color: #4e5851; }
.delivery-heading h1 { font: 700 clamp(2.25rem, 4.4vw, 3rem)/1.08 Georgia, serif; letter-spacing: -.035em; }
.delivery-intro { color: #505852; max-width: 40rem; font-size: .95rem; line-height: 1.55; margin: .5rem 0 0; }
.delivery-progress { padding-bottom: .2rem; }
.delivery-progress label { display: flex; justify-content: space-between; color: #505852; font-weight: 500; }
.delivery-progress strong { color: #171a18; }
.delivery-progress progress { appearance: none; display: block; width: 100%; height: .42rem; margin-top: .55rem; border: 0; border-radius: 1rem; overflow: hidden; accent-color: #176449; }
.delivery-progress progress::-webkit-progress-bar { background: #e5eae6; }
.delivery-progress progress::-webkit-progress-value { background: #176449; border-radius: 1rem; }
.delivery-progress progress::-moz-progress-bar { background: #176449; }
.delivery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.65rem 0 1.3rem; padding: .65rem 1rem; border: 1px solid #e1e5e2; border-radius: .65rem; background: #f8faf8; flex-wrap: wrap; }
.delivery-legend { display: flex; flex-wrap: wrap; gap: .7rem 1.3rem; padding: 0; margin: 0; list-style: none; font-size: .85rem; color: #38403b; }
.delivery-legend li, .delivery-state { display: inline-flex; align-items: center; gap: .55rem; }
.state-dot { flex: none; display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; }
.state-dot.pending { background: #d0860b; }
.state-dot.rejected { background: #c43d46; }
.state-dot.approved { background: #25875a; }
.delivery-toolbar .month-form { gap: .5rem; align-items: center; }
.delivery-toolbar .month-form label { display: flex; align-items: center; gap: .5rem; font-size: .82rem; }
.delivery-toolbar .month-form input, .delivery-toolbar .month-form button { width: auto; padding: .35rem .55rem; font-size: .82rem; border-color: #cdd6cf; }
.delivery-list { border: 1px solid #e1e5e2; border-radius: .8rem; overflow: hidden; }
.delivery-table { min-width: 0; table-layout: fixed; }
.delivery-table thead th { background: #f3f5f3; color: #4e5851; text-transform: uppercase; font-size: .73rem; letter-spacing: .09em; font-weight: 650; }
.delivery-table th, .delivery-table td { border-color: #e6e9e6; padding: .9rem 1.2rem; vertical-align: middle; }
.delivery-table th:first-child { width: 49%; }
.delivery-table th:nth-child(2), .delivery-table td:nth-child(2) { width: 30%; }
.delivery-table th:last-child, .delivery-table td:last-child { width: 21%; }
.delivery-document, .delivery-description, .delivery-feedback { display: block; }
.delivery-document { font-size: .96rem; line-height: 1.25; }
.delivery-description, .delivery-feedback { font-size: .84rem; color: #565e58; margin-top: .25rem; font-weight: 400; }
.delivery-feedback { white-space: pre-wrap; overflow-wrap: anywhere; }
.delivery-feedback.rejected { color: #9c2630; }
.delivery-file { display: block; font-size: .86rem; overflow-wrap: anywhere; margin-bottom: .4rem; }
.delivery-upload { margin: 0; }
.delivery-upload > summary { display: flex; justify-content: center; align-items: center; gap: .5rem; border: 1px dashed #bbc7bf; border-radius: .55rem; background: #f7f9f7; color: #26352c; font-weight: 650; font-size: .84rem; padding: .72rem .55rem; text-align: center; }
.delivery-upload > summary::-webkit-details-marker { display: none; }
.delivery-upload > summary:hover { background: #edf3ee; }
.delivery-upload form { display: grid; justify-items: start; gap: .6rem; padding-top: .65rem; }
.delivery-history { font-size: .83rem; }
.delivery-history ul { padding-left: 1.15rem; overflow-wrap: anywhere; }
.delivery-state { font-size: .85rem; font-weight: 600; }
.delivery-state.missing { color: #565e58; font-weight: 400; }
.delivery-state .state-dot { width: .85rem; height: .85rem; }
.delivery-formats { margin-top: 1.4rem; font-size: .82rem; color: #565e58; }

@media (max-width: 680px) {
    .franchise-page .wrap { width: calc(100% - 2rem); }
    .franchise-page .brand { font-size: 1.8rem; }
    .franchise-page .brand small { display: none; }
    .franchise-page .top-inner { gap: .5rem; }
    .franchise-page .top nav { gap: .65rem; }
    .delivery-heading { grid-template-columns: 1fr; gap: 1rem; }
    .delivery-progress { width: min(100%, 240px); }
    .delivery-table, .delivery-table tbody, .delivery-table tr, .delivery-table td, .delivery-table th { display: block; }
    .delivery-table thead { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
    .delivery-table tbody tr { display: grid; gap: .65rem; padding: .9rem; border-bottom: 1px solid #e6e9e6; }
    .delivery-table tbody tr:last-child { border-bottom: 0; }
    .delivery-table tbody tr > * { width: 100% !important; border: 0; padding: 0; }
    .delivery-table tbody tr > td:last-child { grid-row: 2; }
}

