:root {
  --zoho-red: #e42527;
  --zoho-blue: #0279c8;
  --zoho-blue-hover: #0169b0;
  --zoho-blue-soft: #e7f3fb;
  --bg: #f0f4f8;
  --panel: #ffffff;
  --sidebar: #f7f9fb;
  --line: #e4e8ee;
  --text: #313949;
  --muted: #6c737f;
  --ok: #128a4b;
  --ok-bg: #e8f7ee;
  --warn: #c47b00;
  --warn-bg: #fff6e5;
  --danger: #d93939;
  --danger-bg: #fdecec;
  --brand-green: #146b32;
  --brand-green-dark: #0e5426;
  --brand-green-soft: #e7f6ec;
  --brand-gold: #c49212;
  --brand-orange: #e23d18;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06);
  --header-h: 52px;
  --sidebar-w: 232px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nuosu", "Puvi", "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
a { color: var(--zoho-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell { min-height: 100vh; display: flex; flex-direction: column; }
.header {
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-top: 3px solid var(--brand-green);
  box-shadow: 0 2px 0 var(--brand-gold);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 196px;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.mark {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--zoho-red);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -1px;
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--brand-gold);
  background: #fff;
}
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: .01em; color: var(--brand-green); }
.brand-gold { color: var(--brand-gold); font-style: normal; }
.global-search {
  flex: 1;
  max-width: 560px;
  position: relative;
  overflow: hidden;
}
.global-search input {
  width: 100%;
  height: 34px;
  border: 1px solid #d7dee8;
  border-radius: 4px;
  background: #f7f9fb;
  padding: 0 12px 0 34px;
  color: var(--text);
}
.global-search input:focus {
  outline: none;
  border-color: var(--zoho-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(2, 121, 200, .12);
}
.header svg,
.icon-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.global-search svg {
  position: absolute;
  left: 10px;
  top: 8px;
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn.menu-toggle { display: none; }
.nav-overlay {
  display: none;
  pointer-events: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 30;
}
.sidebar-logout { display: none; }
.icon-btn {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  border-radius: 4px;
  color: #4a5568;
  display: grid;
  place-items: center;
  position: relative;
  text-decoration: none;
  cursor: pointer;
}
.icon-btn:hover { background: #eef2f6; text-decoration: none; }
.icon-btn .dot {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 8px;
  background: var(--zoho-red);
  color: #fff;
  font-size: 9px;
  line-height: 14px;
  text-align: center;
  font-weight: 700;
}
.userchip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
}
.userchip:hover { background: #eef2f6; text-decoration: none; }
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0b5cab;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}
.userchip small { display: block; color: var(--muted); font-size: 11px; line-height: 1.1; }
.userchip strong { font-size: 12px; }
.logout-link { color: var(--muted); font-size: 12px; margin-left: 4px; }

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  flex: 1;
  min-height: 0;
}
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  overflow: auto;
  padding: 10px 8px 24px;
}
.nav-filter {
  width: 100%;
  height: 30px;
  margin: 4px 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
  font-size: 12px;
}
.nav-section { margin: 2px 0; }
.nav-group {
  color: #8a93a0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 10px 8px 6px;
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  border-radius: 4px;
}
.nav-group:hover { background: #eef3f8; color: #5b6573; }
.nav-plus {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border: 1px solid #c5ced8;
  border-radius: 3px;
  background: #fff;
  color: #4a5568;
  font-size: 12px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}
.nav-plus::before { content: '+'; }
.nav-section.is-open > .nav-group .nav-plus::before { content: '\2212'; }
.nav-section:not(.is-open) > .nav-items { display: none; }
.nav-sub { margin: 0; }
.nav-sub > .nav-group {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 600;
  color: #3d4654;
  padding: 7px 10px;
}
.nav-sub > .nav-group:hover { color: var(--zoho-blue); }
.nav-sub .nav-items a { padding-left: 28px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 4px;
  color: #3d4654;
  font-size: 13px;
  text-decoration: none;
}
.nav a svg { width: 16px; height: 16px; flex: 0 0 16px; color: #6b7280; }
.nav a:hover { background: #eef3f8; text-decoration: none; }
.nav a.active {
  background: var(--brand-green-soft);
  color: var(--brand-green);
  font-weight: 600;
}
.nav a.active svg { color: var(--brand-green); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px 0;
}
.crumb { color: var(--muted); font-size: 12px; }
.crumb b { color: var(--text); font-size: 20px; font-weight: 600; display: block; margin-top: 2px; }
.content { padding: 16px 22px 32px; }
.page-title { margin: 0 0 14px; font-size: 18px; font-weight: 600; }

.grid { display: grid; gap: 14px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.card h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: #243040;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 3px solid var(--brand-green);
  padding: 14px 16px 14px 14px;
}
.kpi:nth-child(2) { border-left-color: var(--brand-gold); }
.kpi:nth-child(3) { border-left-color: var(--brand-orange); }
.kpi:nth-child(4) { border-left-color: #8e44ad; }
.kpi:nth-child(5) { border-left-color: #0279c8; }
.kpi:nth-child(6) { border-left-color: #16a085; }
.kpi:nth-child(7) { border-left-color: #c0392b; }
.kpi:nth-child(8) { border-left-color: #2c3e50; }
.kpi .label { color: var(--muted); font-size: 12px; }
.kpi .value { font-size: 24px; font-weight: 700; color: #1f2a37; }
a.kpi { text-decoration: none; color: inherit; }
a.kpi:hover { background: #f4f8fc; }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 9px 12px;
  border-bottom: 1px solid #eef1f5;
  text-align: left;
  font-size: 13px;
}
th {
  background: #f7f9fb;
  color: #5b6573;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--line);
}
tr:hover td { background: #f5f9fc; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-green);
  color: #fff;
  border: 1px solid var(--brand-green);
  border-radius: 4px;
  padding: 7px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--brand-green-dark); text-decoration: none; color: #fff; }
.btn.secondary {
  background: #fff;
  color: #334155;
  border-color: #cfd6de;
}
.btn.secondary:hover { background: #f7f9fb; color: #334155; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; white-space: nowrap; }
.row-actions .btn { height: 30px; padding: 0 10px; font-size: 12px; }

.form-row { margin-bottom: 12px; }
label { display: block; margin-bottom: 5px; color: #4b5563; font-size: 12px; font-weight: 600; }
input, select, textarea {
  width: 100%;
  background: #fff;
  color: var(--text);
  border: 1px solid #cfd6de;
  border-radius: 4px;
  padding: 8px 10px;
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--zoho-blue);
  box-shadow: 0 0 0 3px rgba(2, 121, 200, .12);
}
textarea { min-height: 90px; }

.alert { padding: 10px 12px; border-radius: 4px; margin-bottom: 14px; font-size: 13px; }
.alert.error { background: var(--danger-bg); color: #9b1c1c; border: 1px solid #f4c7c7; }
.invite-warnings div + div { margin-top: 4px; }
.alert.ok { background: var(--ok-bg); color: #0f6b3b; border: 1px solid #b7e4c7; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.muted { background: #eef1f5; color: #5b6573; }

.toolbar { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 14px; gap: 12px; }
.toolbar.split {
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
}
.muted { color: var(--muted); }
.userbox { text-align: right; }
.userbox small { color: var(--muted); }
.install-ok { color: var(--ok); font-size: 13px; }

.search-group { margin-bottom: 18px; }
.search-group h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; }

body.modal-lock { overflow: hidden; }
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, .45);
  z-index: 80;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px 24px;
  overflow: auto;
}
.modal-overlay.is-open { display: flex; }
.modal-dialog {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 16px 48px rgba(16, 24, 40, .22);
  animation: modalIn .12s ease-out;
}
.modal-dialog.wide { max-width: 780px; }
@keyframes modalIn {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; border: 0; padding: 0; }
.modal-close {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #667085;
  cursor: pointer;
  border-radius: 4px;
}
.modal-close:hover { background: #eef2f6; }
.modal-body { padding: 16px 18px 20px; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  background: #fff;
}
.login-hero {
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 214, 90, .42), transparent 34%),
    linear-gradient(155deg, #f26522 0%, #e23d18 26%, #1a7a34 70%, #0d5c28 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px;
}
.login-hero h2 { font-size: 32px; margin: 16px 0 10px; font-weight: 650; }
.login-hero p { max-width: 420px; opacity: .92; font-size: 15px; }
.login-panel { display: grid; place-items: center; background: #f7f9fb; }
.login-card {
  width: 400px;
  background: #fff;
  padding: 36px 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(16, 24, 40, .08);
}
.login-hero .brand-logo,
.login-card .brand-logo {
  width: 96px;
  height: 96px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18), 0 0 0 3px #f0c84a;
}
.login-card h1 { margin: 10px 0 4px; font-size: 22px; }
.login-card .sub { color: var(--muted); margin: 0 0 22px; }
.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.login-remember input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--zoho-blue);
}
.login-card .btn { width: 100%; justify-content: center; height: 38px; }
.login-foot { margin-top: 18px; font-size: 12px; color: var(--muted); }

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  background: #f3f5f8;
  padding: 1px 6px;
  border-radius: 3px;
}
.card .badge { margin-left: 8px; vertical-align: middle; }
.card h3 .badge { font-weight: 700; }
.form-row label input[type="checkbox"] { width: auto; margin-right: 8px; }
.perm-table th, .perm-table td { text-align: center; }
.perm-table th:first-child, .perm-table td:first-child { text-align: left; }
.perm-table input[type="checkbox"] { width: auto; }
.profile-card { max-width: 760px; }
.profile-card input:disabled,
.profile-card input[readonly] {
  background: #f3f5f7;
  color: #5b6573;
  cursor: default;
}
.emp-dash { max-width: 880px; }
.emp-dash-hello { margin: 4px 0 18px; }
.emp-dash-hello h2 { margin: 0 0 6px; font-size: 22px; font-weight: 600; }
.emp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.emp-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 148px;
  padding: 18px 14px;
  text-decoration: none;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #243040;
  box-shadow: var(--shadow);
}
.emp-tile:hover { border-color: var(--zoho-blue); color: var(--zoho-blue); text-decoration: none; }
.emp-tile strong { font-size: 15px; }
.emp-tile small { color: var(--muted); font-weight: 500; }
.emp-tile:hover small { color: var(--zoho-blue); }
.emp-tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--zoho-blue-soft);
  color: var(--zoho-blue);
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
.emp-tile-icon svg { width: 26px; height: 26px; }
.people-search { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.people-search input[type="search"] { flex: 1; min-width: 220px; height: 34px; border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; }
.people-tabs { display: flex; gap: 16px; margin: 0 0 12px; flex-wrap: wrap; }
.people-tabs a { color: var(--muted); text-decoration: none; padding-bottom: 6px; font-size: 13px; }
.people-tabs a.active { color: var(--zoho-blue); font-weight: 600; border-bottom: 2px solid var(--zoho-blue); }
.people-list tr.people-row { cursor: pointer; }
.emp-sheet { max-width: 920px; display: flex; flex-direction: column; gap: 22px; }
.emp-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 0 4px; }
.emp-sheet-head h2 { margin: 4px 0 0; font-size: 22px; }
.emp-sheet-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.emp-section { padding: 0; overflow: hidden; margin: 0; }
.emp-section.is-editing { box-shadow: 0 0 0 2px rgba(2, 121, 200, .16); }
.emp-section-btns, .emp-section-foot { display: flex; gap: 8px; align-items: center; }
.emp-section-foot { padding: 12px 16px; border-top: 1px solid var(--line); }
.emp-section h3 {
  margin: 0;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.emp-section h3 a { font-size: 13px; font-weight: 600; }
.kv { width: 100%; }
.kv th {
  width: 280px;
  text-align: right;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  vertical-align: middle;
}
.kv td { background: transparent; }
.kv input, .kv select, .kv textarea, .kv .ac-wrap { width: 100%; max-width: 380px; }
.kv textarea { min-height: 70px; }
.emp-jump { margin: 0; padding: 10px 16px 14px; font-size: 13px; }
.emp-dist { padding: 12px 16px 16px; }
.emp-dist-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.emp-dist-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfc;
}
.emp-dist-name { flex: 1; min-width: 160px; font-weight: 600; }
.emp-dist-primary { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.emp-dist-add { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.emp-dist-add .ac-wrap, .emp-dist-add select { flex: 1; min-width: 220px; max-width: 420px; }
.emp-dist-hint { margin: 10px 0 0; }
.geo-line { display: flex; gap: 8px; align-items: center; }
.geo-line input { flex: 1; }
.geo-status { margin: 6px 0 0; }
.field-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.field-photo-preview { margin-bottom: 8px; }
.punch-wrap { max-width: 720px; display: flex; flex-direction: column; gap: 18px; }
.punch-card { text-align: center; padding: 28px 22px 24px; }
.punch-date { color: var(--muted); font-size: 14px; }
.punch-clock { font-size: 42px; font-weight: 700; letter-spacing: .04em; margin: 8px 0 10px; }
.punch-status { font-weight: 600; margin-bottom: 18px; }
.punch-form { text-align: left; }
.punch-btn { width: 100%; height: 48px; font-size: 16px; margin-top: 8px; }
.punch-btn.punch-out { background: #c2410c; border-color: #c2410c; }
.punch-btn.punch-out:hover { background: #9a3412; }
.report-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin: 8px 0 16px; flex-wrap: wrap; }
.report-toolbar h2 { margin: 0 0 4px; font-size: 20px; }
.report-toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.report-inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 0; }
.report-inline input, .report-inline select, .report-inline .ac-wrap { height: 34px; width: auto; min-width: 160px; flex: 1 1 160px; max-width: 280px; }

.filter-bar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.filter-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
}
.filter-field {
  flex: 1 1 140px;
  min-width: 132px;
  max-width: 220px;
}
.filter-field.wide {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: 320px;
}
.filter-field label {
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 600;
  color: #5b6573;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.filter-field input,
.filter-field select,
.filter-field .ac-wrap { width: 100%; }
.filter-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  padding-bottom: 1px;
}
.filter-actions .btn { height: 34px; padding: 0 14px; }

.ac-wrap { position: relative; width: 100%; }
select.ac-source {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  margin: 0;
  padding: 0;
  border: 0;
}
.ac-input {
  width: 100%;
  height: 34px;
  padding: 6px 28px 6px 10px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%236c737f' d='M1.2 1.4 6 6.2l4.8-4.8'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: text;
}
.ac-wrap.is-open .ac-input {
  border-color: var(--zoho-blue);
  box-shadow: 0 0 0 3px rgba(2, 121, 200, .12);
}
.ac-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #d7dee8;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .16);
  max-height: 280px;
  overflow: auto;
  z-index: 90;
}
.ac-item {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
}
.ac-item:hover,
.ac-item.is-active {
  background: var(--zoho-blue-soft);
  color: var(--zoho-blue);
}
.ac-item.is-muted { color: var(--muted); }
.ac-more, .ac-empty {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
}
.ac-more { border-top: 1px solid var(--line); }
.form-row .ac-input {
  height: auto;
  min-height: 38px;
  padding: 8px 28px 8px 10px;
}

.dist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.dist-card h3 {
  margin: 0 0 6px;
  border: 0;
  padding: 0;
  font-size: 16px;
}
.dist-card .row-actions { margin-top: 12px; }
.network-crumb {
  margin: 0 0 12px;
  font-size: 13px;
}
.network-crumb a { font-weight: 600; }
.network-flow { margin: 0 0 14px; max-width: 720px; }
.stock-steps {
  margin: 0 0 16px;
  padding: 12px 16px 12px 32px;
  max-width: 720px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stock-steps li { margin: 4px 0; }
.stock-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.stock-flow-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  min-height: 76px;
  box-shadow: var(--shadow);
}
.stock-flow-step:hover { border-color: var(--primary, #0279c8); }
.stock-flow-step em {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0279c8;
  color: #fff;
  font-style: normal;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stock-flow-step strong { display: block; font-size: 13px; line-height: 1.3; }
.stock-flow-step small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.35; }
.network-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.network-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  width: 100%;
}
.network-hero-top .row-actions { flex-shrink: 0; }
.network-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  width: 100%;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.dist-card { min-height: 148px; }
.network-hero-main { flex: 1 1 240px; min-width: 200px; }
.network-hero-main h2 {
  margin: 0 0 4px;
  border: 0;
  padding: 0;
  font-size: 20px;
}
.network-hero-stat { min-width: 80px; }
.network-hero-stat .value { font-size: 22px; font-weight: 700; line-height: 1.1; }
.network-hero-stat .label { font-size: 12px; color: var(--muted); margin-top: 2px; }
.network-section { clear: both; margin-top: 8px; }
.network-section + .network-section { margin-top: 22px; }
.report-page .filter-bar { margin-top: 4px; }
@media (max-width: 980px) {
  .stock-flow { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .stock-flow { grid-template-columns: 1fr; }
}
.shop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.shop-sub { margin: 0 0 14px; }
.shop-work {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.shop-panel { margin: 0; padding: 0; overflow: hidden; }
.shop-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: #f7f9fb;
  border-bottom: 1px solid var(--line);
}
.shop-panel-head h3 {
  margin: 0;
  border: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 650;
}
.shop-panel-body { padding: 12px 14px 14px; }
.scan-form { margin: 0 0 10px; }
.scan-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.scan-search { position: relative; flex: 1 1 auto; min-width: 0; }
.scan-bar .scan-q {
  width: 100%;
  height: 36px;
  padding: 0 38px 0 10px;
}
.scan-cam {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #5b6573;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.scan-cam:hover { background: #eef3f8; color: var(--zoho-blue); }
.scan-bar .scan-qty {
  width: 64px;
  flex: 0 0 64px;
  height: 36px;
  padding: 0 8px;
  text-align: center;
}
.scan-bar .btn {
  height: 36px;
  flex: 0 0 auto;
  padding: 0 14px;
  white-space: nowrap;
}
.scan-picked {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--zoho-blue);
}
.scan-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #d7dee8;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .16);
  max-height: 240px;
  overflow: auto;
  z-index: 50;
}
.scan-video {
  width: 100%;
  max-height: 180px;
  background: #111;
  border-radius: 6px;
  margin-top: 8px;
}
.shop-table { border: 1px solid var(--line); border-radius: 4px; }
.shop-table table { margin: 0; }
.shop-table th, .shop-table td { padding: 8px 10px; }
.shop-empty { text-align: center; color: var(--muted); padding: 28px 12px !important; }
.qty-cell { width: 88px; }
.qty-cell input { width: 80px; height: 32px; padding: 0 8px; }
.shop-panel-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}
.shop-panel-foot input,
.shop-panel-foot select {
  width: auto;
  flex: 1 1 120px;
  height: 36px;
  min-width: 110px;
}
.shop-panel-foot .btn { flex: 0 0 auto; height: 36px; margin-left: auto; }

.prod-cell { display: flex; align-items: center; gap: 10px; }
.prod-ph {
  display: inline-block;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #eef1f5;
  border: 1px solid var(--line);
  flex: 0 0 40px;
}
.ac-prod { display: flex; align-items: center; gap: 8px; }
.ac-prod .field-thumb, .ac-prod .prod-ph { width: 32px; height: 32px; flex: 0 0 32px; }

.dropzone {
  position: relative;
  border: 1.5px dashed #c5d0dc;
  border-radius: 8px;
  background: #f7fafc;
  min-height: 148px;
  padding: 14px;
  text-align: center;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--zoho-blue);
  background: #eef7fc;
  box-shadow: 0 0 0 3px rgba(2, 121, 200, .1);
}
.dropzone.has-file { background: #fff; border-style: solid; border-color: var(--line); }
.dropzone.is-camera-only { cursor: pointer; }
.dropzone.is-camera-only .dz-file { display: none; }
.dropzone .dz-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dz-art { color: var(--zoho-blue); margin-bottom: 4px; }
.dz-empty strong { font-size: 14px; }
.dz-actions { display: flex; gap: 8px; margin-top: 10px; }
.dz-preview { position: relative; display: flex; justify-content: center; }
.dz-img {
  max-width: 100%;
  max-height: 180px;
  border-radius: 6px;
  object-fit: contain;
  display: block;
}
.dz-file-chip {
  display: inline-block;
  padding: 10px 14px;
  background: #eef3f8;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}
.dz-clear {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #1f2a37;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
.dz-clear:hover { background: var(--danger); }
.dz-cam-wrap { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.dz-empty[hidden],
.dz-preview[hidden],
.dz-cam-wrap[hidden],
.dz-img[hidden],
.dz-file-chip[hidden] { display: none !important; }
.reimb-doc { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reimb-doc form { margin: 0; }
.dz-cam-facing {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.dz-cam-facing label { margin: 0; font-size: 13px; white-space: nowrap; }
.dz-cam-facing .dz-facing {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
}
.dz-video {
  width: 100%;
  max-height: 220px;
  border-radius: 6px;
  background: #111;
}
.dz-cam-actions { display: flex; gap: 8px; justify-content: center; }
.report-chart-card { margin-bottom: 16px; }
.report-chart { width: 100%; height: 150px; display: block; }
.report-legend { margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.report-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--zoho-blue); margin-right: 6px; }
.report-tabs { margin-bottom: 8px; }
.report-group-title { margin: 18px 0 10px; font-size: 15px; color: var(--muted); font-weight: 600; }
.report-tiles { margin-bottom: 8px; }
.report-tiles .emp-tile { min-height: 120px; }
.emp-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
tr.is-focus td { background: #eef6fc; }
.people-search input[name="item"],
.card table input { width: 100%; min-width: 70px; height: 30px; border: 1px solid var(--line); border-radius: 4px; padding: 0 8px; }
.shop-panel .scan-bar input { width: auto; min-width: 0; }
.shop-panel .scan-bar .scan-q { width: 100%; }
.shop-panel .qty-cell input { width: 80px; min-width: 80px; height: 32px; }

@media (max-width: 980px) {
  .login-wrap, .app { grid-template-columns: 1fr; }
  .app { display: block; }
  .main { width: 100%; min-width: 0; }
  .login-hero { display: none; }
  .icon-btn.menu-toggle { display: grid; }
  .sidebar-logout { display: block; margin: 16px 10px 8px; }
  .brand { min-width: 0; }
  .brand-logo { width: 34px; height: 34px; }
  .userchip span { display: none; }
  .logout-link { display: none; }
  .global-search { display: none; }
  .header { gap: 8px; padding: 0 10px; }
  .content, .topbar { padding-left: 14px; padding-right: 14px; }
  .grid.cols-4, .grid.cols-3, .grid.cols-2, .emp-tiles { grid-template-columns: 1fr; }
  .filter-field, .filter-field.wide { max-width: none; flex: 1 1 calc(50% - 12px); }
  .filter-actions { width: 100%; }
  .shop-work { grid-template-columns: 1fr; }
  body.nav-open { overflow: hidden; }
  .nav-overlay {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(16, 24, 40, .4);
    z-index: 30;
  }
  .nav-overlay.is-open { display: block; pointer-events: auto; }
  .sidebar {
    display: block;
    position: fixed;
    top: var(--header-h);
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 86vw;
    z-index: 40;
    transform: translateX(-105%);
    transition: transform .18s ease-out;
    box-shadow: 8px 0 28px rgba(16, 24, 40, .18);
    padding-bottom: 40px;
  }
  .sidebar.is-open { transform: translateX(0); }
}

.gps-map-card h3 { margin-bottom: 4px; }
.gps-map {
  height: 420px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 10px;
  background: #e8eef4;
  z-index: 1;
}
.gps-map-meta { margin: 8px 0 0; }
