:root {
  --blue: #1d3a5f;        /* Zedaxis navy */
  --blue-dark: #14293f;
  --blue-deep: #10213b;
  --orange: #f4551f;      /* Zedaxis orange */
  --orange-dark: #d8430f;
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1f2a3a;
  --muted: #6b7a90;
  --line: #e5eaf1;
  --green: #1e9e57;
  --red: #d64545;
  --amber: #b97a08;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(20, 40, 80, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Mulish', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 40;
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
}
.topbar .logo-img img { height: 44px; border-radius: 6px; display: block; }
.login-card .logo { text-align: center; margin-bottom: 24px; }
.topbar form.search { flex: 1; max-width: 420px; margin: 0 auto; }
.topbar form.search input {
  width: 100%; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff;
}
.topbar .userchip { margin-left: auto; text-align: right; line-height: 1.2; display: flex; align-items: center; gap: 10px; }
.topbar .userchip .name { font-weight: 800; }
.topbar .userchip .role { background: #16233b; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 8px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: #dfe7f1; color: var(--blue-dark);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: none;
}
.avatar.lg { width: 120px; height: 120px; font-size: 36px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 800;
  border-radius: 10px; padding: 10px 18px; text-decoration: none !important;
}
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); }
.btn-blue { background: var(--blue-deep); color: #fff; }
.btn-white { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-danger { background: #fff; color: var(--red); border: 1px solid #f0caca; }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed; top: 64px; bottom: 0; left: 0; width: 232px; z-index: 30;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff; padding: 14px 10px; overflow-y: auto;
}
.sidebar a {
  display: flex; align-items: center; gap: 12px; color: #eaf1f9; padding: 11px 14px;
  border-radius: 10px; font-weight: 700; text-decoration: none !important; margin-bottom: 2px;
}
.sidebar a:hover { background: rgba(255, 255, 255, .12); }
.sidebar a.active { background: rgba(10, 40, 80, .45); color: #fff; }
.sidebar a .ico { width: 20px; text-align: center; opacity: .9; }
.sidebar .badge { margin-left: auto; background: var(--orange); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; }

/* ---------- layout ---------- */
.main { margin: 64px 0 0 232px; padding: 28px 32px 60px; min-height: calc(100vh - 64px); }
.page-title { font-size: 24px; font-weight: 900; margin: 0 0 20px; display: flex; align-items: center; gap: 12px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 2fr 1fr; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } .main { margin-left: 0; padding: 20px 14px; } .sidebar { display: none; } }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.card h2 { font-size: 16px; font-weight: 800; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.card h2 .spacer { margin-left: auto; font-size: 13px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- tables ---------- */
table.list { width: 100%; border-collapse: collapse; }
table.list th {
  text-align: left; font-size: 12.5px; text-transform: none; color: var(--text);
  background: #f2f5f9; padding: 10px 12px; font-weight: 800; border-bottom: 1px solid var(--line);
}
table.list td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: #fafcff; }
.name-cell { display: flex; align-items: center; gap: 12px; }
.name-cell .nm { font-weight: 800; }
.name-cell .sub { color: var(--muted); font-size: 13px; }
.tag { display: inline-block; background: #16233b; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 8px; font-weight: 700; }
.tag.lite { background: #eef2f8; color: var(--blue-dark); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.pill.approved, .pill.active { background: #e2f5ea; color: var(--green); }
.pill.pending { background: #fdf1dc; color: var(--amber); }
.pill.declined, .pill.cancelled, .pill.inactive { background: #fbe7e7; color: var(--red); }

/* ---------- forms ---------- */
label.fld { display: block; margin-bottom: 14px; font-weight: 700; font-size: 13.5px; }
label.fld input, label.fld select, label.fld textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: inherit;
  border: 1px solid #ccd6e3; border-radius: 10px; background: #fff;
}
.form-row { display: flex; gap: 16px; } .form-row > * { flex: 1; }
.alert { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600; }
.alert.ok { background: #e2f5ea; color: var(--green); }
.alert.warn { background: #fdf1dc; color: var(--amber); }
.alert.err { background: #fbe7e7; color: var(--red); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #eef3fa, #f9fafc); }
.login-card { background: #fff; border-radius: 16px; box-shadow: 0 8px 40px rgba(20, 40, 80, .12); padding: 44px 40px; width: 420px; }
.login-card .logo { text-align: center; font-size: 28px; font-weight: 900; color: var(--blue-deep); margin-bottom: 28px; }
.login-card .logo span { color: var(--orange); }
.login-card .btn { width: 100%; padding: 13px; font-size: 15px; }

/* ---------- profile ---------- */
.profile-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .profile-layout { grid-template-columns: 1fr; } }
.profile-side { text-align: center; }
.profile-side .nm { font-size: 21px; font-weight: 900; margin-top: 14px; }
.profile-side .meta { text-align: left; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.profile-side .meta div { margin-bottom: 8px; color: var(--text); font-size: 14px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a {
  padding: 10px 16px; font-weight: 800; color: var(--muted); border-bottom: 3px solid transparent;
  margin-bottom: -2px; text-decoration: none !important;
}
.tabs a.on { color: var(--text); border-color: var(--blue); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.kv .item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv .item .k { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.kv .item .v { font-weight: 700; margin-top: 2px; }

/* ---------- budget cards ---------- */
.budget-row { display: flex; gap: 16px; flex-wrap: wrap; }
.budget-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; width: 150px; text-align: center; }
.budget-card .ico { font-size: 22px; }
.budget-card .t { font-weight: 800; margin: 6px 0; }
.budget-card .n { font-size: 13px; color: var(--muted); }
.budget-card .big { font-size: 20px; font-weight: 900; color: var(--blue-dark); }

/* ---------- calendar ---------- */
.cal-scroll { overflow-x: auto; }
table.cal { border-collapse: collapse; min-width: 100%; }
table.cal th, table.cal td { border: 1px solid var(--line); padding: 4px; text-align: center; font-size: 12px; }
table.cal th.day { min-width: 30px; font-weight: 700; color: var(--muted); }
table.cal th.day.wknd, table.cal td.wknd { background: #f2f5f9; }
table.cal td.hol { background: #fdf1dc; }
table.cal td .blk { border-radius: 6px; padding: 2px 0; font-size: 11px; font-weight: 800; color: #fff; }
.blk.vacation { background: var(--orange); } .blk.sick { background: #8656c9; }
.blk.pending { opacity: .5; } .blk.other { background: var(--blue); }
td.emp-name { text-align: left !important; white-space: nowrap; padding: 6px 10px !important; font-weight: 800; font-size: 13px !important; }

/* ---------- docs ---------- */
.doc-row-icon { font-size: 18px; }
.folder-chip { display: inline-flex; align-items: center; gap: 8px; background: #eef2f8; border-radius: 10px; padding: 8px 14px; font-weight: 800; color: var(--blue-dark); text-decoration: none !important; margin: 0 8px 8px 0; }
.folder-chip:hover { background: #e2e9f4; }

.actions form { display: inline; }
.mini-bar { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 8px; }
.mini-bar .bar { flex: 1; background: var(--blue); border-radius: 4px 4px 0 0; position: relative; min-width: 22px; }
.mini-bar .bar .v { position: absolute; top: -18px; width: 100%; text-align: center; font-size: 11px; font-weight: 800; }
.mini-bar .bar .l { position: absolute; bottom: -20px; width: 100%; text-align: center; font-size: 10.5px; color: var(--muted); }
.hol-item { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hol-item:last-child { border-bottom: 0; }
.hol-date { background: #fdeee0; color: var(--orange-dark); border-radius: 10px; padding: 6px 10px; text-align: center; font-weight: 900; font-size: 12px; line-height: 1.1; min-width: 44px; }
