:root {
  color-scheme: light;
  --brand-brown: #4e371e;
  --brand-gold: #c99713;
  --brand-cream: #f4efe9;
  --brand-cream-dark: #e6dac7;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-dark: rgba(32, 24, 16, 0.75);
  --surface-muted: rgba(78, 55, 30, 0.04);
  --border: rgba(78, 55, 30, 0.12);
  --border-muted: rgba(78, 55, 30, 0.12);
  --text: #2f241a;
  --text-muted: #5c4b3a;
  --danger: #b83232;
  --success: #1f6f4d;
  font-family: 'Inter', 'SF Pro Text', 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(155deg, var(--brand-cream) 0%, #fdfaf6 50%, var(--brand-cream-dark) 100%);
  color: var(--text);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body[data-active-role='admin'] .admin-nav,
body[data-active-role='admin'] .admin-panel {
  pointer-events: auto;
}

body[data-active-role='employee'] .admin-nav,
body[data-active-role='employee'] .admin-panel {
  pointer-events: none;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.employee-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.2rem;
  border-radius: 0.9rem;
  border: 1px solid var(--brand-brown);
  background: rgba(78, 55, 30, 0.1);
  color: var(--brand-brown);
  font-weight: 600;
  cursor: pointer;
  min-height: 2.75rem;
  min-width: 2.75rem;
}

.employee-clock,
.employee-clock-secondary {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--brand-brown);
}

.branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.branding__logo {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 1rem;
  box-shadow: 0 15px 35px rgba(78, 55, 30, 0.25);
}

.branding__text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.app-title {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--brand-brown);
}

.app-subtitle {
  margin: 0;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sync-alert {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(184, 50, 50, 0.12);
  color: var(--danger);
  font-weight: 600;
  font-size: 0.8rem;
}

.sync-alert__dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(184, 50, 50, 0.25);
}

.sync-alert__label {
  white-space: nowrap;
}

.status-badge {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(44, 136, 70, 0.18);
  color: var(--success);
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.status-badge.offline {
  background: rgba(184, 50, 50, 0.18);
  color: var(--danger);
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
}

.view--employee {
  gap: 2rem;
}

.employee-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0 0;
}

.card--stamp {
  width: min(28rem, 100%);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
}

.employee-home__summary-card,
.employee-home__actions-card {
  width: min(72rem, 100%);
}

.employee-home__summary-card {
  padding-bottom: 1.25rem;
}

.employee-home__section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.employee-home__section-head h2 {
  margin: 0;
}

.employee-home__section-head .note {
  margin: 0.25rem 0 0;
}

.employee-home__stats {
  margin-top: 0;
}

.employee-home__actions {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.employee-home__action {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(78, 55, 30, 0.1);
  background: rgba(78, 55, 30, 0.04);
}

.employee-home__action-title {
  margin: 0;
  font-weight: 600;
}

.employee-home__action-details {
  margin: 0.45rem 0 0;
}

.employee-home__action-meta {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.stamp-buttons {
  display: grid;
  width: 100%;
  gap: 1rem;
}

@media (min-width: 480px) {
  .stamp-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stamp-button {
  font-size: 1.25rem;
  padding: 1.1rem;
  min-height: 3.25rem;
  font-weight: 600;
  border: none;
  border-radius: 0.9rem;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.stamp-button:not([disabled]) {
  cursor: pointer;
}

.stamp-button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

.stamp-button[data-stamp-action='start'],
.stamp-button[data-stamp-action='resume'] {
  background: linear-gradient(135deg, #1f6f4d, #2ea06a);
  color: #fff;
  box-shadow: 0 6px 18px rgba(31, 111, 77, 0.22);
}

.stamp-button[data-stamp-action='pause'] {
  background: linear-gradient(135deg, #f2c94c, #f2994a);
  color: #3a2802;
  box-shadow: 0 6px 18px rgba(242, 153, 74, 0.24);
}

.stamp-button[data-stamp-action='end'] {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
  color: #fff;
  box-shadow: 0 6px 18px rgba(192, 57, 43, 0.26);
}

.stamp-button:not([disabled]):active {
  transform: scale(0.98);
}

.stamp-button[hidden] {
  display: none !important;
}

.stamp-button.is-confirmed {
  transform: scale(0.98);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.18);
}

.stamp-status {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-brown);
}

.stamp-feedback {
  margin: 0;
  font-size: 0.95rem;
  color: var(--success);
  font-weight: 600;
}

.employee-photo-field {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.employee-photo-preview {
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  border: 3px solid rgba(78, 55, 30, 0.12);
  background: rgba(78, 55, 30, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  padding: 0.75rem;
}

.employee-photo-preview[data-has-photo='true'] {
  padding: 0;
  background: rgba(255, 255, 255, 0.92);
}

.employee-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.employee-menu {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 6rem 1.5rem 1.5rem;
  background: rgba(26, 19, 12, 0.4);
  backdrop-filter: blur(12px);
  z-index: 30;
}

.employee-menu[hidden] {
  display: none !important;
}

.employee-menu__nav {
  background: var(--surface);
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(18rem, 100%);
  box-shadow: 0 28px 60px rgba(78, 55, 30, 0.2);
}

.employee-menu__item {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border-radius: 0.9rem;
  border: 1px solid transparent;
  background: rgba(78, 55, 30, 0.1);
  color: var(--brand-brown);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  min-height: 2.75rem;
}

.employee-menu__item:hover,
.employee-menu__item:focus-visible {
  background: rgba(78, 55, 30, 0.18);
  border-color: rgba(78, 55, 30, 0.28);
}

.employee-panels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.employee-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-grid--compact {
  gap: 1rem;
}

.dashboard-grid--compact .card--dashboard {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border);
}

.dashboard-grid--compact .dashboard-value {
  font-size: 1.4rem;
}

body[data-active-role='employee'] .branding,
body[data-active-role='employee'] .header-actions {
  display: none;
}

body[data-active-role='employee'] .employee-toolbar {
  display: flex;
}

body[data-active-role='employee'] .view--employee .card {
  box-shadow: 0 20px 45px rgba(78, 55, 30, 0.18);
}

body[data-active-role='employee'] .app-main {
  padding-top: 0;
}

body[data-active-role='terminal'] {
  background:
    radial-gradient(circle at top left, rgba(151, 191, 13, 0.2), transparent 30%),
    linear-gradient(180deg, #fff7f3 0%, #f3f4ef 100%);
}

body[data-active-role='terminal'] .app-header,
body[data-active-role='terminal'] .session-banner {
  display: none;
}

body[data-active-role='terminal'] .app-main {
  padding: 0;
}

.is-standalone body[data-active-role='employee'] .app-header {
  padding-top: calc(1.5rem + env(safe-area-inset-top, 0px));
  padding-left: calc(1.5rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1.5rem + env(safe-area-inset-right, 0px));
}

body.employee-menu-open {
  overflow: hidden;
}

body.employee-menu-open .employee-menu[hidden] {
  display: flex !important;
}

.view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border-radius: 1.25rem;
  padding: 1.5rem;
  box-shadow: 0 28px 60px rgba(78, 55, 30, 0.18);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.view--terminal {
  min-height: 100vh;
  gap: 0;
}

.terminal-view {
  min-height: 100vh;
  padding: 1.25rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.terminal-view__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.25rem 0;
}

.terminal-view__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #b65741;
  font-size: 0.82rem;
  font-weight: 700;
}

.terminal-view__title {
  margin: 0.35rem 0 0;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  color: #34281f;
}

.terminal-view__clock {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-variant-numeric: tabular-nums;
  font-weight: 300;
  color: #b65741;
}

.terminal-roster,
.terminal-unlock__card,
.terminal-stamp__card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(78, 55, 30, 0.08);
  border-radius: 1.5rem;
  padding: 1.25rem;
  box-shadow: 0 22px 50px rgba(78, 55, 30, 0.12);
  backdrop-filter: blur(16px);
}

.terminal-roster__toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.terminal-unlock {
  display: flex;
  justify-content: center;
}

.terminal-unlock__card {
  width: min(100%, 34rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.terminal-unlock__intro h3 {
  margin: 0 0 0.5rem;
  color: #34281f;
}

.terminal-unlock__intro p {
  margin: 0;
  color: var(--text-muted);
}

.terminal-unlock__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.terminal-roster__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1.25rem;
}

.terminal-card {
  border: none;
  background: transparent;
  padding: 0.5rem;
  border-radius: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
}

.terminal-card:hover,
.terminal-card:focus-visible {
  transform: translateY(-2px);
  background: rgba(78, 55, 30, 0.05);
}

.terminal-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  color: #1d1b1a;
}

.terminal-card__status {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.terminal-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.terminal-profile__ring {
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  border: 0.55rem solid #d64545;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
}

.terminal-card .terminal-profile__ring {
  width: 8.5rem;
  height: 8.5rem;
  border-width: 0.45rem;
}

.terminal-profile__ring.is-working {
  border-color: #22a148;
}

.terminal-profile__ring.is-paused {
  border-color: #e0b423;
}

.terminal-profile__ring.is-idle {
  border-color: #d64545;
}

.terminal-profile__image {
  position: relative;
  width: calc(100% - 0.45rem);
  height: calc(100% - 0.45rem);
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(80, 89, 96, 0.18), rgba(80, 89, 96, 0.42));
  display: flex;
  align-items: center;
  justify-content: center;
}

.terminal-profile__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}

.terminal-profile__image > span:first-of-type {
  font-size: 2rem;
  font-weight: 700;
  color: rgba(47, 36, 26, 0.72);
}

.terminal-card .terminal-profile__image > span:first-of-type {
  font-size: 1.5rem;
}

.terminal-profile__elapsed {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.terminal-card .terminal-profile__elapsed {
  font-size: 0.9rem;
}

.terminal-profile__status {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.terminal-stamp {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.terminal-stamp__card {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
}

.terminal-stamp__actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.terminal-stamp__buttons {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card h2,
.card h3 {
  margin-top: 0;
  color: var(--brand-brown);
}

.card--dashboard {
  text-align: left;
}

.card--sub {
  margin-bottom: 1rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.admin-panel[data-admin-panel='dashboard'] .dashboard-grid {
  gap: 0.75rem;
}

.dashboard-value {
  margin: 0.5rem 0 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--brand-brown);
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.admin-panel[data-admin-panel='dashboard'] .admin-dashboard-grid {
  gap: 0.75rem;
}

.card--dashboard-section {
  min-height: 24rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-dashboard-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-dashboard-section__header h3 {
  margin: 0;
}

.admin-dashboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-dashboard-list[hidden] {
  display: none;
}

.admin-dashboard-list--tight {
  gap: 0.6rem;
}

.admin-dashboard-item {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(78, 55, 30, 0.04);
  border: 1px solid rgba(78, 55, 30, 0.08);
}

.admin-dashboard-item__title {
  margin: 0;
  font-weight: 700;
  color: var(--brand-brown);
}

.admin-dashboard-item__meta {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.admin-dashboard-item__message {
  margin: 0.55rem 0 0;
  color: var(--text);
}

.admin-dashboard-item__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(78, 55, 30, 0.08);
  color: var(--brand-brown);
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-dashboard-item__pill[data-variant='warning'] {
  background: rgba(201, 151, 19, 0.16);
  color: #8a6b0a;
}

.admin-dashboard-item__pill[data-variant='danger'] {
  background: rgba(184, 50, 50, 0.16);
  color: var(--danger);
}

.admin-dashboard-item__pill[data-variant='success'] {
  background: rgba(31, 111, 77, 0.14);
  color: var(--success);
}

.admin-dashboard-item__pill[data-variant='neutral'] {
  background: rgba(84, 89, 95, 0.12);
  color: var(--text-muted);
}

.admin-dashboard-overtime {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-dashboard-overtime__filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.admin-dashboard-overtime__field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--brand-brown);
}

.admin-dashboard-overtime__field input {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.7rem 0.85rem;
  border-radius: 0.9rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  color: inherit;
}

.admin-dashboard-overtime__field input:focus {
  outline: none;
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(31, 111, 77, 0.15);
}

.admin-dashboard-overtime__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.2rem;
  border-radius: 0.9rem;
  border: 1px solid var(--brand-brown);
  background: transparent;
  color: var(--brand-brown);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  min-height: 2.75rem;
  min-width: 2.75rem;
}

.button:focus-visible {
  outline: 3px solid var(--brand-gold);
  outline-offset: 2px;
}

.button--primary {
  background: var(--brand-brown);
  color: #fff;
  border-color: var(--brand-brown);
  box-shadow: 0 12px 20px rgba(78, 55, 30, 0.25);
}

.button--ghost {
  border-color: transparent;
  background: rgba(78, 55, 30, 0.1);
  color: var(--brand-brown);
}

.button--subtle {
  border-color: rgba(78, 55, 30, 0.1);
  background: rgba(78, 55, 30, 0.08);
  color: var(--brand-brown);
}

.button:hover {
  background: rgba(78, 55, 30, 0.08);
}

.button--primary:hover {
  background: #3b2914;
}

.button.stamp-button {
  border: none;
  min-height: 3.25rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.button-row--wrap {
  flex-wrap: wrap;
}

.file-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.2rem;
  border-radius: 0.9rem;
  border: 1px dashed var(--brand-brown);
  background: rgba(78, 55, 30, 0.06);
  color: var(--brand-brown);
  cursor: pointer;
}

.file-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.form-hint {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-feedback {
  min-height: 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.form-feedback[data-variant='error'] {
  color: var(--danger);
}

.form-feedback[data-variant='success'] {
  color: var(--success);
}

.employee-request-dialog {
  max-width: 72rem;
  margin-inline: auto;
}

.employee-request-dialog__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.employee-request-dialog__titles {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.employee-request-dialog__titles h2 {
  margin-bottom: 0;
}

.employee-request-dialog__titles .note {
  margin: 0;
}

.employee-request-dialog__close {
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  border-radius: 999px;
  font-size: 1.4rem;
  line-height: 1;
}

.employee-request-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.employee-request-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.employee-request-field--full {
  grid-column: 1 / -1;
}

.employee-request-balances {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.employee-request-balance-card {
  min-height: 6rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(78, 55, 30, 0.14);
  background: rgba(78, 55, 30, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.employee-request-balance-card p,
.employee-request-balance-card strong {
  margin: 0;
}

.employee-request-balance-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.employee-request-balance-card strong {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brand-brown);
}

.employee-request-impact-card {
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(168, 198, 63, 0.28);
  background: rgba(168, 198, 63, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.employee-request-impact-card__label,
.employee-request-impact-card__value,
.employee-request-impact-card__detail {
  margin: 0;
}

.employee-request-impact-card__label {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.employee-request-impact-card__value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brand-brown);
}

.employee-request-impact-card__detail {
  color: var(--text);
}

.employee-request-context {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(78, 55, 30, 0.08);
  color: var(--text-muted);
}

.employee-request-context--error {
  color: var(--danger);
  background: rgba(184, 50, 50, 0.08);
}

.employee-request-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

label,
input,
textarea,
select {
  display: block;
  width: 100%;
}

input,
textarea,
select {
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  color: var(--text);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--brand-gold);
  outline-offset: 2px;
  border-color: transparent;
}

.tab-group {
  display: inline-flex;
  border-radius: 1rem;
  background: rgba(78, 55, 30, 0.08);
  padding: 0.25rem;
  margin-bottom: 1rem;
}

.tab-group button {
  background: transparent;
  border: none;
  border-radius: 0.85rem;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.tab-group button.is-active {
  background: var(--brand-brown);
  color: #fff;
}

.tab-panel {
  margin-top: 0.5rem;
}

.bullet-list,
.history-list,
.request-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bullet-list li::before {
  content: '•';
  margin-right: 0.5rem;
  color: var(--brand-gold);
}

.history-list li,
.request-list li {
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  background: rgba(78, 55, 30, 0.04);
  border: 1px solid rgba(78, 55, 30, 0.08);
}

.request-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.request-item__title {
  margin: 0;
  font-weight: 600;
}

.request-item__meta {
  margin: 0.3rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.request-item__message {
  margin: 0.5rem 0 0;
}

.request-item__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.absence-calendar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
}

.cal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cal-header__label {
  margin-left: auto;
  font-weight: 600;
  color: var(--brand-brown);
}

.cal-weekdays,
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
}

.cal-weekdays {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.cal-weekday {
  font-weight: 600;
}

.absence-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  align-items: center;
}

.absence-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.absence-legend__swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  flex: 0 0 auto;
  background: currentColor;
  border: 1px solid rgba(84, 89, 95, 0.18);
}

.cal-cell {
  min-height: 6rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(78, 55, 30, 0.12);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.95);
}

.cal-cell--holiday {
  background: linear-gradient(180deg, rgba(255, 246, 214, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
  border-color: rgba(198, 148, 33, 0.34);
}

.cal-cell--outside {
  opacity: 0.55;
  background: rgba(78, 55, 30, 0.03);
}

.cal-cell__day {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cal-cell__holiday {
  font-size: 0.68rem;
  line-height: 1.2;
  font-weight: 600;
  color: #9a6400;
  background: rgba(255, 211, 92, 0.18);
  border-radius: 0.45rem;
  padding: 0.2rem 0.35rem;
}

.cal-cell__pills {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.absence-pill {
  border: none;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  text-align: left;
  cursor: pointer;
  background: var(--brand-brown);
  color: #fff;
}

.absence-pill__short {
  display: none;
}

.absence-pill--type-vacation,
.absence-legend__swatch--type-vacation {
  background: #97bf0d;
  color: #102400;
}

.absence-pill--type-sick,
.absence-legend__swatch--type-sick {
  background: #f4b267;
  color: #4f2b00;
}

.absence-pill--type-compensation,
.absence-legend__swatch--type-compensation {
  background: #7bb6d9;
  color: #0b2b40;
}

.absence-pill--type-exchange-day,
.absence-legend__swatch--type-exchange-day {
  background: #c7b5ff;
  color: #26144d;
}

.absence-pill--type-offset-free,
.absence-legend__swatch--type-offset-free {
  background: #8dd3c7;
  color: #073a34;
}

.absence-pill--type-educational-leave,
.absence-legend__swatch--type-educational-leave {
  background: #ffd166;
  color: #5c3a00;
}

.absence-pill--type-training-leave,
.absence-legend__swatch--type-training-leave {
  background: #ff9f80;
  color: #5e1800;
}

.absence-pill--type-child-sick,
.absence-legend__swatch--type-child-sick {
  background: #f28482;
  color: #4a1110;
}

.absence-legend__swatch--holiday {
  background: #eef5d2;
  border-color: rgba(151, 191, 13, 0.4);
}

.absence-pill--pending {
  opacity: 0.42;
  background: rgba(78, 55, 30, 0.62);
}

.absence-pill--rejected {
  background: rgba(78, 55, 30, 0.3);
  color: var(--text-muted);
}

.absence-details {
  border-radius: 0.6rem;
  padding: 0.4rem 0.6rem;
  background: rgba(78, 55, 30, 0.08);
  font-size: 0.75rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-absence-overview {
  display: grid;
  gap: 1rem;
}

.admin-absence-summary__table-wrapper {
  margin-top: 0.75rem;
  overflow-x: auto;
  border: 1px solid rgba(78, 55, 30, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.88);
}

.admin-absence-summary__table {
  width: 100%;
  min-width: 68rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.admin-absence-summary__table th,
.admin-absence-summary__table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(78, 55, 30, 0.12);
}

.admin-absence-summary__table thead th {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  z-index: 1;
}

.admin-absence-summary__table tbody tr:nth-child(even) {
  background: rgba(78, 55, 30, 0.03);
}

.admin-absence-summary__table tbody tr:hover {
  background: rgba(78, 55, 30, 0.08);
}

.admin-absence-summary__table tr[data-state='error'] {
  opacity: 0.65;
}

.admin-absence-summary__balance {
  font-weight: 700;
  color: var(--brand-brown);
  white-space: nowrap;
}

.admin-absence-summary__balance[data-state='error'] {
  color: var(--danger);
}

.admin-absence-summary__action {
  width: 10rem;
}

.admin-absence-summary__empty {
  margin: 0.75rem 0 0;
}

.admin-absence-calendar-card {
  display: grid;
  gap: 0.75rem;
}

.admin-absence-edit-card {
  max-width: 72rem;
}

.admin-absence-create-card {
  max-width: 72rem;
}

.admin-absence-edit__balances {
  margin-bottom: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.admin-absence-edit__fields {
  display: grid;
  gap: 1rem;
  margin-top: 0.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-absence-create__fields {
  display: grid;
  gap: 1rem;
  margin-top: 0.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-absence-action-card {
  max-width: 72rem;
}

.admin-absence-action__balances {
  margin-bottom: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.admin-absence-action__summary {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(78, 55, 30, 0.05);
  color: var(--text-muted);
}

.admin-absence-action__summary p {
  margin: 0;
}

.admin-absence-action__date-fields {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.form-note-inline {
  font-size: 0.85em;
  font-weight: 400;
  color: var(--text-muted);
}

.button--approve {
  background: rgba(31, 111, 77, 0.12);
  border-color: rgba(31, 111, 77, 0.5);
  color: var(--success);
}

.button--reject {
  background: rgba(184, 50, 50, 0.12);
  border-color: rgba(184, 50, 50, 0.5);
  color: var(--danger);
}

.note {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  background: rgba(78, 55, 30, 0.08);
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.badge--danger {
  background: rgba(184, 50, 50, 0.18);
  color: var(--danger);
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 1.25rem;
  border: 1px solid var(--border);
}

.admin-nav__label {
  font-weight: 600;
  color: var(--brand-brown);
  margin-right: 0.5rem;
}

.admin-nav__link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 0.8rem;
}

.admin-nav__link.is-active,
.admin-nav__link:hover {
  background: var(--brand-brown);
  color: #fff;
}

.admin-panels {
  display: grid;
  gap: 1.5rem;
}

.admin-panel[hidden] {
  display: none;
}

.admin-employee-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-employee-controls__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-employee-count {
  font-weight: 600;
  color: var(--brand-brown);
}

.admin-employee-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-employee-tabs .button[aria-selected='true'] {
  background: var(--brand-green);
  color: #fff;
  border-color: var(--brand-green);
}

.admin-employee-inactive-export {
  display: grid;
  gap: 1rem;
}

.employee-table-wrapper {
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.85);
}

.employee-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 56rem;
  font-variant-numeric: tabular-nums;
}

.employee-table thead th {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 1;
}

.employee-table th,
.employee-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(78, 55, 30, 0.12);
  text-align: left;
}

.employee-table tbody tr:nth-child(even) {
  background: rgba(78, 55, 30, 0.03);
}

.employee-table tbody tr:hover {
  background: rgba(78, 55, 30, 0.08);
}

.employee-table th button {
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.employee-table th button::after {
  content: '';
}

.employee-table th button[data-sort-direction='asc']::after {
  content: '▲';
  font-size: 0.65em;
}

.employee-table th button[data-sort-direction='desc']::after {
  content: '▼';
  font-size: 0.65em;
}

.employee-table__visible-cell {
  text-align: center;
}

.employee-table__visible-cell input {
  width: 1.15rem;
  height: 1.15rem;
}

.employee-table__actions {
  width: 18rem;
}

.admin-employee-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-employee-actions .button {
  flex: 1 1 6.5rem;
}

.admin-request-log__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.admin-request-log__filters label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  min-width: 15rem;
}

.admin-request-log__count {
  margin: 0 0 0 auto;
  font-weight: 600;
}

.admin-request-log__table-wrapper {
  overflow-x: auto;
}

.admin-request-log__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.admin-request-log__table th,
.admin-request-log__table td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--border-muted);
  vertical-align: top;
}

.admin-request-log__table tbody tr:nth-child(even) {
  background: var(--surface-muted);
}

.admin-request-log__row {
  cursor: pointer;
}

.admin-request-log__row:hover {
  background: rgba(78, 55, 30, 0.08);
}

.admin-request-log__employee {
  display: grid;
  gap: 0.2rem;
}

.admin-request-log__employee strong {
  font-weight: 700;
}

.admin-request-log__kind {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.admin-audit-log__filters {
  display: grid;
  gap: 1rem;
}

.admin-audit-log__filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  align-items: end;
}

.admin-audit-log__filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--text);
}

.admin-audit-log__filter-grid label span {
  font-size: 0.95rem;
}

.admin-audit-log__actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.admin-audit-log__count {
  margin: 0;
  font-weight: 600;
}

.admin-audit-log__table-card {
  display: grid;
  gap: 0.75rem;
}

.admin-audit-log__table-wrapper {
  overflow-x: auto;
}

.admin-audit-log__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.admin-audit-log__table th,
.admin-audit-log__table td {
  text-align: left;
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid var(--border-muted);
  vertical-align: top;
}

.admin-audit-log__table tbody tr:nth-child(even) {
  background: var(--surface-muted);
}

.admin-audit-log__action-cell {
  width: 8.5rem;
  text-align: right;
}

.admin-audit-log__delete {
  white-space: nowrap;
}

.admin-overtime__filters {
  display: grid;
  gap: 1rem;
}

.admin-overtime__filter-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-overtime__filter-grid label,
.admin-overtime__editor-grid label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--text);
}

.admin-overtime__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-overtime__count {
  margin: 0;
}

.admin-overtime__table-card {
  display: grid;
  gap: 0.8rem;
}

.admin-overtime__table-wrapper {
  overflow-x: auto;
}

.admin-terminal-devices__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.admin-terminal-devices__toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-terminal-devices__table-wrapper {
  overflow-x: auto;
}

.admin-terminal-devices__table {
  width: 100%;
  border-collapse: collapse;
}

.admin-terminal-devices__table th,
.admin-terminal-devices__table td {
  padding: 0.9rem 0.85rem;
  border-bottom: 1px solid rgba(78, 55, 30, 0.08);
  text-align: left;
  vertical-align: middle;
}

.admin-terminal-devices__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-overtime__table {
  width: 100%;
  min-width: 72rem;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-overtime__table th,
.admin-overtime__table td {
  padding: 0.9rem 0.85rem;
  border-bottom: 1px solid rgba(78, 55, 30, 0.08);
  text-align: left;
  vertical-align: middle;
}

.admin-overtime__table td:nth-child(2),
.admin-overtime__table td:nth-child(3),
.admin-overtime__table td:nth-child(5) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.admin-overtime__table tbody tr:nth-child(even) {
  background: var(--surface-muted);
}

.admin-overtime__balance--positive {
  color: #1f6f4d;
  font-weight: 700;
}

.admin-overtime__balance--negative {
  color: #b83232;
  font-weight: 700;
}

.admin-overtime__balance--neutral {
  color: var(--text);
  font-weight: 600;
}

.admin-overtime__editor {
  display: grid;
  gap: 1rem;
}

.admin-overtime__editor-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-overtime__editor-note {
  grid-column: 1 / -1;
}

.admin-overtime__editor .employee-form-footer {
  position: relative;
  z-index: 1;
  padding-top: 0;
}

.admin-times {
  display: grid;
  gap: 1rem;
}

.admin-times__filters-card {
  display: grid;
  gap: 1rem;
}

.admin-times__filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  align-items: end;
  width: 100%;
}

.admin-times__filters > * {
  min-width: 0;
}

.admin-times__filters label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
}

.admin-times__filters label span {
  font-size: 0.95rem;
}

.admin-times__filters select,
.admin-times__filters input[type='date'] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 3rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--text);
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
}

.admin-times__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-times__summary {
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  background: rgba(120, 113, 108, 0.08);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow-sm);
}

.admin-times__label {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}

.admin-times__feedback {
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 0.9rem 1rem;
  background: rgba(245, 158, 11, 0.08);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.admin-times__feedback[data-variant='success'] {
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
}

.admin-times__feedback[data-variant='error'] {
  background: rgba(220, 38, 38, 0.1);
  color: #991b1b;
}

.admin-times__feedback[data-variant='info'] {
  background: rgba(120, 113, 108, 0.08);
  color: var(--text);
}

.admin-times__overview {
  padding: 0.5rem 0 0;
}

.admin-times__editor {
  display: grid;
  gap: 1rem;
}

.admin-times__editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-times__editor-header h3 {
  margin: 0;
}

.admin-times__editor-header .note {
  margin: 0.35rem 0 0;
}

.admin-times__editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
}

.admin-times__editor-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-weight: 600;
  color: var(--text);
}

.admin-times__editor-grid input {
  min-height: 3rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--text);
}

.admin-times__editor-grid textarea {
  min-height: 7rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--text);
  resize: vertical;
}

.admin-times__editor-note {
  grid-column: 1 / -1;
}

.admin-times__editor-grid input[readonly],
.admin-times__editor-grid textarea[readonly] {
  background: var(--surface-muted);
  color: var(--text);
}

.admin-times__editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-times__overtime dl {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  margin: 0;
}

.admin-times__overtime dl div {
  padding: 0.75rem;
  border: 1px solid var(--border-muted);
  border-radius: 0.75rem;
  background: var(--surface-muted);
}

.admin-times__overtime dt {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-times__overtime dd {
  margin: 0.35rem 0 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.employee-times {
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.employee-times__filters {
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  min-width: 0;
}

.admin-employee-form {
  max-width: 640px;
  margin: 0 auto;
}

.admin-employee-form form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-height: calc(100vh - 12rem);
  overflow-y: auto;
  padding-right: 0.25rem;
}

.employee-form-header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.employee-form-section {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(78, 55, 30, 0.15);
}

.employee-form-section:first-of-type {
  border-top: 0;
  padding-top: 0.5rem;
}

.employee-form-section__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--brand-brown);
}

.employee-form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.employee-form-hours {
  margin-top: 1.5rem;
  border: 1px solid rgba(78, 55, 30, 0.18);
  border-radius: 1rem;
  padding: 1.1rem 1.25rem;
  background: rgba(255, 255, 255, 0.85);
}

.employee-form-hours legend {
  font-weight: 600;
  color: var(--brand-brown);
}

.employee-form-hours__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field label {
  font-weight: 600;
  color: #555;
}

.form-field input,
.form-field select {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  font: inherit;
  color: inherit;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(31, 111, 77, 0.15);
}

.form-field--readonly input {
  background: rgba(78, 55, 30, 0.08);
  color: var(--text-muted);
}

.form-field--checkbox {
  justify-content: flex-end;
}

.form-field--checkbox .checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.form-field--checkbox input {
  width: 1.15rem;
  height: 1.15rem;
}

.form-error {
  margin: 0;
  font-size: 0.85rem;
  color: var(--danger);
}

.form-note {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-required {
  color: var(--danger);
}

.employee-form-hours .form-note {
  margin-top: 0.75rem;
}

.employee-form-footer {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, var(--surface), rgba(255, 255, 255, 0));
  padding: 0.75rem 0 0.5rem;
}

.employee-form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.employee-form-actions .button {
  min-width: 8rem;
}

.admin-employee-form .form-feedback {
  margin: 0;
}

.form-field[data-invalid='true'] input,
.form-field[data-invalid='true'] select {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(184, 50, 50, 0.15);
}

.employee-form-actions .button[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 1rem;
}

.status-card {
  padding: 1.2rem;
  border-radius: 1rem;
  text-align: center;
  font-weight: 600;
  border: 1px solid transparent;
}

.status-card[data-state='ok'] {
  background: rgba(31, 111, 77, 0.12);
  border-color: rgba(31, 111, 77, 0.2);
  color: var(--success);
}

.status-card[data-state='warning'] {
  background: rgba(201, 151, 19, 0.18);
  border-color: rgba(201, 151, 19, 0.3);
  color: #8a6b0a;
}

.status-card[data-state='idle'] {
  background: rgba(78, 55, 30, 0.05);
  border-color: rgba(78, 55, 30, 0.12);
  color: var(--text-muted);
}

[data-admin-reminder][data-state='critical'] {
  color: var(--danger);
}

.session-banner {
  margin: 0 1.5rem;
  padding: 0.9rem 1.2rem;
  border-radius: 0.9rem;
  background: rgba(184, 50, 50, 0.12);
  color: var(--danger);
  font-weight: 600;
}

.session-banner--warning {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(201, 151, 19, 0.16);
  color: #7a5b08;
}

.session-banner--warning .button {
  flex-shrink: 0;
}

.app-footer {
  margin-top: auto;
  padding: 1rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.78);
  border-top: 1px solid var(--border);
}

.empty {
  color: var(--text-muted);
  font-style: italic;
}

.employee-overview__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 0.75rem;
}

.employee-overview__label {
  margin-top: 0.35rem;
}

.employee-overview__controls {
  display: grid;
  gap: 0.6rem;
  justify-items: end;
}

.employee-overview__mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.employee-overview__chip {
  border: 1px solid rgba(78, 55, 30, 0.2);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.employee-overview__chip:hover {
  background: rgba(255, 255, 255, 0.8);
}

.employee-overview__chip.is-active {
  background: rgba(78, 55, 30, 0.15);
  border-color: rgba(78, 55, 30, 0.35);
  font-weight: 600;
}

.employee-overview__divider {
  width: 1px;
  height: 1.4rem;
  background: rgba(78, 55, 30, 0.2);
  margin: 0 0.2rem;
}

.employee-overview__inputs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
}

.employee-overview__month-row,
.employee-overview__range-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.employee-overview__month-row label,
.employee-overview__range-row label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.employee-overview__month-row select,
.employee-overview__range-row input[type='date'] {
  width: auto;
  min-height: 2.2rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(78, 55, 30, 0.2);
  background: rgba(255, 255, 255, 0.75);
}

.employee-overview__feedback {
  justify-self: end;
  margin: 0;
}

.time-overview {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.time-overview__table-wrapper {
  position: relative;
  isolation: isolate;
  max-height: min(32rem, 65vh);
  overflow-y: auto;
  overflow-x: auto;
  border-radius: 1rem;
  border: 1px solid var(--border);
}

.time-overview__mobile-list,
.time-overview__summary-card {
  display: none;
}

.time-overview table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 68rem;
  background: rgba(255, 255, 255, 0.96);
}

.time-overview thead th {
  position: sticky;
  top: 0;
  background: #f7f3ee;
  backdrop-filter: none;
  z-index: 1;
  background-clip: padding-box;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text);
}

.time-overview th,
.time-overview td {
  padding: 0.85rem 0.9rem;
  text-align: center;
  border-bottom: 1px solid rgba(78, 55, 30, 0.08);
  font-variant-numeric: tabular-nums;
}

.time-overview th:first-child,
.time-overview td:first-child,
.time-overview th:nth-child(3),
.time-overview td:nth-child(3),
.time-overview th:nth-child(4),
.time-overview td:nth-child(4) {
  text-align: left;
}

.time-overview tbody tr:nth-child(even):not(.urlaub):not(.feiertag):not(.krank):not(.derived-absence) {
  background: rgba(120, 113, 108, 0.05);
}

.time-overview tbody tr.weekend {
  background: #f8f9fa;
}

.time-overview tbody tr.open-entry {
  background: rgba(78, 55, 30, 0.06);
}

.time-overview tbody tr.request-pending {
  background: rgba(245, 158, 11, 0.12);
}

.time-overview tbody tr.urlaub {
  background: #d4edda;
}

.time-overview tbody tr.feiertag {
  background: #d0ebff;
}

.time-overview tbody tr.krank {
  background: #fff3cd;
}

.time-overview tbody tr.derived-absence {
  background: rgba(212, 237, 218, 0.55);
  color: #2f4f3a;
  font-style: italic;
}

.time-overview tbody tr.long-day {
  box-shadow: inset 4px 0 0 #f59e0b;
}

.time-overview tbody tr.time-overview__day-break td {
  border-top: 0.3rem solid rgba(78, 55, 30, 0.16);
}

.time-overview tbody tr td.pos {
  color: #1f6f4d;
  font-weight: 600;
}

.time-overview tbody tr td.neg {
  color: #b83232;
  font-weight: 600;
}

.time-overview__badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  line-height: 1;
  font-weight: 600;
  text-transform: uppercase;
}

.time-overview__badge--long {
  background: #fef3c7;
  color: #92400e;
}

.time-overview__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(78, 55, 30, 0.2);
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  line-height: 1.25;
  white-space: nowrap;
}

.time-overview__status--leave {
  background: rgba(31, 111, 77, 0.14);
  border-color: rgba(31, 111, 77, 0.35);
  color: #1f6f4d;
}

.time-overview__status--open {
  background: rgba(78, 55, 30, 0.12);
  border-color: rgba(78, 55, 30, 0.25);
  color: var(--text);
}

.time-overview__status--idle {
  background: rgba(78, 55, 30, 0.05);
  border-color: rgba(78, 55, 30, 0.15);
  color: var(--text-muted);
}

.time-overview__status--request {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
  color: #92400e;
}

.time-overview__align-right {
  text-align: right !important;
}

.time-overview tfoot tr {
  background: rgba(120, 113, 108, 0.08);
  font-weight: 700;
}

.time-overview tfoot td {
  border-top: 1px solid rgba(78, 55, 30, 0.15);
}

.time-overview__actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.time-overview__actions .button {
  min-height: 2.15rem;
}

.time-overview__pause-details {
  display: inline-block;
  text-align: left;
}

.time-overview__pause-summary {
  list-style: none;
  cursor: pointer;
  color: var(--text);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.18rem;
}

.time-overview__pause-summary::-webkit-details-marker {
  display: none;
}

.time-overview__pause-panel {
  margin-top: 0.45rem;
  min-width: 10rem;
  display: grid;
  gap: 0.3rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(78, 55, 30, 0.14);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0.8rem 1.6rem rgba(78, 55, 30, 0.12);
}

.time-overview__pause-line {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.35;
  white-space: nowrap;
}

.time-overview__pause-line--auto {
  color: #b83232;
  font-weight: 700;
}

.time-overview__action-button {
  min-width: 2.15rem;
  width: 2.15rem;
  padding: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.time-overview__summary-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
  padding: 1rem;
}

.time-overview__summary-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.time-overview__summary-card dl {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.time-overview__summary-card dl div {
  padding: 0.75rem;
  border: 1px solid rgba(78, 55, 30, 0.12);
  border-radius: 0.9rem;
  background: var(--surface-muted);
}

.time-overview__summary-card dt {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.time-overview__summary-card dd {
  margin: 0.25rem 0 0;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}


.toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
}

.toggle input {
  width: auto;
}

@media (min-width: 960px) {
  .app-main {
    padding: 2.5rem 3rem;
  }

  .view[data-view='admin'] {
    flex-direction: row;
    align-items: flex-start;
  }

  .admin-nav {
    flex-direction: column;
    position: sticky;
    top: 2rem;
    width: 14rem;
  }

  .admin-panels {
    flex: 1;
    margin-left: 1.5rem;
  }
}

@media (max-width: 1200px) {
  .admin-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-dashboard-grid > :last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .admin-dashboard-grid,
  .admin-dashboard-overtime__filters,
  .admin-overtime__filter-grid,
  .admin-overtime__editor-grid {
    grid-template-columns: 1fr;
  }

  .employee-request-form__grid,
  .employee-request-balances {
    grid-template-columns: 1fr;
  }

  .admin-absence-edit__fields,
  .admin-absence-create__fields,
  .admin-absence-action__date-fields {
    grid-template-columns: 1fr;
  }

  .employee-request-dialog__header {
    align-items: flex-start;
  }

  .card--dashboard-section {
    min-height: auto;
  }
}

/* Employee mobile refinement */
.menu-button--employee {
  display: none;
  width: 3.2rem;
  min-width: 3.2rem;
  height: 3.2rem;
  padding: 0.7rem;
  border-radius: 1rem;
  flex-direction: column;
  gap: 0.32rem;
  justify-content: center;
  align-items: center;
}

.menu-button--employee span {
  display: block;
  width: 1.6rem;
  height: 0.16rem;
  border-radius: 999px;
  background: currentColor;
}

.employee-home__hero {
  padding: 0.25rem 0.15rem 0.35rem;
}

.employee-home__eyebrow,
.employee-home__headline {
  margin: 0;
}

.employee-home__eyebrow {
  font-family: 'Oswald', 'Arial Narrow', 'Roboto Condensed', 'Segoe UI', sans-serif;
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(2, 1, 1, 0.62);
}

.employee-home__headline {
  margin-top: 0.2rem;
  font-family: 'Oswald', 'Arial Narrow', 'Roboto Condensed', 'Segoe UI', sans-serif;
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.employee-home__intro {
  margin: 0.85rem 0 0;
  font-size: clamp(1.1rem, 1.6vw, 1.8rem);
  color: var(--text-muted);
}

.employee-home__summary-card,
.employee-home__quicklinks-card,
.employee-home__notice-card,
.employee-home__actions-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.employee-home__stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.employee-home__stats .card--dashboard,
.employee-home__quicklink,
.employee-home__notice-card,
.employee-home__actions-card.card,
.card--stamp {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(2, 1, 1, 0.08);
  box-shadow: var(--shadow-md);
  border-radius: 1.35rem;
}

.employee-home__stats .card--dashboard {
  padding: 1.35rem 1.4rem 1.3rem;
}

.employee-home__stats .card--dashboard h3 {
  margin: 0;
  font-size: 0.9rem;
}

.employee-home__stat-icon,
.employee-home__quicklink-icon,
.employee-home__notice-icon,
.employee-bottom-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-gold);
}

.employee-home__stat-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1rem;
  border: 2px solid rgba(151, 191, 13, 0.75);
  border-radius: 50%;
}

.employee-home__stat-icon svg,
.employee-home__quicklink-icon svg,
.employee-home__notice-icon svg,
.employee-bottom-nav__icon svg {
  width: 1.9rem;
  height: 1.9rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.employee-home__stat-meta {
  margin: 0.75rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.employee-home__quicklinks {
  display: grid;
  gap: 0.9rem;
}

.employee-home__quicklink {
  width: 100%;
  padding: 1rem 1.2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  text-align: left;
  color: var(--brand-brown);
}

.employee-home__quicklink-icon {
  width: 3.3rem;
  height: 3.3rem;
  border-radius: 1rem;
  border: 1px solid rgba(2, 1, 1, 0.08);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.employee-home__quicklink-label {
  font-size: 1.1rem;
}

.employee-home__quicklink-arrow {
  font-size: 2.2rem;
  line-height: 1;
  color: var(--brand-gold);
}

.employee-home__notice-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: center;
  padding: 1.4rem 1.5rem;
}

.employee-home__notice-card::after {
  content: '';
  position: absolute;
  inset: auto 1.1rem 0.8rem auto;
  width: 8.5rem;
  height: 8.5rem;
  background: url('assets/kuhkraft-logo.png') center / contain no-repeat;
  opacity: 0.08;
  pointer-events: none;
}

.employee-home__notice-icon {
  width: 4.1rem;
  height: 4.1rem;
  border: 1px solid rgba(2, 1, 1, 0.08);
  border-radius: 50%;
  background: #fff;
}

.employee-home__notice-content {
  position: relative;
  z-index: 1;
}

.employee-home__notice-kicker {
  margin: 0 0 0.25rem;
  font-family: 'Oswald', 'Arial Narrow', 'Roboto Condensed', 'Segoe UI', sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-gold);
}

.employee-home__notice-content h3 {
  margin: 0;
  font-size: 1.9rem;
}

.employee-home__notice-content p:last-child {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
  color: var(--text-muted);
}

.employee-home__actions-card.card,
.card--stamp {
  padding: 1.5rem;
}

.employee-home__actions {
  display: grid;
  gap: 0.75rem;
}

.employee-home__actions .employee-home__action {
  background: #f9faf5;
  border: 1px solid rgba(2, 1, 1, 0.06);
  border-radius: 1rem;
}

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

body[data-active-role='employee'] .header-actions .button[data-action='logout'] {
  display: none;
}

body[data-active-role='employee'] .employee-toolbar {
  display: none;
}

body[data-active-role='employee'] .menu-button--employee {
  display: inline-flex;
}

body[data-active-role='employee'] .header-actions {
  gap: 0.9rem;
  margin-left: auto;
}

body[data-active-role='employee'] .status-badge[data-network-status] {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.15rem;
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
}

body[data-active-role='employee'] .status-badge[data-network-status]::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.72rem;
  height: 0.72rem;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--brand-gold);
  box-shadow: 0 0 0 0.22rem rgba(151, 191, 13, 0.2);
}

body[data-active-role='employee'] .status-badge.offline[data-network-status]::before {
  background: var(--danger);
  box-shadow: 0 0 0 0.22rem rgba(180, 64, 52, 0.16);
}

body[data-active-role='employee'] .sync-alert {
  display: none !important;
}

body[data-active-role='employee'] .app-footer {
  padding-bottom: 6rem;
}

@media (min-width: 721px) {
  .employee-home__quicklinks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  body[data-active-role='employee'] .app-header {
    padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1.1rem 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
  }

  body[data-active-role='employee'] .branding {
    min-width: 0;
  }

  body[data-active-role='employee'] .branding__logo {
    width: 4.5rem;
    height: 4.5rem;
  }

  body[data-active-role='employee'] .app-title {
    font-size: 1.9rem;
    line-height: 1;
  }

  body[data-active-role='employee'] .app-subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.14em;
  }

  body[data-active-role='employee'] .header-actions {
    align-items: center;
  }

  body[data-active-role='employee'] .app-main {
    padding: 1.2rem 1rem 7.5rem;
  }

  body[data-active-role='employee'] .view--employee {
    width: 100%;
  }

  .employee-home {
    gap: 1.5rem;
  }

  .employee-home__stats {
    grid-template-columns: 1fr;
  }

  .employee-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 0.5rem 0.35rem calc(env(safe-area-inset-bottom, 0px) + 0.45rem);
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(2, 1, 1, 0.08);
    box-shadow: 0 -12px 28px rgba(2, 1, 1, 0.08);
  }

  .employee-bottom-nav__item {
    position: relative;
    background: transparent;
    border: 0;
    border-radius: 0.9rem;
    padding: 0.8rem 0.25rem 0.35rem;
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    color: rgba(2, 1, 1, 0.62);
  }

  .employee-bottom-nav__item.is-active {
    color: #7eac00;
  }

  .employee-bottom-nav__item.is-active::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 14%;
    right: 14%;
    height: 0.18rem;
    border-radius: 999px;
    background: var(--brand-gold);
  }

  .employee-bottom-nav__icon {
    width: 1.7rem;
    height: 1.7rem;
  }

  .employee-bottom-nav__icon svg {
    width: 1.7rem;
    height: 1.7rem;
  }

  .employee-bottom-nav__label {
    font-family: 'Oswald', 'Arial Narrow', 'Roboto Condensed', 'Segoe UI', sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.1;
  }

  .employee-menu {
    align-items: flex-start;
    justify-content: flex-end;
    padding: calc(env(safe-area-inset-top, 0px) + 5.6rem) 1rem 1rem;
  }

  .employee-menu__nav {
    width: min(18rem, 100%);
    border-radius: 1.25rem;
    padding: 0.9rem;
  }

  .employee-menu__item {
    min-height: 3.3rem;
    border-radius: 0.9rem;
  }
}

/* Kuhkraft redesign */
:root {
  --brand-brown: #020101;
  --brand-gold: #97bf0d;
  --brand-cream: #f7f8f3;
  --brand-cream-dark: #eef2e4;
  --surface: #ffffff;
  --surface-dark: #f4f3f3;
  --surface-muted: #f6f7f2;
  --border: rgba(2, 1, 1, 0.12);
  --border-muted: rgba(84, 89, 95, 0.2);
  --text: #020101;
  --text-muted: #54595f;
  --danger: #b44034;
  --success: #5d7f00;
  --shadow-sm: 0 10px 24px rgba(2, 1, 1, 0.06);
  --shadow-md: 0 18px 40px rgba(2, 1, 1, 0.08);
}

body {
  background:
    linear-gradient(180deg, rgba(151, 191, 13, 0.08) 0, rgba(151, 191, 13, 0.02) 9rem, transparent 15rem),
    linear-gradient(180deg, #fafbf7 0%, #f4f5ef 100%);
  color: var(--text);
  font-family: 'Roboto', 'Segoe UI', sans-serif;
  line-height: 1.45;
}

h1,
h2,
h3,
.app-title,
.app-subtitle,
.admin-nav__label,
.admin-nav__link,
.employee-menu__item,
.dashboard-value,
.employee-form-section__title,
.request-item__title,
.employee-home__action-title {
  font-family: 'Oswald', 'Arial Narrow', 'Roboto Condensed', 'Segoe UI', sans-serif;
}

h1,
h2,
h3,
.app-title,
.admin-nav__label,
.admin-nav__link {
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-shell {
  background:
    radial-gradient(circle at top right, rgba(151, 191, 13, 0.08), transparent 22rem);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 1.3rem 1.5rem 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(242, 248, 218, 0.98) 100%);
  border-bottom: 1px solid rgba(2, 1, 1, 0.08);
  box-shadow: 0 6px 20px rgba(2, 1, 1, 0.05);
  backdrop-filter: none;
  flex-wrap: wrap;
}

.app-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.5rem;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(151, 191, 13, 1) 0 1.2rem,
      rgba(151, 191, 13, 0.4) 1.2rem 2rem,
      rgba(255, 255, 255, 0) 2rem 3rem
    ),
    linear-gradient(90deg, #eef5d2, #fafcf4);
}

.branding {
  gap: 0.85rem;
}

.branding__logo {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 0;
  box-shadow: none;
}

.branding__text {
  gap: 0.2rem;
}

.app-title {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 700;
  color: var(--brand-brown);
  white-space: normal;
}

.app-subtitle {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--brand-gold);
}

.header-actions,
.employee-toolbar {
  gap: 0.65rem;
}

.employee-toolbar {
  padding-top: 0.25rem;
}

.menu-button,
.button,
.file-upload {
  border-radius: 0.85rem;
  font-weight: 600;
}

.menu-button {
  border: 1px solid rgba(2, 1, 1, 0.16);
  background: #fff;
  color: var(--brand-brown);
  box-shadow: none;
}

.employee-clock,
.employee-clock-secondary {
  font-family: 'Oswald', 'Arial Narrow', 'Roboto Condensed', 'Segoe UI', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.sync-alert,
.status-badge,
.badge,
.time-overview__status,
.admin-dashboard-item__pill {
  border: 1px solid transparent;
}

.status-badge {
  background: rgba(151, 191, 13, 0.14);
  border-color: rgba(151, 191, 13, 0.28);
  color: #5d7f00;
}

.status-badge.offline {
  background: rgba(180, 64, 52, 0.12);
  border-color: rgba(180, 64, 52, 0.24);
}

.sync-alert {
  background: rgba(180, 64, 52, 0.08);
  border-color: rgba(180, 64, 52, 0.18);
}

.sync-alert__dot {
  box-shadow: 0 0 0 3px rgba(180, 64, 52, 0.14);
}

body[data-active-role='employee'] .branding,
body[data-active-role='employee'] .header-actions {
  display: flex;
}

body[data-active-role='employee'] .employee-toolbar {
  display: flex;
  order: 3;
  width: 100%;
  justify-content: space-between;
  border-top: 1px solid rgba(2, 1, 1, 0.08);
}

.app-main {
  gap: 1.75rem;
}

.view {
  width: min(100%, 84rem);
  align-self: center;
}

.view[data-view='login'] {
  max-width: 100%;
}

.view--login {
  width: 100%;
}

.login-stage {
  position: relative;
  min-height: min(78vh, 52rem);
  border-radius: 2rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 3rem);
  background:
    radial-gradient(circle at top left, rgba(151, 191, 13, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(16, 18, 14, 0.34), rgba(18, 28, 14, 0.2));
  box-shadow: var(--shadow-lg);
}

.login-stage__content {
  position: relative;
  z-index: 1;
  width: min(100%, 68rem);
  display: flex;
  justify-content: center;
  padding-top: clamp(4rem, 12vh, 8rem);
}

.login-stage__background,
.login-stage__overlay {
  position: absolute;
  inset: 0;
}

.login-stage__background {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0;
  transform: scale(1.015);
  filter: saturate(1.04) contrast(1.03);
  transition: opacity 180ms ease-in-out;
}

.login-stage[data-has-image='true'] .login-stage__background {
  opacity: 1;
}

.login-stage__overlay {
  background:
    linear-gradient(180deg, rgba(17, 20, 14, 0.04), rgba(17, 20, 14, 0.16));
}

.login-card {
  position: relative;
  margin: 0 auto;
  width: min(100%, 54rem);
}

.login-card__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 2vw, 1.65rem);
}

.login-card__field {
  display: flex;
  width: min(100%, 19rem);
}

.login-card__field--password {
  width: min(100%, 21rem);
}

.login-card__password-wrap {
  position: relative;
  width: 100%;
}

.login-card__field input {
  width: 100%;
  min-height: 4rem;
  padding: 0 1.45rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.9);
  color: rgba(35, 43, 22, 0.92);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px) saturate(1.06);
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.login-card__field input::placeholder {
  color: rgba(88, 96, 74, 0.8);
}

.login-card__field input:focus {
  outline: none;
  border-color: rgba(230, 245, 177, 0.95);
  box-shadow:
    0 20px 38px rgba(0, 0, 0, 0.16),
    0 0 0 3px rgba(151, 191, 13, 0.24);
}

.login-card__field--password input {
  padding-right: 4.8rem;
}

.login-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 18px 34px rgba(25, 36, 12, 0.22);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.login-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-card__submit {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  background: rgba(151, 191, 13, 0.92);
  color: rgba(24, 30, 15, 0.92);
  font-size: 1.4rem;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(25, 36, 12, 0.24);
  cursor: pointer;
}

.login-card__submit:hover,
.login-card__submit:focus-visible {
  background: rgba(173, 214, 29, 0.96);
  outline: none;
}

.login-card .form-feedback {
  margin-top: 1.25rem;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
  font-size: 1rem;
}

@media (max-width: 640px) {
  .login-stage {
    min-height: calc(100vh - 3rem);
    border-radius: 1.4rem;
    padding: 1rem;
  }

  .login-stage__content {
    padding-top: clamp(3.5rem, 10vh, 5.5rem);
  }

  .login-card {
    width: min(100%, 22rem);
  }

  .login-card__fields {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 0.9rem;
  }

  .login-card__logo {
    width: 6.2rem;
    height: 6.2rem;
  }

  .login-card__field {
    width: 100%;
  }

  .login-card__field input {
    min-height: 3.55rem;
  }
}

.admin-login-background-card .form-field {
  margin-bottom: 0;
}

.admin-login-background-grid {
  display: grid;
  gap: 1rem;
}

.admin-login-background-preview {
  margin-top: 0.75rem;
  min-height: 12rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(78, 55, 30, 0.14);
  background:
    radial-gradient(circle at top left, rgba(151, 191, 13, 0.2), transparent 30%),
    linear-gradient(140deg, rgba(250, 248, 238, 0.96), rgba(235, 242, 203, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.admin-login-background-preview img {
  width: 100%;
  height: 100%;
  min-height: 12rem;
  object-fit: cover;
}

.admin-login-background-preview[data-has-image='true'] {
  padding: 0;
}

.admin-login-background-preview[data-has-image='false'] {
  padding: 1rem;
}

.card,
.employee-menu__nav,
.absence-calendar,
.employee-table-wrapper,
.admin-request-log__table-wrapper,
.admin-audit-log__table-wrapper,
.admin-overtime__table-wrapper,
.admin-terminal-devices__table-wrapper,
.time-overview__table-wrapper,
.admin-absence-summary__table-wrapper {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(2, 1, 1, 0.08);
  box-shadow: var(--shadow-md);
  backdrop-filter: none;
}

.card,
.employee-menu__nav {
  border-radius: 1rem;
}

.card h2,
.card h3 {
  color: var(--brand-brown);
  font-weight: 500;
}

.card--dashboard,
.card--dashboard-section {
  position: relative;
  overflow: hidden;
}

.card--dashboard::before,
.card--dashboard-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.25rem;
  background: linear-gradient(90deg, var(--brand-gold), rgba(151, 191, 13, 0.18));
}

.dashboard-value,
.employee-request-balance-card strong,
.admin-absence-summary__balance,
.admin-overtime__balance--positive,
.admin-overtime__balance--negative,
.admin-overtime__balance--neutral {
  font-family: 'Oswald', 'Arial Narrow', 'Roboto Condensed', 'Segoe UI', sans-serif;
  letter-spacing: 0.03em;
}

.dashboard-value {
  font-size: clamp(1.75rem, 2vw, 2.15rem);
  color: var(--brand-brown);
}

.dashboard-grid--compact .card--dashboard {
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.employee-home__action,
.admin-dashboard-item,
.history-list li,
.request-list li,
.employee-request-balance-card,
.admin-times__overtime dl div,
.admin-absence-action__summary,
.employee-request-context,
.note {
  background: var(--surface-muted);
  border-color: rgba(84, 89, 95, 0.15);
}

.stamp-button {
  box-shadow: none;
  border: 1px solid rgba(2, 1, 1, 0.08);
}

.stamp-button[data-stamp-action='start'],
.stamp-button[data-stamp-action='resume'] {
  background: var(--brand-gold);
  color: #020101;
}

.stamp-button[data-stamp-action='pause'] {
  background: #eef5d2;
  color: #5d7f00;
  border-color: rgba(151, 191, 13, 0.5);
}

.stamp-button[data-stamp-action='end'] {
  background: #f7dcd8;
  color: #7f2d24;
  border-color: rgba(180, 64, 52, 0.32);
}

.stamp-status,
.admin-nav__label,
.admin-employee-count,
.cal-header__label {
  color: var(--brand-brown);
}

.employee-menu {
  background: rgba(2, 1, 1, 0.14);
  backdrop-filter: none;
}

.employee-menu__nav {
  width: min(19rem, 100%);
  padding: 1.15rem;
}

.employee-menu__item {
  background: #fff;
  border: 1px solid rgba(2, 1, 1, 0.08);
  color: var(--brand-brown);
  justify-content: flex-start;
}

.employee-menu__item:hover,
.employee-menu__item:focus-visible {
  background: #f6f9eb;
  border-color: rgba(151, 191, 13, 0.45);
  transform: none;
}

.admin-nav {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 1rem;
  border: 1px solid rgba(2, 1, 1, 0.08);
  box-shadow: var(--shadow-sm);
}

.admin-nav__label {
  color: var(--brand-gold);
  letter-spacing: 0.12em;
}

.admin-nav__link {
  color: var(--text-muted);
  border: 1px solid transparent;
}

.admin-nav__link.is-active,
.admin-nav__link:hover {
  background: #f2f7df;
  border-color: rgba(151, 191, 13, 0.35);
  color: var(--brand-brown);
}

.button {
  border: 1px solid rgba(2, 1, 1, 0.14);
  background: #fff;
  color: var(--brand-brown);
  box-shadow: none;
}

.button:hover {
  background: #f6f9eb;
  border-color: rgba(151, 191, 13, 0.4);
}

.button--primary {
  background: var(--brand-gold);
  color: #020101;
  border-color: rgba(151, 191, 13, 0.9);
  box-shadow: none;
}

.button--primary:hover {
  background: #a9cf2a;
}

.button--ghost,
.button--subtle,
.file-upload {
  background: #fff;
  border-color: rgba(2, 1, 1, 0.12);
  color: var(--text-muted);
}

.button--approve {
  background: #eef5d2;
  border-color: rgba(151, 191, 13, 0.5);
  color: #5d7f00;
}

.button--reject {
  background: #f8e4e1;
  border-color: rgba(180, 64, 52, 0.45);
  color: var(--danger);
}

.button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(151, 191, 13, 0.35);
  outline-offset: 2px;
}

label,
.admin-times__filters label,
.admin-request-log__filters label,
.admin-audit-log__filter-grid label,
.admin-overtime__filter-grid label,
.admin-times__editor-grid label,
.form-field label {
  color: var(--text);
}

input,
textarea,
select,
.admin-times__filters select,
.admin-times__filters input[type='date'],
.admin-times__editor-grid input,
.admin-times__editor-grid textarea {
  background: #fff;
  border: 1px solid rgba(84, 89, 95, 0.25);
  color: var(--text);
  box-shadow: none;
}

.tab-group {
  background: #eef2e4;
  border: 1px solid rgba(151, 191, 13, 0.2);
}

.tab-group button {
  color: var(--text-muted);
}

.tab-group button.is-active {
  background: #fff;
  color: var(--brand-brown);
  box-shadow: var(--shadow-sm);
}

.absence-calendar,
.cal-cell,
.employee-table,
.admin-request-log__table,
.admin-audit-log__table,
.admin-overtime__table,
.admin-absence-summary__table,
.time-overview table {
  background: #fff;
}

.cal-cell {
  border-color: rgba(84, 89, 95, 0.18);
}

.cal-cell--holiday {
  background: #f6f9eb;
  border-color: rgba(151, 191, 13, 0.35);
}

.cal-cell--outside {
  background: #f5f6f2;
}

.cal-cell__holiday,
.time-overview__badge,
.time-overview__badge--long {
  background: #eef5d2;
  color: #5d7f00;
}

.absence-pill {
  background: var(--brand-gold);
  color: #020101;
}

.absence-pill.absence-pill--type-vacation {
  background: #97bf0d;
  color: #102400;
}

.absence-pill.absence-pill--type-sick {
  background: #f4b267;
  color: #4f2b00;
}

.absence-pill.absence-pill--type-compensation {
  background: #7bb6d9;
  color: #0b2b40;
}

.absence-pill.absence-pill--type-exchange-day {
  background: #c7b5ff;
  color: #26144d;
}

.absence-pill.absence-pill--type-offset-free {
  background: #8dd3c7;
  color: #073a34;
}

.absence-pill.absence-pill--type-educational-leave {
  background: #ffd166;
  color: #5c3a00;
}

.absence-pill.absence-pill--type-training-leave {
  background: #ff9f80;
  color: #5e1800;
}

.absence-pill.absence-pill--type-child-sick {
  background: #f28482;
  color: #4a1110;
}

.absence-pill--pending {
  opacity: 0.42;
}

.absence-pill--rejected {
  background: #ececec;
  color: var(--text-muted);
}

.absence-legend__swatch--pending {
  opacity: 0.42;
}

.absence-legend__swatch--rejected {
  opacity: 0.28;
  background: #ececec;
  border-color: rgba(84, 89, 95, 0.18);
}

@media (max-width: 720px) {
  .admin-times__filters,
  .admin-times__filters.employee-times__filters {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    width: 100%;
  }

  .admin-times__filters label,
  .admin-times__filters.employee-times__filters label,
  .admin-times__filters input[type='date'],
  .admin-times__filters.employee-times__filters input[type='date'],
  .admin-times__filters select,
  .admin-times__filters.employee-times__filters select {
    min-width: 0;
    width: 100%;
    inline-size: 100%;
    max-width: 100%;
  }

  .admin-times__filters-card {
    padding-inline: 1rem;
    overflow-x: hidden;
  }

  .absence-legend {
    gap: 0.35rem 0.7rem;
  }

  .absence-legend__item {
    font-size: 0.68rem;
  }

  .absence-legend__swatch {
    width: 0.8rem;
    height: 0.8rem;
  }

  .cal-cell {
    min-height: 5.3rem;
    padding: 0.32rem;
  }

  .cal-cell__holiday {
    display: none;
  }

  .cal-cell__pills {
    gap: 0.2rem;
  }

  .absence-pill {
    min-height: 1.55rem;
    padding: 0.18rem 0.38rem;
    font-size: 0.66rem;
    line-height: 1;
    text-align: center;
    justify-content: center;
  }

  .absence-pill__full {
    display: none;
  }

  .absence-pill__short {
    display: inline;
    font-family: 'Oswald', 'Arial Narrow', 'Roboto Condensed', 'Segoe UI', sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
  }
}

.time-overview thead th,
.employee-table thead th,
.admin-absence-summary__table thead th {
  background: #f1f6de;
  color: var(--brand-brown);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.74rem;
}

.time-overview th,
.time-overview td,
.employee-table th,
.employee-table td,
.admin-request-log__table th,
.admin-request-log__table td,
.admin-audit-log__table th,
.admin-audit-log__table td,
.admin-overtime__table th,
.admin-overtime__table td,
.admin-absence-summary__table th,
.admin-absence-summary__table td {
  border-bottom-color: rgba(84, 89, 95, 0.14);
}

.time-overview tbody tr:nth-child(even):not(.urlaub):not(.feiertag):not(.krank):not(.derived-absence),
.employee-table tbody tr:nth-child(even),
.admin-request-log__table tbody tr:nth-child(even),
.admin-audit-log__table tbody tr:nth-child(even),
.admin-overtime__table tbody tr:nth-child(even),
.admin-absence-summary__table tbody tr:nth-child(even) {
  background: #fafbf7;
}

.time-overview tbody tr.open-entry,
.admin-request-log__row:hover,
.employee-table tbody tr:hover,
.admin-audit-log__table tbody tr:hover,
.admin-overtime__table tbody tr:hover,
.admin-absence-summary__table tbody tr:hover {
  background: #f6f9eb;
}

.time-overview tbody tr.weekend {
  background: #f5f6f2;
}

.time-overview tbody tr.request-pending {
  background: #f5f9df;
}

.time-overview tbody tr.urlaub,
.time-overview tbody tr.derived-absence {
  background: #eef5d2;
  color: var(--text);
  font-style: normal;
}

.time-overview tbody tr.feiertag {
  background: #edf2f2;
}

.time-overview tbody tr.krank {
  background: #f7e8e1;
}

.time-overview tfoot tr,
.admin-times__summary,
.admin-times__feedback[data-variant='info'] {
  background: #f5f6f2;
}

.time-overview__status--leave {
  background: #eef5d2;
  border-color: rgba(151, 191, 13, 0.4);
  color: #5d7f00;
}

.time-overview__status--open,
.time-overview__status--idle {
  background: #f5f6f2;
  border-color: rgba(84, 89, 95, 0.2);
  color: var(--text-muted);
}

.time-overview__status--request {
  background: #f4f8e2;
  border-color: rgba(151, 191, 13, 0.4);
  color: #5d7f00;
}

.status-card[data-state='ok'] {
  background: #eef5d2;
  border-color: rgba(151, 191, 13, 0.25);
  color: #5d7f00;
}

.status-card[data-state='warning'] {
  background: #f5f6f2;
  border-color: rgba(84, 89, 95, 0.18);
  color: var(--text-muted);
}

.status-card[data-state='idle'] {
  background: #fff;
  border-color: rgba(84, 89, 95, 0.16);
}

.session-banner {
  background: #f8e4e1;
  border: 1px solid rgba(180, 64, 52, 0.2);
}

.session-banner--warning {
  background: #eef5d2;
  border-color: rgba(151, 191, 13, 0.28);
  color: #5d7f00;
}

.note,
.form-note,
.form-note-inline,
.request-item__meta,
.admin-dashboard-item__meta,
.empty {
  color: var(--text-muted);
}

.app-footer {
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(2, 1, 1, 0.08);
}

@media (min-width: 960px) {
  .app-main {
    padding: 2.25rem 2.75rem 3rem;
  }

  .admin-nav {
    top: 5.75rem;
    width: 15rem;
  }
}

@media (max-width: 959px) {
  .app-header {
    padding-top: 1.15rem;
  }

  .header-actions {
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  .app-main {
    padding: 1rem;
  }

  .app-header {
    gap: 0.85rem;
    padding: 1rem 1rem 0.9rem;
  }

  .branding {
    width: 100%;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  body[data-active-role='employee'] .header-actions {
    justify-content: flex-end;
  }

  .employee-toolbar {
    width: 100%;
  }

  .app-title {
    font-size: 1.25rem;
  }

  .app-subtitle {
    font-size: 0.72rem;
  }
}

/* Employee mobile refinement overrides */
body[data-active-role='employee'] .employee-toolbar {
  display: none;
}

body[data-active-role='employee'] .header-actions .button[data-action='logout'] {
  display: none;
}

body[data-active-role='employee'] .menu-button--employee {
  display: inline-flex;
}

body[data-active-role='employee'] .status-badge[data-network-status] {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.15rem;
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
}

body[data-active-role='employee'] .status-badge[data-network-status]::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.72rem;
  height: 0.72rem;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--brand-gold);
  box-shadow: 0 0 0 0.22rem rgba(151, 191, 13, 0.2);
}

body[data-active-role='employee'] .status-badge.offline[data-network-status]::before {
  background: var(--danger);
  box-shadow: 0 0 0 0.22rem rgba(180, 64, 52, 0.16);
}

body[data-active-role='employee'] .sync-alert {
  display: none !important;
}

body[data-active-role='employee'] .app-footer {
  padding-bottom: 6rem;
}

@media (max-width: 720px) {
  .terminal-view {
    padding: calc(env(safe-area-inset-top, 0px) + 0.75rem) 0.85rem 1.5rem;
  }

  .terminal-view__header {
    padding-top: 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .terminal-roster__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }

  .terminal-card .terminal-profile__ring {
    width: 7.2rem;
    height: 7.2rem;
  }

  .terminal-card__name {
    font-size: 0.95rem;
  }

  .terminal-stamp__card {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .terminal-stamp__buttons {
    grid-template-columns: minmax(0, 1fr);
  }

  .terminal-profile__ring {
    width: 10.5rem;
    height: 10.5rem;
  }

  .time-overview__table-wrapper {
    display: none;
  }

  .time-overview__mobile-list {
    display: grid;
    gap: 0.85rem;
  }

  .time-overview__card {
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    overflow: hidden;
  }

  .time-overview__card.long-day {
    box-shadow: inset 4px 0 0 #f59e0b;
  }

  .time-overview__card--day-break {
    border-top: 0.3rem solid rgba(78, 55, 30, 0.16);
  }

  .time-overview__card-summary {
    list-style: none;
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    cursor: pointer;
  }

  .time-overview__card-summary::-webkit-details-marker {
    display: none;
  }

  .time-overview__card-headline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .time-overview__card-date {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
  }

  .time-overview__card-date strong {
    font-size: 1rem;
    line-height: 1.2;
  }

  .time-overview__card-date span {
    color: var(--text-muted);
    font-size: 0.8rem;
  }

  .time-overview__card-status {
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
  }

  .time-overview__card-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .time-overview__card-metric {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
  }

  .time-overview__card-metric:first-child {
    grid-column: 1 / -1;
  }

  .time-overview__card-metric span {
    color: var(--text-muted);
    font-size: 0.75rem;
  }

  .time-overview__card-metric strong {
    font-size: 0.96rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
  }

  .time-overview__card-metric .time-overview__badge {
    align-self: flex-start;
    margin-left: 0;
    margin-top: 0.2rem;
  }

  .time-overview__card-chevron {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.25rem;
    color: var(--text-muted);
    transform: rotate(90deg);
    transition: transform 0.2s ease;
  }

  .time-overview__card {
    position: relative;
  }

  .time-overview__card[open] .time-overview__card-chevron {
    transform: rotate(270deg);
  }

  .time-overview__card-body {
    display: grid;
    gap: 0.9rem;
    padding: 0 1rem 1rem;
    border-top: 1px solid rgba(78, 55, 30, 0.08);
  }

  .time-overview__card-details {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
    padding-top: 0.9rem;
  }

  .time-overview__card-details div {
    min-width: 0;
  }

  .time-overview__card-details dt {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.74rem;
  }

  .time-overview__card-details dd {
    margin: 0.2rem 0 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  .time-overview__card-details dd .time-overview__pause-panel {
    margin-top: 0.35rem;
    min-width: 0;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.82);
  }

  .time-overview__card-details div:last-child {
    grid-column: 1 / -1;
  }

  .time-overview__card .time-overview__actions {
    justify-content: stretch;
    gap: 0.65rem;
    flex-wrap: wrap;
  }

  .time-overview__card .time-overview__action-button {
    min-width: 3rem;
    width: auto;
    padding-inline: 0.8rem;
  }

  .time-overview__summary-card {
    display: block;
  }

  .time-overview__summary-card dl {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  body[data-active-role='employee'] .app-header {
    padding: calc(env(safe-area-inset-top, 0px) + 1rem) 1.1rem 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'branding'
      'actions';
    align-items: start;
    gap: 0.8rem;
  }

  body[data-active-role='employee'] .branding {
    grid-area: branding;
    width: 100%;
    min-width: 0;
    align-items: center;
    gap: 0.8rem;
  }

  body[data-active-role='employee'] .branding__logo {
    width: 4.2rem;
    height: 4.2rem;
    flex: 0 0 auto;
  }

  body[data-active-role='employee'] .branding__text {
    min-width: 0;
  }

  body[data-active-role='employee'] .app-title {
    font-size: 1.6rem;
    line-height: 1.02;
    letter-spacing: 0.03em;
    word-break: keep-all;
  }

  body[data-active-role='employee'] .app-subtitle {
    font-size: 0.82rem;
    letter-spacing: 0.14em;
    white-space: normal;
  }

  body[data-active-role='employee'] .header-actions {
    grid-area: actions;
    width: 100%;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
    margin-left: 0;
  }

  body[data-active-role='employee'] .app-main {
    padding: 1.2rem 1rem 7.5rem;
  }

  body[data-active-role='employee'] .status-badge[data-network-status] {
    font-size: 0.98rem;
  }
}
