:root {
  --blue-950: #102a43;
  --blue-800: #174e73;
  --blue-600: #1479b8;
  --blue-100: #e8f3fa;
  --slate-900: #18212b;
  --slate-600: #64748b;
  --slate-300: #cbd5e1;
  --slate-100: #f1f5f9;
  --white: #fff;
  --success: #16804c;
  --danger: #b42318;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--slate-900);
  background: #f5f7fa;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(140deg, var(--blue-950), var(--blue-600));
}

.login-card {
  width: min(410px, 100%);
  padding: 36px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 24px 70px rgb(0 0 0 / 24%);
  text-align: center;
}

.login-card h1 { margin: 18px 0 4px; }
.login-card > p { margin: 0 0 28px; color: var(--slate-600); }
.login-card form {
  text-align: left;
}
.login-logo {
  display: block;
  width: min(140px, 42%);
  height: auto;
  margin: 0 auto 8px;
  border-radius: 10px;
  background: #000;
  box-shadow: 0 8px 24px rgb(15 23 42 / 18%);
}
.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: var(--blue-600);
  font-weight: 800;
}
.brand-mark.small { width: 36px; height: 36px; border-radius: 9px; }
.brand-logo {
  width: 44px;
  height: 52px;
  flex-shrink: 0;
  object-fit: contain;
  object-position: center;
  padding: 3px;
  border-radius: 8px;
  background: #000;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 12%);
}
.brand-title {
  line-height: 1.15;
  letter-spacing: .01em;
  white-space: normal;
  font-size: 0.95rem;
}
.brand {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 2px 8px;
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
  transition: grid-template-columns .2s ease;
}
.app-shell.sidebar-collapsed { grid-template-columns: 64px 1fr; }
.sidebar {
  position: sticky;
  top: 0;
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  color: var(--white);
  background: var(--blue-950);
  overflow: hidden;
  transition: padding .2s ease;
}
.app-shell.sidebar-collapsed .sidebar { padding-inline: 10px; }
.app-shell.sidebar-collapsed .brand,
.app-shell.sidebar-collapsed #navigation,
.app-shell.sidebar-collapsed #employee-navigation,
.app-shell.sidebar-collapsed .sidebar-user { display: none; }
#navigation { display: grid; gap: 6px; }
#navigation a {
  padding: 11px 12px;
  border-radius: 8px;
  color: #dbe8f1;
  text-decoration: none;
}
#navigation a:hover, #navigation a.active { color: var(--white); background: rgb(255 255 255 / 11%); }

.nav-modules {
  display: grid;
  gap: 8px;
  margin: 10px 0 4px;
  padding: 10px 0 8px;
  border-top: 1px solid rgb(255 255 255 / 14%);
  border-bottom: 1px solid rgb(255 255 255 / 14%);
}
.nav-modules-label,
.nav-module-heading {
  margin: 0;
  padding: 0 4px;
  color: #8eabc0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-modules-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.nav-module-button {
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 8px;
  background: rgb(255 255 255 / 4%);
  color: #dbe8f1;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 10px 4px;
  cursor: pointer;
}
.nav-module-button:hover {
  color: var(--white);
  background: rgb(255 255 255 / 10%);
}
.nav-module-button.active {
  color: var(--white);
  background: rgb(56 189 248 / 22%);
  border-color: rgb(56 189 248 / 45%);
}
.nav-module-menu {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}
.module-placeholder-card .module-placeholder-body {
  padding: 4px 2px 8px;
}
.nav-group summary {
  padding: 11px 12px;
  border-radius: 8px;
  color: #dbe8f1;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after {
  content: "›";
  float: right;
  transition: transform .15s ease;
}
.nav-group[open] summary::after { transform: rotate(90deg); }
.nav-group summary:hover, .nav-group[open] summary { color: var(--white); background: rgb(255 255 255 / 7%); }
.nav-submenu {
  display: grid;
  gap: 4px;
  margin: 5px 0 2px 12px;
  padding-left: 8px;
  border-left: 1px solid rgb(255 255 255 / 18%);
}
#navigation .nav-submenu a { padding: 9px 11px; }

.punch-portal-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, #d7e8f5 0%, transparent 42%),
    linear-gradient(160deg, #f4f8fb 0%, #e7eef5 100%);
}
.punch-portal {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.punch-card {
  width: min(440px, 100%);
  padding: 28px 24px;
  border: 1px solid var(--slate-300);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 18px 40px rgb(15 23 42 / 8%);
}
.punch-card h1 { margin: 8px 0 4px; font-size: 1.55rem; }
.punch-card > p { margin: 0 0 18px; color: var(--slate-600); }
.punch-app-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}
.punch-kicker {
  margin: 0;
  color: var(--blue-600);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.punch-meta { margin: 4px 0 0; color: var(--slate-600); font-size: .88rem; }
.punch-clock {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 12px;
  background: #f5f8fb;
  text-align: center;
}
.punch-clock strong {
  font-size: 2rem;
  letter-spacing: .02em;
}
.punch-clock span {
  color: var(--slate-600);
  font-size: .9rem;
  text-transform: capitalize;
}
.punch-action {
  width: 100%;
  min-height: 52px;
  font-size: 1rem;
}
.punch-today { margin-top: 22px; }
.punch-today h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}
.punch-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.punch-list li {
  padding: 10px 12px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: #fbfcfd;
}
.punch-list .empty {
  border-style: dashed;
  color: var(--slate-600);
  text-align: center;
}

.portal-home-card .punch-action { max-width: 420px; }
.employee-portal-shell .sidebar-menu-toggle {
  border-color: rgb(255 255 255 / 28%);
  color: var(--white);
  background: transparent;
}
.employee-portal-shell .sidebar-menu-toggle span { background: currentColor; }
#employee-menu-toggle-mobile { display: none; margin-bottom: 12px; }

@media (max-width: 860px) {
  .employee-portal-shell,
  .employee-portal-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }
  .employee-portal-shell .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    height: 100vh;
    z-index: 40;
    transform: translateX(-105%);
    transition: transform .2s ease;
  }
  .employee-portal-shell.portal-drawer-open .sidebar {
    transform: translateX(0);
  }
  .employee-portal-shell.portal-drawer-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgb(15 23 42 / 45%);
  }
  .employee-portal-shell .sidebar-menu-toggle { display: none; }
  .employee-portal-shell .brand,
  .employee-portal-shell #employee-navigation,
  .employee-portal-shell .sidebar-user { display: grid; }
  .employee-portal-shell .content { padding: 16px; }
  #employee-menu-toggle-mobile { display: inline-grid; }
}

.sidebar-user { margin-top: auto; display: grid; gap: 4px; padding: 16px 8px 4px; border-top: 1px solid rgb(255 255 255 / 14%); }
.sidebar-user span { color: #a8c0d2; font-size: .82rem; }
.link-button { width: fit-content; padding: 8px 0 0; border: 0; color: var(--white); background: none; cursor: pointer; text-decoration: underline; }

.content { min-width: 0; padding: 24px 30px 48px; }
.menu-toggle {
  width: 42px;
  height: 38px;
  display: grid;
  align-content: center;
  gap: 5px;
  margin-bottom: 16px;
  padding: 8px 10px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  color: var(--blue-950);
  background: var(--white);
  cursor: pointer;
}
.menu-toggle:hover { background: #eef4f8; }
.menu-toggle span { height: 2px; border-radius: 2px; background: currentColor; }
.sidebar .menu-toggle {
  flex: 0 0 40px;
  width: 40px;
  margin: 0;
  color: var(--white);
  border-color: rgb(255 255 255 / 25%);
  background: transparent;
}
.sidebar .menu-toggle:hover { background: rgb(255 255 255 / 11%); }
.topbar { margin-bottom: 18px; }
.topbar h1 { margin: 3px 0 0; font-size: 1.55rem; }
.eyebrow { color: var(--blue-600); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.card { padding: 20px; border: 1px solid #e4e9ef; border-radius: 10px; background: var(--white); box-shadow: 0 3px 14px rgb(15 23 42 / 5%); }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.card-header h2 { margin: 0; font-size: 1.05rem; }
.card-header p { margin: 4px 0 0; color: var(--slate-600); font-size: .86rem; }
.header-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.csv-actions {
  position: relative;
}
.csv-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}
.csv-menu.hidden { display: none; }
.csv-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  font: inherit;
}
.csv-menu button:hover { background: #f1f5f9; }
.list-header-actions,
.employee-header-actions { display: grid; justify-items: end; gap: 8px; }
.list-header-actions .inline-field,
.employee-header-actions .inline-field { display: flex; gap: 8px; align-items: center; }
.list-header-actions .inline-field input,
.employee-header-actions .inline-field input { min-width: 280px; }
.employee-header-actions .inline-field select { min-width: 145px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat-card { padding: 18px; border: 1px solid #dce5ec; border-radius: 8px; background: #fbfdff; }
.stat-card span { display: block; color: var(--slate-600); font-size: .8rem; }
.stat-card strong { display: block; margin-top: 8px; color: var(--blue-800); font-size: 1.75rem; }

.stack { display: grid; gap: 15px; }
label { display: grid; gap: 6px; color: #334155; font-size: .82rem; font-weight: 700; }
label small { color: var(--slate-600); font-size: .72rem; font-weight: 400; }
input, select, textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--slate-300); border-radius: 7px; color: var(--slate-900); background: var(--white); }
input:focus, select:focus { outline: 2px solid #b8ddf3; border-color: var(--blue-600); }
.form-panel { margin-bottom: 20px; padding: 18px; border: 1px solid #dce5ec; border-radius: 8px; background: var(--slate-100); }
.form-panel h3, .form-panel h4 { margin: 0 0 14px; }
.form-tabs { display: flex; flex-wrap: wrap; gap: 5px; border-bottom: 1px solid var(--slate-300); }
.form-tab {
  padding: 9px 13px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--slate-600);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}
.form-tab.active { color: var(--blue-800); border-bottom-color: var(--blue-600); }
.employee-tab-panel { display: grid; gap: 14px; padding-top: 4px; }
.employee-registration-fixed {
  display: grid;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--slate-300);
}
.employee-registration-fixed h4 { margin: 0; }
.employee-registration-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.employee-registration-grid .absence-date-field.hidden,
.employee-registration-fixed .absence-policy-help.hidden {
  display: none !important;
}
.employee-registration-fixed .absence-policy-help {
  grid-column: 1 / -1;
}
.form-help { margin: 0; color: var(--slate-600); font-size: .82rem; }
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: #f8fafc;
}
.checkbox-field input { margin-top: 3px; }
.checkbox-field span { color: #334155; font-size: .9rem; line-height: 1.35; }
.checkbox-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: #fff;
}
.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 500;
}
.checkbox-list .empty {
  color: var(--slate-600);
  font-size: .85rem;
}
.flow-section {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--slate-300);
  border-radius: 10px;
  background: #f8fafc;
}
.flow-section legend {
  padding: 0 6px;
  font-weight: 600;
  color: #0f172a;
}
.flow-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.flow-events-grid .checkbox-field {
  margin-bottom: 0;
}
.flow-stages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.flow-stages-header legend {
  float: none;
  padding: 0;
}
.flow-stages-list {
  display: grid;
  gap: 12px;
}
.flow-stage-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: #fff;
}
.flow-stage-card-header {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.flow-stage-card-header label {
  flex: 1;
  margin: 0;
}
.flow-stage-approvers {
  max-height: 180px;
}
.department-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: #fff;
}
.department-tags.hidden {
  display: none;
}
.department-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 10px;
  border: 1px solid var(--slate-300);
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: .85rem;
  font-weight: 600;
}
.department-tag button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: .9rem;
  line-height: 1;
}
.department-tag button:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.department-picker {
  display: grid;
  gap: 10px;
}
.department-picker-label {
  font-weight: 600;
  color: #334155;
  font-size: .9rem;
}
.department-picker-field {
  position: relative;
}
.department-picker-trigger {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
}
.department-picker-trigger:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.department-picker-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 2px;
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}
.department-picker-menu.hidden { display: none; }
.department-picker-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  font: inherit;
}
.department-picker-option:hover {
  background: #f1f5f9;
}
.department-picker-empty {
  margin: 0;
  padding: 10px 12px;
  color: var(--slate-600);
  font-size: .85rem;
}
.compensation-history { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--slate-300); }
.credential-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dce5ec;
  border-radius: 8px;
  background: var(--white);
}
.credential-section h4 { margin-bottom: 5px; }
.credential-count { display: block; color: var(--blue-800); font-size: 2rem; }
.employee-form-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: start;
}
.employee-photo-card {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.employee-photo-preview {
  width: 160px;
  height: 160px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--slate-300);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--slate-600);
  font-size: .82rem;
  text-align: center;
}
.employee-photo-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.employee-photo-actions { display: flex; gap: 8px; }
.photo-icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}
.photo-icon-button svg { width: 20px; height: 20px; fill: var(--blue-800); }
.photo-icon-button:hover { background: #eef4f8; }
.photo-icon-button.danger svg { fill: var(--danger); }
.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(15 23 42 / 55%);
}
.camera-dialog {
  width: min(480px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 10px;
  background: var(--white);
}
.camera-dialog video {
  width: 100%;
  border-radius: 8px;
  background: #0f172a;
}
@media (max-width: 1100px) {
  .employee-registration-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .employee-form-layout { grid-template-columns: 1fr; }
  .employee-photo-card { position: static; justify-items: start; }
  .employee-registration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .employee-registration-grid {
    grid-template-columns: 1fr;
  }
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.form-grid .full-width { grid-column: 1 / -1; }
.actions { display: flex; gap: 8px; }
.button { padding: 9px 14px; border: 1px solid var(--slate-300); border-radius: 7px; cursor: pointer; font-weight: 700; background: var(--white); }
.button.primary { border-color: var(--blue-600); color: var(--white); background: var(--blue-600); }
.button.secondary { color: #334155; background: var(--white); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
th, td { padding: 11px 10px; border-bottom: 1px solid #e8edf2; text-align: left; }
th { color: #475569; background: #f8fafc; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.badge { display: inline-flex; padding: 3px 8px; border-radius: 999px; background: var(--blue-100); color: var(--blue-800); font-size: .75rem; font-weight: 800; }
.badge.inactive { color: var(--danger); background: #fee4e2; }
.message { margin-bottom: 15px; padding: 10px 12px; border-radius: 7px; background: #e8f7ef; color: var(--success); }
.message.error { background: #fee4e2; color: var(--danger); }
.message.warning { border: 1px solid #f4d38a; background: #fff8e6; color: #855b00; }
.empty { padding: 24px; text-align: center; color: var(--slate-600); }
.toolbar { display: flex; align-items: end; gap: 8px; margin-bottom: 16px; }
.toolbar input { max-width: 430px; }
.employee-list-toolbar,
.list-toolbar { justify-content: space-between; align-items: center; }
.per-page-field { display: flex; align-items: center; gap: 5px; font-weight: 400; }
.per-page-field select { width: auto; padding: 6px 8px; }
.inline-field { min-width: 220px; }
.button.small { padding: 6px 9px; font-size: .76rem; }
.button.danger { border-color: #f5b7b1; color: var(--danger); background: #fff5f4; }
.table-actions { display: flex; gap: 6px; white-space: nowrap; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.pagination span { color: var(--slate-600); font-size: .8rem; }
.employees-footer,
.list-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.employees-footer > span,
.list-footer > span { color: var(--slate-600); font-size: .8rem; }
.employees-footer .pagination,
.list-footer .pagination { margin-top: 0; }
.pagination .pagination-page { min-width: 32px; padding-inline: 8px; }
.pagination .pagination-page.active {
  color: var(--white);
  border-color: var(--blue-600);
  background: var(--blue-600);
}

.card-subtitle { margin: 4px 0 0; color: var(--slate-600); font-size: .88rem; font-weight: 500; }
.schedule-module-main .card-header { margin-bottom: 14px; }
.schedule-list-filters { margin-bottom: 12px; }
.schedule-periods-panel {
  margin-top: 4px;
  padding: 14px;
  border: 1px solid #dce5ec;
  border-radius: 8px;
  background: var(--white);
}
.schedule-periods-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.schedule-periods-header h4 { margin: 0 0 4px; }
.schedule-periods-header p { margin: 0; color: var(--slate-600); font-size: .82rem; }
.schedule-periods-table { display: grid; gap: 6px; }
.schedule-periods-row {
  display: grid;
  grid-template-columns: 40px repeat(4, minmax(72px, 88px)) minmax(70px, 82px) 64px;
  gap: 6px;
  align-items: center;
  justify-content: start;
}
.schedule-periods-head {
  color: #475569;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.schedule-day-name { font-weight: 700; color: var(--blue-800); font-size: .82rem; }
.schedule-day-total {
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}
.schedule-row-actions {
  display: grid;
  grid-template-columns: 28px 28px;
  gap: 4px;
  justify-content: end;
}
.schedule-row-actions .button.small {
  width: 28px;
  min-width: 28px;
  padding: 4px 0;
  font-size: .78rem;
  line-height: 1;
}
.schedule-row-actions .button.small:disabled {
  opacity: .35;
  cursor: default;
}
.schedule-periods-row .schedule-time-input {
  width: 100%;
  min-width: 0;
  max-width: 88px;
  padding: 6px 8px;
  text-align: center;
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.schedule-weekly-summary {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e8edf2;
}
.schedule-weekly-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #dce5ec;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: .9rem;
}
.schedule-weekly-total.has-hours {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.schedule-weekly-total strong {
  color: var(--blue-800);
  font-size: 1.15rem;
  min-width: 4.5rem;
}
.schedule-weekly-limit { color: var(--slate-600); font-size: .8rem; }

.apuration-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.apuration-total-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: #f8fafc;
}
.apuration-total-item span {
  color: var(--slate-600);
  font-size: .78rem;
}
.apuration-total-item strong {
  color: #0f172a;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.apuration-total-item.balance {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.apuration-total-item.balance strong {
  color: var(--blue-800);
}
.punch-slot-cell {
  vertical-align: top;
}
.punch-slot {
  display: grid;
  gap: 2px;
  min-width: 64px;
}
.punch-planned {
  color: var(--slate-600);
  font-size: .72rem;
  line-height: 1.2;
}
.punch-actual {
  color: #0f172a;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.2;
}
.punch-actual.missing {
  color: #94a3b8;
  font-weight: 600;
}
.punch-slot-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 6px 8px;
  border: 1px dashed transparent;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  font: inherit;
}
.punch-slot-button:hover,
.punch-slot-button:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff;
  outline: none;
}
.punch-slot-button .punch-actual {
  pointer-events: none;
}
.punch-actual.pending {
  color: var(--blue-800);
}
.punch-slot-button.pending {
  border-color: #93c5fd;
  background: #eff6ff;
}
.daily-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.daily-pending-hint {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #f4d38a;
  background: #fff8e6;
  color: #855b00;
  font-size: .86rem;
}
.punch-atestado-area {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  background: #f8fbff;
}
.punch-atestado-area.hidden {
  display: none;
}
.punch-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(15 23 42 / 55%);
}
.punch-edit-modal.hidden {
  display: none;
}
.punch-edit-dialog {
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 10px;
  background: var(--white);
  box-shadow: 0 18px 40px rgb(15 23 42 / 18%);
}
.punch-edit-dialog h3 {
  margin: 0;
  color: #0f172a;
}
.punch-edit-dialog input[readonly] {
  background: #f8fafc;
  color: #334155;
}
.daily-date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--slate-300);
  border-radius: 10px;
  background: #f8fafc;
}
.daily-date-nav strong {
  min-width: 220px;
  text-align: center;
  color: #0f172a;
  font-size: 1rem;
}
.daily-date-nav .button {
  min-width: 42px;
  font-weight: 700;
}
.status-radio-group {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--slate-300);
  border-radius: 8px;
  background: #f8fafc;
}
.status-radio-group legend {
  padding: 0 6px;
  font-weight: 600;
  color: #0f172a;
}
.status-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 16px 0 0;
  font-weight: 500;
}

@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-shell.sidebar-collapsed { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar-user { margin-top: 20px; }
  .content { padding: 20px 14px 36px; }
  .card-header { align-items: flex-start; flex-direction: column; }
  .list-header-actions,
  .employee-header-actions { width: 100%; }
  .list-header-actions .inline-field,
  .employee-header-actions .inline-field { width: 100%; flex-direction: column; }
  .list-header-actions .inline-field input,
  .employee-header-actions .inline-field input,
  .employee-header-actions .inline-field select { min-width: 0; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar input { max-width: none; }
  .employees-footer,
  .list-footer { align-items: flex-start; flex-direction: column; }
}
