:root {
  --bg: #101013;
  --panel: #1a1a20;
  --panel-2: #202028;
  --panel-3: #272731;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f7f7f8;
  --muted: #9b9ba8;
  --pink: #ec268f;
  --purple: #7552aa;
  --orange: #ff8a31;
  --yellow: #ffc928;
  --blue: #159fd4;
  --success: #45d0a1;
  --danger: #ff6575;
  --warning: #ffb44d;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
  --radius: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(236, 38, 143, 0.07), transparent 28%),
    radial-gradient(circle at 100% 10%, rgba(255, 138, 49, 0.06), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px 1fr;
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 86px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 20px 20px;
  border-right: 1px solid var(--line);
  background: rgba(19, 19, 23, 0.95);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.brand-block {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 4px 4px 24px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(236, 38, 143, 0.16));
}

.brand-block h1 {
  margin: 0 0 5px;
  font-size: 15px;
  letter-spacing: 0.075em;
}

.brand-block p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.sidebar-toggle {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: 22px;
  line-height: 1;
  transition: 160ms ease;
}

.sidebar-toggle:hover {
  color: var(--text);
  border-color: rgba(255,255,255,.18);
}

.sidebar-collapsed .sidebar {
  padding-inline: 14px;
}

.sidebar-collapsed .brand-block {
  justify-content: center;
  padding-bottom: 20px;
}

.sidebar-collapsed .brand-logo {
  width: 46px;
  height: 46px;
}

.sidebar-collapsed .brand-copy,
.sidebar-collapsed .nav-item span:not(.nav-icon),
.sidebar-collapsed .sidebar-footer span:not(.status-dot) {
  display: none;
}

.sidebar-collapsed .sidebar-toggle {
  position: absolute;
  right: -29px;
  top: 10px;
  transform: rotate(180deg);
  background: #1a1a20;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 12px 8px;
}

.sidebar-collapsed .nav-icon {
  width: 34px;
  height: 34px;
}

.sidebar-collapsed .sidebar-footer {
  justify-content: center;
}

.nav-menu {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.nav-item {
  width: 100%;
  border: 0;
  color: var(--muted);
  background: transparent;
  padding: 12px 13px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: 160ms ease;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(110deg, rgba(236, 38, 143, 0.18), rgba(117, 82, 170, 0.18));
  box-shadow: inset 3px 0 0 var(--pink);
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 13px;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  padding: 14px 8px 4px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 14px rgba(69, 208, 161, 0.7);
}

.main-content {
  min-width: 0;
  padding: 0 26px 50px;
}

.topbar {
  height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.topbar h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.topbar-logo {
  display: none;
}

.eyebrow,
.section-kicker,
.hero-kicker {
  display: block;
  margin: 0;
  color: var(--pink);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar-meta {
  color: var(--muted);
  font-size: 13px;
}

.mobile-menu {
  display: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 10px;
}

.content-section {
  display: none;
  animation: fadeIn 180ms ease;
}

.content-section.active {
  display: block;
}

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

.hero-panel {
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px 38px;
  background:
    linear-gradient(115deg, rgba(236, 38, 143, 0.16), rgba(117, 82, 170, 0.1) 52%, rgba(255, 138, 49, 0.08)),
    var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.hero-panel h3 {
  max-width: 720px;
  margin: 12px 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.hero-panel p {
  max-width: 650px;
  margin: 0;
  color: #b8b8c1;
  line-height: 1.65;
}

.hero-logo {
  width: 220px;
  height: 220px;
  object-fit: contain;
  opacity: 0.9;
  transform: rotate(-4deg);
  filter: drop-shadow(0 22px 38px rgba(0,0,0,.3));
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
}

.stat-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.stat-card span,
.stat-card small {
  color: var(--muted);
}

.stat-card span {
  font-size: 12px;
}

.stat-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.stat-card small {
  font-size: 11px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 15px 40px rgba(0,0,0,.12);
  overflow: hidden;
}

.compact-panel {
  align-self: start;
}

.panel-heading {
  min-height: 78px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.panel-heading h3,
.section-intro h3,
.modal-header h3 {
  margin: 5px 0 0;
  font-size: 18px;
}

.section-intro {
  margin-bottom: 22px;
}

.section-intro h3 {
  font-size: 28px;
  letter-spacing: -0.025em;
}

.section-intro p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.4fr);
  gap: 20px;
}

.form-stack,
.schedule-grid {
  padding: 22px;
}

.form-stack {
  display: grid;
  gap: 17px;
}

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

.full-span {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
  color: #d7d7dd;
  font-size: 12px;
  font-weight: 650;
}

.compact-filter {
  min-width: 170px;
}

.compact-filter input {
  min-height: 38px;
  padding-block: 9px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.1);
  outline: 0;
  background: var(--panel-2);
  color: var(--text);
  padding: 12px 13px;
  border-radius: 10px;
  transition: 150ms ease;
}

select {
  appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%),
    linear-gradient(to right, rgba(255,255,255,.08), rgba(255,255,255,.08));
  background-position:
    calc(100% - 19px) 50%,
    calc(100% - 13px) 50%,
    calc(100% - 36px) 50%;
  background-size: 6px 6px, 6px 6px, 1px 22px;
  background-repeat: no-repeat;
}

select:hover {
  border-color: rgba(255,255,255,.18);
  background-color: #252530;
}

select option {
  color: var(--text);
  background: #202028;
}

.native-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-button {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 11px 40px 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  background: var(--panel-2);
  text-align: left;
  font-size: 12px;
  font-weight: 750;
  transition: 150ms ease;
}

.custom-select-button:hover,
.custom-select.open .custom-select-button {
  border-color: rgba(236, 38, 143, .54);
  background: #252530;
  box-shadow: 0 0 0 3px rgba(236, 38, 143, .08);
}

.custom-select-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-button i {
  position: absolute;
  right: 14px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: 150ms ease;
}

.custom-select.open .custom-select-button i {
  transform: translateY(2px) rotate(225deg);
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  z-index: 90;
  display: none;
  max-height: 240px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: #202028;
  box-shadow: 0 18px 46px rgba(0,0,0,.42);
  scrollbar-width: none;
}

.custom-select-menu::-webkit-scrollbar {
  display: none;
}

.custom-select.open .custom-select-menu {
  display: grid;
  gap: 4px;
}

.custom-select-option {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 10px 11px;
  color: #dedee5;
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}

.custom-select-option:hover,
.custom-select-option.selected {
  color: #fff;
  background: linear-gradient(110deg, rgba(236,38,143,.18), rgba(21,159,212,.13));
}

textarea {
  resize: vertical;
  min-height: 96px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(236, 38, 143, .72);
  box-shadow: 0 0 0 3px rgba(236, 38, 143, .1);
}

.form-actions,
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 750;
  transition: 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: white;
  background: linear-gradient(110deg, var(--pink), #b538a6 55%, var(--purple));
  box-shadow: 0 9px 22px rgba(236, 38, 143, 0.18);
}

.btn-secondary {
  color: #e2e2e6;
  background: var(--panel-3);
  border: 1px solid var(--line);
}

.btn-danger {
  color: #ffb8bf;
  background: rgba(255, 101, 117, .1);
  border: 1px solid rgba(255, 101, 117, .18);
}

.btn-sm {
  padding: 7px 10px;
  font-size: 11px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

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

th,
td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: #858591;
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 800;
  background: rgba(255,255,255,.012);
}

td {
  color: #dedee3;
  font-size: 13px;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: rgba(255,255,255,.018);
}

.align-right {
  text-align: right;
}

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

.wa-link {
  color: #baf3df;
  font-weight: 800;
  text-decoration: none;
}

.wa-link:hover {
  color: #dcfff0;
  text-decoration: underline;
}

.pill,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.pill {
  color: #ceced5;
  background: var(--panel-3);
  border: 1px solid var(--line);
  padding: 7px 10px;
}

.pill.warning {
  color: #ffd49b;
  background: rgba(255, 180, 77, .08);
  border-color: rgba(255, 180, 77, .18);
}

.badge {
  padding: 5px 9px;
  color: #baf3df;
  background: rgba(69,208,161,.08);
  border: 1px solid rgba(69,208,161,.16);
}

.badge.missing {
  color: #ffc0c7;
  background: rgba(255,101,117,.08);
  border-color: rgba(255,101,117,.16);
}

.inline-select {
  min-width: 150px;
  padding: 8px 9px;
  font-size: 11px;
}

.inline-select + .custom-select {
  min-width: 170px;
}

.inline-select + .custom-select .custom-select-button {
  min-height: 36px;
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 11px;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 30px 18px !important;
}

.recap-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.recap-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.recap-controls label {
  min-width: 185px;
}

.export-sheet {
  width: 100%;
  background: #17171c;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.export-header {
  min-height: 100px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(110deg, rgba(236,38,143,.12), rgba(117,82,170,.08), rgba(255,138,49,.05)),
    #17171c;
}

.export-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.export-brand img {
  width: 55px;
  height: 55px;
  object-fit: contain;
  flex: 0 0 auto;
}

.export-brand strong,
.export-brand span {
  display: block;
}

.export-brand strong {
  font-size: 15px;
  letter-spacing: .07em;
}

.export-brand span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.export-period {
  text-align: right;
}

.export-period span,
.export-period strong {
  display: block;
}

.export-period span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .14em;
  font-weight: 800;
}

.export-period strong {
  margin-top: 5px;
  font-size: 15px;
}

.recap-card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 18px;
}

.recap-day-card {
  border: 1px solid var(--line);
  border-left: 5px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  overflow: hidden;
}

.recap-day-header {
  min-height: 64px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255,255,255,.035);
  border-bottom: 1px solid var(--line);
}

.recap-day-header span,
.recap-day-header em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.recap-day-header strong {
  display: block;
  color: var(--text);
  font-size: 19px;
  letter-spacing: 0;
}

.recap-day-header em {
  margin-left: 8px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.recap-day-items {
  display: grid;
}

.recap-schedule-card {
  min-height: 66px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.assign-schedule-card {
  grid-template-columns: 42px minmax(0, 1fr) 124px;
}

.assign-schedule-card.is-assigned {
  background: rgba(69, 208, 161, .035);
}

.assign-schedule-card.is-unassigned {
  background: rgba(255, 180, 77, .025);
}

.recap-schedule-card:last-child {
  border-bottom: 0;
}

.recap-schedule-card:hover {
  background: rgba(255,255,255,.018);
}

.assign-schedule-card.is-assigned:hover {
  background: rgba(69, 208, 161, .055);
}

.recap-schedule-number,
.time-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: #ededf0;
  font-size: 11px;
  font-weight: 800;
}

.recap-schedule-number {
  width: 34px;
  min-height: 34px;
}

.time-chip {
  padding: 5px 9px;
  white-space: nowrap;
}

.recap-schedule-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.recap-schedule-main strong {
  display: block;
  width: min(42%, 440px);
  flex: 0 1 min(42%, 440px);
  color: #f0f0f3;
  font-size: 15px;
  line-height: 1.35;
}

.recap-schedule-main strong::after {
  content: "";
}

.recap-schedule-meta {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
  margin-top: 0;
}

.recap-schedule-meta::before,
.operator-chip::before {
  content: "";
  width: 1px;
  height: 24px;
  background: var(--line);
}

.operator-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  white-space: nowrap;
}

.operator-assign {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  white-space: nowrap;
}

.operator-select-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.save-assign-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  font-size: 16px;
}

.operator-chip small,
.operator-assign small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.recap-schedule-card .badge,
.recap-schedule-card .time-chip {
  font-size: 12px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-chip.assigned {
  color: #baf3df;
  background: rgba(69,208,161,.08);
  border: 1px solid rgba(69,208,161,.18);
}

.status-chip.unassigned {
  color: #ffd49b;
  background: rgba(255,180,77,.08);
  border: 1px solid rgba(255,180,77,.18);
}

.recap-actions {
  min-width: 0;
  width: auto;
}

.icon-action {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #e2e2e6;
  background: var(--panel-3);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  transition: 160ms ease;
}

.icon-action:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.18);
}

.icon-action.danger {
  color: #ffb8bf;
  background: rgba(255, 101, 117, .1);
  border-color: rgba(255, 101, 117, .18);
}

.icon-action.primary {
  color: #fff;
  background: linear-gradient(110deg, var(--pink), var(--purple));
  border-color: rgba(236, 38, 143, .35);
}

.schedule-card-list .recap-schedule-meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.recap-schedule-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.schedule-card-list .operator-assign {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  margin-left: 0;
}

.schedule-card-list .operator-select-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.schedule-card-list .custom-select {
  flex: 1;
  width: 100%;
  min-width: 0;
  max-width: none;
}

.schedule-card-list .custom-select-button {
  min-height: 40px;
  padding: 10px 38px 10px 14px;
}

.schedule-card-list .recap-day-card,
.schedule-card-list .recap-day-items,
.schedule-card-list .assign-schedule-card {
  overflow: visible;
}

.schedule-card-list .assign-schedule-card {
  position: relative;
}

.assign-schedule-title {
  display: contents;
}

.mobile-action-toggle {
  display: none;
}

.schedule-card-list .custom-select-menu {
  z-index: 120;
}

.schedule-card-list .custom-select-button {
  min-height: 36px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.recap-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.025);
}

.day-tone-0 { border-left-color: var(--pink); }
.day-tone-1 { border-left-color: var(--blue); }

.export-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-top: 1px solid var(--line);
  color: #73737d;
  font-size: 9px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 7px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  min-width: 260px;
  max-width: 390px;
  padding: 13px 15px;
  border-radius: 11px;
  background: #2b2b34;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: white;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  border-color: rgba(255, 101, 117, .35);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  background: rgba(0,0,0,.67);
  backdrop-filter: blur(7px);
  scrollbar-width: none;
}

.modal-backdrop::-webkit-scrollbar {
  display: none;
}

.modal-backdrop.open {
  display: grid;
}

.modal-card {
  width: min(520px, 100%);
  max-height: calc(100dvh - 40px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #1a1a20;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#scheduleModal .modal-card,
#operatorModal .modal-card,
#editModal .modal-card,
#operatorEditModal .modal-card {
  height: auto;
  overflow: visible;
}

#scheduleModal .form-stack,
#operatorModal .form-stack,
#editModal .form-stack,
#operatorEditModal .form-stack {
  min-height: 0;
  overflow: visible;
}

#scheduleModal .custom-select-menu,
#operatorModal .custom-select-menu,
#editModal .custom-select-menu,
#operatorEditModal .custom-select-menu {
  top: calc(100% + 7px);
  bottom: auto;
  z-index: 120;
  max-height: 190px;
}

.compact-modal {
  width: min(460px, 100%);
}

.confirm-card {
  width: min(460px, 100%);
}

.confirm-body {
  padding: 20px 22px 4px;
}

.confirm-body p {
  margin: 0;
  color: #d7d7dd;
  line-height: 1.55;
}

.confirm-actions {
  padding: 18px 22px 22px;
}

.preview-card {
  width: min(980px, 100%);
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.preview-body {
  min-height: 0;
  padding: 18px;
  overflow: auto;
  background: #101013;
}

.preview-body img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #17171c;
}

.preview-actions {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
}

.modal-header {
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header > div {
  min-width: 0;
}

.modal-header h3 {
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.icon-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: 20px;
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-102%);
    width: 286px;
    transition: 180ms ease;
    box-shadow: 30px 0 60px rgba(0,0,0,.34);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu {
    display: block;
  }

  .topbar {
    justify-content: flex-start;
    gap: 15px;
  }

  .topbar-meta {
    margin-left: auto;
  }

  .panel-heading,
  .panel-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .two-column-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  body {
    padding-bottom: 88px;
  }

  .main-content {
    padding: 0 14px 34px;
  }

  .topbar {
    height: auto;
    min-height: 74px;
    margin-bottom: 20px;
    padding: 14px 0;
  }

  .topbar-brand {
    min-width: 0;
  }

  .topbar-logo {
    width: 42px;
    height: 42px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(236, 38, 143, .18));
  }

  body[data-active-section="recap"] .topbar {
    display: none;
  }

  body[data-active-section="recap"] .main-content {
    padding-top: max(24px, env(safe-area-inset-top, 24px));
  }

  .topbar-meta {
    display: none;
  }

  .mobile-menu,
  .sidebar-toggle,
  .brand-block,
  .sidebar-footer {
    display: none;
  }

  .sidebar {
    display: contents;
  }

  .nav-menu {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    height: 78px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 8px 14px 10px;
    border: 1px solid rgba(255,255,255,.14);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    background: rgba(25, 25, 31, .9);
    backdrop-filter: blur(18px);
    box-shadow: 0 -18px 46px rgba(0,0,0,.42);
  }

  .nav-item {
    min-width: 0;
    height: 58px;
    padding: 6px 4px;
    border-radius: 20px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    text-align: center;
    font-size: 10px;
    line-height: 1.1;
  }

  .nav-item:hover {
    background: rgba(255,255,255,.055);
  }

  .nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(236, 38, 143, .9), rgba(117, 82, 170, .82));
    box-shadow: 0 12px 28px rgba(236, 38, 143, .28);
  }

  .nav-icon {
    width: 24px;
    height: 24px;
    border-radius: 9px;
    color: currentColor;
    background: rgba(255,255,255,.055);
    font-size: 12px;
  }

  .nav-item.active .nav-icon {
    background: rgba(255,255,255,.16);
  }

  .sidebar-collapsed .nav-item span:not(.nav-icon) {
    display: inline;
  }

  .section-intro h3 {
    font-size: 24px;
  }

  .hero-panel {
    padding: 28px 24px;
  }

  .hero-logo {
    display: none;
  }

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

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

  .full-span {
    grid-column: auto;
  }

  .recap-intro {
    align-items: stretch;
    flex-direction: column;
  }

  .recap-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .recap-controls label {
    min-width: 0;
  }

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

  table {
    min-width: 0;
  }

  th,
  td {
    padding: 11px 10px;
  }

  .recap-card-list {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }

  .recap-day-header {
    min-height: 0;
    align-items: center;
    flex-direction: row;
    gap: 6px;
    padding: 13px 14px;
  }

  .recap-day-header strong {
    min-width: 0;
    font-size: 16px;
    line-height: 1.3;
  }

  .recap-day-header em {
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: 12px;
    border-left: 1px solid var(--line);
    white-space: nowrap;
  }

  .recap-schedule-card {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .schedule-card-list .assign-schedule-card {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 14px;
  }

  .recap-schedule-number {
    width: 30px;
    min-height: 30px;
  }

  .recap-schedule-main strong {
    min-width: 0;
    width: 100%;
    flex-basis: auto;
    font-size: 15px;
  }

  .recap-schedule-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .schedule-card-list .recap-schedule-main {
    gap: 10px;
  }

  .schedule-card-list .assign-schedule-title {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: start;
    gap: 8px;
  }

  .schedule-card-list .assign-schedule-title strong {
    width: 100%;
  }

  .schedule-card-list .mobile-action-toggle {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #ededf0;
    background: var(--panel-3);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
  }

  .recap-schedule-meta {
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
  }

  .recap-schedule-meta::before {
    display: none;
  }

  .operator-chip,
  .operator-assign {
    align-items: flex-start;
    flex-direction: column;
    margin-left: 0;
    white-space: normal;
  }

  .operator-chip {
    gap: 7px;
  }

  .operator-chip::before {
    display: none;
  }

  .operator-chip .badge {
    max-width: 100%;
  }

  .recap-card-list:not(.schedule-card-list) .operator-chip {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .recap-card-list:not(.schedule-card-list) .recap-schedule-card {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: start;
    width: 100%;
  }

  .recap-card-list:not(.schedule-card-list) .recap-schedule-number {
    display: inline-flex;
    margin-top: 2px;
  }

  .recap-card-list:not(.schedule-card-list) .recap-schedule-main {
    width: 100%;
    align-items: stretch;
    gap: 10px;
  }

  .recap-card-list:not(.schedule-card-list) .recap-schedule-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .operator-select-group {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .schedule-card-list .custom-select {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  .recap-actions {
    grid-column: 1 / -1;
    justify-self: end;
    min-width: 0;
    width: auto;
    padding-left: 0;
  }

  .schedule-card-list .recap-actions {
    position: absolute;
    top: 52px;
    right: 14px;
    z-index: 80;
    width: auto;
    display: none;
    padding: 6px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    background: #202028;
    box-shadow: 0 18px 46px rgba(0,0,0,.42);
    gap: 6px;
  }

  .schedule-card-list .assign-schedule-card.actions-open .recap-actions {
    display: inline-flex;
  }

  .schedule-card-list .recap-actions .icon-action {
    width: 36px;
    height: 36px;
  }

  .actions {
    width: auto;
  }

  .actions .btn {
    flex: 1;
  }

  .export-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .export-period {
    text-align: left;
  }
}

@media (max-width: 430px) {
  body {
    padding-bottom: 84px;
  }

  .nav-menu {
    height: 76px;
    gap: 5px;
    padding: 8px 10px 10px;
    border-radius: 22px 22px 0 0;
  }

  .nav-item {
    height: 54px;
    border-radius: 18px;
    font-size: 9px;
  }

  .nav-icon {
    width: 22px;
    height: 22px;
  }

  .recap-card-list {
    padding: 10px;
  }

  .recap-day-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .recap-day-header em {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .recap-schedule-card,
  .schedule-card-list .assign-schedule-card {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 12px;
  }

  .recap-card-list:not(.schedule-card-list) .recap-schedule-card {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .recap-card-list:not(.schedule-card-list) .recap-schedule-main,
  .recap-card-list:not(.schedule-card-list) .recap-schedule-meta {
    width: 100%;
  }

  .schedule-card-list .custom-select {
    max-width: 100%;
  }

  .recap-actions {
    width: 100%;
    justify-content: flex-end;
  }
}


/* Mode khusus saat area rekap dirender menjadi JPG. */
.export-sheet.is-exporting {
  width: 900px;
  max-width: none;
}

.export-sheet.is-exporting .export-table-wrap {
  overflow: visible;
}

.export-sheet.is-exporting .recap-card-list {
  padding: 18px;
}

.export-sheet.is-exporting .recap-day-card {
  break-inside: avoid;
}

.export-sheet.is-exporting .recap-schedule-card {
  grid-template-columns: 42px minmax(0, 1fr);
}
