:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #cbd5e1;
  --primary: #0f172a;
  --primary-strong: #111827;
  --accent: #2563eb;
  --success-bg: #ecfdf5;
  --success-bg-2: #dcfce7;
  --success-border: #86efac;
  --success-text: #166534;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  --info-text: #1d4ed8;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --error-text: #991b1b;
  --warn-bg: #fff7ed;
  --warn-border: #fdba74;
  --warn-text: #9a3412;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.splash-active,
body.location-loading {
  overflow: hidden;
}

body.location-loading {
  touch-action: none;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: white;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-box {
  width: min(92vw, 420px);
  text-align: center;
  padding: 28px 22px;
}

.splash-logo {
  width: 92px;
  height: 92px;
  display: block;
  margin: 0 auto 18px auto;
  object-fit: contain;
  background: white;
  border-radius: 22px;
  padding: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.splash-title {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.splash-subtitle {
  margin: 0 0 18px 0;
  font-size: 14px;
  line-height: 1.6;
  color: #cbd5e1;
}

.splash-loader,
.location-loader__spinner {
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

.splash-loader {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-top-color: white;
}

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

.toast-container {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: 12px;
  left: 12px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  border-radius: 16px;
  padding: 14px 16px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  animation: toastIn 0.22s ease;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}

.toast.info {
  background: #2563eb;
}

.toast.success {
  background: #16a34a;
}

.toast.warn {
  background: #ea580c;
}

.toast.error {
  background: #dc2626;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.wrap {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(203, 213, 225, 0.45);
}

.top-right-tools {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.install-btn {
  width: auto;
  margin-top: 0;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.install-btn.hidden {
  display: none;
}

.logo {
  text-align: center;
  margin-bottom: 18px;
}

.logo img {
  max-width: 180px;
  max-height: 80px;
}

h1 {
  font-size: 22px;
  text-align: center;
  margin: 0 0 18px 0;
}

label {
  display: block;
  font-weight: 700;
  margin: 14px 0 6px;
}

input,
select,
button {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 16px;
}

input,
select {
  background: white;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

input:disabled,
select:disabled {
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}

button {
  background: var(--primary);
  color: white;
  border: none;
  font-weight: 700;
  margin-top: 18px;
  cursor: pointer;
  transition: transform 0.05s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

button:hover {
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.18);
}

button:active {
  transform: scale(0.99);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.actions-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.actions-row button {
  margin-top: 0;
}

.secondary-btn {
  background: #e2e8f0;
  color: #0f172a;
  box-shadow: none;
}

.secondary-btn:hover {
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.status {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 14px;
  display: none;
  line-height: 1.6;
}

.status.info {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-border);
}

.status.success {
  background: linear-gradient(180deg, var(--success-bg) 0%, var(--success-bg-2) 100%);
  color: var(--success-text);
  border: 1px solid var(--success-border);
  box-shadow: 0 2px 10px rgba(22, 101, 52, 0.08);
}

.status.error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 1px solid var(--error-border);
}

.status.warn {
  background: var(--warn-bg);
  color: var(--warn-text);
  border: 1px solid var(--warn-border);
}

.employee-found {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--success-bg) 0%, var(--success-bg-2) 100%);
  border: 1px solid var(--success-border);
  color: var(--success-text);
  display: none;
}

.employee-found .title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.85;
}

.employee-found .name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.employee-found .meta {
  margin-top: 6px;
  font-size: 13px;
  color: #15803d;
}

.employee-not-found {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: var(--error-text);
  display: none;
}

.email-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.result-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.result-line {
  margin: 6px 0;
}

.result-line strong {
  display: inline-block;
  min-width: 110px;
}

.success-time-card {
  margin-top: 14px;
  margin-bottom: 12px;
  padding: 16px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #bbf7d0;
  text-align: center;
}

.success-time-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #15803d;
  margin-bottom: 6px;
}

.success-time-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  color: #14532d;
}

.decision-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.decision-card.approved {
  background: linear-gradient(180deg, #ecfdf5 0%, #dcfce7 100%);
  border-color: #86efac;
  color: #166534;
}

.decision-card.rejected {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #fca5a5;
  color: #991b1b;
}

.decision-badge {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  border: 1px solid;
}

.decision-badge.approved {
  background: rgba(255, 255, 255, 0.75);
  border-color: #86efac;
  color: #166534;
}

.decision-badge.rejected {
  background: rgba(255, 255, 255, 0.72);
  border-color: #fca5a5;
  color: #991b1b;
}

.decision-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.decision-icon-wrap {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.decision-icon-wrap.approved {
  border-color: #86efac;
}

.decision-icon-wrap.rejected {
  border-color: #fca5a5;
}

.decision-icon {
  font-size: 28px;
  line-height: 1;
}

.decision-content {
  flex: 1;
  min-width: 0;
}

.decision-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
}

.decision-message {
  font-size: 14px;
  line-height: 1.7;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.decision-footnote {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  opacity: 0.9;
}

.countdown-wrap {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(22, 101, 52, 0.25);
}

.countdown-text {
  font-size: 12px;
  color: #166534;
  margin-bottom: 8px;
}

.countdown-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  overflow: hidden;
}

.countdown-bar-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
  transform-origin: left center;
}

.location-loader[hidden] {
  display: none !important;
}

.location-loader {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.location-loader__card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 24px;
  padding: 26px 22px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.location-loader__spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px auto;
  border: 4px solid #e5e7eb;
  border-top-color: #111827;
}

.location-loader__title {
  font-size: 19px;
  line-height: 1.4;
  font-weight: 800;
  color: #111827;
}

.location-loader__text {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: #4b5563;
}

.location-loader__subtext {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: #64748b;
}

.top-right-tools__group {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.admin-login-body {
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  min-height: 100vh;
}

.admin-login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-login-card {
  width: min(460px, 100%);
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #dbe5ef;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.24);
  padding: 24px;
}

.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.admin-login-brand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 16px;
  background: #f8fafc;
  padding: 6px;
}

.admin-login-brand h1 {
  margin: 0;
  text-align: left;
  font-size: 24px;
}

.admin-login-brand p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.admin-login-form {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.admin-login-btn {
  width: 100%;
}

.nested-card {
  box-shadow: none;
  border-radius: 18px;
  padding: 14px;
}

.intro-card {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fbff 100%);
}

.intro-card__title,
.help-card__title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #1d4ed8;
}

.intro-card__text,
.help-card__text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.8;
  color: #334155;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.help-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.help-card a {
  color: #1d4ed8;
  font-weight: 700;
}

/* ================================
   ADMIN DASHBOARD
================================ */

.admin-dashboard-body {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.app-shell {
  display: grid;
  grid-template-columns: 290px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: white;
  padding: 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 16px;
  background: white;
  padding: 6px;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: #cbd5e1;
}

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

.nav button {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0;
}

.nav button.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: rgba(255,255,255,0.18);
}

.nav button small {
  display: block;
  margin-top: 5px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 600;
}

.sidebar-card {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.sidebar-card-title {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #93c5fd;
  font-weight: 800;
}

.sidebar-card p {
  margin: 10px 0 0;
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.7;
}

.main {
  padding: 22px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.headline {
  font-size: 30px;
  font-weight: 800;
  margin: 0;
  text-align: left;
}

.subheadline {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.system-bar {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.system-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--border);
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15,23,42,0.05);
}

.system-pill strong {
  color: #0f172a;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #94a3b8;
}

.dot.ok {
  background: #16a34a;
}

.dot.error {
  background: #dc2626;
}

.dot.loading {
  background: #f59e0b;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn,
.input,
.select {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: white;
  padding: 12px 14px;
}

.btn {
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(15,23,42,0.08);
  width: auto;
  margin-top: 0;
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.btn.secondary {
  background: white;
  color: var(--text);
}

.btn.linkish {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.btn.danger {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.btn.compact {
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.filters,
.overview-panel,
.content-card,
.insight-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.filters-admin-extended {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.filter-group,
.overview-grid,
.field,
.insight-grid {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.filter-group-wide {
  grid-column: span 2;
}

.filter-group label,
.overview-label,
.field label,
.insight-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0;
}

.filter-actions {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-actions .btn {
  flex: 0 0 auto;
}

.overview-layout {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  margin-bottom: 18px;
}

.overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.overview-note {
  font-size: 13px;
  color: #475569;
  line-height: 1.8;
}

.cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(15,23,42,0.08);
}

.metric-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.metric-value {
  margin-top: 10px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
}

.metric-foot {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
}

.insight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.grouped-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.insight-card {
  padding: 16px;
}

.insight-value {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.insight-help {
  margin-top: 8px;
  font-size: 13px;
  color: #475569;
  line-height: 1.7;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
  background: white;
}

th, td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  white-space: nowrap;
}

.duplicate-row {
  background: #fff7f7;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid;
  white-space: nowrap;
}

.badge.entry { background: #ecfdf5; border-color: #86efac; color: #166534; }
.badge.exit { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.badge.approved { background: #ecfdf5; border-color: #86efac; color: #166534; }
.badge.rejected { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.badge.default { background: #f8fafc; border-color: #cbd5e1; color: #334155; }
.badge.marriott { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.badge.group { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right,
.toolbar-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.helper-box {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 13px;
  line-height: 1.8;
}

.hidden {
  display: none !important;
}

.empty {
  padding: 26px;
  text-align: center;
  color: var(--muted);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  display: none;
  z-index: 200;
}

.drawer-backdrop.show {
  display: block;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(560px, 100vw);
  height: 100vh;
  background: white;
  box-shadow: -10px 0 40px rgba(15,23,42,0.18);
  z-index: 210;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.drawer.show {
  transform: translateX(0);
}

.drawer-header {
  padding: 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.drawer-title {
  font-size: 20px;
  font-weight: 800;
}

.drawer-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.drawer-body {
  padding: 18px;
  overflow: auto;
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: white;
}

.field textarea { min-height: 92px; resize: vertical; }
.field.span-2 { grid-column: span 2; }
.field small { color: var(--muted); line-height: 1.6; }

.drawer-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}

@media (max-width: 1280px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filters-admin-extended {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .grouped-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .overview-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .cards,
  .insight-grid,
  .overview-grid,
  .form-grid,
  .filters-admin-extended,
  .grouped-summary-grid {
    grid-template-columns: 1fr;
  }

  .field.span-2,
  .filter-group-wide {
    grid-column: span 1;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .actions {
    justify-content: flex-start;
  }

  .main {
    padding: 16px;
  }

  .filter-actions {
    align-items: stretch;
  }

  .filter-actions .btn {
    width: auto;
  }
}

@media (max-width: 520px) {
  .wrap {
    max-width: 100%;
    padding: 14px 12px 24px;
  }

  .card {
    padding: 18px;
    border-radius: 18px;
  }

  .logo img {
    max-width: 150px;
    max-height: 68px;
  }

  h1 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  label {
    margin: 12px 0 6px;
    font-size: 14px;
  }

  input,
  select,
  button {
    font-size: 16px;
    padding: 12px 13px;
  }

  .employee-found .name {
    font-size: 18px;
  }

  .result-line strong {
    min-width: 95px;
  }

  .success-time-value {
    font-size: 24px;
  }

  .decision-main,
  .actions-row {
    flex-direction: column;
  }

  .decision-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .decision-title {
    font-size: 17px;
  }

  .top-right-tools {
    margin-bottom: 10px;
  }

  .install-btn {
    width: 100%;
    border-radius: 12px;
  }

  .toast-container {
    top: auto;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  }

  .top-right-tools__group {
    width: 100%;
    justify-content: flex-end;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .wrap {
    padding: 16px 12px 28px;
  }

  .card {
    padding: 18px;
  }

  h1 {
    font-size: 20px;
  }

  .success-time-value {
    font-size: 24px;
  }
}
