:root { --ink:#1c1c1c; --muted:#5c5a57; --line:#e4e1dc; --ground:#ffffff; --panel:#f6f5f3; --accent:#1c1c1c; --error:#a4261b; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: auto; display: block; }
.brand span { font-family: "EB Garamond", Garamond, Georgia, serif; font-weight: 600; font-size: 24px; line-height: 1; }
.bar .aside { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 14px; }
.bar .aside a { text-decoration: none; }
.bar .aside a:hover, .bar .aside button:hover { color: var(--ink); text-decoration: underline; }
.linkbtn { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; }
main { flex: 1; width: 100%; }
footer { border-top: 1px solid var(--line); padding: 16px 24px; text-align: center; font-size: 12px; color: var(--muted); }
h1, h2 { font-family: "EB Garamond", Garamond, Georgia, serif; font-weight: 600; margin: 0; line-height: 1.15; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Sign-in card */
.signin { display: flex; justify-content: center; padding: 64px 20px; }
.card { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px; display: flex; flex-direction: column; gap: 18px; }
.card h1 { font-size: 32px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field .row { display: flex; justify-content: space-between; align-items: baseline; }
label { font-size: 14px; font-weight: 500; }
.field a { font-size: 12px; color: var(--muted); }
input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
button.primary { font: inherit; font-weight: 500; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 11px 14px; cursor: pointer; }
button.primary[disabled] { opacity: .6; cursor: default; }
.msg { font-size: 14px; color: var(--error); min-height: 1.2em; }
.small { font-size: 12px !important; }

/* Back office */
.office { max-width: 1040px; margin: 0 auto; padding: 40px 24px 64px; display: flex; flex-direction: column; gap: 36px; }
.office header h1 { font-size: 40px; }
.office header p { margin: 8px 0 0; color: var(--muted); max-width: 62ch; font-size: 16px; }
.section { display: flex; flex-direction: column; gap: 14px; }
.section h2 { font-size: 24px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.tile:hover { border-color: #c9c5bf; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.tile b { font-weight: 600; font-size: 16px; }
.tile span { color: var(--muted); font-size: 14px; }
.tile small { color: var(--muted); font-size: 12px; margin-top: 4px; word-break: break-all; }
.loading, .empty { color: var(--muted); }
@media (max-width: 560px) { .bar { padding: 12px 16px; } .office { padding: 28px 16px 48px; } .office header h1 { font-size: 32px; } }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } }

/* Updates and notifications */
h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.panel.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; }
@media (max-width: 760px) { .panel.two { grid-template-columns: 1fr; } }
.panel form { display: flex; flex-direction: column; gap: 12px; }
.hint { margin: 0; color: var(--muted); font-size: 13px; }
.opt { color: var(--muted); font-weight: 400; }
select, textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
textarea { resize: vertical; }
button.secondary { font: inherit; font-weight: 500; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.msg.ok { color: #2f7a52; }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; }
.feed li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.feed .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.chip { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: #ecebe8; color: #3c3a37; }
.chip.Finance { background: #e3f0ea; color: #235c3f; }
.chip.Status { background: #e6ebf4; color: #2f4a7a; }
.feed b { font-weight: 600; }
.feed p { margin: 0; font-size: 14px; white-space: pre-wrap; color: #33312e; }
.sections { display: flex; flex-direction: column; gap: 36px; }
