:root {
  --bq-green-900: #421c0b;
  --bq-green-800: #5f260d;
  --bq-green-700: #9a3412;
  --bq-green-600: #f97316;
  --bq-green-500: #f0523a;
  --bq-mint-100: #ffe3d8;
  --bq-mint-50: #fff2ec;
  --bq-ink: #28180f;
  --bq-muted: #84695a;
  --bq-subtle: #a28778;
  --bq-canvas: #fff8f1;
  --bq-surface: #ffffff;
  --bq-border: #f0dfd3;
  --bq-danger: #b9565c;
  --bq-warning: #c76a11;
  --bq-info: #586d78;
  --ink: var(--bq-ink);
  --muted: var(--bq-muted);
  --paper: var(--bq-surface);
  --bg: var(--bq-canvas);
  --line: var(--bq-border);
  --purple: var(--bq-green-600);
  --navy: var(--bq-green-900);
  --mint: var(--bq-mint-100);
  --orange: #f97316;
  --red: var(--bq-danger);
  --sidebar-width: 264px;
  --radius-card: 18px;
  --radius-control: 11px;
  --shadow: 0 14px 40px rgba(94, 35, 10, 0.07);
  --shadow-hover: 0 18px 48px rgba(94, 35, 10, 0.12);
  --gradient-brand: linear-gradient(135deg, #421c0b 0%, #9a3412 48%, #f97316 100%);
  --gradient-brand-bright: linear-gradient(135deg, #f97316 0%, #f0523a 100%);
  --gradient-canvas: linear-gradient(135deg, #fff8f1 0%, #fff1e8 48%, #fffaf6 100%);
  --gradient-surface: linear-gradient(145deg, rgba(255, 255, 255, 0.99) 0%, rgba(255, 247, 241, 0.97) 100%);
  --gradient-soft: linear-gradient(135deg, #fff2ec 0%, #ffe3d8 55%, #fff7f2 100%);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bq-canvas); }

body {
  margin: 0;
  background:
    radial-gradient(circle at 92% 2%, rgba(249, 115, 22, 0.08), transparent 25rem),
    var(--bq-canvas);
  color: var(--bq-ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: var(--bq-green-600); font-weight: 700; text-decoration: none; }
a:hover { color: var(--bq-green-900); }

.shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  width: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 25px 18px 18px;
  color: rgba(255, 255, 255, 0.74);
  background:
    radial-gradient(circle at 12% 88%, rgba(108, 221, 180, 0.1), transparent 18rem),
    var(--bq-green-900);
  box-shadow: 8px 0 28px rgba(15, 61, 50, 0.08);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 2px 10px;
  color: #fff;
}

.brand-symbol {
  width: 40px;
  height: 44px;
  object-fit: contain;
  object-position: center;
  flex: 0 0 40px;
}

.brand-copy { display: grid; gap: 4px; min-width: 0; }
.brand-copy b { font-size: 19px; line-height: 1; letter-spacing: -0.65px; }
.brand-copy small { color: rgba(255, 255, 255, 0.58); font-size: 9px; white-space: nowrap; }

.workspace-label {
  margin: 29px 12px 10px;
  color: rgba(221, 245, 236, 0.48);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.65px;
}

.nav { display: grid; gap: 3px; }

.nav-item {
  width: 100%;
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  padding: 8px 11px;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  font-size: 12px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.075); transform: translateX(2px); }
.nav-item.active { color: #fff; background: var(--bq-green-600); box-shadow: 0 8px 22px rgba(4, 34, 27, 0.22); }

.nav-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #8ed9c0;
  font-size: 17px;
  line-height: 1;
}

.nav-item.active .nav-icon { color: #fff; background: rgba(255, 255, 255, 0.11); }

.sidebar-bottom {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 18px 7px 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.sidebar-person { min-width: 0; }
.sidebar-bottom b { display: block; overflow: hidden; color: #fff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-bottom small { display: block; margin-top: 3px; color: rgba(255, 255, 255, 0.48); font-size: 9px; }

.logout-button {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  display: grid;
  place-items: center;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.logout-button:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.online-dot { position: absolute; left: 30px; top: 41px; width: 8px; height: 8px; border: 2px solid var(--bq-green-900); border-radius: 50%; background: #72d9b2; }

.main { width: calc(100% - var(--sidebar-width)); min-width: 0; margin-left: var(--sidebar-width); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 38px;
  border-bottom: 1px solid rgba(224, 232, 227, 0.88);
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(16px);
}

.eyebrow { margin: 0 0 6px; color: var(--bq-green-600); font-size: 9px; font-weight: 800; letter-spacing: 1.45px; }
.topbar h1 { margin: 0; color: var(--bq-ink); font-size: clamp(20px, 2vw, 27px); font-weight: 750; letter-spacing: -0.8px; }
.top-actions { display: flex; align-items: center; gap: 11px; }

.topbar-date {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  padding: 0 13px;
  border: 1px solid var(--bq-border);
  border-radius: 10px;
  color: var(--bq-muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 600;
}

.date-clock { color: var(--bq-green-600); font-size: 15px; }

.icon-button {
  position: relative;
  width: 39px;
  height: 39px;
  border: 1px solid var(--bq-border);
  border-radius: 10px;
  color: var(--bq-green-900);
  background: #fff;
  font-size: 18px;
  cursor: pointer;
}

.icon-button:hover { background: var(--bq-mint-50); }
.icon-button i { position: absolute; right: 8px; top: 7px; width: 6px; height: 6px; border: 2px solid #fff; border-radius: 50%; background: var(--bq-danger); }

.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  padding: 2px 0 2px 5px;
  color: var(--bq-ink);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  text-align: left;
}

.profile small { color: var(--bq-muted); font-size: 9px; font-weight: 550; }
.profile > b { color: var(--bq-subtle); font-size: 14px; }

.avatar {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--bq-green-600);
  font-size: 10px;
  font-weight: 800;
  position: relative;
  overflow: hidden;
}

.avatar span { position: relative; z-index: 0; }
.avatar img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }

.purple { background: linear-gradient(145deg, var(--bq-green-600), #3fa387); }
.orange { background: linear-gradient(145deg, var(--bq-green-900), var(--bq-green-700)); }

.content { width: 100%; max-width: 1600px; padding: 31px 38px 54px; }

.page-head, .overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 21px;
}

.page-head h2, .overview-head h2 { margin: 0; color: var(--bq-ink); font-size: 18px; font-weight: 750; letter-spacing: -0.4px; }
.page-head p, .overview-head p { margin: 6px 0 0; color: var(--bq-muted); font-size: 11px; line-height: 1.55; }
.head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.access-note { margin-left: auto; color: var(--bq-muted); font-size: 9px; font-weight: 650; }

.button {
  min-height: 39px;
  border: 1px solid var(--bq-green-600);
  border-radius: 10px;
  padding: 9px 14px;
  color: #fff;
  background: var(--bq-green-600);
  box-shadow: 0 8px 18px rgba(30, 127, 103, 0.17);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.button:hover { transform: translateY(-1px); background: var(--bq-green-700); box-shadow: 0 11px 24px rgba(30, 127, 103, 0.2); }
.button.ghost { border-color: var(--bq-border); color: var(--bq-green-900); background: #fff; box-shadow: none; }
.button.ghost:hover { border-color: #b9cfc6; background: var(--bq-mint-50); }
.button.secondary { border-color: transparent; color: var(--bq-green-700); background: var(--bq-mint-100); box-shadow: none; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 19px; }

.metric {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--bq-border);
  border-radius: var(--radius-card);
  background: var(--bq-surface);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.metric:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.metric::after { content: ""; position: absolute; width: 94px; height: 94px; right: -34px; top: -36px; border-radius: 50%; background: var(--tone, var(--bq-mint-50)); }
.metric .metric-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--accent, var(--bq-green-600)); background: var(--tone, var(--bq-mint-50)); font-size: 17px; }
.metric p { margin: 15px 0 6px; color: var(--bq-muted); font-size: 9px; font-weight: 800; letter-spacing: 0.48px; }
.metric strong { color: var(--bq-ink); font-size: 28px; font-weight: 750; letter-spacing: -1.2px; }
.metric em { display: inline-block; margin-left: 5px; padding: 3px 6px; border-radius: 6px; color: var(--bq-green-700); background: var(--bq-mint-50); font-size: 8px; font-style: normal; font-weight: 700; }

.grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.85fr); gap: 18px; }
.message-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 0.74fr); gap: 18px; }

.card, .form-card, .org-section {
  border: 1px solid var(--bq-border);
  border-radius: var(--radius-card);
  background: var(--bq-surface);
  box-shadow: var(--shadow);
}

.card, .form-card, .org-section { padding: 20px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.card-title h3, .form-card h3 { margin: 0; color: var(--bq-ink); font-size: 12px; font-weight: 750; }
.card-title span { color: var(--bq-green-600); font-size: 9px; font-weight: 750; cursor: pointer; }
.form-card h3 { margin-bottom: 17px; }

.bar-row { display: grid; grid-template-columns: minmax(85px, 130px) 1fr 34px; align-items: center; gap: 10px; margin: 14px 0; color: #385149; font-size: 10px; }
.bar-row b { color: var(--bq-ink); text-align: right; }
.bar-track { height: 7px; overflow: hidden; border-radius: 20px; background: #edf2ef; }
.bar-fill, .bar-row:nth-child(3) .bar-fill, .bar-row:nth-child(4) .bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--bq-green-900), var(--bq-green-600)); }

.announcement { position: relative; margin: 13px 0; padding: 1px 0 1px 14px; border-left: 2px solid #76b8a4; }
.announcement h4 { margin: 0 0 4px; color: var(--bq-ink); font-size: 11px; }
.announcement p { margin: 0; color: var(--bq-muted); font-size: 10px; line-height: 1.6; }
.announcement small { display: block; margin-top: 5px; color: var(--bq-subtle); font-size: 8px; }

.quick-list { display: grid; gap: 8px; }
.quick { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid transparent; border-radius: 12px; background: #fafcfb; }
.quick:hover { border-color: var(--bq-border); background: var(--bq-mint-50); }
.quick .quick-icon { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 9px; color: var(--bq-green-700); background: var(--bq-mint-100); font-size: 15px; }
.quick b { display: block; color: var(--bq-ink); font-size: 10px; }
.quick small { color: var(--bq-muted); font-size: 9px; }
.quick > span:last-child { margin-left: auto; color: var(--bq-subtle); }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.search { width: min(100%, 340px); min-height: 40px; border: 1px solid var(--bq-border); border-radius: 10px; padding: 9px 12px; color: var(--bq-ink); background: #fbfcfb; font-size: 11px; outline: 0; }
.search:focus { border-color: #73ac99; background: #fff; box-shadow: 0 0 0 3px rgba(30, 127, 103, 0.09); }

.table-wrap { overflow: auto; border: 1px solid var(--bq-border); border-radius: 12px; }
.card > .table-wrap { margin: -1px; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th { padding: 12px 13px; border-bottom: 1px solid var(--bq-border); color: #82918c; background: #fafcfb; font-size: 8px; font-weight: 800; letter-spacing: 0.65px; text-align: left; text-transform: uppercase; }
.data-table td { padding: 13px; border-bottom: 1px solid #edf2ef; color: #344b44; font-size: 10px; vertical-align: middle; }
.data-table tbody tr { transition: background-color 0.15s ease; }
.data-table tbody tr:hover { background: #fbfdfc; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td > b { color: var(--bq-ink); }
.data-table td small { color: var(--bq-muted); }

.employee-cell { display: flex; align-items: center; gap: 10px; }
.employee-cell .avatar { width: 31px; height: 31px; flex-basis: 31px; border-radius: 9px; font-size: 8px; }
.employee-cell b { display: block; color: var(--bq-ink); font-size: 10px; }
.employee-cell small { display: block; margin-top: 3px; color: var(--bq-muted); font-size: 8px; }

.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 8px; font-weight: 750; }
.badge.active, .badge.present { color: #17705a; background: #e1f3ec; }
.badge.probation, .badge.late { color: #946321; background: #f8efdf; }
.badge.leave, .badge.absent_excused, .badge.business_trip { color: #3f6974; background: #e7f0f2; }
.badge.terminated, .badge.absent_unexcused { color: #a14850; background: #f8e8e9; }

.row-action { min-height: 29px; border: 1px solid var(--bq-border); border-radius: 8px; padding: 6px 9px; color: var(--bq-green-700); background: #fff; font-size: 8px; font-weight: 750; cursor: pointer; }
.row-action:hover { border-color: #b9d1c7; background: var(--bq-mint-50); }
.row-action.danger { color: var(--bq-danger); }
.empty { padding: 35px; color: var(--bq-muted); font-size: 11px; text-align: center; }

.field { display: grid; gap: 7px; margin-bottom: 13px; }
.field label { color: #71817b; font-size: 8px; font-weight: 800; letter-spacing: 0.58px; text-transform: uppercase; }
.field input, .field textarea, .field select, .status-select {
  width: 100%;
  min-height: 41px;
  border: 1px solid var(--bq-border);
  border-radius: var(--radius-control);
  padding: 9px 11px;
  color: var(--bq-ink);
  background: #fff;
  font-size: 10px;
  outline: none;
}
.field textarea { min-height: 98px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus, .status-select:focus { border-color: #6eaa96; box-shadow: 0 0 0 3px rgba(30, 127, 103, 0.09); }
.field input:disabled { color: var(--bq-muted); background: #f3f6f4; }
.status-select { min-height: 32px; padding: 5px 8px; background: #f7faf8; font-size: 8px; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }

.privacy-note { margin-bottom: 14px; padding: 12px 14px; border: 1px solid #d8e8e1; border-radius: 11px; color: #3e6257; background: var(--bq-mint-50); font-size: 9px; line-height: 1.6; }

.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 22px; background: rgba(4, 27, 22, 0.48); backdrop-filter: blur(5px); }
.modal { width: min(680px, 100%); max-height: 90vh; overflow: auto; border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 20px; padding: 25px; background: #fff; box-shadow: 0 30px 85px rgba(4, 27, 22, 0.25); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.modal-head h3 { margin: 0; color: var(--bq-ink); font-size: 16px; letter-spacing: -0.35px; }
.modal-head span { color: var(--bq-muted) !important; }
.employee-profile-identity { display: flex; align-items: center; gap: 15px; }
.employee-profile-photo { width: 78px; height: 78px; flex: 0 0 78px; border: 3px solid rgba(255,255,255,.9); border-radius: 22px; box-shadow: 0 12px 28px rgba(15,61,50,.18); font-size: 18px; }
.employee-profile-identity small { display: block; margin-top: 6px; color: var(--bq-green-600); font-size: 8px; font-weight: 750; }
.close { width: 31px; height: 31px; flex: 0 0 31px; border: 1px solid var(--bq-border); border-radius: 9px; color: var(--bq-muted); background: #f8faf9; font-size: 17px; cursor: pointer; }
.close:hover { color: var(--bq-ink); background: var(--bq-mint-50); }

.history { margin: 13px 0 2px 5px; padding-left: 15px; border-left: 2px solid #b8d9cd; }
.history div { position: relative; padding: 0 0 14px; color: #3d554e; font-size: 10px; }
.history div::before { content: ""; position: absolute; left: -20px; top: 4px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: var(--bq-green-600); box-shadow: 0 0 0 1px #8fc3b2; }
.history small { display: block; margin-top: 3px; color: var(--bq-muted); font-size: 8px; }

.employee-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 15px 0; }
.employee-facts span { padding: 11px; border: 1px solid var(--bq-border); border-radius: 10px; color: #385149; background: #fafcfb; font-size: 9px; }
.employee-facts b { display: block; margin-bottom: 5px; color: var(--bq-muted); font-size: 7px; letter-spacing: 0.55px; text-transform: uppercase; }

.schedule-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; padding: 13px; border: 1px solid var(--bq-border); border-radius: 12px; background: #fafcfb; }
.schedule-card b, .schedule-card span { display: block; }
.schedule-card b { color: var(--bq-ink); font-size: 10px; }
.schedule-card span { margin-top: 3px; color: var(--bq-muted); font-size: 8px; }
.salary-card { border-color: #c7dfd6; background: linear-gradient(135deg, #f8fcfa 0%, #e3f4ed 62%, #fbf1e2 120%); }
.salary-card span { color: var(--bq-green-700); font-weight: 700; }
.weekday-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 11px; border: 1px solid var(--bq-border); border-radius: 10px; background: #fafcfb; }
.weekday-grid label { color: var(--bq-ink); font-size: 9px; letter-spacing: 0; text-transform: none; }
.weekday-grid input { accent-color: var(--bq-green-600); }

.attendance-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding: 15px 18px; border: 1px solid var(--bq-border); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.attendance-toolbar .field { margin: 0; }
.attendance-filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.attendance-filters .field { min-width: 170px; }
.attendance-filters select, .attendance-filters input { min-height: 41px; }
.attendance-presence-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: -7px 0 18px; }
.attendance-presence-filter button { display: flex; align-items: center; justify-content: space-between; min-height: 48px; border: 1px solid var(--bq-border); border-radius: 13px; padding: 9px 14px; color: var(--bq-muted); background: linear-gradient(135deg, #fff, #edf7f3); box-shadow: 0 8px 22px rgba(15,61,50,.06); cursor: pointer; }
.attendance-presence-filter span { font-size: 9px; font-weight: 750; }
.attendance-presence-filter b { display: grid; min-width: 29px; height: 29px; place-items: center; border-radius: 9px; color: var(--bq-green-700); background: rgba(27,133,105,.1); font-size: 11px; }
.attendance-presence-filter button.present { background: linear-gradient(135deg, #fff, #e3f5ed); }
.attendance-presence-filter button.absent { background: linear-gradient(135deg, #fff, #f8e8e8); }
.attendance-presence-filter button.active { border-color: #2d9275; color: #fff; background: linear-gradient(135deg, #0f3d32, #269276 72%, #66c5a5); box-shadow: 0 12px 28px rgba(15,61,50,.18); }
.attendance-presence-filter button.active b { color: #fff; background: rgba(255,255,255,.18); }
.data-table tbody tr.attendance-absent-row { background: linear-gradient(90deg, rgba(250,232,232,.76), rgba(255,249,244,.72)); }
.data-table tbody tr.attendance-absent-row:hover { background: linear-gradient(90deg, rgba(247,217,220,.86), rgba(254,242,232,.82)); }
.sync-state { text-align: right; }
.sync-state b, .sync-state span { display: block; }
.sync-state b { color: var(--bq-green-600); font-size: 15px; }
.sync-state span { margin-top: 3px; color: var(--bq-muted); font-size: 8px; letter-spacing: 0.5px; text-transform: uppercase; }
.device-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.device-status { padding: 12px; border: 1px solid var(--bq-border); border-left: 3px solid var(--bq-danger); border-radius: 12px; background: #fff; }
.device-status.online { border-left-color: var(--bq-green-600); }
.device-status b, .device-status span, .device-status small { display: block; }
.device-status b { color: var(--bq-ink); font-size: 10px; }
.device-status span { margin-top: 4px; color: var(--bq-muted); font-size: 8px; }
.device-status small { margin-top: 7px; color: var(--bq-subtle); font-size: 7px; line-height: 1.5; }
.attendance-moment { display: flex; align-items: center; gap: 8px; }
.attendance-moment a { width: 38px; height: 38px; flex: 0 0 38px; overflow: hidden; border: 2px solid #fff; border-radius: 10px; background: #e7f3ee; box-shadow: 0 5px 13px rgba(15, 61, 50, .16); }
.attendance-moment img { width: 100%; height: 100%; object-fit: cover; }
.attendance-moment b { color: var(--bq-ink); font-size: 10px; }
.attendance-photo-empty { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 1px dashed #cbdad4; border-radius: 10px; color: #97a59f; background: linear-gradient(145deg, #f8fbfa, #edf4f1); font-size: 6px; text-align: center; }

.payroll-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.payroll-metrics .metric strong { font-size: clamp(16px, 1.65vw, 25px); }
.payroll-rule { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; padding: 14px 17px; border: 1px solid #d8e7df; border-radius: 14px; color: #39574e; background: linear-gradient(120deg, #e2f3ec 0%, #f8f1e5 100%); font-size: 9px; line-height: 1.65; }
.payroll-rule b { flex: 0 0 auto; color: var(--bq-green-800); font-size: 9px; }
.payroll-warning { display: inline-block; padding: 4px 7px; border-radius: 999px; color: #9a6423; background: linear-gradient(135deg, #f4e2c4, #fbf4e8); font-size: 8px; font-weight: 750; }
.payroll-unconfigured { background: rgba(249, 242, 228, 0.32); }
.payroll-negative { color: #b04f58 !important; }
.payroll-final { color: var(--bq-green-700) !important; }
.payroll-breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.payroll-breakdown > div { padding: 13px; border: 1px solid var(--bq-border); border-radius: 12px; background: linear-gradient(135deg, #fbfdfc, #eaf6f1 70%, #fbf4e9); }
.payroll-breakdown span, .payroll-breakdown b { display: block; }
.payroll-breakdown span { margin-bottom: 6px; color: var(--bq-muted); font-size: 7px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.payroll-breakdown b { color: var(--bq-ink); font-size: 11px; }
.payroll-detail-title { margin: 16px 0 7px; color: var(--bq-ink); font-size: 10px; }
.payroll-detail-list { display: grid; gap: 6px; }
.payroll-detail-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 1px solid var(--bq-border); border-radius: 9px; color: var(--bq-muted); background: linear-gradient(145deg, #fff, #f2f9f6); font-size: 9px; }
.payroll-detail-list b { color: var(--bq-ink); }
.payroll-detail-empty { display: block !important; padding: 12px !important; }
[hidden] { display: none !important; }

.org-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.org-summary > div { padding: 17px; border: 1px solid var(--bq-border); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.org-summary b { display: block; color: var(--bq-green-900); font-size: 25px; letter-spacing: -1px; }
.org-summary span { color: var(--bq-muted); font-size: 8px; letter-spacing: 0.52px; text-transform: uppercase; }
.org-section { margin-bottom: 16px; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 9px; }
.org-node { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--bq-border); border-left: 3px solid var(--bq-green-600); border-radius: 11px; background: #fbfdfc; }
.org-node.vacant { border-left-color: #c18a49; background: #fdf9f2; }
.org-node-icon { width: 35px; height: 35px; flex: 0 0 35px; display: grid; place-items: center; border-radius: 10px; color: var(--bq-green-700); background: var(--bq-mint-100); font-size: 9px; font-weight: 800; }
.org-node b, .org-node span, .org-node small { display: block; }
.org-node b { color: var(--bq-ink); font-size: 9px; }
.org-node span { margin-top: 4px; color: var(--bq-muted); font-size: 8px; }
.org-node small { margin-top: 5px; color: var(--bq-green-600); font-size: 7px; }

.org-page-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; padding: 3px 2px 7px; }
.org-page-tabs button { display: flex; align-items: center; gap: 8px; min-height: 37px; border: 1px solid var(--bq-border); border-radius: 11px; padding: 7px 12px; color: var(--bq-muted); background: linear-gradient(145deg, #fff, #edf7f3); font-size: 9px; font-weight: 750; white-space: nowrap; cursor: pointer; }
.org-page-tabs button.active { border-color: #69b49b; color: #fff; background: linear-gradient(135deg, #0f3d32, #2a9276 70%, #68c6a6); box-shadow: 0 8px 20px rgba(15,61,50,.18); }
.org-page-tabs small { display: grid; min-width: 21px; height: 21px; place-items: center; border-radius: 999px; color: inherit; background: rgba(255,255,255,.18); font-size: 7px; }
.org-board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--bq-border); border-radius: 12px; background: linear-gradient(120deg, #fff, #edf7f3 68%, #faf3e7); }
.org-board-toolbar > div { display: flex; align-items: center; gap: 6px; }
.org-board-toolbar > div > b { min-width: 43px; color: var(--bq-green-700); font-size: 9px; text-align: center; }
.org-board-toolbar > span { color: var(--bq-muted); font-size: 8px; }
.org-connect-notice { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 10px 13px; border: 1px solid #e2cfaa; border-radius: 11px; color: #735321; background: linear-gradient(120deg, #fff4dc, #edf8f3); font-size: 9px; }
.org-connect-notice span { flex: 1; }
.org-canvas-shell { position: relative; height: min(72vh, 760px); min-height: 540px; overflow: auto; border: 1px solid #cbded6; border-radius: 18px; background-color: #f8fcfa; background-image: radial-gradient(circle, rgba(74,126,108,.22) 1px, transparent 1.2px), linear-gradient(135deg, rgba(227,244,237,.42), rgba(250,244,234,.32)); background-size: 22px 22px, 100% 100%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.75), 0 18px 45px rgba(15,61,50,.08); cursor: grab; user-select: none; touch-action: none; }
.org-canvas-shell.panning { cursor: grabbing; }
.org-canvas-stage { position: relative; }
.org-canvas-transform { position: absolute; inset: 0 auto auto 0; transform-origin: 0 0; }
.org-edge-layer { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.org-edge-path { fill: none; stroke: #6d9f8e; stroke-width: 2; stroke-linecap: round; opacity: .78; filter: drop-shadow(0 2px 2px rgba(15,61,50,.08)); }
.org-edge-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.org-edge-hit:hover + .org-edge-path, .org-edge-path:has(+ .org-edge-hit:hover) { stroke: #be5b62; stroke-width: 3; }
.org-canvas-node { position: absolute; z-index: 2; width: 224px; min-height: 88px; border: 1px solid #bdd8ce; border-top: 4px solid #1e7f67; border-radius: 14px; padding: 13px 12px 12px; color: var(--bq-ink); background: radial-gradient(circle at 100% 0%, rgba(96,197,161,.15), transparent 8rem), linear-gradient(145deg, #fff, #edf8f3 76%, #faf2e5); box-shadow: 0 12px 28px rgba(16,70,57,.13); cursor: move; transition: border-color .15s, box-shadow .15s, transform .15s; }
.org-canvas-node:hover { z-index: 4; border-color: #70b69f; box-shadow: 0 16px 34px rgba(16,70,57,.19); transform: translateY(-1px); }
.org-canvas-node.dragging { z-index: 8; transform: scale(1.02); box-shadow: 0 22px 44px rgba(15,61,50,.23); }
.org-canvas-node.vacant { border-color: #dfc49a; border-top-color: #ba7c31; background: radial-gradient(circle at 100% 0%, rgba(222,175,101,.18), transparent 8rem), linear-gradient(145deg, #fffdf8, #f7ecd9); }
.org-canvas-node.connecting { border-color: #7c6be7; box-shadow: 0 0 0 4px rgba(124,107,231,.14), 0 18px 36px rgba(15,61,50,.16); }
.org-node-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.org-node-avatar { position: relative; width: 39px; height: 39px; flex: 0 0 39px; display: grid; place-items: center; overflow: hidden; border-radius: 11px; color: #fff; background: linear-gradient(145deg, #0f3d32, #2f9d7e 72%, #76ceb0); font-size: 9px; font-weight: 800; }
.org-node-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.org-node-copy { min-width: 0; }
.org-node-copy b, .org-node-copy span { display: block; overflow: hidden; text-overflow: ellipsis; }
.org-node-copy b { color: var(--bq-ink); font-size: 9px; line-height: 1.35; white-space: normal; }
.org-node-copy span { margin-top: 4px; color: var(--bq-muted); font-size: 8px; white-space: nowrap; }
.org-node-actions { position: absolute; top: 6px; right: 7px; display: flex; gap: 3px; opacity: 0; transition: opacity .15s; }
.org-canvas-node:hover .org-node-actions { opacity: 1; }
.org-node-actions button { width: 24px; height: 24px; border: 1px solid rgba(188,211,202,.86); border-radius: 7px; color: var(--bq-green-700); background: rgba(255,255,255,.94); font-size: 10px; cursor: pointer; }
.org-node-actions button:hover { background: #e2f4ed; }
.org-add-child { position: absolute; left: 50%; bottom: -14px; z-index: 4; width: 28px; height: 28px; display: grid; place-items: center; transform: translateX(-50%); border: 2px solid #fff; border-radius: 50%; color: #fff; background: linear-gradient(145deg, #0f3d32, #35a181); box-shadow: 0 6px 14px rgba(15,61,50,.22); font-size: 16px; line-height: 1; cursor: pointer; }
.org-add-child:hover { transform: translateX(-50%) scale(1.1); }
.org-vacant-check { display: flex; align-items: center; gap: 8px; margin: 4px 0 15px; color: var(--bq-ink); font-size: 9px; }
.org-vacant-check input { accent-color: var(--bq-green-600); }

.toast { position: fixed; right: 26px; bottom: 26px; z-index: 40; max-width: min(380px, calc(100vw - 36px)); padding: 12px 16px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 11px; color: #fff; background: var(--bq-green-900); box-shadow: 0 18px 45px rgba(4, 30, 24, 0.24); font-size: 10px; opacity: 0; transform: translateY(80px); transition: 0.25s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }

.login-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; overflow: auto; padding: 28px; background: var(--bq-green-900); }
.login-screen::before, .login-screen::after { content: ""; position: fixed; border: 1px solid rgba(132, 221, 188, 0.13); border-radius: 50%; pointer-events: none; }
.login-screen::before { width: 620px; height: 620px; right: -270px; top: -250px; }
.login-screen::after { width: 460px; height: 460px; left: -240px; bottom: -240px; }
.login-card { position: relative; width: min(430px, 100%); padding: 36px; border: 1px solid rgba(255, 255, 255, 0.76); border-radius: 24px; background: var(--bq-canvas); box-shadow: 0 34px 90px rgba(0, 20, 15, 0.3); }
.login-brand { min-height: auto; margin-bottom: 27px; padding: 0; color: var(--bq-ink); }
.login-brand .brand-symbol { width: 47px; height: 52px; flex-basis: 47px; }
.login-brand .brand-copy b { color: var(--bq-ink); font-size: 21px; }
.login-brand .brand-copy small { color: var(--bq-muted); font-size: 9px; }
.login-card h2 { margin: 0 0 7px; color: var(--bq-ink); font-size: 23px; letter-spacing: -0.65px; }
.login-card > p { margin: 0 0 24px; color: var(--bq-muted); font-size: 10px; line-height: 1.55; }
.login-error { margin-bottom: 14px; padding: 10px 12px; border: 1px solid #efd3d5; border-radius: 9px; color: #9e444c; background: #f9e9ea; font-size: 9px; }

/* Gradient-led BoshQosh visual system. The approved logo artwork remains unchanged. */
html,
body {
  background: var(--gradient-canvas);
}

body {
  background-attachment: fixed;
}

.sidebar {
  background:
    radial-gradient(circle at 18% 10%, rgba(126, 230, 192, 0.22), transparent 15rem),
    radial-gradient(circle at 92% 86%, rgba(116, 212, 179, 0.2), transparent 18rem),
    linear-gradient(165deg, #0b3028 0%, #115041 42%, #1e7f67 100%);
}

.nav-item:hover {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(129, 226, 192, 0.16));
}

.nav-item.active {
  background: linear-gradient(115deg, #20876d 0%, #35a282 58%, #66c8a6 135%);
  box-shadow: 0 10px 26px rgba(2, 35, 27, 0.25);
}

.nav-item.active .nav-icon,
.logout-button {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
}

.topbar {
  background:
    radial-gradient(circle at 88% 0%, rgba(79, 183, 148, 0.13), transparent 17rem),
    linear-gradient(105deg, rgba(255, 255, 255, 0.96), rgba(238, 248, 244, 0.93) 62%, rgba(250, 246, 238, 0.94));
}

.topbar-date,
.icon-button {
  background: linear-gradient(145deg, #ffffff, #edf7f3);
  box-shadow: 0 6px 18px rgba(15, 61, 50, 0.055);
}

.icon-button:hover {
  background: linear-gradient(135deg, #e8f7f1, #f9f2e7);
}

.avatar,
.purple,
.orange {
  background: linear-gradient(145deg, #0f3d32 0%, #1e7f67 58%, #59b99a 120%);
}

.button {
  border-color: transparent;
  background: var(--gradient-brand-bright);
  box-shadow: 0 9px 24px rgba(30, 127, 103, 0.22);
}

.button:hover {
  background: linear-gradient(135deg, #0f3d32 0%, #248b70 52%, #55bd9a 100%);
}

.button.ghost,
.row-action {
  background: linear-gradient(145deg, #ffffff 0%, #edf7f3 100%);
}

.button.ghost:hover,
.row-action:hover {
  background: linear-gradient(135deg, #e5f5ef 0%, #fbf4e9 100%);
}

.button.secondary {
  background: linear-gradient(135deg, #dff3eb 0%, #f3eadc 100%);
}

.metric {
  border-color: rgba(196, 219, 210, 0.86);
  background:
    radial-gradient(circle at 100% 0%, var(--tone, #e7f3ee), transparent 48%),
    linear-gradient(145deg, #ffffff 12%, #f5fbf8 100%);
  box-shadow: 0 16px 38px rgba(19, 78, 64, 0.075);
}

.metric::after {
  background: linear-gradient(145deg, var(--tone, #e7f3ee), rgba(255, 255, 255, 0.45));
}

.metric .metric-icon {
  background: linear-gradient(145deg, var(--tone, #e7f3ee), #ffffff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 7px 18px rgba(15, 61, 50, 0.06);
}

.metric em {
  background: linear-gradient(135deg, #dff3eb, #f4eee2);
}

.card,
.form-card,
.org-section {
  border-color: rgba(201, 221, 213, 0.86);
  background:
    radial-gradient(circle at 100% 0%, rgba(95, 193, 159, 0.055), transparent 16rem),
    var(--gradient-surface);
  box-shadow: 0 16px 42px rgba(15, 61, 50, 0.065);
}

.bar-track {
  background: linear-gradient(90deg, #e8f0ec, #f5eee4);
}

.bar-fill,
.bar-row:nth-child(3) .bar-fill,
.bar-row:nth-child(4) .bar-fill {
  background: linear-gradient(90deg, #0f3d32 0%, #1e7f67 58%, #65c4a4 100%);
}

.quick,
.employee-facts span,
.schedule-card,
.weekday-grid {
  background: linear-gradient(135deg, #fbfdfc 0%, #edf7f3 66%, #faf5ec 120%);
}

.quick:hover {
  background: linear-gradient(135deg, #e4f5ee 0%, #fbf4e9 100%);
}

.quick .quick-icon,
.org-node-icon {
  background: linear-gradient(145deg, #d9f1e7 0%, #f7eddd 100%);
}

.search,
.field input,
.field textarea,
.field select,
.status-select {
  background: linear-gradient(145deg, #ffffff 0%, #f3f9f6 100%);
}

.search:focus,
.field input:focus,
.field textarea:focus,
.field select:focus,
.status-select:focus {
  background: linear-gradient(145deg, #ffffff 0%, #edfaf5 100%);
}

.table-wrap {
  background: linear-gradient(145deg, #ffffff, #f6fbf8);
}

.data-table th {
  background: linear-gradient(90deg, #edf7f3 0%, #f8f5ed 100%);
}

.data-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(224, 244, 236, 0.6), rgba(250, 244, 233, 0.48));
}

.badge.active,
.badge.present {
  background: linear-gradient(135deg, #d7f0e6, #edf8f4);
}

.badge.probation,
.badge.late {
  background: linear-gradient(135deg, #f5e5c9, #fbf4e8);
}

.badge.leave,
.badge.absent_excused,
.badge.business_trip {
  background: linear-gradient(135deg, #deedef, #eff6f3);
}

.badge.terminated,
.badge.absent_unexcused,
.login-error {
  background: linear-gradient(135deg, #f5dfe1, #fbefeb);
}

.privacy-note {
  background: linear-gradient(120deg, #e4f4ee 0%, #f7f1e6 100%);
}

.modal-backdrop {
  background:
    radial-gradient(circle at 18% 12%, rgba(88, 197, 159, 0.24), transparent 24rem),
    linear-gradient(135deg, rgba(4, 27, 22, 0.62), rgba(30, 127, 103, 0.38));
}

.modal {
  background:
    radial-gradient(circle at 100% 0%, rgba(91, 197, 159, 0.11), transparent 18rem),
    linear-gradient(145deg, #ffffff 0%, #f4faf7 72%, #fbf5eb 115%);
}

.close {
  background: linear-gradient(145deg, #ffffff, #eaf5f0);
}

.attendance-toolbar,
.device-status,
.org-summary > div {
  background:
    radial-gradient(circle at 100% 0%, rgba(78, 185, 148, 0.1), transparent 11rem),
    linear-gradient(145deg, #ffffff 0%, #f1f9f6 72%, #fbf5eb 120%);
}

.org-node {
  background: linear-gradient(135deg, #fbfdfc 0%, #eaf6f1 100%);
}

.org-node.vacant {
  background: linear-gradient(135deg, #fffdf8 0%, #f7ead8 100%);
}

.toast {
  background: var(--gradient-brand);
}

.login-screen {
  background:
    radial-gradient(circle at 14% 12%, rgba(100, 222, 179, 0.35), transparent 24rem),
    radial-gradient(circle at 88% 82%, rgba(209, 175, 112, 0.18), transparent 22rem),
    linear-gradient(145deg, #092b24 0%, #0f4b3d 44%, #24896f 100%);
}

.login-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(94, 198, 161, 0.13), transparent 15rem),
    linear-gradient(145deg, #ffffff 0%, #eff8f4 68%, #fbf3e7 120%);
}

@media (max-width: 1180px) {
  :root { --sidebar-width: 84px; }
  .sidebar { padding-inline: 12px; }
  .brand { justify-content: center; padding: 0; }
  .brand-copy, .workspace-label, .nav-label, .sidebar-person, .online-dot { display: none; }
  .login-brand { justify-content: flex-start; }
  .login-brand .brand-copy { display: grid; }
  .brand-symbol { width: 38px; flex-basis: 38px; }
  .nav-item { justify-content: center; padding-inline: 8px; }
  .nav-icon { width: 30px; flex-basis: 30px; }
  .sidebar-bottom { justify-content: center; padding-inline: 0; }
  .logout-button { margin-left: 0; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid, .message-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .topbar { min-height: 90px; padding: 18px 22px; }
  .content { padding: 24px 22px 44px; }
  .profile span, .profile > b, .topbar-date { display: none; }
  .device-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attendance-toolbar { align-items: stretch; flex-direction: column; }
  .attendance-filters { display: grid; grid-template-columns: 1fr; }
  .attendance-filters .field { min-width: 0; }
  .sync-state { text-align: left; }
  .org-board-toolbar { align-items: stretch; flex-direction: column; }
  .org-board-toolbar > div:last-child { justify-content: flex-start; }
  .org-canvas-shell { height: 66vh; min-height: 500px; }
}

@media (max-width: 620px) {
  :root { --sidebar-width: 66px; }
  .sidebar { padding-inline: 8px; }
  .brand-symbol { width: 34px; height: 39px; flex-basis: 34px; }
  .nav-item { min-height: 40px; }
  .topbar { padding: 16px; }
  .eyebrow { font-size: 7px; }
  .content { padding: 20px 13px 38px; }
  .page-head, .overview-head { align-items: flex-start; flex-direction: column; }
  .head-actions { width: 100%; }
  .head-actions .button { flex: 1; }
  .metrics { grid-template-columns: 1fr; gap: 10px; }
  .metric { min-height: 132px; }
  .form-grid, .employee-facts, .org-summary { grid-template-columns: 1fr; }
  .payroll-metrics, .payroll-breakdown { grid-template-columns: 1fr; }
  .payroll-rule { flex-direction: column; gap: 5px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search { width: 100%; max-width: none; }
  .access-note { margin-left: 0; }
  .modal-backdrop { padding: 10px; }
  .modal { padding: 19px; border-radius: 16px; }
  .login-screen { padding: 16px; }
  .login-card { padding: 27px 23px; border-radius: 19px; }
  .device-grid { grid-template-columns: 1fr; }
  .attendance-presence-filter { grid-template-columns: 1fr; }
  .org-page-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; }
  .org-page-tabs .button { flex: 0 0 auto; }
  .org-canvas-shell { min-height: 460px; border-radius: 14px; }
}

/* Mandarin + marjon theme. Green is reserved for positive/online states only. */
.sidebar {
  background:
    radial-gradient(circle at 14% 10%, rgba(255, 184, 122, 0.2), transparent 16rem),
    radial-gradient(circle at 90% 88%, rgba(240, 82, 58, 0.22), transparent 19rem),
    linear-gradient(160deg, #421c0b 0%, #8b3210 52%, #d6530b 100%);
  box-shadow: 8px 0 30px rgba(94, 35, 10, 0.14);
}

.workspace-label { color: rgba(255, 225, 207, 0.58); }
.nav-icon { color: #ffc0a0; }
.nav-item:hover { background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,189,153,.17)); }
.nav-item.active {
  background: linear-gradient(115deg, #f97316 0%, #f0523a 100%);
  box-shadow: 0 10px 26px rgba(74, 22, 7, 0.28);
}
.online-dot { border-color: #421c0b; background: #39c88c; }

.topbar {
  border-bottom-color: rgba(240, 223, 211, 0.92);
  background:
    radial-gradient(circle at 88% 0%, rgba(249, 115, 22, 0.12), transparent 18rem),
    linear-gradient(105deg, rgba(255,255,255,.97), rgba(255,246,239,.95) 62%, rgba(255,241,232,.96));
}
.topbar-date,
.icon-button { background: linear-gradient(145deg, #ffffff, #fff2ec); box-shadow: 0 6px 18px rgba(94,35,10,.07); }
.icon-button:hover { background: linear-gradient(135deg, #ffe8de, #fff6f1); }
.date-clock,
.eyebrow { color: #f97316; }

.avatar,
.purple,
.orange { background: linear-gradient(145deg, #9a3412 0%, #f97316 58%, #f0523a 120%); }

.button {
  border-color: transparent;
  background: linear-gradient(135deg, #f97316 0%, #f0523a 100%);
  box-shadow: 0 9px 24px rgba(240,82,58,.22);
}
.button:hover { background: linear-gradient(135deg, #d6530b 0%, #e84938 100%); box-shadow: 0 11px 25px rgba(180,58,25,.25); }
.button.ghost,
.row-action { color: #9a3412; background: linear-gradient(145deg, #ffffff 0%, #fff2ec 100%); }
.button.ghost:hover,
.row-action:hover { border-color: #efbba5; background: linear-gradient(135deg, #ffe8de 0%, #fff6f1 100%); }
.button.secondary { color: #9a3412; background: linear-gradient(135deg, #ffe3d8 0%, #ffd8cc 100%); }

.metric {
  border-color: rgba(240, 213, 196, 0.9);
  background:
    radial-gradient(circle at 100% 0%, var(--tone, #ffe8de), transparent 48%),
    linear-gradient(145deg, #ffffff 12%, #fff8f3 100%);
  box-shadow: 0 16px 38px rgba(94,35,10,.08);
}
.metric::after { background: linear-gradient(145deg, var(--tone, #ffe8de), rgba(255,255,255,.48)); }
.metric .metric-icon { background: linear-gradient(145deg, var(--tone, #ffe8de), #ffffff); box-shadow: inset 0 0 0 1px rgba(255,255,255,.58), 0 7px 18px rgba(94,35,10,.07); }
.metric em { color: #9a3412; background: linear-gradient(135deg, #ffe3d8, #fff1e9); }
.metric[style*="--tone:#def2ea"] { --tone: #ffe3d8 !important; --accent: #f97316 !important; }
.metric[style*="--tone:#e7f3ee"] { --tone: #ffe8de !important; --accent: #9a3412 !important; }
.metric[style*="--tone:#f5eddf"] { --tone: #fff0e0 !important; --accent: #c76a11 !important; }

.card,
.form-card,
.org-section {
  border-color: rgba(240, 218, 204, 0.9);
  background:
    radial-gradient(circle at 100% 0%, rgba(249,115,22,.06), transparent 16rem),
    var(--gradient-surface);
  box-shadow: 0 16px 42px rgba(94,35,10,.07);
}
.card-title span { color: #f97316; }
.bar-row { color: #684839; }
.bar-track { background: linear-gradient(90deg, #f3e5dc, #fff3eb); }
.bar-fill,
.bar-row:nth-child(3) .bar-fill,
.bar-row:nth-child(4) .bar-fill { background: linear-gradient(90deg, #9a3412 0%, #f97316 58%, #f0523a 100%); }
.announcement { border-left-color: #f97316; }

.quick,
.employee-facts span,
.schedule-card,
.weekday-grid { background: linear-gradient(135deg, #fffdfb 0%, #fff1e9 66%, #fff8f3 120%); }
.quick:hover { background: linear-gradient(135deg, #ffe9df 0%, #fff7f2 100%); }
.quick .quick-icon,
.org-node-icon { color: #9a3412; background: linear-gradient(145deg, #ffe0d3 0%, #fff2ea 100%); }

.search,
.field input,
.field textarea,
.field select,
.status-select,
.time-picker select { background: linear-gradient(145deg, #ffffff 0%, #fff9f5 100%); }
.search:focus,
.field input:focus,
.field textarea:focus,
.field select:focus,
.status-select:focus,
.time-picker select:focus { border-color: #f97316; background: #fff; box-shadow: 0 0 0 3px rgba(249,115,22,.13); }
.field label { color: #8b6f60; }
.field input:disabled { background: #f8eee8; }
.time-picker > span { color: #f97316; }

.table-wrap { background: linear-gradient(145deg, #ffffff, #fffaf7); }
.data-table th { color: #9a8173; background: linear-gradient(90deg, #fff0e8 0%, #fff8f3 100%); }
.data-table td { border-bottom-color: #f4e7df; color: #5e4336; }
.data-table tbody tr:hover { background: linear-gradient(90deg, rgba(255,231,218,.62), rgba(255,248,243,.55)); }

.privacy-note { border-color: #f2d5c5; color: #714936; background: linear-gradient(120deg, #ffe8de 0%, #fff6f0 100%); }
.modal-backdrop {
  background:
    radial-gradient(circle at 18% 12%, rgba(249,115,22,.24), transparent 24rem),
    linear-gradient(135deg, rgba(53,20,8,.68), rgba(154,52,18,.43));
}
.modal {
  background:
    radial-gradient(circle at 100% 0%, rgba(249,115,22,.1), transparent 18rem),
    linear-gradient(145deg, #ffffff 0%, #fff8f3 72%, #fff1e9 115%);
  box-shadow: 0 30px 85px rgba(62,20,6,.28);
}
.close { background: linear-gradient(145deg, #ffffff, #fff0e8); }
.history { border-left-color: #efb79e; }
.history div { color: #684839; }
.history div::before { background: #f97316; box-shadow: 0 0 0 1px #efaa8a; }
.employee-profile-photo { box-shadow: 0 12px 28px rgba(94,35,10,.2); }

.salary-card { border-color: #efcdbb; background: linear-gradient(135deg, #fffaf6 0%, #ffe7dc 62%, #fff2ea 120%); }
.attendance-toolbar,
.device-status,
.org-summary > div {
  background:
    radial-gradient(circle at 100% 0%, rgba(249,115,22,.1), transparent 11rem),
    linear-gradient(145deg, #ffffff 0%, #fff8f3 72%, #fff1e9 120%);
}
.attendance-presence-filter button { background: linear-gradient(135deg, #fff, #fff1e9); box-shadow: 0 8px 22px rgba(94,35,10,.07); }
.attendance-presence-filter b { color: #9a3412; background: rgba(249,115,22,.1); }
.attendance-presence-filter button.present { background: linear-gradient(135deg, #fff, #edf8f3); }
.attendance-presence-filter button.absent { background: linear-gradient(135deg, #fff, #f8e8e8); }
.attendance-presence-filter button.active { border-color: transparent; background: linear-gradient(135deg, #f97316, #f0523a); box-shadow: 0 12px 28px rgba(240,82,58,.22); }
.sync-state b { color: #f97316; }
.device-status.online { border-left-color: #158a63; }
.attendance-moment a { background: #fff0e8; box-shadow: 0 5px 13px rgba(94,35,10,.16); }
.attendance-photo-empty { border-color: #e6cbbd; color: #a68c7e; background: linear-gradient(145deg, #fffaf7, #f7ebe4); }

.payroll-rule { border-color: #efd2c2; color: #6f4b39; background: linear-gradient(120deg, #ffe7dc 0%, #fff6ef 100%); }
.payroll-breakdown > div { background: linear-gradient(135deg, #fffdfb, #fff0e8 70%, #fff8f3); }
.payroll-detail-list > div { background: linear-gradient(145deg, #fff, #fff7f2); }
.payroll-final { color: #9a3412 !important; }

.org-summary b { color: #9a3412; }
.org-node { border-left-color: #f97316; background: linear-gradient(135deg, #fffdfb 0%, #fff0e8 100%); }
.org-page-tabs button { background: linear-gradient(145deg, #fff, #fff1e9); }
.org-page-tabs button.active { border-color: transparent; background: linear-gradient(135deg, #9a3412, #f97316 70%, #f0523a); box-shadow: 0 8px 20px rgba(154,52,18,.2); }
.org-board-toolbar { background: linear-gradient(120deg, #fff, #fff0e8 68%, #fff8f2); }
.org-board-toolbar > div > b { color: #9a3412; }
.org-connect-notice { background: linear-gradient(120deg, #fff3df, #fff0e8); }
.org-canvas-shell {
  border-color: #edcdbb;
  background-color: #fffaf6;
  background-image: radial-gradient(circle, rgba(198,92,42,.23) 1px, transparent 1.2px), linear-gradient(135deg, rgba(255,232,220,.45), rgba(255,248,242,.35));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.78), 0 18px 45px rgba(94,35,10,.09);
}
.org-edge-path { stroke: #c97852; filter: drop-shadow(0 2px 2px rgba(94,35,10,.09)); }
.org-canvas-node {
  border-color: #eac4b0;
  border-top-color: #f97316;
  background: radial-gradient(circle at 100% 0%, rgba(249,115,22,.15), transparent 8rem), linear-gradient(145deg, #fff, #fff0e8 76%, #fff8f2);
  box-shadow: 0 12px 28px rgba(94,35,10,.14);
}
.org-canvas-node:hover { border-color: #eb9b75; box-shadow: 0 16px 34px rgba(94,35,10,.2); }
.org-canvas-node.dragging { box-shadow: 0 22px 44px rgba(94,35,10,.24); }
.org-node-avatar { background: linear-gradient(145deg, #9a3412, #f97316 72%, #f0523a); }
.org-node-actions button { border-color: rgba(234,196,176,.9); color: #9a3412; }
.org-node-actions button:hover { background: #ffe7dc; }
.org-add-child { background: linear-gradient(145deg, #9a3412, #f97316 62%, #f0523a); box-shadow: 0 6px 14px rgba(154,52,18,.24); }

.toast { background: linear-gradient(135deg, #421c0b, #9a3412 48%, #f97316); box-shadow: 0 18px 45px rgba(62,20,6,.28); }
.login-screen {
  background:
    radial-gradient(circle at 14% 12%, rgba(255,181,133,.3), transparent 24rem),
    radial-gradient(circle at 88% 82%, rgba(240,82,58,.24), transparent 22rem),
    linear-gradient(145deg, #351406 0%, #7f2d0d 44%, #df590d 100%);
}
.login-screen::before,
.login-screen::after { border-color: rgba(255,208,181,.16); }
.login-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(249,115,22,.13), transparent 15rem),
    linear-gradient(145deg, #ffffff 0%, #fff7f2 68%, #ffede3 120%);
  box-shadow: 0 34px 90px rgba(48,15,4,.34);
}

/* Readability scale: larger text with wrapping and scroll-safe dense areas. */
body { font-size: 15px; }
.brand-copy b { font-size: 20px; }
.brand-copy small { font-size: 10px; }
.workspace-label { font-size: 10px; }
.nav-item { min-height: 45px; font-size: 13px; line-height: 1.25; }
.sidebar-bottom b { font-size: 12px; }
.sidebar-bottom small { font-size: 10px; }
.eyebrow { font-size: 10px; }
.topbar-date { font-size: 12px; }
.profile { font-size: 12px; }
.profile small { font-size: 10px; }
.page-head h2,
.overview-head h2 { font-size: 20px; }
.page-head p,
.overview-head p { font-size: 13px; }
.access-note { font-size: 11px; }
.button { min-height: 42px; font-size: 12px; line-height: 1.35; }

.metric p { font-size: 10px; }
.metric strong { font-size: 30px; }
.metric em { font-size: 9px; }
.card-title h3,
.form-card h3 { font-size: 14px; }
.card-title span { font-size: 11px; }
.bar-row { font-size: 12px; }
.announcement h4 { font-size: 13px; }
.announcement p { font-size: 12px; }
.announcement small { font-size: 10px; }
.quick b { font-size: 12px; }
.quick small { font-size: 11px; }

.search { min-height: 43px; font-size: 12px; }
.data-table th { padding: 13px 14px; font-size: 10px; }
.data-table td { padding: 14px; font-size: 12px; line-height: 1.4; }
.employee-cell b { font-size: 12px; }
.employee-cell small { font-size: 10px; }
.badge { padding: 5px 9px; font-size: 10px; }
.row-action { min-height: 32px; font-size: 10px; }
.empty { font-size: 12px; }

.field { gap: 8px; }
.field label { font-size: 10px; }
.field input,
.field textarea,
.field select,
.status-select { min-height: 44px; font-size: 12px; }
.status-select { min-height: 35px; }
.privacy-note { font-size: 11px; line-height: 1.65; }
.modal-head h3 { font-size: 18px; }
.employee-profile-identity small { font-size: 10px; }
.history div { font-size: 12px; line-height: 1.45; }
.history small { font-size: 10px; }
.employee-facts span { font-size: 11px; line-height: 1.45; }
.employee-facts b { font-size: 9px; }
.schedule-card b { font-size: 12px; }
.schedule-card span { font-size: 10px; }
.weekday-grid label { font-size: 11px; }

.attendance-presence-filter span { font-size: 11px; }
.attendance-presence-filter b { font-size: 12px; }
.sync-state span { font-size: 10px; }
.device-status b { font-size: 12px; }
.device-status span { font-size: 10px; }
.device-status small { font-size: 9px; }
.attendance-moment b { font-size: 12px; }
.attendance-photo-empty { font-size: 8px; }

.payroll-rule,
.payroll-rule b { font-size: 11px; }
.payroll-warning { font-size: 10px; }
.payroll-breakdown span { font-size: 9px; }
.payroll-breakdown b { font-size: 13px; }
.payroll-detail-title { font-size: 12px; }
.payroll-detail-list > div { font-size: 11px; }

.org-summary span { font-size: 10px; }
.org-node b { font-size: 11px; }
.org-node span { font-size: 10px; }
.org-node small { font-size: 9px; }
.org-page-tabs button { min-height: 40px; font-size: 11px; }
.org-board-toolbar > div > b { font-size: 11px; }
.org-board-toolbar > span,
.org-connect-notice { font-size: 10px; }
.org-node-copy b { font-size: 11px; }
.org-node-copy span { font-size: 9px; }
.toast { font-size: 12px; }

.login-brand .brand-copy small { font-size: 10px; }
.login-card h2 { font-size: 25px; }
.login-card > p { font-size: 12px; }
.login-error { font-size: 11px; }

.nav-label,
.page-head p,
.overview-head p,
.privacy-note,
.device-status small,
.payroll-rule { overflow-wrap: anywhere; }

@media (max-width: 820px) {
  .data-table th { font-size: 9px; }
  .data-table td { font-size: 11px; }
  .page-head h2,
  .overview-head h2 { font-size: 19px; }
}

@media (max-width: 620px) {
  body { font-size: 14px; }
  .metric strong { font-size: 27px; }
  .button { font-size: 11px; }
  .modal-head h3 { font-size: 17px; }
  .data-table th,
  .data-table td { white-space: nowrap; }
}
