/* © 2026 INFRAMIND INNOVATIVE INFRASTRUCTURES LTD. All rights reserved. Proprietary. */
[hidden] { display: none !important; }
:root {
  --black: #0a0a0a; --dark: #1a1a1a; --grey: #6b6b6b; --line: #e0e0e0;
  --bg: #f5f5f5; --card: #ffffff; --text: #0a0a0a;
  --l0: #9e9e9e; --l1: #d99a00; --l2: #2a7bd4; --l3: #6a4fc9; --l4: #1f8a4c;
  --bad: #c62828; --good: #1f8a4c; --warn: #d99a00;
  --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: inherit; }
h1 { font-size: 22px; margin: 0 0 4px; } h2 { font-size: 16px; margin: 24px 0 8px; }
.muted { color: var(--grey); } .pad { padding: 24px; } .small { font-size: 12px; }
.mono { font-family: 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; }

/* top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; display: flex; align-items: center; gap: 16px;
  background: var(--black); color: #fff; padding: 10px 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: .5px; }
.brand img { height: 26px; background: #fff; border-radius: 4px; padding: 2px; }
.brand small { font-weight: 400; opacity: .7; margin-left: 4px; }
nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
nav a { text-decoration: none; padding: 6px 10px; border-radius: 6px; opacity: .8; }
nav a:hover, nav a.active { background: #2a2a2a; opacity: 1; }
.user { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.user .lang { background: transparent; color: #fff; border: 1px solid #555; border-radius: 4px; padding: 3px 7px; cursor: pointer; }
.link { background: none; border: none; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 20px; margin-left: auto; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  nav, .user { display: none; width: 100%; }
  .topbar.open nav, .topbar.open .user { display: flex; }
  nav { flex-direction: column; }
}

main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 60px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 12px; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.tile { border-left: 4px solid var(--l0); }
.tile .n { font-size: 28px; font-weight: 700; }
.two { grid-template-columns: 1fr 1fr; } @media (max-width: 860px) { .two { grid-template-columns: 1fr; } }

/* tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--grey); background: #fafafa; white-space: nowrap; }
tr.click { cursor: pointer; } tr.click:hover td { background: #fafafa; }
td.num, th.num { text-align: right; }

/* forms */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid #cfcfcf; border-radius: 6px; background: #fff; }
textarea { width: 100%; min-height: 80px; }
label { display: block; font-size: 12px; color: var(--grey); margin: 10px 0 4px; }
label + input, label + select, label + textarea { width: 100%; }
.btn { font: inherit; font-weight: 600; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--black);
  background: var(--black); color: #fff; cursor: pointer; }
.btn.ghost { background: #fff; color: var(--black); }
.btn.good { background: var(--good); border-color: var(--good); }
.btn.bad { background: var(--bad); border-color: var(--bad); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* status level */
.lvl { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; }
.lvl-0 { background: var(--l0); } .lvl-1 { background: var(--l1); } .lvl-2 { background: var(--l2); }
.lvl-3 { background: var(--l3); } .lvl-4 { background: var(--l4); }
.tile.l0 { border-color: var(--l0); } .tile.l1 { border-color: var(--l1); } .tile.l2 { border-color: var(--l2); }
.tile.l3 { border-color: var(--l3); } .tile.l4 { border-color: var(--l4); }
.ladder { display: flex; gap: 4px; margin: 12px 0; }
.ladder div { flex: 1; padding: 8px 6px; border-radius: 6px; background: #eee; color: var(--grey); font-size: 11px; text-align: center; }
.ladder div.on { color: #fff; font-weight: 600; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: #eee; }
.pill.pending { background: #fff3cd; color: #7a5a00; } .pill.approved { background: #d8f0e1; color: #14532d; }
.pill.rejected { background: #fbdada; color: #7f1d1d; }

/* login */
.login { max-width: 380px; margin: 10vh auto; }
.login img { height: 48px; }

/* modal / toast */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal-card { background: #fff; border-radius: 10px; padding: 20px; width: 100%; max-width: 560px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--black); color: #fff; padding: 10px 16px; border-radius: 6px; z-index: 60; max-width: 90vw; }
.toast.err { background: var(--bad); }
.note { background: #fffbe6; border: 1px solid #f0e2a8; padding: 10px 12px; border-radius: 6px; font-size: 13px; }
.ladder div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .ladder { flex-wrap: wrap; } .ladder div { flex: 1 1 30%; } main { padding: 16px 16px 60px; } }
.grid > * { min-width: 0; }
.ip { max-width: 1200px; margin: 0 auto; padding: 16px 16px 28px; font-size: 11px; color: var(--grey); border-top: 1px solid var(--line); }

/* timeline, bell, signature, print */
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 10px; }
.timeline li::before { content: ''; position: absolute; left: -25px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--l0)); border: 2px solid #fff; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; margin: 12px 0; }
.steps div { padding: 8px; border-radius: 6px; background: #eee; font-size: 11px; color: var(--grey); }
.steps div.on { background: var(--good); color: #fff; } .steps div.on b { color: #fff; }
.steps div.late { background: var(--bad); color: #fff; }
.bell { position: relative; background: none; border: 0; color: #fff; font-size: 16px; cursor: pointer; padding: 2px 6px; }
.bell b { position: absolute; top: -4px; right: -4px; background: var(--bad); color: #fff; font-size: 10px; border-radius: 8px; padding: 0 5px; }
.ntf { max-height: 60vh; overflow-y: auto; }
.ntf a { display: block; padding: 10px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.ntf a.new { background: #fffbe6; }
.sigpad { width: 100%; height: 160px; border: 1px dashed #999; border-radius: 6px; background: #fff; touch-action: none; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs figure { margin: 0; width: 140px; }
.thumbs img { width: 140px; height: 100px; object-fit: cover; border-radius: 6px; background: #eee; border: 1px solid var(--line); }
.thumbs figcaption { font-size: 11px; color: var(--grey); overflow-wrap: anywhere; }
.bar { display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: #eee; }
.hbar { display: grid; grid-template-columns: 160px 1fr 50px; gap: 8px; align-items: center; font-size: 12px; margin: 4px 0; }
.hbar > div:nth-child(2) { height: 12px; background: #eee; border-radius: 3px; overflow: hidden; }
.hbar > div:nth-child(2) span { display: block; height: 100%; }
.print-doc { background: #fff; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.print-doc table { font-size: 12px; } .print-doc tbody th { width: 28%; }
.print-doc h3 { font-size: 14px; margin: 18px 0 6px; border-bottom: 1px solid #ccc; padding-bottom: 3px; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 11px; }
  .topbar, .noprint, .ip, .toast, #tourBox, .tour { display: none !important; }
  main { padding: 0; max-width: none; }
  .print-doc { border: 0; padding: 0; }
  .print-doc figure, .print-doc tr { break-inside: avoid; }
  a { text-decoration: none; }
}
