:root {
  --bg: #f3f5f2;
  --surface: #ffffff;
  --surface-muted: #f7f8f6;
  --ink: #202622;
  --muted: #68716b;
  --line: #dce1dd;
  --line-strong: #c8cfca;
  --sidebar: #202723;
  --green: #247a55;
  --green-soft: #e6f3ec;
  --blue: #2f6fad;
  --blue-soft: #e9f1f8;
  --amber: #a4621d;
  --amber-soft: #fff1df;
  --red: #b54646;
  --red-soft: #fbe9e8;
  --radius: 6px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: 0;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { min-width: 320px; background: var(--bg); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }

.auth-screen {
  width: min(100%, 440px);
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: max(28px, env(safe-area-inset-top)) 24px 32px;
  background: var(--surface);
}
.auth-brand { display: flex; align-items: center; gap: 11px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.auth-brand img { width: 42px; height: 42px; object-fit: contain; padding: 3px; border: 1px solid var(--line); border-radius: 6px; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand strong { font-size: 18px; line-height: 1.25; }
.auth-brand span { color: var(--muted); font-size: 12px; }
.auth-form { margin: auto 0; display: grid; gap: 16px; }
.auth-heading { margin-bottom: 7px; }
.auth-heading span { color: var(--green); font-size: 11px; font-weight: 700; }
.auth-heading h1 { margin: 3px 0 0; font-size: 25px; line-height: 1.25; }
.auth-note { margin: 0; color: var(--muted); font-size: 11px; text-align: center; }

.mobile-field { display: grid; gap: 6px; min-width: 0; }
.mobile-field > span { color: var(--muted); font-size: 11px; font-weight: 600; }
.mobile-field input, .mobile-field select, .mobile-field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: var(--surface);
}
.mobile-field input, .mobile-field select { height: 44px; padding: 0 12px; }
.mobile-field textarea { min-height: 76px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.mobile-field input:focus, .mobile-field select:focus, .mobile-field textarea:focus { outline: 3px solid rgba(36, 122, 85, 0.14); border-color: var(--green); }

.primary-command, .secondary-command, .logout-command, .upload-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 5px;
  padding: 0 15px;
  font-weight: 700;
}
.primary-command { border: 1px solid #1f6849; color: #fff; background: var(--green); }
.primary-command:hover { background: #1e6d4b; }
.secondary-command { border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); }
.primary-command svg, .secondary-command svg, .logout-command svg, .upload-button svg { width: 18px; height: 18px; }

.employee-app { width: min(100%, 520px); min-height: 100vh; margin: 0 auto; background: var(--bg); box-shadow: 0 0 0 1px rgba(30, 39, 34, 0.04); }
.mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: max(9px, env(safe-area-inset-top)) 16px 9px;
  border-bottom: 1px solid #303a34;
  color: #fff;
  background: var(--sidebar);
}
.mobile-brand { min-width: 0; display: flex; align-items: center; gap: 9px; }
.mobile-brand img { width: 34px; height: 34px; padding: 2px; border-radius: 5px; background: #fff; object-fit: contain; }
.mobile-brand strong, .mobile-brand span, .mobile-date strong, .mobile-date span { display: block; }
.mobile-brand strong { max-width: 150px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-brand span { color: #b8c2bc; font-size: 10px; }
.mobile-date { flex: 0 0 auto; text-align: right; }
.mobile-date strong { font-size: 12px; }
.mobile-date span { color: #b8c2bc; font-size: 10px; }
.desktop-topbar-actions { display: flex; align-items: center; gap: 9px; }
.topbar-icon-command, .desktop-install-command { display: none; }

.mobile-main { padding: 14px 12px calc(82px + env(safe-area-inset-bottom)); }
.mobile-view { display: none; }
.mobile-view.is-active { display: block; }
.desktop-today-grid, .desktop-today-summary, .desktop-today-work, .desktop-profile-grid, .desktop-profile-summary, .desktop-profile-history { min-width: 0; }
.rest-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 11px 12px; border-left: 3px solid var(--blue); border-radius: 4px; background: var(--blue-soft); }
.rest-banner svg { width: 19px; height: 19px; color: var(--blue); }
.rest-banner strong, .rest-banner span { display: block; }
.rest-banner strong { font-size: 12px; }
.rest-banner span { color: #52636f; font-size: 10px; }
.network-banner { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 11px 12px; border-left: 3px solid var(--amber); border-radius: 4px; background: var(--amber-soft); }
.network-banner svg { width: 19px; height: 19px; color: #8a4e14; }
.network-banner strong, .network-banner span { display: block; }
.network-banner strong { font-size: 12px; }
.network-banner span { color: #76512e; font-size: 10px; }

.attendance-band { margin-bottom: 12px; padding: 15px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); background: var(--surface); }
.band-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.band-heading span { color: var(--muted); font-size: 10px; }
.band-heading h1 { margin: 3px 0 0; font-size: 22px; line-height: 1.2; }
.mobile-status { min-height: 25px; display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 13px; color: #626b66 !important; background: #ecefed; white-space: nowrap; }
.mobile-status.present { color: #206443 !important; background: var(--green-soft); }
.mobile-status.late { color: #8a4e14 !important; background: var(--amber-soft); }
.mobile-status.absent { color: #993c3c !important; background: var(--red-soft); }
.attendance-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.attendance-times div { padding: 10px 7px; border-right: 1px solid var(--line); }
.attendance-times div:last-child { border-right: 0; }
.attendance-times span, .attendance-times strong { display: block; text-align: center; }
.attendance-times span { color: var(--muted); font-size: 10px; }
.attendance-times strong { margin-top: 2px; font-size: 15px; font-variant-numeric: tabular-nums; }
.attendance-action { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #1f6849; border-radius: 5px; color: #fff; background: var(--green); font-weight: 700; }
.attendance-action svg { width: 18px; height: 18px; }
.attendance-action.checkout { color: #234f3b; border-color: #9cc3ae; background: var(--green-soft); }
.attendance-page-heading, .todo-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.attendance-page-heading > span, .todo-page-heading > strong { flex: 0 0 auto; }
.source-badge { min-height: 28px; display: inline-flex !important; align-items: center; padding: 3px 9px; border: 1px solid var(--line); border-radius: 14px; color: var(--muted) !important; background: var(--surface); font-size: 10px !important; white-space: nowrap; }
.employee-attendance-grid, .employee-leave-column { display: grid; gap: 12px; min-width: 0; }
.employee-attendance-main { margin-bottom: 0; align-self: start; }
.employee-leave-form-section, .employee-leave-history-section { margin-bottom: 0; }
.employee-leave-form { display: grid; gap: 12px; padding: 14px; }
.employee-leave-form > .primary-command { justify-self: end; min-width: 150px; }
.leave-date-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.employee-leave-request-list { display: grid; }
.employee-leave-request { min-width: 0; display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 13px; border-bottom: 1px solid #e7ebe8; }
.employee-leave-request:last-child { border-bottom: 0; }
.leave-request-marker { width: 4px; height: 38px; border-radius: 2px; background: var(--amber); }
.employee-leave-request.approved .leave-request-marker { background: var(--green); }
.employee-leave-request.rejected .leave-request-marker, .employee-leave-request.cancelled .leave-request-marker { background: #aeb6b0; }
.employee-leave-request strong, .employee-leave-request span, .employee-leave-request small { display: block; }
.employee-leave-request strong { font-size: 11px; }
.employee-leave-request div > span { margin-top: 3px; color: #4f5953; font-size: 10px; }
.employee-leave-request div > small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.leave-request-state { display: grid; justify-items: end; gap: 6px; }
.leave-request-state b { min-height: 23px; display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 12px; color: #8a4e14; background: var(--amber-soft); font-size: 9px; white-space: nowrap; }
.approved .leave-request-state b { color: #206443; background: var(--green-soft); }
.rejected .leave-request-state b, .cancelled .leave-request-state b { color: #626b66; background: #ecefed; }
.leave-request-state button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 4px; color: var(--red); background: var(--surface); }
.leave-request-state svg { width: 14px; height: 14px; }

.mobile-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.mobile-metric { min-height: 78px; padding: 11px 9px; border-right: 1px solid var(--line); }
.mobile-metric:nth-child(2n) { border-right: 0; }
.mobile-metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.mobile-metric span, .mobile-metric strong, .mobile-metric small { display: block; }
.mobile-metric span { color: var(--muted); font-size: 10px; }
.mobile-metric strong { margin-top: 4px; font-size: 20px; font-variant-numeric: tabular-nums; }
.mobile-metric small { margin-top: 3px; color: var(--muted); font-size: 9px; }

.mobile-section { margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.mobile-section-heading { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.mobile-section-heading span { display: block; color: var(--muted); font-size: 9px; }
.mobile-section-heading h2 { margin: 2px 0 0; font-size: 15px; }
.icon-command { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--ink); background: var(--surface); }
.icon-command svg { width: 17px; height: 17px; }

.today-task-list, .mobile-task-list { display: grid; }
.today-task, .mobile-task {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border-bottom: 1px solid #e7ebe8;
  background: var(--surface);
}
.today-task:last-child, .mobile-task:last-child { border-bottom: 0; }
.task-marker { width: 4px; height: 34px; border-radius: 2px; background: var(--blue); }
.task-marker.overdue, .task-marker.blocked { background: var(--red); }
.task-marker.completed { background: var(--green); }
.task-marker.submitted { background: var(--amber); }
.today-task strong, .today-task span, .mobile-task strong, .mobile-task span { display: block; }
.today-task strong, .mobile-task strong { font-size: 12px; }
.today-task div span, .mobile-task div span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.task-copy { min-width: 0; }
.task-description { display: none; }
.employee-todo-card-grid { display: grid; gap: 10px; margin-bottom: 14px; }
.employee-todo-card { min-width: 0; min-height: 112px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius); background: var(--surface); }
.employee-todo-card.warning, .employee-todo-card.waiting { border-left-color: var(--amber); }
.employee-todo-card.critical { border-left-color: var(--red); }
.employee-todo-card.done { border-left-color: var(--green); }
.todo-card-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 5px; color: var(--blue); background: var(--blue-soft); }
.warning .todo-card-icon, .waiting .todo-card-icon { color: #8a4e14; background: var(--amber-soft); }
.critical .todo-card-icon { color: var(--red); background: var(--red-soft); }
.done .todo-card-icon { color: var(--green); background: var(--green-soft); }
.todo-card-icon svg { width: 18px; height: 18px; }
.todo-card-copy { min-width: 0; }
.todo-card-copy span, .todo-card-copy strong, .todo-card-copy small { display: block; }
.todo-card-copy span { color: var(--muted); font-size: 9px; }
.todo-card-copy strong { margin-top: 3px; font-size: 12px; }
.todo-card-copy small { margin-top: 5px; color: #4f5953; font-size: 10px; line-height: 1.45; }
.todo-card-side { display: grid; justify-items: end; gap: 9px; }
.todo-card-side b { color: var(--muted); font-size: 9px; white-space: nowrap; }
.warning .todo-card-side b, .waiting .todo-card-side b { color: var(--amber); }
.critical .todo-card-side b { color: var(--red); }
.done .todo-card-side b { color: var(--green); }
.todo-card-side button { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--ink); background: var(--surface-muted); }
.todo-card-side svg { width: 15px; height: 15px; }
.employee-todo-card.compact { min-height: 78px; padding: 11px 13px; border-width: 0 0 1px 4px; border-radius: 0; }
.employee-todo-card.compact:last-child { border-bottom: 0; }
.employee-assigned-task-section { margin-bottom: 0; }
.assigned-task-heading { align-items: center; }
.assigned-task-heading .task-filter { width: min(100%, 440px); margin: 0; }

.score-trend-section { margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.score-trend-heading { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.score-trend-heading span { display: block; color: var(--muted); font-size: 9px; }
.score-trend-heading h2 { margin: 2px 0 0; font-size: 16px; }
.score-range-control { display: flex; border: 1px solid var(--line-strong); border-radius: 5px; overflow: hidden; }
.score-range-control button { min-height: 34px; padding: 0 10px; border: 0; border-right: 1px solid var(--line); color: var(--muted); background: var(--surface); font-size: 10px; }
.score-range-control button:last-child { border-right: 0; }
.score-range-control button.is-active { color: #fff; background: var(--green); font-weight: 700; }
.score-custom-range { display: grid; grid-template-columns: repeat(2, minmax(0, 180px)); justify-content: end; gap: 10px; padding: 12px 14px 0; }
.score-trend-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 14px 14px 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.score-trend-summary .mobile-metric { min-height: 74px; border: 0; border-right: 1px solid var(--line); }
.score-trend-summary .mobile-metric:last-child { border-right: 0; }
.score-trend-chart { min-height: 270px; padding: 10px 14px 14px; overflow: hidden; }
.score-trend-chart svg { width: 100%; height: 250px; display: block; }
.score-grid-line { stroke: #e2e7e3; stroke-width: 1; }
.score-axis-label, .score-date-label { fill: #68716b; font-size: 10px; }
.score-line { fill: none; stroke: var(--green); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.score-point { fill: #fff; stroke: var(--green); stroke-width: 2.5; }
.task-open-button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; color: var(--green); background: transparent; }
.task-open-button svg { width: 18px; height: 18px; }

.mobile-page-heading { margin: 3px 2px 14px; }
.mobile-page-heading span { display: block; color: var(--muted); font-size: 10px; }
.mobile-page-heading h1 { margin: 3px 0 0; font-size: 22px; line-height: 1.25; }
.task-filter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); overflow: hidden; }
.task-filter button { min-height: 38px; padding: 0 5px; border: 0; border-right: 1px solid var(--line); color: var(--muted); background: transparent; font-size: 11px; }
.task-filter button:last-child { border-right: 0; }
.task-filter button.is-active { color: #fff; background: var(--green); font-weight: 700; }
.mobile-task-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

.mobile-log-form, .desktop-log-sidebar { display: grid; gap: 12px; }
.log-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.log-page-heading .primary-command { min-height: 40px; flex: 0 0 auto; }
.log-execution-section { margin-bottom: 16px; }
.form-band { display: grid; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.form-band-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.form-band-heading h2 { margin: 0; font-size: 14px; }
.form-band-heading span { color: var(--muted); font-size: 10px; }
.count-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.count-grid label { min-width: 0; display: grid; gap: 5px; }
.count-grid span { color: var(--muted); font-size: 9px; text-align: center; white-space: nowrap; }
.count-grid input { width: 100%; height: 42px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 4px; text-align: center; font-size: 16px; font-variant-numeric: tabular-nums; }
.evidence-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.is-native-app .evidence-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.upload-button { width: 100%; border: 1px dashed #96b8a6; color: var(--green); background: var(--green-soft); }
.native-camera-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid #9eb4c2; border-radius: 5px; color: #315f78; background: var(--blue-soft); font-weight: 700; }
.native-camera-button svg { width: 18px; height: 18px; }
.evidence-list { display: grid; gap: 7px; }
.evidence-item { min-height: 44px; display: grid; grid-template-columns: 30px minmax(0, 1fr) 34px; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; }
.evidence-item > svg { width: 18px; height: 18px; color: var(--blue); }
.evidence-item strong, .evidence-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evidence-item strong { font-size: 11px; }
.evidence-item span { color: var(--muted); font-size: 9px; }
.remove-evidence { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; color: var(--red); background: transparent; }
.remove-evidence svg { width: 16px; height: 16px; }
.log-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.customer-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.customer-page-heading .primary-command { flex: 0 0 auto; min-height: 40px; }
.customer-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.customer-summary-item { min-height: 78px; padding: 11px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.customer-summary-item:nth-child(2n) { border-right: 0; }
.customer-summary-item:nth-last-child(-n+2) { border-bottom: 0; }
.customer-summary-item span, .customer-summary-item strong, .customer-summary-item small { display: block; }
.customer-summary-item span { color: var(--muted); font-size: 10px; }
.customer-summary-item strong { margin-top: 3px; font-size: 21px; font-variant-numeric: tabular-nums; }
.customer-summary-item small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.customer-summary-item.mine strong { color: var(--green); }
.customer-summary-item.due strong { color: var(--amber); }

.customer-workspace-section { margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.customer-section-heading { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.customer-section-heading span, .customer-section-heading h2 { display: block; }
.customer-section-heading span { color: var(--muted); font-size: 9px; }
.customer-section-heading h2 { margin: 2px 0 0; font-size: 14px; }
.customer-section-heading > strong { color: var(--green); font-size: 12px; }
.employee-customer-filters { display: grid; gap: 10px; padding: 13px; }
.employee-customer-table-wrap { overflow-x: auto; }
.employee-customer-table { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: fixed; }
.employee-customer-table th { height: 40px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--muted); background: #fafbfa; font-size: 9px; font-weight: 700; text-align: left; }
.employee-customer-table td { height: 64px; padding: 9px 10px; border-bottom: 1px solid #e7ebe8; color: #414a45; font-size: 10px; vertical-align: middle; }
.employee-customer-table tbody tr:last-child td { border-bottom: 0; }
.employee-customer-table tbody tr { cursor: pointer; }
.employee-customer-table tbody tr:hover { background: #fafcfa; }
.employee-customer-table th:nth-child(1), .employee-customer-table td:nth-child(1) { width: 170px; }
.employee-customer-table th:nth-child(2), .employee-customer-table td:nth-child(2) { width: 180px; }
.employee-customer-table th:nth-child(3), .employee-customer-table td:nth-child(3) { width: 210px; }
.employee-customer-table th:nth-child(4), .employee-customer-table td:nth-child(4) { width: 130px; }
.employee-customer-table th:nth-child(5), .employee-customer-table td:nth-child(5) { width: 98px; }
.employee-customer-table th:nth-child(6), .employee-customer-table td:nth-child(6) { width: 100px; }
.employee-customer-table th:nth-child(7), .employee-customer-table td:nth-child(7) { width: 110px; }
.employee-customer-table th:last-child, .employee-customer-table td:last-child { width: 46px; }
.employee-customer-table strong, .employee-customer-table small { display: block; }
.employee-customer-table td > strong { color: var(--ink); font-size: 11px; }
.employee-customer-table small { margin-top: 3px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.employee-customer-table td > strong, .employee-customer-table td > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-product-copy { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.45; }
.customer-stage { min-height: 24px; display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 12px; color: #626b66; background: #ecefed; white-space: nowrap; }
.customer-stage.contacted { color: #3e6485; background: var(--blue-soft); }
.customer-stage.interested, .customer-stage.quoted, .customer-stage.sample, .customer-stage.negotiating { color: #8a4e14; background: var(--amber-soft); }
.customer-stage.won { color: #206443; background: var(--green-soft); }
.customer-stage.dormant, .customer-stage.lost { color: #993c3c; background: var(--red-soft); }
.customer-follow-up.due { color: var(--red); font-weight: 700; }
.customer-row-action { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 4px; color: var(--green); background: var(--surface); }
.customer-row-action svg { width: 16px; height: 16px; }
.customer-unassigned { color: var(--amber); }

.tool-heading { flex-direction: column; align-items: stretch; }
.employee-tool-tabs { width: 100%; display: inline-flex; border: 1px solid var(--line-strong); border-radius: 5px; overflow: hidden; }
.employee-tool-tabs button { min-width: 0; min-height: 34px; flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 7px; border: 0; border-right: 1px solid var(--line); color: var(--muted); background: var(--surface); font-size: 10px; }
.employee-tool-tabs button:last-child { border-right: 0; }
.employee-tool-tabs button.is-active { color: #fff; background: var(--green); }
.employee-tool-tabs svg { width: 15px; height: 15px; }
.employee-tool-panel { display: none; padding: 14px; }
.employee-tool-panel.is-active { display: block; }
.employee-tool-grid { display: grid; align-items: end; gap: 10px; }
.tool-direction { display: none; width: 17px; height: 17px; color: var(--muted); }
.employee-tool-result { min-height: 68px; display: grid; align-content: center; padding: 10px 13px; border-left: 3px solid var(--green); border-radius: 4px; background: var(--green-soft); }
.employee-tool-result span, .employee-tool-result strong, .employee-tool-result small { display: block; }
.employee-tool-result span { color: #4f6c5c; font-size: 9px; }
.employee-tool-result strong { margin-top: 2px; font-size: 18px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.employee-tool-result small { margin-top: 2px; color: #5a6e63; font-size: 9px; }
.tool-convert-command { min-height: 44px; }
.employee-customs-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-muted); overflow: hidden; }
.employee-customs-summary > div { min-height: 62px; display: grid; align-content: center; padding: 9px 10px; border-right: 1px solid var(--line); }
.employee-customs-summary > div:last-child { border-right: 0; }
.employee-customs-summary span, .employee-customs-summary strong { display: block; }
.employee-customs-summary span { color: var(--muted); font-size: 8px; }
.employee-customs-summary strong { margin-top: 2px; font-size: 17px; font-variant-numeric: tabular-nums; }
.employee-customs-quick { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 11px; }
.employee-customs-quick button { min-height: 29px; padding: 0 8px; border: 1px solid #b8cfbf; border-radius: 4px; color: #315f49; background: var(--green-soft); font-size: 8px; }
.employee-customs-filter-grid { display: grid; gap: 9px; }
.employee-customs-actions { display: flex; align-items: center; gap: 7px; }
.employee-customs-actions .primary-command { flex: 1; }
.employee-customs-actions .icon-command { width: 44px; height: 44px; flex: 0 0 44px; }
.employee-customs-result-heading { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.employee-customs-result-heading span, .employee-customs-result-heading strong { display: block; }
.employee-customs-result-heading span { color: var(--muted); font-size: 8px; }
.employee-customs-result-heading strong { margin-top: 2px; font-size: 10px; }
.employee-customs-pagination { display: inline-flex; align-items: center; gap: 6px; }
.employee-customs-pagination button { width: 29px; height: 29px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--ink); background: var(--surface); }
.employee-customs-pagination button:disabled { color: #a5ada7; background: var(--surface-muted); }
.employee-customs-pagination svg { width: 14px; height: 14px; }
.employee-customs-pagination span { min-width: 42px; color: var(--muted); text-align: center; font-size: 9px; }
.employee-customs-results { display: grid; gap: 8px; }
.employee-customs-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 4px; }
.employee-customs-code { min-width: 0; }
.employee-customs-code code { display: block; color: var(--blue); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 750; overflow-wrap: anywhere; }
.employee-customs-code span { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.employee-customs-copy { min-width: 0; }
.employee-customs-copy strong, .employee-customs-copy span, .employee-customs-copy small, .employee-customs-copy em { display: block; }
.employee-customs-copy strong { font-size: 11px; line-height: 1.5; }
.employee-customs-copy .employee-customs-english { margin-top: 3px; color: #4e5c54; font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.employee-customs-copy small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.employee-customs-copy em { margin-top: 5px; color: var(--amber); font-size: 8px; font-style: normal; line-height: 1.45; }
.employee-customs-disclaimer { margin-top: 11px; padding: 8px 10px; border-left: 3px solid var(--amber); color: #76512e; border-radius: 4px; background: var(--amber-soft); font-size: 9px; line-height: 1.5; }

.dialog-header-actions { display: flex; gap: 7px; }
.customer-detail-dialog, .customer-edit-dialog { width: min(860px, calc(100vw - 20px)); }
.customer-detail-body { padding: 0; gap: 0; }
.employee-customer-detail-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.employee-customer-detail-stat { min-height: 72px; padding: 11px 13px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.employee-customer-detail-stat:nth-child(2n) { border-right: 0; }
.employee-customer-detail-stat:nth-last-child(-n+2) { border-bottom: 0; }
.employee-customer-detail-stat span, .employee-customer-detail-stat strong { display: block; }
.employee-customer-detail-stat span { color: var(--muted); font-size: 9px; }
.employee-customer-detail-stat strong { margin-top: 3px; font-size: 12px; overflow-wrap: anywhere; }
.employee-customer-detail-main { padding: 14px; }
.employee-customer-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.employee-customer-detail-field { min-height: 64px; padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.employee-customer-detail-field:nth-child(2n) { border-right: 0; }
.employee-customer-detail-field.full { grid-column: 1 / -1; border-right: 0; }
.employee-customer-detail-field span, .employee-customer-detail-field strong, .employee-customer-detail-field a { display: block; }
.employee-customer-detail-field span { color: var(--muted); font-size: 9px; }
.employee-customer-detail-field strong, .employee-customer-detail-field a { margin-top: 3px; color: var(--ink); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.employee-customer-detail-field a { color: var(--blue); text-decoration: none; }
.employee-customer-history { margin-top: 15px; }
.employee-customer-history-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.employee-customer-history-heading h3 { margin: 0; font-size: 12px; }
.employee-customer-history-heading span { color: var(--muted); font-size: 9px; }
.employee-customer-timeline { display: grid; }
.employee-customer-timeline-item { display: grid; gap: 5px; padding: 11px 0 11px 13px; border-left: 2px solid var(--line); }
.employee-customer-timeline-item > span { color: var(--muted); font-size: 9px; }
.employee-customer-timeline-copy { padding: 9px 11px; border-radius: 4px; background: var(--surface-muted); }
.employee-customer-timeline-copy strong, .employee-customer-timeline-copy span { display: block; }
.employee-customer-timeline-copy strong { font-size: 10px; line-height: 1.5; }
.employee-customer-timeline-copy span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.mobile-dialog .employee-customer-note-form { max-height: none; display: grid; border-top: 1px solid var(--line); }
.employee-customer-note-grid { display: grid; gap: 10px; padding: 13px; }
.employee-customer-note-grid .full { grid-column: 1 / -1; }
.employee-customer-note-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 13px 14px; }
.employee-customer-note-actions > span { color: var(--muted); font-size: 9px; }
.employee-customer-form-grid { display: grid; gap: 11px; }
.employee-customer-form-grid .full { grid-column: 1 / -1; }
.customer-owner-note { display: flex; align-items: center; gap: 7px; padding: 9px 10px; border-left: 3px solid var(--blue); background: var(--blue-soft); }
.customer-owner-note svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--blue); }

.profile-band { margin-bottom: 12px; padding: 15px; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); background: var(--surface); }
.profile-identity { display: flex; align-items: center; gap: 11px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.profile-avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #355144; background: #e8ece9; font-size: 16px; font-weight: 800; }
.profile-identity strong, .profile-identity span { display: block; }
.profile-identity strong { font-size: 16px; }
.profile-identity span { color: var(--muted); font-size: 10px; }
.profile-score { display: grid; grid-template-columns: 1fr 1fr; padding-top: 13px; }
.profile-score div { border-right: 1px solid var(--line); text-align: center; }
.profile-score div:last-child { border-right: 0; }
.profile-score span, .profile-score strong { display: block; }
.profile-score span { color: var(--muted); font-size: 9px; }
.profile-score strong { margin-top: 3px; font-size: 20px; }
.mobile-history { display: grid; }
.history-row { min-height: 48px; display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 13px; border-bottom: 1px solid #e7ebe8; }
.history-row:last-child { border-bottom: 0; }
.history-row span { color: var(--muted); font-size: 10px; }
.history-row strong { font-size: 15px; }
.history-track { height: 6px; border-radius: 3px; background: #e7ebe8; overflow: hidden; }
.history-track b { display: block; height: 100%; border-radius: 3px; background: var(--green); }
.correction-mobile { padding: 11px 13px; border-bottom: 1px solid #e7ebe8; }
.correction-mobile:last-child { border-bottom: 0; }
.correction-mobile strong, .correction-mobile span { display: block; }
.correction-mobile strong { font-size: 12px; }
.correction-mobile span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.native-setting-row { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 13px; border-bottom: 1px solid #e7ebe8; }
.native-setting-row div { min-width: 0; }
.native-setting-row strong, .native-setting-row span { display: block; }
.native-setting-row strong { font-size: 12px; }
.native-setting-row span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.native-setting-row input { width: 42px; height: 24px; flex: 0 0 auto; appearance: none; border: 1px solid #b8c1bb; border-radius: 12px; background: #dfe4e0; position: relative; transition: background 140ms ease, border-color 140ms ease; }
.native-setting-row input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(30, 39, 34, 0.25); transition: transform 140ms ease; }
.native-setting-row input:checked { border-color: var(--green); background: var(--green); }
.native-setting-row input:checked::after { transform: translateX(18px); }
.native-setting-command { width: 100%; min-height: 48px; display: grid; grid-template-columns: 22px minmax(0, 1fr) 20px; align-items: center; gap: 8px; padding: 0 13px; border: 0; color: var(--ink); background: var(--surface); text-align: left; font-weight: 700; }
.native-setting-command svg { width: 18px; height: 18px; color: var(--green); }
.native-setting-command svg:last-child { color: var(--muted); }
.logout-command { width: 100%; border: 1px solid #d8b5b5; color: var(--red); background: var(--surface); }

.mobile-nav {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 20;
  width: min(100%, 520px);
  min-height: calc(62px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  padding: 6px 7px env(safe-area-inset-bottom);
  border-top: 1px solid #151a17;
  background: var(--sidebar);
  transform: translateX(-50%);
}
.desktop-nav-heading { display: none; }
.mobile-nav button { position: relative; min-height: 49px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 4px; color: #aeb8b1; background: transparent; font-size: 9px; }
.mobile-nav button.is-active { color: #fff; background: #35433b; box-shadow: inset 0 3px 0 #69bd91; }
.mobile-nav svg { width: 19px; height: 19px; }
.mobile-nav b { position: absolute; top: 1px; right: calc(50% - 25px); min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border-radius: 9px; color: #fff; background: var(--red); font-size: 9px; }

.mobile-dialog { width: min(480px, calc(100vw - 20px)); max-height: calc(100vh - 20px); padding: 0; border: 0; border-radius: 6px; color: var(--ink); background: var(--surface); box-shadow: 0 22px 55px rgba(18, 26, 21, 0.25); }
.mobile-dialog::backdrop { background: rgba(18, 24, 20, 0.5); }
.mobile-dialog form { max-height: calc(100vh - 20px); display: flex; flex-direction: column; }
.mobile-dialog-header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.mobile-dialog-header span { display: block; color: var(--muted); font-size: 9px; }
.mobile-dialog-header h2 { margin: 2px 0 0; font-size: 16px; }
.mobile-dialog-body { display: grid; gap: 13px; padding: 14px; overflow-y: auto; }
.mobile-dialog-body p { margin: 0; color: #4f5953; font-size: 11px; }
.mobile-dialog-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 11px 13px; border-top: 1px solid var(--line); background: #fafbfa; }
.dialog-feedback { min-height: 42px; display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid #e2b7b7; border-left: 3px solid var(--red); border-radius: 4px; color: #8e3333; background: var(--red-soft); font-size: 11px; line-height: 1.5; }
.dialog-feedback[hidden] { display: none; }
.dialog-feedback svg { width: 17px; height: 17px; flex: 0 0 17px; margin-top: 1px; }
.dialog-feedback.warning { border-color: #e7ca98; border-left-color: var(--amber); color: #815117; background: var(--amber-soft); }

.operations-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.operations-heading-actions { display: flex; gap: 7px; }
.operations-heading-actions > button { min-height: 40px; padding: 0 11px; }
.operations-plan-band { margin-bottom: 12px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.operations-plan-heading { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.operations-plan-heading span { display: block; color: var(--muted); font-size: 9px; }
.operations-plan-heading h2 { margin: 2px 0 0; font-size: 17px; }
.operation-plan-status { display: inline-flex !important; min-height: 24px; align-items: center; padding: 2px 8px; border-radius: 12px; color: #8a4e14 !important; background: var(--amber-soft); }
.operation-plan-status.confirmed { color: #206443 !important; background: var(--green-soft); }
.operations-plan-details { display: grid; }
.operations-plan-details > div { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.operations-plan-details > div:last-child { border-bottom: 0; }
.operations-plan-details span, .operations-plan-details strong { display: block; }
.operations-plan-details span { color: var(--muted); font-size: 9px; }
.operations-plan-details strong { margin-top: 3px; font-size: 11px; overflow-wrap: anywhere; }
.employee-operation-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.operation-target { min-width: 0; padding: 11px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.operation-target:nth-child(2n) { border-right: 0; }
.operation-target:nth-last-child(-n+2) { border-bottom: 0; }
.operation-target > span, .operation-target strong { display: block; }
.operation-target > span { color: var(--muted); font-size: 9px; }
.operation-target strong { margin-top: 2px; font-size: 21px; }
.operation-target strong small { color: var(--muted); font-size: 10px; }
.operation-target > b { height: 4px; display: block; margin-top: 7px; border-radius: 2px; overflow: hidden; background: #e5e9e6; }
.operation-target > b i { height: 100%; display: block; background: var(--amber); }
.operation-target.complete > b i { background: var(--green); }
.operation-target.metric strong { font-size: 18px; }
.employee-operations-grid, .employee-operations-aside { min-width: 0; }
.employee-execution-list { display: grid; }
.employee-execution-item { min-width: 0; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto 34px; align-items: center; gap: 10px; padding: 12px 13px; border-bottom: 1px solid var(--line); }
.employee-execution-item:last-child { border-bottom: 0; }
.employee-execution-marker { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 5px; color: #2f638f; background: var(--blue-soft); }
.employee-execution-marker.instagram { color: #734c80; background: #f0edf7; }
.employee-execution-marker.tiktok { color: #343434; background: #ececec; }
.employee-execution-marker.whatsapp { color: #206443; background: var(--green-soft); }
.employee-execution-marker svg { width: 17px; height: 17px; }
.employee-execution-copy { min-width: 0; }
.employee-execution-copy > div { display: flex; align-items: center; gap: 7px; }
.employee-execution-copy strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.employee-execution-copy > span, .employee-execution-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.operation-status { flex: 0 0 auto; display: inline-flex; padding: 2px 6px; border-radius: 10px; color: #626b66; background: #ecefed; font-size: 8px; }
.operation-status.published { color: #2f638f; background: var(--blue-soft); }
.operation-status.verified { color: #206443; background: var(--green-soft); }
.execution-redline { margin: 5px 0 0; color: var(--red); font-size: 9px; }
.employee-execution-result { display: flex; gap: 8px; }
.employee-execution-result > span { min-width: 34px; text-align: right; font-size: 11px; font-weight: 700; }
.employee-execution-result small { display: block; color: var(--muted); font-size: 8px; font-weight: 400; }
.execution-row-actions { display: flex; align-items: center; gap: 4px; }
.execution-row-actions .icon-command { flex: 0 0 auto; }
.employee-effect-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.employee-effect-grid > div { min-height: 62px; padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.employee-effect-grid > div:nth-child(2n) { border-right: 0; }
.employee-effect-grid span, .employee-effect-grid strong { display: block; }
.employee-effect-grid span { color: var(--muted); font-size: 8px; }
.employee-effect-grid strong { margin-top: 3px; font-size: 17px; }
.employee-platform-results > div { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.employee-platform-results > div:last-child { border-bottom: 0; }
.employee-platform-results strong, .employee-platform-results span, .employee-platform-results small { display: block; }
.employee-platform-results strong { font-size: 10px; }
.employee-platform-results span, .employee-platform-results small { color: var(--muted); font-size: 8px; }
.employee-account-list { display: grid; }
.employee-account-row { width: 100%; min-height: 57px; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 18px; align-items: center; gap: 9px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; }
.employee-account-row:last-child { border-bottom: 0; }
.account-platform-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 4px; color: #315c7a; background: var(--blue-soft); font-size: 9px; font-weight: 700; }
.account-platform-mark.instagram { color: #704c80; background: #f0edf7; }
.account-platform-mark.tiktok { color: #343434; background: #ececec; }
.account-platform-mark.whatsapp { color: #206443; background: var(--green-soft); }
.employee-account-row strong, .employee-account-row span { display: block; }
.employee-account-row strong { font-size: 10px; }
.employee-account-row span, .employee-account-row small { color: var(--muted); font-size: 8px; }
.employee-account-row svg { width: 15px; height: 15px; color: var(--muted); }
.employee-account-metric-list { display: grid; }
.employee-account-metric-row { min-width: 0; min-height: 76px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 36px; align-items: center; gap: 10px; padding: 11px 13px; border-bottom: 1px solid var(--line); border-left: 3px solid var(--green); }
.employee-account-metric-row:last-child { border-bottom: 0; }
.employee-account-metric-row.missing { border-left-color: var(--amber); }
.account-metric-copy { min-width: 0; }
.account-metric-copy strong, .account-metric-copy span, .account-metric-copy small { display: block; }
.account-metric-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.account-metric-copy span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.account-metric-copy small { margin-top: 4px; color: #4f5953; font-size: 9px; overflow-wrap: anywhere; }
.metric-state { min-height: 23px; display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 12px; color: #206443; background: var(--green-soft); font-size: 8px; font-weight: 700; white-space: nowrap; }
.metric-state.missing { color: #8a4e14; background: var(--amber-soft); }
.employee-metric-trend > div { min-height: 62px; }
.account-metric-dialog { width: min(620px, calc(100vw - 20px)); }
.account-metric-context { display: grid; gap: 3px; padding: 12px 13px; border-left: 3px solid var(--blue); border-radius: 4px; background: var(--blue-soft); }
.account-metric-context span, .account-metric-context small { color: #526d80; font-size: 9px; }
.account-metric-context strong { font-size: 14px; overflow-wrap: anywhere; }
.account-metric-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.operations-dialog { width: min(760px, calc(100vw - 20px)); }
.employee-execution-form-grid { display: grid; grid-template-columns: 1fr; gap: 11px; }
.employee-execution-form-grid .full { grid-column: 1 / -1; }
.review-check { min-height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 5px; color: #4e5852; font-size: 10px; }
.review-check input { width: 16px; height: 16px; accent-color: var(--green); }
.execution-result-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 11px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-muted); }
.execution-result-fields label { min-width: 0; display: grid; gap: 4px; }
.execution-result-fields span { color: var(--muted); font-size: 8px; }
.execution-result-fields input { width: 100%; height: 38px; min-width: 0; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 4px; }
.execution-publish-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
.execution-upload { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); font-size: 10px; font-weight: 700; }
.execution-upload svg { width: 17px; height: 17px; }
.execution-compliance-preview { min-height: 46px; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-left: 3px solid var(--green); border-radius: 4px; color: #315f49; background: var(--green-soft); font-size: 9px; }
.execution-compliance-preview.blocked { border-left-color: var(--red); color: #8d3b3b; background: var(--red-soft); }
.execution-compliance-preview svg { width: 17px; height: 17px; flex: 0 0 17px; }
.danger-command { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 10px; border: 1px solid #d8b5b5; border-radius: 5px; color: var(--red); background: var(--surface); }
.danger-command svg { width: 17px; height: 17px; }
.dialog-action-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.customer-focus-tabs { display: flex; align-items: center; gap: 4px; }
.customer-focus-tabs button { min-height: 30px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 4px; color: var(--muted); background: var(--surface); font-size: 9px; }
.customer-focus-tabs button.is-active { color: #206443; border-color: #9cc3ae; background: var(--green-soft); }
.customer-followup-queue { display: grid; }
.customer-followup-queue > button { width: 100%; min-height: 56px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 18px; align-items: center; gap: 9px; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; }
.customer-followup-queue > button:last-child { border-bottom: 0; }
.followup-priority { display: grid; place-items: center; min-height: 24px; border-radius: 4px; color: #8a4e14; background: var(--amber-soft); font-size: 8px; font-weight: 700; }
.followup-priority.intent { color: #315f7e; background: var(--blue-soft); }
.customer-followup-queue strong, .customer-followup-queue span { display: block; }
.customer-followup-queue strong { font-size: 10px; }
.customer-followup-queue div span, .customer-followup-queue small { color: var(--muted); font-size: 8px; }
.customer-followup-queue svg { width: 15px; height: 15px; color: var(--muted); }
.employee-correction-form { display: grid; gap: 11px; padding: 13px; border-top: 1px solid var(--line); }
.employee-correction-state { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; background: var(--blue-soft); }
.employee-correction-state span { color: #557084; font-size: 9px; }
.employee-correction-state strong { font-size: 10px; }
.employee-correction-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.operation-reminder-mobile.warning { border-left: 3px solid var(--amber); }
.operation-reminder-mobile.critical { border-left: 3px solid var(--red); }

.mobile-loading { position: fixed; inset: 0; z-index: 80; display: grid; place-content: center; justify-items: center; gap: 9px; color: #fff; background: rgba(23, 30, 26, 0.62); }
.mobile-loading svg { width: 27px; height: 27px; animation: spin 1s linear infinite; }
.mobile-loading span { font-size: 11px; }
.mobile-toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 90; width: min(420px, calc(100vw - 28px)); padding: 10px 13px; border-radius: 5px; color: #fff; background: #28312c; box-shadow: 0 10px 28px rgba(20, 27, 23, 0.18); transform: translateX(-50%); text-align: center; font-size: 11px; }
.empty-mobile { min-height: 92px; display: grid; place-items: center; padding: 18px; color: var(--muted); text-align: center; font-size: 11px; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 521px) {
  body { padding: 18px 0; }
  .employee-app { min-height: calc(100vh - 36px); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
  .mobile-topbar { top: 18px; }
  .mobile-nav { bottom: 18px; border: 1px solid #151a17; border-radius: 0 0 6px 6px; }
  .auth-screen { min-height: calc(100vh - 36px); border: 1px solid var(--line); border-radius: 6px; }
}

@media (min-width: 900px) {
  body { padding: 0; overflow-x: hidden; }

  .auth-screen {
    width: min(860px, calc(100% - 64px));
    min-height: 560px;
    margin: max(48px, calc((100vh - 560px) / 2)) auto;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
  }
  .auth-brand {
    align-items: flex-start;
    align-content: flex-start;
    padding: 38px 34px;
    border: 0;
    color: #fff;
    background: var(--sidebar);
  }
  .auth-brand img { width: 48px; height: 48px; background: #fff; }
  .auth-brand strong { font-size: 20px; }
  .auth-brand span { color: #b8c2bc; }
  .auth-form { width: min(100%, 430px); margin: 0; padding: 56px; align-self: center; justify-self: center; }

  .employee-app {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    grid-template-rows: 72px minmax(0, 1fr);
    border: 0;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
  }
  .mobile-topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    top: 0;
    min-height: 72px;
    padding: 12px 28px;
  }
  .mobile-brand img { width: 38px; height: 38px; }
  .mobile-brand strong { max-width: 260px; font-size: 15px; }
  .mobile-brand span, .mobile-date span { font-size: 11px; }
  .mobile-date strong { font-size: 14px; }
  .topbar-icon-command {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #48554e;
    border-radius: 5px;
    color: #dce5df;
    background: #2a342e;
  }
  .topbar-icon-command:hover { color: #fff; background: #35433b; }
  .topbar-icon-command svg { width: 17px; height: 17px; }
  .desktop-install-command {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid #5e8e73;
    border-radius: 5px;
    color: #fff;
    background: #2f674b;
    font-size: 11px;
    font-weight: 700;
  }
  .desktop-install-command svg { width: 16px; height: 16px; }

  .mobile-main {
    grid-column: 2;
    grid-row: 2;
    width: min(100%, 1360px);
    min-width: 0;
    justify-self: center;
    padding: 28px 32px 44px;
  }
  .mobile-nav {
    position: sticky;
    left: auto;
    right: auto;
    bottom: auto;
    top: 72px;
    grid-column: 1;
    grid-row: 2;
    width: auto;
    height: calc(100vh - 72px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-self: start;
    padding: 18px 12px;
    border: 0;
    border-right: 1px solid #303a34;
    border-radius: 0;
    transform: none;
  }
  .desktop-nav-heading { display: block; padding: 3px 12px 15px; border-bottom: 1px solid #39443e; margin-bottom: 8px; }
  .desktop-nav-heading span, .desktop-nav-heading strong { display: block; }
  .desktop-nav-heading span { color: #96a39b; font-size: 10px; }
  .desktop-nav-heading strong { margin-top: 3px; color: #fff; font-size: 15px; }
  .mobile-nav button {
    width: 100%;
    min-height: 48px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 11px;
    padding: 0 14px;
    font-size: 12px;
  }
  .mobile-nav button.is-active { box-shadow: inset 3px 0 0 #69bd91; }
  .mobile-nav svg { width: 18px; height: 18px; }
  .mobile-nav b { position: static; min-width: 19px; height: 19px; margin-left: auto; }

  .desktop-today-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 18px;
    align-items: start;
  }
  .desktop-today-summary, .desktop-today-work, .desktop-profile-summary, .desktop-profile-history { display: grid; gap: 16px; align-content: start; }
  .desktop-today-summary .attendance-band,
  .desktop-today-summary .mobile-metrics,
  .desktop-today-work .mobile-section,
  .desktop-profile-summary .profile-band,
  .desktop-profile-summary .mobile-section,
  .desktop-profile-history .mobile-section { margin-bottom: 0; }
  .attendance-band { padding: 20px; }
  .band-heading h1 { font-size: 25px; }
  .attendance-times { margin: 18px 0; }
  .attendance-times div { padding: 13px 8px; }
  .employee-attendance-grid { grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr); gap: 18px; align-items: start; }
  .employee-leave-column { gap: 18px; }
  .employee-leave-form { padding: 17px; }
  .employee-leave-request { padding: 14px 17px; }
  .mobile-metric { min-height: 94px; padding: 15px 13px; }
  .mobile-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mobile-metric, .mobile-metric:nth-child(2n), .mobile-metric:nth-child(-n+2) { border-bottom: 0; border-right: 1px solid var(--line); }
  .mobile-metric:last-child { border-right: 0; }
  .mobile-metric strong { font-size: 22px; }
  .mobile-section-heading { min-height: 62px; padding: 13px 17px; }
  .today-task, .mobile-task { padding: 15px 17px; }

  .mobile-page-heading { margin: 0 0 20px; }
  .mobile-page-heading h1 { font-size: 25px; }
  .task-filter { max-width: 560px; margin-bottom: 16px; }
  .task-filter button { min-height: 42px; }
  .employee-todo-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
  .employee-todo-card { min-height: 126px; padding: 16px; }
  .assigned-task-heading .task-filter { margin-bottom: 0; }
  .mobile-task { grid-template-columns: 5px minmax(0, 1fr) 42px; gap: 14px; }
  .mobile-task strong { font-size: 13px; }
  .task-description { display: block; margin-top: 7px; color: #4f5953; font-size: 11px; font-weight: 400; line-height: 1.5; }
  .task-open-button { border: 1px solid var(--line); border-radius: 5px; background: var(--surface-muted); }

  .mobile-log-form {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: 16px;
    align-items: start;
  }
  .form-band { padding: 18px; }
  .desktop-log-sidebar { grid-column: 1; grid-row: 1; gap: 16px; align-content: start; min-width: 0; }
  .log-detail-band { grid-column: 2; grid-row: 1; }
  .log-actions { grid-column: 1 / -1; width: min(440px, 100%); justify-self: end; }
  .count-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .count-grid span { font-size: 10px; }
  .mobile-field textarea { min-height: 92px; }
  #logRealWork { min-height: 138px; }
  .evidence-item { min-height: 48px; }
  .score-trend-section { margin-bottom: 18px; }
  .score-trend-heading { min-height: 72px; padding: 14px 18px; }
  .score-custom-range { padding-left: 18px; padding-right: 18px; }
  .score-trend-summary { margin-left: 18px; margin-right: 18px; }
  .score-trend-chart { padding-left: 18px; padding-right: 18px; }

  .desktop-profile-grid { display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr); gap: 18px; align-items: start; }
  .profile-band { padding: 20px; }
  .profile-score strong { font-size: 23px; }
  .logout-command { max-width: 260px; }
  .history-row { min-height: 54px; grid-template-columns: 110px minmax(0, 1fr) 64px; padding: 10px 17px; }
  .history-row strong { text-align: right; }
  .correction-mobile { padding: 14px 17px; }

  .operations-page-heading { margin-bottom: 20px; }
  .operations-plan-band { margin-bottom: 16px; }
  .operations-plan-details { grid-template-columns: 1fr 1fr 1.5fr; }
  .operations-plan-details > div { min-height: 70px; border-right: 1px solid var(--line); border-bottom: 0; }
  .operations-plan-details > div:last-child { border-right: 0; }
  .employee-operation-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
  .operation-target, .operation-target:nth-child(2n), .operation-target:nth-last-child(-n+2) { min-height: 86px; border-right: 1px solid var(--line); border-bottom: 0; }
  .operation-target:last-child { border-right: 0; }
  .employee-operations-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr); gap: 18px; align-items: start; }
  .employee-operations-aside { display: grid; gap: 18px; }
  .employee-operations-aside .customer-workspace-section { margin-bottom: 0; }
  .employee-execution-item { min-height: 82px; padding: 14px 17px; }
  .employee-execution-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .execution-result-fields { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .employee-execution-copy strong { font-size: 12px; }
  .employee-effect-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .employee-effect-grid > div:nth-child(2n) { border-right: 1px solid var(--line); }
  .employee-effect-grid > div:nth-child(3n) { border-right: 0; }
  .employee-account-row { padding-left: 15px; padding-right: 15px; }
  .customer-focus-tabs button { min-height: 32px; font-size: 10px; }
  .customer-followup-queue { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-followup-queue > button:nth-child(odd) { border-right: 1px solid var(--line); }

  .customer-page-heading { margin-bottom: 20px; }
  .customer-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
  .customer-summary-item { min-height: 88px; padding: 14px 16px; border-bottom: 0; }
  .customer-summary-item:nth-child(2n) { border-right: 1px solid var(--line); }
  .customer-summary-item:last-child { border-right: 0; }
  .customer-summary-item strong { font-size: 24px; }
  .customer-workspace-section { margin-bottom: 18px; }
  .customer-section-heading { min-height: 62px; padding: 12px 17px; }
  .tool-heading { flex-direction: row; align-items: flex-end; }
  .employee-tool-tabs { width: auto; }
  .employee-tool-tabs button { flex: 0 0 auto; padding: 0 11px; }
  .employee-customer-filters { grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 11px; padding: 16px 17px 18px; }
  .employee-customer-table th { height: 44px; padding-left: 13px; padding-right: 13px; }
  .employee-customer-table td { height: 68px; padding-left: 13px; padding-right: 13px; }
  .employee-tool-panel { padding: 18px 17px; }
  .timezone-grid { grid-template-columns: minmax(220px, 0.9fr) minmax(240px, 1.05fr) minmax(260px, 1fr); }
  .size-grid { grid-template-columns: 120px minmax(120px, 0.7fr) minmax(145px, 0.8fr) 24px minmax(145px, 0.8fr) minmax(220px, 1.1fr); }
  .currency-grid { grid-template-columns: minmax(120px, 0.65fr) minmax(150px, 0.8fr) 24px minmax(150px, 0.8fr) auto minmax(230px, 1.1fr); }
  .tool-direction { display: block; align-self: center; justify-self: center; margin-top: 19px; }
  .employee-customs-filter-grid { grid-template-columns: minmax(260px, 1.35fr) repeat(3, minmax(145px, 0.7fr)) auto; align-items: end; }
  .employee-customs-actions .primary-command { min-width: 92px; }
  .employee-customer-detail-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .employee-customer-detail-stat { min-height: 78px; border-bottom: 0; }
  .employee-customer-detail-stat:nth-child(2n) { border-right: 1px solid var(--line); }
  .employee-customer-detail-stat:last-child { border-right: 0; }
  .employee-customer-detail-main { padding: 18px; }
  .employee-customer-timeline-item { grid-template-columns: 132px minmax(0, 1fr); gap: 13px; padding-left: 17px; }
  .employee-customer-note-grid, .employee-customer-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .employee-customer-note-grid { padding: 16px 18px; }
  .employee-customer-note-actions { padding: 0 18px 18px; }

  .mobile-dialog { width: min(620px, calc(100vw - 48px)); }
  .mobile-dialog.customer-detail-dialog, .mobile-dialog.customer-edit-dialog, .mobile-dialog.operations-dialog { width: min(860px, calc(100vw - 48px)); }
  .mobile-dialog-header, .mobile-dialog-footer { padding-left: 18px; padding-right: 18px; }
  .mobile-dialog-body { padding: 18px; }
  .customer-detail-body { padding: 0; }
  .mobile-toast { bottom: 24px; }
}

@media (min-width: 1200px) {
  .employee-operation-summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 900px) and (max-width: 1199px) {
  .employee-customs-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .employee-customs-query { grid-column: 1 / -1; }
  .employee-customs-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .employee-customs-actions .primary-command { flex: 0 0 110px; }
}

@media (max-width: 360px) {
  .mobile-main { padding-left: 9px; padding-right: 9px; }
  .count-grid { gap: 4px; }
  .count-grid span { font-size: 8px; }
  .mobile-brand strong { max-width: 122px; }
  .employee-tool-tabs button span { display: none; }
}

@media (max-width: 520px) {
  .log-page-heading { align-items: flex-start; flex-direction: column; }
  .log-page-heading .primary-command { width: 100%; }
  .account-metric-form-grid { grid-template-columns: 1fr; }
  .attendance-page-heading, .todo-page-heading { align-items: flex-start; flex-direction: column; }
  .attendance-page-heading > span, .todo-page-heading > strong { align-self: flex-start; }
  .leave-date-grid { grid-template-columns: 1fr; }
  .employee-leave-form > .primary-command { width: 100%; }
  .assigned-task-heading { align-items: flex-start; flex-direction: column; }
  .assigned-task-heading .task-filter { width: 100%; }
  .score-trend-heading { align-items: flex-start; flex-direction: column; }
  .score-range-control { width: 100%; }
  .score-range-control button { flex: 1; min-width: 0; padding: 0 3px; font-size: 9px; }
  .score-custom-range { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-trend-summary { grid-template-columns: 1fr; }
  .score-trend-summary .mobile-metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .score-trend-summary .mobile-metric:last-child { border-bottom: 0; }
  .score-trend-chart { min-height: 230px; padding-left: 4px; padding-right: 4px; }
  .score-trend-chart svg { height: 220px; }
  .mobile-nav button { font-size: 8px; }
  .operations-page-heading { align-items: flex-start; flex-direction: column; }
  .operations-heading-actions { width: 100%; }
  .operations-heading-actions > button { flex: 1; }
  .employee-execution-item { grid-template-columns: 34px minmax(0, 1fr) auto; }
  .employee-execution-result { grid-column: 2 / -1; justify-content: flex-start; }
  .employee-execution-result > span { text-align: left; }
  .customer-section-heading:has(.customer-focus-tabs) { align-items: flex-start; flex-direction: column; }
  .customer-focus-tabs { width: 100%; }
  .customer-focus-tabs button { flex: 1; padding: 0 4px; }
  .employee-customs-summary { grid-template-columns: 1fr; }
  .employee-customs-summary > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .employee-customs-summary > div:last-child { border-bottom: 0; }
  .employee-customs-row { grid-template-columns: 1fr; }
}
