/* Expert Media — HR & Performance */
:root {
  /* Brand: Expert Media — petrol → cyan */
  --petrol: #0e5f78;
  --petrol-d: #0a3f52;
  --petrol-dd: #072d3b;
  --petrol-l: #e4f3f7;
  --accent: #1aa6c4;
  --accent-l: #5fd3ea;
  --ink: #15242b;
  --muted: #5d6f78;
  --line: #dde7ea;
  --bg: #f3f6f7;
  --card: #ffffff;
  --green: #1a7f4b;  --green-l: #e5f5ec;
  --amber: #a85f00;  --amber-l: #fdf1df;
  --blue: #1f5fbf;   --blue-l: #e6effc;
  --red: #b42318;    --red-l: #fdecea;
  --gray: #55646b;   --gray-l: #eef2f3;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(6,54,64,.05), 0 4px 14px rgba(6,54,64,.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.65; }
a { color: var(--petrol); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: 1.55rem; color: var(--petrol-d); }
h2 { font-size: 1.08rem; color: var(--petrol-d); }
p { margin: 0 0 .6em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 22px; padding-bottom: 30px; min-height: calc(100vh - 140px); }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.nowrap { white-space: nowrap; }
.d-block { display: block; }
.text-red { color: var(--red); font-weight: 700; }
.spacer { flex: 1; }

/* ---------- Top bar ---------- */
.topbar { background: linear-gradient(110deg, var(--petrol-dd) 0%, var(--petrol-d) 35%, var(--petrol) 75%, #1488a6 100%); color: #fff; position: sticky; top: 0; z-index: 20;
  box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.topbar-in { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; color: #fff; line-height: 1.1; }
.brand:hover { text-decoration: none; }
.brand small { font-size: .68rem; opacity: .75; direction: ltr; text-align: right; margin-top: 2px; }
.logo-text { font-family: "Montserrat", "Cairo", sans-serif; font-weight: 700; font-size: 1.05rem; direction: ltr; color: #fff; }
.logo-text b { color: var(--accent-l); font-weight: 700; }
.logo-img { height: 38px; width: auto; display: block; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: #d7ecf0; padding: 8px 12px; border-radius: 8px; white-space: nowrap; font-weight: 600; font-size: .93rem; }
.nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.nav a.active { background: rgba(255,255,255,.16); color: #fff; }
.who { display: flex; align-items: center; gap: 10px; }
.who-name { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.who-name b { font-size: .88rem; }
.who-name span { font-size: .74rem; opacity: .75; }
.who form { margin: 0; }
.who-link { font: inherit; font-size: .84rem; color: #d7ecf0; background: transparent; border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.who-link:hover, .who-link.active { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }

@media (max-width: 860px) {
  .topbar-in { gap: 8px 12px; padding-top: 8px; padding-bottom: 6px; }
  .brand { order: 1; }
  .who { order: 2; margin-inline-start: auto; }
  .who-name { display: none; }
  .nav { order: 3; flex-basis: 100%; }
}

/* ---------- Page head ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin-bottom: 2px; }
.page-head p { margin: 0; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Cards / grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card.narrow { max-width: 480px; }
.card.empty { text-align: center; padding: 36px 18px; color: var(--muted); }
.empty-inline { color: var(--muted); margin: 0 0 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-wide-first { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-wide-first { grid-template-columns: minmax(0, 1fr); } }

.collapsible summary { cursor: pointer; list-style: none; }
.collapsible summary::-webkit-details-marker { display: none; }
.collapsible summary h2 { display: inline; margin: 0; }
.collapsible[open] summary { margin-bottom: 14px; }
.collapsible summary::after { content: "▾"; float: left; color: var(--muted); }
.collapsible[open] summary::after { content: "▴"; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; color: var(--ink); }
a.stat:hover { border-color: var(--accent); text-decoration: none; }
.stat span { color: var(--muted); font-size: .86rem; }
.stat em { color: var(--red); font-style: normal; font-weight: 700; }
.stat b { font-size: 1.7rem; color: var(--petrol-d); line-height: 1.3; }
.stat-money b { font-size: 1.25rem; }
.money-line { display: block; }
.money-big { font-size: 1.3rem; font-weight: 800; color: var(--petrol-d); margin-bottom: 8px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; font-size: .92rem;
  background: var(--petrol); color: #fff; border: 1px solid var(--petrol); border-radius: 9px; padding: 8px 18px; cursor: pointer;
  transition: background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { background: var(--petrol-d); border-color: var(--petrol-d); text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: var(--petrol); }
.btn-outline:hover { background: var(--petrol-l); color: var(--petrol-d); }
.btn-danger { background: transparent; color: var(--red); border-color: #f0c4bf; }
.btn-danger:hover { background: var(--red-l); color: var(--red); border-color: var(--red); }
.btn-sm { padding: 4px 12px; font-size: .84rem; border-radius: 7px; }
.btn-block { width: 100%; margin-top: 8px; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.grid-form .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .grid-form { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: .84rem; font-weight: 600; color: var(--muted); }
.field.grow { flex: 1; }
input, select, textarea { font: inherit; font-size: .95rem; color: var(--ink); background: #fff; border: 1px solid #c9d7dc; border-radius: 8px;
  padding: 8px 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23,162,184,.15); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 130px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.inline-form { display: inline-flex; margin: 0; gap: 6px; align-items: center; }
.select-sm { padding: 2px 8px; font-size: .8rem; width: auto; border-radius: 999px; }
.sub-section { padding-top: 6px; border-top: 1px dashed var(--line); }
.danger-zone { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #f0c4bf; }
.genpass { font: inherit; font-size: .75rem; margin-top: 4px; background: none; border: 0; color: var(--petrol); cursor: pointer; padding: 0; align-self: flex-start; }

/* ---------- Alerts / badges / tags ---------- */
.alert { border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; border: 1px solid; }
.alert-success { background: var(--green-l); color: var(--green); border-color: #bfe3cf; }
.alert-error { background: var(--red-l); color: var(--red); border-color: #f2c5c0; }
.badge { display: inline-block; font-size: .76rem; font-weight: 700; border-radius: 999px; padding: 1px 10px; white-space: nowrap; vertical-align: middle; }
.badge-green { background: var(--green-l); color: var(--green); }
.badge-amber { background: var(--amber-l); color: var(--amber); }
.badge-blue  { background: var(--blue-l);  color: var(--blue); }
.badge-red   { background: var(--red-l);   color: var(--red); }
.badge-gray  { background: var(--gray-l);  color: var(--gray); }
.tag { display: inline-block; font-size: .8rem; background: var(--gray-l); color: var(--gray); border-radius: 6px; padding: 1px 8px; white-space: nowrap; }
.tag-strong { background: var(--petrol-l); color: var(--petrol-d); font-weight: 700; }
.tag-funnel { background: #fff; border: 1px solid var(--accent); color: var(--petrol); }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: right; font-size: .8rem; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.is-muted td { opacity: .6; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line); padding: 10px 0; }
.list li:last-child { border-bottom: 0; }
.list li > a { display: block; color: var(--ink); }
.list li > a:hover { text-decoration: none; background: var(--petrol-l); margin: -10px -8px; padding: 10px 8px; border-radius: 8px; }
.list.compact li { padding: 8px 0; }
.upcoming li > a { display: flex; align-items: center; gap: 12px; }
.upcoming li > a > span:nth-child(2) { flex: 1; min-width: 0; }
.mini-date { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 52px; height: 52px; border-radius: 10px;
  background: var(--petrol-l); color: var(--petrol-d); font-size: .72rem; line-height: 1.1; }
.mini-date b { font-size: 1.2rem; }

/* ---------- Requests ---------- */
.req-box { border: 1px solid var(--line); border-inline-start: 4px solid var(--gray); border-radius: 8px; padding: 10px 12px; margin: 10px 0; background: #fcfdfd; }
.req-box p { margin: 6px 0 0; white-space: normal; }
.req-open { border-inline-start-color: var(--amber); background: #fffcf6; }
.req-in_progress { border-inline-start-color: var(--blue); }
.req-done { border-inline-start-color: var(--green); }
.req-rejected { border-inline-start-color: var(--red); }
.req-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.reply { margin-top: 8px; background: var(--petrol-l); border-radius: 8px; padding: 8px 12px; font-size: .92rem; }
.req-reply { margin-top: 10px; gap: 8px; }
.req-reply select { width: auto; }
.req-card { scroll-margin-top: 90px; }
.req-card:target { box-shadow: 0 0 0 3px rgba(23,162,184,.35), var(--shadow); }
.req-msg { background: #f8fbfb; border-radius: 8px; padding: 10px 12px; margin-top: 10px; }

.tabs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.tabs > a { padding: 8px 16px; border-radius: 9px; font-weight: 700; color: var(--muted); background: var(--card); border: 1px solid var(--line); }
.tabs > a.active { background: var(--petrol); color: #fff; border-color: var(--petrol); }
.tabs > a:hover { text-decoration: none; }
.tabs .count { display: inline-block; min-width: 22px; text-align: center; border-radius: 999px; background: rgba(0,0,0,.08); font-size: .78rem; padding: 0 6px; margin-inline-start: 4px; }
.tabs .pill { padding: 4px 12px; font-size: .84rem; border-radius: 999px; }
.tabs-spacer { flex: 1; }

/* ---------- Menus / dialogs ---------- */
.menu { position: relative; display: inline-block; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-body { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 10; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: 14px; width: 260px; display: flex; flex-direction: column; gap: 10px; white-space: normal; }
.dialog { border: 0; border-radius: 14px; padding: 22px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dialog::backdrop { background: rgba(4,42,50,.45); }
.dialog h2 { margin-bottom: 2px; }

/* ---------- Auth ---------- */
body.auth-page { background: radial-gradient(circle at 70% 20%, #1792b0 0%, var(--petrol) 35%, var(--petrol-d) 70%, var(--petrol-dd) 100%); }
body.auth-page .footer { color: rgba(255,255,255,.6); }
.auth-wrap { min-height: calc(100vh - 120px); display: flex; align-items: center; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; padding: 0 0 26px; overflow: hidden; border: 0; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.auth-card > :not(.auth-brand) { margin-inline: 28px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; padding: 26px 20px 20px; margin-bottom: 20px;
  background: linear-gradient(135deg, var(--petrol-d), var(--petrol) 60%, #1488a6); color: #fff; }
.auth-brand .logo-text { font-size: 1.45rem; }
.auth-brand .logo-img { height: 70px; }
.auth-brand small { color: rgba(255,255,255,.7); direction: ltr; letter-spacing: .25em; font-size: .62rem; text-transform: uppercase; margin-top: 6px; }
.auth-card h1 { font-size: 1.3rem; text-align: center; }
.auth-card > .muted { text-align: center; }

.footer { text-align: center; color: var(--muted); font-size: .8rem; padding-top: 10px; padding-bottom: 24px; }

/* ================= HR additions ================= */
.text-amber { color: var(--amber); font-weight: 700; }
.ltr-cell { text-align: right; unicode-bidi: plaintext; }
.alert-warn { background: var(--amber-l); color: var(--amber); border-color: #f3d5a6; }
.alert-info { background: var(--blue-l); color: var(--blue); border-color: #c6d8f5; }
.alert.fade-out { opacity: 0; transition: opacity .6s; }
.nav .count { display: inline-block; min-width: 20px; margin-inline-start: 6px; background: #f5a524; color: #3a2400; border-radius: 999px; font-size: .74rem; padding: 0 6px; text-align: center; }
.stat b small { font-size: .9rem; font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }
.check input { width: auto; }
.filters .field { flex: 0 1 auto; min-width: 150px; }
.filters .check { align-self: flex-end; padding-bottom: 8px; }
.filters .btn { align-self: flex-end; }
.filters > a.small { align-self: flex-end; padding-bottom: 8px; }
.progress-note { align-self: flex-end; padding-bottom: 8px; font-size: .9rem; }

/* person / avatar */
.person { display: flex; align-items: center; gap: 10px; }
.avatar { width: 42px; height: 42px; border-radius: 10px; background: linear-gradient(135deg, var(--petrol), var(--accent)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; flex-shrink: 0; }
.avatar.sm { width: 34px; height: 34px; font-size: .95rem; border-radius: 9px; }
.place a { color: var(--ink); text-decoration: underline; text-decoration-color: #b9cdd3; text-underline-offset: 3px; }
.place a:hover { color: var(--petrol); }
.tbl td .place { font-size: .88rem; }
tr.target-row:target td { background: #fff8e6; }

/* ---------- Punch (check-in) ---------- */
.punch { text-align: center; padding: 28px 20px 22px; background: linear-gradient(160deg, #fff 0%, #f2fafc 100%); }
.punch-clock { font-size: 3rem; font-weight: 800; color: var(--petrol-d); line-height: 1.1; letter-spacing: .5px; font-variant-numeric: tabular-nums; }
.punch-day { color: var(--muted); margin: 6px 0 18px; }
.punch-btn { font: inherit; font-size: 1.25rem; font-weight: 800; color: #fff; border: 0; border-radius: 999px; cursor: pointer;
  width: min(280px, 100%); padding: 18px 20px; box-shadow: 0 10px 24px rgba(10,63,82,.25); transition: transform .12s, box-shadow .12s, opacity .2s; }
.punch-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(10,63,82,.3); }
.punch-btn:active { transform: translateY(1px); }
.punch-btn[disabled] { opacity: .6; cursor: progress; }
.punch-in { background: linear-gradient(135deg, var(--petrol) 0%, var(--accent) 100%); }
.punch-out { background: linear-gradient(135deg, #8a3b12 0%, #d9771f 100%); box-shadow: 0 10px 24px rgba(160,80,20,.25); margin-top: 16px; }
.punch-hint { margin: 12px 0 0; }
.punch-status { min-height: 1.4em; margin: 12px 0 0; font-weight: 700; color: var(--petrol); }
.punch-status.is-error { color: var(--red); }
.punch-row { display: flex; justify-content: center; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
.punch-row > div { display: flex; flex-direction: column; align-items: center; }
.punch-row b { font-size: 1.35rem; color: var(--petrol-d); }
.punch-place { margin-top: 10px; font-size: .92rem; }
.punch-done { color: var(--green); font-weight: 800; font-size: 1.15rem; margin-bottom: 12px; }
.punch-state { margin-bottom: 8px; }
.punch-note { background: var(--blue-l); color: var(--blue); border-radius: 10px; padding: 8px 12px; margin-bottom: 14px; }

.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin: 10px 0; }
.mini-stats > div { background: var(--bg); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.mini-stats span { font-size: .78rem; color: var(--muted); }
.mini-stats b { font-size: 1.3rem; color: var(--petrol-d); }
.mini-stats b small { font-size: .75rem; color: var(--muted); font-weight: 600; }
.mini-stats b.text-red { color: var(--red); }

.bar { height: 8px; background: var(--gray-l); border-radius: 999px; overflow: hidden; margin: 6px 0; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--petrol)); border-radius: 999px; transition: width .3s; }

.score-line { display: flex; align-items: center; gap: 12px; }
.score-num { display: inline-block; font-weight: 800; font-size: 1.3rem; border-radius: 12px; padding: 4px 14px; }
.score-num.badge-green { background: var(--green-l); color: var(--green); }
.score-num.badge-amber { background: var(--amber-l); color: var(--amber); }
.score-num.badge-red { background: var(--red-l); color: var(--red); }

/* ---------- Requests ---------- */
.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.req-grid .req-box { margin: 0; }
.req-box.card { padding: 14px 16px; }
.req-pending { border-inline-start-color: var(--amber); background: #fffcf6; }
.req-approved { border-inline-start-color: var(--green); }
.req-head .avatar { margin-inline-end: 2px; }
.req-dates { margin: 10px 0 6px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.req-decide { margin-top: 10px; gap: 8px; }
.req-actions { margin-top: 10px; }
.btn-approve { background: var(--green); border-color: var(--green); }
.btn-approve:hover { background: #136239; border-color: #136239; }
.change-decision { margin-top: 8px; }
.change-decision summary { cursor: pointer; color: var(--muted); }
.change-decision[open] summary { margin-bottom: 8px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; text-align: center; border: 1px solid #c9d7dc; border-radius: 10px; padding: 10px 8px; font-weight: 700; font-size: .9rem; transition: all .12s; color: var(--ink); }
.choice input:checked + span { border-color: var(--petrol); background: var(--petrol-l); color: var(--petrol-d); box-shadow: 0 0 0 2px rgba(14,95,120,.15); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); }

/* ---------- KPI ---------- */
.kpi-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.kpi-item { margin-bottom: 8px; }
.kpi-form { display: flex; flex-direction: column; margin-bottom: 14px; }
.kpi-row { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.kpi-row:last-child { border-bottom: 0; }
.kpi-name { flex: 1; min-width: 200px; }
.kpi-input { flex-shrink: 0; text-align: center; min-width: 170px; }
.auto-val { font-size: 1.3rem; color: var(--petrol-d); }
.pct-input { display: inline-flex; align-items: center; border: 1px solid #c9d7dc; border-radius: 10px; overflow: hidden; background: #fff; }
.pct-input input { border: 0; width: 90px; text-align: center; font-size: 1.15rem; font-weight: 700; border-radius: 0; }
.pct-input input:focus { box-shadow: none; }
.pct-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23,162,184,.15); }
.pct-input span { padding: 0 12px; color: var(--muted); font-weight: 700; background: var(--bg); align-self: stretch; display: flex; align-items: center; }
.stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; position: relative; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars label { font-size: 2rem; line-height: 1; color: #d5dee1; cursor: pointer; transition: color .1s, transform .1s; padding: 0 1px; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: #f5a524; }
.stars label:hover { transform: scale(1.12); }
.stars input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }
.sticky-side { position: sticky; top: 84px; }
.total-card { text-align: center; }
.total-num { font-size: 3rem; font-weight: 800; color: var(--petrol-d); line-height: 1.2; margin: 4px 0; }
.total-num.s-green { color: var(--green); }
.total-num.s-amber { color: var(--amber); }
.total-num.s-red { color: var(--red); }
.total-card .check { margin-top: 10px; }
.weight-sum { font-weight: 800; border-radius: 999px; padding: 2px 12px; background: var(--green-l); color: var(--green); }
.weight-sum.bad { background: var(--red-l); color: var(--red); }
.setup-tbl td { vertical-align: middle; }
.setup-tbl .w-num { width: 80px; }
.setup-tbl td:first-child input { min-width: 220px; }
.dot-warn { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; background: var(--red); color: #fff; font-size: .7rem; align-items: center; justify-content: center; font-weight: 800; }
.tabs a.pill.active .dot-warn { background: #fff; color: var(--red); }

.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.rule { border-radius: var(--radius); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid; }
.rule span { font-weight: 800; font-size: 1.1rem; }
.rule-green { background: var(--green-l); color: var(--green); border-color: #bfe3cf; }
.rule-amber { background: var(--amber-l); color: var(--amber); border-color: #f3d5a6; }
.rule-red { background: var(--red-l); color: var(--red); border-color: #f2c5c0; }
.annual-tbl .mcol { text-align: center; padding-inline: 4px; }
.mscore { display: inline-block; min-width: 30px; border-radius: 6px; font-size: .8rem; font-weight: 700; padding: 1px 4px; }
.mscore.s-green { background: var(--green-l); color: var(--green); }
.mscore.s-amber { background: var(--amber-l); color: var(--amber); }
.mscore.s-red { background: var(--red-l); color: var(--red); }

/* ---------- Payroll ---------- */
.pay-tbl td { vertical-align: middle; }
.calc-help { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.calc-help summary { cursor: pointer; color: var(--petrol); font-weight: 700; }
.calc-help ul { margin: 8px 0 0; padding-inline-start: 18px; }

/* ---------- Employees ---------- */
.share-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; }
.share-link code { background: var(--bg); border-radius: 8px; padding: 4px 10px; font-size: .9rem; }
.copy-btn { font: inherit; font-size: .8rem; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 2px 10px; cursor: pointer; color: var(--muted); }
.copy-btn:hover { border-color: var(--accent); color: var(--petrol); }
.genpass { font: inherit; font-size: .75rem; margin-top: 4px; background: none; border: 0; color: var(--petrol); cursor: pointer; padding: 0; align-self: flex-start; }
.dialog .form { margin-top: 12px; }
.onboarding ol { margin: 0; padding-inline-start: 20px; }
.onboarding li { margin-bottom: 6px; }

/* ---------- Settings ---------- */
.settings-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.settings-nav a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: .86rem; font-weight: 700; }
.settings-nav a:hover { border-color: var(--accent); text-decoration: none; }
.card[id] { scroll-margin-top: 90px; }
.sched { display: flex; flex-direction: column; gap: 8px; }
.sched-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; align-items: center; }
.sched-row select { padding: 6px 8px; }
.sched-times { display: flex; align-items: center; gap: 6px; }
.sched-times input { padding: 6px; }
.sched-row.is-off .sched-times { visibility: hidden; }
.tiers { display: flex; flex-wrap: wrap; gap: 8px; }
.tiers label { display: flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 10px; padding: 6px 10px; }
.tiers span { font-size: .84rem; font-weight: 700; white-space: nowrap; }
.tiers input { width: 70px; padding: 4px 6px; }

/* ---------- Reports ---------- */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.report { display: flex; flex-direction: column; gap: 8px; color: var(--ink); margin: 0; }
.report:hover { border-color: var(--accent); text-decoration: none; }
.report b { font-size: 1.05rem; color: var(--petrol-d); }
.report .btn { align-self: flex-start; margin-top: auto; }
.report-ico { font-size: 1.8rem; }

@media (max-width: 640px) {
  .main { padding-top: 16px; }
  .page-head h1 { font-size: 1.3rem; }
  .card { padding: 14px; }
  .punch-clock { font-size: 2.5rem; }
  .sticky-side { position: static; }
  .req-grid { grid-template-columns: minmax(0, 1fr); }
  .sched-row { grid-template-columns: 1fr 1fr; }
  .sched-times { grid-column: 1 / -1; }
  .sched-row.is-off .sched-times { display: none; }
}
.punch-row-top { align-items: flex-start; }
.punch-row-top > div { max-width: 240px; }
.punch-done .badge { vertical-align: middle; margin-inline-start: 6px; }
.total-hint { margin: 4px 0 8px; color: var(--petrol); font-weight: 700; }
.place-office { text-decoration: none !important; }
