:root {
  --navy: #0f1e3d; --navy2: #1a2f5a; --gold: #d4a017; --gold-soft: #fdf6e3;
  --bg: #f4f6f9; --card: #fff; --text: #131820; --muted: #5b6472; --border: #e2e6ec;
  --blue: #1e40af; --green: #15803d; --green-soft: #e8f6ed; --red: #b91c1c; --red-soft: #fdecec; --amber-soft: #fff7e0;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--text); background: var(--bg); -webkit-text-size-adjust: 100%; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Butoane și câmpuri */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 10px 16px; font-weight: 600; cursor: pointer; text-decoration: none; color: var(--text); min-height: 44px; }
.btn:hover { border-color: #b9c1cd; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn.danger { color: var(--red); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; }
label.field { display: block; margin: 0 0 12px; font-size: 14px; font-weight: 600; }
label.field span.hint { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=month], input[type=time], select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid #cfd5de; border-radius: 10px; background: #fff; min-height: 44px; font-weight: 400;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; margin: 8px 0 14px; }
.check input { width: 20px; height: 20px; margin-top: 1px; flex: none; }
.msg { padding: 10px 14px; border-radius: 10px; margin: 10px 0; font-size: 14px; }
.msg.ok { background: var(--green-soft); color: var(--green); }
.msg.err { background: var(--red-soft); color: var(--red); }
.msg.warn { background: var(--amber-soft); color: #7a5300; }
.msg ul { margin: 6px 0 0; padding-left: 18px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }

/* Prima pagină */
.site-head { background: var(--navy); color: #fff; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.logo b { display: block; font-size: 17px; }
.logo small { display: block; color: var(--gold); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.logo .mark { width: 40px; height: 40px; border-radius: 10px; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-weight: 800; }
.hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy2) 100%); color: #fff; padding: 56px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 40px; letter-spacing: -.02em; }
.hero p.lead { font-size: 18px; color: #d7deeb; max-width: 560px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero .note { color: #aab6cc; font-size: 13px; margin-top: 10px; }
.phone { background: #fff; color: var(--text); border-radius: 26px; padding: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.35); max-width: 330px; margin: 0 auto; border: 8px solid #1d2b4a; }
.phone .ph-top { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 8px; }
.phone .ph-site { font-weight: 700; margin-bottom: 8px; }
.ph-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--border); font-size: 14px; }
.ph-row .box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #c4cbd6; flex: none; }
.ph-row .box.on { background: var(--green); border-color: var(--green); position: relative; }
.ph-row .box.on::after { content: ''; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ph-row .h { margin-left: auto; font-weight: 600; }
.ph-row .tag { margin-left: auto; font-size: 12px; background: #e8edf7; color: var(--blue); padding: 2px 8px; border-radius: 99px; font-weight: 600; }
.ph-save { margin-top: 10px; background: var(--navy); color: #fff; text-align: center; border-radius: 10px; padding: 10px; font-weight: 700; }
section.block { padding: 56px 0; }
section.block h2 { font-size: 28px; text-align: center; }
section.block p.sub { text-align: center; color: var(--muted); max-width: 680px; margin: 0 auto 30px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.step .num { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; display: grid; place-items: center; margin-bottom: 10px; }
.feat h3 { font-size: 17px; }
.feat p { margin: 0; color: var(--muted); font-size: 14px; }
.price { text-align: center; position: relative; }
.price.best { border: 2px solid var(--gold); }
.price .badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--navy); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.price .amount { font-size: 36px; font-weight: 800; color: var(--navy); }
.price .amount small { font-size: 15px; font-weight: 600; color: var(--muted); }
.price ul { text-align: left; padding-left: 18px; font-size: 14px; color: var(--muted); }
.faq details { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--muted); }
.signup { background: var(--navy); color: #fff; }
.signup .card { color: var(--text); }
.signup h2 { color: #fff; }
section.block.signup p.sub { color: #c9d2e3; }
.site-foot { background: #0a1530; color: #aab6cc; font-size: 13px; padding: 26px 0; }
.site-foot a { color: #fff; }
.site-foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Aplicația */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--navy); color: #fff; }
.topbar .in { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 14px; max-width: 1400px; margin: 0 auto; }
.topbar .firm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .firm small { display: block; font-weight: 400; color: #aab6cc; font-size: 12px; }
.topbar .sp { flex: 1; }
.topbar button.link { background: none; border: 0; color: #d7deeb; cursor: pointer; font-size: 14px; }
.tabs { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 58px; z-index: 25; }
.tabs .in { display: flex; gap: 2px; overflow-x: auto; max-width: 1400px; margin: 0 auto; padding: 0 8px; scrollbar-width: none; }
.tabs a { padding: 14px 14px 12px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; font-size: 15px; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--gold); }
main.app { max-width: 1400px; margin: 0 auto; padding: 18px 14px 120px; }
.banner { padding: 10px 14px; text-align: center; font-size: 14px; }
.banner.trial { background: var(--gold-soft); color: #6b4e00; }
.banner.expired { background: var(--red-soft); color: var(--red); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.toolbar label.field { margin: 0; min-width: 150px; }
.toolbar .grow { flex: 1; min-width: 200px; }
h2.page { font-size: 22px; margin: 4px 0 14px; }

/* Bifajul zilei */
.day-head { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.day-head .arrow { min-width: 44px; }
.day-head input[type=date] { margin: 0; flex: 1; max-width: 200px; }
.day-info { font-size: 13px; margin: -4px 0 10px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.people { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.person { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.person:last-child { border-bottom: 0; }
.person .tick { width: 30px; height: 30px; border-radius: 8px; border: 2px solid #c4cbd6; background: #fff; cursor: pointer; position: relative; padding: 0; }
.person .tick.on { background: var(--green); border-color: var(--green); }
.person .tick.on::after { content: ''; position: absolute; left: 9px; top: 3px; width: 8px; height: 15px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.person .tick.abs { background: #e8edf7; border-color: var(--blue); color: var(--blue); font-size: 11px; font-weight: 800; }
.person .nm { min-width: 0; }
.person .nm b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .nm small { color: var(--muted); font-size: 12px; display: block; }
.person .nm .elsewhere { color: var(--blue); font-weight: 600; }
.person .ctl { display: flex; gap: 6px; align-items: center; }
.person .hrs { width: 74px; text-align: center; margin: 0; padding: 8px 4px; }
.person .absbtn { min-width: 44px; padding: 6px 8px; }
.person.dirty { background: #fffbea; }
.person.locked { opacity: .65; }
.group-title { padding: 10px 12px; background: #f6f8fb; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--border); }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--border); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px rgba(15,30,61,.08); }
.savebar .in { max-width: 900px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.savebar .sum { flex: 1; font-size: 14px; }
.savebar .btn { min-width: 150px; }

/* Tabele */
.tablewrap { overflow: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
table.list { border-collapse: collapse; width: 100%; font-size: 14px; }
table.list th, table.list td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
table.list th { background: #f6f8fb; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
table.list tr.off td { color: #9aa3b1; }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.sheet { border-collapse: separate; border-spacing: 0; font-size: 12px; font-variant-numeric: tabular-nums; }
table.sheet th, table.sheet td { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 5px 4px; text-align: center; min-width: 30px; white-space: nowrap; }
table.sheet th { background: var(--navy); color: #fff; font-weight: 600; position: sticky; top: 0; z-index: 2; }
table.sheet th small { display: block; font-weight: 400; color: #aab6cc; font-size: 10px; }
table.sheet th.we { background: #56637d; }
table.sheet td.we { background: #eef1f5; }
table.sheet td.code { color: var(--blue); font-weight: 700; font-size: 11px; }
table.sheet .name { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; min-width: 170px; padding-left: 8px; }
table.sheet th.name { background: var(--navy); z-index: 3; }
table.sheet td.tot { font-weight: 700; background: #f6f8fb; }
table.sheet tr.total td { font-weight: 700; background: #f6f8fb; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #e8edf7; color: var(--blue); margin: 2px 4px 2px 0; }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.green { background: var(--green-soft); color: var(--green); }
.bar { height: 8px; background: #e8edf3; border-radius: 99px; overflow: hidden; min-width: 90px; }
.bar i { display: block; height: 100%; background: var(--green); }
.bar i.over { background: var(--red); }

/* Ferestre */
.modal { position: fixed; inset: 0; background: rgba(10,20,40,.5); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.modal .box { background: #fff; width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.codes .btn { justify-content: flex-start; text-align: left; }
.codes .btn b { min-width: 34px; color: var(--blue); }
.sites-check { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 80; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 92vw; }
.empty { text-align: center; padding: 30px 14px; color: var(--muted); }

@media (min-width: 700px) {
  .modal { align-items: center; }
  .modal .box { border-radius: 16px; }
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
  .grid3, .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 359px) {
  .person { grid-template-columns: 32px 1fr; }
  .person .ctl { grid-column: 2; }
}
@media (max-width: 520px) {
  .person .hrs { width: 62px; }
  .person .absbtn { padding: 6px; font-size: 13px; }
  .hide-sm { display: none; }
  .topbar .firm small { display: none; }
}
@media print {
  .topbar, .tabs, .toolbar, .savebar, .banner { display: none !important; }
  main.app { padding: 0; }
}

/* Etapa zilei la pontaj: ciornă → trimis → aprobat → plătit */
.stage { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.stage .muted { margin-left: auto; }
.pill.st-ciorna { background: #eef0f3; color: #4b5563; }
.pill.st-trimis { background: #fff4d6; color: #7a5300; }
.pill.st-aprobat { background: var(--green-soft); color: var(--green); }
.pill.st-platit { background: #e8edf7; color: var(--blue); }
.grow { flex: 1; }
