/* Bold Orange theme (7 Nov 2026). Loaded LAST so it wins over the older files. Remove this one file and the app returns to the previous look.
   Palette: ink #17100A, orange #F36B21 (signature), paper #FAF9F7, burnt #B84A0D (orange text on white), hover #D95A14.
   Rules of the theme: darker secondary text (AA+), thicker borders, strong focus rings,
   and ONE loud place: the login screen and the active menu item. Everything else stays calm and white. */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&display=swap');

:root {
  --ink: #17100a; --muted: #4a423b; --line: #cfc5bb; --paper: #faf9f7; --card: #fff;
  --orange: #f36b21; --orange-hover: #d95a14; --orange-text: #b84a0d; --tint: #ffefe5;
  --lime: #f36b21; --green: #d95a14; --blue: #ffefe5;
}
body { font-family: Archivo, Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', 'Noto Sans SC', sans-serif; font-size: 17px; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font-family: inherit; }
@media (min-width: 981px) { body { line-height: 1.55; } }
@media (max-width: 980px) { body { font-size: 16px; } }

/* ---- Headings and words ---- */
h1 { font-size: clamp(28px, 4.2vw, 40px); font-weight: 900; letter-spacing: -1.4px; line-height: 1.08; margin: 0 0 8px; }
h2 { font-size: 26px; font-weight: 800; letter-spacing: -.6px; line-height: 1.2; }
h3 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.sub, .eyebrow, .muted, small { color: var(--muted); }
.sub { font-size: 18px; }
.crumb { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
@media (min-width: 981px) { .main p, .main li, .main label, .main td, .main dd, .main dt { font-size: var(--ui-text, 16px); } }
.main th { font-weight: 800; color: var(--ink); font-size: 14px; letter-spacing: .02em; border-bottom: 2px solid var(--ink); }
@media (min-width: 981px) { .main td { padding-block: var(--ui-row-padding, 14px); } }
.main td, .main th { border-bottom-color: #e0d8cf; }
b, strong { font-weight: 800; }

/* ---- Sidebar: dark ink, the active item is a solid orange block ---- */
.side { background: var(--ink) !important; color: #f4ece5 !important; border-right: 0 !important; }
/* The wide sidebar column applies only on large screens: the app collapses it on phones and tablets (max-width 980px) and must keep doing so. */
@media (min-width: 981px) { .shell { grid-template-columns: var(--sidebar-width, 270px) minmax(0, 1fr); } }
.brand, .login-brand { color: #fff; font-weight: 900; font-size: 22px; letter-spacing: .1em; }
.side .brand { color: #fff !important; }
.brand .brand-mark, .login-brand .brand-mark { background: var(--orange); color: #fff; width: 38px; height: 38px; border-radius: 9px; font-size: 22px; font-weight: 900; display: inline-grid; place-items: center; }
.side small { color: #cdbfb3 !important; font-size: 14px; }
.nav { gap: 4px; }
.nav button { color: #f0e6dd !important; font-weight: 700; border-radius: 10px; letter-spacing: -.1px; }
@media (min-width: 981px) { .nav button { font-size: var(--ui-text, 17px); padding: var(--ui-control-padding, 13px 16px); } }
.nav button:hover { background: #33241a !important; color: #fff !important; }
.nav button.active { background: var(--orange) !important; color: var(--ink) !important; font-weight: 900; }
.nav .nav-group, .nav h4, .nav .group-title { color: #e8a37c; font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.company { border-top-color: #4a3a2e !important; }
.company label { color: #cdbfb3 !important; font-size: 14px; }
.company select { background: #2a1d14 !important; color: #fff !important; border: 2px solid #5b4637 !important; font-size: 16px; }

/* ---- Top bar ---- */
.top { background: #fff; border-bottom: 3px solid var(--ink); }
@media (min-width: 981px) { .top { height: var(--ui-header-height, 84px); } }
.user-pill { border: 2px solid var(--ink); }
.avatar { background: var(--orange); color: var(--ink); font-weight: 900; }

/* ---- Cards, tables, forms ---- */
.card, .os-card { border: 1.5px solid var(--line); border-radius: 14px; box-shadow: none; }
.os-card h2, .card h2 { margin-top: 0; }
input, select, textarea { border: 2px solid #bdb2a7 !important; border-radius: 10px; color: var(--ink); background: #fff; }
@media (min-width: 981px) { input, select, textarea { font-size: var(--ui-text, 17px); } }
input::placeholder, textarea::placeholder { color: #6e655d; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--ink) !important; outline: 3px solid var(--orange); outline-offset: 1px; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---- Buttons: orange primary with ink text (6.2:1), ink secondary ---- */
.analyse, .generate, button.primary, .btn-primary, .os-actions button:not(.secondary):not(.ops-link):not(.danger), .new-btn, #ddSave, .login-card button[type=submit] { background: var(--orange) !important; color: var(--ink) !important; border: 0; font-weight: 900; border-radius: 10px; box-shadow: none; }
@media (min-width: 981px) { .analyse, .generate, button.primary, .btn-primary, .os-actions button:not(.secondary):not(.ops-link):not(.danger), .new-btn, #ddSave { font-size: var(--ui-text, 17px); padding: var(--ui-control-padding, 13px 22px); } }
.analyse:hover, .generate:hover, button.primary:hover, .btn-primary:hover, .new-btn:hover, #ddSave:hover, .login-card button[type=submit]:hover { background: var(--orange-hover) !important; }
button.secondary, .secondary { background: #fff !important; color: var(--ink) !important; border: 2px solid var(--ink) !important; font-weight: 800; border-radius: 10px; }
@media (min-width: 981px) { button.secondary, .secondary { font-size: var(--ui-text, 16px); padding: var(--ui-control-padding, 11px 18px); } }
button.secondary:hover { background: var(--tint) !important; }
.ops-link, .forgot-password, a { color: var(--orange-text); font-weight: 800; }
.status, .status-tag, .os-pill { background: var(--tint); color: var(--orange-text); font-weight: 800; font-size: 14px; border: 1.5px solid #f5bd9c; }

/* ---- Login: a loud orange brand panel beside a plain sign-in form ---- */
.login-gate { background: var(--paper) !important; display: grid !important; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); place-items: stretch !important; padding: 0 !important; overflow-y: auto; }
.login-gate.hidden { display: none !important; }
.login-gate::before {
  content: 'CARPENTERS'; white-space: nowrap; grid-column: 1; grid-row: 1;
  background: var(--orange); color: var(--ink); padding: 8vh 6vw; display: flex; flex-direction: column; justify-content: flex-end; position: sticky; top: 0; height: 100vh; align-self: start;
  font-size: clamp(44px, 6.4vw, 118px); font-weight: 900; letter-spacing: -.02em; line-height: 1; overflow: hidden;
}
.login-gate::after {
  content: '匠'; position: fixed; left: 3vw; top: -2vh; font-size: clamp(260px, 38vw, 620px); font-weight: 900; line-height: 1; color: rgba(23, 16, 10, .16); pointer-events: none; font-family: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', sans-serif;
}
.login-card { grid-column: 2; grid-row: 1; width: 100% !important; max-width: 600px; margin: 0 auto; box-sizing: border-box; background: transparent !important; box-shadow: none !important; border-radius: 0 !important; padding: 48px clamp(24px, 5vw, 96px) !important; align-self: center; }
.login-card .login-brand { display: none; }
.login-card h1 { font-size: clamp(36px, 3.4vw, 52px); font-weight: 900; margin: 0 0 8px; letter-spacing: -1.6px; }
.login-card p { font-size: 18px; color: var(--muted); margin: 0 0 18px; }
.login-card label { font-size: 16px; font-weight: 800; margin-top: 18px; }
.login-card input { padding: 15px 16px; font-size: 18px; }
.login-card button[type=submit] { width: 100%; margin-top: 24px; font-size: 19px; padding: 17px 22px; }
#googleLogin { width: 100%; margin-top: 4px; background: #fff !important; color: var(--ink) !important; border: 2px solid var(--ink) !important; border-radius: 10px; font-size: 18px; font-weight: 800; padding: 15px 22px; display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; }
#googleLogin:hover { background: var(--tint) !important; }
#googleLogin svg { width: 22px; height: 22px; }
.google-or { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 15px; font-weight: 700; margin: 22px 0 14px; }
.google-or::before, .google-or::after { content: ""; flex: 1; height: 2px; background: #e0d8cf; }
.login-card a { font-size: 16px; }
.login-help { font-size: 15px; color: var(--muted); }
.login-error { font-size: 15px; }
.forgot-password { font-size: 16px; }
.login-gate .hidden-brand { display: none; }
@media (max-width: 860px) {
  .login-gate { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-gate::before { grid-column: 1; grid-row: 1; padding: 6vh 7vw 4vh; font-size: clamp(32px, 11vw, 64px); height: 26vh; position: static; }
  .login-gate::after { font-size: 260px; left: auto; right: -20px; top: -40px; position: absolute; }
  .login-card { grid-column: 1; grid-row: 2; max-width: none; padding: 28px 7vw 40px !important; align-self: start; }
}

/* ---- Isabel helper: keep it readable ---- */
.chip-panel, .chip-m { font-size: 16px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- Dashboard and other screens that inject their own type styles ---- */
@media (min-width: 981px) {
  .main .db-sec { font-size: var(--ui-text, 15px); font-weight: 900; color: var(--orange-text); letter-spacing: .06em; margin: 20px 0 8px; }
  .main .db-kpis { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: var(--ui-gap, 14px); }
  .main .db-kpi { border: 2px solid var(--line); border-radius: 14px; padding: var(--ui-panel, 18px 20px); }
  .main .db-kpi span { font-size: var(--ui-text, 15px); font-weight: 700; color: var(--muted); }
  .main .db-kpi b { font-size: 2rem; font-weight: 900; letter-spacing: -1px; line-height: 1.1; }
  .main .db-kpi small { font-size: var(--ui-small, 14px); color: var(--muted); }
  .main .db-card { border: 2px solid var(--line); border-radius: 14px; padding: var(--ui-panel, 20px); }
  .main .db-card h3 { font-size: var(--ui-heading-sm, 20px); }
  .main .db-bar, .main .db-fc { font-size: var(--ui-text, 15px); }
  .main .db-fc small, .main .db-list small { font-size: var(--ui-small, 14px); color: var(--muted); }
  .main .db-list li { font-size: var(--ui-text, 16px); padding: var(--ui-row-padding, 12px) 0; }
  .main .db-tag { font-size: 13px; font-weight: 800; }
  .main small { font-size: var(--ui-small, 14px); }
  .main .os-pill, .main .pill { font-size: var(--ui-small, 14px); }
}
