/* =========================================================================
   Absence Tracker — design system (BambooHR / Remote inspired)
   ========================================================================= */
:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #f8faf9;
  --border: #e3e8e5;
  --border-strong: #cfd8d3;
  --text: #16211c;
  --text-2: #3c4a43;
  --muted: #6a7871;
  --brand: #1f7a4d;
  --brand-600: #18643f;
  --brand-50: #ecf6f0;
  --brand-100: #d4ecdd;
  --vacation-bg: #e0f2fe;
  --vacation: #0369a1;
  --sick-bg: #ffe4e6;
  --sick: #be123c;
  --warn-bg: #fff7ed;
  --warn: #9a3412;
  --info-bg: #eff6ff;
  --info: #1e40af;
  --danger: #dc2626;
  --ok: #15803d;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 33, 26, .04), 0 2px 6px rgba(16, 33, 26, .05);
  --shadow-lg: 0 10px 30px rgba(16, 33, 26, .10);
  --sidebar-w: 244px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 4px; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 14px; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
p { margin: 0 0 12px; }
hr { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
code { background: #eef2f0; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
.icon { flex-shrink: 0; vertical-align: middle; }

/* ---------- layout ---------- */
body.with-sidebar { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 18px 14px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 15px; color: var(--text);
  padding: 4px 8px 16px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand); color: #fff;
}
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 9px;
  color: var(--text-2); font-weight: 500;
}
.nav-item:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.nav-item.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.nav-item .icon { color: currentColor; }
.sidebar-user {
  display: flex; align-items: center; gap: 6px;
  border-top: 1px solid var(--border); padding-top: 12px;
}
.sidebar-me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--text); padding: 4px; border-radius: 9px; }
.sidebar-me:hover { background: var(--surface-2); text-decoration: none; }
.sidebar-me-text { display: flex; flex-direction: column; min-width: 0; }
.sidebar-me-text strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-me-text small { color: var(--muted); font-size: 12px; }

.main { min-width: 0; }
.main-inner { max-width: 1220px; margin: 0 auto; padding: 28px 36px 64px; }
.bare-main .main-inner { max-width: 520px; padding-top: 56px; }
.brand-bare { justify-content: center; font-size: 18px; padding-bottom: 22px; }

@media (max-width: 900px) {
  body.with-sidebar { display: block; }
  .sidebar {
    position: sticky; top: 0; z-index: 50; height: auto; flex-direction: row; align-items: center;
    padding: 8px 12px; border-right: none; border-bottom: 1px solid var(--border); gap: 8px;
  }
  .brand { padding: 0; }
  .brand > span:last-child, .sidebar-me-text { display: none; }
  .nav { flex-direction: row; overflow-x: auto; gap: 2px; scrollbar-width: none; }
  .nav-item { padding: 8px 10px; white-space: nowrap; }
  .nav-item span { display: none; }
  .nav-item.active span { display: inline; }
  .sidebar-user { border-top: none; padding-top: 0; }
  .main-inner { padding: 20px 16px 48px; }
}

/* ---------- page header ---------- */
.pagehead, .page-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-header p, .subtitle { color: var(--muted); margin: 0; }
.monthnav { display: flex; align-items: center; gap: 8px; }
.monthnav strong { min-width: 120px; text-align: center; }
.toggle { display: inline-flex; padding: 3px; background: #e9eeeb; border-radius: 9px; gap: 2px; margin-right: 8px; }
.toggle .btn { border: none; background: transparent; box-shadow: none; padding: 6px 12px; }
.toggle .btn-primary { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- cards & grids ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 20px;
}
.card > :last-child { margin-bottom: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-header h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.card-header h2 .icon { color: var(--brand); }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-header { padding: 18px 22px 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid > .card, .grid-3 > .card { margin-bottom: 0; }
.stack-gap > * + * { margin-top: 20px; }
@media (max-width: 1000px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-main { grid-template-columns: 1fr; }
  .first-on-mobile { order: -1; }
}
@media (max-width: 760px) { .grid, .grid-3 { grid-template-columns: 1fr; } }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; display: flex; gap: 14px; align-items: center;
}
.tile-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--brand-50); color: var(--brand); }
.tile-icon.vacation { background: var(--vacation-bg); color: var(--vacation); }
.tile-icon.sick { background: var(--sick-bg); color: var(--sick); }
.tile-icon.neutral { background: #eef2f0; color: var(--text-2); }
.tile-value { font-size: 24px; font-weight: 700; line-height: 1.1; }
.tile-label { color: var(--muted); font-size: 12.5px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-weight: 500;
  cursor: pointer; text-decoration: none; white-space: nowrap; box-shadow: 0 1px 1px rgba(16, 33, 26, .04);
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-google { width: 100%; padding: 11px 14px; font-weight: 600; }
button.link { background: none; border: none; color: var(--brand); cursor: pointer; padding: 0; font: inherit; font-size: 13px; }
button.link:hover { text-decoration: underline; }
.danger, button.link.danger { color: var(--danger); }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  border: none; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.actions form { display: inline; }

/* ---------- forms ---------- */
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px 11px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
input:disabled, select:disabled { background: var(--surface-2); color: var(--muted); }
textarea { width: 100%; resize: vertical; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack label, .field { display: flex; flex-direction: column; gap: 5px; font-weight: 500; font-size: 13px; color: var(--text-2); }
.field small, .hint { color: var(--muted); font-weight: 400; font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.row .grow { flex: 1; min-width: 220px; }
.inline-check { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }
.row label.inline-check, .stack label.inline-check { flex-direction: row; align-self: center; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 10px; font-weight: 600; color: var(--text);
}
.segmented input:checked + label { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px var(--brand-100); }
.segmented input:focus-visible + label { box-shadow: 0 0 0 3px var(--brand-100); }

/* ---------- tables ---------- */
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
tr:last-child td { border-bottom: none; }
tbody tr:hover td, table tr:hover td { background: #fbfcfb; }
td.num, th.num { text-align: right; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.table-wrap table th:first-child, .table-wrap table td:first-child { padding-left: 16px; }
.stats td { padding: 8px 4px; }
.stats tr:hover td { background: transparent; }
.stats td:last-child { text-align: right; font-weight: 600; }

/* ---------- badges, pills, status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: #eef2f0; color: var(--text-2); white-space: nowrap;
}
.badge .icon { width: 13px; height: 13px; }
.badge-vacation { background: var(--vacation-bg); color: var(--vacation); }
.badge-sick { background: var(--sick-bg); color: var(--sick); }
.badge-mgr { background: #ede9fe; color: #6d28d9; }
.badge-senior { background: #fef3c7; color: #92400e; }
.badge-hr { background: #dcfce7; color: #15803d; }
.badge-god { background: #16211c; color: #fbbf24; }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-none { background: #f1f3f2; color: var(--muted); }
.pill-draft { background: #fef3c7; color: #92400e; }
.pill-submitted { background: #dcfce7; color: #15803d; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.ok { color: var(--ok); font-weight: 600; }
.error { color: var(--danger); }
.req { color: var(--danger); }
a.plain { color: inherit; }
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; margin-bottom: 18px; font-weight: 500; }
.flash-ok { background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.callout {
  display: block; background: var(--info-bg); border: 1px solid #bfdbfe; color: var(--info);
  border-radius: 10px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 16px;
}
.callout-warn { background: var(--warn-bg); border-color: #fed7aa; color: var(--warn); }
.empty { text-align: center; color: var(--muted); padding: 22px 10px; }
.empty .icon { color: var(--border-strong); margin-bottom: 6px; }

/* ---------- avatars & people lists ---------- */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-block; vertical-align: middle; background: #e5ebe8; }
.avatar-initials { display: inline-grid; place-items: center; color: #fff; font-weight: 600; letter-spacing: .02em; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person-text { display: flex; flex-direction: column; min-width: 0; }
.person-text strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-text small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.person { color: inherit; }
a.person:hover { text-decoration: none; }
a.person:hover strong { color: var(--brand); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.list > li:last-child { border-bottom: none; }
.list-meta { color: var(--muted); font-size: 12.5px; text-align: right; white-space: nowrap; }

/* ---------- people directory ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.search { position: relative; flex: 1; min-width: 220px; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; padding-left: 36px; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.person-card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 16px 16px; color: var(--text); transition: box-shadow .15s, transform .15s;
}
.person-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); text-decoration: none; }
.person-card .avatar { margin-bottom: 8px; }
.person-card strong { font-size: 15px; }
.person-card .title { color: var(--text-2); }
.person-card .meta { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 5px; justify-content: center; }
.person-card .card-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ---------- profile ---------- */
.profile-hero { padding: 0; overflow: hidden; }
.profile-cover { height: 110px; background: linear-gradient(120deg, #1f7a4d 0%, #2f9e69 45%, #7cc59a 100%); }
.profile-head { display: flex; gap: 20px; align-items: flex-end; padding: 0 26px 20px; margin-top: -46px; flex-wrap: wrap; }
.profile-head .avatar { border: 4px solid var(--surface); box-shadow: var(--shadow); }
.profile-id { flex: 1; min-width: 220px; padding-top: 52px; }
.profile-id h1 { margin-bottom: 2px; }
.profile-id .title { color: var(--text-2); font-size: 15px; }
.profile-facts { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 8px; }
.profile-facts span { display: inline-flex; align-items: center; gap: 6px; }
.profile-actions { display: flex; gap: 8px; padding-bottom: 4px; }
@media (max-width: 640px) {
  .profile-head { padding: 0 18px 16px; gap: 6px; }
  .profile-id { padding-top: 0; }
  .profile-head .avatar { width: 88px !important; height: 88px !important; font-size: 32px !important; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 12px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .tile-value { font-size: 20px; }
}
.tabs { display: flex; gap: 4px; border-top: 1px solid var(--border); padding: 0 18px; overflow-x: auto; }
.tabs a {
  padding: 12px 12px 11px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 22px; margin: 0; }
.dl dt { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dl dt .icon { color: var(--border-strong); }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.private-note { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
.bio { white-space: pre-wrap; color: var(--text-2); }
.profile-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.profile-grid dt { color: var(--muted); }
.profile-grid dd { margin: 0; }

/* ---------- map ---------- */
.map { height: 560px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); z-index: 0; }
.map-popup { display: flex; flex-direction: column; gap: 8px; min-width: 190px; font-family: Inter, sans-serif; }
.map-popup .place { font-weight: 700; font-size: 13px; }
.map-count {
  display: grid; place-items: center; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; font-family: Inter, sans-serif;
  border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(31, 122, 77, .25), 0 3px 10px rgba(0, 0, 0, .25);
}
.country-row {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  background: none; border: none; padding: 0; font: inherit; color: var(--text); text-align: left; cursor: pointer;
}
.country-row:hover .country-name { color: var(--brand); text-decoration: underline; }
.country-row .flag { font-size: 20px; line-height: 1; }
.leaflet-popup-content { margin: 12px 14px; }

/* ---------- clock in ---------- */
.clock-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px 26px; }
.clock-today h2 { font-size: 20px; margin: 4px 0 4px; display: flex; align-items: center; gap: 8px; }
.clock-today p { margin: 0; }
.clock-btn { padding: 14px 28px; font-size: 16px; font-weight: 600; border-radius: 12px; }
.clock-out { background: #fff; border-color: var(--danger); color: var(--danger); }
.clock-out:hover { background: #fef2f2; }
.clock-stale { border-color: #fed7aa; background: var(--warn-bg); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); display: inline-block; box-shadow: 0 0 0 0 rgba(21, 128, 61, .5); animation: pulse 1.6s infinite; }
.pulse-sm { width: 7px; height: 7px; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(21, 128, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { margin-bottom: 6px; }
.cal-head span { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cal-cell {
  display: flex; flex-direction: column; justify-content: space-between; min-height: 64px; padding: 7px 8px;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
}
.cal-cell b { font-size: 13px; }
.cal-cell small { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-blank { border: none; background: transparent; }
.cal-in { background: #ecfdf3; border-color: #bbf7d0; color: #166534; }
.cal-missed { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.cal-vacation { background: var(--vacation-bg); border-color: #bae6fd; color: var(--vacation); }
.cal-sick { background: var(--sick-bg); border-color: #fecdd3; color: var(--sick); }
.cal-weekend { background: #f3f5f4; color: #a9b4ae; border-color: transparent; }
.cal-today { border-color: var(--brand); color: var(--brand); }
.cal-future { color: var(--muted); }
.cal-is-today { box-shadow: 0 0 0 2px var(--brand); }
.cal-key-in { background: #dcfce7; color: #166534; }
.cal-key-missed { background: #ffedd5; color: #9a3412; }
@media (max-width: 640px) {
  .cal-cell { min-height: 48px; padding: 5px; }
  .cal-cell small { display: none; }
  .clock-btn { width: 100%; }
  .clock-hero form { width: 100%; }
}

/* ---------- org chart ---------- */
.oc-card { padding: 0; overflow: hidden; position: relative; }
#org-chart { height: calc(100vh - 250px); min-height: 520px; background: radial-gradient(circle, #e3e8e5 1px, transparent 1px) 0 0 / 22px 22px, var(--surface-2); }
.oc-hint { position: absolute; left: 14px; bottom: 10px; margin: 0; background: rgba(255, 255, 255, .85); padding: 3px 8px; border-radius: 6px; pointer-events: none; }
.oc-node {
  box-sizing: border-box; width: 264px; height: 104px; padding: 12px 14px 10px;
  background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--dept, var(--brand));
  border-radius: 12px; box-shadow: var(--shadow); font-family: Inter, sans-serif; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between; transition: box-shadow .15s;
}
.oc-node:hover { box-shadow: var(--shadow-lg); }
.oc-node.oc-me { background: var(--brand-50); }
.oc-node.oc-hl { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100), var(--shadow-lg); }
.oc-row { display: flex; gap: 11px; align-items: center; min-width: 0; }
.oc-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.oc-initials { display: inline-grid; place-items: center; color: #fff; font-weight: 600; font-size: 16px; }
.oc-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.oc-text strong { font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-text strong em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-100); padding: 0 6px; border-radius: 999px; margin-left: 4px; }
.oc-title { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-team { font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 6px; }
.oc-company {
  width: 264px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; border-radius: 12px; font-family: Inter, sans-serif; box-shadow: var(--shadow);
}
.oc-company strong { font-size: 16px; }
.oc-company small { opacity: .85; }
.oc-btn {
  display: flex; align-items: center; justify-content: center; gap: 4px; height: 24px; margin: 0 auto;
  border-radius: 999px; background: #fff; border: 1px solid var(--border-strong); color: var(--text-2);
  font: 600 12px Inter, sans-serif; box-shadow: var(--shadow);
}
.oc-btn.open { background: var(--brand); border-color: var(--brand); color: #fff; }
.oc-search { position: relative; max-width: 440px; }
.oc-results {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg);
}
.oc-results li { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 8px; cursor: pointer; }
.oc-results li span { display: flex; flex-direction: column; min-width: 0; }
.oc-results li small { color: var(--muted); }
.oc-results li.active, .oc-results li:hover { background: var(--brand-50); }
.oc-results li.none { color: var(--muted); cursor: default; }
.oc-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
@media (max-width: 640px) {
  .org-actions { gap: 6px; }
  .org-actions .btn { padding: 6px 10px; font-size: 13px; }
  .oc-legend, .oc-hint { display: none; }
  #org-chart { height: calc(100vh - 300px); min-height: 420px; }
}
.oc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.oc-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- time off ---------- */
.type-dot { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; }
.type-dot.vacation { background: var(--vacation-bg); color: var(--vacation); }
.type-dot.sick { background: var(--sick-bg); color: var(--sick); }
.type-dot.neutral { background: #eef2f0; color: var(--text-2); }
.daycount { font-weight: 600; color: var(--brand); }
.timeline-row { display: flex; align-items: center; gap: 12px; }
.date-chip { display: flex; flex-direction: column; align-items: center; width: 48px; padding: 5px 0; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); line-height: 1.15; }
.date-chip b { font-size: 16px; }
.date-chip small { font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 600; }

/* ---------- team calendar ---------- */
.scroll-x { overflow-x: auto; }
.calendar { table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.calendar th, .calendar td { background: var(--surface); }
.calendar tr:hover td { background: var(--surface); }
.calendar .namecol { width: 210px; min-width: 210px; position: sticky; left: 0; z-index: 1; }
.calendar .daycol {
  width: 30px; min-width: 30px; text-align: center; padding: 6px 2px; font-size: 11.5px;
  border-left: 1px solid var(--border); text-transform: none; letter-spacing: 0;
}
.calendar .weekend { background: #f3f5f4 !important; color: #a9b4ae; }
.calendar th.today { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }
.calendar td.today { box-shadow: inset 2px 0 0 var(--brand-100), inset -2px 0 0 var(--brand-100); }
.calendar .cell-vacation { background: var(--vacation-bg) !important; color: var(--vacation); font-weight: 700; }
.calendar .cell-sick { background: var(--sick-bg) !important; color: var(--sick); font-weight: 700; }
.legend { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 4px 0 18px; }

/* ---------- auth / bare pages ---------- */
.login-card, .auth-card { max-width: 420px; margin: 0 auto; text-align: center; padding: 30px 30px 26px; }
.login-card h1, .auth-card h1 { font-size: 22px; }
.login-card .stack input { text-align: left; }

/* ---------- performance reviews ---------- */
.qedit { border-top: 1px solid var(--border); padding: 16px 0; scroll-margin-top: 16px; }
.qedit:first-of-type { border-top: none; }
.qnum { font-weight: 700; color: var(--muted); margin-right: 6px; }
.qtype { font-size: 12.5px; color: var(--muted); }
fieldset.question { border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px 14px; margin: 0 0 14px; }
fieldset.question legend { font-weight: 600; padding: 0 6px; font-size: 14.5px; }
fieldset.question.missing { border-color: var(--danger); background: #fef2f2; }
.choice { display: flex; align-items: center; gap: 9px; margin: 8px 0; font-size: 14px; cursor: pointer; }
.answer-q { font-weight: 600; margin: 18px 0 8px; }
.answer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.answer-box { border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; background: var(--surface-2); }
.answer-box h4 { margin: 0 0 6px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.answer-text { white-space: pre-wrap; }
.locked { color: var(--muted); font-style: italic; }
@media (max-width: 760px) { .answer-grid { grid-template-columns: 1fr; } }

/* ---------- Colleague feedback ---------- */
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.danger-text { color: var(--danger); }
.btn.danger-btn { color: var(--danger); border-color: #fecaca; }
.btn.danger-btn:hover { background: #fef2f2; }
.table-scroll { overflow-x: auto; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
fieldset.plain legend { font-weight: 600; font-size: 14.5px; padding: 0; margin-bottom: 10px; }
.option-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.option-card { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.option-card > span { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.option-card small { color: var(--muted); }
.option-card:has(input:checked) { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 3px var(--brand-100); }
.option-card input { margin-top: 3px; }
.pick-list { max-height: 340px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.pick-list-sm { max-height: 240px; }
.pick-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover { background: var(--surface-2); }
.pick-item.picked { background: var(--brand-50); }
.pick-item .person-text { min-width: 0; }
.fb-question { padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.fb-question:last-child { border-bottom: 0; }
.tally { display: grid; gap: 6px; margin-bottom: 8px; }
.tally-row { display: grid; grid-template-columns: minmax(90px, 180px) 1fr 28px; gap: 10px; align-items: center; font-size: 13.5px; }
.tally-bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.tally-bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; min-width: 2px; }
.tally-n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.quotes { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.quotes li { border-left: 3px solid var(--brand-100); padding: 4px 0 4px 12px; display: flex; flex-direction: column; gap: 2px; }
.quotes small { color: var(--muted); }
.who-picked summary { cursor: pointer; color: var(--brand); margin-bottom: 8px; }
.stack label.pick-item, .stack label.option-card, label.pick-item, label.option-card {
  flex-direction: row; text-align: left; font-size: 14px; font-weight: 400; color: inherit;
}
label.pick-item { align-items: center; }
label.option-card { align-items: flex-start; }
.calendar .cell-pending { background: repeating-linear-gradient(135deg, var(--surface) 0 4px, var(--vacation-bg) 4px 8px) !important; }
.calendar .cell-sick.cell-pending { background: repeating-linear-gradient(135deg, var(--surface) 0 4px, var(--sick-bg) 4px 8px) !important; }
/* ---------- Time-off approvals ---------- */
.approval { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.approval:last-child { border-bottom: 0; }
.approval-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.approval-form input[type="text"] { width: 200px; min-width: 0; }
.approval-meta { color: var(--muted); font-size: 12.5px; }
.pill-pending { background: #fef3c7; color: #92400e; }
.pill-rejected { background: #fef2f2; color: #991b1b; }
.pill-approved { background: #dcfce7; color: #15803d; }
.flow-hint { margin: 0; font-size: 13px; padding: 9px 12px; border-radius: 9px; background: var(--surface-2); color: var(--text-2); }
.flow-hint.needs { background: #fffbeb; color: #92400e; }
@media (max-width: 640px) { .approval { grid-template-columns: 1fr; } .approval-form { justify-content: flex-start; } }
.list > li.slack-settings { display: block; padding-top: 0; }
.slack-settings label.inline-check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-2); }
/* ---------- Clock out reasons, focus time ---------- */
.clock-out-choices, .clock-in-choices { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.clock-out-buttons { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.clock-out-buttons.compact { justify-content: stretch; }
.clock-out-buttons.compact .btn { flex: 1; justify-content: center; }
.clock-in-choices .link { margin-left: 6px; font-size: 13px; }
.focus-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.badge-focus { background: #ede9fe; color: #5b21b6; }
@media (max-width: 640px) { .clock-out-choices, .clock-in-choices { align-items: stretch; } .clock-out-buttons { justify-content: stretch; } .clock-out-buttons .btn { flex: 1; justify-content: center; } }
/* ---------- Public holidays ---------- */
.cal-holiday { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.cal-holiday small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cal-key-holiday { background: #ede9fe; color: #6d28d9; }
.calendar .cell-holiday { background: #f5f3ff !important; color: #6d28d9; font-weight: 700; }
.daysoff-toggle { margin: 14px 0; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }
.daysoff-toggle label.inline-check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
tr.muted td { color: var(--muted); }
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.stack label.country-cell, label.country-cell { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; font-weight: 500; font-size: 13.5px; color: var(--text); }
.country-cell .country-name { display: flex; flex-direction: column; min-width: 0; }
.country-cell small { color: var(--muted); font-weight: 400; font-size: 12px; }
.country-cell input { width: 70px; text-align: right; }
/* ---------- HR time-off management ---------- */
.person-picker { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; }
.person-picker label { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.person-picker select { flex: 1; min-width: 220px; max-width: 420px; }
.row-actions { display: inline-flex; align-items: center; gap: 6px; }
.balance-forms { display: grid; gap: 12px; margin: 16px 0; padding-top: 14px; border-top: 1px solid var(--border); }
/* ---------- Connect AI ---------- */
.connect-hero .eyebrow { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
.copy-field { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.copy-field code { font-size: 15px; padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; overflow-wrap: anywhere; flex: 1; min-width: 0; }
.connect-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-bottom: 20px; }
.connect-grid .card { margin-bottom: 0; }
.step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-size: 13px; font-weight: 700; margin-right: 6px; }
ol.steps { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.copy-block { position: relative; margin: 0 0 12px; }
.copy-block pre { margin: 0; padding: 12px 80px 12px 14px; background: #16211c; color: #e4ebe7; border-radius: 10px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; }
.copy-block .btn { position: absolute; top: 8px; right: 8px; }
.new-token { padding: 12px 14px; margin-bottom: 14px; background: #ecfdf3; border: 1px solid #bbf7d0; border-radius: 10px; display: grid; gap: 8px; }
.snippets { margin-top: 14px; }
.snippets summary, .tool-groups summary { cursor: pointer; padding: 6px 0; }
.tool-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 20px; }
.tool-groups ul { margin: 4px 0 10px; padding-left: 18px; font-size: 13px; display: grid; gap: 3px; }
.connect-card { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(135deg, var(--brand-50), var(--surface)); }
.connect-card .copy-field code { font-size: 13px; padding: 6px 10px; }
.consent { max-width: 560px; margin: 40px auto; text-align: center; padding: 32px; }
.consent-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; }
.consent h1 { font-size: 22px; margin: 0 0 12px; }
.consent-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

/* ---------- Goals and 1:1s ---------- */
.progress { height: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; min-width: 80px; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.progress-done span { background: var(--ok); }
.goal-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.goal-row:first-child { border-top: 0; padding-top: 0; }
.goal-main { flex: 1 1 260px; min-width: 0; }
.goal-main strong a { color: inherit; }
.goal-main small { display: block; color: var(--muted); margin-top: 2px; }
.goal-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.goal-side .progress { width: 110px; }
.goal-pct { font-size: 13px; color: var(--muted); width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.suggestion { border: 1px dashed var(--border-strong); background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; }
.suggestion p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.suggestion .row-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.pill-suggested { background: var(--info-bg); color: var(--info); }
.pill-active { background: var(--brand-50); color: var(--brand-600); }
.pill-done { background: #dcfce7; color: #15803d; }
.pill-dropped { background: #f1f3f2; color: var(--muted); }
.pill-ai { background: #f3e8ff; color: #6b21a8; }
.md { font-size: 14.5px; line-height: 1.55; color: var(--text-2); }
.md p { margin: 0 0 8px; }
.md ul { margin: 0 0 8px; padding-left: 20px; }
.md li { margin: 2px 0; }
.md .md-h { font-weight: 600; color: var(--text); margin-top: 10px; }
.transcript { max-height: 420px; overflow: auto; white-space: pre-wrap; font-size: 13px; line-height: 1.5; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0; }
.item-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.item-row:first-child { border-top: 0; }
.item-row form { margin: 0; }
.item-text { flex: 1; min-width: 0; }
.item-text small { display: block; color: var(--muted); }
.item-done .item-text span { text-decoration: line-through; color: var(--muted); }
.check-btn { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--border-strong); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: var(--ok); }
.check-btn:hover { border-color: var(--brand); }
.item-done .check-btn { background: #dcfce7; border-color: #86efac; }
.add-item { display: grid; grid-template-columns: 1fr 150px 150px auto; gap: 8px; margin-top: 12px; }
@media (max-width: 720px) { .add-item { grid-template-columns: 1fr; } }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
textarea.notes { min-height: 140px; }

/* ---------- Budget ---------- */
.budget-head, .budget-row > summary {
  display: grid; grid-template-columns: minmax(200px, 2.2fr) repeat(8, minmax(70px, 1fr)); gap: 10px; align-items: center;
  padding: 10px 22px;
}
.budget-head { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.budget-row { border-bottom: 1px solid var(--border); }
.budget-row:last-child { border-bottom: 0; }
.budget-row > summary { cursor: pointer; list-style: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.budget-row > summary::-webkit-details-marker { display: none; }
.budget-row > summary:hover { background: var(--surface-2); }
.budget-row[open] > summary { background: var(--brand-50); }
.budget-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.budget-detail { padding: 14px 22px 20px; background: var(--surface-2); border-top: 1px solid var(--border); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .budget-head { display: none; }
  .budget-row > summary { grid-template-columns: 1fr 1fr; }
  .budget-row > summary .budget-team { grid-column: span 2; }
}
.tile.tile-col { flex-direction: column; align-items: flex-start; gap: 3px; }
.tile.tile-col .tile-value { font-size: 22px; white-space: nowrap; }

/* ---------- Expenses ---------- */
.expense-chain { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chain-step { font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.chain-approved { background: #dcfce7; border-color: #bbf7d0; color: #15803d; }
.chain-rejected { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.chain-pending { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.chain-skipped { opacity: .55; text-decoration: line-through; }

a.tile { color: inherit; text-decoration: none; }
a.tile:hover { border-color: var(--brand); }

/* ---------- Barcode scanning ---------- */
.scan-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 16, 13, .88); display: grid; place-items: center; padding: 16px; }
.scan-box { position: relative; width: min(520px, 100%); text-align: center; }
.scan-box video { width: 100%; max-height: 70vh; border-radius: 14px; background: #000; object-fit: cover; display: block; }
.scan-frame { position: absolute; left: 12%; right: 12%; top: 30%; height: 22%; border: 3px solid #4ade80; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .25); pointer-events: none; }
.scan-hint { color: #fff; margin: 14px 0 10px; }
.scan-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.input-scan { display: flex; gap: 6px; }
.input-scan input { flex: 1; min-width: 0; }
.asset-label { display: inline-flex; flex-direction: column; align-items: center; border: 1px dashed var(--border-strong); border-radius: 8px; padding: 10px 14px; margin: 6px; background: #fff; color: #000; }
.asset-label svg { max-width: 100%; }
.asset-label small { font-size: 11px; color: #333; }
@media print { .no-print, .sidebar, .page-header .header-actions { display: none !important; } .main { margin: 0 !important; } .asset-label { break-inside: avoid; } }
.badge-fin { background: #e0f2fe; color: #075985; }
