/* Evidenta Tiruri - culori identice cu fisierul Excel */
:root {
  --navy: #1F3864; --hdr: #2F5496; --blue: #2F75B5; --red: #C00000; --green: #00963C; --mov: #7030A0;
  --sect-blue: #D9E1F2; --sect-red: #FCE4D6; --sect-mov: #E4DFEC;
  --box-green: #C6EFCE; --box-search: #FFF2CC; --search-border: #BF8F00;
  --txt-grey: #595959; --hint: #808080; --st-ok: #006100;
  --grid: #BFBFBF; --zebra: #F2F2F2; --xl: #217346;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif; font-size: 15px; color: #000; background: #fff;
  padding-bottom: 48px;
}
a { color: inherit; }
.inline { display: inline; margin: 0; }
form.contents { display: contents; }
.bold { font-weight: bold; }
.upper { text-transform: uppercase; }

/* ---------- bara de sus (stil Excel) ---------- */
.topbar {
  background: var(--xl); color: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 6px 12px; gap: 10px; flex-wrap: wrap; position: sticky; top: 0; z-index: 20;
}
.brand { font-weight: bold; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.logo { background: #fff; color: var(--xl); font-weight: 900; border-radius: 3px; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tbtn, .tsel { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 3px;
  padding: 4px 10px; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.tsel option { color: #000; }
.tbtn:hover { background: rgba(255,255,255,.28); }
.who { font-size: 13px; opacity: .9; }

/* ---------- foaia ---------- */
.sheet { padding: 14px 16px 24px; overflow-x: auto; }
.bar-title {
  background: var(--navy); color: #fff; font-size: 26px; font-weight: bold; text-align: center;
  padding: 8px 10px; min-height: 48px; display: flex; align-items: center; justify-content: center;
}
.bar-title.plate { font-size: 52px; min-height: 84px; letter-spacing: 1px; }
.bar-title.mid { font-size: 21px; min-height: 38px; margin-top: 18px; }
.legend { font-style: italic; color: var(--txt-grey); padding: 4px 2px 8px; font-size: 14px; }
.hint { color: var(--hint); font-style: italic; font-size: 14px; }
.small-hint { color: var(--txt-grey); font-style: italic; font-size: 12px; line-height: 1.35; }
.none { color: var(--hint); font-style: italic; text-align: left !important; }
.alert { padding: 8px 12px; margin: 8px 0; border-radius: 2px; white-space: pre-line; font-weight: bold; }
.alert.err { background: #FFC7CE; color: #9C0006; border: 1px solid #F4A6B0; }
.alert.ok { background: var(--box-green); color: var(--st-ok); border: 1px solid #9FD9AE; }

/* ---------- tabele ---------- */
table.xl { border-collapse: collapse; background: #fff; }
table.xl th, table.xl td { border: 1px solid var(--grid); padding: 3px 8px; text-align: center; vertical-align: middle; height: 30px; }
table.xl thead th { background: var(--hdr); color: #fff; font-weight: bold; border-color: #fff; }
table.xl thead th.big { font-size: 17px; height: 32px; }
table.xl thead th.head-dark { background: var(--hdr); font-size: 15px; }
table.xl thead tr.sub th { background: var(--sect-blue); color: #000; border-color: var(--grid); }
table.xl tr.zebra td { background: var(--zebra); }
td.nr { font-weight: bold; font-size: 16px; }
td.nr a { text-decoration: underline; color: #0563C1; }
.c-exp { background: #C00000 !important; color: #fff !important; font-weight: bold; }
.c-soon { background: #FF9696 !important; color: #820000 !important; font-weight: bold; }
.c-ok { background: #C6EFCE !important; color: #006100 !important; }
.c-warn { background: #FFEB9C !important; color: #9C5700 !important; }

/* Evidenta */
.ev-wrap { display: flex; gap: 28px; align-items: flex-start; }
.ev-left { flex: 0 0 auto; }
table.ev { min-width: 1100px; }
table.ev .w-nr { width: 135px; } table.ev .w-firm { width: 135px; } table.ev .w-days { width: 180px; }
table.ev td { height: 30px; font-size: 15px; }
.ev-right { width: 230px; flex: 0 0 230px; padding-top: 52px; }
.ev-right form { display: flex; flex-direction: column; gap: 8px; }
.lbl-navy { color: var(--navy); font-weight: bold; }
.capture { display: inline-block; background: #fff; padding: 0; }
.shot-tools { display: flex; gap: 10px; margin-bottom: 12px; }

/* TIR */
.page-tir { max-width: 980px; }
.firmbar { background: var(--sect-blue); color: var(--navy); font-weight: bold; font-size: 20px; text-align: center; padding: 6px; }
table.tirdocs, table.tirparts { width: 100%; margin-top: 12px; }
table.tirdocs th.doc { font-size: 30px; height: 58px; color: #fff; }
table.tirdocs th.d1 { background: #2F75B5; } table.tirdocs th.d2 { background: #548235; }
table.tirdocs th.d3 { background: #BF8F00; } table.tirdocs th.d4 { background: #C55A11; }
table.tirdocs th.corner { background: #fff; border-color: var(--grid); }
table.tirdocs th.rowh { background: #fff; color: #000; text-align: right; font-size: 17px; padding-right: 12px; width: 150px; }
table.tirdocs td { font-size: 15px; height: 34px; }
table.tirdocs td.f16 { font-size: 20px; }
table.tirparts td { font-size: 17px; height: 30px; }
table.tirparts thead tr.sub th { font-size: 17px; }

/* Ore / Inventar */
.two-col { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; margin-top: 14px; }
.two-col table td { font-size: 16px; min-width: 90px; }
table.inv { min-width: 860px; }
table.inv td { font-size: 16px; }
table.inv td.stock { font-size: 19px; font-weight: bold; }
table.xl thead tr.head-dark-row th { background: var(--hdr); color: #fff; height: 36px; }
table.users { width: 100%; margin-top: 12px; }
.uacts { white-space: nowrap; text-align: left !important; }
.page-users { max-width: 1100px; }
.urow { display: flex; gap: 10px; margin: 10px 0 4px; max-width: 640px; }
.urow .box-green { flex: 1; }

/* ---------- Panou ---------- */
.panou { width: 1360px; max-width: 100%; }
.langline { display: flex; align-items: center; gap: 12px; margin: 12px 0 6px; padding-left: 0; }
.lbl-lang { font-weight: bold; font-size: 17px; width: 194px; text-align: right; }
.lang-sel { width: 194px; background: #E4DFEC !important; }
.sect {
  display: grid; grid-template-columns: 194px 194px 194px 159px 124px minmax(220px, 1fr);
  column-gap: 6px; row-gap: 4px; margin-top: 16px; align-items: center;
}
.sect-bar { grid-row: 1; font-size: 18px; font-weight: bold; padding: 4px 10px; min-height: 34px; display: flex; align-items: center; }
.sect-bar.blue { background: var(--sect-blue); color: var(--navy); }
.sect-bar.redb { background: var(--sect-red); color: var(--red); }
.sect-bar.movb { background: var(--sect-mov); color: var(--mov); }
.gB { grid-column: 1; } .gC { grid-column: 2; } .gD { grid-column: 3; } .gE { grid-column: 4; } .gF { grid-column: 5; } .gG { grid-column: 6; }
.gB-G { grid-column: 1 / -1; } .gC-D { grid-column: 2 / 4; } .gD-G { grid-column: 3 / -1; } .gF-G { grid-column: 5 / -1; }
.r1 { grid-row: 2; } .r2 { grid-row: 3; } .r3 { grid-row: 4; }
.hd { font-weight: bold; font-size: 14px; color: var(--txt-grey); text-align: center; align-self: end; }
.status { font-size: 14px; line-height: 1.3; white-space: pre-line; }
.st-ok { color: var(--st-ok); font-weight: bold; }
.st-err { color: var(--red); font-weight: bold; }

/* casete */
.box-green, .box-list, .box-search {
  font: inherit; font-size: 17px; height: 42px; width: 100%; text-align: center; text-align-last: center;
  border-radius: 0; padding: 2px 6px; color: #000;
}
.box-green { background: var(--box-green); border: 2.5px solid var(--green); font-weight: bold; }
.box-search { background: var(--box-search); border: 2.5px solid var(--search-border); font-weight: bold; }
.box-list { background: #fff; border: 2.5px solid var(--blue); cursor: pointer; }
.box-list.blue { border-color: var(--blue); }
.box-list.red { border-color: var(--red); }
.box-list.mov { border-color: var(--mov); }
.box-green:focus, .box-list:focus, .box-search:focus { outline: 2px solid #000; outline-offset: 1px; }
.box-green.code { font-size: 28px; letter-spacing: 6px; height: 56px; }
input.date::-webkit-calendar-picker-indicator { cursor: pointer; }
.srch-wrap { position: relative; display: grid; grid-template-columns: 1fr 1fr; column-gap: 6px; }
.srch-pop {
  position: absolute; top: 44px; left: 0; right: -170px; z-index: 30; background: #fff; border: 2px solid var(--search-border);
  box-shadow: 0 6px 18px rgba(0,0,0,.25); max-height: 320px; overflow-y: auto;
}
.srch-pop .srch-h { background: var(--sect-blue); font-weight: bold; font-size: 13px; padding: 4px 8px; position: sticky; top: 0; }
.srch-pop .srch-i { display: grid; grid-template-columns: 2fr 1.2fr .6fr; gap: 6px; padding: 7px 8px; cursor: pointer; border-bottom: 1px solid #eee; }
.srch-pop .srch-i:hover, .srch-pop .srch-i.sel { background: var(--box-search); }
.srch-pop .srch-n { padding: 8px; color: var(--hint); font-style: italic; }

/* butoane (forme rotunjite din Excel) */
.btn {
  font: inherit; font-size: 17px; font-weight: bold; color: #fff; border: 0; border-radius: 7px; padding: 6px 12px;
  min-height: 40px; cursor: pointer; box-shadow: 1px 2px 3px rgba(0,0,0,.3); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; text-align: center; line-height: 1.1;
}
.btn:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.btn.green { background: var(--green); } .btn.red { background: var(--red); } .btn.mov { background: var(--mov); }
.btn.grey { background: #7F7F7F; } .btn.orange { background: #C55A11; }
.btn.small { font-size: 13px; min-height: 30px; padding: 4px 10px; }
.btn.tall { min-height: 52px; }

/* ---------- tab-uri jos (ca in Excel) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 40px; background: #F3F3F3; border-top: 1px solid #C8C8C8;
  display: flex; align-items: stretch; gap: 2px; padding: 0 8px; overflow-x: auto; z-index: 20;
}
.tab {
  display: flex; align-items: center; padding: 0 16px; text-decoration: none; color: #222; font-size: 14px; white-space: nowrap;
  background: #fff; border: 1px solid #C8C8C8; border-top: 0; border-bottom: 4px solid transparent; margin-top: -1px;
}
.tab.t-evidenta { border-bottom-color: var(--navy); } .tab.t-ore { border-bottom-color: var(--mov); }
.tab.t-panou { border-bottom-color: var(--green); } .tab.t-inventar { border-bottom-color: #BF8F00; }
.tab.t-tir { border-bottom-color: var(--hdr); }
.tab.active { font-weight: bold; color: var(--xl); background: #fff; box-shadow: inset 0 3px 0 var(--xl); }
.shot-status { position: fixed; right: 16px; bottom: 54px; background: var(--st-ok); color: #fff; padding: 10px 14px;
  border-radius: 4px; font-weight: bold; z-index: 40; box-shadow: 0 3px 10px rgba(0,0,0,.3); max-width: 420px; }

/* ---------- logare ---------- */
body.auth { background: #F3F3F3; padding-bottom: 0; }
.authbox { max-width: 460px; margin: 8vh auto; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.15); }
.authin { padding: 22px 26px 26px; }
.authin h1 { font-size: 22px; color: var(--navy); margin: 0 0 14px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid #DADCE0; border-radius: 4px;
  padding: 11px; font-size: 17px; font-weight: bold; color: #3C4043; text-decoration: none; background: #fff; }
.gbtn:hover { background: #F8F9FA; }
.langrow { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.langrow select { width: 90px; height: 36px; }
.qr { display: flex; justify-content: center; margin: 8px 0; }
.qr svg { width: 210px; height: 210px; }
.secret { font-size: 15px; background: var(--zebra); padding: 2px 6px; word-break: break-all; }
.who2 { font-weight: bold; color: var(--txt-grey); margin-top: -8px; }
.tfaform { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

/* ---------- telefon ---------- */
@media (max-width: 900px) {
  .sheet { padding: 10px 8px 24px; }
  .ev-wrap { flex-direction: column-reverse; }
  .ev-right { padding-top: 0; width: 100%; flex: none; }
  .sect { grid-template-columns: 1fr; }
  .sect > *, .sect form.contents > * { grid-column: 1 !important; grid-row: auto !important; }
  /* pe telefon: fiecare eticheta sta deasupra casetei ei */
  .sect .gB.r1 { order: 11; } .sect .gB.r2 { order: 12; } .sect .gB.r3 { order: 13; }
  .sect .gC.r1 { order: 21; } .sect .gC.r2 { order: 22; } .sect .gC.r3 { order: 23; }
  .sect .gC-D.r1, .sect .gC-D.r2 { order: 22; }
  .sect .gD.r1 { order: 31; } .sect .gD.r2 { order: 32; }
  .sect .gE.r1 { order: 41; } .sect .gE.r2 { order: 42; }
  .sect .gF.r2 { order: 52; }
  .sect .gD-G, .sect .gF-G, .sect .gG { order: 90; }
  .sect .gB-G.r3 { order: 95; }
  .sect .sect-bar { order: 0; }
  .ev-left { max-width: 100%; overflow-x: auto; }
  #s5 .gD.r1 { display: none; }
  .srch-wrap { grid-template-columns: 1fr; row-gap: 6px; }
  .srch-pop { right: 0; top: 100%; }
  .hd { text-align: left; margin-top: 4px; }
  .lbl-lang { width: auto; }
  .panou { width: 100%; }
  .bar-title { font-size: 20px; }
  .bar-title.plate { font-size: 36px; }
  .who { display: none; }
}

/* logare cu parola */
.pwform { display: flex; flex-direction: column; gap: 10px; }
.pwform label { display: flex; flex-direction: column; gap: 4px; font-weight: bold; color: var(--txt-grey); font-size: 14px; }
.box-green.left { text-align: left; font-weight: normal; }
.orline { display: flex; align-items: center; gap: 10px; color: var(--hint); margin: 16px 0; }
.orline::before, .orline::after { content: ""; flex: 1; border-top: 1px solid #ddd; }
.alert.ok { word-break: break-all; }
.openmode { background: #FFEB9C; color: #9C5700; font-weight: bold; font-size: 13px; padding: 4px 10px; border-radius: 3px; }
