/* GoTechnology Stock — layout familiar to the team: icon sidebar, module tabs, dark table headers */
:root {
  --side: #2a3a47; --side-top: #32495b; --side-hover: #344858; --side-text: #ffffff;
  --accent: #51bde4; --accent-dark: #2f9cc6; --accent-soft: #e8f6fc;
  --navy: #103a55; --head: #2a3a47; --bg: #eef2f4; --topbar: #f3f3f3; --card: #fff;
  --line: #e2e8f0; --line-2: #eef1f4;
  --text: #2a3a47; --strong: #0f172a; --muted: #64748b; --soft: #94a3b8;
  --red: #d83a3f; --red-soft: #fdecec; --del: #bf163c;
  --green: #7fa430; --orange: #ff6f00; --cyan: #24b5d6;
  --radius: 12px; --side-w: 120px; --top-h: 56px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.45 "Oxygen", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
       color: var(--text); background: var(--bg); }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; font-weight: 600; margin: 0; color: var(--text); }
h2 { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.ic { vertical-align: middle; flex: none; }

/* ---------- sidebar (icon above label) ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--side); z-index: 30;
           display: flex; flex-direction: column; overflow-y: auto; }
.side-logo { height: 82px; display: grid; place-items: center; color: #6fd0ef; background: #263441; flex: none; }
.side-nav a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 6px;
              color: var(--side-text); font-size: 13.5px; text-align: center; border-left: 3px solid transparent; }
.side-nav a .ic { color: #c9d4de; }
.side-nav a:hover { background: var(--side-hover); text-decoration: none; }
.side-nav a.active { background: var(--accent); color: #fff; }
.side-nav a.active .ic { color: #fff; }

/* ---------- top bar ---------- */
.topbar { position: fixed; top: 0; left: var(--side-w); right: 0; height: var(--top-h); background: #fff;
          border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 18px; padding: 0 22px; z-index: 20; }
.wordmark { font-size: 26px; font-weight: 300; letter-spacing: .5px; color: #3e4c59; line-height: 1; }
.wordmark small { font-size: 12px; color: var(--accent); margin-left: 4px; letter-spacing: 1px; }
.wordmark:hover { text-decoration: none; }
.topbar .search { flex: 1; max-width: 300px; margin-left: auto; position: relative; }
.topbar .search input { border: 0; background: transparent; font-size: 17px; padding-right: 32px; }
.topbar .search input:focus { outline: none; border-bottom: 1px solid var(--accent); }
.topbar .search .ic { position: absolute; right: 4px; top: 8px; color: #4a5866; }
.company { display: flex; align-items: center; gap: 8px; color: #3e4c59; font-weight: 600; }
.company .ic { color: var(--accent); }
.company small { display: block; font-size: 11px; color: var(--accent); font-weight: 400; line-height: 1; }
.avatar { border: 0; background: #f1f4f7; border-radius: 999px; padding: 6px 12px; font-weight: 700; cursor: pointer;
          color: var(--text); font: inherit; font-weight: 700; }
.caret { color: var(--accent); }
.top-icon { border: 0; background: none; color: #3e4c59; cursor: pointer; padding: 4px; display: grid; place-items: center; }
.top-icon:hover { color: var(--accent); }
.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; top: 42px; background: #fff; border: 1px solid var(--line);
                 border-radius: 6px; box-shadow: 0 10px 28px rgba(0,0,0,.14); min-width: 200px; padding: 6px; z-index: 40; }
.dropdown-menu.right { right: 0; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; color: var(--text);
                 border: 0; background: none; font: inherit; cursor: pointer; border-radius: 4px; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--accent-soft); text-decoration: none; }
.dd-head { padding: 8px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; font-weight: 700; }
.dd-head small { display: block; color: var(--muted); font-weight: 400; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); padding: 4px; }

/* ---------- module tabs ---------- */
.main { margin-left: var(--side-w); padding-top: var(--top-h); min-width: 0; }
.module-bar { display: flex; align-items: center; gap: 16px; padding: 22px 24px 0; }
.module-tabs { display: flex; flex: 1; border-bottom: 1px solid #d9e0e6; overflow-x: auto; }
.module-tabs a { padding: 12px 30px 14px; color: #3e4c59; font-size: 14.5px; text-align: center;
                 border-bottom: 4px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.module-tabs a.active { border-bottom-color: var(--accent); font-weight: 600; }
.module-tabs a:hover { text-decoration: none; color: var(--accent-dark); }
.module-action { display: flex; gap: 8px; }
.content { padding: 20px 24px 40px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.page-head.list h1 { display: none; }
.sub { color: var(--muted); font-size: 13px; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 3px rgba(30,45,60,.08);
        padding: 22px; margin-bottom: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px;
             border-bottom: 1px solid var(--line-2); font-weight: 700; }
.band { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.band > div { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 3px rgba(30,45,60,.08); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 3px rgba(30,45,60,.08);
       border-left: 4px solid var(--accent); color: inherit; display: block; }
.band .kpi { box-shadow: none; border: 1px solid var(--line); border-left: 4px solid var(--accent); }
a.kpi:hover { text-decoration: none; background: #fbfdfe; }
.kpi .v { font-size: 24px; font-weight: 700; line-height: 1.2; }
.kpi .u { font-size: 12.5px; color: var(--muted); }
.kpi .l { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-top: 6px; }
.kpi.k-red { border-left-color: var(--red); } .kpi.k-green { border-left-color: var(--green); }
.kpi.k-orange { border-left-color: var(--orange); }
.v.blue { color: var(--accent-dark); } .v.red { color: var(--red); } .v.green { color: var(--green); } .v.orange { color: var(--orange); }
.status-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.status-card { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: 0 1px 3px rgba(30,45,60,.08);
               color: inherit; display: block; }
.status-card:hover { text-decoration: none; }
.status-card .t { font-weight: 700; } .status-card .amt { font-size: 18px; font-weight: 700; margin: 4px 0; }
.status-card .bar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-top: 8px; }
.status-card .bar i { display: block; height: 100%; }
.summary-box { border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; padding: 12px 2px; }
.summary-box span { font-size: 12px; text-transform: uppercase; color: var(--muted); }
.summary-box b { font-size: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.stat-list div { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.stat-list div:last-child { border: 0; }
.top-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.top-item { text-align: center; border: 1px solid var(--line-2); border-radius: 6px; padding: 10px 8px; }
.top-item .img { height: 60px; display: grid; place-items: center; margin-bottom: 6px; color: #b8c2cc; }
.top-item img { max-height: 60px; max-width: 100%; border-radius: 4px; }
.top-item .n { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-item .q { font-size: 18px; font-weight: 700; }
.chart { width: 100%; height: 240px; }

/* ---------- tables (dark header) ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 700; font-size: 14px; color: #fff; background: var(--head);
     padding: 15px 14px; white-space: nowrap; }
td { padding: 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tbody tr:hover td { background: #f8fbfd; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; background: var(--bg); }
tfoot td { font-weight: 700; background: #f6f8fa; }
.neg { color: var(--red); font-weight: 700; } .pos { color: var(--green); font-weight: 700; }
.zero { color: #b4bcc4; } .low { color: var(--orange); font-weight: 700; }
.opts { white-space: nowrap; text-align: right; }
.opt { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; background: none;
       color: var(--accent); cursor: pointer; border-radius: 4px; vertical-align: middle; }
.opt:hover { background: var(--accent-soft); }
.opt.del { color: var(--red); } .opt.del:hover { background: var(--red-soft); }
.muted-row td { color: var(--muted); }
.amount { color: #8a97a3; }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 3px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.b-paid, .b-accepted, .b-validated { background: #e3f5ec; color: #17845a; }
.b-unpaid, .b-refused { background: var(--red-soft); color: #b42318; }
.b-partial, .b-sent { background: #fff2df; color: #b26205; }
.b-draft { background: #edf1f4; color: #52606d; }
.b-private { background: #f2e8fd; color: #7e22ce; }
.ribbon { display: inline-block; background: #f39c12; color: #fff; padding: 8px 26px 8px 14px; font-weight: 600;
          clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%); }
.ribbon.b-paid { background: #22a06b; } .ribbon.b-unpaid { background: var(--red); }

/* ---------- forms (underlined fields) ---------- */
input, select, textarea { font: inherit; color: inherit; border: 0; border-bottom: 1px solid #c9d2da; border-radius: 0;
                          padding: 8px 4px; background: transparent; width: 100%; min-height: 38px; }
textarea { border: 1px solid #d5dde4; border-radius: 4px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type=checkbox] { width: auto; min-height: 0; accent-color: var(--accent); }
input[readonly] { background: #eef1f4; color: var(--muted); border-radius: 3px; padding-left: 8px; }
label { display: block; font-size: 13px; font-weight: 700; color: #3e4c59; margin-bottom: 2px; }
.field { margin-bottom: 18px; }
.field.check label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.field .err, .errorlist { color: var(--red); font-size: 12.5px; margin: 4px 0 0; padding: 0; list-style: none; }
.help { font-size: 12px; color: var(--muted); margin-top: 3px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 28px; }
.form-title { font-size: 20px; color: #3e4c59; font-weight: 600; }

.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #b9c4ce; background: #fff;
       color: var(--text); border-radius: 6px; padding: 9px 16px; cursor: pointer; font: inherit; font-weight: 600;
       white-space: nowrap; min-height: 40px; }
.btn:hover { border-color: var(--accent); color: var(--accent-dark); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; text-transform: uppercase;
               letter-spacing: .03em; padding: 11px 18px; }
.btn.primary:hover { background: var(--accent-dark); color: #fff; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.green:hover { color: #fff; filter: brightness(.95); }
.btn.danger { color: var(--red); border-color: #f0b8bb; }
.btn.danger:hover { background: var(--red-soft); color: var(--red); }
.btn.sm { padding: 5px 10px; min-height: 32px; font-size: 13px; }
.btn.icon { padding: 6px; min-height: 32px; }
.inline { display: inline; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; padding: 22px 22px 18px; align-items: flex-end; }
.filters input, .filters select { width: auto; min-width: 140px; }
.filters input[name=q] { flex: 1; min-width: 220px; max-width: 380px; margin-right: auto; }
.filters .btn { min-height: 38px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid #d9e0e6; margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 18px; color: #3e4c59; border-bottom: 3px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs a.active { border-bottom-color: var(--accent); font-weight: 700; }
.tabs a:hover { text-decoration: none; }

/* line editor ("Ajouter un article") */
.section-tab { display: inline-block; background: var(--head); color: #fff; font-weight: 700; padding: 10px 46px 10px 26px;
               clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%); margin-bottom: -1px; }
.lines td { padding: 6px; }
.lines input { min-height: 34px; padding: 6px; }
.lines .c-art { min-width: 240px; } .lines .c-num { width: 110px; } .lines .c-small { width: 80px; }
.lines .c-total { width: 120px; text-align: right; font-weight: 700; }
.totals { margin-left: auto; width: 340px; max-width: 100%; }
.totals div { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; gap: 12px; }
.totals .grand { border-top: 2px solid var(--text); font-size: 17px; font-weight: 800; margin-top: 6px; padding-top: 10px; }
.totals input { width: 110px; text-align: right; min-height: 32px; padding: 4px 6px; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(238,242,245,.96); padding: 12px 0;
                  display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); z-index: 5; }

/* messages */
.msg { padding: 11px 16px; border-radius: 6px; margin-bottom: 14px; border-left: 4px solid; background: #fff; }
.msg.success { border-color: var(--green); color: #17643f; }
.msg.error { border-color: var(--red); color: #a3221b; }
.msg.warning { border-color: var(--orange); color: #8a4b03; }
.empty { text-align: center; color: var(--muted); padding: 34px; }
.pager { display: flex; gap: 6px; justify-content: space-between; align-items: center; padding: 14px 20px;
         border-top: 1px solid var(--line-2); color: var(--muted); font-size: 13px; }

/* login */
.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--side); padding: 16px; }
.login-box { background: #fff; border-radius: 8px; padding: 34px; width: 100%; max-width: 380px; }
.login-box .wordmark { display: block; text-align: center; margin-bottom: 26px; }

/* document view */
.doc-bar { background: var(--side); color: #fff; border-radius: 6px 6px 0 0; padding: 10px 14px; display: flex;
           gap: 8px; align-items: center; flex-wrap: wrap; }
.doc-bar .btn { background: transparent; color: #fff; border-color: #5c6f80; }
.doc-bar .btn:hover { border-color: #fff; color: #fff; }
.doc-bar .btn.primary { background: var(--accent); border-color: var(--accent); }
.doc-bar .grow { flex: 1; }
.doc-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.doc-head .meta div { display: flex; gap: 10px; justify-content: space-between; min-width: 240px; padding: 2px 0; }
.doc-head .meta span { color: var(--muted); }

@media (max-width: 900px) {
  :root { --side-w: 0px; }
  .sidebar { width: 120px; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .menu-btn { display: block; }
  .topbar { padding: 0 10px; gap: 8px; }
  .wordmark { font-size: 20px; }
  .wordmark small { display: none; }
  .topbar .search input { font-size: 15px; }
  .module-bar { padding: 12px 10px 0; flex-wrap: wrap; }
  .module-tabs a { padding: 10px 14px 12px; font-size: 13.5px; }
  .module-action { width: 100%; }
  .module-action .btn { flex: 1; justify-content: center; }
  .content { padding: 14px 10px 40px; }
  .band, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .filters { padding: 14px; }
  .filters input, .filters select { min-width: 0; flex: 1 1 140px; }
  .hide-sm { display: none; }
  .totals { width: 100%; }
  th, td { padding: 11px 10px; }
}

/* ---------- print (BL / devis / BR) ---------- */
.print-page { background: #fff; max-width: 820px; margin: 0 auto; padding: 32px; }
.print-bar { max-width: 820px; margin: 16px auto; display: flex; gap: 8px; }
@media print {
  .print-bar { display: none; }
  .print-page { padding: 0; max-width: none; }
  body { background: #fff; }
  @page { size: A4; margin: 14mm; }
}
.print-page th { background: #f1f4f7; color: var(--text); padding: 9px 10px; }
.print-page td { padding: 9px 10px; }
.p-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--accent);
          padding-bottom: 14px; margin-bottom: 18px; }
.p-head img { max-height: 70px; max-width: 200px; }
.p-title { font-size: 24px; font-weight: 800; color: var(--accent-dark); text-align: right; }
.p-parties { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.p-box { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; min-width: 260px; }
.p-box h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; color: var(--muted); }
.p-foot { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 11.5px;
          color: var(--muted); text-align: center; }

/* ===== Placement and look matched to the screens the team uses (see design-notes.md) ===== */
.side-logo { height: 82px; background: var(--side-top); color: var(--accent); }
.side-nav a { padding: 18px 6px; gap: 8px; font-size: 12.5px; font-weight: 500; border-left: 0; }
.side-nav a .ic { color: #fff; width: 27px; height: 27px; }
.side-nav a.active { background: linear-gradient(180deg, #5cc4ea, #3fb0db); }
.topbar { background: var(--topbar); border-bottom: 1px solid #e5e7eb; gap: 22px; }
.wordmark { font-size: 30px; font-weight: 300; color: #3e5566; letter-spacing: .3px; }
.topbar .search { max-width: 280px; margin-left: auto; margin-right: 30px; }
.topbar .search input { font-size: 22px; color: #475569; border: 0; padding: 6px 34px 6px 4px; }
.topbar .search input::placeholder { color: #475569; }
.topbar .search .ic { top: 11px; color: #2b5b6c; }
.company { font-weight: 400; color: var(--text); gap: 10px; }
.company small { font-size: 12px; color: var(--accent); }
.company .ic { color: var(--accent); }
.avatar { background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 700; }
.caret { color: var(--accent); font-weight: 700; }
.top-icon { color: #2b5b6c; }
.module-bar { padding: 14px 24px 0; align-items: flex-end; }
.module-tabs { flex: 0 1 auto; border-bottom: 1px solid var(--line); min-width: 0; }
.module-tabs a { padding: 20px 32px 18px; font-size: 13px; color: #475569; font-weight: 400; }
.module-tabs a.active { font-weight: 400; color: #475569; }
.module-action { margin-left: auto; align-self: center; }
.btn.primary { background: var(--accent); border-color: var(--accent); border-radius: 8px; text-transform: none;
               letter-spacing: 0; font-weight: 400; min-height: 45px; padding: 10px 14px; font-size: 14px; }
.btn.primary.caps { text-transform: uppercase; }
.btn { border: 1px solid var(--navy); color: var(--navy); border-radius: 12px; font-weight: 400; min-height: 40px; }
.btn:hover { background: #f5f9fb; color: var(--navy); border-color: var(--navy); }
.btn.dark { background: var(--navy); color: #fff; border-color: var(--navy); border-radius: 4px; font-weight: 700;
            text-transform: uppercase; min-height: 48px; padding: 10px 22px; }
.btn.dark:hover { color: #fff; filter: brightness(1.1); }
.btn.add { background: var(--accent); color: #fff; border-color: var(--accent); border-radius: 4px; font-weight: 700;
           text-transform: uppercase; min-height: 48px; padding: 10px 26px; }
.btn.add:hover { color: #fff; background: var(--accent-dark); }
.card { box-shadow: none; border-radius: var(--radius); }
.card.flush { padding: 0; }
.list-card { background: #fff; border-radius: var(--radius); padding: 40px 40px 10px; margin-bottom: 20px; }
.list-top { display: flex; justify-content: flex-end; margin-bottom: 30px; }
.list-tools { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.list-tools .q { position: relative; width: 366px; max-width: 100%; margin-right: auto; }
.list-tools .q input { border-bottom: 2px solid #d1d5db; font-size: 15px; padding-right: 30px; }
.list-tools .q .ic { position: absolute; right: 2px; top: 8px; color: #334155; }
.list-tools .btn { min-width: 128px; justify-content: space-between; }
.filter-panel { display: none; gap: 14px; flex-wrap: wrap; padding: 16px; background: #f8fafc; border-radius: 8px; margin-bottom: 18px; }
.filter-panel.open { display: flex; }
.filter-panel > div { min-width: 180px; flex: 1; }
table.hs th { background: var(--head); font-weight: 500; font-size: 14px; padding: 18px 14px; }
table.hs thead tr th:first-child { border-top-left-radius: 4px; }
table.hs thead tr th:last-child { border-top-right-radius: 4px; }
table.hs td { padding: 18px 14px; border-bottom: 1px solid #edf0f3; }
table.hs td.b, table.hs td.b a { color: var(--strong); font-weight: 700; }
table.hs td.m { color: var(--soft); }
table.hs .sort { color: #64748b; font-size: 11px; margin-left: 6px; }
table.hs .chk { width: 40px; }
.badge { background: transparent !important; border: 1px solid currentColor; border-radius: 4px; font-weight: 400; font-size: 14px; padding: 2px 8px; }
.b-paid, .b-accepted, .b-validated { color: var(--green) !important; }
.b-partial, .b-sent { color: var(--orange) !important; }
.b-unpaid, .b-refused { color: var(--red) !important; }
.b-draft { color: #64748b !important; }
.b-private { color: #7e22ce !important; }
.opt { color: var(--accent); width: 34px; height: 34px; }
.opt.del { color: var(--del); }
.status-cards { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin-bottom: 32px; }
.status-card { border-radius: 8px; padding: 18px 24px 18px; box-shadow: 0 0 0 1px #e5e9ee; }
.status-card .t { font-size: 18px; font-weight: 600; padding-bottom: 8px; border-bottom: 2px solid currentColor; margin-bottom: 18px; }
.status-card .amt { font-size: 30px; font-weight: 700; color: #32495b !important; margin: 0 0 22px; }
.status-card .meta { display: flex; justify-content: space-between; font-weight: 600; color: #32495b; }
.status-card .bar { height: 12px; border-radius: 6px; background: #eef1f4; margin-top: 18px; }
.status-card .bar i { border-radius: 6px; min-width: 8px; }
.page-title { font-size: 26px; font-weight: 600; color: #4b6070; margin: 6px 0 18px; }
.form-card { background: #fff; border-radius: var(--radius); padding: 26px 26px 20px; margin-bottom: 18px; border: 1px solid #e5e9ee; }
.ul-input input, .ul-input select, input.ul, select.ul { border: 0; border-bottom: 1px solid #cfd6dd; border-radius: 0; font-size: 17px; }
.section-tab { background: var(--navy); font-size: 18px; padding: 12px 60px 10px 130px; border-bottom: 4px solid var(--accent);
               clip-path: polygon(0 0, 100% 0, 97% 100%, 0 100%); }
.total-ttc { background: var(--navy); color: #fff; border-radius: 4px; display: flex; justify-content: space-between;
             align-items: center; padding: 16px 22px; font-size: 18px; font-weight: 700; margin-top: 18px; }
.total-ttc span:first-child { color: var(--accent); }
.round-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; border: 0; }
.addr { color: #64748b; font-size: 13px; line-height: 1.6; }
.addr b { color: var(--text); font-size: 15px; }
.lines-table th { background: transparent; color: #64748b; font-weight: 400; border-bottom: 1px solid #cbd5e1; text-align: center; }
.lines-table td { text-align: center; }
.lines-table td:first-child, .lines-table th:first-child { text-align: left; }
.tot-row { display: flex; justify-content: flex-end; align-items: center; gap: 18px; padding: 8px 0; }
.tot-row label { margin: 0; color: #64748b; font-weight: 400; font-size: 14px; min-width: 90px; text-align: right; }
.tot-row .val { font-size: 18px; font-weight: 700; min-width: 140px; }
.tot-row input { width: 140px; font-size: 17px; font-weight: 700; }
.tot-row.shade { background: #f1f4f6; }

/* side panel (fiche) */
.panel-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 50; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(900px, 100%); background: #fff; z-index: 51;
         overflow-y: auto; box-shadow: -8px 0 30px rgba(0,0,0,.2); }
.panel-bar { position: sticky; top: 0; z-index: 2; background: var(--side); height: 80px; display: flex; align-items: center;
             gap: 10px; padding: 0 20px; }
.panel-bar .doc-type { border: 1px solid var(--accent); color: #fff; border-radius: 8px; padding: 10px 16px; font-size: 14px; }
.panel-bar .grow { flex: 1; }
.panel-bar .pi { color: var(--accent); display: grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; }
.panel-bar .btn.primary { min-height: 46px; }
.panel-bar .btn.outline-light { border-color: var(--accent); color: #fff; background: transparent; border-radius: 8px; }
.panel-bar .btn.outline-light:hover { background: rgba(255,255,255,.08); color: #fff; }
.panel-close { position: fixed; top: 46px; right: min(900px, 100%); transform: translateX(50%); z-index: 52; width: 52px; height: 52px;
               border-radius: 50%; background: var(--side); border: 3px solid var(--accent); color: #fff; font-size: 26px;
               display: grid; place-items: center; line-height: 1; }
.panel-close:hover { text-decoration: none; color: #fff; }
.panel-body { padding: 0 20px 40px; }
.ribbon { margin-left: -20px; margin-top: 24px; padding: 12px 40px 12px 18px; font-size: 15px; font-weight: 400;
          clip-path: polygon(0 0, 100% 0, 88% 50%, 100% 100%, 0 100%); }
.ribbon.b-partial { background: var(--orange); color: #fff !important; }
.ribbon.b-paid { background: var(--green); color: #fff !important; }
.ribbon.b-unpaid { background: var(--red); color: #fff !important; }
.doc-num { color: var(--accent); font-size: 20px; font-weight: 700; }
.doc-party { color: var(--accent); font-size: 20px; font-weight: 700; }
.zebra tbody tr:nth-child(odd) td { background: #f3f4f6; }
.zebra th { background: #fff; color: #475569; font-weight: 400; border-bottom: 1px solid var(--line); padding: 10px; white-space: normal; }
.zebra td { padding: 14px 10px; color: var(--text); }
.zebra td a { color: var(--accent); font-weight: 600; }
.section-title { display: flex; align-items: center; gap: 16px; color: var(--accent); font-size: 22px; margin: 40px 0 10px; }
.section-title::after { content: ""; flex: 1; height: 2px; background: var(--accent); }

/* reports */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, 280px); gap: 20px; }
.report-card { background: #fff; border-radius: 4px; color: var(--text); display: block; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.report-card .thumb-area { height: 205px; display: grid; place-items: center; border-bottom: 1px solid var(--line); color: #b0bac4; font-size: 60px; font-weight: 200; }
.report-card .name { padding: 22px 20px; font-size: 16px; }
.report-card:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.matrix th, .matrix td { border: 1px solid #e5e7eb; padding: 12px 10px; white-space: nowrap; font-size: 13.5px; }
.matrix th { background: var(--head); }
.matrix tfoot td { font-weight: 700; }
.year-select { width: auto; font-size: 22px; color: #94a3b8; border-bottom: 2px solid #cbd5e1; }

@media (max-width: 900px) {
  .list-card { padding: 16px 12px 6px; }
  .list-tools .q { width: 100%; }
  .list-tools .btn { min-width: 0; flex: 1; }
  .module-tabs a { padding: 14px 14px 12px; }
  .status-cards { gap: 12px; }
  .section-tab { padding: 10px 40px 8px 20px; }
  .panel-close { top: 10px; right: 10px; transform: none; }
  .wordmark { font-size: 22px; }
  .topbar .search { margin-right: 0; }
  .topbar .search input { font-size: 15px; }
}
@media (max-width: 900px) {
  .doc-head-grid, .doc-foot-grid { grid-template-columns: 1fr !important; }
  .doc-head-grid > div:nth-child(2) { flex-direction: row !important; padding: 0 !important; }
  #entry > div[style*="grid"] { grid-template-columns: 1fr 1fr !important; gap: 0 16px !important; }
  .entry-actions { grid-template-columns: 1fr 1fr !important; }
  .entry-actions > div:first-child { grid-column: 1 / -1; }
  .form-2col { grid-template-columns: 1fr !important; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
[hidden] { display: none !important; }
/* brand: GoTechnology logo + STOCK */
.mark-tile { width: 68px; height: 56px; border-radius: 10px; background: #fff; display: grid; place-items: center; }
.wordmark { display: inline-flex; align-items: center; font-family: Ubuntu, "Segoe UI", Arial, sans-serif; font-weight: 700;
            font-size: 26px; letter-spacing: -.5px; line-height: 1; }
.wordmark .go { color: #63696a; } .wordmark .tech { color: #00788f; }
.wordmark .stock-pill { margin-left: 10px; font-size: 12px; letter-spacing: 3px; color: #fff; padding: 5px 10px 5px 16px; border-radius: 999px;
  background: linear-gradient(105deg, #d4673a 0, #f2b55f 14px, #00788f 15px); }
@media (max-width: 900px) { .wordmark { font-size: 18px; } .wordmark .stock-pill { font-size: 10px; padding: 4px 8px 4px 12px; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
