:root {
  color-scheme: light;
  --paper: #f7f6f3;
  --white: #fff;
  --ink: #211d1c;
  --muted: #6b625d;
  --line: #e8e2dc;
  --red: #a13228;
  --red-dark: #84291f;
  --red-light: #f7e8e3;
  --tag: #f1ede7;
  --green: #2b684c;
  --orange: #8a4d14;
  --font: 'Instrument Sans', 'Segoe UI', Arial, sans-serif;
}
*, *::after, *::before { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.55 var(--font); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.13; letter-spacing: -.026em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: 1.29rem; }
h3 { font-size: 1rem; }
a { color: var(--red-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: .5rem; left: .5rem; z-index: 10; transform: translateY(-150%); background: var(--white); padding: .55rem .85rem; }
.skip-link:focus { transform: translateY(0); }
svg.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.brand { display: flex; gap: 13px; align-items: center; font-size: .77rem; font-weight: 700; }
.brand img { display: block; width: 77px; height: auto; }
.brand span { border-left: 1px solid var(--line); padding: 4px 0 4px 12px; }
.entry { display: grid; min-height: 100svh; grid-template-columns: .95fr 1.05fr; background: var(--white); }
.entry-main { display: grid; grid-template-rows: auto 1fr; padding: clamp(24px, 5vw, 64px); }
.entry .brand img { width: 94px; }
.entry-image { background: linear-gradient(160deg, #44291a18, #56200f6b), url(/comptoir-omnitec.jpg) center / cover; }
.login { width: min(100%, 365px); align-self: center; margin: 30px auto 80px; }
.login h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.login > p { margin: .65rem 0 1.75rem; color: var(--muted); }
.login .button { width: 100%; margin-top: .45rem; }
.workspace { display: grid; grid-template-columns: 222px minmax(0, 1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; height: 100svh; overflow: auto; display: flex; flex-direction: column; gap: 1.8rem; border-right: 1px solid var(--line); background: var(--white); padding: 25px 15px 16px; }
.sidebar .brand { padding: 0 6px; }
.sidebar nav { display: grid; gap: 4px; }
.nav-link { display: flex; gap: 10px; align-items: center; min-height: 42px; white-space: nowrap; padding: 9px 11px; color: #544b46; text-decoration: none; border-radius: 7px; font-weight: 650; font-size: .88rem; }
.nav-link:hover { background: var(--paper); color: var(--ink); }
.nav-link[aria-current="page"] { color: var(--red-dark); background: var(--red-light); }
.account { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.account strong, .account div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.account div span { color: var(--muted); font-size: .72rem; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: var(--red-dark); background: var(--red-light); font-weight: 700; font-size: .72rem; }
.topbar { height: 66px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 clamp(16px, 3vw, 40px); background: var(--white); border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; gap: 10px; align-items: center; margin-right: auto; color: var(--muted); font-size: .86rem; }
.breadcrumb strong { color: var(--ink); }
.breadcrumb b { color: #a89b92; }
.icon-button { min-width: 36px; height: 36px; display: inline-grid; position: relative; place-items: center; border: 1px solid transparent; border-radius: 7px; background: transparent; padding: 0; }
.icon-button:hover { background: var(--paper); }
.notification-button { border-color: var(--line); }
.unread { position: absolute; top: 5px; right: 5px; background: var(--red); border: 1px solid white; width: 8px; height: 8px; border-radius: 50%; }
.mobile-only { display: none; }
.content { max-width: 1600px; margin-inline: auto; padding: 28px clamp(16px, 3vw, 40px) 55px; }
.page-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.page-heading { margin-bottom: 23px; }
.page-heading p { color: var(--muted); margin-top: .35rem; }
.section-heading { margin-bottom: 12px; }
.hero { display: flex; align-items: center; min-height: 180px; padding: 27px clamp(20px, 4vw, 42px); border-radius: 11px; color: white; background: linear-gradient(90deg, #84291f 0%, #84291f 31%, #84291fdc 56%, #84291f55 100%), url(/comptoir-omnitec.jpg) 70% 45% / cover; overflow: hidden; }
.hero p { margin: .55rem 0 0; color: #f7e5dd; }
.hero-actions { margin-top: .9rem; }
.hero .button { border-color: #fff; color: var(--red-dark); }
.hero .button:hover { background: var(--red-light); }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 19px 0 24px; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: 9px; padding: 13px 16px; min-width: 0; }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; color: var(--muted); font-size: .84rem; font-weight: 650; }
.stat-head svg { color: var(--red); }
.stat strong { display: block; margin-top: 3px; font-size: 1.65rem; line-height: 1.2; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(245px, 1fr); gap: 19px; align-items: start; }
.stack { display: grid; gap: 18px; }
.panel { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); }
.panel .section-heading { margin-bottom: 14px; }
.entries { display: grid; gap: 0; }
.row { display: flex; width: 100%; gap: 11px; align-items: center; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); min-height: 60px; padding: 11px 2px; }
.row:last-child { border-bottom: 0; }
button.row:hover { color: var(--red-dark); }
.row-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row-copy small { display: block; margin-top: 3px; color: var(--muted); }
.row-icon { display: grid; flex: 0 0 37px; place-items: center; width: 37px; height: 37px; border-radius: 7px; background: var(--red-light); color: var(--red-dark); }
.row-end { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.row-end .icon { width: 16px; height: 16px; color: var(--muted); }
.tag { width: fit-content; display: inline-flex; padding: 3px 7px; border-radius: 5px; color: #5c514b; background: var(--tag); font-size: .73rem; font-weight: 700; white-space: nowrap; }
.tag.urgent, .tag.rejected { color: var(--red-dark); background: var(--red-light); }
.tag.important, .tag.pending, .tag.submitted { color: var(--orange); background: #f9edda; }
.tag.approved, .tag.published { color: var(--green); background: #e5f1e9; }
.button { min-height: 39px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 7px; background: white; font-weight: 700; text-decoration: none; line-height: 1.25; }
.button .icon { width: 17px; height: 17px; }
.button:hover { background: var(--paper); }
.button.primary { background: var(--red); border-color: var(--red); color: white; }
.button.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.button.quiet { color: var(--red-dark); background: transparent; border-color: transparent; min-height: 30px; padding: 5px 0; font-size: .8rem; }
.button.quiet:hover { text-decoration: underline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { margin: 3px 0 0; padding: 16px; border: 1px dashed var(--line); border-radius: 7px; color: var(--muted); background: #fcfaf8; }
.form { display: grid; gap: 13px; }
.form label { display: flex; flex-direction: column; gap: 5px; font-weight: 650; font-size: .88rem; }
.form :is(input, select, textarea) { min-width: 0; width: 100%; padding: 8px 10px; border: 1px solid #cfc5bd; border-radius: 6px; background: white; font-weight: 400; }
.form input[type="file"] { padding: 6px 8px; }
.form textarea { min-height: 90px; resize: vertical; }
.two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dialog { max-height: calc(100svh - 30px); width: min(600px, calc(100% - 28px)); padding: 21px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); box-shadow: 0 15px 70px #2d1d1a38; }
.dialog::backdrop { background: #2a1f1bc0; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dialog h2 { padding-top: 7px; overflow-wrap: anywhere; }
.dialog-content, .details { display: grid; gap: 12px; }
.detail-block { border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; background: #fcfaf8; }
.detail-block p + p { margin-top: .22rem; }
.copy { white-space: pre-wrap; overflow-wrap: anywhere; }
.small { color: var(--muted); font-size: .84rem; }
.proof { display: block; max-width: 100%; max-height: 240px; object-fit: contain; margin-top: 7px; border-radius: 6px; }
.calendar-title { margin: 4px 0 10px; color: var(--muted); }
.calendar-date { display: grid; place-items: center; width: 43px; min-width: 43px; padding: 4px; border-radius: 6px; font-weight: 700; background: var(--red-light); color: var(--red-dark); font-variant-numeric: tabular-nums; line-height: 1.15; }
.calendar-date small { font-size: .69rem; font-weight: 650; }
.filters { margin-bottom: 9px; }
.filters label { display: flex; align-items: center; gap: 9px; font-size: .85rem; }
.filters select { background: white; border: 1px solid var(--line); border-radius: 6px; padding: 5px 7px; }
.error { color: var(--red-dark); background: var(--red-light); padding: 8px; border-radius: 6px; }
.feedback { position: fixed; bottom: 16px; right: 16px; max-width: calc(100% - 32px); z-index: 5; background: var(--ink); color: var(--white); padding: 10px 15px; border-radius: 7px; }
@media (max-width: 930px) {
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 720px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; gap: 9px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { padding: 0; }
  .sidebar nav { display: flex; gap: 3px; overflow-x: auto; padding: 0 0 3px; }
  .nav-link { min-height: 38px; font-size: .8rem; padding: 6px 8px; gap: 5px; }
  .nav-link .icon { width: 16px; height: 16px; }
  .account { display: none; }
  .mobile-only { display: inline-grid; }
  .topbar { height: 47px; }
  .content { padding-top: 16px; }
  .entry { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto min(30svh, 200px); }
  .entry-main { padding: 20px; }
  .entry-image { background-position: center 44%; }
  .login { margin: 30px auto 20px; }
}
@media (max-width: 430px) {
  .hero { min-height: 164px; padding: 15px; }
  .stat-grid { gap: 6px; }
  .stat { padding: 8px; }
  .stat-head { justify-content: flex-start; font-size: .73rem; line-height: 1.15; }
  .stat-head .icon { display: none; }
  .stat strong { font-size: 1.35rem; }
  .panel { padding: 11px; }
  .row { flex-wrap: wrap; }
  .row-end { margin-left: 46px; }
  .two-cols { grid-template-columns: minmax(0, 1fr); }
}
