:root {
  --bg: #f5f6f7;
  --panel: #ffffff;
  --ink: #171a20;
  --muted: #69717f;
  --line: #dde1e7;
  --brand: #14171c;
  --brand-2: #262b33;
  --accent: #0f766e;
  --accent-soft: #e7f3f1;
  --accent-dark: #115e59;
  --success: #047857;
  --warn: #a16207;
  --bad: #b42318;
  --shadow: 0 22px 55px rgba(20, 23, 28, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, .08), transparent 340px),
    linear-gradient(180deg, #eef1f3 0, #f5f6f7 340px),
    var(--bg);
}

button, input, select { font: inherit; }
button { min-height: 44px; border: 0; border-radius: 8px; font-weight: 800; cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
input, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fbfcfd;
  font-weight: 700;
}
select[multiple] { min-height: 92px; padding: 8px 10px; }
input:focus, select:focus {
  outline: 3px solid rgba(15, 118, 110, .14);
  border-color: rgba(15, 118, 110, .7);
  background: #ffffff;
}
label { display: grid; gap: 7px; color: #344054; font-size: 13px; font-weight: 900; }
.remember-row { grid-template-columns: auto 1fr; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; color: var(--muted); }
.remember-row input { width: 18px; min-height: 18px; padding: 0; }
.check-row { grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.check-row input { width: 18px; min-height: 18px; padding: 0; }
h1, h2, p { margin: 0; }

.shell { min-height: 100vh; }
.public-view { width: min(100%, 1180px); min-height: 100vh; margin: 0 auto; padding: 18px; display: grid; gap: 18px; align-content: start; }
.public-nav, .hero, .auth-card, .panel, .owner-top, .employee-top, .punch-screen {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.public-nav { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 38px; height: 38px; }
.brand strong { font-size: 18px; }
.nav-actions, .hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.primary { color: white; background: var(--brand); }
.primary:hover { background: #262b33; }
.secondary { color: var(--accent-dark); background: var(--accent-soft); }
.ghost { color: var(--brand); background: #eef2f7; }
.install-button { color: white; background: var(--accent); }
.install-button.small { padding: 0 14px; }
.payment-banner,
.bulk-import-box,
.coords-help {
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 8px;
  background: #f2fbf9;
  padding: 13px 14px;
  color: #0f172a;
}
.payment-banner {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}
.payment-banner strong,
.bulk-import-box strong {
  color: #0f766e;
}
.payment-banner span,
.bulk-import-box span,
.coords-help p {
  color: var(--muted);
  line-height: 1.45;
}
.bulk-import-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
}
.bulk-import-box > div {
  display: grid;
  gap: 3px;
}
.file-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
}
.file-action input {
  display: none;
}
.help-dot {
  width: 22px;
  min-height: 22px;
  height: 22px;
  border-radius: 50%;
  padding: 0;
  margin-left: 5px;
  display: inline-grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13px;
}
.coords-help {
  margin-top: 10px;
}
.coords-help summary {
  cursor: pointer;
  font-weight: 900;
}
.coords-help a {
  color: var(--accent-dark);
  font-weight: 900;
}
.report-table-wrap {
  overflow-x: auto;
}
.daily-report-table th,
.daily-report-table td {
  vertical-align: top;
}
.daily-report-table td:first-child,
.daily-report-table td:nth-child(2) {
  min-width: 130px;
}
.daily-report-table td strong,
.daily-report-table td span {
  display: block;
}
.daily-report-table td span,
.daily-report-table small {
  color: var(--muted);
  font-size: 12px;
}
.report-summary {
  min-width: 260px;
  font-weight: 800;
  line-height: 1.45;
}
.report-employee-head td {
  background: #e8eef3;
  color: #1f2937;
  font-weight: 900;
  font-size: 14px;
  border-top: 2px solid #cbd5e1;
}
.report-employee-head strong {
  font-size: 15px;
}
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 150px;
}
.report-actions .table-action {
  min-height: 34px;
  padding: 0 10px;
}
.report-row.bad {
  background: #fff7f7;
}
.report-row.warn {
  background: #fffaf0;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.access-suite {
  min-height: calc(100vh - 106px);
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.access-rail {
  display: grid;
  align-content: space-between;
  gap: 28px;
  padding: 34px;
  color: white;
  background:
    linear-gradient(180deg, rgba(20,23,28,.96), rgba(38,43,51,.98)),
    var(--brand);
}
.rail-brand { display: flex; align-items: center; gap: 12px; }
.rail-brand img { width: 48px; height: 48px; }
.rail-brand div { display: grid; gap: 2px; }
.rail-brand strong { font-size: 20px; }
.rail-brand span, .rail-copy p, .rail-metrics span { color: rgba(255,255,255,.68); }
.rail-copy { display: grid; gap: 14px; }
.rail-copy .eyebrow { color: #99f6e4; }
.rail-copy h1 { font-size: 42px; line-height: 1.03; letter-spacing: 0; }
.rail-copy p { font-size: 16px; line-height: 1.55; }
.rail-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rail-metrics article {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
}
.rail-metrics strong { font-size: 19px; }
.access-panel {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(24px, 6vw, 64px);
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,251,252,.98));
}
.access-switch {
  width: min(100%, 520px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eef1f4;
}
.access-switch button {
  min-height: 40px;
  color: var(--muted);
  background: transparent;
  border-radius: 7px;
}
.access-switch button.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 8px 20px rgba(20,23,28,.08);
}
.employee-only .public-nav,
.employee-only .access-rail,
.employee-only .access-switch {
  display: none;
}
.employee-only {
  min-height: 100vh;
  align-content: center;
}
.employee-only .access-suite {
  width: min(100%, 900px);
  min-height: auto;
  grid-template-columns: 1fr;
  margin: auto;
}
.employee-only .access-panel {
  padding: clamp(26px, 7vw, 58px);
}

.hero { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: center; gap: 18px; padding: 30px; }
.hero-copy { display: grid; gap: 14px; }
.eyebrow, .card-head span { color: var(--accent-dark); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.hero h1 { max-width: 760px; font-size: 48px; line-height: 1.02; letter-spacing: 0; }
.hero p { max-width: 680px; color: var(--muted); font-size: 17px; line-height: 1.45; }
.hero-card { display: grid; gap: 8px; padding: 18px; border-radius: 10px; background: linear-gradient(150deg, #0b1220, #1e293b); color: white; }
.hero-card span, .hero-card small { color: rgba(255,255,255,.75); }
.hero-card strong { font-size: 34px; letter-spacing: 0; }

.auth-grid { display: grid; grid-template-columns: minmax(0, 880px); gap: 16px; align-items: stretch; }
.auth-side {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 420px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(160deg, #0b1220, #1e293b);
  color: white;
  box-shadow: var(--shadow);
}
.auth-side p { color: rgba(255,255,255,.74); line-height: 1.45; }
.auth-side .eyebrow { color: #93c5fd; }
.feature-list { display: grid; gap: 8px; margin-top: 8px; }
.feature-list span { padding: 10px 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: rgba(255,255,255,.86); }
.auth-card { width: min(100%, 520px); display: grid; gap: 16px; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.register-card {
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 0;
  overflow: visible;
}
.register-card .card-head p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.45;
}
.register-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.trial-note {
  margin-top: 12px;
  border: 1px solid rgba(15, 118, 110, .18);
  background: #f1f8f7;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 4px;
}

.trial-note strong {
  color: #0f766e;
}

.trial-note span {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
}

.enterprise-notes {
  grid-column: 1 / -1;
}

.enterprise-notes textarea,
.plan-admin-card textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

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

.plan-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(140px, .9fr) repeat(3, minmax(96px, .55fr)) auto auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.plan-create-form button {
  padding-inline: 18px;
}

.plan-admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.plan-admin-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.plan-admin-card header span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-admin-card label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.plan-admin-card input,
.plan-admin-card textarea {
  min-height: 40px;
}

.plan-admin-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 760px) {
  .bulk-import-box {
    display: grid;
  }
  .plan-admin-grid,
  .plan-admin-row,
  .plan-create-form {
    grid-template-columns: 1fr;
  }
}
.register-submit { width: 100%; }
.compact-auth { max-width: 520px; }
.card-head { display: grid; gap: 6px; margin-bottom: 4px; }
.card-head h2 { font-size: 32px; line-height: 1.1; }
.card-head p { color: var(--muted); line-height: 1.45; }

.owner-app { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; height: 100vh; overflow-y: auto; display: grid; align-content: start; gap: 7px; padding: 18px; background: #0b1220; color: white; }
.side-brand { margin-bottom: 18px; }
.side-link { display: flex; align-items: center; justify-content: flex-start; padding: 0 12px; color: #cbd5e1; background: transparent; text-align: left; }
.side-link.active { color: white; background: rgba(37,99,235,.24); }
.muted-link { margin-top: 20px; color: #98a2b3; }
.owner-main { grid-column: 2; padding: 18px; display: grid; gap: 16px; align-content: start; }
.owner-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; }
.owner-top span { color: var(--muted); }
.owner-panel { display: grid; gap: 16px; }

.dashboard-hero { min-height: 170px; display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: stretch; padding: 22px; border-radius: 10px; background: linear-gradient(135deg, #ffffff, #edf7f5); border: 1px solid var(--line); }
.dashboard-hero h1 { font-size: 34px; }
.dashboard-hero p { color: var(--muted); margin-top: 8px; }
.status-card { display: grid; align-content: center; gap: 8px; padding: 16px; border-radius: 10px; background: #1e293b; color: white; }
.status-card span { color: rgba(255,255,255,.7); }
.status-card strong { font-size: 30px; letter-spacing: 0; }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.metric { display: grid; gap: 5px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.metric span, .metric small { color: var(--muted); }
.metric strong { font-size: 28px; }
.readonly-metrics .metric { background: #f1f4f7; border-style: dashed; }
.readonly-metrics .metric strong { font-size: 20px; color: #344054; }
.dashboard-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { padding: 18px; }
.onboarding-panel { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.onboarding-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.onboarding-list button { min-height: 38px; padding: 0 10px; color: #344054; background: #f2f4f7; text-align: left; }
.onboarding-list button.done { color: #065f46; background: #dff7ed; }
.feed { display: grid; gap: 6px; }
.feed article { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f9fafb; }
.feed article strong { font-size: 13px; }
.feed span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.punch-item { min-height: 42px; }
.quick-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; }
.quick-filters button { min-height: 34px; width: 100%; padding: 0 12px; border-color: #cfd6df; color: #485264; background: #fff; font-size: 12px; }
.quick-filters button.active { color: #fff; border-color: var(--brand); background: var(--brand); }
.compact-punch { grid-template-columns: 1fr; align-items: start; gap: 8px; }
.compact-punch > div { min-width: 0; }
.compact-punch strong, .compact-punch span { overflow-wrap: anywhere; }
.punch-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; }
.punch-actions .badge { justify-self: start; }
.punch-actions .table-action { justify-self: end; }
.badge { display: inline-flex; min-height: 24px; align-items: center; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.badge.warn { color: #7c4a03; background: #fff7df; }
.badge.danger { color: #991b1b; background: #fee2e2; }

.form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end; }
.form-grid label { grid-column: span 2; }
.form-grid button { grid-column: span 2; }
.form-grid .danger-step { color: #fff; border-color: #9f1239; background: #9f1239; }
.report-grid label { grid-column: span 2; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: white; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.table-action { min-height: 34px; padding: 0 10px; font-size: 12px; }
.map-link { width: 100%; min-width: 0; min-height: 30px; padding: 0; color: var(--accent-dark); background: transparent; font-weight: 900; line-height: 1.25; text-decoration: none; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.map-link:hover { text-decoration: underline; }
.map-open { display: inline-flex; width: fit-content; min-height: 36px; align-items: center; padding: 0 12px; text-decoration: none; }
.link-box { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #f9fafb; color: var(--muted); overflow-wrap: anywhere; }
.message { min-height: 22px; color: var(--muted); font-weight: 900; }
.message.ok { color: var(--success); }
.message.error { color: var(--bad); }
.biometric-login { width: 100%; }
.top-actions .small { white-space: nowrap; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(9, 12, 18, .58); }
.modal-backdrop[hidden] { display: none; }
.modal-card { width: min(94vw, 820px); max-height: min(88vh, 760px); overflow: auto; display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.edit-card { width: min(94vw, 680px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.icon-close { width: auto; min-height: 36px; padding: 0 12px; }
.map-frame { min-height: 360px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #eef2f6; }
.map-frame iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }
.modal-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.modal-details span { display: grid; gap: 3px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #f9fafb; overflow-wrap: anywhere; }
.modal-details strong { color: var(--ink); }
.modal-form .wide-field { grid-column: span 4; }
.qr-card { width: min(94vw, 420px); justify-items: center; }
.qr-image { width: 260px; height: 260px; max-width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

.employee-app { width: min(100%, 720px); margin: 0 auto; padding: 16px; display: grid; gap: 14px; }
.employee-top { display: flex; align-items: center; justify-content: space-between; padding: 12px; }
.punch-screen { display: grid; gap: 14px; place-items: stretch; padding: 22px; text-align: center; }
.punch-screen > strong { font-size: 48px; letter-spacing: 0; }
.punch-flow { display: grid; gap: 10px; }
.punch { min-height: 64px; color: white; background: var(--accent); font-size: 18px; }
.punch:not(.primary-step):not(.danger-step) { background: #334155; }
.danger-step { background: #991b1b; }
.employee-week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.employee-week .metric { padding: 10px; }
.employee-week .metric strong { font-size: 20px; }
.employee-tools { display: grid; gap: 10px; text-align: left; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #f9fafb; }
.employee-tools summary { cursor: pointer; font-weight: 900; color: var(--ink); }
.employee-mini-form { display: grid; gap: 8px; margin-top: 10px; }
.employee-mini-form button { width: 100%; }
.employee-view[hidden] { display: none !important; }
.employee-security-form {
  width: 100%;
  margin-top: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.request-item { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.request-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.support-thread { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.support-thread.unread { border-color: rgba(13, 148, 136, .35); background: #f0fdfa; }
.support-thread.closed { opacity: .68; }
.chat-feed { max-height: 420px; overflow: auto; padding-right: 4px; }
.chat-message { max-width: 82%; }
.chat-message small { color: #98a2b3; font-size: 11px; }
.chat-message.from-vendor { justify-self: start; border-color: #badbd7; background: #e7f3f1; }
.chat-message.from-owner { justify-self: end; border-color: #d8dee8; background: #ffffff; }
.vendor-app .owner-top { background: #111827; color: #fff; }
.vendor-app .owner-top span { color: #9ca3af; }
.vendor-usage { display: grid; gap: 6px; min-width: 140px; }
.vendor-usage input { min-height: 34px; }
.vendor-actions { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 920px) {
  .hero, .auth-grid, .register-card, .access-suite, .owner-app, .dashboard-hero, .dashboard-columns { grid-template-columns: 1fr; }
  .access-suite { min-height: auto; }
  .access-rail { min-height: 360px; }
  .sidebar { position: static; width: auto; height: auto; min-height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-main { grid-column: auto; }
  .side-brand { grid-column: 1 / -1; margin-bottom: 6px; }
  .hero h1 { font-size: 36px; }
  .rail-copy h1 { font-size: 34px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-punch, .modal-details { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .public-view, .owner-main, .employee-app { padding: 10px; }
  .public-nav, .owner-top { align-items: stretch; flex-direction: column; }
  .nav-actions, .hero-actions { display: grid; grid-template-columns: 1fr; }
  .access-rail, .access-panel { padding: 20px; }
  .access-switch { grid-template-columns: 1fr; }
  .rail-metrics { grid-template-columns: 1fr; }
  .rail-copy h1 { font-size: 30px; }
  .register-fields { grid-template-columns: 1fr; }
  .register-submit { width: 100%; }
  .form-grid, .metric-grid, .sidebar { grid-template-columns: 1fr; }
  .form-grid label, .form-grid button { grid-column: auto; }
  .quick-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .punch-actions { grid-template-columns: 1fr; }
  .punch-actions .table-action { justify-self: start; }
  .modal-form .wide-field { grid-column: auto; }
  .map-frame, .map-frame iframe { min-height: 280px; }
  .employee-app { min-height: 100dvh; gap: 8px; padding: 8px; }
  .employee-top { padding: 8px 10px; }
  .employee-top .brand img { width: 30px; height: 30px; }
  .employee-top .ghost { min-height: 36px; padding: 0 10px; }
  .punch-screen { gap: 8px; padding: 12px; }
  .punch-screen > span { font-size: 12px; }
  .punch-screen > strong { font-size: 34px; line-height: 1; }
  #employeeMeta { font-size: 13px; }
  .punch-flow { gap: 8px; }
  .punch { min-height: 52px; font-size: 15px; }
  #note { min-height: 40px; }
  #history.feed { gap: 5px; }
  #history.feed article { padding: 7px 9px; }
  #employeeWeek.feed article { padding: 7px 9px; }
  .employee-week { gap: 8px; }
  .request-item { grid-template-columns: 1fr; }
  .request-actions { justify-content: flex-start; }
  .support-thread { grid-template-columns: 1fr; }
  .chat-message { max-width: 100%; }
  .hero { padding: 18px; }
  .hero h1 { font-size: 30px; }
}

@media (max-width: 390px) {
  button, input, select { min-height: 40px; }
  .punch-screen > strong { font-size: 30px; }
  .punch { min-height: 48px; font-size: 14px; }
}

/* AccesTime refined skin v31 */
:root {
  --bg: #f4f7f9;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #dce3ea;
  --brand: #172033;
  --brand-2: #243047;
  --accent: #0f766e;
  --accent-soft: #e8f5f2;
  --accent-dark: #0b5f58;
  --success: #067647;
  --warn: #b7791f;
  --bad: #b42318;
  --shadow: 0 16px 40px rgba(17, 24, 39, .07);
}

body {
  font-family: Inter, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  background:
    linear-gradient(180deg, rgba(244, 247, 249, .96), rgba(244, 247, 249, 1)),
    var(--bg);
}

button {
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 750;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(17, 24, 39, .08); }
button:active:not(:disabled) { transform: translateY(0); box-shadow: none; }

input, select {
  border-color: #d8e0e8;
  border-radius: 7px;
  background: #fbfcfe;
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
input:focus, select:focus {
  outline: 3px solid rgba(15, 118, 110, .13);
  border-color: #13a196;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, .12);
}
label { color: #3b4656; font-weight: 750; }

.public-nav, .auth-card, .panel, .owner-top, .employee-top, .punch-screen, .access-suite, .table-wrap, .modal-card {
  border-color: rgba(147, 161, 176, .28);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.brand img, .rail-brand img, .side-brand img {
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(15, 118, 110, .16));
}
.brand strong { color: var(--ink); letter-spacing: 0; }
.sidebar .brand strong, .access-rail .brand strong, .rail-brand strong { color: #fff; }

.primary {
  background: linear-gradient(180deg, #1f2937, #111827);
  border-color: rgba(255,255,255,.08);
}
.primary:hover { background: linear-gradient(180deg, #253247, #172033); }
.secondary {
  color: #0b5f58;
  background: #e6f4f1;
  border-color: #c6e5df;
}
.ghost {
  color: #344054;
  background: #f3f6f8;
  border-color: #e1e7ee;
}
.install-button {
  background: linear-gradient(180deg, #0f9488, #0f766e);
  border-color: rgba(255,255,255,.12);
}
.danger-action {
  color: #a11822;
  background: #fff1f2;
  border-color: #ffd4d8;
}
.danger-action:hover:not(:disabled) {
  color: #fff;
  background: #b42318;
  border-color: #b42318;
}

.access-suite {
  border-radius: 10px;
  background: #fff;
}
.access-rail {
  background:
    linear-gradient(160deg, rgba(23, 32, 51, .98), rgba(15, 118, 110, .86)),
    #172033;
}
.rail-copy h1 { font-weight: 820; }
.rail-metrics article {
  border-radius: 8px;
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(10px);
}
.access-panel { background: linear-gradient(180deg, #ffffff, #f8fafc); }
.access-switch {
  border-radius: 8px;
  background: #edf2f6;
}
.access-switch button { border-radius: 6px; }

.auth-card {
  padding: 22px;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(147, 161, 176, .22);
}
.register-card, .compact-auth { box-shadow: none; }
.card-head h2 { color: #172033; font-weight: 820; }
.card-head p { color: #667085; }
.eyebrow, .card-head span { color: #0b766d; letter-spacing: .08em; }

.owner-app { grid-template-columns: 268px minmax(0, 1fr); }
.sidebar {
  width: 268px;
  gap: 5px;
  padding: 18px 14px;
  background:
    linear-gradient(180deg, #111827 0%, #172033 58%, #132f33 100%);
  border-right: 1px solid rgba(255,255,255,.08);
}
.side-brand {
  min-height: 64px;
  padding: 8px 10px 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.side-link {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 7px;
  color: #c8d2df;
  border-color: transparent;
}
.side-link:hover:not(:disabled) {
  color: #fff;
  background: rgba(255,255,255,.08);
  box-shadow: none;
}
.side-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(20, 184, 166, .24), rgba(59, 130, 246, .14));
  border-color: rgba(153, 246, 228, .18);
}
.muted-link {
  color: #ffb4bc;
  background: rgba(180, 35, 24, .08);
}
.owner-main {
  grid-column: 2;
  padding: 22px;
  gap: 18px;
}
.owner-top {
  min-height: 76px;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
}
.owner-top h2 { color: #172033; }

.dashboard-hero {
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(232, 245, 242, .88)),
    #fff;
}
.status-card {
  border-radius: 8px;
  background: linear-gradient(160deg, #172033, #0f766e);
}
.metric {
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}
.metric strong { color: #172033; font-weight: 820; }
.panel {
  background: rgba(255,255,255,.9);
}
.feed article {
  border-radius: 7px;
  background: #fbfcfe;
}

.form-grid {
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(147, 161, 176, .2);
  border-radius: 8px;
  background: #fbfcfe;
}
.form-grid button { align-self: end; }
.check-row, .remember-row {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #e1e7ee;
  border-radius: 7px;
  background: #fff;
}

.table-wrap {
  overflow: auto;
  background: #fff;
}
table { border-collapse: separate; border-spacing: 0; }
th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #667085;
  background: #f8fafc;
  font-size: 11px;
  letter-spacing: .06em;
}
td {
  color: #344054;
  background: #fff;
  vertical-align: middle;
}
tbody tr:hover td { background: #f8fbfb; }
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 300px;
}
.table-action {
  min-height: 32px;
  border-radius: 6px;
  font-size: 12px;
}

.quick-filters button {
  border-radius: 7px;
  color: #435064;
  background: #fff;
}
.quick-filters button.active {
  border-color: #172033;
  background: #172033;
}
.badge { border-radius: 6px; }
.link-box {
  border-radius: 7px;
  background: #f8fafc;
}
.message { font-size: 13px; }

.employee-app { padding: 20px; }
.punch-screen {
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.punch {
  border-radius: 8px;
  background: linear-gradient(180deg, #13a196, #0f766e);
}
.punch:not(.primary-step):not(.danger-step) { background: linear-gradient(180deg, #42526b, #293548); }
.danger-step { background: linear-gradient(180deg, #be2f24, #991b1b); }

@media (max-width: 920px) {
  .owner-app { grid-template-columns: 1fr; }
  .sidebar {
    width: auto;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .owner-main { grid-column: auto; padding: 14px; }
  .auth-card { padding: 18px; }
}

@media (max-width: 560px) {
  .form-grid { padding: 12px; }
  .row-actions { min-width: 220px; }
  .auth-card { padding: 16px; }
  .card-head h2 { font-size: 26px; }
}

/* AccesTime calm shell v32 */
:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #101828;
  --muted: #667085;
  --line: #d9e2ec;
  --brand: #101828;
  --brand-2: #344054;
  --accent: #0f766e;
  --accent-soft: #edf8f6;
  --accent-dark: #0b5f58;
  --shadow: 0 10px 28px rgba(16, 24, 40, .06);
}

body {
  background: #f6f8fb;
}

.owner-app {
  grid-template-columns: 272px minmax(0, 1fr);
}

.sidebar {
  width: 272px;
  padding: 18px 14px;
  background: #ffffff;
  color: #101828;
  border-right: 1px solid #e4e9f0;
  box-shadow: 8px 0 24px rgba(16, 24, 40, .04);
}

.side-brand {
  min-height: 72px;
  margin-bottom: 14px;
  padding: 10px 10px 16px;
  border-bottom: 1px solid #eef2f6;
}

.side-brand strong,
.sidebar .brand strong {
  color: #101828;
}

.side-brand img {
  width: 44px;
  height: 44px;
  padding: 3px;
  border: 1px solid #dde5ee;
  border-radius: 12px;
  background: #fff;
  filter: none;
}

.side-link {
  min-height: 42px;
  color: #475467;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-weight: 760;
}

.side-link:hover:not(:disabled) {
  color: #101828;
  background: #f5f8fb;
  border-color: #e7edf3;
  box-shadow: none;
}

.side-link.active {
  color: #0b5f58;
  background: #edf8f6;
  border-color: #bfe3dd;
  box-shadow: inset 3px 0 0 #0f766e;
}

.muted-link {
  color: #b42318;
  background: #fff7f7;
  border-color: #ffe1e4;
}

.owner-main {
  padding: 24px;
  background: #f6f8fb;
}

.owner-top,
.panel,
.public-nav,
.table-wrap,
.modal-card,
.punch-screen,
.employee-top {
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(16, 24, 40, .045);
}

.owner-top {
  background: #fff;
}

.owner-top h2,
.card-head h2 {
  color: #101828;
}

.dashboard-hero {
  min-height: 158px;
  border: 1px solid #dfe8ef;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f8fbfd);
}

.status-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #0f766e;
  border-radius: 8px;
  color: #101828;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 118, 110, .12);
}

.status-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: #0f766e;
}

.status-card span {
  color: #0b5f58;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.status-card strong {
  color: #101828;
  font-size: 36px;
  font-variant-numeric: tabular-nums;
}

.form-grid {
  gap: 14px;
  align-items: stretch;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.form-grid label,
.form-grid .check-row,
.form-grid .remember-row {
  min-height: 82px;
  align-content: center;
  padding: 12px;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 24, 40, .035);
}

.form-grid label:focus-within {
  border-color: #94d6ce;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, .09);
}

.form-grid label input,
.form-grid label select {
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  font-weight: 760;
}

.form-grid label input:focus,
.form-grid label select:focus {
  outline: 0;
  border: 0;
  box-shadow: none;
}

.form-grid select[multiple] {
  min-height: 74px;
  padding: 4px 0;
}

.form-grid button {
  min-height: 54px;
  align-self: end;
  border-radius: 8px;
}

#employeeForm,
#shiftForm {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin-bottom: 4px;
}

#employeeForm label,
#shiftForm label {
  grid-column: span 3;
}

#employeeForm label:nth-child(2) {
  grid-column: span 5;
}

#employeeForm label:nth-child(6) {
  grid-column: span 4;
}

#employeeForm button,
#shiftForm button {
  grid-column: span 3;
}

#shiftForm label:first-child {
  grid-column: span 4;
}

#shiftForm button {
  grid-column: span 4;
}

.primary {
  background: #101828;
  border-color: #101828;
}

.primary:hover {
  background: #1d2939;
}

.secondary {
  color: #0b5f58;
  background: #edf8f6;
  border-color: #cbe8e2;
}

.ghost {
  color: #344054;
  background: #ffffff;
  border-color: #dfe7ef;
}

.table-wrap {
  margin-top: 8px;
}

th {
  color: #667085;
  background: #f8fafc;
}

td {
  background: #fff;
}

tbody tr:hover td {
  background: #f7fbfa;
}

.metric {
  border-color: #e1e7ee;
  box-shadow: 0 5px 14px rgba(16, 24, 40, .035);
}

.access-rail {
  background: #101828;
}

.rail-metrics article {
  background: rgba(255,255,255,.08);
}

.access-panel {
  background: #fff;
}

@media (max-width: 1100px) {
  #employeeForm label,
  #shiftForm label,
  #employeeForm label:nth-child(2),
  #employeeForm label:nth-child(6),
  #shiftForm label:first-child {
    grid-column: span 6;
  }
  #employeeForm button,
  #shiftForm button {
    grid-column: span 6;
  }
}

@media (max-width: 920px) {
  .owner-app { grid-template-columns: 1fr; }
  .sidebar {
    width: auto;
    background: #fff;
    box-shadow: none;
  }
  .owner-main {
    padding: 14px;
  }
}

@media (max-width: 560px) {
  #employeeForm,
  #shiftForm {
    grid-template-columns: 1fr;
  }
  #employeeForm label,
  #shiftForm label,
  #employeeForm label:nth-child(2),
  #employeeForm label:nth-child(6),
  #shiftForm label:first-child,
  #employeeForm button,
  #shiftForm button {
    grid-column: auto;
  }
  .status-card strong {
    font-size: 30px;
  }
}

/* AccesTime executive layout v33 */
:root {
  --bg: #eef3f7;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #d9e4ec;
  --brand: #142033;
  --brand-2: #2d3a4f;
  --accent: #0f766e;
  --accent-soft: #e8f5f2;
  --accent-dark: #0a5f58;
  --surface: #f8fbfd;
  --surface-strong: #edf4f7;
  --shadow: 0 18px 45px rgba(20, 32, 51, .08);
}

body {
  background:
    linear-gradient(180deg, #eaf1f5 0, #f7fafc 260px, #eef3f7 100%);
  color: var(--ink);
}

.owner-app {
  grid-template-columns: 282px minmax(0, 1fr);
}

.sidebar {
  width: 282px;
  padding: 20px 16px;
  background:
    linear-gradient(180deg, #fbfcfd, #eef4f7);
  border-right: 1px solid rgba(111, 132, 152, .22);
  box-shadow: 10px 0 30px rgba(20, 32, 51, .055);
}

.side-brand {
  min-height: 78px;
  padding: 12px;
  margin-bottom: 16px;
  border: 1px solid #dfe8ef;
  border-radius: 10px;
  background: #fff;
}

.side-link {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 9px;
  color: #4b5a6b;
  font-weight: 780;
}

.side-link.active {
  color: #fff;
  background: #142033;
  border-color: #142033;
  box-shadow: 0 12px 28px rgba(20, 32, 51, .16);
}

.side-link:hover:not(:disabled) {
  color: #142033;
  background: #fff;
  border-color: #dfe8ef;
}

.muted-link {
  color: #b42318;
  background: #fff;
  border-color: #f3ccd0;
}

.owner-main {
  padding: 26px;
  gap: 20px;
  background: transparent;
}

.owner-top {
  border: 1px solid rgba(116, 136, 153, .24);
  border-radius: 10px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 16px 40px rgba(20, 32, 51, .07);
}

.owner-panel {
  gap: 18px;
}

.owner-panel > .card-head {
  position: relative;
  min-height: 90px;
  align-content: center;
  padding: 20px 22px 20px 24px;
  border: 1px solid rgba(116, 136, 153, .22);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(247,250,252,.94));
  box-shadow: 0 14px 34px rgba(20, 32, 51, .055);
}

.owner-panel > .card-head::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 5px;
  border-radius: 0 8px 8px 0;
  background: #0f766e;
}

.owner-panel > .card-head span {
  color: #0f766e;
  letter-spacing: .1em;
}

.owner-panel > .card-head h2 {
  font-size: 30px;
  line-height: 1.12;
}

.dashboard-hero {
  min-height: 190px;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
  padding: 26px;
  border: 1px solid rgba(116, 136, 153, .22);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(236,245,248,.94));
  box-shadow: 0 18px 45px rgba(20, 32, 51, .08);
}

.dashboard-hero h1 {
  max-width: 620px;
  font-size: 38px;
  line-height: 1.04;
}

.dashboard-hero p {
  max-width: 620px;
  color: #5f6f80;
  font-size: 15px;
}

.status-card {
  display: grid;
  place-items: center;
  min-height: 138px;
  padding: 18px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 20%, rgba(15,118,110,.09), transparent 58%),
    #fff;
  box-shadow: inset 0 0 0 8px #f4faf9, 0 16px 36px rgba(15, 118, 110, .12);
}

.status-card::before { display: none; }

.status-card strong {
  color: #0f172a;
  font-size: 42px;
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#ownerMetrics.metric-grid,
#reportMetrics.metric-grid,
#companyPlanSummary.metric-grid {
  gap: 14px;
}

.metric {
  min-height: 108px;
  padding: 18px;
  border: 1px solid rgba(116, 136, 153, .18);
  border-radius: 10px;
  background:
    linear-gradient(180deg, #ffffff, #f9fbfd);
  box-shadow: 0 12px 28px rgba(20, 32, 51, .05);
}

.metric span {
  color: #667085;
  font-weight: 800;
}

.metric strong {
  color: #142033;
  font-size: 32px;
}

.panel,
.onboarding-panel,
.table-wrap,
.feed article,
.link-box {
  border-color: rgba(116, 136, 153, .2);
  border-radius: 10px;
}

.panel {
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(250,252,253,.96));
  box-shadow: 0 12px 32px rgba(20, 32, 51, .055);
}

.dashboard-columns {
  gap: 18px;
}

.quick-filters {
  gap: 10px;
}

.quick-filters button {
  min-height: 40px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
}

.quick-filters button.active {
  background: #142033;
  border-color: #142033;
}

.form-grid {
  position: relative;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(116, 136, 153, .2);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,251,252,.92));
  box-shadow: 0 14px 36px rgba(20, 32, 51, .055);
}

.form-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.form-grid label,
.form-grid .check-row,
.form-grid .remember-row {
  min-height: 78px;
  padding: 12px 13px;
  border: 1px solid #dfe8ef;
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
}

.form-grid label {
  color: #344054;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.form-grid label input,
.form-grid label select {
  color: #111827;
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
}

.form-grid label:focus-within {
  border-color: #8fd3ca;
  background: #fbfefd;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .08);
}

.form-grid button {
  min-height: 56px;
  border-radius: 9px;
}

#employeeForm,
#shiftForm,
#geofenceForm,
#userForm,
#companySettingsForm,
#localDeviceForm,
#supportForm,
.report-grid,
#vendorReplyForm,
.role-form {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

#employeeForm label,
#geofenceForm label,
#userForm label,
#companySettingsForm label,
#localDeviceForm label,
#supportForm label,
.report-grid label,
#vendorReplyForm label,
.role-form label {
  grid-column: span 4;
}

#employeeForm label:nth-child(2),
#supportForm .wide-field,
#vendorReplyForm .wide-field {
  grid-column: span 5;
}

#employeeForm label:nth-child(6),
#companySettingsForm .check-row,
#localDeviceForm label:nth-child(6) {
  grid-column: span 4;
}

#shiftForm label {
  grid-column: span 2;
}

#shiftForm label:first-child,
#shiftForm button {
  grid-column: span 4;
}

#geofenceForm button,
#userForm button,
#companySettingsForm button,
#localDeviceForm button,
#supportForm button,
.report-grid button,
#vendorReplyForm button,
#employeeForm button,
.role-form button {
  grid-column: span 4;
}

.table-wrap {
  margin-top: 2px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20, 32, 51, .05);
}

th {
  height: 46px;
  color: #566477;
  background: #f4f8fa;
}

td {
  height: 54px;
  color: #344054;
}

.row-actions {
  gap: 7px;
}

.table-action {
  min-height: 34px;
  border-radius: 7px;
}

.message {
  margin-top: -6px;
  padding-left: 4px;
}

.access-rail {
  background:
    linear-gradient(180deg, #142033, #20314b);
}

.public-view {
  background: transparent;
}

@media (max-width: 1200px) {
  #employeeForm label,
  #geofenceForm label,
  #userForm label,
  #companySettingsForm label,
  #localDeviceForm label,
  #supportForm label,
  .report-grid label,
  #vendorReplyForm label,
  #employeeForm label:nth-child(2),
  #employeeForm label:nth-child(6),
  #supportForm .wide-field,
  #vendorReplyForm .wide-field,
  #shiftForm label,
  #shiftForm label:first-child {
    grid-column: span 6;
  }
  #employeeForm button,
  #shiftForm button,
  #geofenceForm button,
  #userForm button,
  #companySettingsForm button,
  #localDeviceForm button,
  #supportForm button,
  .report-grid button,
  #vendorReplyForm button {
    grid-column: span 6;
  }
}

@media (max-width: 920px) {
  .owner-app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    width: auto;
    background: linear-gradient(180deg, #fbfcfd, #eef4f7);
  }
  .dashboard-hero {
    grid-template-columns: 1fr;
  }
  .status-card {
    min-height: 108px;
  }
}

@media (max-width: 560px) {
  .owner-main {
    padding: 10px;
  }
  .owner-panel > .card-head {
    min-height: 74px;
    padding: 16px;
  }
  .owner-panel > .card-head h2 {
    font-size: 24px;
  }
  .form-grid {
    grid-template-columns: 1fr !important;
    padding: 12px;
  }
  .form-grid label,
  .form-grid button,
  .form-grid .check-row,
  #employeeForm label,
  #shiftForm label,
  #geofenceForm label,
  #userForm label,
  #companySettingsForm label,
  #localDeviceForm label,
  #supportForm label,
  .report-grid label,
  #vendorReplyForm label {
    grid-column: auto !important;
  }
  .dashboard-hero {
    padding: 18px;
  }
  .dashboard-hero h1 {
    font-size: 30px;
  }
}

/* AccesTime compact polish v34 */
.owner-app {
  grid-template-columns: 270px minmax(0, 1fr);
}

.sidebar {
  width: 270px;
  padding: 16px 14px;
}

.side-brand {
  min-height: 62px;
  padding: 9px 10px;
  margin-bottom: 12px;
}

.side-brand img {
  width: 38px;
  height: 38px;
}

.side-link {
  min-height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

.owner-main {
  padding: 20px;
  gap: 14px;
}

.owner-top {
  min-height: 64px;
  padding: 12px 16px;
}

.owner-top h2 {
  font-size: 22px;
}

.owner-panel {
  gap: 14px;
}

.owner-panel > .card-head {
  min-height: 70px;
  padding: 14px 18px 14px 20px;
}

.owner-panel > .card-head::before {
  top: 14px;
  bottom: 14px;
  width: 4px;
}

.owner-panel > .card-head h2 {
  font-size: 24px;
}

.owner-panel > .card-head span,
.eyebrow,
.card-head span {
  font-size: 11px;
}

.dashboard-hero {
  min-height: 132px;
  grid-template-columns: minmax(0, 1fr) 188px;
  padding: 18px;
  gap: 14px;
}

.dashboard-hero h1 {
  font-size: 30px;
}

.dashboard-hero p {
  font-size: 14px;
  margin-top: 6px;
}

.status-card {
  min-height: 92px;
  padding: 12px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 5px #f4faf9, 0 10px 24px rgba(15, 118, 110, .1);
}

.status-card strong {
  font-size: 30px;
}

.metric-grid {
  gap: 10px;
}

.metric {
  min-height: 82px;
  padding: 12px 14px;
  gap: 3px;
}

.metric strong {
  font-size: 24px;
}

.metric span,
.metric small {
  font-size: 12px;
}

.panel {
  padding: 15px;
}

.dashboard-columns {
  gap: 14px;
}

.card-head {
  gap: 4px;
}

.card-head h2 {
  font-size: 24px;
}

.card-head p {
  font-size: 14px;
}

.form-grid {
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
}

.form-grid label,
.form-grid .check-row,
.form-grid .remember-row {
  min-height: 62px;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 11px;
}

.form-grid label input,
.form-grid label select {
  min-height: 30px;
  font-size: 14px;
}

.form-grid select[multiple] {
  min-height: 58px;
}

.form-grid button {
  min-height: 44px;
  border-radius: 8px;
}

button,
input,
select {
  min-height: 40px;
}

.quick-filters {
  gap: 8px;
}

.quick-filters button {
  min-height: 34px;
  font-size: 12px;
}

.feed {
  gap: 6px;
}

.feed article {
  padding: 8px 10px;
}

.table-wrap {
  margin-top: 0;
}

th {
  height: 40px;
  padding: 9px 10px;
}

td {
  height: 46px;
  padding: 9px 10px;
}

.table-action {
  min-height: 30px;
  padding: 0 9px;
}

.link-box {
  padding: 10px 12px;
  font-size: 13px;
}

.message {
  min-height: 18px;
  font-size: 12px;
}

.modal-card {
  padding: 14px;
}

.employee-app {
  padding: 14px;
}

.punch-screen {
  padding: 16px;
}

.punch-screen > strong {
  font-size: 38px;
}

.punch {
  min-height: 54px;
  font-size: 16px;
}

@media (max-width: 920px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }
  .status-card {
    min-height: 76px;
    justify-items: start;
  }
}

@media (max-width: 560px) {
  .owner-main {
    padding: 8px;
  }
  .owner-panel > .card-head {
    min-height: 62px;
    padding: 12px 14px;
  }
  .owner-panel > .card-head h2 {
    font-size: 22px;
  }
  .dashboard-hero {
    min-height: auto;
    padding: 14px;
  }
  .dashboard-hero h1 {
    font-size: 26px;
  }
  .status-card strong {
    font-size: 28px;
  }
  .form-grid label,
  .form-grid .check-row,
  .form-grid .remember-row {
    min-height: 58px;
  }
}

/* AccesTime support chat v35 */
.support-workspace {
  min-height: min(640px, calc(100vh - 180px));
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 14px;
}

.support-inbox,
.support-chat-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(116, 136, 153, .22);
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 14px 36px rgba(20, 32, 51, .055);
}

.support-inbox {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.support-inbox-head,
.support-chat-head {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #e3ebf1;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
}

.support-inbox-head,
.support-chat-head div {
  display: grid;
  gap: 2px;
}

.support-inbox-head strong,
.support-chat-head strong {
  color: #142033;
  font-size: 15px;
}

.support-inbox-head span,
.support-chat-head span {
  color: #667085;
  font-size: 12px;
}

#supportThreads,
#vendorSupportThreads {
  align-content: start;
  gap: 8px;
  padding: 10px;
  overflow: auto;
}

.support-thread {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 10px 11px;
  border: 1px solid #e3ebf1;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

.support-thread:hover {
  border-color: #b9dcd6;
  background: #f8fcfb;
}

.support-thread strong {
  color: #142033;
  font-size: 13px;
}

.support-thread span,
.support-thread small {
  display: block;
  color: #667085;
  font-size: 12px;
  line-height: 1.3;
}

.support-thread .table-action {
  min-width: 48px;
}

.support-chat-panel {
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto auto;
}

.chat-feed {
  max-height: none;
  min-height: 320px;
  align-content: end;
  gap: 9px;
  overflow: auto;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(248, 251, 252, .92), rgba(239, 246, 247, .92));
}

.chat-message {
  width: fit-content;
  max-width: min(76%, 620px);
  display: grid;
  gap: 4px;
  padding: 10px 12px 8px;
  border: 1px solid transparent;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(20, 32, 51, .055);
}

.chat-message strong {
  color: #142033;
  font-size: 12px;
}

.chat-message span {
  color: #243247;
  font-size: 14px;
  line-height: 1.42;
}

.chat-message small {
  justify-self: end;
  color: #7a8795;
  font-size: 10px;
}

.chat-message.from-owner {
  justify-self: end;
  border-bottom-right-radius: 4px;
  border-color: #bfe3dd;
  background: #e8f5f2;
}

.chat-message.from-vendor {
  justify-self: start;
  border-bottom-left-radius: 4px;
  border-color: #dfe8ef;
  background: #ffffff;
}

.chat-empty {
  justify-self: center;
  align-self: center;
  max-width: 360px;
  padding: 16px;
  text-align: center;
  border: 1px dashed #cbd6df;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
}

.support-composer {
  display: grid;
  grid-template-columns: minmax(120px, .9fr) 110px minmax(180px, 2fr) auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #e3ebf1;
  background: #fff;
}

.support-composer input,
.support-composer select {
  min-height: 42px;
  border-radius: 999px;
  background: #f8fafc;
}

.support-composer button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
}

#supportMessageBox {
  margin: 0;
  padding: 0 14px 10px;
  background: #fff;
}

#owner-local,
[data-owner-tab="local"] {
  display: none !important;
}

@media (max-width: 980px) {
  .support-workspace {
    grid-template-columns: 1fr;
  }
  .support-chat-panel {
    min-height: 520px;
  }
}

@media (max-width: 620px) {
  .support-composer {
    grid-template-columns: 1fr;
  }
  .chat-message {
    max-width: 92%;
  }
  .chat-feed {
    min-height: 280px;
    padding: 12px;
  }
}

/* AccesTime support composer v36 */
#supportForm.support-composer {
  grid-template-columns: minmax(0, 1fr) auto;
}

#supportForm #supportMessage {
  min-height: 44px;
  padding: 0 18px;
}

#supportForm button {
  min-width: 96px;
  padding: 0 18px;
}

#supportForm [hidden] {
  display: none !important;
}

@media (max-width: 620px) {
  #supportForm.support-composer {
    grid-template-columns: 1fr auto;
  }
  #supportForm button {
    min-width: 82px;
    padding: 0 14px;
  }
}

/* AccesTime admin portal v38 */
.vendor-app .sidebar {
  background: linear-gradient(180deg, #101828, #162238);
  border-right: 1px solid rgba(255,255,255,.08);
}

.vendor-app .side-brand {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
}

.vendor-app .side-brand strong,
.vendor-app .sidebar .brand strong {
  color: #fff;
}

.vendor-app .side-link {
  color: #cbd5e1;
}

.vendor-app .side-link:hover:not(:disabled) {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
}

.vendor-app .side-link.active {
  color: #101828;
  background: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
}

.vendor-app .muted-link {
  color: #fecaca;
  background: rgba(185, 28, 28, .12);
  border-color: rgba(254, 202, 202, .18);
}

.vendor-app .owner-top {
  color: #fff;
  background: linear-gradient(135deg, #101828, #1f3a4a);
  border-color: rgba(255,255,255,.08);
}

.vendor-app .owner-top h2 {
  color: #fff;
}

.vendor-app .owner-top span {
  color: #b6c3d2;
}

.vendor-app .owner-panel > .card-head {
  background: linear-gradient(180deg, #ffffff, #f7fafc);
}

.vendor-user-form label:nth-child(1),
.vendor-user-form label:nth-child(2) {
  grid-column: span 3;
}

.vendor-user-form label:nth-child(3),
.vendor-user-form label:nth-child(4),
.vendor-user-form .check-row {
  grid-column: span 2;
}

.vendor-user-form button {
  grid-column: span 2;
}

#vendorCompaniesBody select,
#vendorCompaniesBody input,
#vendorUsersBody input {
  min-height: 34px;
  border-radius: 7px;
}

.vendor-companies-wrap {
  padding: 8px;
  border: 1px solid #dde6ee;
  background: #f6f9fb;
  overflow: visible;
}

.vendor-companies-table,
.vendor-companies-table tbody,
.vendor-companies-table tr,
.vendor-companies-table td {
  display: block;
  width: 100%;
}

.vendor-companies-table {
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.vendor-companies-table thead {
  display: none;
}

.vendor-company-row td {
  height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.vendor-company-card {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) repeat(5, minmax(120px, 1fr)) auto auto;
  align-items: end;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce6ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(20, 32, 51, .06);
}

.vendor-company-main {
  display: grid;
  gap: 4px;
  align-self: center;
  min-width: 0;
}

.vendor-company-main strong {
  color: #101828;
  font-size: 15px;
}

.vendor-company-main span,
.vendor-company-card small {
  color: #667085;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.vendor-company-card label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #526072;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.vendor-company-card label > span {
  line-height: 1.1;
}

.vendor-company-card select,
.vendor-company-card input {
  width: 100%;
  min-width: 0;
}

.vendor-branch-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #d7e0e7;
  border-radius: 9px;
  background: #f8fbfc;
  color: #263142;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.vendor-branch-toggle input {
  width: 16px;
  min-height: 16px;
  accent-color: #0f766e;
}

.vendor-branch-toggle span {
  white-space: nowrap;
}

.vendor-company-card .vendor-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

.vendor-company-card .vendor-actions button {
  min-width: 88px;
  min-height: 44px;
}

.vendor-app #vendorDashboard .table-wrap td:first-child strong {
  color: #101828;
}

.vendor-app .support-workspace {
  min-height: min(620px, calc(100vh - 180px));
}

@media (max-width: 1100px) {
  .vendor-company-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vendor-company-main,
  .vendor-company-card .vendor-actions {
    grid-column: 1 / -1;
  }

  .vendor-user-form label:nth-child(1),
  .vendor-user-form label:nth-child(2),
  .vendor-user-form label:nth-child(3),
  .vendor-user-form label:nth-child(4),
  .vendor-user-form .check-row,
  .vendor-user-form button {
    grid-column: span 6;
  }
}

@media (max-width: 560px) {
  .vendor-app .sidebar {
    background: linear-gradient(180deg, #101828, #162238);
  }
  .vendor-user-form label,
  .vendor-user-form button,
  .vendor-user-form .check-row {
    grid-column: auto !important;
  }
}

/* AccesTime admin mobile and alerts v40 */
.license-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.license-card {
  display: grid;
  gap: 6px;
  min-height: 106px;
  padding: 13px;
  border: 1px solid #dfe8ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(20, 32, 51, .045);
}

.license-card strong {
  color: #101828;
  font-size: 14px;
}

.license-card span,
.license-card small {
  color: #667085;
  font-size: 12px;
}

.license-card b {
  color: #101828;
  font-size: 18px;
}

.license-card.ok {
  border-color: #cbe8e2;
  background: #f6fcfb;
}

.license-card.warn {
  border-color: #f5d08a;
  background: #fffaf0;
}

.license-card.bad {
  border-color: #f1b9bd;
  background: #fff7f7;
}

#vendorNotifyBtn.small {
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
}

.vendor-app #vendorLoginForm {
  width: min(100%, 460px);
  margin: 0 auto;
}

.vendor-app #vendorLoginForm .card-head h2 {
  font-size: 26px;
}

@media (max-width: 760px) {
  .vendor-app.owner-app {
    display: block;
  }

  .vendor-app .sidebar {
    position: static;
    width: auto;
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
    border-right: 0;
  }

  .vendor-app .side-brand {
    grid-column: 1 / -1;
    min-height: 56px;
    margin: 0;
  }

  .vendor-app .side-link {
    justify-content: center;
    min-height: 40px;
    padding: 0 8px;
    text-align: center;
    font-size: 13px;
  }

  .vendor-app .muted-link {
    grid-column: 1 / -1;
  }

  .vendor-app .owner-main {
    padding: 10px;
  }

  .vendor-app .owner-top {
    display: grid;
    gap: 10px;
    min-height: auto;
  }

  .vendor-app .owner-top h2 {
    font-size: 22px;
  }

  .vendor-app .owner-panel > .card-head h2 {
    font-size: 24px;
  }

  .vendor-app .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .license-board {
    grid-template-columns: 1fr;
  }

  .vendor-app .table-wrap {
    border-radius: 10px;
  }

  .vendor-app table {
    min-width: 720px;
  }

  .vendor-app .support-workspace {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .vendor-app .support-chat-panel {
    min-height: 460px;
  }
}

@media (max-width: 420px) {
  .vendor-app .metric-grid {
    grid-template-columns: 1fr;
  }

  .vendor-app .side-link {
    font-size: 12px;
  }
}

/* AccesTime admin login gate v42 */
.vendor-nav {
  display: grid;
  gap: 8px;
}

.vendor-nav[hidden] {
  display: none !important;
}

.vendor-app #vendorLoginForm:not([hidden]) {
  width: min(100%, 560px);
  margin: min(8vh, 60px) auto 0;
  padding: 24px;
}

.vendor-app #vendorLoginForm:not([hidden]) .card-head {
  margin-bottom: 10px;
}

.vendor-app #vendorLoginForm:not([hidden]) input {
  min-height: 46px;
}

@media (max-width: 760px) {
  .vendor-nav {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .vendor-nav .muted-link {
    grid-column: 1 / -1;
  }

  .vendor-app #vendorLoginForm:not([hidden]) {
    margin-top: 16px;
    padding: 18px;
  }
}

/* AccesTime admin mobile repair v43 */
@media (max-width: 820px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .vendor-app.owner-app {
    width: 100%;
    min-height: 100dvh;
    display: block;
    overflow-x: hidden;
  }

  .vendor-app .sidebar {
    display: none;
  }

  .vendor-app .side-brand {
    min-height: 58px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
  }

  .vendor-app .side-brand img {
    width: 36px;
    height: 36px;
  }

  .vendor-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .vendor-nav .side-link {
    width: 100%;
    min-height: 38px;
    justify-content: center;
    padding: 0 6px;
    font-size: 12px;
    text-align: center;
  }

  .vendor-nav .muted-link {
    grid-column: 1 / -1;
  }

  .vendor-app .owner-main {
    width: 100%;
    padding: 10px 10px calc(78px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
    overflow-x: hidden;
  }

  .vendor-app .owner-top {
    width: 100%;
    min-height: auto;
    display: grid;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
  }

  .vendor-app .owner-top h2 {
    font-size: 22px;
    line-height: 1.1;
  }

  .vendor-app .owner-panel {
    width: 100%;
    gap: 12px;
  }

  .vendor-app .owner-panel > .card-head {
    min-height: auto;
    padding: 14px 14px 14px 16px;
    border-radius: 10px;
  }

  .vendor-app .owner-panel > .card-head h2 {
    font-size: 24px;
    line-height: 1.08;
  }

  .vendor-app .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .vendor-app .metric {
    min-height: 78px;
    padding: 10px;
  }

  .vendor-app .metric strong {
    font-size: 22px;
  }

  .license-board {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .license-card {
    min-height: auto;
    gap: 4px;
    padding: 10px 12px;
  }

  .license-card b {
    font-size: 15px;
  }

  .vendor-app .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 10px;
  }

  .vendor-app table {
    min-width: 680px;
  }

  .vendor-app .vendor-companies-wrap {
    overflow: visible;
  }

  .vendor-app .vendor-companies-table {
    min-width: 0;
  }

  .vendor-app th,
  .vendor-app td {
    padding: 8px;
    font-size: 12px;
  }

  .vendor-app #vendorCompaniesBody select,
  .vendor-app #vendorCompaniesBody input {
    min-width: 92px;
    min-height: 34px;
    font-size: 12px;
  }

  .vendor-usage {
    min-width: 120px;
  }

  .vendor-company-card .vendor-actions {
    min-width: 0;
    display: flex;
  }

  .vendor-app .support-workspace {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 10px;
  }

  .vendor-app .support-inbox,
  .vendor-app .support-chat-panel {
    border-radius: 10px;
  }

  .vendor-app #vendorSupportThreads {
    max-height: 240px;
  }

  .vendor-app .support-thread {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 9px;
  }

  .vendor-app .support-chat-panel {
    min-height: 520px;
  }

  .vendor-app .chat-feed {
    min-height: 360px;
    padding: 12px;
  }

  .vendor-app .chat-message {
    max-width: 88%;
    padding: 9px 10px 7px;
  }

  #vendorReplyForm.support-composer {
    grid-template-columns: minmax(0, 1fr) 96px;
    gap: 8px;
    padding: 10px;
  }

  #vendorReplyForm #vendorThreadId,
  #vendorReplyForm #vendorReplyStatus {
    display: none !important;
  }

  #vendorReplyForm input {
    min-width: 0;
    min-height: 42px;
    padding: 0 14px;
  }

  #vendorReplyForm button {
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
    font-size: 13px;
  }

  .vendor-user-form {
    grid-template-columns: 1fr !important;
  }

  .vendor-user-form label,
  .vendor-user-form button,
  .vendor-user-form .check-row {
    grid-column: auto !important;
  }
}

@media (max-width: 680px) {
  .vendor-companies-wrap {
    padding: 6px;
  }

  .vendor-company-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .vendor-company-card .vendor-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 4px;
  }

  .vendor-company-card .vendor-actions button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
  }
}

@media (max-width: 430px) {
  .vendor-app .owner-main {
    padding: 8px 8px calc(118px + env(safe-area-inset-bottom, 0px));
  }

  .vendor-app .metric-grid {
    grid-template-columns: 1fr;
  }

  .vendor-app table {
    min-width: 640px;
  }

  .vendor-app .vendor-companies-table {
    min-width: 0 !important;
  }

  .vendor-app #vendorDashboard {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  }

  .vendor-app #vendorCompaniesBody tr:last-child .vendor-company-card {
    margin-bottom: calc(108px + env(safe-area-inset-bottom, 0px));
  }

  .vendor-app .side-brand strong {
    font-size: 16px;
  }

  .vendor-nav .side-link {
    font-size: 11px;
  }
}

/* AccesTime support follow-up v45 */
#newSupportThreadBtn {
  min-height: 34px;
  padding: 0 12px;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .support-chat-head {
    align-items: start;
  }

  #newSupportThreadBtn {
    justify-self: end;
  }
}
/* Alert settings */
.settings-details {
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfdfd;
  padding: 10px 12px;
}

.settings-details summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--ink);
}

.nested-settings {
  margin-top: 12px;
  padding: 0;
  background: transparent;
  border: 0;
}

.week-cutover-box {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #f1c27d;
  border-radius: 8px;
  background: #fff8ea;
  color: #3f2d12;
}

.week-cutover-box[hidden] {
  display: none !important;
}

.week-cutover-box strong {
  font-size: 13px;
}

.week-cutover-box span {
  color: #6b5a3a;
  font-size: 12px;
  line-height: 1.45;
}

.week-cutover-box button {
  justify-self: start;
}

/* =====================================================
   AccesTime — Mobile Owner Nav v1
   Bottom tab bar para el módulo del administrador
   de empresa en pantallas <= 768px
   ===================================================== */

/* Íconos SVG como data URIs para los tabs */
:root {
  --icon-dashboard: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E");
  --icon-employees: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
  --icon-reports: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3Cpolyline points='10 9 9 9 8 9'/%3E%3C/svg%3E");
  --icon-more: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E");
  --icon-requests: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8h1a4 4 0 0 1 0 8h-1'/%3E%3Cpath d='M2 8h16v9a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4V8z'/%3E%3Cline x1='6' y1='1' x2='6' y2='4'/%3E%3Cline x1='10' y1='1' x2='10' y2='4'/%3E%3Cline x1='14' y1='1' x2='14' y2='4'/%3E%3C/svg%3E");
}

@media (max-width: 768px) {

  /* ── Ocultar sidebar lateral ── */
  .owner-app:not(.vendor-app) .sidebar {
    display: none !important;
  }

  /* ── Layout: columna única, dejar espacio para el bottom nav ── */
  .owner-app:not(.vendor-app) {
    grid-template-columns: 1fr !important;
    padding-bottom: 0;
  }

  .owner-app:not(.vendor-app) .owner-main {
    grid-column: 1 !important;
    padding: 12px 12px 80px 12px; /* espacio para el bottom nav */
    min-height: 100vh;
  }

  /* ── Header superior compacto ── */
  .owner-app:not(.vendor-app) .owner-top {
    flex-direction: row;
    align-items: center;
    padding: 12px 14px;
    gap: 10px;
    background: var(--panel, #fff);
    border-bottom: 1px solid var(--line, #e4e9f0);
    border-radius: 12px;
    margin-bottom: 4px;
  }

  .owner-app:not(.vendor-app) .owner-top h2 {
    font-size: 18px;
    margin: 0;
    line-height: 1.2;
  }

  .owner-app:not(.vendor-app) .owner-top span {
    font-size: 11px;
  }

  .owner-app:not(.vendor-app) .top-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
  }

  .owner-app:not(.vendor-app) .top-actions .small {
    padding: 0 10px;
    min-height: 32px;
    font-size: 12px;
  }

  /* ── Dashboard: métricas en 2 columnas ── */
  .owner-app:not(.vendor-app) .metric-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .owner-app:not(.vendor-app) .dashboard-columns {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .owner-app:not(.vendor-app) .dashboard-hero {
    grid-template-columns: 1fr !important;
    padding: 16px;
    gap: 10px;
  }

  .owner-app:not(.vendor-app) .dashboard-hero h1 {
    font-size: 24px;
  }

  .owner-app:not(.vendor-app) .status-card strong {
    font-size: 28px;
  }

  /* ── Tablas: scroll horizontal ── */
  .owner-app:not(.vendor-app) .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }

  .owner-app:not(.vendor-app) table {
    min-width: 520px;
  }

  /* ── Formularios: 1 columna ── */
  .owner-app:not(.vendor-app) .form-grid {
    grid-template-columns: 1fr !important;
    padding: 14px;
    gap: 10px;
  }

  .owner-app:not(.vendor-app) .form-grid label,
  .owner-app:not(.vendor-app) .form-grid button {
    grid-column: auto !important;
  }

  /* ── Filtros rápidos: scroll horizontal sin salto de línea ── */
  .owner-app:not(.vendor-app) .quick-filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .owner-app:not(.vendor-app) .quick-filters::-webkit-scrollbar {
    display: none;
  }

  .owner-app:not(.vendor-app) .quick-filters button {
    flex-shrink: 0;
    font-size: 12px;
    padding: 0 12px;
    min-height: 32px;
    white-space: nowrap;
  }

  /* ── Report grid compacto ── */
  .owner-app:not(.vendor-app) .report-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  .owner-app:not(.vendor-app) .report-grid label:nth-child(3),
  .owner-app:not(.vendor-app) .report-grid button {
    grid-column: 1 / -1;
  }

  /* ── Support: chat en columna ── */
  .owner-app:not(.vendor-app) .support-workspace {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  .owner-app:not(.vendor-app) .support-inbox {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 10px;
  }

  /* ── Bottom nav bar ── */
  .owner-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--panel, #fff);
    border-top: 1px solid var(--line, #e4e9f0);
    box-shadow: 0 -4px 20px rgba(16,24,40,.08);
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    height: calc(58px + env(safe-area-inset-bottom, 0px));
  }

  .owner-bottom-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    color: var(--muted, #667085);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
    transition: color .15s;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }

  .owner-bottom-nav-btn:active {
    opacity: .7;
  }

  .owner-bottom-nav-btn.active {
    color: var(--accent, #0f766e);
  }

  .owner-bottom-nav-btn .nav-icon {
    width: 22px;
    height: 22px;
    display: block;
    position: relative;
  }

  .owner-bottom-nav-btn .nav-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
  }

  /* Badge de alertas en el tab de Más */
  .owner-bottom-nav-btn .nav-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
  }

  .owner-bottom-nav-btn .nav-badge[hidden],
  .owner-bottom-nav-btn .nav-badge:empty {
    display: none !important;
  }

  /* Drawer "Más" — panel que desliza desde abajo con el resto de tabs */
  .owner-more-drawer {
    display: none;
    position: fixed;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    z-index: 199;
    background: var(--panel, #fff);
    border-top: 1px solid var(--line, #e4e9f0);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(16,24,40,.12);
    padding: 16px 12px;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .owner-more-drawer.open {
    display: grid;
  }

  .owner-more-drawer-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: var(--bg, #f6f8fb);
    border: none;
    border-radius: 10px;
    padding: 14px 8px 10px;
    cursor: pointer;
    color: var(--ink, #111827);
    font-size: 11px;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s;
  }

  .owner-more-drawer-btn:active {
    background: var(--accent-soft, #e8f5f2);
    color: var(--accent, #0f766e);
  }

  .owner-more-drawer-btn.active {
    background: var(--accent-soft, #e8f5f2);
    color: var(--accent, #0f766e);
  }

  .owner-more-drawer-btn svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
  }

  /* Overlay para cerrar el drawer tocando fuera */
  .owner-more-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 198;
    background: rgba(0,0,0,.25);
  }

  .owner-more-overlay.open {
    display: block;
  }
}

/* Ocultar bottom nav en desktop */
@media (min-width: 769px) {
  .owner-bottom-nav,
  .owner-more-drawer,
  .owner-more-overlay {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .owner-app:not(.vendor-app) .owner-main {
    padding-bottom: calc(122px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .owner-app:not(.vendor-app) .owner-panel.active {
    padding-bottom: calc(42px + env(safe-area-inset-bottom, 0px));
  }

  .owner-app:not(.vendor-app) .owner-panel.active > :last-child {
    margin-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  .employee-app {
    width: 100%;
    min-height: 100dvh;
    padding: 10px 10px calc(118px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .employee-top .top-actions {
    display: none !important;
  }

  .employee-bottom-nav {
    display: flex;
  }

  .employee-bottom-nav .owner-bottom-nav-btn[hidden] {
    display: none !important;
  }

  .employee-bottom-nav .owner-bottom-nav-btn {
    min-width: 0;
    font-size: 9px;
    padding-inline: 2px;
  }

  .employee-bottom-nav .owner-bottom-nav-btn .nav-icon,
  .employee-bottom-nav .owner-bottom-nav-btn .nav-icon svg {
    width: 20px;
    height: 20px;
  }

  .punch-screen {
    margin-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  #employeeSecurityView {
    align-content: start;
    text-align: left;
  }
}
