:root {
  --ink: #1c2430;
  --muted: #6b7785;
  --line: #e2e7ee;
  --bg: #f5f7fa;
  --card: #fff;
  --brand: #1f5eff;
  --brand-dark: #1746c4;
  --ok: #10754b;
  --err: #b42318;
  --warn-bg: #fff6e6;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand a {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.2px;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--brand); }

.topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topbar nav a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
}
.topbar nav a:hover { background: #eef2f8; text-decoration: none; color: var(--ink); }
.topbar nav a.on { background: #e8efff; color: var(--brand-dark); font-weight: 600; }

.who { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.who .name { color: var(--muted); }
.who form { margin: 0; }

main { padding: 26px 32px 40px; max-width: 1220px; margin: 0 auto; }
main.solo { display: flex; align-items: center; justify-content: center; min-height: 80vh; }
main.with-nav { display: block; }

h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -0.3px; }
h2 { font-size: 16px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 18px 0 6px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0; }
.stat { padding: 16px 18px; }
.stat .num { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }
.stat .lbl { color: var(--muted); font-size: 13px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .topbar { height: auto; flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
  main { padding: 18px 16px 32px; }
}

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
}
.table td { padding: 10px; border-bottom: 1px solid #f0f3f7; vertical-align: top; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafbfd; }
.table.compact td, .table.compact th { padding: 7px 8px; }
.right { text-align: right; }

.fields { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.fields dt { color: var(--muted); }
.fields dd { margin: 0; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.list { margin: 0; padding-left: 18px; font-size: 14px; color: #33404f; }

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 99px;
  background: #eef6f1;
  color: var(--ok);
  border: 1px solid #cfe8db;
}
.tag.inactive { background: #fdecea; color: var(--err); border-color: #f7d4d1; }

.chip {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 99px;
  background: #eef2f8;
  color: #33404f;
}
.chip.role-admin { background: #eae6ff; color: #4a3bb5; }
.chip.role-hr { background: #e6f4ff; color: #0b6390; }
.chip.role-manager { background: #fff3e0; color: #8a5200; }

.btn {
  display: inline-block;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: #f3f6fb; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; font-size: 13px; }
button.link { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; font-family: inherit; }
button.link:hover { color: var(--err); text-decoration: underline; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.row-between h1 { margin: 0; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 16px; }
.filters input[type=search] { flex: 1; min-width: 220px; }

input, select {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input:focus, select:focus { outline: 2px solid #c9daff; border-color: var(--brand); }

.stack { display: grid; gap: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid label { display: grid; gap: 5px; font-size: 13px; color: #33404f; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; margin-top: 6px; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

.login-wrap { width: 100%; max-width: 420px; }
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
.login-card { padding: 26px; }
.login-card label { display: grid; gap: 6px; font-size: 13px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.flash.ok { background: #eaf7f0; color: var(--ok); border: 1px solid #cfe8db; }
.flash.err { background: #fdecea; color: var(--err); border: 1px solid #f7d4d1; }

.timeline { margin: 0 0 6px; padding-left: 18px; font-size: 14px; }
.timeline li { margin-bottom: 6px; }

.sensitive { border-color: #f0d9b5; background: var(--warn-bg); }

.org-tree, .org-tree ul { list-style: none; margin: 0; padding-left: 18px; }
.org-tree { padding-left: 0; }
.org-tree li { position: relative; padding: 4px 0 4px 0; }
.org-tree ul { border-left: 1px dashed #cfd7e3; margin-left: 10px; }
.org-person {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}
.org-person:hover { border-color: var(--brand); text-decoration: none; }

.ask-card { padding: 18px; }
.ask-form { display: flex; gap: 10px; }
.ask-form input { flex: 1; font-size: 15px; padding: 11px 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-link {
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 99px;
  background: #f1f4f9;
  border: 1px solid var(--line);
  color: #33404f;
}
.chip-link:hover { background: #e8efff; border-color: #c9daff; text-decoration: none; }

.answer { border-left: 4px solid var(--brand); }
.answer.refused { border-left-color: var(--err); background: #fffbfb; }
.answer .q { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.answer .a { font-size: 16px; margin: 0 0 8px; white-space: pre-line; }

.error-card { max-width: 560px; text-align: center; }
.error-card h1 { font-size: 44px; color: var(--err); }

.inline { display: flex; gap: 6px; align-items: center; }
.inline select { width: auto; }

.foot { text-align: center; color: #98a3b0; font-size: 12px; padding: 10px 0 26px; }

code { background: #f1f4f9; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }

/* --- calendar concedii --- */
.cal-wrap { overflow-x: auto; }
table.cal { border-collapse: collapse; font-size: 0.78rem; }
table.cal th, table.cal td { padding: 3px 4px; text-align: center; border: 1px solid var(--line, #e6e6e6); }
table.cal .cal-name { text-align: left; white-space: nowrap; padding-right: 10px; }
table.cal th.cal-day { min-width: 22px; font-weight: 500; }
table.cal td.cal-day.we, table.cal th.cal-day.we { background: #f6f6f6; }
table.cal td.cal-day.on-aprobat { background: #2f7d4f; color: #fff; font-weight: 600; }
table.cal td.cal-day.on-asteptare { background: #f3e2a9; color: #6a4b00; font-weight: 600; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* organigrama: grupuri de posturi si sumarul structurii de personal */
.tag.warn { background: #fdf3e3; color: #9a5b00; border-color: #f2ddb9; }
.org-group > details > summary {
  cursor: pointer;
  font-size: 13px;
  color: #33404f;
  padding: 4px 0;
}
.org-group > details > summary::marker { color: var(--brand); }
.org-leaf { padding-left: 0; }
