/* Al Khaleej Elevators — one small stylesheet.
   Colours are design tokens; light and dark themes swap the tokens only.
   Layout uses logical properties (margin-inline-start etc.) so Arabic RTL mirrors automatically. */

/* IBM Plex Sans (Latin) and IBM Plex Sans Arabic, served from this site (SIL Open Font License). */
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-latin-400.77bc02670657.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-latin-500.f7016cd446d2.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-latin-600.196e3cbc5fee.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/plex-sans-latin-700.c277d7b83f8a.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plex-arabic-400.4fa3d81d41ab.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plex-arabic-500.106892212ea7.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plex-arabic-600.64891a810259.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans Arabic"; src: url("../fonts/plex-arabic-700.a4390abc98c2.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #f1f3f0;
  --text: #1d2220;
  --text-muted: #5f6862;
  --border: #e1e4e0;
  --border-strong: #cfd5ce;
  --sidebar: #1b211d;
  --sidebar-hover: #262d28;
  --sidebar-text: #c7cdc9;
  --sidebar-muted: #8f9892;
  --track: #e6e9e5;
  --brand: #1f7a3a;          /* logo green */
  --brand-strong: #155c2a;
  --brand-contrast: #ffffff;
  --accent-soft: #e3f1e6;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --warning: #8a5a00;
  --warning-soft: #fff3d6;
  --info: #1c5a8a;
  --info-soft: #e5f0fa;
  --focus: #1f7a3a;
  --radius: 18px;
  --shadow: none;
  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", "Tahoma", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121513; --surface: #1b1f1c; --surface-2: #242a26; --text: #e8ece9; --text-muted: #a6afa8;
    --border: #2f3632; --border-strong: #3d4540; --sidebar: #0d100e; --sidebar-hover: #1d2320; --sidebar-text: #c7cdc9;
    --sidebar-muted: #7f8882; --track: #2a312d; --brand: #4cb86a; --brand-strong: #6fd08a; --brand-contrast: #0c1a10;
    --accent-soft: #1f3526; --danger: #ff8a80; --danger-soft: #3a1d1b; --warning: #ffcc66;
    --warning-soft: #3a2f14; --info: #8cc4f0; --info-soft: #182b3a; --focus: #8ab4f8; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121513; --surface: #1b1f1c; --surface-2: #242a26; --text: #e8ece9; --text-muted: #a6afa8;
  --border: #2f3632; --border-strong: #3d4540; --sidebar: #0d100e; --sidebar-hover: #1d2320; --sidebar-text: #c7cdc9;
  --sidebar-muted: #7f8882; --track: #2a312d; --brand: #4cb86a; --brand-strong: #6fd08a; --brand-contrast: #0c1a10;
  --accent-soft: #1f3526; --danger: #ff8a80; --danger-soft: #3a1d1b; --warning: #ffcc66;
  --warning-soft: #3a2f14; --info: #8cc4f0; --info-soft: #182b3a; --focus: #8ab4f8; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.5; }
a { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: -999px; }
.skip-link:focus { inset-inline-start: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }

/* App shell: a dark sidebar menu on computers; on phones and tablets it becomes a top bar with a Menu button. */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); }
.sidebar-inner { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 18px 12px; gap: 20px; }
.sidebar-head { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 2px 6px; min-width: 0; }
.brand-logo { background: #fff; border-radius: 10px; padding: 5px; display: flex; flex: none; }
.brand-logo img { width: 40px; height: 32px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text b { font-size: .95rem; }
.brand-text small { color: var(--sidebar-muted); font-size: .75rem; white-space: nowrap; }
.menu-toggle { display: none; margin-inline-start: auto; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px;
  border-radius: 8px; border: 1px solid #454b47; background: transparent; color: #fff; font: inherit; cursor: pointer; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav > a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 12px; border-radius: 8px;
  color: var(--sidebar-text); text-decoration: none; font-weight: 500; font-size: .92rem; }
.nav > a:hover { background: var(--sidebar-hover); color: #fff; }
.nav > a[aria-current="page"] { background: var(--brand); color: var(--brand-contrast); }
.icon { width: 18px; height: 18px; flex: none; }
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid #3a3f3c; display: flex; flex-direction: column; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--brand-contrast); display: inline-flex;
  align-items: center; justify-content: center; font-weight: 600; font-size: .85rem; flex: none; }
.me-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.me-text b { color: #fff; font-size: .9rem; }
.me-text small { color: var(--sidebar-muted); font-size: .75rem; }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tools form { display: contents; }
.tool { min-height: 36px; padding: 4px 10px; border-radius: 8px; border: 1px solid #454b47; background: transparent;
  color: var(--sidebar-text); font: inherit; font-size: .82rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; width: auto; }
.tool:hover { background: var(--sidebar-hover); color: #fff; }
select.tool { padding-inline-end: 24px; }
select.tool option { color: var(--text); background: var(--surface); }
.main-col { min-width: 0; }

@media (max-width: 1023px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; z-index: 5; }
  .sidebar-inner { position: static; height: auto; padding: 10px 16px; gap: 0; overflow: visible; }
  .menu-toggle { display: inline-flex; }
  .nav { display: none; padding-top: 10px; }
  .nav.open { display: flex; }
  .main-col { padding: 16px; }
}

/* Layout */
main { padding: 16px; }
.main-col { padding: 28px 36px 48px; max-width: 1440px; width: 100%; margin: 0; }
@media (max-width: 1023px) { .main-col { padding: 16px; } }
.main-plain { max-width: 1280px; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block: 8px 16px; }
.page-head h1 { font-size: 1.6rem; margin: 0; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
.page-head .actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
/* Counters on the home page: as many per row as fit, never one left alone. */
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.card h2 { font-size: 1rem; font-weight: 600; margin: 0 0 12px; }
.muted { color: var(--text-muted); }
.stat { font-size: 2.1rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); font-weight: 600; }
.btn-primary:hover { background: var(--brand-strong); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-small { min-height: 36px; padding: 4px 10px; font-size: .9rem; }
form.inline { display: inline; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 11px 14px; border-block-end: 1px solid var(--border); text-align: start; vertical-align: middle; }
th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; background: var(--surface); }
[lang="ar"] th { letter-spacing: 0; text-transform: none; font-size: .85rem; }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Numbers read left-to-right in Arabic too (keeps "−4,000.00" and "5%" in order); aligned to the end. */
td.num { direction: ltr; }
[dir="rtl"] td.num { text-align: left; }
tr:hover td { background: var(--surface-2); }
.totals td { font-weight: 600; }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); white-space: nowrap; }
.badge-good { background: var(--accent-soft); color: var(--brand-strong); border-color: transparent; }
.badge-warn { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-bad { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-info { background: var(--info-soft); color: var(--info); border-color: transparent; }

/* Forms */
.form-grid { display: grid; gap: 12px 16px; }
@media (min-width: 768px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .wide { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; margin-block-end: 4px; }
.field .help { font-size: .85rem; color: var(--text-muted); }
.field .errorlist, .errorlist { color: var(--danger); margin: 4px 0; padding: 0; list-style: none; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url],
input[type=search], input[type=file], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); font: inherit; }
textarea { min-height: 60px; }
input[type=checkbox] { width: 20px; height: 20px; }
.checkbox-list ul, ul.checkbox-list { list-style: none; padding: 0; margin: 0; }
.checkbox-list li label { font-weight: 400; display: flex; gap: 8px; align-items: center; min-height: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 12px; align-items: end; }
.filters > * { flex: 1 1 160px; }
.filters .btn { flex: 0 0 auto; }

/* Messages */
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { padding: 12px 16px; border-radius: 8px; margin-block-end: 8px; background: var(--info-soft); color: var(--info); }
.messages li.success { background: var(--accent-soft); color: var(--brand-strong); }
.messages li.error { background: var(--danger-soft); color: var(--danger); }
.messages li.warning { background: var(--warning-soft); color: var(--warning); }

/* Line editor */
.line-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-block-end: 12px; background: var(--surface); }
.line-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1024px) { .line-grid { grid-template-columns: repeat(6, 1fr); } .line-grid .span-2 { grid-column: span 2; } .line-grid .span-3 { grid-column: span 3; } }
.line-grid .field label { font-size: .85rem; }
.line-total { font-weight: 700; text-align: end; }
.sticky-totals { position: sticky; bottom: 0; background: var(--surface); border-block-start: 1px solid var(--border); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.sticky-totals .actions { margin-inline-start: auto; display: flex; gap: 8px; }

.pagination { display: flex; gap: 8px; align-items: center; margin-block-start: 12px; }
dl.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.details dt { color: var(--text-muted); }
dl.details dd { margin: 0; }
.login-box { max-width: 380px; margin: 10vh auto; }
main.main-plain:has(.login-split) { max-width: none; padding: 0; }
.rtl-text { direction: rtl; text-align: right; }

/* Home page */
.home-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-block: 0 22px; }
.home-head .date { font-size: .85rem; color: var(--text-muted); }
.home-head h1 { margin: 2px 0 0; font-size: 1.8rem; font-weight: 700; letter-spacing: -.01em; }
.home-head .actions { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-block-end: 20px; }
@media (max-width: 600px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .tiles .card { padding: 14px; } .tile .stat { font-size: 1.7rem; } }
.tile { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
a.tile:hover { border-color: var(--border-strong); }
.tile .label { font-size: .85rem; color: var(--text-muted); }
.tile .note { font-size: .78rem; color: var(--text-muted); }
.tile .note.good { color: var(--brand-strong); font-weight: 600; }
.tile.warn { background: var(--warning-soft); border-color: transparent; }
.tile.warn .label, .tile.warn .stat, .tile.warn .note { color: var(--warning); }
.row { display: flex; flex-wrap: wrap; gap: 16px; margin-block-end: 20px; align-items: flex-start; }
.row > .wide { flex: 2 1 520px; min-width: 0; }
.row > .narrow { flex: 1 1 260px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; }
.card-head h2 { margin: 0; }
.card-head a { font-size: .85rem; }
.card.flush table { background: transparent; }
.card.flush tr:last-child td { border-block-end: 0; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-label { display: flex; justify-content: space-between; font-size: .85rem; margin-block-end: 5px; }
.bar { height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 5px; background: var(--brand); }
.bar.mid > span { background: #5aa36e; }
.bar.low > span { background: var(--sidebar-muted); }
.pipeline { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 20px 18px; }
.pipeline .stage { flex: 1 1 120px; min-width: 0; background: var(--surface-2); border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text); }
.pipeline .stage .n { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pipeline .stage .t { font-size: .78rem; font-weight: 600; color: var(--text-muted); }
.pipeline .stage.zero .n { color: var(--sidebar-muted); }
.pipeline .stage.lead { background: var(--brand); color: var(--brand-contrast); }
.pipeline .stage.lead .t { color: var(--brand-contrast); opacity: .85; }
.pipeline .stage.done { background: var(--accent-soft); }
.pipeline .stage.done .n, .pipeline .stage.done .t { color: var(--brand-strong); }
.steps { display: inline-flex; align-items: center; gap: 3px; }
.steps i { width: 16px; height: 6px; border-radius: 3px; background: var(--track); }
.steps i.on { background: var(--brand); }
.steps + small { margin-inline-start: 8px; color: var(--text-muted); font-size: .78rem; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .85rem; }
.sub { display: block; font-size: .78rem; color: var(--text-muted); }

/* Login page */
.login-split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-art { background-color: var(--brand-strong); background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 14px, transparent 14px 34px);
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.login-art .brand-logo { width: max-content; padding: 10px; border-radius: 14px; }
.login-art .brand-logo img { width: 96px; height: 78px; }
.login-art h2 { font-size: 2.2rem; line-height: 1.15; margin: 0; max-width: 16ch; }
.login-art p { margin: 0; color: #d6ecdc; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: var(--bg); }
.login-form .card { width: 100%; max-width: 400px; padding: 28px; }
@media (max-width: 767px) { .login-split { grid-template-columns: minmax(0, 1fr); } .login-art { padding: 24px 16px; } .login-art h2 { font-size: 1.5rem; } }

/* Links inside tables and card headers: no underline until hovered. */
td a, .card-head a, .tile { text-decoration: none; }
td a:hover, .card-head a:hover { text-decoration: underline; }
td a b { font-weight: 600; }

/* Agents office */
.agent-order { display: flex; flex-direction: column; gap: 8px; margin-block-end: 16px; }
.agent-order-row { display: flex; gap: 8px; flex-wrap: wrap; }
.agent-order-row input[type="text"] { flex: 1 1 280px; min-width: 0; }
.agent-stage { margin-block-end: 16px; overflow-x: auto; }
.agent-stage svg { display: block; width: 100%; min-width: 640px; height: auto; background: var(--surface-2); }
.agent-link { stroke: var(--border-strong); stroke-width: 1.5; stroke-dasharray: 3 5; fill: none; animation: agent-flow 1.4s linear infinite; }
.agent-hub { fill: var(--sidebar); stroke: var(--border-strong); }
.agent-hub-t { font: 800 11px var(--font); letter-spacing: .14em; fill: #9aa8a0; }
.agent-hub-n { font: 600 14px var(--font); fill: #e9b84f; }
.agent-dept { cursor: pointer; }
.agent-dept .agent-top { stroke: rgba(255,255,255,.3); stroke-width: 1; }
.agent-dept:hover .agent-top, .agent-dept:focus-visible .agent-top { stroke: var(--text); stroke-width: 2; }
.agent-glow { display: none; fill: none; stroke: #e0b04a; stroke-width: 2.5; }
.agent-dept.has-pending .agent-glow { display: block; animation: agent-pulse 1.6s ease-in-out infinite; }
.agent-label { fill: var(--surface); stroke: var(--border-strong); }
.agent-l1 { font: 700 12px var(--font); fill: var(--text); }
.agent-l2 { font: 500 10.5px var(--font); fill: var(--text-muted); }
.agent-warn { font: 600 10px var(--font); fill: #1a1405; }
.agent-desk .screen { opacity: .35; }
.agent-desk.on .screen { opacity: 1; }
.agent-desk.on { animation: agent-bob 1.3s ease-in-out infinite; }
.agent-list { list-style: none; margin: 0; padding: 0 20px 8px; }
.agent-list li { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; padding: 12px 0; border-block-start: 1px solid var(--border); }
.agent-list p { margin: 4px 0 0; }
.agent-decide { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.agent-decide input[type="text"] { width: 150px; }
@keyframes agent-flow { to { stroke-dashoffset: -16; } }
@keyframes agent-pulse { 50% { opacity: .25; } }
@keyframes agent-bob { 50% { transform: translateY(-1.5px); } }
@media (prefers-reduced-motion: reduce) { .agent-link, .agent-glow, .agent-desk { animation: none !important; } }

/* ---- Finances overview ---- */
.fin-period { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-block-end: 16px; }
.fin-kpis { margin-block-end: 16px; }
.fin-delta { font-size: .9rem; font-weight: 600; margin-block-start: 4px; }
.fin-delta.up { color: var(--brand-strong); }
.fin-delta.down { color: var(--danger); }
.fin-delta.neutral { color: var(--text); }
.fin-neg { color: var(--danger); }
.fin-chart svg { width: 100%; height: auto; display: block; }
.fin-grid { stroke: var(--border); stroke-width: 1; }
.fin-axis { fill: var(--text-muted); font-size: 11px; }
.fin-bar.fin-income, .fin-key.fin-income, .fin-track i.fin-income { background: var(--brand); fill: var(--brand); }
.fin-bar.fin-expense, .fin-key.fin-expense, .fin-track i.fin-expense { background: var(--info); fill: var(--info); }
.fin-legend { display: flex; gap: 16px; margin-block-start: 8px; align-items: center; }
.fin-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
.fin-row { display: grid; grid-template-columns: minmax(90px, 1.2fr) 2fr auto; gap: 10px; align-items: center; padding: 6px 0; }
.fin-track { display: block; height: 10px; background: var(--track); border-radius: 6px; overflow: hidden; }
.fin-track i { display: block; height: 100%; border-radius: 6px; }
.fin-row2 { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-block-end: 1px solid var(--border); }
.fin-pending { border-inline-start: 4px solid var(--warning); }
@media (max-width: 640px) { .fin-row { grid-template-columns: 1fr auto; } .fin-track { grid-column: 1 / -1; order: 3; } }

@media (max-width: 640px) { .hide-sm { display: none; } }


/* ==== New look (Nov 2026): softer rounded cards with light shadows, cleaner dark sidebar. Same colours, same logo. ==== */
.card { border-color: transparent; border-radius: 18px; padding: 22px; box-shadow: 0 1px 2px rgba(20,30,24,.05), 0 8px 24px rgba(20,30,24,.05); }
.card h2 { font-size: 1.06rem; font-weight: 600; }
.btn { border-radius: 12px; font-weight: 500; border-color: var(--border-strong); }
.btn-primary { border-color: var(--brand); font-weight: 600; }
.btn-small { border-radius: 10px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url],
input[type=search], input[type=file], select, textarea { border-radius: 12px; border-color: var(--border-strong); }
.page-head h1 { font-size: 1.75rem; }
th { background: var(--surface-2); }
th, td { padding: 13px 16px; }
.badge { padding: 4px 12px; }
.messages li { border-radius: 14px; }
.line-card { border-radius: 16px; }
.pipeline .stage { border-radius: 14px; }
.bar { border-radius: 999px; }
.bar > span { border-radius: 999px; }

/* Sidebar */
.sidebar-inner { padding: 20px 14px; gap: 22px; }
.brand-logo { border-radius: 12px; padding: 3px; }
.nav { gap: 4px; }
.nav > a { min-height: 44px; padding: 0 14px; border-radius: 12px; font-size: .92rem; }
.nav > a[aria-current="page"] { font-weight: 600; }
.sidebar-foot { border-top: 0; padding-top: 0; }
.me-menu > summary { list-style: none; cursor: pointer; padding: 12px; border-radius: 14px; background: var(--sidebar-hover); }
.me-menu > summary::-webkit-details-marker { display: none; }
.me-menu .tools { margin-top: 10px; }
.tool { border-radius: 10px; }
.menu-toggle { border-radius: 12px; }

/* Home page */
.home-head h1 { font-size: 1.75rem; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-block-end: 20px; }
@media (max-width: 600px) { .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .stat-card .stat { font-size: 1.35rem; } }
.stat-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; padding: 20px 22px; }
.stat-card .label { font-size: .85rem; font-weight: 500; color: var(--text-muted); }
.stat-card .stat { font-size: 1.9rem; }
.stat-card .note { font-size: .8rem; font-weight: 600; }
.chip { align-self: flex-start; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--text); }
.chip.good { background: var(--accent-soft); color: var(--brand-strong); }
.chip.bad { background: var(--danger-soft); color: var(--danger); }
.chip.warn { background: var(--warning-soft); color: var(--warning); }
.chip.info { background: var(--info-soft); color: var(--info); }
.stat-card.green { background: var(--brand); color: var(--brand-contrast); box-shadow: 0 8px 24px rgba(31,122,58,.25); }
.stat-card.green .label, .stat-card.green .note { color: var(--brand-contrast); opacity: .88; }
.card-head.plain { padding: 0 0 14px; }
.attention { display: flex; flex-direction: column; gap: 10px; }
.attention a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); text-decoration: none; color: var(--text); }
.attention a > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.attention small { color: var(--text-muted); font-size: .85rem; }
.attention .badge { flex: none; border-color: transparent; }
.month-bars { display: flex; align-items: flex-end; gap: 14px; height: 170px; }
.month-bars > div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.month-bars i { width: 100%; min-height: 4px; border-radius: 10px 10px 4px 4px; background: var(--brand); }
.month-bars span { font-size: .8rem; color: var(--text-muted); }
.tiles .card { border-radius: 18px; }
.login-form .card { border-radius: 22px; }
.row > .half { flex: 1 1 340px; min-width: 0; align-self: stretch; }
