:root {
  color-scheme: dark;
  --bg: #151412;
  --sidebar: #191816;
  --panel: #1d1b18;
  --raised: #24211d;
  --line: #342f28;
  --muted: #b1a79a;
  --text: #f6f2ec;
  --gold: #ecb478;
  --green: #8bd2ac;
  --red: #eca597;
  --edge: clamp(21px, 3.2vw, 48px);
  --section-space: 18px;
  --ease-out: cubic-bezier(.2,.7,.25,1);
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .brand strong, .metric strong { font-family: Manrope, system-ui, sans-serif; }
h1 { font-size: clamp(1.8rem, 3vw, 2.45rem); letter-spacing: -.055em; line-height: 1.15; }
h2 { font-size: 1.13rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
.gold { color: var(--gold); }
.muted, .subtle { color: var(--muted); }
.subtle { font-size: .875rem; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.sidebar { width: 248px; background: var(--sidebar); height: 100dvh; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; border-right: 1px solid var(--line); z-index: 5; }
.sidebar-head { position: relative; flex-shrink: 0; }
.brand { padding: 20px 16px 12px; display: grid; gap: 10px; white-space: nowrap; }
.brand-mark {
  position: relative;
  background: linear-gradient(145deg,#30261f,var(--raised));
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px #4a392b;
  padding: 4px 10px;
}
.brand-mark img { width: 100%; height: auto; display: block; filter: brightness(1.8) saturate(.8); }
@supports (mask-image: url('./le-parqueteur-logo.png')) {
  .brand-mark img { opacity: 0; filter: none; }
  .brand-mark::after {
    content: '';
    position: absolute;
    inset: 4px 10px;
    background: var(--gold);
    mask: url('./le-parqueteur-logo.png') center / contain no-repeat;
    pointer-events: none;
  }
  @media (forced-colors: active) {
    .brand-mark::after { background: CanvasText; forced-color-adjust: none; }
  }
}
.brand-name { display: flex; align-items: baseline; gap: 9px; padding-inline: 3px; }
.brand strong { font-weight: 800; font-size: 1.23rem; letter-spacing: -.05em; line-height: 1.1; }
.brand small { font-size: .77rem; color: var(--muted); }
nav { padding: 0 14px 12px; overflow: auto; overscroll-behavior: contain; }
.nav-label { margin: 16px 10px 7px; color: #a69a8b; font-size: .68rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 8px 10px; margin: 2px 0; color: var(--muted); border: 1px solid transparent; border-radius: 9px; font-size: .9rem; font-weight: 600; }
.nav-link:hover { background: var(--raised); color: var(--text); }
.nav-link.active { background: linear-gradient(105deg,#3c2d20,#2d241b); border-color: #59402b; box-shadow: inset 2px 0 #e9ad6c; color: #f5c38f; }
.nav-link .icon { width: 17px; height: 17px; }
.count { margin-left: auto; border-radius: 5px; background: #352e25; color: var(--gold); font-size: .73rem; padding: 2px 6px; }
.account { margin: auto 14px max(14px,env(safe-area-inset-bottom)); padding-top: 13px; border-top: 1px solid var(--line); flex-shrink: 0; }
.account button { min-width: 0; width: 100%; background: none; border: 0; color: inherit; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 8px; text-align: left; }
.account button:hover { background: var(--raised); }
.account button > span:nth-child(2) { flex: 1; min-width: 0; }
.account strong, .account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account strong { font-size: .84rem; }
.account small { color: var(--muted); font-size: .74rem; }
.avatar { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; background: #493426; color: #ffca94; font-size: .75rem; font-weight: 700; flex: 0 0 auto; }
.avatar.green { background: #243c32; color: #a9ddba; }
.avatar.purple { background: #352b42; color: #d0b4e7; }
.avatar.blue { background: #263845; color: #add1ea; }
.workspace { margin-left: 248px; min-width: 0; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: env(safe-area-inset-top) var(--edge) 0; background: #191715f2; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; }
.crumb { display: flex; gap: 10px; align-items: center; font-size: .875rem; }
.crumb span { color: var(--muted); }
.crumb span::after { content: '/'; color: #75695c; margin-left: 10px; }
.top-actions, .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.icon-button, .search-button { color: var(--muted); border: 1px solid var(--line); background: #201e1b; border-radius: 9px; height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px; }
.icon-button { min-width: 38px; position: relative; }
.icon-button .icon, .search-button .icon { width: 17px; height: 17px; }
.icon-button:hover, .search-button:hover { color: var(--text); border-color: #655340; }
.signal { width: 7px; height: 7px; border-radius: 100%; background: var(--gold); position: absolute; top: 7px; right: 8px; }
kbd { background: #2a2723; border-radius: 4px; padding: 2px 5px; font: inherit; font-size: .72rem; color: var(--muted); }
.mobile-menu, .drawer-close, #quick-navigation { display: none; }
main { padding: 30px var(--edge) 44px; max-width: 1590px; margin: auto; }
main:focus, #dialog-title:focus { outline: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 23px; }
.page-head p { margin-top: 8px; color: var(--muted); font-size: .96rem; line-height: 1.5; }
.date::first-letter { text-transform: uppercase; }
.btn { min-height: 40px; border-radius: 9px; padding: 8px 14px; display: inline-flex; gap: 8px; align-items: center; justify-content: center; border: 1px solid #473b30; background: #2a241e; color: var(--text); font-size: .9rem; font-weight: 700; text-align: center; }
.btn:hover { background: #3a3026; }
.btn .icon { width: 16px; height: 16px; }
.btn.primary { color: #2e1b10; background: linear-gradient(160deg,#f2bc86,#e7a766); border-color: #efb77d; box-shadow: inset 0 1px #f5cca38c, 0 2px 5px #0002; }
.btn.primary:hover { background: #f4bf89; }
.btn.danger { color: var(--red); }
.btn.compact { min-height: 34px; padding: 5px 9px; }
.btn:disabled { opacity: .55; cursor: default; }
.hero { border-radius: 17px; border: 1px solid #674832; min-height: 226px; display: flex; align-items: center; padding: clamp(20px,3vw,32px); overflow: hidden; position: relative; background: #2b2018; isolation: isolate; box-shadow: 0 12px 30px #0002; }
.hero::before { content: ''; position: absolute; inset: 0 0 0 30%; z-index: -2; background: url('./parquet.jpg') center 65% / cover; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #2b1d15 4%, #2b1d15 28%, #2b1d15e8 43%, #2b1d1570 68%, #2b1d1520 100%); }
.hero-content { max-width: 450px; }
.hero-label { display: inline-flex; align-items: center; gap: 7px; color: #f6c494; font-size: .76rem; letter-spacing: .08em; font-weight: 800; text-transform: uppercase; }
.hero-label .icon { width: 14px; height: 14px; }
.hero h2 { margin-top: 10px; color: #fff3e4; font-size: clamp(1.45rem, 2.6vw, 2.05rem); line-height: 1.15; letter-spacing: -.045em; }
.hero p { margin: 9px 0 16px; color: #ebd6c4; font-size: .94rem; line-height: 1.55; max-width: 370px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: var(--section-space) 0; }
.metric { display: grid; grid-template-columns: minmax(0,1fr) auto; align-content: center; align-items: center; gap: 5px 8px; text-align: left; background: linear-gradient(142deg,#24211c,var(--panel) 70%); color: var(--text); border: 1px solid var(--line); border-radius: 13px; padding: 15px; min-width: 0; min-height: 94px; }
.metric:hover { border-color: #84603f; background-color: #28231e; }
.metric .tile { grid-column: 2; grid-row: 1; }
.metric strong { grid-column: 1; grid-row: 1; font-size: 1.65rem; line-height: 1.12; font-variant-numeric: tabular-nums; }
.metric .subtle { grid-column: 1 / -1; }
.tile { width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center; background: #392d22; color: #f0b77e; flex: 0 0 auto; }
.tile .icon { height: 17px; width: 17px; }
.tile.green { background: #26382e; color: #95d9ad; }
.tile.blue { background: #293440; color: #a5c9e8; }
.tile.purple { background: #352b3e; color: #cdb1e9; }
.columns { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); gap: var(--section-space); }
.stack { display: grid; gap: 14px; }
.panel, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.panel-head { padding: 16px 17px 12px; display: flex; align-items: center; justify-content: space-between; gap: 9px; flex-wrap: wrap; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; }
.panel-head h2 .icon { width: 17px; height: 17px; color: var(--gold); }
.text-button { color: var(--gold); background: none; border: 0; padding: 6px 4px; font-weight: 700; font-size: .85rem; }
.text-button:hover { text-decoration: underline; }
.rows { padding: 0 15px 6px; }
.agenda-day h3 { padding: 8px 15px 10px; color: var(--gold); font-size: .92rem; }
.agenda-day h3::first-letter { text-transform: uppercase; }
.agenda-day + .agenda-day { border-top: 1px solid var(--line); }
.row { padding: 11px 0; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); min-width: 0; }
.row button { flex-shrink: 0; }
.row .copy { flex: 1; min-width: 0; }
.copy b, .copy small { display: block; overflow-wrap: anywhere; }
.copy b { font-size: .94rem; }
.copy small { color: var(--muted); font-size: .835rem; line-height: 1.45; margin-top: 3px; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.time { color: #e7c49f; min-width: 42px; font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pill { border-radius: 30px; padding: 4px 8px; background: #3f3022; color: #f0bc85; font-size: .75rem; white-space: nowrap; flex: 0 0 auto; }
.pill.green { background: #263b30; color: #a1d9b4; }
.pill.blue { background: #273542; color: #afd2ee; }
.pill.red { background: #412a27; color: #f5b1a3; }
.pill.neutral { background: #302c27; color: #c4b9ab; }
.section-gap { margin-top: var(--section-space); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); gap: 14px; }
.card { padding: 17px; }
.cards > .card { display: flex; flex-direction: column; }
.cards > .card > .actions { margin-top: auto; padding-top: 12px; }
.card[data-record] { scroll-margin: 80px 0 85px; }
.card[data-record]:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; margin-bottom: 9px; }
.card p { margin: 7px 0; line-height: 1.5; overflow-wrap: anywhere; }
.card .actions { margin-top: 14px; }
.progress { height: 6px; border-radius: 8px; background: #382e25; overflow: hidden; margin: 12px 0 6px; }
.progress span { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#bc7947,#efb77b); }
.empty { padding: 18px 14px; color: var(--muted); font-size: .88rem; }
.photo { width: 100%; display: block; max-height: 315px; object-fit: contain; background: #151412; border-radius: 8px; margin: 10px 0; }
.portfolio-gallery { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 0 16px 16px; }
.portfolio-card { display: grid; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--raised); color: var(--text); text-align: left; }
.portfolio-card:hover { border-color: #845b36; }
.portfolio-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.portfolio-card span { padding: 9px 10px; font-size: .875rem; font-weight: 700; }
.portfolio-photo { max-height: 66dvh; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.filters button[aria-pressed=true] { color: var(--gold); border-color: #845b36; }
.chat { max-width: 800px; }
.chat .ai-head { flex-wrap: wrap; }
.chat [aria-pressed=true] { color: var(--gold); border-color: #845b36; }
.ai-setup { margin: 0 15px 8px; padding: 12px; background: var(--raised); border-radius: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ai-setup > p:first-child { width: 100%; font-size: .875rem; color: var(--muted); }
.ai-setup > p:empty { display: none; }
.ai-setup:has(p:only-child) { padding-block: 8px; }
.ai-examples { padding: 0 15px; }
.chat-log { padding: 10px 17px 16px; display: grid; gap: 10px; max-height: 50vh; overflow: auto; }
.bubble { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; padding: 11px 13px; border-radius: 9px; background: #28231e; max-width: 90%; }
.bubble.user { justify-self: end; background: #47301e; }
.chat form { display: flex; gap: 8px; padding: 12px 15px; border-top: 1px solid var(--line); }
.chat input { flex: 1; min-width: 0; }
.report-text { white-space: pre-wrap; line-height: 1.65; overflow-wrap: anywhere; }
.report-body { border-top: 1px solid var(--line); padding: 16px 18px 21px; }
.pause-body { border-top: 1px solid var(--line); padding: 16px 18px 21px; }
.pause-body > .subtle { margin-top: 6px; }
.pause-body > .actions { margin-top: 13px; }
.pause-clock { display: grid; gap: 3px; margin: 12px 0 17px; color: var(--muted); font-size: .9rem; }
.pause-clock strong { color: var(--gold); font: 800 clamp(2rem,5vw,3rem)/1 Manrope,system-ui,sans-serif; font-variant-numeric: tabular-nums; }
dialog { background: #211e1a; color: var(--text); border: 1px solid #554537; border-radius: 16px; padding: 19px; width: min(calc(100% - 28px), 555px); max-height: 90dvh; box-shadow: 0 22px 100px #000a; overscroll-behavior: contain; }
dialog[open] { animation: dialog-in .18s var(--ease-out) both; }
dialog::backdrop { background: #080706b9; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.dialog-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 12px; }
.dialog-head h2 { overflow-wrap: anywhere; }
.form-fields { display: grid; gap: 11px; }
.form-field { display: grid; gap: 5px; }
dialog .location-actions { margin-top: 4px; }
label { display: grid; gap: 5px; font-size: .875rem; color: #f1dfce; }
input, select, textarea { color: var(--text); background: #171512; border: 1px solid #524337; border-radius: 9px; padding: 10px; width: 100%; min-height: 42px; font-size: 1rem; }
select { appearance: none; padding-inline-end: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23d1ad88' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
textarea { min-height: 85px; resize: vertical; }
.form-error { color: var(--red); font-size: .875rem; line-height: 1.5; }
.form-error:empty, .dialog-feedback:empty { display: none; }
.dialog-feedback { padding: 10px 12px; margin-top: 10px; background: #3d2e20; color: #ffe5ca; border-radius: 8px; font-size: .9rem; }
dialog .actions { margin-top: 12px; }
#toast { position: fixed; bottom: 18px; right: 18px; max-width: calc(100vw - 36px); z-index: 9; border: 1px solid #725235; background: #36281d; color: #ffe5ca; border-radius: 11px; padding: 11px 15px; box-shadow: 0 10px 32px #0006; }
#toast:empty { display: none; }
.search-field { grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; padding: 0 11px; background: #171512; border: 1px solid #524337; border-radius: 9px; }
.search-field:focus-within { border-color: var(--gold); }
.search-field input, .search-field input:focus-visible { border: 0; outline: 0; padding-inline: 0; }
#search-results .rows { padding: 0; }
.search-result .copy { min-width: 0; }
.search-result .icon { color: var(--gold); }
.veil { position: fixed; inset: 0; background: #000a; z-index: 4; opacity: 0; visibility: hidden; transition: opacity .22s var(--ease-out), visibility 0s .22s; }
.veil.visible { opacity: 1; visibility: visible; transition-delay: 0s; }
:is(.btn,.nav-link,.metric,.icon-button,.search-button,.portfolio-card,.account button) { transition: background-color .17s var(--ease-out), border-color .17s var(--ease-out), color .17s var(--ease-out); }
@media (max-width: 1080px) {
  .sidebar { width: 216px; }
  .workspace { margin-left: 216px; }
  .metrics { gap: 8px; }
  .metric { padding: 11px; }
}
@media (max-width: 850px) {
  body.drawer-open { overflow: hidden; }
  .sidebar { transform: translateX(-100%); visibility: hidden; transition: transform .24s var(--ease-out), visibility 0s .24s; width: min(82vw, 280px); padding-top: env(safe-area-inset-top); }
  .sidebar.open { transform: translateX(0); visibility: visible; transition-delay: 0s; box-shadow: 16px 0 65px #0006; }
  .sidebar .brand-mark { margin-inline-end: 48px; }
  .drawer-close { display: inline-flex; position: absolute; top: 20px; right: 11px; }
  .workspace { margin: 0; }
  .mobile-menu { display: inline-flex; }
  .crumb { margin-right: auto; }
  #quick-navigation { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); position: fixed; inset: auto 0 0; z-index: 3; overflow: visible; background: #1a1815f7; border-top: 1px solid var(--line); padding: 6px max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); }
  #quick-navigation a { min-height: 48px; display: grid; justify-items: center; align-content: center; gap: 3px; border-radius: 9px; color: var(--muted); font-size: .75rem; font-weight: 700; }
  #quick-navigation a[aria-current] { color: #f5bf8c; background: #35291e; }
  #quick-navigation .icon { width: 18px; height: 18px; }
  main { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(74px + env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
  :root { --edge: 14px; --section-space: 14px; }
  .topbar { min-height: 59px; gap: 8px; }
  .top-actions { flex-wrap: nowrap; }
  .crumb span, .search-button span, .search-button kbd { display: none; }
  main { padding-top: 20px; }
  .page-head { align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
  .icon-button, .search-button, .btn { min-height: 44px; }
  .icon-button, .search-button { min-width: 44px; }
  .btn.compact { min-height: 38px; }
  .hero { min-height: 211px; padding: 18px; }
  .hero::before { left: 18%; }
  .hero::after { background: linear-gradient(90deg, #2b1d15 5%, #2b1d15e8 53%, #2b1d1570 100%); }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .columns { grid-template-columns: 1fr; }
  .portfolio-gallery { grid-template-columns: 1fr; }
  .chat form .btn { padding-inline: 8px; }
  dialog { inset: auto 0 0; width: 100%; max-width: none; max-height: min(91dvh,760px); margin: 0; border-radius: 18px 18px 0 0; border-bottom: 0; padding: 16px var(--edge) max(18px,env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
