:root {
  --bg-main: #eef4fb;
  --bg-alt: #dce7f4;
  --surface: #ffffff;
  --surface-soft: #f4f8fc;
  --line: #bfd0e1;
  --text: #1d3551;
  --text-soft: #5c7390;
  --accent: #2a6fb3;
  --accent-soft: #d9e9f8;
  --danger: #9a1f26;
  --ok-bg: #e8f6ec;
  --ok-line: #b9dbc2;
  --ok-text: #194431;
  --info-bg: #e7f0fb;
  --info-line: #b8cfe8;
  --info-text: #234f7d;
  --warn-bg: #f5f1e4;
  --warn-line: #d7c58d;
  --warn-text: #765d1d;
  --shadow: 0 12px 28px rgba(33, 62, 98, 0.1);
}

:root[data-theme="dark"] {
  --bg-main: #0f1824;
  --bg-alt: #172537;
  --surface: #1b2a3d;
  --surface-soft: #22364e;
  --line: #35516f;
  --text: #e6eef8;
  --text-soft: #a6bad1;
  --accent: #4b8fd2;
  --accent-soft: #223e5d;
  --danger: #ff8e92;
  --ok-bg: #163327;
  --ok-line: #2f5b49;
  --ok-text: #b7e4c7;
  --info-bg: #1b3550;
  --info-line: #30557b;
  --info-text: #d7e9fb;
  --warn-bg: #4a4127;
  --warn-line: #897649;
  --warn-text: #f2e1a6;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] .availability-chip {
  border-color: #5cb7a8;
  background: #1f4f49;
  color: #c9fff2;
}

:root[data-theme="dark"] .availability-day.availability-high {
  border-color: #4a8e7f;
  background: #1c3a35;
}

:root[data-theme="dark"] .availability-day.availability-medium {
  border-color: #8f7a46;
  background: #3d3421;
}

:root[data-theme="dark"] .availability-day.availability-low {
  border-color: #8f4c59;
  background: #3f2630;
}

:root[data-theme="dark"] .undo-banner {
  border-color: #8a7742;
  background: #4c4328;
  color: #f6e7b3;
}

:root[data-theme="dark"] .undo-banner .btn {
  background: #6f6239;
  border-color: #a28f54;
  color: #fff3c9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(165deg, var(--bg-main) 0%, var(--bg-alt) 100%);
}

.bg-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.28), transparent 35%),
    radial-gradient(circle at 90% 15%, rgba(42, 111, 179, 0.2), transparent 40%);
  z-index: -1;
}

.app-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 18px 18px;
  border-bottom: 1px solid color-mix(in srgb, #ffffff 18%, #12395f);
  background: linear-gradient(135deg, #43556a 0%, #31465d 100%);
  backdrop-filter: blur(6px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-start;
}

.brand {
  margin: 0;
  font-size: 1.42rem;
  font-weight: 800;
  color: #f4f8fc;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 2px rgba(13, 37, 63, 0.35);
}

.logo-slot {
  width: 132px;
  height: 60px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #edf4fb 100%);
  padding: 6px 10px;
  box-shadow: 0 8px 20px rgba(16, 48, 82, 0.18);
}

.logo-link {
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.logo-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16, 48, 82, 0.24);
}

.brand-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.branding-preview {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.branding-logo-preview {
  width: 180px;
  height: 82px;
}

.main-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 6px;
  background: rgba(13, 37, 63, 0.16);
}

.nav-group-label {
  padding: 0 5px;
  color: #d9e9f8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.main-nav a {
  text-decoration: none;
  color: #f4f8fc;
  background: rgba(21, 49, 80, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.95rem;
  font-weight: 800;
  white-space: nowrap;
}

.main-nav a:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: #2a6fb3;
}

.header-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-chip {
  margin: 0;
  padding: 8px 10px;
  background: #f4f8fc;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  color: #2a6fb3;
  font-weight: 700;
}

.app-header .btn-light {
  background: #f4f8fc;
  border-color: rgba(255, 255, 255, 0.32);
  color: #2a6fb3;
  font-weight: 800;
}

.app-header .btn-light:hover {
  background: #e3eef9;
}

.content {
  width: min(1840px, 98%);
  margin: 14px auto 30px;
  display: grid;
  gap: 14px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.panel-small {
  width: min(560px, 96%);
}

h1,
h2 {
  margin: 0 0 10px;
}

h1 {
  font-size: 1.24rem;
}

h2 {
  font-size: 1rem;
}

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

.form-grid {
  display: grid;
  gap: 8px;
}

label {
  margin-top: 6px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  min-height: 42px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.checkbox-grid {
  display: grid;
  gap: 4px;
}

.mini-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.mini-link:hover {
  color: color-mix(in srgb, var(--accent) 82%, #0d2c4d);
}

.maps-link,
.phone-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.maps-link:hover,
.phone-link:hover {
  color: color-mix(in srgb, var(--accent) 78%, #0d2c4d);
}

ul {
  margin: 0;
  padding-left: 18px;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  padding: 10px 13px;
  min-height: 42px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(42, 111, 179, 0.18);
}

.btn:hover {
  filter: brightness(0.97);
}

.btn-light {
  background: var(--accent-soft);
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
  box-shadow: none;
}

.btn-danger {
  background: color-mix(in srgb, var(--danger) 88%, #ffffff);
  border-color: color-mix(in srgb, var(--danger) 60%, #000000);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(0.95);
}

.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-actions form {
  margin: 0;
}

.split-export {
  display: inline-flex;
  align-items: stretch;
  position: relative;
}

.split-export > .btn {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.split-export-menu {
  position: relative;
}

.split-export-toggle {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  min-width: 36px;
  padding-inline: 10px;
}

.split-export-toggle::-webkit-details-marker {
  display: none;
}

.split-export-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 132px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  display: grid;
  overflow: hidden;
  z-index: 50;
}

.split-export-dropdown a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.split-export-dropdown a:last-child {
  border-bottom: 0;
}

.split-export-dropdown a:hover {
  background: var(--surface-soft);
}

.export-all-form {
  margin-top: 6px;
}

.mail-all-form {
  margin-top: 14px;
}

.command-box {
  margin: 10px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 12px;
  overflow-x: auto;
}

.info-box {
  margin-top: 12px;
  border: 1px solid var(--info-line);
  border-radius: 12px;
  background: var(--info-bg);
  color: var(--info-text);
  padding: 12px;
}

.info-box p {
  margin: 0 0 6px;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.schedule-form {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 10px;
  margin: 12px 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-soft);
}

.schedule-enabled {
  min-height: 42px;
  align-items: center;
}

.schedule-summary p {
  max-width: 760px;
}

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

.history-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.history-table th,
.history-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}

.history-table th {
  color: var(--text);
  background: var(--accent-soft);
  font-size: 0.86rem;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 800;
  border: 1px solid var(--line);
}

.status-sent {
  color: var(--ok-text);
  background: var(--ok-bg);
  border-color: var(--ok-line);
}

.status-failed {
  color: #8a2e39;
  background: #ffe8eb;
  border-color: #e0a2ad;
}

.status-skipped {
  color: var(--warn-text);
  background: var(--warn-bg);
  border-color: var(--warn-line);
}

.week-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.week-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.undo-banner {
  border: 1px solid #e0c97a;
  background: #fff4cd;
  color: #6f5612;
  border-radius: 12px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  width: auto;
  max-width: 100%;
  align-self: start;
  justify-self: start;
  line-height: 1.25;
}


.undo-banner p {
  margin: 0;
}

.undo-banner form {
  margin: 0;
}

.undo-banner .btn {
  padding: 7px 10px;
  line-height: 1.1;
  background: #f2de97;
  border-color: #d3b862;
  color: #5d4b14;
}

.month-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  min-width: 900px;
}

.month-weekdays span {
  text-align: center;
  font-weight: 700;
  color: var(--text-soft);
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-width: 900px;
}

.month-day {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  padding: 10px;
  min-height: 120px;
}

.month-day.out-month {
  opacity: 0.55;
}

.month-date {
  margin: 0 0 8px;
  font-weight: 700;
}

.month-shift-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.month-shift-list li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: var(--surface);
  font-size: 0.85rem;
}

.tiny {
  font-size: 0.8rem;
}

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

.calendar-scroll {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0;
  overflow-x: visible;
  padding-bottom: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.month-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.day-card {
  background: #f0f3f6;
  border-right: 1px solid var(--line);
  padding: 0;
  min-height: 230px;
}

.calendar-scroll .day-card:last-child {
  border-right: 0;
}

.day-card h2 {
  font-size: 0.92rem;
  background: #acb7c1;
  color: #f7fafc;
  padding: 10px;
  margin: 0;
  border-bottom: 1px solid #99a6b2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.day-heading-text {
  display: grid;
  gap: 2px;
}

.day-weekday {
  font-weight: 700;
  line-height: 1.1;
}

.day-date {
  font-size: 0.88em;
  line-height: 1.15;
}

.day-availability-count {
  font-size: 0.74rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.16);
  color: #f7fafc;
  padding: 2px 8px;
  white-space: nowrap;
}

.day-card.day-availability-high {
  background: #e9f2fb;
}

.day-card.day-availability-high h2 {
  background: #2a6fb3;
  border-bottom-color: #225d97;
}

.day-card.day-availability-medium {
  background: #fff7e9;
}

.day-card.day-availability-medium h2 {
  background: #b39658;
  border-bottom-color: #957d47;
}

.day-card.day-availability-low {
  background: #fdeff1;
}

.day-card.day-availability-low h2 {
  background: #ac6871;
  border-bottom-color: #8f555d;
}

:root[data-theme="dark"] .day-card.day-availability-high {
  background: #162536;
}

:root[data-theme="dark"] .day-card.day-availability-high h2 {
  background: #3d79b8;
  border-bottom-color: #5a95d3;
}

:root[data-theme="dark"] .day-card.day-availability-medium {
  background: #352e1f;
}

:root[data-theme="dark"] .day-card.day-availability-medium h2 {
  background: #7e6a3a;
  border-bottom-color: #9c8448;
}

:root[data-theme="dark"] .day-card.day-availability-low {
  background: #3b2028;
}

:root[data-theme="dark"] .day-card.day-availability-low h2 {
  background: #8a4c57;
  border-bottom-color: #ac5f6c;
}

.shift-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.shift-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  background: var(--surface-soft);
}

.shift-drag {
  cursor: grab;
}

.shift-drag:active {
  cursor: grabbing;
}

.shift-drag.drag-active {
  opacity: 0.72;
}

.admin-calendar-grid .shift-item {
  background: #2a6fb3;
  border-color: #225d97;
  color: #f3fffd;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.admin-calendar-grid .shift-item a {
  color: #e8fffb;
}

.admin-calendar-grid .shift-item .muted,
.admin-calendar-grid .shift-item .drop-hint {
  color: #d4fbf4;
}

.admin-calendar-grid .assignment-chip {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.38);
  color: #f5fffd;
}

.admin-calendar-grid .remove-btn {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.48);
  color: #f6fffd;
}

.shift-item p {
  margin: 0 0 6px;
}

.assignment-wrap {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.assignment-chip {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 6px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.assignment-drag {
  cursor: grab;
}

.assignment-drag:active {
  cursor: grabbing;
}

.remove-btn {
  border: 1px solid var(--line);
  background: color-mix(in srgb, #d14f56 18%, var(--surface));
  color: var(--text);
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.shift-item a {
  color: var(--accent);
  font-weight: 700;
}

.danger-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #ffe8eb;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.danger-link:hover {
  color: #ffffff;
}

.form-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px;
  margin: 0 0 16px;
}

dt {
  font-weight: 700;
}

dd {
  margin: 0;
}

.message {
  background: var(--info-bg);
  color: var(--info-text);
  border: 1px solid var(--info-line);
  border-radius: 10px;
  padding: 11px 12px;
  box-shadow: 0 6px 16px rgba(42, 111, 179, 0.08);
}

.message-success {
  background: var(--ok-bg);
  color: var(--ok-text);
  border-color: var(--ok-line);
}

.message-warning {
  background: var(--warn-bg);
  color: var(--warn-text);
  border-color: var(--warn-line);
}

.message-error {
  background: #ffe8eb;
  color: #8a2e39;
  border-color: #e0a2ad;
}

.error {
  color: var(--danger);
  margin: 0;
}

.pdf-export-form {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--surface-soft);
}

.planning-layout {
  display: grid;
  gap: 12px;
}

.planner-top-panel {
  display: grid;
  gap: 10px;
  align-content: start;
}

.fold-panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-soft) 84%, #ffffff);
  padding: 10px;
}

.fold-panel summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

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

.availability-day {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  background: var(--surface-soft);
}

.availability-day.availability-high {
  border-color: #8bc9b8;
  background: #eefaf6;
}

.availability-day.availability-medium {
  border-color: #e3c989;
  background: #fff7e7;
}

.availability-day.availability-low {
  border-color: #e3a1a8;
  background: #fff0f2;
}

.availability-day[open] {
  background: color-mix(in srgb, var(--surface-soft) 86%, #ffffff);
}

.availability-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  cursor: pointer;
  list-style: none;
}

.availability-head::-webkit-details-marker {
  display: none;
}

.availability-day[open] .availability-head {
  margin-bottom: 6px;
}

.availability-title {
  margin: 0;
  font-weight: 700;
}

.availability-count {
  min-width: 28px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 2px 8px;
}

.availability-high .availability-count {
  border-color: #8bc9b8;
  background: #dcf3eb;
  color: #166251;
}

.availability-medium .availability-count {
  border-color: #e3c989;
  background: #fff0cd;
  color: #7c5b16;
}

.availability-low .availability-count {
  border-color: #e3a1a8;
  background: #ffe0e4;
  color: #8c2f3a;
}

.availability-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.availability-day .muted {
  margin: 0;
}

.availability-chip {
  font-size: 0.78rem;
  border-radius: 999px;
  border: 1px solid #9dcfc4;
  background: #e4f7f2;
  color: #1f6b5f;
  padding: 3px 8px;
}

.day-chip {
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 3px 7px;
  background: var(--surface);
}

.employee-pool {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.project-pool {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.shift-type-pool {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 8px;
}

.project-drag {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  background: var(--surface);
  cursor: grab;
}

.shift-type-drag {
  border: 1px solid #96bde5;
  border-radius: 10px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  text-align: center;
  cursor: grab;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shift-type-drag strong {
  display: block;
  line-height: 1.2;
}

.project-drag p {
  margin: 0 0 4px;
}

.project-drag:active {
  cursor: grabbing;
}

.shift-type-drag:active {
  cursor: grabbing;
}

.trash-zone {
  margin-top: 2px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.trash-title {
  margin: 0 0 6px;
  font-weight: 700;
}

.trash-zone.trash-hover {
  border-color: #d14f56;
  box-shadow: 0 0 0 2px rgba(209, 79, 86, 0.25);
}

.employee-drag {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  background: var(--surface-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: grab;
  flex-direction: column;
  align-items: stretch;
}

.employee-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.employee-main span:first-child {
  font-weight: 700;
}

.employee-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  width: 100%;
}

.employee-meta .skill-badge {
  margin-right: auto;
}

.employee-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.load-badge {
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 3px 7px;
}

.employee-drag:active {
  cursor: grabbing;
}

.employee-drag.drag-active {
  opacity: 0.55;
}

.employee-drag.active-filter {
  border-color: #4d86be;
  box-shadow: 0 0 0 2px rgba(42, 111, 179, 0.2);
}

.project-drag.drag-active {
  opacity: 0.55;
}

.shift-type-drag.drag-active {
  opacity: 0.55;
}

.skill-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 15%, var(--surface));
}

.drop-hint {
  margin: 2px 0 10px;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.driver-ok,
.driver-missing {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 8px;
  padding: 4px 7px;
  display: inline-flex;
}

.driver-ok {
  color: #0f5e3f;
  background: #ddf3e8;
  border: 1px solid #9fcdb6;
}

.driver-missing {
  color: #8b2a2f;
  background: #fde9ea;
  border: 1px solid #efb7bc;
}

.drop-zone {
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.drop-zone.drop-hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}

.day-drop-zone.day-drop-hover {
  box-shadow: inset 0 0 0 2px rgba(61, 143, 114, 0.55);
}

.hidden-form {
  display: none;
}

.pdf-export-button-wrap {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.employee-list-head .inline-actions {
  transform: translateY(-4px);
}

.employee-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.employee-list-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface-soft);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.employee-list-item p {
  margin: 0 0 5px;
}

.login-page .content {
  margin-top: 0;
  min-height: calc(100vh - 124px);
}

.login-shell {
  min-height: inherit;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-panel {
  margin: 0 auto;
  width: min(520px, 96%);
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #eef5fc) 0%, var(--surface) 100%);
}

.login-panel h1 {
  color: var(--accent);
}

.login-panel .muted {
  max-width: 36ch;
}

.fade-in {
  animation: fadeIn 260ms ease-out;
}

.delay-1 {
  animation-delay: 100ms;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 760px) {
  .app-header {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 20px 28px;
  }

  .header-actions {
    justify-content: flex-end;
  }

  .pdf-export-form {
    grid-template-columns: 2fr 1fr 1fr auto;
  }

  .schedule-form {
    grid-template-columns: minmax(190px, 1.1fr) 1fr 1fr auto;
    align-items: end;
  }

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

  .shift-type-pool {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}


@media (min-width: 1080px) {
  .planning-layout {
    grid-template-columns: minmax(310px, 340px) 1fr;
  }

  .planner-top-panel {
    position: sticky;
    top: 14px;
  }

  .calendar-scroll {
    grid-template-columns: repeat(6, minmax(170px, 1fr));
  }

  .month-day {
    min-height: 132px;
  }
}
