:root {
  --bg0: #080a10;
  --bg1: #0e1118;
  --bg2: #141720;
  --bg3: #1b1f2e;
  --bg4: #232840;
  --panel: #141720;
  --ink: #eef0fa;
  --muted: #8890b0;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --brand: #00e1ff;
  --brand-hot: #4f8ef7;
  --accent: #3ecf8e;
  --accent-soft: rgba(62, 207, 142, 0.12);
  --warn: #4f8ef7;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --radius: 16px;
  --radius-sm: 10px;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --logo-filter: none;
  --topbar: #0a0c12;
  --side: #0c0f16;
  --input-bg: #0e1118;
  --table-head: rgba(255, 255, 255, 0.03);
  --hover: rgba(255, 255, 255, 0.04);
  --comm-bg: rgba(255, 255, 255, 0.03);
  --ok-bg: rgba(62, 207, 142, 0.12);
  --ok-border: rgba(62, 207, 142, 0.35);
  --err-bg: rgba(79, 142, 247, 0.16);
  --err-border: rgba(79, 142, 247, 0.42);
  --badge-bg: rgba(255, 255, 255, 0.06);
  --grid-line: rgba(0, 225, 255, 0.035);
}

html[data-theme="light"] {
  --bg0: #f3f5f9;
  --bg1: #ffffff;
  --bg2: #f7f8fc;
  --bg3: #eef1f7;
  --bg4: #e4e9f2;
  --panel: #ffffff;
  --ink: #141824;
  --muted: #5b657a;
  --line: rgba(20, 24, 36, 0.1);
  --line2: rgba(20, 24, 36, 0.16);
  --brand: #0097ad;
  --brand-hot: #3b6fd4;
  --accent: #0b6e4f;
  --accent-soft: #e8f5ef;
  --warn: #3b6fd4;
  --shadow: 0 16px 40px rgba(20, 24, 36, 0.08);
  --logo-filter: none;
  --topbar: #0e1118;
  --side: #141824;
  --input-bg: #ffffff;
  --table-head: #f4f6fb;
  --hover: #f7f9fc;
  --comm-bg: #f8fafc;
  --ok-bg: #e8f5ef;
  --ok-border: #b7e0cc;
  --err-bg: #eef4ff;
  --err-border: #b7c9f5;
  --badge-bg: #eef2f7;
  --grid-line: rgba(0, 120, 140, 0.05);
}

.punch-map-panel {
  margin-top: 14px;
  border: 1px solid var(--line2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg2);
}
.punch-mode {
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line2);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  display: grid;
  gap: 10px;
}
.punch-mode legend {
  padding: 0 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.punch-mode-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}
.punch-mode-option input {
  margin-top: 4px;
}
.punch-mode-option span {
  display: grid;
  gap: 2px;
}
.punch-mode-option small {
  color: var(--muted);
  font-size: 0.82rem;
}
.punch-mode-option strong {
  font-size: 0.95rem;
}
#tp_travelWrap.is-disabled {
  opacity: 0.55;
}
.punch-gps-opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  cursor: pointer;
}
.punch-gps-opt span {
  display: grid;
  gap: 2px;
  font-size: 0.95rem;
}
.punch-gps-opt small {
  color: var(--muted);
  font-size: 0.82rem;
}
.punch-location-details {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}
.punch-map {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
  background: var(--bg1);
}
.punch-map-credit {
  margin: 0;
  padding: 6px 12px;
  font-size: 11px;
}
#tp_rows tr { cursor: pointer; }
#tp_rows tr.selected { background: var(--accent-soft); }
#att_rows tr.selected { background: var(--accent-soft); }
#tel_rows tr.selected { background: var(--accent-soft); }
#tm_body table tr.selected { background: var(--accent-soft); }
#tm_body table tr[style*="cursor:pointer"]:hover { background: var(--hover); }

.expense-trip-status {
  border: 1px solid currentColor;
}
.expense-trip-status.ok {
  color: var(--accent);
  background: var(--accent-soft);
}
.expense-trip-status.missing {
  color: var(--brand-hot);
  background: var(--err-bg);
}
.expense-gst-note {
  margin: 10px 0 0;
  color: var(--brand-hot);
  font-weight: 700;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 12% -10%, rgba(0, 225, 255, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(79, 142, 247, 0.06), transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
}

a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

body.nav-open {
  overflow: hidden;
}

/* —— Top chrome —— */
.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 14px;
  padding: 10px 16px;
  background: var(--topbar);
  border-bottom: 1px solid var(--line2);
  color: #eef0fa;
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.nav-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #eef0fa;
  cursor: pointer;
  padding: 0;
}
.nav-menu-btn:hover {
  border-color: rgba(0, 225, 255, 0.4);
  color: #00e1ff;
}
.nav-menu-icon,
.nav-menu-icon::before,
.nav-menu-icon::after {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
}
.nav-menu-icon::before,
.nav-menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
}
.nav-menu-icon::before { top: -5px; }
.nav-menu-icon::after { top: 5px; }
.header-punch {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  justify-self: stretch;
}
.header-punch-customer {
  display: flex;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 420px;
}
.header-punch-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.header-punch-customer input,
.header-punch-customer select {
  flex: 1 1 0;
  min-width: 0;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  color: #eef0fa;
  padding: 0 10px;
  font-size: 0.82rem;
}
.header-punch-customer input::placeholder {
  color: #8890b0;
}
.header-punch-customer select option {
  color: #111;
  background: #fff;
}
.header-punch-btn {
  height: 34px;
  min-width: 52px;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.header-punch-msg {
  font-size: 0.72rem;
  color: #a8b0d0;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}
.header-punch-msg:empty { display: none; }
.header-punch-msg.is-ok { color: #6dffb0; }
.header-punch-msg.is-err { color: #ff8f8f; }
.side-backdrop {
  display: none;
}
.punch-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}
.punch-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.attendance-report {
  border: 1px solid var(--line2);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  padding: 16px 18px;
}
.attendance-report-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.attendance-report-head img {
  height: 36px;
  width: auto;
}
.attendance-report-head h3 {
  margin: 0;
  font-size: 1.15rem;
}
.attendance-report-meta {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 0.88rem;
}
.attendance-report table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.attendance-report th,
.attendance-report td {
  border: 1px solid var(--line2);
  padding: 6px 8px;
  text-align: left;
  white-space: nowrap;
}
.attendance-report th {
  background: var(--bg);
  font-weight: 600;
}
.attendance-report tr.is-invalid td {
  color: var(--brand-hot);
}
.attendance-report-foot {
  margin-top: 12px;
  font-weight: 600;
}
.punch-edit-panel {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line2);
  border-radius: var(--radius-sm);
  background: var(--bg2);
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-lockup .indxo-logo {
  height: 28px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
  filter: none;
  opacity: 1;
  visibility: visible;
}
.brand-copy { min-width: 0; line-height: 1.15; }
.brand-copy .module {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.brand-copy .module em {
  font-style: normal;
  color: #00e1ff;
}
.brand-copy .sub {
  font-size: 0.68rem;
  color: #a8b0c8;
  margin-top: 2px;
}

/* Topbar stays dark in both themes — keep brand readable */
html[data-theme="light"] .topbar,
html[data-theme="light"] .auth-top {
  color: #eef0fa;
}
html[data-theme="light"] .brand-copy .module {
  color: #ffffff;
}
html[data-theme="light"] .brand-copy .sub {
  color: #a8b0c8;
}

.close-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(79, 142, 247, 0.45);
  background: rgba(79, 142, 247, 0.14);
  color: #4f8ef7;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.close-flag input {
  width: 16px;
  height: 16px;
  accent-color: #4f8ef7;
  cursor: pointer;
}
.close-flag span {
  color: #4f8ef7;
  font-weight: 700;
}
html[data-theme="light"] .close-flag {
  background: #eef4ff;
  border-color: #b7c9f5;
  color: #3b6fd4;
}
html[data-theme="light"] .close-flag span {
  color: #3b6fd4;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
}

.portal-switch {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.portal-switch a,
.portal-switch button {
  border: 0;
  background: transparent;
  color: #8890b0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.portal-switch a:hover,
.portal-switch button:hover { color: #fff; }
.portal-switch a.active,
.portal-switch button.active {
  background: rgba(0, 225, 255, 0.16);
  color: #00e1ff;
  box-shadow: inset 0 0 0 1px rgba(0, 225, 255, 0.35);
}

.theme-toggle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #eef0fa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: rgba(0, 225, 255, 0.4);
  color: #00e1ff;
}

.db-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.7rem;
  color: #c9d2dc;
  white-space: nowrap;
  flex-shrink: 0;
}
.db-status-icon {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  justify-content: center;
  color: #a8b0c8;
}
.db-status-icon .db-icon {
  display: block;
}
.db-status-icon .dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--topbar, #0a0c12);
  box-shadow: none;
}
.db-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8890b0;
  box-shadow: 0 0 0 0 rgba(136, 144, 176, 0.4);
  flex-shrink: 0;
}
.db-status.ok,
.db-status.ok .db-icon { color: #6dffb0; }
.db-status.ok .dot {
  background: #3ecf8e;
  box-shadow: 0 0 6px rgba(62, 207, 142, 0.7);
}
.db-status.bad,
.db-status.bad .db-icon { color: #ff8f8f; }
.db-status.bad .dot {
  background: #f05252;
  box-shadow: 0 0 6px rgba(240, 82, 82, 0.7);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.user-menu {
  position: relative;
  flex-shrink: 0;
}
.user-chip,
.user-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  color: #c9d2dc;
  min-width: 0;
  max-width: 180px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.user-menu-toggle:hover,
.user-menu.is-open .user-menu-toggle {
  border-color: rgba(0, 225, 255, 0.35);
  color: #eef0fa;
}
.user-chip #who,
.user-menu-toggle #who {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.user-chip .avatar,
.user-menu-toggle .avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00e1ff, #4f8ef7);
  color: #041018;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.user-menu-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.user-menu.is-open .user-menu-caret {
  transform: rotate(180deg);
}
.user-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  padding: 6px;
  border-radius: 12px;
  background: #121826;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  z-index: 1300;
}
.user-menu-dropdown[hidden] { display: none; }
.user-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #eef0fa;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.user-menu-item:hover {
  background: rgba(79, 142, 247, 0.16);
  color: #8fb4ff;
}
.user-menu-db {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 4px;
  padding-bottom: 4px;
}
.user-menu-label {
  padding: 6px 12px 2px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8890b0;
}
.user-menu-item.is-active {
  background: rgba(62, 207, 142, 0.16);
  color: #9cf0c8;
}
.travel-db-banner {
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}
.travel-db-banner.is-test {
  background: #7a4a00;
  color: #ffe9c4;
}
.travel-db-banner.is-live {
  background: #0b3d2e;
  color: #b8f5d8;
}
.db-status.is-test .db-icon,
.db-status.is-test .dot { color: #ffc46b; }
.btn-logout {
  color: #eef0fa !important;
  border-color: rgba(255,255,255,.15) !important;
  height: 34px;
  padding: 0 12px;
  flex-shrink: 0;
}

.xt-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.xt-modal[hidden],
.xt-modal.hidden { display: none !important; }
.xt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 8, 14, 0.62);
}
.xt-modal-card {
  position: relative;
  width: min(420px, 100%);
  background: var(--panel, #121826);
  color: var(--ink, #eef0fa);
  border: 1px solid var(--line, rgba(255,255,255,.14));
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.xt-modal-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
html[data-theme="light"] .xt-modal-card {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

/* —— Layout —— */
.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  flex: 1;
  min-height: 0;
}
.side {
  background: var(--side);
  color: #c9d2dc;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-right: 1px solid var(--line);
}
.side button {
  background: transparent;
  border: 0;
  color: inherit;
  text-align: left;
  padding: 11px 12px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.9rem;
}
.side button.active,
.side button:hover {
  background: rgba(0, 225, 255, 0.1);
  color: #00e1ff;
}
.side button.side-sub {
  padding-left: 1.5rem;
}
.side button.side-main {
  font-weight: 600;
  margin-top: 4px;
}
.side-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-group + .side-group {
  margin-top: 8px;
}
.side-group-toggle,
.side button.side-group-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--muted);
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.side-group-toggle:hover,
.side button.side-group-toggle:hover {
  background: rgba(0, 225, 255, 0.08);
  color: #00e1ff;
}
.side button.side-group-toggle.active {
  background: transparent;
  color: var(--muted);
}
.side-chevron {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.side-group.collapsed .side-chevron {
  transform: rotate(-90deg);
}
.side-group-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.side-group.collapsed .side-group-body {
  display: none;
}
.main {
  padding: 18px 20px 40px;
  overflow: auto;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.panel + .panel { margin-top: 14px; }
.panel h2, .panel h3 {
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.grid-2 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 160px; flex: 1; }
.field label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.field input,
.field select,
.field textarea {
  border: 1px solid var(--line2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--input-bg);
  color: var(--ink);
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(0, 225, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 225, 255, 0.12);
}
.field textarea { min-height: 120px; resize: vertical; }

/* Native date / time picker calendar icon — white on all screens. */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"] {
  color-scheme: dark;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
  opacity: 1 !important;
  cursor: pointer;
  background-color: transparent;
  filter: invert(1) brightness(2) contrast(1.2) !important;
}
.travel-grid input[type="date"]::-webkit-calendar-picker-indicator,
.travel-grid input[type="time"]::-webkit-calendar-picker-indicator,
.travel-grid input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.travel-grid input[type="month"]::-webkit-calendar-picker-indicator,
.travel-grid input[type="week"]::-webkit-calendar-picker-indicator,
html[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
html[data-theme="light"] input[type="time"]::-webkit-calendar-picker-indicator,
html[data-theme="light"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
html[data-theme="light"] input[type="month"]::-webkit-calendar-picker-indicator,
html[data-theme="light"] input[type="week"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(2) contrast(1.2) !important;
}

.btn {
  border: 1px solid var(--line2);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 600;
  background: var(--bg4);
  color: var(--ink);
}
.btn.primary {
  background: linear-gradient(135deg, #00c4de, #00e1ff);
  border-color: transparent;
  color: #041018;
}
.btn.primary:hover { filter: brightness(1.05); }
.btn.accent {
  background: var(--accent);
  border-color: transparent;
  color: #041018;
}
html[data-theme="light"] .btn.accent { color: #fff; }
.btn.ghost {
  background: transparent;
}
.btn.danger {
  background: transparent;
  border-color: rgba(79, 142, 247, 0.45);
  color: #4f8ef7;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.is-busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  flex: 0 0 auto;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.tabs button {
  background: transparent;
  border: 0;
  padding: 10px 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  font-weight: 500;
}
.tabs button.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--table-head);
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
}
tr:hover td { background: var(--hover); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}
.badge.open { background: var(--accent-soft); color: var(--accent); }
.badge.closed { background: var(--badge-bg); color: var(--muted); }
.badge.esc { background: rgba(79, 142, 247, 0.18); color: #8fb4ff; }

.muted { color: var(--muted); }
.err {
  color: #4f8ef7;
  background: var(--err-bg);
  border: 1px solid var(--err-border);
  padding: 10px 12px;
  border-radius: 10px;
}
.ok {
  color: var(--accent);
  background: var(--ok-bg);
  border: 1px solid var(--ok-border);
  padding: 10px 12px;
  border-radius: 10px;
}

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
.stat .n {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--brand);
}
.stat .l { color: var(--muted); font-size: 0.75rem; margin-top: 4px; }

.comm {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: var(--comm-bg);
}
.comm header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}
.bar { height: 10px; background: var(--bg4); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #4f8ef7, #00e1ff); }

.hidden { display: none !important; }

/* —— Landing / login —— */
.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
}
.auth-body {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px 16px 48px;
}
.hero-card {
  width: min(560px, 100%);
  text-align: center;
  padding: 36px 28px 32px;
  background: rgba(14, 17, 24, 0.72);
  border: 1px solid var(--line2);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
html[data-theme="light"] .hero-card {
  background: rgba(255, 255, 255, 0.9);
}
.hero-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 18px;
}
.hero-logos .indxo-logo {
  height: 42px;
  width: auto;
  max-width: 180px;
}
.hero-logos .x-mark {
  width: 42px;
  height: 42px;
}
.hero-card h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  letter-spacing: -0.03em;
  font-weight: 700;
}
.hero-card h1 em {
  font-style: normal;
  color: var(--brand);
}
.hero-card .lede {
  margin: 0 auto 22px;
  max-width: 38ch;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.95rem;
}
.portal-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.portal-cta a {
  display: block;
  text-align: left;
  padding: 16px 14px;
  border-radius: 14px;
  border: 1px solid var(--line2);
  background: var(--bg2);
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.portal-cta a:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 225, 255, 0.45);
  box-shadow: 0 10px 28px rgba(0, 225, 255, 0.12);
}
.portal-cta strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--ink);
}
.portal-cta span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.login-card {
  width: min(420px, 100%);
  background: rgba(14, 17, 24, 0.82);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line2);
  backdrop-filter: blur(16px);
}
html[data-theme="light"] .login-card {
  background: rgba(255, 255, 255, 0.95);
}
.login-card .hero-logos { margin-bottom: 14px; }
.login-card .hero-logos .indxo-logo { height: 32px; }
.login-card .hero-logos .x-mark { width: 32px; height: 32px; }
.login-card h1 {
  margin: 0 0 6px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}
.login-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.login-forgot-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.login-forgot-row label { margin: 0; }
.login-forgot-link {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent, #00c2d7);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.login-forgot-link:hover { opacity: 0.85; }
.login-help {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: rgba(0, 194, 215, 0.08);
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text);
}
.login-help h3 {
  margin: 0 0 6px;
  font-size: 0.92rem;
}
.login-help p { margin: 0 0 8px; color: inherit; }
.login-help p:last-child { margin-bottom: 0; }
.login-help a { color: var(--accent, #00c2d7); font-weight: 600; }
.login-msg-help {
  margin: 8px 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: inherit;
  opacity: 0.95;
}
.login-msg-help a { color: inherit; font-weight: 700; }

#table tbody tr.active,
#pw_rows tr.active {
  background: rgba(0, 225, 255, 0.08);
}
.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.pager .btn { min-width: 42px; padding: 6px 10px; }
.pager .btn:disabled { opacity: 0.4; cursor: not-allowed; }

.attach-layout {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 12px;
  min-height: 320px;
}
.attach-list {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--comm-bg);
  overflow: auto;
  max-height: 420px;
}
.attach-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.attach-item:hover,
.attach-item.active {
  background: rgba(0, 225, 255, 0.08);
}
.attach-item .name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  word-break: break-word;
}
.attach-item .meta {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}
.attach-preview {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg2);
  padding: 12px;
  overflow: auto;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.attach-preview img,
.attach-preview iframe {
  width: 100%;
  max-height: 480px;
  border: 0;
  border-radius: 8px;
  background: #111;
}
.attach-preview .preview-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.app-footer {
  margin-top: auto;
  padding: 14px 20px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: transparent;
}
.app-footer strong {
  color: var(--ink);
  font-weight: 600;
}

.app-status-footer {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px 16px;
  padding: 8px 14px;
  font-size: 0.72rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  position: sticky;
  bottom: 0;
  z-index: 20;
}
.status-footer-left {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: flex-start;
  min-width: 0;
}
.status-footer-center {
  text-align: center;
  white-space: nowrap;
}
.status-footer-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}
.status-kpi {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  white-space: nowrap;
}
.status-kpi-label {
  opacity: 0.85;
}
.status-kpi strong {
  color: var(--ink);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.status-db {
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.status-db.is-live {
  color: #0f766e;
  border-color: color-mix(in srgb, #0f766e 40%, var(--line));
  background: color-mix(in srgb, #14b8a6 12%, transparent);
}
.status-db.is-test {
  color: #a16207;
  border-color: color-mix(in srgb, #a16207 40%, var(--line));
  background: color-mix(in srgb, #eab308 14%, transparent);
}
.status-clock {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 900px) {
  .app-status-footer {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .status-footer-center { display: none; }
  .status-footer-right { justify-content: flex-start; }
}
.shell, .auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-shell .auth-body,
.shell .layout {
  flex: 1;
  min-width: 0;
}

/* Side section headers (legacy) */
.side-sep {
  margin: 14px 8px 6px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.side-sep:first-child {
  margin-top: 2px;
}
.mom-mandatory {
  color: var(--brand-hot) !important;
  font-weight: 700 !important;
  margin: 0 0 14px;
  font-size: 0.95rem;
}
.eligibility-banner {
  border-left: 3px solid var(--accent, #0ea5e9);
}
.hotel-disclaimer {
  border-left: 4px solid #4f8ef7;
  background: rgba(79, 142, 247, 0.14);
  border: 1px solid rgba(79, 142, 247, 0.42);
  border-left-width: 4px;
  margin-bottom: 12px;
}
.travel-ux .hotel-disclaimer { margin-bottom: 0; }
#ta_detail:empty { display: none; }
.hotel-disclaimer-title {
  margin: 0 0 10px;
  color: #8fb4ff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}
.hotel-disclaimer-text,
.hotel-disclaimer-body {
  margin: 0;
  color: #c5d6ff;
  font-weight: 500;
  font-size: 0.94rem;
  line-height: 1.55;
}
.hotel-disclaimer-body ol {
  margin: 0;
  padding-left: 1.25rem;
}
.hotel-disclaimer-body li + li {
  margin-top: 8px;
}
.hotel-disclaimer-body strong {
  font-weight: 700;
  color: #e8efff;
}
html[data-theme="light"] .hotel-disclaimer {
  background: #eef4ff;
  border-color: #b7c9f5;
}
html[data-theme="light"] .hotel-disclaimer-title {
  color: #3b6fd4;
}
html[data-theme="light"] .hotel-disclaimer-text,
html[data-theme="light"] .hotel-disclaimer-body {
  color: #2f5bb8;
}
html[data-theme="light"] .hotel-disclaimer-body strong {
  color: #244a9a;
}
.travel-grid {
  color: #111;
}
.travel-grid th {
  color: #38bdf8 !important;
  font-weight: 700;
}
section[id^="view-travel-"] table th {
  color: #38bdf8 !important;
  font-weight: 700;
}
.travel-grid td {
  color: #111;
}
.travel-grid input,
.travel-grid select,
.travel-grid .calc-cell,
.travel-grid .amount-cell {
  width: 100%;
  min-width: 72px;
  font-size: 0.85rem;
  color: #111 !important;
  background: #fff !important;
}
/* Masters Y/N and other selects must stay readable on white table cells */
#tm_body table select,
#tm_modeTable select,
#view-travel-masters table select {
  color: #111 !important;
  background: #ffffff !important;
  border: 1px solid #c5cad6;
  border-radius: 6px;
  padding: 4px 8px;
  min-width: 3.25rem;
  appearance: auto;
}
#tm_body table select option,
#tm_modeTable select option,
#view-travel-masters table select option {
  color: #111;
  background: #ffffff;
}
.travel-grid input::placeholder {
  color: #666;
}
.travel-grid .chk {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  color: #111;
}
.travel-grid .grid-total-row td {
  font-weight: 700;
  border-top: 2px solid var(--line);
}
.travel-grid .grid-total-row td:first-child {
  text-align: right;
}
.field.shrink {
  flex: 0 0 auto;
}
.amount-input {
  width: 11ch;
  min-width: 11ch;
  text-align: left;
}
.row.equal-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}
.row.equal-fields > .field:not(.shrink) {
  flex: 1 1 220px;
  min-width: 220px;
}
.btn.sm {
  padding: 4px 8px;
  font-size: 0.8rem;
}
.expense-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.8fr);
  gap: 16px;
  margin-top: 12px;
  align-items: start;
}
.travel-ux { display: grid; gap: 12px; }
.travel-ux > .panel + .panel { margin-top: 0; }
.travel-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.travel-page-head .tabs { margin: 0; }
.travel-page-head h2 { margin: 0 0 4px; }
.travel-page-head .muted { margin: 0; }

/* Title on row 1, Requests/Expenses tabs fixed on row 2 (Approvals / List / Report) */
.travel-fixed-tabs-head {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 12px;
}
.travel-fixed-tabs-head-top {
  min-width: 0;
}
.travel-fixed-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  width: 100%;
  margin: 0;
}
.travel-fixed-tabs button {
  flex: 1 1 0;
  min-width: 0;
}
.ta-decision-row {
  align-items: flex-end;
}
.ta-decision-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 38px;
  align-items: center;
}
.trep-actions-row {
  flex-wrap: nowrap;
  min-height: 38px;
  align-items: center;
}
.travel-step { margin: 0; }
.travel-step-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}
.travel-form-title { margin: 0 0 4px; font-size: 1.05rem; }
.travel-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 8px;
}
.travel-section-head h3 { margin: 0; font-size: 1rem; }
.form-grid {
  display: grid;
  gap: 12px;
  align-items: end;
}
.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.form-span-3 { grid-column: 1 / -1; }
.form-grid .field { min-width: 0; }
.type-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.type-pill {
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.85rem;
}
.type-pill.is-active {
  background: rgba(0, 225, 255, 0.16);
  border-color: rgba(0, 225, 255, 0.45);
  color: #00e1ff;
}
.travel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  align-items: center;
}
.travel-actions-right {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.toolbar-row .field.grow { flex: 1 1 220px; min-width: 0; }
.bill-attach-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin-top: 12px;
}
.bill-attach-hint { margin: 6px 0 0; }
.callout-warn {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--err-border);
  background: var(--err-bg);
  color: var(--brand-hot);
  font-weight: 600;
}
.callout-warn a { color: inherit; text-decoration: underline; }
.callout-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: 8px;
  font-weight: 600;
}
.bill-preview h3 { margin-top: 0; }
.bill-preview img,
.bill-preview iframe {
  width: 100%;
  max-height: 420px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #111;
}
.expense-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}
.sum-card {
  background: var(--panel-2, rgba(127,127,127,.08));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 120px;
}
.ok-msg { color: #16a34a; font-weight: 600; }
.err-msg { color: var(--brand-hot); font-weight: 600; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
.tabs button.active {
  background: var(--accent, #0ea5e9);
  color: #fff;
  border-color: transparent;
}
.field.grow { flex: 1; min-width: 180px; }
/* Task list search: keep full placeholder visible ("Task #, summary, customer, assignee") */
.field.search-field {
  flex: 2 1 220px;
  min-width: min(100%, 220px);
}
.field.search-field input {
  min-width: 0;
  width: 100%;
}

/* Help — User Manual & Learn video */
.help-manual .help-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 16px 0 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border, rgba(255,255,255,0.12));
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.12));
}
.help-manual .help-toc a {
  color: var(--accent, #0ea5e9);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.help-manual .help-toc a:hover { text-decoration: underline; }
.help-section {
  margin: 22px 0;
  scroll-margin-top: 16px;
}
.help-section h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}
.help-section ol, .help-section ul {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.55;
}
.help-section li + li { margin-top: 6px; }
.help-callout {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent, #0ea5e9);
  background: rgba(14, 165, 233, 0.08);
  border-radius: 0 8px 8px 0;
}
.help-callout-warn {
  border-left-color: #4f8ef7;
  background: rgba(79, 142, 247, 0.12);
  color: #8fb4ff;
  font-weight: 600;
}
html[data-theme="light"] .help-callout-warn { color: #3b6fd4; }
.help-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.help-role-card {
  padding: 12px 14px;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 10px;
  background: rgba(0,0,0,0.12);
}
html[data-theme="light"] .help-role-card {
  background: #f8fafc;
}
.help-role-card h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--accent, #0ea5e9);
}
.help-role-card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.learn-player {
  margin-top: 16px;
  border: 1px solid var(--border, rgba(255,255,255,0.14));
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(14,165,233,0.12), rgba(0,0,0,0.2));
}
html[data-theme="light"] .learn-player {
  background: linear-gradient(160deg, #e0f2fe, #f8fafc);
}
.learn-stage {
  min-height: 280px;
  padding: 28px 24px 20px;
  text-align: center;
}
.learn-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, #0ea5e9);
  margin-bottom: 8px;
}
.learn-title {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  line-height: 1.25;
}
.learn-body {
  margin: 0 auto 18px;
  max-width: 42rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--muted, #94a3b8);
}
html[data-theme="light"] .learn-body { color: #475569; }
.learn-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 88px;
}
.learn-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.25rem;
  background: var(--accent, #0ea5e9);
  color: #fff;
}
.learn-hint { margin: 0; font-weight: 600; opacity: 0.85; }
.learn-steps-mini {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.learn-steps-mini span {
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  font-size: 0.9rem;
  font-weight: 600;
}
html[data-theme="light"] .learn-steps-mini span {
  background: #fff;
  border-color: #cbd5e1;
}
.learn-mock {
  display: grid;
  gap: 6px;
  width: min(260px, 100%);
  text-align: left;
}
.learn-mock-label { font-size: 0.75rem; font-weight: 600; opacity: 0.8; }
.learn-mock-box {
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border, rgba(255,255,255,0.2));
  background: rgba(255,255,255,0.06);
}
.learn-mock-btn {
  margin-top: 4px;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  background: var(--accent, #0ea5e9);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.learn-sig {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: min(360px, 100%);
  text-align: left;
}
.learn-sig small { display: block; font-weight: 600; margin-bottom: 6px; }
.learn-sig i {
  display: block;
  height: 2px;
  background: currentColor;
  opacity: 0.45;
  margin-top: 22px;
}
.learn-sig-cust small { color: #dc2626; }
.learn-progress {
  height: 4px;
  background: rgba(255,255,255,0.1);
}
html[data-theme="light"] .learn-progress { background: #e2e8f0; }
.learn-progress i {
  display: block;
  height: 100%;
  width: 12.5%;
  background: var(--accent, #0ea5e9);
  transition: width 0.35s ease;
}
.learn-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  flex-wrap: wrap;
}
.learn-controls .btn {
  min-width: 96px;
  font-size: 1rem;
  padding: 10px 18px;
}
.learn-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 16px;
  justify-content: center;
}
.learn-chapters button {
  border: 1px solid var(--border, rgba(255,255,255,0.14));
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  opacity: 0.75;
}
.learn-chapters button.active,
.learn-chapters button:hover {
  opacity: 1;
  border-color: var(--accent, #0ea5e9);
  color: var(--accent, #0ea5e9);
}

/* Full-width Need help banner (above Search) */
.support-banner {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent, #0ea5e9);
  background: rgba(14, 165, 233, 0.08);
}
html[data-theme="light"] .support-banner {
  background: #f0f9ff;
  border-color: #0ea5e9;
  border-left-width: 4px;
}
.support-banner-title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 10px;
  color: var(--accent, #0ea5e9);
}
.support-banner-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 16px;
  align-items: start;
  width: 100%;
}
.support-banner-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.support-banner-item > span {
  color: var(--muted, #94a3b8);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.support-banner-item strong,
.support-banner-item a {
  font-size: 0.95rem;
  font-weight: 600;
  word-break: break-word;
}
.support-banner-item a {
  color: var(--accent, #0ea5e9);
  text-decoration: none;
}
.support-banner-item a:hover { text-decoration: underline; }
.support-banner-item a.is-empty {
  color: inherit;
  pointer-events: none;
  text-decoration: none;
}

/* Face verification modal (punch IN / OUT) */
.face-punch-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 12, 24, 0.72);
  backdrop-filter: blur(4px);
}
.face-punch-modal.hidden { display: none; }
.face-punch-card {
  width: min(440px, 100%);
  background: var(--panel, #121826);
  border: 1px solid var(--line2, rgba(255,255,255,.14));
  border-radius: 14px;
  padding: 16px 16px 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.face-punch-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.face-punch-video-wrap {
  position: relative;
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 4 / 3;
}
.face-punch-video-wrap video,
.face-punch-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.face-punch-overlay { pointer-events: none; }
.face-punch-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
.bill-camera-card {
  width: min(560px, 100%);
}
.bill-camera-video-wrap {
  aspect-ratio: 3 / 4;
}
.expense-bill-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
}
.expense-bill-actions .expense-bill-file {
  min-width: 160px;
  flex: 1 1 160px;
}

.face-day-panel {
  border: 1px solid var(--line2, rgba(255,255,255,.14));
  border-radius: 12px;
  padding: 14px;
  background: var(--panel, rgba(0,0,0,.2));
}
.face-day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.face-day-card {
  border: 1px solid var(--line, rgba(255,255,255,.08));
  border-radius: 10px;
  padding: 8px;
  background: rgba(0,0,0,.15);
}
.face-day-meta {
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.face-thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}
.face-thumb-btn img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #000;
}
.face-thumb-empty {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 8px;
  border: 1px dashed var(--line2, rgba(255,255,255,.2));
  font-size: 0.8rem;
}
.face-preview-card img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  margin-top: 10px;
  border-radius: 10px;
  background: #000;
}
.att-day-row:hover {
  background: var(--hover, rgba(255,255,255,.04));
}

@media (max-width: 1100px) {
  .header-punch-msg { display: none; }
  .user-menu-toggle { max-width: 140px; }
}

@media (max-width: 960px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions"
      "punch punch";
    gap: 8px 10px;
    padding: 8px 12px;
  }
  .topbar-brand { grid-area: brand; }
  .header-punch { grid-area: punch; }
  .top-actions { grid-area: actions; gap: 6px; }
  .nav-menu-btn { display: inline-flex; }
  .brand-copy .sub { display: none; }
  .portal-switch { display: none; }
  .user-menu-toggle #who { display: none; }
  .user-menu-toggle { padding: 5px 8px; max-width: none; }
  .header-punch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .header-punch-customer {
    grid-column: 1 / -1;
    max-width: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .header-punch-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .header-punch-btn {
    width: 100%;
    height: 40px;
    font-size: 0.9rem;
  }
  .header-punch-btn#hdr_in::before { content: 'Punch '; }
  .header-punch-btn#hdr_out::before { content: 'Punch '; }

  .layout { grid-template-columns: 1fr; }
  .side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    z-index: 1100;
    flex-direction: column;
    overflow: auto;
    padding: 16px 12px 24px;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: 8px 0 28px rgba(0, 0, 0, 0.35);
    border-right: 1px solid var(--line);
  }
  .side.is-open { transform: translateX(0); }
  .side-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(6, 10, 18, 0.55);
    border: 0;
    padding: 0;
    margin: 0;
  }
  .side-backdrop[hidden] { display: none; }
  .side-group { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .side-group-body { flex-direction: column; }
  .support-banner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .stat-grid, .portal-cta, .attach-layout, .expense-layout { grid-template-columns: 1fr; }
  .form-grid-2,
  .form-grid-3,
  .form-grid-4,
  .form-grid-5 { grid-template-columns: 1fr 1fr; }
  .form-span-3 { grid-column: 1 / -1; }
  .travel-actions,
  .travel-actions-right,
  .toolbar-row,
  .bill-attach-row { width: 100%; }
  .travel-actions-right .btn,
  .toolbar-row .btn,
  .bill-attach-row .btn { flex: 1 1 auto; min-height: 40px; }
  .auth-top { flex-wrap: wrap; }
  .punch-toolbar { flex-direction: column; align-items: stretch; }
  .punch-toolbar .field,
  .punch-toolbar .field.grow { width: 100%; }
  .punch-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .punch-toolbar-actions .btn {
    width: 100%;
    min-height: 42px;
  }
  .main { padding: 12px 12px 28px; }
  .panel { padding: 14px; }
  .row { gap: 10px; }
  .field { min-width: 0; }
  .field.grow,
  .field.search-field { flex: 1 1 100%; min-width: 0; }
  .amount-input { width: 100%; min-width: 0; }
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-left: -2px;
    margin-right: -2px;
  }
  .travel-grid,
  .table-wrap table { min-width: 640px; }
  .tabs { width: 100%; }
  .tabs button { flex: 1 1 auto; min-height: 40px; }
  .close-flag { white-space: normal; }
  .travel-page-head { align-items: stretch; }
  .punch-edit-panel { margin-top: 14px; }
}

@media (max-width: 520px) {
  .support-banner-grid { grid-template-columns: 1fr; }
  .brand-lockup .indxo-logo { height: 24px; max-width: 110px; }
  .brand-copy .module { font-size: 0.85rem; }
  .form-grid-2,
  .form-grid-3,
  .form-grid-4,
  .form-grid-5 { grid-template-columns: 1fr; }
  .type-pills { width: 100%; }
  .type-pill { flex: 1 1 auto; text-align: center; }
}

/* Leave & Attendance calendar */
.leave-cal-weekdays,
.leave-cal-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.leave-cal-weekdays {
  margin-bottom: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}
.leave-cal-cell {
  position: relative;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  text-align: left;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.leave-cal-cell.is-empty,
.leave-cal-cell.is-dim {
  opacity: 0.35;
  cursor: default;
  background: transparent;
}
.leave-cal-daynum { font-weight: 700; font-size: 0.85rem; }
.leave-cal-status { font-size: 0.65rem; line-height: 1.2; opacity: 0.9; }
.leave-travel-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.58rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  background: #0369a1;
  color: #fff;
}
.leave-travel-badge.is-blink {
  background: #b91c1c;
  animation: leave-blink 1s step-start infinite;
}
@keyframes leave-blink {
  50% { opacity: 0.35; }
}
.lc-green { background: color-mix(in srgb, #16a34a 18%, var(--panel)); border-color: color-mix(in srgb, #16a34a 45%, var(--line)); }
.lc-yellow { background: color-mix(in srgb, #ca8a04 18%, var(--panel)); border-color: color-mix(in srgb, #ca8a04 45%, var(--line)); }
.lc-orange { background: color-mix(in srgb, #ea580c 18%, var(--panel)); border-color: color-mix(in srgb, #ea580c 45%, var(--line)); }
.lc-red { background: color-mix(in srgb, #dc2626 16%, var(--panel)); border-color: color-mix(in srgb, #dc2626 45%, var(--line)); }
.lc-blue { background: color-mix(in srgb, #2563eb 16%, var(--panel)); border-color: color-mix(in srgb, #2563eb 45%, var(--line)); }
.lc-grey { background: color-mix(in srgb, #6b7280 14%, var(--panel)); border-color: color-mix(in srgb, #6b7280 40%, var(--line)); }
.lc-purple { background: color-mix(in srgb, #7c3aed 16%, var(--panel)); border-color: color-mix(in srgb, #7c3aed 45%, var(--line)); }
.lc-brown { background: color-mix(in srgb, #92400e 16%, var(--panel)); border-color: color-mix(in srgb, #92400e 45%, var(--line)); }
.lc-pink { background: color-mix(in srgb, #db2777 22%, var(--panel)); border-color: color-mix(in srgb, #db2777 55%, var(--line)); }
.leave-day-detail {
  scroll-margin-top: 16px;
}
#lv_mp_form,
#lv_day_form,
#lv_cal_detail {
  scroll-margin-top: 20px;
}
.leave-days-ok {
  color: #15803d;
  font-weight: 700;
}
.leave-days-short {
  color: #b91c1c;
  font-weight: 700;
}
html[data-theme="dark"] .leave-days-ok { color: #4ade80; }
html[data-theme="dark"] .leave-days-short { color: #f87171; }
.leave-bal-box tbody tr.is-selected-bal {
  background: color-mix(in srgb, #0f766e 14%, var(--panel));
}
.leave-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
  font-size: 0.72rem;
  color: var(--muted);
}
.leave-legend-title { font-weight: 700; color: var(--ink); width: 100%; }
.leave-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.leave-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid var(--line);
  display: inline-block;
}
.leave-swatch.lc-travel-badge { background: #0369a1; border-radius: 999px; }
.leave-swatch.lc-adv-blink { background: #b91c1c; }
.leave-swatch.lc-green { background: #16a34a; }
.leave-swatch.lc-yellow { background: #ca8a04; }
.leave-swatch.lc-orange { background: #ea580c; }
.leave-swatch.lc-red { background: #dc2626; }
.leave-swatch.lc-blue { background: #2563eb; }
.leave-swatch.lc-grey { background: #6b7280; }
.leave-swatch.lc-purple { background: #7c3aed; }
.leave-swatch.lc-pink { background: #db2777; }
.leave-swatch.lc-rh { background: #db2777; border-radius: 999px; }
.leave-rh-mark {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 999px;
  background: #db2777;
  color: #fff;
}
