﻿:root {
  --bg: #040a1d;
  --bg-soft: #08152f;
  --sidebar: #061735;
  --surface: #0b1f47;
  --surface-strong: #10285b;
  --border: #1d396d;
  --text: #eaf1ff;
  --muted: #9cb1d8;
  --accent: #20a7ff;
  --accent-strong: #1a87dd;
  --success: #29cc78;
  --warn: #f8bc46;
  --danger: #ff7388;
  --radius: 14px;
  --shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
  --lane-height: 560px;
  --shift-pool-sticky-top: 92px;
  --page-gutter: 1rem;
  --panel-padding: 1rem;
  --touch-target: 44px;
}

* {
  box-sizing: border-box;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 18% 8%, #0f2a60, var(--bg) 55%, #020713);
}

body.nav-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul {
  margin: 0.6rem 0;
  padding-left: 1.1rem;
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

input,
button,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #071630;
  color: var(--text);
  border-radius: 10px;
  padding: 0.56rem 0.7rem;
  min-height: var(--touch-target);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 2px solid rgba(32, 167, 255, 0.5);
  outline-offset: 1px;
}

button {
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: linear-gradient(180deg, #25afff, #1a8ce4);
  color: #f6fbff;
  padding: 0.58rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  min-height: var(--touch-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:hover {
  background: linear-gradient(180deg, #2db2ff, #1b7fd0);
}

button.secondary {
  border-color: #2f558d;
  background: #102a58;
  color: #d4e4ff;
}

button.secondary:hover {
  background: #163167;
}

button.danger {
  border-color: #914357;
  color: #ffd8de;
  background: #4f1831;
}

button.danger:hover {
  background: #60203b;
}

.attest-link {
  color: #b9dbff;
  text-decoration: underline;
  font-size: 0.82rem;
}

.attest-link:hover {
  color: #d9ecff;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.login-card {
  width: min(100%, 440px);
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(170deg, rgba(9, 30, 70, 0.96), rgba(5, 19, 45, 0.98));
  box-shadow: var(--shadow);
}

.login-kicker {
  color: #8bc5ff;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.login-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.form-grid {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.75rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: #b5c7e8;
  font-size: 0.93rem;
}

.error {
  min-height: 1.2rem;
  color: var(--danger);
  margin-top: 0.5rem;
}

.hint {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.app-root {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 244px;
  flex: 0 0 244px;
  background: linear-gradient(180deg, #061733, #071428);
  border-right: 1px solid var(--border);
  padding: max(1rem, env(safe-area-inset-top)) 0.8rem max(1rem, env(safe-area-inset-bottom)) 0.8rem;
  display: grid;
  align-content: start;
  gap: 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.brand {
  padding: 0.3rem 0.4rem 0.8rem;
  border-bottom: 1px solid #14305e;
}

.brand-title {
  font-size: 1.02rem;
  font-weight: 700;
}

.brand-sub {
  margin-top: 0.22rem;
  color: #84a2d5;
  font-size: 0.82rem;
}

.side-nav {
  display: grid;
  gap: 0.45rem;
}

.side-nav button {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: #c4d6f7;
  padding: 0.7rem 0.72rem;
  border-radius: 11px;
  font-weight: 600;
}

.side-nav button:hover {
  background: rgba(34, 77, 145, 0.45);
}

.side-nav button.active {
  background: rgba(30, 107, 197, 0.35);
  border-color: #2f63ab;
  color: #eaf5ff;
}

.workspace {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: rgba(5, 16, 39, 0.92);
  backdrop-filter: blur(8px);
  padding: max(0.75rem, env(safe-area-inset-top)) max(var(--page-gutter), env(safe-area-inset-right)) 0.75rem max(var(--page-gutter), env(safe-area-inset-left));
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-main {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.topbar-kicker {
  color: #8fb4ea;
  font-size: 0.8rem;
}

.topbar-main h2 {
  font-size: 1.2rem;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 1.1rem;
  border-color: #33568d;
  background: #10294f;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.week-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.week-controls input {
  min-width: 150px;
}

.content {
  padding: var(--page-gutter);
  padding-left: max(var(--page-gutter), env(safe-area-inset-left));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right));
  padding-bottom: max(calc(var(--page-gutter) + 1rem), env(safe-area-inset-bottom));
  display: grid;
  gap: 1rem;
}

.view-panel {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(12, 31, 70, 0.98), rgba(8, 23, 54, 0.98));
  box-shadow: var(--shadow);
  padding: var(--panel-padding);
  min-width: 0;
  max-width: 100%;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.shift-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: center;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.8rem;
}

#dashboardCards.summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-card {
  border-radius: 12px;
  border: 1px solid #234375;
  background: #0d2654;
  padding: 0.85rem;
}

.summary-card p {
  margin-top: 0.35rem;
}

.metric-ok {
  color: var(--success);
}

.metric-warn {
  color: var(--warn);
}

.metric-missing {
  color: #ff3550;
  font-weight: 700;
}

.legend {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.legend-pill {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.78rem;
  font-weight: 600;
}

.legend-market {
  color: #8dd8ff;
  border-color: #2e7ec2;
  background: rgba(36, 120, 180, 0.22);
}

.legend-metz {
  color: #9ff9cb;
  border-color: #2f996a;
  background: rgba(50, 137, 95, 0.22);
}

.calendar-wrap {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.dashboard-calendar-grid,
.shift-calendar {
  min-width: 930px;
  display: grid;
  grid-template-columns: 72px repeat(6, minmax(118px, 1fr));
  gap: 0.55rem;
}

.dashboard-calendar-mobile {
  display: none;
}

.calendar-time-col,
.calendar-day-col {
  display: grid;
  grid-template-rows: auto var(--lane-height);
  gap: 0.35rem;
}

.calendar-day-head,
.calendar-time-head {
  min-height: 54px;
  border: 1px solid #224171;
  border-radius: 10px;
  background: #102851;
  padding: 0.45rem;
}

.calendar-day-head strong {
  display: block;
  font-size: 0.89rem;
}

.calendar-day-head span {
  color: #96aed8;
  font-size: 0.76rem;
}

.calendar-time-head {
  display: flex;
  align-items: end;
  justify-content: center;
  color: #8ea9d6;
  font-size: 0.72rem;
}

.calendar-time-lane,
.calendar-day-lane {
  position: relative;
  border: 1px solid #224171;
  border-radius: 10px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02) 0,
    rgba(255, 255, 255, 0.02) 39px,
    rgba(153, 180, 228, 0.22) 40px
  );
}

.calendar-time-mark {
  position: absolute;
  left: 0.36rem;
  transform: translateY(-50%);
  color: #8fa8d2;
  font-size: 0.72rem;
}

.appointment {
  position: absolute;
  border-radius: 10px;
  border: 1px solid;
  padding: 0.3rem 0.34rem;
  overflow: auto;
  min-height: 54px;
  font-size: 0.74rem;
  line-height: 1.25;
}

.appointment-head {
  display: flex;
  justify-content: space-between;
  gap: 0.3rem;
  align-items: start;
}

.appointment-head strong {
  display: block;
  font-size: 0.8rem;
  line-height: 1.15;
}

.appointment-time {
  margin: 0.16rem 0 0.2rem;
  font-size: 0.7rem;
  opacity: 0.9;
}

.appointment-supermarkt {
  border-color: #2e88d9;
  background: rgba(34, 137, 214, 0.35);
  color: #daf1ff;
}

.appointment-metzgerei {
  border-color: #2ca46f;
  background: rgba(45, 153, 104, 0.34);
  color: #dcffe9;
}

.appointment-alert {
  border-color: #ff5068 !important;
  background: linear-gradient(180deg, rgba(128, 30, 48, 0.78), rgba(88, 19, 34, 0.8));
  color: #ffecef;
  box-shadow: inset 0 0 0 2px rgba(255, 101, 124, 0.92);
}

.appointment-status {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(215, 234, 255, 0.45);
  border-radius: 999px;
  font-size: 0.66rem;
  line-height: 1;
  padding: 0.17rem 0.34rem;
  white-space: nowrap;
  background: rgba(10, 28, 58, 0.28);
}

.appointment-status.alert {
  border-color: rgba(255, 116, 138, 0.95);
  color: #ffdbe2;
  background: rgba(102, 20, 35, 0.56);
}

.appointment-rows {
  display: grid;
  gap: 0.14rem;
}

.appointment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(213, 233, 255, 0.2);
  border-radius: 7px;
  background: rgba(6, 18, 40, 0.22);
  padding: 0.14rem 0.24rem;
}

.appointment-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appointment-role {
  font-size: 0.66rem;
  white-space: nowrap;
  opacity: 0.92;
}

.appointment-role[class*='skill-'] {
  border-style: solid;
  border-width: 1px;
  border-radius: 999px;
  padding: 0.08rem 0.3rem;
  background-clip: padding-box;
}

.appointment-row.empty .appointment-name {
  font-weight: 500;
  font-style: italic;
  opacity: 0.95;
  color: #ffd6de;
}

.appointment-row.empty {
  border-color: rgba(255, 101, 124, 0.76);
  background: rgba(116, 22, 40, 0.42);
}

.appointment-empty {
  margin: 0.2rem 0 0;
  font-size: 0.7rem;
}

.calendar-empty {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #90a9d4;
  font-size: 0.8rem;
  opacity: 0.85;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.employee-form {
  display: grid;
  gap: 0.85rem;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem;
}

legend {
  color: #bed0ef;
  padding: 0 0.25rem;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.46rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #24477a;
  border-radius: 10px;
  background: #0f2854;
  padding: 0.38rem 0.45rem;
  color: #d4e4ff;
}

.skill-item input {
  width: auto;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid #1c3a6c;
}

th {
  color: #9fbae3;
  font-size: 0.79rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.skill-badge {
  border: 1px solid #2c5e9a;
  border-radius: 999px;
  background: #103060;
  color: #d3e8ff;
  padding: 0.14rem 0.44rem;
  font-size: 0.74rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.dashboard-tabs {
  justify-content: flex-end;
}

.dashboard-tabs button {
  min-width: 120px;
}

.tabs button {
  background: #122c5a;
  border-color: #2b548f;
  color: #d4e5ff;
}

.tabs button.active {
  background: linear-gradient(180deg, #25afff, #1a8ce4);
  border-color: #20a7ff;
  color: #f2f9ff;
}

#shiftControlsPanel {
  position: sticky;
  top: var(--shift-pool-sticky-top);
  z-index: 22;
  background: linear-gradient(180deg, rgba(12, 31, 70, 0.98), rgba(8, 23, 54, 0.98));
}

.shift-plan-panel {
  display: grid;
  gap: 0.62rem;
}

#employeePoolPanel {
  border-top: 1px solid #204779;
  padding-top: 0.5rem;
}

.shift-pool-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.shift-pool-head h3,
.shift-pool-head p {
  margin: 0;
}

.employee-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin-top: 0.45rem;
}

.employee-chip {
  text-align: left;
  border: 1px solid #29548f;
  border-radius: 10px;
  background: #102a58;
  padding: 0.3rem 0.42rem;
  min-width: 150px;
  max-width: 205px;
}

.employee-chip strong {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.32rem;
  font-size: 0.79rem;
  line-height: 1.2;
}

.employee-chip-hours {
  font-size: 0.69rem;
  color: #b5cfef;
  font-weight: 600;
  white-space: nowrap;
}

.employee-chip small {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.16rem;
  font-size: 0.69rem;
}

.employee-chip small span {
  border: 1px solid #2e609d;
  border-radius: 999px;
  padding: 0.08rem 0.28rem;
  font-size: 0.64rem;
}

.employee-chip.active {
  border-color: #5db9ff;
  box-shadow: inset 0 0 0 1px rgba(109, 194, 255, 0.6);
}

.shift-day-lane {
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 24px,
    rgba(153, 180, 228, 0.16) 25px
  );
}

.shift-appointment {
  position: absolute;
  left: 3%;
  width: 94%;
  border: 1px solid #2f6db3;
  border-radius: 10px;
  background: rgba(26, 83, 149, 0.45);
  padding: 0.34rem;
  overflow: auto;
}

.shift-appointment header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
}

.shift-appointment header strong {
  font-size: 0.8rem;
}

.shift-appointment header small {
  color: #c4d9fb;
  font-size: 0.72rem;
}

.shift-alert {
  border-color: #ff3b56;
  background: linear-gradient(180deg, rgba(99, 20, 36, 0.42), rgba(47, 15, 24, 0.38));
  box-shadow: inset 0 0 0 1px rgba(255, 100, 124, 0.7);
}

.coverage-ok,
.coverage-missing {
  margin: 0.32rem 0 0.36rem;
  font-weight: 600;
  font-size: 0.72rem;
}

.coverage-ok {
  color: var(--success);
}

.coverage-missing {
  color: #ff5d73;
}

.drop-slot.empty.required {
  border-color: #ff4864;
  background: rgba(118, 21, 40, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 104, 127, 0.78);
}

.drop-slot.empty.required span,
.drop-slot.empty.required small {
  color: #ffd6de;
}

.slot-board {
  display: grid;
  gap: 0.25rem;
}

.slot-column {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.drop-slot {
  position: relative;
  border: 1px dashed #2f689f;
  border-radius: 8px;
  background: rgba(10, 28, 62, 0.75);
  color: #d4e5ff;
  padding: 0.2rem 0.24rem;
  min-width: 98px;
  min-height: 52px;
  display: grid;
  align-content: start;
  gap: 0.1rem;
}

.drop-slot[class*='skill-'] {
  border-width: 1px;
}

.drop-slot span {
  font-size: 0.65rem;
  color: #9ec0ef;
}

.drop-slot strong {
  font-size: 0.72rem;
  line-height: 1.1;
}

.drop-slot small {
  font-size: 0.64rem;
  color: #8db0de;
}

.drop-slot.filled {
  border-style: solid;
  border-color: #3f83c6;
  background: rgba(28, 93, 164, 0.46);
}

.drop-slot.required {
  box-shadow: inset 0 0 0 1px rgba(117, 188, 255, 0.3);
}

.drop-slot.optional {
  opacity: 0.9;
}

.drop-slot.drag-over {
  border-color: #65c5ff;
  background: rgba(47, 130, 211, 0.42);
}

.drop-slot.holiday-blocked {
  border-color: #b37a2a;
  box-shadow: inset 0 0 0 1px rgba(255, 200, 97, 0.45);
}

.drop-slot.sick-blocked {
  border-color: #b84a55;
  box-shadow: inset 0 0 0 1px rgba(255, 129, 141, 0.45);
}

.drop-slot.parental-blocked {
  border-color: #6e6e6e;
  box-shadow: inset 0 0 0 1px rgba(189, 189, 189, 0.42);
}

.slot-clear {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #7d97bd;
  background: #1b3157;
  color: #d7e7ff;
  line-height: 1;
}

.slot-clear:hover {
  background: #29487d;
}

.sidebar-backdrop {
  display: none;
}

.toast {
  position: fixed;
  right: max(0.9rem, env(safe-area-inset-right));
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  max-width: min(90vw, 360px);
  background: #0f3368;
  color: #e9f4ff;
  border: 1px solid #2f65a6;
  border-radius: 10px;
  padding: 0.58rem 0.78rem;
  box-shadow: var(--shadow);
  z-index: 80;
}

@media (max-width: 980px) {
  :root {
    --page-gutter: 0.85rem;
    --panel-padding: 0.9rem;
    --lane-height: 500px;
    --shift-pool-sticky-top: 138px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -100vw;
    width: 100vw;
    flex-basis: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: left 0.24s ease;
    box-shadow: 14px 0 28px rgba(0, 0, 0, 0.35);
    background:
      radial-gradient(circle at top, rgba(38, 104, 191, 0.28), transparent 34%),
      linear-gradient(180deg, rgba(6, 23, 51, 0.985), rgba(4, 15, 35, 0.99));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  .app-root.sidebar-open .sidebar {
    left: 0;
  }

  .brand {
    text-align: center;
    padding: 0.7rem 0.4rem 1rem;
    border-bottom: 0;
  }

  .side-nav {
    width: 100%;
    max-width: 32rem;
    margin: auto auto;
    gap: 0.8rem;
  }

  .side-nav button {
    justify-content: center;
    text-align: center;
    width: 100%;
    margin-inline: auto;
    min-height: 3.6rem;
    padding: 0.95rem 1.1rem;
    border-radius: 18px;
    border-color: rgba(72, 116, 186, 0.42);
    background: rgba(14, 38, 78, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    font-size: 1rem;
    letter-spacing: 0.01em;
  }

  .side-nav button.active {
    background: linear-gradient(180deg, rgba(43, 175, 255, 0.95), rgba(23, 132, 223, 0.95));
    border-color: rgba(115, 206, 255, 0.95);
    color: #f5fbff;
    box-shadow:
      0 12px 30px rgba(15, 103, 180, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.24);
  }

  .brand-title {
    font-size: 1.2rem;
  }

  .brand-sub {
    margin-top: 0.32rem;
    font-size: 0.88rem;
    color: #a7c7f4;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(2, 8, 20, 0.55);
    z-index: 35;
  }

  .app-root.sidebar-open .sidebar-backdrop {
    display: block;
  }

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

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    display: grid;
    grid-template-columns: 1fr;
  }

  .week-controls {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .week-controls input {
    min-width: 0;
    grid-column: 1 / -1;
    order: -1;
  }

  .content {
    padding-top: 0.75rem;
  }

  .dashboard-calendar-grid,
  .shift-calendar {
    min-width: 760px;
  }

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

  .shift-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  #shiftControlsPanel {
    position: static;
    top: auto;
    z-index: auto;
  }

  .shift-plan-panel {
    gap: 0.9rem;
  }

  .shift-controls {
    align-items: stretch;
  }

  .shift-controls > * {
    width: 100%;
  }

  .shift-nav-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.6rem;
  }

  .fixed-shift-toolbar,
  .fixed-shift-toolbar-shell,
  .fixed-shift-inline-grid {
    display: grid;
    width: 100%;
  }

  .fixed-shift-inline {
    width: 100%;
    display: grid;
    gap: 0.45rem;
    justify-content: stretch;
  }

  .fixed-shift-inline-slots {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .fixed-shift-inline label select {
    min-width: 0;
  }

  #employeePoolPanel {
    border-top: 0;
    padding-top: 0;
  }

  .shift-pool-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.12rem;
    padding-inline: 0.05rem;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tabs button,
  .dashboard-tabs button {
    flex: 0 0 auto;
  }

  #screenTabs,
  #dashboardScreenTabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 0.55rem;
    overflow: visible;
    padding-inline: 0;
  }

  #screenTabs button,
  #dashboardScreenTabs button {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
  }

  .dashboard-tabs {
    justify-content: stretch;
  }
}

@media (max-width: 620px) {
  :root {
    --page-gutter: 0.72rem;
    --panel-padding: 0.82rem;
    --lane-height: 460px;
    --shift-pool-sticky-top: 184px;
  }

  .topbar-main {
    align-items: flex-start;
  }

  .topbar-main h2 {
    font-size: 1.05rem;
  }

  .topbar-kicker {
    font-size: 0.74rem;
  }

  .topbar-actions,
  .shift-controls,
  .shift-nav-actions,
  .employee-detail-head,
  .employee-detail-head-actions,
  .user-row-head,
  .user-row-actions,
  .modal-head,
  .modal-actions,
  .batch-row-head,
  .holiday-plan-day header,
  .entry-list li {
    flex-direction: column;
    align-items: stretch;
  }

  .week-controls button,
  .topbar-actions > button,
  .employee-toolbar > button,
  .shift-nav-actions > button,
  .modal-actions button,
  .user-row-actions button {
    width: 100%;
  }

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

  #dashboardCards.summary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-calendar-grid {
    display: none;
  }

  .dashboard-calendar-mobile {
    display: grid;
    gap: 0.75rem;
  }

  .shift-calendar {
    min-width: 680px;
  }

  .employee-chip {
    min-width: min(74vw, 240px);
    max-width: min(78vw, 280px);
    scroll-snap-align: start;
  }

  .drop-slot {
    min-width: 0;
    width: 100%;
  }

  .slot-row {
    display: grid;
    gap: 0.3rem;
  }

  .appointment-row {
    grid-template-columns: 1fr;
    gap: 0.08rem;
  }

  .appointment-role {
    text-align: left;
  }

  .calendar-wrap {
    overflow: visible;
  }

  .employee-pool {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scroll-snap-type: x proximity;
  }

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

  .holiday-overview,
  .holiday-plan-grid,
  .employee-subgrid,
  .fixed-shift-grid,
  .settings-form,
  .inline-form,
  .user-edit-form,
  .user-row-grid,
  .batch-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    width: 100%;
    max-width: 100%;
    padding-bottom: 0.2rem;
  }

  .detail-table th,
  .detail-table td,
  th,
  td {
    padding: 0.5rem 0.32rem;
    font-size: 0.8rem;
  }

  .application-note-input,
  .holiday-review-note {
    min-width: 0;
    width: 100%;
  }

  .detail-table.compact th {
    width: auto;
  }

  .fixed-shift-inline {
    justify-content: flex-start;
  }

  .rotate-nav-btn {
    white-space: normal;
  }

  .dashboard-mobile-shift-head {
    flex-direction: column;
    align-items: stretch;
  }

  .shift-plan-panel,
  #shiftTabsPanel {
    border-radius: 18px;
  }

  #shiftControlsPanel,
  #shiftTabsPanel,
  .shift-overview-root,
  .shift-board-grid,
  .fixed-shift-toolbar,
  .fixed-shift-toolbar-shell,
  .fixed-shift-inline-grid,
  .fixed-shift-inline,
  .shift-controls,
  .shift-nav-actions,
  #employeePoolPanel,
  .table-wrap,
  .user-row-grid,
  .inline-form {
    min-width: 0;
    max-width: 100%;
  }

  .shift-controls,
  #employeePoolPanel {
    border: 1px solid rgba(48, 88, 144, 0.72);
    border-radius: 16px;
    background: rgba(8, 24, 53, 0.58);
    padding: 0.75rem;
  }

  .employee-pool {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    overflow: visible;
    scroll-snap-type: none;
    width: 100%;
  }

  .employee-chip {
    min-width: 0;
    max-width: none;
    width: 100%;
    padding: 0.6rem 0.68rem;
    border-radius: 14px;
  }

  .employee-chip strong {
    gap: 0.5rem;
    font-size: 0.88rem;
  }

  .employee-chip small {
    gap: 0.28rem;
    font-size: 0.74rem;
  }

  .shift-overview-root {
    gap: 1rem;
  }

  .shift-day-block {
    padding: 0.8rem;
    border-radius: 16px;
    gap: 0.7rem;
    min-width: 0;
  }

  .shift-day-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .shift-day-head strong {
    font-size: 0.98rem;
  }

  .shift-card {
    padding: 0.72rem;
    border-radius: 14px;
    gap: 0.55rem;
  }

  .shift-card header {
    flex-direction: column;
    align-items: flex-start;
  }

  .shift-card header strong {
    font-size: 0.9rem;
  }

  .shift-card header small {
    font-size: 0.78rem;
  }

  .shift-code {
    font-size: 0.72rem;
  }

  .slot-column {
    gap: 0.35rem;
    border: 1px solid rgba(56, 101, 164, 0.62);
    border-radius: 12px;
    background: rgba(7, 21, 48, 0.42);
    padding: 0.55rem;
    min-width: 0;
  }

  .slot-label {
    font-size: 0.8rem;
  }

  .drop-slot {
    min-height: 64px;
    padding: 0.42rem 0.46rem;
    border-radius: 10px;
    gap: 0.16rem;
  }

  .drop-slot span {
    font-size: 0.7rem;
  }

  .drop-slot strong {
    font-size: 0.78rem;
  }

  .drop-slot small {
    font-size: 0.7rem;
  }

  .slot-clear {
    width: 24px;
    height: 24px;
    font-size: 0.9rem;
  }

  .modal {
    place-items: end stretch;
    padding: max(0.5rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-right)) max(0.5rem, env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
  }

  .modal-card,
  .slot-picker-card {
    width: 100%;
    max-height: min(88vh, 760px);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 0.9rem;
  }
}

.employee-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.holiday-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}

.holiday-row {
  border: 1px solid #274980;
  border-radius: 10px;
  background: #102a57;
  padding: 0.55rem 0.65rem;
  display: grid;
  gap: 0.24rem;
}

.employee-split-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  align-items: start;
}

.employee-list-window,
.employee-detail-window {
  border: 1px solid #274d89;
  border-radius: 12px;
  background: #0f2959;
  padding: 0.75rem;
  display: grid;
  gap: 0.65rem;
}

.employee-list-window h4,
.employee-detail-window h4 {
  margin: 0;
}

.employee-list-controls {
  display: grid;
  gap: 0.45rem;
}

.shift-pool-controls {
  margin-top: 0.45rem;
}

.employee-list-controls input {
  min-width: 0;
}

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

.employee-skill-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.employee-filter-btn {
  border-color: #2f558d;
  background: #102a58;
  color: #d4e4ff;
}

.employee-filter-btn.active {
  border-color: #67c4ff;
  box-shadow: inset 0 0 0 1px rgba(90, 192, 255, 0.55);
  background: #17407d;
}

.employee-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.35rem;
}

.employee-list-item {
  width: 100%;
  min-width: 0;
  text-align: left;
  border: 1px solid #2b568f;
  border-radius: 8px;
  background: #133163;
  padding: 0.36rem 0.42rem;
  display: grid;
  gap: 0.14rem;
}

.employee-list-item strong {
  font-size: 0.84rem;
}

.employee-list-item small {
  color: #b7cbed;
  font-size: 0.74rem;
  line-height: 1.2;
}

.employee-list-item.active {
  border-color: #67c4ff;
  box-shadow: inset 0 0 0 1px rgba(90, 192, 255, 0.65);
  background: #17407d;
}

.employee-list-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.24rem;
}

.employee-detail {
  display: grid;
  gap: 0.7rem;
}

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

.employee-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
}

.employee-detail-head-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.detail-window {
  border: 1px solid #2b4f86;
  border-radius: 10px;
  background: rgba(5, 19, 45, 0.5);
  padding: 0.72rem;
  display: grid;
  gap: 0.6rem;
}

.detail-window h5 {
  margin: 0;
}

.detail-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.detail-table.compact th {
  width: 240px;
}

.detail-table th,
.detail-table td {
  text-align: left;
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid #234371;
  vertical-align: middle;
}

.detail-table th {
  color: #aac3e8;
  font-size: 0.8rem;
}

.table-actions {
  width: 1%;
  white-space: nowrap;
}

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

.employee-card {
  border: 1px solid #274d89;
  border-radius: 12px;
  background: #0f2959;
  padding: 0.85rem;
  display: grid;
  gap: 0.75rem;
}

.employee-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.7rem;
}

.employee-card-head h4 {
  margin-bottom: 0.35rem;
}

.employee-metrics {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  font-size: 0.86rem;
}

.settings-form {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
}

.inline-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #c6d8f6;
  font-size: 0.9rem;
}

.inline-checkbox input {
  width: auto;
  margin: 0;
}

.settings-actions {
  display: flex;
  align-items: end;
}

.settings-full-row {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.45rem;
}

.settings-full-row .muted {
  margin: 0;
}

.employee-subgrid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.employee-subpanel {
  border: 1px solid #2b4f86;
  border-radius: 10px;
  background: rgba(5, 19, 45, 0.5);
  padding: 0.7rem;
  display: grid;
  gap: 0.6rem;
}

.employee-subpanel.disabled {
  opacity: 0.72;
}

.employee-subpanel h5 {
  margin: 0;
}

.inline-form {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: end;
}

.entry-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.entry-list li {
  border: 1px solid #274b81;
  border-radius: 8px;
  background: rgba(17, 48, 97, 0.55);
  padding: 0.45rem 0.5rem;
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.84rem;
}

.dashboard-extra,
#dashboardExtras {
  display: grid;
  gap: 0.8rem;
}

.warning-panel {
  border-color: #8a4a54;
  background: linear-gradient(180deg, rgba(88, 24, 38, 0.52), rgba(58, 18, 31, 0.58));
}

.warning-panel h3 {
  color: #ffd2d9;
}

.fixed-shift-panel {
  border-color: #35649f;
  background: linear-gradient(180deg, rgba(13, 40, 85, 0.95), rgba(9, 28, 62, 0.95));
}

.fixed-shift-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.fixed-shift-card {
  border: 1px solid #2b568f;
  border-radius: 10px;
  background: rgba(8, 25, 56, 0.65);
  padding: 0.65rem;
  display: grid;
  gap: 0.5rem;
}

.fixed-shift-card h4 {
  margin: 0;
}

.fixed-shift-slots {
  display: grid;
  gap: 0.45rem;
}

.fixed-shift-actions {
  display: flex;
  justify-content: flex-end;
}

.holiday-plan-head {
  align-items: start;
}

.holiday-plan-toggle {
  display: inline-flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.holiday-plan-toggle button.active {
  border-color: #6ec8ff;
  box-shadow: inset 0 0 0 1px rgba(110, 200, 255, 0.5);
  background: #17447f;
}

.holiday-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
}

.holiday-plan-day {
  border: 1px solid #2b4f86;
  border-radius: 10px;
  background: rgba(10, 30, 65, 0.64);
  padding: 0.5rem;
  display: grid;
  gap: 0.42rem;
}

.holiday-plan-day header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.82rem;
}

.holiday-plan-day header span {
  color: #9fb9e4;
  font-size: 0.75rem;
}

.holiday-plan-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.33rem;
}

.holiday-plan-chip {
  border: 1px solid #3a5d95;
  border-radius: 8px;
  background: rgba(22, 54, 102, 0.62);
  padding: 0.33rem 0.44rem;
  display: grid;
  gap: 0.1rem;
}

.holiday-plan-chip strong {
  font-size: 0.82rem;
}

.holiday-plan-chip small {
  color: #b8ceee;
  font-size: 0.72rem;
}

.upcoming-holiday-wrap {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.45rem;
}

.upcoming-holiday-wrap h4 {
  margin: 0;
}

.holiday-review-note {
  min-width: 170px;
}

.application-note-input {
  min-width: 170px;
}

.application-meta {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.72rem;
}

.application-status {
  display: inline-block;
  border-radius: 999px;
  padding: 0.12rem 0.42rem;
  font-size: 0.74rem;
  border: 1px solid #4e658b;
  background: rgba(23, 44, 82, 0.55);
}

.application-status.pending {
  border-color: #ab8a4d;
  color: #ffe0a8;
  background: rgba(128, 89, 21, 0.3);
}

.application-status.approved {
  border-color: #2a8a5d;
  color: #c9ffd8;
  background: rgba(20, 103, 67, 0.32);
}

.application-status.rejected {
  border-color: #8a3e4f;
  color: #ffd3db;
  background: rgba(115, 30, 50, 0.34);
}

.user-table-wrap .table-actions {
  white-space: nowrap;
}

.user-edit-panel {
  border: 1px solid #2b568f;
  border-radius: 10px;
  background: #0f2958;
  padding: 0.7rem;
  display: grid;
  gap: 0.6rem;
}

.user-edit-panel h4 {
  margin: 0;
}

.user-edit-form {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: end;
}

.user-edit-actions {
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
  grid-column: 1 / -1;
  flex-wrap: wrap;
}

.user-list {
  display: grid;
  gap: 0.6rem;
}

.user-row {
  border: 1px solid #2b568f;
  border-radius: 10px;
  background: #0f2958;
  padding: 0.65rem;
  display: grid;
  gap: 0.55rem;
}

.user-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.user-row-head strong {
  font-size: 0.92rem;
}

.user-row-head small {
  color: #aecdff;
  font-size: 0.78rem;
}

.user-row-grid {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
}

.user-row-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
}

.small {
  font-size: 0.82rem;
}

button.compact {
  padding: 0.3rem 0.5rem;
  font-size: 0.78rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 11, 25, 0.7);
  z-index: 90;
  display: grid;
  place-items: center;
  padding: max(0.9rem, env(safe-area-inset-top)) max(0.9rem, env(safe-area-inset-right)) max(0.9rem, env(safe-area-inset-bottom)) max(0.9rem, env(safe-area-inset-left));
}

.modal-card {
  width: min(100%, 980px);
  max-height: 92vh;
  overflow: auto;
  border: 1px solid #2f588f;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(13, 35, 77, 0.98), rgba(7, 21, 47, 0.98));
  padding: 1rem;
}

.slot-picker-card {
  width: min(100%, 680px);
}

.slot-picker-search {
  display: grid;
  gap: 0.32rem;
  margin: 0 0 0.55rem;
  color: #c4d8f5;
  font-size: 0.86rem;
}

.slot-picker-list {
  display: grid;
  gap: 0.42rem;
  max-height: 58vh;
  overflow: auto;
  padding-right: 0.08rem;
}

.slot-picker-item {
  width: 100%;
  text-align: left;
  border: 1px solid #2f5a93;
  border-radius: 10px;
  background: #102b5c;
  padding: 0.5rem 0.58rem;
  display: grid;
  gap: 0.22rem;
}

.slot-picker-item strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.slot-picker-item small {
  font-size: 0.74rem;
  color: #bbd2f2;
}

.slot-picker-badges {
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.22rem;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 0.7rem;
}

.batch-form {
  display: grid;
  gap: 0.85rem;
}

.batch-rows {
  display: grid;
  gap: 0.75rem;
}

.batch-row {
  border: 1px solid #2e578e;
  border-radius: 11px;
  background: #0d2757;
  padding: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.batch-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.batch-row-head h4 {
  margin: 0;
}

.batch-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.skill-item.compact {
  padding: 0.3rem 0.4rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.shift-controls {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.shift-nav-actions {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.fixed-shift-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.fixed-shift-toolbar-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.fixed-shift-toolbar-note {
  display: grid;
  gap: 0.05rem;
  font-size: 0.72rem;
  color: #b8cff0;
  margin-right: 0.15rem;
}

.fixed-shift-inline-grid {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.fixed-shift-inline {
  border: 1px solid #2d5b93;
  border-radius: 10px;
  background: rgba(12, 43, 89, 0.75);
  padding: 0.35rem 0.42rem;
  display: inline-flex;
  align-items: end;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.fixed-shift-inline > strong {
  font-size: 0.74rem;
  color: #d9ebff;
}

.fixed-shift-inline-slots {
  display: inline-flex;
  gap: 0.24rem;
  flex-wrap: wrap;
}

.fixed-shift-inline label {
  display: grid;
  gap: 0.12rem;
  font-size: 0.7rem;
  color: #bdd4f4;
}

.fixed-shift-inline label select {
  min-width: 110px;
  padding: 0.24rem 0.34rem;
}

.rotate-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  white-space: nowrap;
}

.rotate-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.tabs.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.shift-overview-root {
  display: grid;
  gap: 0.85rem;
}

.shift-board-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  align-items: start;
  overflow-x: auto;
}

.shift-day-block {
  border: 1px solid #264a82;
  border-radius: 10px;
  background: rgba(13, 36, 80, 0.65);
  padding: 0.55rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.shift-day-head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  font-size: 0.85rem;
}

.shift-day-head span {
  color: #9ab3da;
  font-size: 0.76rem;
}

.shift-day-shifts {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.shift-card {
  border: 1px solid #2f6bb0;
  border-radius: 10px;
  background: rgba(20, 75, 137, 0.45);
  padding: 0.5rem;
  display: grid;
  gap: 0.42rem;
}

.shift-card header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: start;
}

.shift-card header strong {
  font-size: 0.8rem;
}

.shift-card header small {
  color: #c4d9fb;
  font-size: 0.72rem;
}

.shift-code {
  border: 1px solid #3c6fae;
  border-radius: 999px;
  padding: 0.15rem 0.4rem;
  font-size: 0.68rem;
  background: rgba(6, 24, 55, 0.55);
}

.shift-holiday-hint {
  margin: 0;
  font-size: 0.72rem;
  color: #ffd393;
}

.shift-sick-hint {
  margin: 0;
  font-size: 0.72rem;
  color: #ffb3bc;
}

.slot-board {
  display: grid;
  gap: 0.42rem;
}

.slot-column {
  display: grid;
  gap: 0.25rem;
}

.slot-label {
  margin: 0;
  font-size: 0.74rem;
  color: #9dc0ee;
}

.slot-label[class*='skill-'] {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-style: solid;
  border-width: 1px;
  border-radius: 999px;
  padding: 0.12rem 0.44rem;
}

.slot-row {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.dashboard-day-card {
  border: 1px solid #24477a;
  border-radius: 12px;
  background: rgba(11, 33, 74, 0.86);
  padding: 0.75rem;
  display: grid;
  gap: 0.65rem;
}

.dashboard-day-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
}

.dashboard-day-card-head strong {
  font-size: 0.94rem;
}

.dashboard-day-card-head span {
  color: #a7bfdf;
  font-size: 0.78rem;
}

.dashboard-day-card-body {
  display: grid;
  gap: 0.55rem;
}

.dashboard-mobile-shift {
  border: 1px solid #2f6db3;
  border-radius: 10px;
  padding: 0.65rem;
  display: grid;
  gap: 0.42rem;
}

.dashboard-mobile-shift-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.6rem;
}

.dashboard-mobile-shift-head strong {
  display: block;
  font-size: 0.84rem;
}

.calendar-empty-static {
  margin: 0;
  font-size: 0.78rem;
  color: #9bb2da;
}

.chip-holiday {
  color: #ffd48f;
}

.chip-sick {
  color: #ffb3bc;
}

.skill-marktleitung {
  border-color: #0ea5a9 !important;
  background: rgba(14, 165, 169, 0.2) !important;
  color: #c7ffff !important;
}

.skill-kasse {
  border-color: #3b82f6 !important;
  background: rgba(59, 130, 246, 0.2) !important;
  color: #d9ecff !important;
}

.skill-kaese {
  border-color: #eab308 !important;
  background: rgba(234, 179, 8, 0.22) !important;
  color: #fff3bf !important;
}

.skill-metzgerei {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ffd8d8 !important;
}

.skill-markt {
  border-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.2) !important;
  color: #d7ffe7 !important;
}

.skill-aushilfe {
  border-color: #a855f7 !important;
  background: rgba(168, 85, 247, 0.2) !important;
  color: #f2dcff !important;
}

.skill-generic {
  border-color: #5e86be !important;
  background: rgba(94, 134, 190, 0.2) !important;
}

.timesheet-mobile-panel {
  display: grid;
  gap: 1rem;
}

.timesheet-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.timesheet-stat-card {
  border: 1px solid #244c85;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(14, 41, 92, 0.9), rgba(8, 22, 50, 0.92));
  padding: 0.9rem;
  display: grid;
  gap: 0.2rem;
}

.timesheet-stat-card span {
  color: #9eb8df;
  font-size: 0.8rem;
}

.timesheet-stat-card strong {
  font-size: 1.35rem;
}

.timesheet-stat-card small {
  color: #bdd0ef;
}

.timesheet-form-card {
  border: 1px solid #24477a;
  border-radius: 14px;
  background: rgba(8, 25, 58, 0.92);
  padding: 0.95rem;
  display: grid;
  gap: 0.9rem;
}

.timesheet-day-form {
  padding: 0.8rem;
  background: rgba(5, 18, 43, 0.82);
}

.timesheet-card-intro {
  margin: 0;
}

.timesheet-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.timesheet-toggle-option {
  border: 1px solid #2f558d;
  border-radius: 12px;
  background: rgba(12, 34, 73, 0.9);
  color: #d6e6ff;
  min-height: 52px;
  padding: 0.75rem 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
}

.timesheet-toggle-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.timesheet-toggle-option.active {
  border-color: #20a7ff;
  background: linear-gradient(180deg, rgba(34, 125, 211, 0.45), rgba(18, 64, 117, 0.8));
  color: #f4fbff;
}

.timesheet-form-card[data-status='absent'] .timesheet-toggle-option.active {
  border-color: #ff7388;
  background: linear-gradient(180deg, rgba(145, 54, 75, 0.55), rgba(74, 22, 37, 0.82));
}

.timesheet-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.timesheet-form-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timesheet-note-field {
  grid-column: span 2;
}

.timesheet-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.timesheet-form-actions p {
  max-width: 48ch;
}

.timesheet-section {
  display: grid;
  gap: 0.75rem;
}

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

.timesheet-day-card {
  border: 1px solid #24477a;
  border-radius: 14px;
  background: rgba(10, 28, 64, 0.9);
  padding: 0.85rem;
  display: grid;
  gap: 0.75rem;
}

.timesheet-day-present {
  border-color: rgba(41, 204, 120, 0.45);
}

.timesheet-day-absent {
  border-color: rgba(255, 115, 136, 0.5);
}

.timesheet-day-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.timesheet-day-head div {
  display: grid;
  gap: 0.18rem;
}

.timesheet-day-head span {
  color: #a8c1e3;
  font-size: 0.82rem;
}

.timesheet-day-summary {
  font-size: 0.8rem;
  color: #c7dbf8;
  text-align: right;
}

.timesheet-entry-list {
  display: grid;
  gap: 0.5rem;
}

.timesheet-entry-item {
  list-style: none;
  margin: 0;
  border: 1px solid #214372;
  border-radius: 12px;
  background: rgba(8, 22, 49, 0.94);
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.timesheet-entry-item.empty {
  justify-content: flex-start;
}

.timesheet-entry-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.timesheet-entry-note {
  margin-top: 0.28rem;
  color: #aecaef;
  font-size: 0.84rem;
}

.timesheet-status-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #2d5a96;
  border-radius: 999px;
  padding: 0.14rem 0.48rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.timesheet-status-present {
  border-color: rgba(41, 204, 120, 0.55);
  background: rgba(41, 204, 120, 0.16);
  color: #cffff2;
}

.timesheet-status-absent {
  border-color: rgba(255, 115, 136, 0.55);
  background: rgba(255, 115, 136, 0.16);
  color: #ffdce3;
}

.timesheet-month-select {
  min-width: 160px;
}

.timesheet-month-list {
  display: grid;
  gap: 0.65rem;
}

.timesheet-month-row {
  border: 1px solid #24477a;
  border-radius: 14px;
  background: rgba(8, 23, 53, 0.92);
  padding: 0.8rem;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 0.85rem;
}

.timesheet-month-date {
  display: grid;
  gap: 0.18rem;
}

.timesheet-month-date span {
  color: #a1bddf;
  font-size: 0.82rem;
}

.timesheet-month-content {
  display: grid;
  gap: 0.5rem;
}

.timesheet-month-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.timesheet-month-details {
  display: grid;
  gap: 0.4rem;
}

.timesheet-month-entry {
  border: 1px solid #1e3b68;
  border-radius: 10px;
  background: rgba(6, 18, 42, 0.8);
  padding: 0.5rem 0.6rem;
  display: grid;
  gap: 0.16rem;
}

.timesheet-month-entry small {
  color: #adc8eb;
}

@media (max-width: 920px) {
  .employee-toolbar {
    flex-direction: column;
    align-items: start;
  }

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

  .employee-list {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .detail-table.compact th {
    width: 180px;
  }

  .shift-nav-actions {
    width: 100%;
  }

  .fixed-shift-toolbar-note {
    width: 100%;
    margin-right: 0;
  }

  .fixed-shift-inline {
    width: 100%;
    justify-content: space-between;
  }

  .modal-actions {
    justify-content: stretch;
  }

  .modal-actions button {
    flex: 1;
  }

  .shift-board-grid {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .timesheet-stat-grid,
  .timesheet-form-grid,
  .timesheet-week-grid,
  .timesheet-month-row {
    grid-template-columns: 1fr;
  }

  .timesheet-note-field {
    grid-column: auto;
  }

  .timesheet-entry-item {
    align-items: start;
    flex-direction: column;
  }

  .timesheet-month-select {
    width: 100%;
  }
}
