.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

/* -------------------- controls -------------------- */

.btn {
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    background 0.15s ease,
    box-shadow 0.18s ease;
  font-size: 12px;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  opacity: 0.96;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.secondary {
  background: #44546c;
}

.btn.danger {
  background: #bb4456;
}

.btn.ghost {
  background: #243044;
  color: var(--text);
}

input,
select,
.inline-input {
  background: var(--panel-3);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 9px 10px;
  min-width: 145px;
  outline: none;
  font-size: 12px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

input:focus,
select:focus,
.inline-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.16);
}

.week-field {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(122, 165, 255, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(122, 165, 255, 0.08), rgba(122, 165, 255, 0.03)),
    rgba(8, 14, 24, 0.32);
}

.week-field-label {
  color: #c8d6ef;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.week-field strong {
  min-width: 142px;
  color: #f4f7ff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.week-field strong.muted {
  color: var(--muted);
}

.week-field input {
  min-width: 112px;
  height: 32px;
  padding: 7px 10px;
  border-radius: 9px;
  font-weight: 800;
  color: #b8c6dd;
  background: rgba(7, 12, 22, 0.44);
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

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

/* -------------------- top status / switches -------------------- */

.saving-badge {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(91, 141, 239, 0.12);
  border: 1px solid rgba(91, 141, 239, 0.24);
  color: #dbe8ff;
  animation: savingBadgeIn 0.18s ease;
}

.saving-badge.show {
  display: inline-flex;
}

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

.view-switch {
  display: inline-flex;
  background: #101826;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.view-switch button {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 7px 11px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 11px;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.view-switch button:hover {
  transform: translateY(-1px);
}

.view-switch button.active {
  background: rgba(91, 141, 239, 0.16);
  color: #dbe8ff;
}

.status-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 4px;
  color: #f4f7ff;
}

.status-subtitle {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

.status-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.18s ease;
}

.badge.ok {
  background: rgba(91, 141, 239, 0.12);
  border-color: rgba(91, 141, 239, 0.28);
  color: #d7e6ff;
}

.badge.warn {
  background: rgba(201, 167, 74, 0.12);
  border-color: rgba(201, 167, 74, 0.28);
  color: #efdca5;
}

.badge.critical {
  background: rgba(210, 106, 120, 0.12);
  border-color: rgba(210, 106, 120, 0.28);
  color: #ffd2d9;
}

.badge.day {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.09);
  color: #eef4ff;
}

/* -------------------- sections -------------------- */

.section-block {
  margin-bottom: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.section-title {
  font-size: 13px;
  font-weight: 800;
}

.section-note {
  color: var(--muted);
  font-size: 11px;
}

/* -------------------- stats -------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 14px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.stat {
  display: flex;
  align-items: center;
  gap: 10px;

  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  min-width: 0;
  min-height: 60px;

  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  z-index: 2;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
  border-color: rgba(122, 165, 255, 0.18);
}

.stat .label {
  color: #94a6c4;
  font-size: 12px;
  line-height: 1.15;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat .value {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  color: #f3f7ff;
  flex: 0 0 auto;
}

.stat .icon {
  flex: 0 0 auto;
  font-size: 15px;
  line-height: 1;
  opacity: 0.95;
}

.stat .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.stat .text {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* -------------------- legacy days summary -------------------- */

.day-summary-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.day-summary-card.warn {
  background: var(--warn-bg);
  border-color: var(--warn-line);
}

.day-summary-card.critical {
  background: var(--critical-bg);
  border-color: var(--critical-line);
}

.day-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.day-summary-title {
  font-size: 12px;
  font-weight: 800;
}

.day-summary-date {
  font-size: 10px;
  color: var(--muted);
}

.day-summary-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11px;
}

/* -------------------- concept / position READY -------------------- */

.concept-block {
  position: relative;
  margin-bottom: 18px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--concept-border, rgba(255,255,255,0.08));
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.005)),
    var(--panel);
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
}

.concept-header {
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.concept-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
  background: rgba(255,255,255,0.96);
  flex: 0 0 auto;
  box-shadow: 0 0 10px rgba(255,255,255,0.25);
}

.concept-body {
  display: flex;
  flex-direction: column;
  gap: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}

.position-block {
  display: block;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  box-shadow: none !important;
}

.position-block + .position-block {
  margin-top: 0 !important;
}

.concept-body > .position-block:not(:last-child) {
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.position-block .table-wrap {
  display: block;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: hidden !important;
}

.position-block .table-wrap table {
  width: 100%;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.position-block .table-wrap th,
.position-block .table-wrap td {
  border-radius: 0 !important;
}

.concept-body > .position-block:first-child .position-row th {
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
}

.concept-body > .position-block:last-child .table-wrap table tr:last-child td:first-child {
  border-bottom-left-radius: 16px !important;
}

.concept-body > .position-block:last-child .table-wrap table tr:last-child td:last-child {
  border-bottom-right-radius: 16px !important;
}

/* -------------------- problems -------------------- */

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

.problem-day-card {
  background: var(--problem-bg);
  border: 1px solid var(--problem-line);
  border-radius: 12px;
  padding: 9px 10px;
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    filter 0.18s ease;
  cursor: pointer;
}

.problem-day-card.warn {
  background: var(--warn-bg);
  border-color: var(--warn-line);
}

.problem-day-card.critical {
  background: var(--critical-bg);
  border-color: var(--critical-line);
}

.problem-day-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  filter: brightness(1.02);
  border-color: rgba(122, 165, 255, 0.22);
}

.problem-day-card.active {
  outline: 2px solid rgba(122, 165, 255, 0.26);
}

.problem-day-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.problem-day-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.problem-day-title {
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.problem-day-meta {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.problem-day-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.mini-btn {
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  padding: 5px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.18s ease;
}

.mini-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  transform: translateY(-1px);
}

.problem-day-expanded {
  display: none;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 6px;
  flex-direction: column;
}

.problem-day-expanded.open {
  display: flex;
}

.problem-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 7px 8px;
}

.problem-detail-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.problem-detail-text {
  font-size: 10px;
  line-height: 1.25;
  color: var(--text);
}

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

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.dot.warn {
  background: #c9a74a;
  box-shadow: 0 0 0 4px rgba(201, 167, 74, 0.10);
}

.dot.critical {
  background: #d26a78;
  box-shadow: 0 0 0 4px rgba(210, 106, 120, 0.10);
}

.dot.ok {
  background: #7aa5ff;
  box-shadow: 0 0 0 4px rgba(122, 165, 255, 0.10);
}

/* -------------------- days mode -------------------- */

.days-mode {
  display: grid;
  grid-template-columns: repeat(7, minmax(220px, 1fr));
  gap: 10px;
}

.day-column {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow);
  position: relative;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    filter 0.18s ease;
  transform: translateY(0) scale(1);
  will-change: transform;
}

.day-column:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  filter: brightness(1.02);
}

.day-column.active-day {
  outline: 2px solid rgba(122, 165, 255, 0.20);
}

.day-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.day-column-title {
  font-size: 13px;
  font-weight: 800;
}

.day-column-meta {
  font-size: 10px;
  color: var(--muted);
}

.slot-card {
  background: #182132;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 9px;
  margin-bottom: 8px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    filter 0.18s ease;
  transform: translateY(0) scale(1);
  will-change: transform;
}

.slot-card.gap {
  background: #243022;
  border-color: #3a5a40;
}

.slot-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  filter: brightness(1.02);
}

.slot-time {
  font-size: 12px;
  font-weight: 800;
  color: #f1f6ff;
  margin-bottom: 4px;
}

.slot-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.3;
}

.slot-users {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.slot-user {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 6px 7px;
  font-size: 10px;
  line-height: 1.3;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    filter 0.18s ease;
  transform: translateY(0) scale(1);
  will-change: transform;
}

.slot-user:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  filter: brightness(1.02);
  border-color: rgba(255, 255, 255, 0.14);
}

/* -------------------- sidebar core -------------------- */

.sidebar-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.sidebar-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26);
}

.sidebar-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}

.info-row {
  margin-bottom: 7px;
  font-size: 12px;
  line-height: 1.4;
}

.slot-group-title {
  font-size: 11px;
  color: var(--muted);
  margin-top: 13px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.slot-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}

.slot-btn {
  background: #182132;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    filter 0.18s ease;
  transform: translateY(0) scale(1);
  will-change: transform;
}

.slot-btn:hover:not(:disabled) {
  background: #202b40;
  border-color: #496184;
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.slot-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.slot-btn .slot-time {
  font-weight: 800;
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  color: #f1f6ff;
}

.slot-btn .slot-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.empty-note {
  color: var(--muted);
  font-size: 11px;
  margin-top: 10px;
  line-height: 1.4;
}

.day-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.day-pill {
  background: #1a2232;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.18s ease;
  line-height: 1.2;
}

.day-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.day-pill.active {
  background: rgba(91, 141, 239, 0.16);
  border-color: rgba(91, 141, 239, 0.34);
  color: #d9e6ff;
}

.assign-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.context-note {
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.helper-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.helper-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 8px 9px;
  font-size: 11px;
  line-height: 1.35;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    filter 0.18s ease;
  transform: translateY(0) scale(1);
  will-change: transform;
}

.helper-item:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  filter: brightness(1.02);
  border-color: rgba(255, 255, 255, 0.14);
}

.candidate-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 8px;
}

.candidate-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 8px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    filter 0.18s ease;
  transform: translateY(0) scale(1);
  will-change: transform;
}

.candidate-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  filter: brightness(1.02);
  border-color: rgba(255, 255, 255, 0.14);
}

.candidate-name {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.candidate-meta {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.25;
}

/* -------------------- employee panel legacy -------------------- */

.employee-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.employee-panel-head-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.employee-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
}

.employee-panel-subtitle {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.employee-panel-close {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.18s ease;
}

.employee-panel-close:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(122, 165, 255, 0.22);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.employee-panel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.employee-panel-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 10px 11px;
}

.employee-panel-chip-label {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 4px;
}

.employee-panel-chip-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

/* =========================================================
   LAYOUT: FULL WIDTH TABLE + FLOATING QUICK ASSIGN FAB
   ========================================================= */

.sidebar {
  width: 0 !important;
  min-width: 0 !important;
  flex: 0 0 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  overflow: visible !important;
}

.main {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
}

.sidebar > .sidebar-section:not(#context-section-empty) {
  display: none !important;
}

#context-section-empty {
  display: none !important;
}

.quick-assign-fab-wrap {
  position: fixed;
  top: 92px;
  right: 18px;
  z-index: 95;
}

.quick-assign-fab {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(122, 165, 255, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(19, 29, 48, 0.98), rgba(10, 16, 28, 0.98));
  color: #f5d978;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.30),
    0 0 0 1px rgba(91, 141, 239, 0.05);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.quick-assign-fab:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(122, 165, 255, 0.30);
  box-shadow:
    0 20px 42px rgba(0, 0, 0, 0.34),
    0 0 20px rgba(122, 165, 255, 0.10);
}

.quick-assign-fab.is-disabled,
.quick-assign-fab:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.quick-assign-fab.is-disabled:hover,
.quick-assign-fab:disabled:hover {
  transform: none;
  border-color: rgba(122, 165, 255, 0.18);
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.30),
    0 0 0 1px rgba(91, 141, 239, 0.05);
}

.manager-tools {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(122, 165, 255, 0.14);
  border-radius: 14px;
  background: rgba(13, 21, 36, 0.72);
}

.manager-tools .manager-tool-btn {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px;
  flex-basis: 38px;
  border-radius: 12px;
  font-size: 18px;
  box-shadow: none;
}

.manager-tools .undo-fab {
  color: #f5d978;
}

.manager-tools .history-fab {
  color: #f5d978;
}

.quick-assign-popover {
  position: fixed;
  top: 78px;
  right: 78px;
  width: 340px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(122, 165, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(14, 21, 34, 0.985), rgba(10, 16, 28, 0.985));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255,255,255,0.03) inset;
  backdrop-filter: blur(8px);
  animation: quickAssignIn 0.18s ease;
}

@keyframes quickAssignIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.quick-assign-popover-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.quick-assign-popover-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(120, 145, 190, 0.16);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: #e9f1ff;
  cursor: pointer;
  font-size: 16px;
}

.quick-assign-popover-close:hover {
  background: rgba(255,255,255,0.08);
}

.quick-assign-popover .quick-assign-body {
  margin-top: 0 !important;
  max-height: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.quick-assign-popover .assign-form {
  gap: 10px;
}

.quick-assign-popover .day-pills {
  margin-bottom: 10px;
}

.quick-assign-popover .context-note {
  margin-top: 10px;
}

/* =========================================================
   BETTER EMPLOYEE BOTTOM SHEET
   ========================================================= */

.employee-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(3, 8, 18, 0.10);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.employee-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.employee-sheet-backdrop.hidden {
  display: none;
}

.bottom-editor,
#context-section-cell.bottom-editor,
#context-section-cell {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 10px;
  width: auto;
  max-height: 23vh;
  min-height: 154px;
  z-index: 90;
  padding: 10px 12px 12px;
  border-radius: 20px;
  border: 1px solid rgba(122, 165, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(10, 16, 28, 0.985), rgba(8, 13, 23, 0.985));
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(255,255,255,0.03) inset;
  overflow: hidden;
}

.bottom-editor::before,
#context-section-cell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(122,165,255,0.75),
    transparent
  );
  opacity: 0.7;
}

.bottom-editor-handle {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: rgba(180, 195, 230, 0.22);
  margin: 0 auto 8px;
}

.bottom-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.bottom-editor-meta {
  min-width: 0;
  flex: 1;
}

.bottom-editor-name {
  font-size: 16px;
  font-weight: 900;
  color: #f2f6ff;
  line-height: 1.08;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-editor-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #8fa0bd;
  line-height: 1.25;
}

.bottom-editor-close,
#employee-panel-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(120,145,190,0.16);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  color: #eef4ff;
  cursor: pointer;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.bottom-editor-close:hover,
#employee-panel-close:hover {
  background: rgba(255,255,255,0.08);
}

.bottom-editor-body,
#context-section-cell-body.bottom-editor-body,
#context-section-cell-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bottom-editor-status-row {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.bottom-editor-status {
  min-width: 108px;
  padding: 7px 9px;
  border-radius: 12px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(120,145,190,0.12);
  color: #eef4ff;
  font-size: 12px;
  flex: 0 0 auto;
}

.bottom-editor-status .label {
  display: block;
  font-size: 10px;
  color: #8b98af;
  margin-bottom: 2px;
}

.bottom-editor-actions {
  display: grid;
  grid-template-columns: minmax(220px, 270px) auto auto;
  gap: 8px;
  align-items: center;
}

.bottom-time-input,
#custom-time-input.bottom-time-input,
#custom-time-input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(122,165,255,0.16);
  background: rgba(255,255,255,0.045);
  color: #eef4ff;
  padding: 0 14px;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: none;
}

.bottom-time-input::placeholder,
#custom-time-input::placeholder {
  color: #7f8da6;
  font-weight: 500;
}

.bottom-time-input:focus,
#custom-time-input:focus {
  border-color: rgba(122,165,255,0.45);
  box-shadow: 0 0 0 4px rgba(91,141,239,0.12);
}

.primary-btn,
#assign-custom-btn,
#remove-assignment-btn,
#close-panel-btn {
  height: 46px;
  border-radius: 14px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 800;
}

#assign-custom-btn {
  border: 1px solid rgba(91,141,239,0.26);
  background: linear-gradient(180deg, rgba(91,141,239,1), rgba(72,120,220,1));
  color: #fff;
}

#assign-custom-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(58, 101, 194, 0.28);
}

#remove-assignment-btn {
  border: 1px solid rgba(210,106,120,0.26);
  background: rgba(210,106,120,0.08);
  color: #ffb6bf;
}

#close-panel-btn {
  display: none !important;
}

.bottom-editor-slots-wrap {
  min-height: 54px;
}

.bottom-editor-slots-label {
  font-size: 11px;
  color: #8fa0bd;
  margin-bottom: 5px;
}

.bottom-editor-slots,
#slot-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.bottom-editor-slots::-webkit-scrollbar,
#slot-list::-webkit-scrollbar {
  height: 6px;
}

.bottom-editor-slots::-webkit-scrollbar-thumb,
#slot-list::-webkit-scrollbar-thumb {
  background: rgba(140, 160, 200, 0.18);
  border-radius: 999px;
}

.bottom-editor .slot-btn,
#context-section-cell .slot-btn {
  flex: 0 0 auto;
  min-width: 148px;
  max-width: 168px;
  height: 74px;
  border-radius: 14px;
  padding: 8px 10px;
  border: 1px solid rgba(120,145,190,0.14);
  background: rgba(255,255,255,0.04);
  color: #eef4ff;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  overflow: hidden;
}

.bottom-editor .slot-btn:hover:not(:disabled),
#context-section-cell .slot-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.07);
  border-color: rgba(122,165,255,0.24);
  transform: translateY(-1px);
}

.bottom-editor .slot-time,
#context-section-cell .slot-time {
  display: block;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 2px;
  color: #f4f7ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-editor .slot-note,
#context-section-cell .slot-note {
  display: block;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-editor .slot-btn .slot-note:nth-of-type(1),
#context-section-cell .slot-btn .slot-note:nth-of-type(1) {
  font-size: 12px;
  font-weight: 800;
  color: #eef4ff;
}

.bottom-editor .slot-btn .slot-note:nth-of-type(2),
#context-section-cell .slot-btn .slot-note:nth-of-type(2) {
  font-size: 10px;
  color: #93a1b7;
}

.bottom-editor .slot-state,
#context-section-cell .slot-state {
  display: block;
  margin-top: auto;
  padding-top: 4px;
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.78);
}

/* ===== статусы быстрых слотов ===== */

.bottom-editor .slot-btn.slot-current,
#context-section-cell .slot-btn.slot-current {
  border: 1px solid rgba(91, 141, 239, 0.55);
  background: linear-gradient(
    180deg,
    rgba(91, 141, 239, 0.16),
    rgba(91, 141, 239, 0.10)
  );
  box-shadow: inset 0 0 0 1px rgba(91, 141, 239, 0.08);
}

.bottom-editor .slot-btn.slot-free,
#context-section-cell .slot-btn.slot-free {
  border: 1px solid rgba(79, 201, 140, 0.42);
  background: linear-gradient(
    180deg,
    rgba(79, 201, 140, 0.13),
    rgba(79, 201, 140, 0.08)
  );
}

.bottom-editor .slot-btn.slot-free-last,
#context-section-cell .slot-btn.slot-free-last {
  border: 1px solid rgba(255, 184, 77, 0.50);
  background: linear-gradient(
    180deg,
    rgba(255, 184, 77, 0.14),
    rgba(255, 184, 77, 0.08)
  );
}

.bottom-editor .slot-btn.slot-full,
#context-section-cell .slot-btn.slot-full {
  border: 1px solid rgba(255, 107, 107, 0.35);
  background: linear-gradient(
    180deg,
    rgba(255, 107, 107, 0.10),
    rgba(255, 107, 107, 0.06)
  );
  opacity: 0.78;
}

.bottom-editor .slot-btn.slot-full:disabled,
#context-section-cell .slot-btn.slot-full:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.bottom-editor .slot-btn.slot-current .slot-state,
#context-section-cell .slot-btn.slot-current .slot-state {
  color: #cfe0ff;
}

.bottom-editor .slot-btn.slot-free .slot-state,
#context-section-cell .slot-btn.slot-free .slot-state {
  color: #bfe8cb;
}

.bottom-editor .slot-btn.slot-free-last .slot-state,
#context-section-cell .slot-btn.slot-free-last .slot-state {
  color: #ffd89a;
}

.bottom-editor .slot-btn.slot-full .slot-state,
#context-section-cell .slot-btn.slot-full .slot-state {
  color: #ffb8b8;
}

.bottom-editor-empty-note,
#slot-empty-note {
  font-size: 11px;
  color: #8fa0bd;
  padding-top: 2px;
}

/* -------------------- legend -------------------- */

.legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.legend-box {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* -------------------- toast -------------------- */

.toast-wrap {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.toast {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  padding: 11px 12px;
  font-size: 12px;
  line-height: 1.4;
  background: #162031;
  color: var(--text);
}

.toast.success {
  background: #203626;
  border-color: #4d9961;
}

.toast.error {
  background: #402126;
  border-color: #b86472;
}

.toast.warn {
  background: #3a3218;
  border-color: #9e8240;
}

/* -------------------- modals -------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  backdrop-filter: blur(2px);
}

.modal-backdrop.open {
  display: flex;
  animation: modalBackdropIn 0.18s ease;
}

@keyframes modalBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  width: 100%;
  max-width: 460px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 14px;
  white-space: pre-line;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* -------------------- api error -------------------- */

.api-error-box {
  margin-top: 10px;
  background: rgba(210, 106, 120, 0.10);
  border: 1px solid rgba(210, 106, 120, 0.24);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: #ffd7dd;
}

/* ==================== glow effects ==================== */

.day-column.active-day,
.day-summary-card.active,
.problem-day-card.active {
  position: relative;
  z-index: 2;
  box-shadow:
    0 0 0 1px rgba(122, 165, 255, 0.25),
    0 0 18px rgba(122, 165, 255, 0.18),
    0 0 42px rgba(122, 165, 255, 0.12);
  background:
    linear-gradient(
      180deg,
      rgba(122, 165, 255, 0.06),
      rgba(122, 165, 255, 0.02)
    ),
    var(--panel);
}

.day-column.active-day::after,
.day-summary-card.active::after,
.problem-day-card.active::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    0 0 24px rgba(122, 165, 255, 0.22),
    0 0 60px rgba(122, 165, 255, 0.10);
  opacity: 0.6;
}

td.day-cell.selected {
  position: relative;
  z-index: 4;
  box-shadow:
    inset 0 0 0 2px var(--accent-2),
    0 0 14px rgba(91, 141, 239, 0.20),
    0 0 36px rgba(91, 141, 239, 0.14);
}

td.day-cell:hover {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    0 0 10px rgba(255, 255, 255, 0.06),
    0 0 20px rgba(91, 141, 239, 0.10);
}

.day-column.active-day::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(122, 165, 255, 0.9),
    transparent
  );
  box-shadow: 0 0 12px rgba(122, 165, 255, 0.6);
}

/* ==================== day heatmap ==================== */

.day-summary-card.heat-low {
  background:
    linear-gradient(180deg, rgba(77, 153, 97, 0.08), rgba(77, 153, 97, 0.03)),
    var(--panel);
  border-color: rgba(77, 153, 97, 0.22);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px rgba(77, 153, 97, 0.06);
}

.day-summary-card.heat-medium {
  background:
    linear-gradient(180deg, rgba(201, 167, 74, 0.10), rgba(201, 167, 74, 0.04)),
    var(--panel);
  border-color: rgba(201, 167, 74, 0.24);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px rgba(201, 167, 74, 0.07);
}

.day-summary-card.heat-high {
  background:
    linear-gradient(180deg, rgba(210, 106, 120, 0.11), rgba(210, 106, 120, 0.05)),
    var(--panel);
  border-color: rgba(210, 106, 120, 0.26);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px rgba(210, 106, 120, 0.08);
}

.day-summary-card.heat-low::before,
.day-summary-card.heat-medium::before,
.day-summary-card.heat-high::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  border-radius: 999px;
  pointer-events: none;
}

.day-summary-card.heat-low::before {
  background: linear-gradient(90deg, transparent, rgba(77,153,97,0.95), transparent);
  box-shadow: 0 0 10px rgba(77,153,97,0.45);
}

.day-summary-card.heat-medium::before {
  background: linear-gradient(90deg, transparent, rgba(201,167,74,0.95), transparent);
  box-shadow: 0 0 10px rgba(201,167,74,0.45);
}

.day-summary-card.heat-high::before {
  background: linear-gradient(90deg, transparent, rgba(210,106,120,0.95), transparent);
  box-shadow: 0 0 10px rgba(210,106,120,0.45);
}

.day-load-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

.day-load-pill.low {
  color: #d7f0dd;
  border-color: rgba(77,153,97,0.24);
  background: rgba(77,153,97,0.12);
}

.day-load-pill.medium {
  color: #f1e2ae;
  border-color: rgba(201,167,74,0.24);
  background: rgba(201,167,74,0.12);
}

.day-load-pill.high {
  color: #ffd3d9;
  border-color: rgba(210,106,120,0.24);
  background: rgba(210,106,120,0.12);
}

.day-load-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.day-load-pill.low .day-load-dot {
  background: #4d9961;
  box-shadow: 0 0 8px rgba(77,153,97,0.45);
}

.day-load-pill.medium .day-load-dot {
  background: #c9a74a;
  box-shadow: 0 0 8px rgba(201,167,74,0.45);
}

.day-load-pill.high .day-load-dot {
  background: #d26a78;
  box-shadow: 0 0 8px rgba(210,106,120,0.45);
}

/* ==================== compact problem days ==================== */

.days-summary-grid.compact-problems {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.day-summary-card.problem-only {
  position: relative;
  background:
    linear-gradient(180deg, rgba(210, 106, 120, 0.08), rgba(210, 106, 120, 0.03)),
    var(--panel);
  border: 1px solid rgba(210, 106, 120, 0.22);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.day-summary-card.problem-only:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.day-summary-title.problem {
  color: #ffb3bd;
  font-size: 13px;
  font-weight: 800;
}

.day-summary-problem-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.day-summary-problem-item {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  padding: 8px 9px;
}

.day-summary-problem-time {
  font-size: 11px;
  font-weight: 800;
  color: #ffd3d9;
  margin-bottom: 3px;
}

.day-summary-problem-meta {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.35;
}

.day-summary-problem-missing {
  display: inline-flex;
  margin-top: 5px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  color: #ffd7dd;
  background: rgba(210,106,120,0.14);
  border: 1px solid rgba(210,106,120,0.24);
}

.day-summary-ok-hidden {
  display: none !important;
}

/* ==================== NEW DAYS SUMMARY ==================== */

.days-summary-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-day-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.summary-day-card.warn {
  background:
    linear-gradient(180deg, rgba(201,167,74,0.08), rgba(201,167,74,0.03)),
    var(--panel);
  border-color: rgba(201,167,74,0.25);
}

.summary-day-card.critical {
  background:
    linear-gradient(180deg, rgba(210,106,120,0.10), rgba(210,106,120,0.04)),
    var(--panel);
  border-color: rgba(210,106,120,0.28);
}

.summary-day-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.30);
}

.summary-day-card.active {
  transform: translateY(-2px);
  border-color: rgba(122,165,255,0.40);
  box-shadow:
    0 0 0 1px rgba(122,165,255,0.20),
    0 14px 36px rgba(0,0,0,0.34),
    0 0 36px rgba(122,165,255,0.10);
}

.summary-day-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  border-radius: 999px;
  opacity: 0.8;
}

.summary-day-card.warn::before {
  background: linear-gradient(90deg, transparent, #c9a74a, transparent);
}

.summary-day-card.critical::before {
  background: linear-gradient(90deg, transparent, #d26a78, transparent);
}

.summary-day-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.summary-day-title-row {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.summary-day-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.summary-day-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.summary-day-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.summary-day-subtitle {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.summary-day-expanded {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  animation: summaryExpand 0.18s ease;
}

.summary-day-card.active .summary-day-expanded {
  display: flex;
}

.summary-slot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 10px 11px;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.18s ease;
}

.summary-slot-row:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}

.summary-slot-row.problem-action {
  cursor: pointer;
}

.summary-slot-row.problem-action.open {
  background: rgba(91, 141, 239, 0.09);
  border-color: rgba(122, 165, 255, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(122, 165, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.summary-slot-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.summary-slot-time {
  font-size: 14px;
  font-weight: 800;
  color: #f1f6ff;
}

.summary-slot-meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.summary-slot-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex: 0 0 auto;
}

.summary-slot-used {
  font-size: 11px;
  color: var(--muted);
}

.problem-candidates-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: -2px 0 6px;
  padding: 12px;
  border: 1px solid rgba(122, 165, 255, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(91, 141, 239, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(12, 18, 30, 0.74);
  animation: summaryExpand 0.18s ease;
}

.problem-candidates-workspace {
  grid-column: 1 / -1;
  margin: 4px 0 2px;
  padding: 18px;
  gap: 16px;
  border-color: rgba(122, 165, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(91, 141, 239, 0.10), rgba(255, 255, 255, 0.025)),
    rgba(8, 14, 24, 0.90);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 42px rgba(0, 0, 0, 0.24);
}

.problem-candidates-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.problem-candidates-workspace-kicker {
  color: #93b7ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.problem-candidates-workspace-slot {
  margin-top: 4px;
  color: #f7faff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}

.problem-candidates-workspace-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.problem-candidates-workspace .problem-candidate-name {
  overflow: visible;
  white-space: normal;
}

.problem-candidates-close {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  color: #dce7f7;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.problem-candidates-close:hover {
  border-color: rgba(122, 165, 255, 0.28);
  background: rgba(122, 165, 255, 0.12);
  color: #ffffff;
}

.problem-candidates-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.problem-candidates-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.problem-candidates-title {
  font-size: 13px;
  font-weight: 900;
  color: #eef4ff;
}

.problem-candidates-note {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.problem-candidates-count,
.problem-other-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  color: #dbe8ff;
  border: 1px solid rgba(122, 165, 255, 0.22);
  background: rgba(91, 141, 239, 0.12);
}

.problem-candidates-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 10px;
}

.problem-candidates-list.other {
  padding-top: 2px;
}

.problem-candidate-card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 72px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.045);
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.18s ease;
}

.problem-candidate-card:hover {
  transform: translateY(-1px);
  border-color: rgba(122, 165, 255, 0.22);
  background: rgba(255,255,255,0.065);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.problem-candidate-card.exact {
  border-color: rgba(77, 153, 97, 0.22);
  background: rgba(77, 153, 97, 0.08);
}

.problem-candidate-main {
  min-width: 0;
}

.problem-candidate-name {
  font-size: 13px;
  font-weight: 900;
  color: #f5f8ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.problem-candidate-meta,
.problem-candidate-status {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.25;
}

.problem-candidate-status {
  color: #dbe8ff;
  font-weight: 800;
}

.problem-candidate-assign {
  flex: 0 0 auto;
  min-height: 34px;
  padding-inline: 12px;
}

.problem-candidates-empty {
  grid-column: 1 / -1;
  padding: 10px;
  border: 1px dashed rgba(255,255,255,0.14);
  border-radius: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.problem-other-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #eef4ff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.problem-other-toggle:hover,
.problem-other-toggle.open {
  transform: translateY(-1px);
  background: rgba(91, 141, 239, 0.10);
  border-color: rgba(122, 165, 255, 0.22);
}

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

/* ==================== WEEK PROGRESS ==================== */

#week-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.week-progress-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.week-progress-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.28);
}

.week-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.week-progress-title {
  font-size: 13px;
  font-weight: 800;
}

.week-progress-percent {
  font-size: 14px;
  font-weight: 900;
  color: #eaf2ff;
}

.week-progress-bar {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.week-progress-fill {
  position: relative;
  height: 100%;
  border-radius: 999px;
  width: 0%;
  transition: width 0.4s ease;
  background: linear-gradient(
    90deg,
    #5b8def,
    #7aa5ff,
    #5b8def
  );
  box-shadow:
    0 0 12px rgba(91,141,239,0.45),
    0 0 28px rgba(91,141,239,0.25);
}

.week-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.25),
    transparent
  );
  animation: progressShimmer 2.4s infinite linear;
}

@keyframes progressShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.week-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}

.week-progress-text {
  font-size: 12px;
  color: var(--muted);
}

.week-progress-card.high .week-progress-fill {
  background: linear-gradient(90deg, #4d9961, #6fb983, #4d9961);
  box-shadow:
    0 0 12px rgba(77,153,97,0.45),
    0 0 26px rgba(77,153,97,0.25);
}

.week-progress-card.medium .week-progress-fill {
  background: linear-gradient(90deg, #c9a74a, #efdca5, #c9a74a);
  box-shadow:
    0 0 12px rgba(201,167,74,0.45),
    0 0 26px rgba(201,167,74,0.25);
}

.week-progress-card.low .week-progress-fill {
  background: linear-gradient(90deg, #d26a78, #ff9aa7, #d26a78);
  box-shadow:
    0 0 12px rgba(210,106,120,0.45),
    0 0 26px rgba(210,106,120,0.25);
}

.week-progress-card.high::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    0 0 30px rgba(77,153,97,0.20),
    0 0 60px rgba(77,153,97,0.10);
}

/* ==================== reduced motion ==================== */

@media (prefers-reduced-motion: reduce) {
  .day-column.active-day,
  .day-summary-card.active,
  .problem-day-card.active,
  td.day-cell.selected {
    box-shadow: none !important;
  }

  .day-column.active-day::after,
  .day-summary-card.active::after,
  .problem-day-card.active::after,
  .day-column.active-day::before {
    display: none !important;
  }

  .week-progress-fill::after {
    display: none;
  }

  .week-progress-fill {
    transition: none;
  }

  .quick-assign-popover,
  .bottom-editor,
  .employee-sheet-backdrop {
    transition: none !important;
    animation: none !important;
  }
}

/* ==================== responsive ==================== */

@media (max-width: 1400px) {
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .days-summary-grid.compact-problems {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 980px) {
  .quick-assign-fab-wrap {
    top: 82px;
    right: 12px;
  }

  .quick-assign-popover {
    width: min(340px, calc(100vw - 24px));
  }

  .bottom-editor,
  #context-section-cell.bottom-editor,
  #context-section-cell {
    left: 6px;
    right: 6px;
    bottom: 6px;
    max-height: 31vh;
    min-height: 170px;
  }

  .bottom-editor-status-row {
    flex-wrap: wrap;
  }

  .bottom-editor-actions {
    grid-template-columns: 1fr;
  }

  .bottom-time-input,
  #custom-time-input.bottom-time-input,
  #custom-time-input,
  .primary-btn,
  #assign-custom-btn,
  #remove-assignment-btn {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .summary-day-head {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-day-badges {
    justify-content: flex-start;
  }

  .summary-slot-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-slot-side {
    align-items: flex-start;
  }

  .bottom-editor-name {
    font-size: 15px;
  }

  .bottom-editor .slot-btn,
  #context-section-cell .slot-btn {
    min-width: 118px;
    height: 54px;
  }
}


/* =========================================================
   HARD FIX: EMPLOYEE CARD POSITION / SIZE
   ========================================================= */

#context-section-cell,
#context-section-cell.bottom-editor,
.bottom-editor {
  position: fixed !important;
  left: 12px !important;
  right: 12px !important;
  bottom: 10px !important;
  width: auto !important;
  min-width: auto !important;
  max-width: none !important;

  height: auto !important;
  min-height: 210px !important;
  max-height: 30vh !important;

  display: block !important;
  overflow: hidden !important;
  box-sizing: border-box !important;

  margin: 0 !important;
  padding: 10px 12px 12px !important;

  border-radius: 20px !important;
  z-index: 90 !important;
}

#context-section-cell.hidden,
.bottom-editor.hidden {
  display: none !important;
}

#context-section-cell.open,
.bottom-editor.open {
  transform: translateY(0) !important;
  opacity: 1 !important;
}

#context-section-cell .bottom-editor-body,
#context-section-cell-body,
#context-section-cell-body.bottom-editor-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#context-section-cell .bottom-editor-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-bottom: 8px !important;
}

#context-section-cell .bottom-editor-meta {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

#context-section-cell .bottom-editor-name {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#context-section-cell .bottom-editor-status-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

#context-section-cell .bottom-editor-actions {
  display: grid !important;
  grid-template-columns: minmax(220px, 280px) minmax(180px, 220px) minmax(180px, 220px) !important;
  gap: 8px !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
}

#context-section-cell #custom-time-input,
#context-section-cell .bottom-time-input {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

#context-section-cell .bottom-editor-slots-wrap {
  width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

#context-section-cell #slot-list,
#context-section-cell .bottom-editor-slots {
  display: flex !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

#context-section-cell .modal-actions {
  display: none !important;
}

/* если экран уже — складываем кнопки нормально */
@media (max-width: 1100px) {
  #context-section-cell,
  #context-section-cell.bottom-editor,
  .bottom-editor {
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    max-height: 36vh !important;
    min-height: 240px !important;
  }

  #context-section-cell .bottom-editor-actions {
    grid-template-columns: 1fr !important;
  }
}

/* ==================== concept problems per concept ==================== */

.concept-header {
  justify-content: space-between;
}

.concept-header-left {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.concept-title {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.concept-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.concept-problems-toggle {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(8, 14, 24, 0.22);
  color: #f3f7ff;
  border-radius: 999px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
  backdrop-filter: blur(6px);
}

.concept-problems-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.22);
}

.concept-problems-toggle.warn {
  border-color: rgba(201,167,74,0.32);
  background: rgba(201,167,74,0.14);
  color: #f4e3af;
}

.concept-problems-toggle.critical {
  border-color: rgba(210,106,120,0.34);
  background: rgba(210,106,120,0.14);
  color: #ffd3d9;
}

.concept-problems-toggle.ok,
.concept-problems-toggle.empty {
  border-color: rgba(122,165,255,0.22);
  background: rgba(122,165,255,0.10);
  color: #dce9ff;
}

.concept-problems-toggle.open {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05) inset,
    0 12px 24px rgba(0,0,0,0.22);
}

.concept-problems-badge-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.concept-problems-icon {
  font-size: 12px;
  line-height: 1;
}

.concept-problems-count {
  min-width: 10px;
  text-align: center;
}

.concept-problems-chevron {
  font-size: 11px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.concept-problems-toggle.open .concept-problems-chevron {
  transform: rotate(180deg);
}

.concept-problems-panel {
  display: none;
  padding: 0 14px 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.concept-problems-panel.open {
  display: block;
  animation: conceptProblemsIn 0.2s ease;
}

@keyframes conceptProblemsIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.concept-problems-panel-inner {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  border-radius: 16px;
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.concept-problems-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.concept-problems-panel-title {
  font-size: 13px;
  font-weight: 900;
  color: #f1f6ff;
}

.concept-problems-panel-subtitle {
  font-size: 11px;
  color: var(--muted);
}

.concept-problems-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.concept-problem-day {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 11px;
  background: rgba(255,255,255,0.03);
}

.concept-problem-day.warn {
  background:
    linear-gradient(180deg, rgba(201,167,74,0.08), rgba(201,167,74,0.03)),
    rgba(255,255,255,0.02);
  border-color: rgba(201,167,74,0.22);
}

.concept-problem-day.critical {
  background:
    linear-gradient(180deg, rgba(210,106,120,0.10), rgba(210,106,120,0.04)),
    rgba(255,255,255,0.02);
  border-color: rgba(210,106,120,0.24);
}

.concept-problem-day-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.concept-problem-day-title-wrap {
  min-width: 0;
}

.concept-problem-day-title {
  font-size: 13px;
  font-weight: 800;
  color: #f1f6ff;
}

.concept-problem-day-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}

.concept-problem-day-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.concept-problem-day-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.concept-problem-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 9px 10px;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.18s ease;
}

.concept-problem-row:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.065);
  border-color: rgba(255,255,255,0.14);
}

.concept-problem-row.open {
  background: rgba(91, 141, 239, 0.10);
  border-color: rgba(122, 165, 255, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(122, 165, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.16);
}

.concept-problem-day-list > .problem-candidates-panel {
  margin: -2px 0 4px;
}

.concept-problem-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.concept-problem-row-main {
  min-width: 0;
}

.concept-problem-row-time {
  font-size: 12px;
  font-weight: 800;
  color: #f5f8ff;
}

.concept-problem-row-meta {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 2px;
}

.concept-problem-row-right {
  flex: 0 0 auto;
}

.concept-problems-panel.open {
  max-height: min(68vh, 680px);
  overflow: auto;
  padding-bottom: 10px;
}

.concept-problems-panel-inner {
  padding: 10px;
}

.concept-problems-panel-head {
  position: sticky;
  top: 0;
  z-index: 2;
  align-items: center;
  min-height: 30px;
  margin: -10px -10px 8px;
  padding: 10px 10px 8px;
  background: rgba(18, 24, 38, 0.94);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
}

.concept-problems-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
  gap: 8px;
}

.concept-problem-day {
  padding: 9px;
}

.concept-problem-day-head {
  align-items: center;
  margin-bottom: 7px;
}

.concept-problem-day-title {
  font-size: 12px;
}

.concept-problem-day-meta {
  display: none;
}

.concept-problem-day-badges .badge:first-child {
  display: none;
}

.concept-problem-day-list {
  gap: 6px;
}

.concept-problem-row {
  min-height: 42px;
  padding: 7px 8px;
  border-radius: 10px;
}

.concept-problem-row-time {
  font-size: 12px;
}

.concept-problem-row-meta {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.concept-problem-row .badge {
  padding: 5px 8px;
  font-size: 10px;
}

.concept-problem-day-list > .problem-candidates-panel {
  grid-column: 1 / -1;
}

.concept-problems-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(122,165,255,0.16);
  background: rgba(122,165,255,0.08);
  border-radius: 14px;
  padding: 12px;
}

.concept-problems-empty-title {
  font-size: 12px;
  font-weight: 800;
  color: #eef4ff;
}

.concept-problems-empty-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.concept-health-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
    rgba(8, 14, 24, 0.24);
}

.concept-header-right .concept-problems-toggle {
  display: none !important;
}

.concept-health-strip.warn {
  background:
    linear-gradient(180deg, rgba(201, 167, 74, 0.10), rgba(201, 167, 74, 0.035)),
    rgba(8, 14, 24, 0.24);
  border-bottom-color: rgba(201, 167, 74, 0.20);
}

.concept-health-strip.critical {
  background:
    linear-gradient(180deg, rgba(210, 106, 120, 0.12), rgba(210, 106, 120, 0.04)),
    rgba(8, 14, 24, 0.24);
  border-bottom-color: rgba(210, 106, 120, 0.22);
}

.concept-health-strip.empty {
  min-height: 40px;
}

.concept-health-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.concept-health-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: #7aa5ff;
  box-shadow: 0 0 12px rgba(122, 165, 255, 0.45);
}

.concept-health-dot.ok {
  background: #4d9961;
  box-shadow: 0 0 12px rgba(77, 153, 97, 0.45);
}

.concept-health-dot.warn {
  background: #c9a74a;
  box-shadow: 0 0 12px rgba(201, 167, 74, 0.45);
}

.concept-health-dot.critical {
  background: #d26a78;
  box-shadow: 0 0 12px rgba(210, 106, 120, 0.45);
}

.concept-health-title {
  min-width: 0;
  color: #eef4ff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.concept-health-count,
.concept-health-meta {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.concept-health-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex: 1 1 auto;
  overflow-x: auto;
  padding: 2px 0 3px;
}

.concept-health-chip,
.concept-health-open {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #dbe8ff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}

.concept-health-chip {
  padding: 6px 9px;
}

.concept-health-open {
  padding: 6px 10px;
  color: #cfe0ff;
  border-color: rgba(122, 165, 255, 0.18);
  background: rgba(122, 165, 255, 0.09);
}

.concept-health-open.open {
  color: #eef4ff;
  border-color: rgba(122, 165, 255, 0.30);
  background: rgba(122, 165, 255, 0.14);
}

.concept-health-chip:hover,
.concept-health-open:hover {
  transform: translateY(-1px);
  border-color: rgba(122, 165, 255, 0.28);
  background: rgba(122, 165, 255, 0.12);
}

.concept-health-chip.warn {
  color: #f1e2ae;
  border-color: rgba(201, 167, 74, 0.28);
  background: rgba(201, 167, 74, 0.12);
}

.concept-health-chip.critical {
  color: #ffd3d9;
  border-color: rgba(210, 106, 120, 0.30);
  background: rgba(210, 106, 120, 0.13);
}

.concept-health-chip b {
  color: #fff;
  font-size: 11px;
}

.concept-health-chip em {
  font-style: normal;
  font-size: 10px;
  color: #fff;
}

@media (max-width: 860px) {
  .concept-problem-day-head,
  .concept-problems-panel-head,
  .concept-problem-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .concept-problem-day-badges {
    justify-content: flex-start;
  }

  .concept-header {
    gap: 8px;
  }

  .concept-title {
    max-width: 140px;
  }

  .concept-health-strip {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .concept-health-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ==================== AUTH SCREEN ==================== */

.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(91, 141, 239, 0.16), transparent 34%),
    linear-gradient(180deg, #0d1118, #080c13);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  border: 1px solid rgba(122, 165, 255, 0.16);
  border-radius: 26px;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(18, 24, 38, 0.96), rgba(12, 18, 30, 0.96));
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255,255,255,0.03);
}

.auth-badge {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #dbe8ff;
  background: rgba(91, 141, 239, 0.14);
  border: 1px solid rgba(91, 141, 239, 0.24);
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.1;
  color: #f3f7ff;
}

.auth-subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}

.auth-tab {
  border: none;
  border-radius: 10px;
  padding: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.auth-tab.active {
  background: rgba(91, 141, 239, 0.16);
  color: #dbe8ff;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-input {
  width: 100%;
  min-width: 0;
  height: 46px;
  font-size: 14px;
  border-radius: 14px;
}

.auth-btn {
  width: 100%;
  height: 46px;
  margin-top: 4px;
  border-radius: 14px;
  font-size: 14px;
}

.auth-hint {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}

.auth-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 12px;
  line-height: 1.4;
  color: #ffd7dd;
  background: rgba(210, 106, 120, 0.12);
  border: 1px solid rgba(210, 106, 120, 0.26);
}

/* ==================== PUBLISH BUTTON ==================== */

.publish-btn {
  background: linear-gradient(
    135deg,
    #34c759,
    #22a447
  );

  color: #fff;
  font-weight: 800;

  border: none;

  box-shadow:
    0 10px 28px rgba(52, 199, 89, 0.24);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease,
    filter 0.18s ease;
}

.publish-btn:hover:not(:disabled) {
  transform: translateY(-1px);

  box-shadow:
    0 14px 34px rgba(52, 199, 89, 0.34);

  filter: brightness(1.03);
}

.publish-btn:active:not(:disabled) {
  transform: translateY(0);
}

.publish-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* mobile */

@media (max-width: 768px) {
  .publish-btn {
    padding-inline: 14px;
    font-size: 12px;
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(7, 10, 18, 0.62);
  backdrop-filter: blur(10px);
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  width: min(440px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 22px;
  background:
    radial-gradient(circle at top left, rgba(79, 140, 255, 0.18), transparent 34%),
    #121826;
  color: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  transform: translateY(10px) scale(0.98);
  animation: modalIn 220ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes modalIn {
  to {
    transform: translateY(0) scale(1);
  }
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
}

.modal-text {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.modal-actions .btn.danger {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

/* =========================================================
   RESTAURANT SETTINGS FLOATING BUTTON / PANEL
   ========================================================= */

.quick-assign-fab-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.restaurant-settings-fab {
  position: relative;
}

.restaurant-settings-fab.is-active {
  border-color: rgba(255, 202, 40, 0.85);
  box-shadow:
    0 0 0 1px rgba(255, 202, 40, 0.25),
    0 14px 40px rgba(255, 202, 40, 0.12);
}

.restaurant-settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 79;
  background: rgba(2, 6, 14, 0.48);
  backdrop-filter: blur(10px);
}

.restaurant-settings-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: 18px;
  width: min(560px, calc(100vw - 36px));
  z-index: 80;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(120, 150, 190, 0.22);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 204, 51, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(16, 23, 36, 0.98), rgba(8, 13, 22, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52);
  overflow: hidden;
}

.restaurant-settings-panel.hidden,
.restaurant-settings-backdrop.hidden {
  display: none;
}

.restaurant-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(120, 150, 190, 0.16);
}

.restaurant-settings-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 24px 24px;
}

.settings-section {
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(120, 150, 190, 0.16);
  border-radius: 18px;
  background: rgba(13, 20, 32, 0.72);
}

.settings-section .section-title {
  margin-bottom: 6px;
}

.settings-section .section-note {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.settings-inline-form {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.settings-inline-form .inline-input {
  flex: 1;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(120, 150, 190, 0.14);
  border-radius: 14px;
  background: rgba(4, 9, 18, 0.42);
}

.settings-list-item-title {
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}

.settings-list-item-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.settings-list-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-tab-panel[data-settings-panel="slots"] .settings-list-item {
  align-items: stretch !important;
}

.settings-tab-panel[data-settings-panel="slots"] .settings-list-item > .settings-slot-fields {
  display: grid !important;
  grid-template-columns: minmax(88px, 1fr) minmax(88px, 1fr) 72px !important;
  grid-template-areas:
    "start end count"
    "position position position" !important;
  gap: 8px !important;
  width: 100%;
}

.settings-tab-panel[data-settings-panel="slots"] .slot-time {
  grid-area: start;
}

.settings-tab-panel[data-settings-panel="slots"] .slot-time-to {
  grid-area: end;
}

.settings-tab-panel[data-settings-panel="slots"] .slot-position {
  grid-area: position;
  width: 100%;
  min-width: 180px;
}

.settings-tab-panel[data-settings-panel="slots"] .slot-count {
  grid-area: count;
}

.settings-tab-panel[data-settings-panel="slots"] .settings-list-item-actions {
  flex: 0 0 auto;
  align-self: flex-start;
}

.settings-tab-panel[data-settings-panel="slots"] .settings-inline-form {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) minmax(150px, 1.5fr) minmax(160px, 1.6fr) minmax(92px, 1fr) minmax(92px, 1fr) 84px auto;
  align-items: center;
}

.settings-tab-panel[data-settings-panel="slots"] .settings-inline-form .inline-input {
  width: 100%;
}

.concept-color-row {
  align-items: flex-start !important;
}

.settings-position-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.concept-color-swatches-host {
  margin-top: 10px;
}

.new-concept-color-wrap {
  min-width: 0;
}

.position-setup-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 4px 0 14px;
}

.settings-onboarding-guide {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.16), rgba(15, 23, 42, 0.72));
}

.settings-onboarding-guide-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.settings-onboarding-progress {
  flex: 0 0 auto;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 999px;
  padding: 5px 9px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.16);
  font-size: 11px;
  font-weight: 850;
}

.settings-onboarding-steps {
  display: grid;
  gap: 8px;
}

.settings-onboarding-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 10px;
  color: #e5edff;
  background: rgba(15, 23, 42, 0.56);
  text-align: left;
  cursor: pointer;
}

.settings-onboarding-step:hover {
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(30, 64, 175, 0.16);
}

.settings-onboarding-step > span:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.settings-onboarding-step small {
  color: rgba(191, 205, 229, 0.72);
  line-height: 1.4;
}

.settings-onboarding-step-number {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.2);
  font-size: 11px;
  font-weight: 900;
}

.settings-onboarding-step.is-complete .settings-onboarding-step-number {
  color: #dcfce7;
  background: rgba(34, 197, 94, 0.22);
}

.settings-onboarding-next {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 10px;
  color: rgba(191, 205, 229, 0.78);
  font-size: 11px;
  line-height: 1.5;
}

.settings-connect-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 12px;
}

.settings-connect-title > div {
  display: grid;
  gap: 3px;
}

.settings-connect-title small,
.settings-connect-card-head small {
  color: rgba(191, 205, 229, 0.72);
  font-size: 11px;
  line-height: 1.4;
}

.settings-connect-refresh,
.settings-connect-primary,
.settings-connect-list a,
.settings-connect-code button {
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 10px;
  color: #eaf2ff;
  background: rgba(37, 99, 235, 0.2);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.settings-connect-refresh {
  flex: 0 0 auto;
  padding: 8px 10px;
}

.settings-connect-grid {
  display: grid;
  gap: 10px;
}

.settings-connect-card {
  display: grid;
  gap: 11px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 14px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.48);
}

.settings-connect-card.is-complete {
  border-color: rgba(74, 222, 128, 0.24);
  background: rgba(22, 101, 52, 0.08);
}

.settings-connect-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.settings-connect-card-head > div {
  display: grid;
  gap: 3px;
}

.settings-connect-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.settings-connect-statuses span {
  border: 1px solid rgba(148, 163, 184, 0.17);
  border-radius: 999px;
  padding: 5px 8px;
  color: rgba(203, 213, 225, 0.74);
  background: rgba(30, 41, 59, 0.66);
  font-size: 10px;
  font-weight: 800;
}

.settings-connect-statuses span.is-ready {
  border-color: rgba(74, 222, 128, 0.24);
  color: #dcfce7;
  background: rgba(22, 101, 52, 0.16);
}

.settings-connect-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: connection-step;
}

.settings-connect-list li {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  border-left: 2px solid rgba(96, 165, 250, 0.2);
  padding: 8px 8px 8px 36px;
  background: rgba(30, 41, 59, 0.28);
  counter-increment: connection-step;
}

.settings-connect-list li::before {
  content: counter(connection-step);
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.2);
  font-size: 10px;
  font-weight: 900;
}

.settings-connect-list li > span {
  color: rgba(191, 205, 229, 0.76);
  font-size: 11px;
  line-height: 1.45;
}

.settings-connect-walkthrough {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}

.settings-connect-walkthrough > div {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

.settings-connect-walkthrough b {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 7px;
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.14);
  font-size: 10px;
}

.settings-connect-walkthrough span,
.settings-connect-help {
  color: rgba(203, 213, 225, 0.82);
  font-size: 11px;
  line-height: 1.48;
}

.settings-connect-walkthrough code {
  color: #bfdbfe;
}

.settings-connect-command {
  display: grid;
  gap: 4px;
  margin-top: 3px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 9px;
  padding: 8px 10px;
  background: rgba(15, 23, 42, 0.56);
}

.settings-connect-command span {
  color: rgba(148, 163, 184, 0.82);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-connect-command code {
  overflow-wrap: anywhere;
  color: #dbeafe;
  font-size: 11px;
  font-weight: 800;
  user-select: all;
}

.settings-connect-help {
  border-left: 2px solid rgba(250, 204, 21, 0.38);
  padding: 2px 0 2px 8px;
  color: rgba(254, 243, 199, 0.76);
}

.settings-connect-primary,
.settings-connect-list a {
  width: fit-content;
  margin-top: 3px;
  padding: 8px 11px;
}

.settings-connect-primary:disabled,
.settings-connect-refresh:disabled {
  opacity: 0.6;
  cursor: wait;
}

.settings-connect-done {
  color: #bbf7d0;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.settings-connect-code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin-top: 3px;
}

.settings-connect-code code {
  overflow-wrap: anywhere;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 9px;
  padding: 8px;
  color: #dbeafe;
  background: rgba(2, 6, 23, 0.62);
  font-size: 10px;
}

.settings-connect-code button {
  padding: 7px 9px;
}

.settings-onboarding-final-check {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(250, 204, 21, 0.18);
  border-radius: 12px;
  padding: 11px 12px;
  color: #fef3c7;
  background: rgba(120, 53, 15, 0.1);
}

.settings-onboarding-final-check span {
  color: rgba(254, 243, 199, 0.72);
  font-size: 11px;
  line-height: 1.45;
}

.settings-tab-panel .is-onboarding-target {
  scroll-margin: 24px;
  animation: settingsOnboardingTarget 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes settingsOnboardingTarget {
  0% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
  }
  32% {
    box-shadow:
      0 0 0 3px rgba(96, 165, 250, 0.48),
      0 14px 34px rgba(37, 99, 235, 0.18);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0);
  }
}

.position-setup-step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(96, 165, 250, 0.15);
  border-radius: 11px;
  background: rgba(30, 64, 175, 0.08);
  color: rgba(207, 224, 255, 0.78);
  font-size: 11px;
  font-weight: 750;
}

.position-setup-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.18);
  color: #dbeafe;
}

.position-create-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(30, 64, 175, 0.13), rgba(15, 23, 42, 0.52));
}

.position-create-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.position-create-label {
  color: rgba(219, 234, 254, 0.82);
  font-size: 11px;
  font-weight: 750;
}

.position-create-color,
.position-create-submit {
  grid-column: 1 / -1;
}

.position-create-submit {
  width: 100%;
  margin-top: 2px;
}

.position-auto-sync-note,
.position-slot-onboarding {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid rgba(74, 222, 128, 0.19);
  border-radius: 13px;
  background: rgba(22, 101, 52, 0.1);
  color: rgba(220, 252, 231, 0.8);
  font-size: 11px;
  line-height: 1.45;
}

.position-auto-sync-note strong,
.position-slot-onboarding strong {
  display: block;
  margin-bottom: 2px;
  color: #dcfce7;
  font-size: 12px;
}

.position-auto-sync-icon {
  flex: 0 0 auto;
  font-size: 17px;
}

.position-list-heading {
  margin: 18px 0 9px;
  color: #eef4ff;
  font-size: 12px;
  font-weight: 850;
}

.unconfigured-positions-section {
  margin-bottom: 12px;
  border-color: rgba(245, 158, 11, 0.2);
  background: rgba(120, 53, 15, 0.08);
}

.unconfigured-position-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.9fr) auto;
  align-items: center;
}

.unconfigured-position-copy {
  min-width: 0;
}

.unconfigured-position-concept {
  width: 100%;
  min-width: 0;
}

.unconfigured-position-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.setup-position-slots-btn {
  white-space: nowrap;
}

.configured-positions-empty {
  margin-top: 10px;
}

.position-slot-onboarding {
  margin: 0 0 12px;
  border-color: rgba(96, 165, 250, 0.32);
  background: rgba(30, 64, 175, 0.14);
  color: rgba(219, 234, 254, 0.82);
  animation: position-onboarding-in 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.position-slot-onboarding strong {
  color: #eff6ff;
}

.position-slot-onboarding.is-complete {
  border-color: rgba(74, 222, 128, 0.32);
  background: rgba(22, 101, 52, 0.14);
  color: rgba(220, 252, 231, 0.82);
}

.position-slot-onboarding-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border: 1px solid rgba(147, 197, 253, 0.38);
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.2);
  color: #dbeafe;
  font-weight: 900;
}

.position-slot-onboarding.is-complete .position-slot-onboarding-icon {
  border-color: rgba(134, 239, 172, 0.38);
  background: rgba(22, 163, 74, 0.2);
  color: #dcfce7;
}

@keyframes position-onboarding-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.concept-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.concept-color-swatch {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(0,0,0,0.04)),
    var(--swatch);
  cursor: pointer;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.16),
    0 5px 12px rgba(0,0,0,0.16);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.concept-color-swatch:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.38);
}

.concept-color-swatch.active {
  border-color: #f4f7ff;
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,0.18),
    0 0 0 3px rgba(122,165,255,0.24),
    0 8px 18px rgba(0,0,0,0.24);
}

.settings-mini-btn {
  border: 1px solid rgba(120, 150, 190, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 7px 10px;
  cursor: pointer;
}

.settings-mini-btn:hover {
  border-color: rgba(255, 202, 40, 0.45);
}

.settings-mini-btn.danger {
  color: #ff7d7d;
}

.restaurant-settings-backdrop.hidden,
.restaurant-settings-panel.hidden {
  display: none !important;
}

.restaurant-settings-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  background: rgba(2, 6, 23, 0.45) !important;
}

.restaurant-settings-panel {
  position: fixed !important;
  top: 24px !important;
  right: 24px !important;
  bottom: 24px !important;
  width: min(560px, calc(100vw - 32px)) !important;
  z-index: 9001 !important;

  background: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  border-radius: 24px !important;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55) !important;

  overflow: hidden !important;
  color: #e5e7eb !important;
}

.restaurant-settings-head {
  display: flex !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 20px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2) !important;
}

.restaurant-settings-body {
  padding: 20px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: calc(100% - 82px) !important;
}

.settings-section {
  margin-bottom: 24px !important;
}

.settings-inline-form,
.settings-slot-form {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  margin-top: 12px !important;
}

.settings-list {
  display: grid !important;
  gap: 8px !important;
  margin-top: 12px !important;
}

.settings-list-item {
  display: flex !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px !important;
  border-radius: 14px !important;
  background: rgba(30, 41, 59, 0.9) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
}

.settings-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -20px -20px 18px;
  padding: 14px 20px 12px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.90));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(12px);
}

.settings-tab {
  flex: 1 1 96px;
  min-width: 88px;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.72);
  color: rgba(226, 232, 240, 0.74);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.settings-tab:hover {
  color: #eef4ff;
  border-color: rgba(122, 165, 255, 0.30);
  background: rgba(30, 41, 59, 0.92);
}

.settings-tab.active {
  color: #eef4ff;
  background:
    linear-gradient(180deg, rgba(91, 141, 239, 0.34), rgba(91, 141, 239, 0.18));
  border-color: rgba(122, 165, 255, 0.42);
  box-shadow:
    0 12px 26px rgba(91, 141, 239, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.settings-tab-panel[hidden] {
  display: none !important;
}

.settings-tab-panel.active {
  animation: settingsTabIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.settings-tab-panel[data-settings-panel="notifications"] {
  overflow-x: hidden;
}

.notification-settings-list {
  gap: 10px;
}

.notification-setting-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: start;
  gap: 10px 12px;
  overflow: hidden;
}

.notification-enable {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.notification-enable input {
  width: 18px;
  height: 18px;
  accent-color: #4a86e8;
}

.notification-copy {
  min-width: 0;
}

.notification-controls {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.notification-weekday,
.notification-time {
  width: 100%;
  min-width: 0;
}

.notification-time {
  text-align: center;
}

.notification-everyday {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.28);
  font-size: 13px;
}

@media (max-width: 760px) {
  .notification-setting-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .notification-controls {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) 96px;
  }
}

/* =========================================================
   UX POLISH LAYER
   ========================================================= */

:where(.btn, .quick-assign-fab, .mini-btn, .slot-btn, .day-pill, .badge, .settings-mini-btn) {
  will-change: transform, box-shadow, border-color, background-color;
}

:where(.btn, .quick-assign-fab, .mini-btn, .slot-btn, .day-pill, .settings-mini-btn):focus-visible,
:where(input, select, textarea, .inline-input):focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(122, 165, 255, 0.18),
    0 0 0 1px rgba(122, 165, 255, 0.48) inset !important;
}

.btn,
.quick-assign-fab,
.mini-btn,
.slot-btn,
.day-pill,
.settings-mini-btn {
  transition:
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 160ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 180ms ease !important;
}

.btn:hover:not(:disabled),
.mini-btn:hover:not(:disabled),
.slot-btn:hover:not(:disabled),
.settings-mini-btn:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn:active:not(:disabled),
.quick-assign-fab:active,
.mini-btn:active:not(:disabled),
.slot-btn:active:not(:disabled),
.day-pill:active,
.settings-mini-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.985) !important;
}

.status-strip,
.section-block,
.stat,
.filters,
.toolbar,
.settings-section,
.settings-list-item {
  transition:
    border-color 220ms ease,
    background-color 220ms ease,
    box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.status-strip:hover,
.section-block:hover,
.stat:hover,
.settings-section:hover {
  border-color: rgba(122, 165, 255, 0.24) !important;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.20);
}

.filters:focus-within,
.toolbar:focus-within {
  border-color: rgba(122, 165, 255, 0.34) !important;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(122, 165, 255, 0.08) inset;
}

.quick-assign-popover {
  transform-origin: top right;
}

.quick-assign-popover.open {
  animation: popoverSpringIn 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.restaurant-settings-backdrop {
  opacity: 0;
  transition:
    opacity 220ms ease,
    backdrop-filter 220ms ease !important;
  backdrop-filter: blur(0) !important;
}

.restaurant-settings-backdrop.open {
  opacity: 1;
  backdrop-filter: blur(10px) !important;
}

.restaurant-settings-panel {
  opacity: 0;
  transform: translateX(18px) scale(0.985);
  transform-origin: right center;
  transition:
    opacity 260ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms ease !important;
}

.restaurant-settings-panel.open {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.staff-management-fab.is-active {
  border-color: rgba(111, 185, 131, 0.85);
  box-shadow:
    0 0 0 1px rgba(111, 185, 131, 0.25),
    0 14px 40px rgba(111, 185, 131, 0.12);
}

.staff-management-backdrop.hidden,
.staff-management-panel.hidden {
  display: none !important;
}

.staff-management-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  display: none;
  opacity: 0;
  background: rgba(2, 6, 23, 0.45) !important;
  backdrop-filter: blur(0);
  transition:
    opacity 220ms ease,
    backdrop-filter 220ms ease !important;
}

.staff-management-backdrop.open {
  opacity: 1;
  backdrop-filter: blur(10px);
}

.staff-management-panel {
  position: fixed !important;
  top: 24px !important;
  right: 24px !important;
  bottom: 24px !important;
  width: min(860px, calc(100vw - 32px)) !important;
  z-index: 9001 !important;
  display: none;
  flex-direction: column;
  overflow: hidden !important;
  color: #e5e7eb !important;
  opacity: 0;
  transform: translateX(18px) scale(0.985);
  transform-origin: right center;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at top left, rgba(111, 185, 131, 0.10), transparent 34%),
    #0f172a !important;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55) !important;
  transition:
    opacity 260ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 260ms ease !important;
}

.staff-management-panel.open {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.staff-management-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.staff-management-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.staff-management-count {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(111, 185, 131, 0.26);
  border-radius: 999px;
  background: rgba(111, 185, 131, 0.12);
  color: #c8f0d1;
  font-size: 12px;
  font-weight: 900;
}

.staff-management-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 22px;
}

.staff-management-list {
  display: grid;
  gap: 12px;
}

.staff-tools {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  gap: 10px;
  margin: -18px -20px 4px;
  padding: 16px 20px 14px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.88));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(12px);
}

.staff-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.staff-search-input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 10px 42px 10px 14px;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  color: #eef4ff;
  font-size: 13px;
  font-weight: 700;
  outline: none;
  appearance: none;
  caret-color: #eef4ff;
  direction: ltr;
  text-align: left;
  unicode-bidi: plaintext;
  transition:
    border-color 0.18s ease,
    box-shadow 0.2s ease,
    background 0.18s ease;
}

.staff-search-input:focus {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: none;
}

.staff-search-input:focus-visible {
  outline: none !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
  box-shadow: none !important;
}

.staff-management-panel .staff-search-wrap,
.staff-management-panel .staff-search-wrap:focus-within,
.staff-management-panel .staff-search-input,
.staff-management-panel .staff-search-input:focus,
.staff-management-panel .staff-search-input:focus-visible,
.staff-management-panel .staff-search-input:active {
  outline: none !important;
  box-shadow: none !important;
}

.staff-search-clear {
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #dce7fb;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.staff-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.staff-filter-chip {
  height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #aebdda;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  transition:
    transform 0.15s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.2s ease;
}

.staff-filter-chip:hover {
  transform: translateY(-1px);
  color: #eef4ff;
  border-color: rgba(122, 165, 255, 0.28);
}

.staff-filter-chip.active {
  color: #dce9ff;
  border-color: rgba(122, 165, 255, 0.38);
  background: rgba(91, 141, 239, 0.16);
  box-shadow: 0 10px 22px rgba(91, 141, 239, 0.10);
}

.staff-results-note {
  color: #8fa4c6;
  font-size: 11px;
  font-weight: 800;
}

.staff-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.staff-row.inactive {
  opacity: 0.72;
}

.staff-row-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #f4f7ff;
  font-size: 14px;
  font-weight: 900;
}

.staff-row-meta {
  margin-top: 4px;
  color: #9aa9c2;
  font-size: 12px;
}

.staff-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #dce7fb;
  font-size: 10px;
  font-weight: 850;
}

.staff-chip.active,
.staff-chip.role-manager {
  border-color: rgba(111, 185, 131, 0.28);
  background: rgba(111, 185, 131, 0.12);
  color: #c8f0d1;
}

.staff-chip.inactive {
  border-color: rgba(210, 106, 120, 0.28);
  background: rgba(210, 106, 120, 0.10);
  color: #ffc4cc;
}

.staff-chip.role-owner {
  border-color: rgba(255, 202, 40, 0.30);
  background: rgba(255, 202, 40, 0.12);
  color: #ffe6a2;
}

.staff-row-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(130px, 0.8fr);
  gap: 10px;
}

.staff-row-grid .inline-input {
  width: 100%;
  min-width: 0;
}

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

.staff-empty {
  padding: 28px;
  border: 1px dashed rgba(143, 181, 255, 0.22);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.52);
}

.staff-empty-title {
  color: #f4f7ff;
  font-size: 16px;
  font-weight: 900;
}

.staff-empty-text {
  margin-top: 6px;
  color: #a9b7d0;
  font-size: 13px;
}

@media (max-width: 920px) {
  .staff-row-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .staff-management-head,
  .staff-management-head-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .staff-row-grid {
    grid-template-columns: 1fr;
  }

  .staff-tools {
    margin-left: -20px;
    margin-right: -20px;
  }

  .staff-filter-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .staff-filter-chip {
    flex: 0 0 auto;
  }
}

.bottom-editor.open,
#context-section-cell.open {
  animation: bottomSheetIn 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.modal-backdrop.show {
  animation: backdropIn 180ms ease both;
}

.modal-backdrop.show .modal {
  animation: modalRiseIn 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.toast {
  animation: toastFloatIn 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.day-cell,
td.name-cell,
th {
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 220ms ease,
    filter 180ms ease,
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.day-cell:hover {
  filter: brightness(1.08);
  box-shadow:
    inset 0 0 0 1px rgba(122, 165, 255, 0.22),
    0 8px 22px rgba(0, 0, 0, 0.16);
}

tr:hover td.name-cell {
  filter: brightness(1.08);
}

.cell-context-menu,
.cell-color-menu,
.employee-color-menu,
.slot-picker-menu {
  animation: menuIn 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: top left;
}

.saving-badge.show::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #8fb5ff;
  box-shadow: 0 0 0 rgba(122, 165, 255, 0.55);
  animation: savingPulse 1200ms ease-in-out infinite;
}

@keyframes popoverSpringIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.965);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes backdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalRiseIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastFloatIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes savingPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(122, 165, 255, 0.42);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(122, 165, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(122, 165, 255, 0);
  }
}

/* =========================================================
   EMPLOYEE PANEL UX POLISH
   ========================================================= */

#reload-btn,
#focus-problems-btn {
  display: none !important;
}

#context-section-cell,
#context-section-cell.bottom-editor,
.bottom-editor {
  min-height: 238px !important;
  max-height: 36vh !important;
  padding: 12px 14px 14px !important;
  border-color: rgba(143, 181, 255, 0.22) !important;
  background:
    radial-gradient(circle at top left, rgba(91, 141, 239, 0.10), transparent 34%),
    linear-gradient(180deg, rgba(12, 18, 31, 0.99), rgba(8, 13, 23, 0.99)) !important;
  box-shadow:
    0 26px 72px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset !important;
}

#context-section-cell .bottom-editor-head {
  margin-bottom: 10px !important;
  padding-right: 2px !important;
}

#context-section-cell .bottom-editor-name {
  font-size: 18px !important;
  letter-spacing: 0 !important;
}

#context-section-cell .bottom-editor-sub {
  gap: 7px !important;
  color: #a9b7d0 !important;
}

#context-section-cell .bottom-editor-sub span:not(:empty) {
  display: inline-flex;
  align-items: center;
}

#context-section-cell .bottom-editor-status-row {
  display: grid !important;
  grid-template-columns: 1.05fr 1fr 1.5fr 1fr !important;
  gap: 10px !important;
  overflow: visible !important;
  padding-bottom: 0 !important;
}

#context-section-cell .bottom-editor-status {
  min-width: 0 !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  background: rgba(15, 23, 42, 0.72) !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

#context-section-cell .bottom-editor-status .label {
  margin-bottom: 5px !important;
  color: #8796b3 !important;
  font-size: 10px !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#context-section-cell .bottom-editor-status span:last-child {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #f2f6ff;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#context-section-cell .bottom-editor-status.status-assigned {
  border-color: rgba(111, 159, 240, 0.36) !important;
  background: linear-gradient(180deg, rgba(36, 54, 79, 0.92), rgba(23, 36, 58, 0.92)) !important;
}

#context-section-cell .bottom-editor-status.status-preferred {
  border-color: rgba(111, 185, 131, 0.34) !important;
  background: linear-gradient(180deg, rgba(34, 58, 42, 0.95), rgba(22, 43, 31, 0.92)) !important;
}

#context-section-cell .bottom-editor-status.status-day-off {
  border-color: rgba(210, 106, 120, 0.34) !important;
  background: linear-gradient(180deg, rgba(64, 33, 38, 0.95), rgba(45, 24, 31, 0.92)) !important;
}

#context-section-cell .bottom-editor-status.status-no-pref {
  border-color: rgba(201, 167, 74, 0.34) !important;
  background: linear-gradient(180deg, rgba(59, 50, 24, 0.95), rgba(42, 36, 22, 0.92)) !important;
}

#context-section-cell .bottom-editor-status.status-silent,
#context-section-cell .bottom-editor-status.status-empty {
  border-color: rgba(80, 99, 132, 0.32) !important;
}

#context-section-cell .bottom-editor-actions {
  grid-template-columns: minmax(170px, 240px) minmax(170px, auto) minmax(140px, auto) !important;
  gap: 10px !important;
}

#context-section-cell #custom-time-input,
#context-section-cell .bottom-time-input {
  height: 44px !important;
  font-size: 20px !important;
  border-color: rgba(143, 181, 255, 0.22) !important;
  background: rgba(3, 8, 18, 0.34) !important;
}

#context-section-cell #assign-custom-btn,
#context-section-cell #remove-assignment-btn {
  height: 44px !important;
  border-radius: 14px !important;
  white-space: nowrap;
}

#context-section-cell #assign-custom-btn {
  box-shadow: 0 12px 28px rgba(58, 101, 194, 0.20);
}

#context-section-cell #remove-assignment-btn:hover:not(:disabled) {
  border-color: rgba(255, 132, 146, 0.42);
  background: rgba(210, 106, 120, 0.14);
}

#context-section-cell .bottom-editor-slots-wrap {
  min-height: 76px !important;
  padding-top: 2px;
}

#context-section-cell .bottom-editor-slots-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px !important;
  color: #b8c5dc !important;
  font-size: 12px !important;
  font-weight: 800;
}

#context-section-cell .bottom-editor-slots-label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #8fb5ff;
  box-shadow: 0 0 14px rgba(143, 181, 255, 0.45);
}

#context-section-cell #slot-list,
#context-section-cell .bottom-editor-slots {
  gap: 10px !important;
  padding-bottom: 8px !important;
}

#context-section-cell .slot-btn {
  min-width: 174px !important;
  max-width: 204px !important;
  height: 86px !important;
  padding: 10px 12px !important;
  border-radius: 16px !important;
}

#context-section-cell .slot-time {
  font-size: 17px !important;
}

#context-section-cell .slot-state {
  padding-top: 6px !important;
  font-weight: 800 !important;
}

#context-section-cell #slot-empty-note {
  display: block;
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px dashed rgba(143, 181, 255, 0.22);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.52);
  color: #aebbd2;
  font-size: 12px;
  line-height: 1.4;
}

.workspace-empty-state {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  margin: 18px 0;
  padding: 34px;
  border: 1px solid rgba(143, 181, 255, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(91, 141, 239, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(8, 13, 23, 0.92));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.workspace-empty-eyebrow {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(143, 181, 255, 0.20);
  border-radius: 999px;
  background: rgba(91, 141, 239, 0.10);
  color: #cfe0ff;
  font-size: 11px;
  font-weight: 850;
}

.workspace-empty-title {
  max-width: 620px;
  color: #f4f7ff;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.12;
}

.workspace-empty-text {
  max-width: 620px;
  color: #a9b7d0;
  font-size: 13px;
  line-height: 1.55;
}

.workspace-empty-action {
  margin-top: 4px;
}

@media (max-width: 900px) {
  #context-section-cell .bottom-editor-status-row,
  #context-section-cell .bottom-editor-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  #context-section-cell #custom-time-input {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* =========================================================
   RIGHT TOOLS / CONFIRM LAYER FIX
   ========================================================= */

.quick-assign-fab-wrap {
  z-index: 9102 !important;
  gap: 10px !important;
}

.quick-assign-fab {
  flex: 0 0 48px;
  width: 48px !important;
  height: 48px !important;
  min-width: 48px;
}

body:has(.restaurant-settings-panel.open) .quick-assign-fab-wrap {
  right: min(596px, calc(100vw - 72px)) !important;
}

body:has(.staff-management-panel.open) .quick-assign-fab-wrap {
  right: min(896px, calc(100vw - 72px)) !important;
}

.restaurant-settings-panel .settings-tab-panel[data-settings-panel="slots"] .settings-list-item {
  align-items: stretch !important;
}

.restaurant-settings-panel .settings-tab-panel[data-settings-panel="slots"] .settings-list-item > .settings-slot-fields {
  display: grid !important;
  grid-template-columns: minmax(88px, 1fr) minmax(88px, 1fr) 72px !important;
  grid-template-areas:
    "start end count"
    "position position position" !important;
  gap: 8px !important;
  width: 100% !important;
}

.restaurant-settings-panel .settings-tab-panel[data-settings-panel="slots"] .slot-time {
  grid-area: start !important;
}

.restaurant-settings-panel .settings-tab-panel[data-settings-panel="slots"] .slot-time-to {
  grid-area: end !important;
}

.restaurant-settings-panel .settings-tab-panel[data-settings-panel="slots"] .slot-position {
  grid-area: position !important;
  width: 100% !important;
  min-width: 180px !important;
}

.restaurant-settings-panel .settings-tab-panel[data-settings-panel="slots"] .slot-count {
  grid-area: count !important;
}

.restaurant-settings-panel .settings-tab-panel[data-settings-panel="slots"] .settings-list-item-actions {
  align-self: flex-start !important;
  flex: 0 0 auto !important;
}

.restaurant-settings-panel .settings-tab-panel[data-settings-panel="slots"] .settings-inline-form {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: center !important;
}

.restaurant-settings-panel .settings-tab-panel[data-settings-panel="slots"] #new-slot-position,
.restaurant-settings-panel .settings-tab-panel[data-settings-panel="slots"] .settings-inline-form .settings-mini-btn {
  grid-column: 1 / -1 !important;
}

.settings-tab-panel[data-settings-panel="slots"] .settings-slot-form {
  padding: 12px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.54);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.settings-tab-panel[data-settings-panel="slots"] .settings-slot-form.is-prefilled {
  border-color: rgba(96, 165, 250, 0.72);
  background: rgba(30, 64, 175, 0.16);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.settings-position-slot-groups {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

.settings-position-slot-group {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(120, 150, 190, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.76));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.settings-position-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.settings-position-slot-title {
  color: #f4f7ff;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
}

.settings-position-slot-subtitle {
  margin-top: 2px;
  color: rgba(191, 205, 224, 0.65);
  font-size: 11px;
}

.settings-position-slot-count {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.13);
  color: #cfe0ff;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.settings-position-slot-list {
  margin-top: 10px !important;
}

.settings-position-slot-group .settings-slot-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 10px !important;
  background: rgba(8, 15, 28, 0.46) !important;
}

.settings-position-slot-group .settings-slot-row > .settings-slot-fields {
  min-width: 0;
  width: auto !important;
}

.settings-position-slot-group .settings-slot-fields > .inline-input,
.restaurant-settings-panel .settings-position-slot-group .settings-slot-fields > .slot-position {
  width: 100% !important;
  min-width: 0 !important;
}

.settings-position-slot-group .settings-slot-row > .settings-list-item-actions {
  min-width: max-content;
}

.settings-position-slot-group .settings-slot-row.is-new-slot {
  border-color: rgba(96, 165, 250, 0.78) !important;
  animation: settings-slot-added 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.settings-slot-added-label {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  min-width: 0;
  margin: -2px 0 1px;
  padding: 7px 9px;
  border: 1px solid rgba(74, 222, 128, 0.28);
  border-radius: 10px;
  background: rgba(22, 101, 52, 0.18);
  color: #bbf7d0;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.settings-slot-added-label.is-leaving {
  opacity: 0;
  transform: translateY(-4px);
}

@keyframes settings-slot-added {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
    box-shadow: 0 0 0 rgba(59, 130, 246, 0);
  }
  55% {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 rgba(59, 130, 246, 0);
  }
}

.settings-position-slot-group .add-position-slot-btn,
.settings-position-slot-empty .open-new-slot-form-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  border-style: dashed;
  border-color: rgba(96, 165, 250, 0.28);
  color: #cfe0ff;
  background: rgba(37, 99, 235, 0.08);
}

.settings-position-slot-group .add-position-slot-btn.is-adding::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border: 2px solid rgba(207, 224, 255, 0.3);
  border-top-color: #cfe0ff;
  border-radius: 50%;
  animation: settings-slot-spinner 650ms linear infinite;
}

@keyframes settings-slot-spinner {
  to { transform: rotate(360deg); }
}

.settings-position-slot-group .add-position-slot-btn:hover,
.settings-position-slot-empty .open-new-slot-form-btn:hover {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(37, 99, 235, 0.15);
}

.settings-position-slot-empty,
.settings-position-slot-empty-note {
  padding: 11px 12px;
  border: 1px dashed rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  color: rgba(191, 205, 224, 0.68);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.settings-position-slot-empty .empty-note {
  padding: 0;
}

.settings-position-slot-group .slot-time,
.settings-position-slot-group .slot-time-to {
  font-variant-numeric: tabular-nums;
}

#confirm-modal.modal-backdrop {
  z-index: 12000 !important;
  background: rgba(3, 7, 18, 0.68) !important;
  backdrop-filter: blur(6px) !important;
}

#confirm-modal .modal {
  z-index: 12001 !important;
  position: relative;
}

#settings-modal.modal-backdrop {
  z-index: 11000 !important;
}

/* =========================================================
   CHANGE HISTORY
   ========================================================= */

.history-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10880;
  background: rgba(3, 7, 18, 0.42);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.history-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.history-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10890;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(143, 181, 255, 0.22);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(91, 141, 239, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(7, 12, 22, 0.98));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
  opacity: 0;
  transform: translateX(18px) scale(0.985);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.history-panel.open {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.history-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.history-body {
  min-height: 220px;
  overflow: auto;
  padding: 12px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.history-item {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.history-action {
  color: #f4f7ff;
  font-size: 13px;
  font-weight: 900;
}

.history-time {
  flex: 0 0 auto;
  color: #8fa4c6;
  font-size: 11px;
  font-weight: 800;
}

.history-target {
  color: #cbd8ef;
  font-size: 12px;
  line-height: 1.35;
}

.history-value {
  margin-top: 8px;
  display: inline-flex;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 10px;
  color: #dce9ff;
  background: rgba(91, 141, 239, 0.12);
  border: 1px solid rgba(122, 165, 255, 0.18);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  word-break: break-word;
}

.history-actor {
  margin-top: 8px;
  color: #8fa4c6;
  font-size: 11px;
  font-weight: 800;
}

.history-action-publish_week {
  border-color: rgba(111, 185, 131, 0.30);
  background:
    linear-gradient(180deg, rgba(111, 185, 131, 0.10), rgba(15, 23, 42, 0.72));
}

.history-action-clear_cell,
.history-action-clear_employee_day,
.history-action-remove_assignment {
  border-color: rgba(210, 106, 120, 0.26);
}

.history-empty,
.history-loading {
  padding: 28px 18px;
  border: 1px dashed rgba(143, 181, 255, 0.22);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.52);
}

.history-empty-title {
  color: #f4f7ff;
  font-size: 15px;
  font-weight: 900;
}

.history-empty-text,
.history-loading {
  color: #a9b7d0;
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  body:has(.restaurant-settings-panel.open) .quick-assign-fab-wrap,
  body:has(.staff-management-panel.open) .quick-assign-fab-wrap {
    top: auto !important;
    right: 14px !important;
    bottom: 14px !important;
    flex-direction: row !important;
  }

  .history-panel {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    max-height: min(78vh, 680px);
    border-radius: 20px;
    transform: translateY(18px) scale(0.985);
  }

  .history-panel.open {
    transform: translateY(0) scale(1);
  }
}

/* =========================================================
   MANAGER COMMAND CENTER
   ========================================================= */

.manager-command-section {
  padding: 0;
  overflow: hidden;
}

.manager-command {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(122, 165, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(18, 24, 38, 0.96), rgba(12, 18, 30, 0.94));
  box-shadow: var(--shadow);
}

.manager-command.warn {
  border-color: rgba(201, 167, 74, 0.26);
  background:
    linear-gradient(180deg, rgba(201, 167, 74, 0.08), rgba(18, 24, 38, 0.94)),
    var(--panel);
}

.manager-command.critical {
  border-color: rgba(210, 106, 120, 0.30);
  background:
    linear-gradient(180deg, rgba(210, 106, 120, 0.10), rgba(18, 24, 38, 0.94)),
    var(--panel);
}

.manager-command.ready {
  border-color: rgba(77, 153, 97, 0.28);
  background:
    linear-gradient(180deg, rgba(77, 153, 97, 0.10), rgba(18, 24, 38, 0.94)),
    var(--panel);
}

.manager-command.empty {
  min-height: 82px;
  align-items: center;
}

.manager-command-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.manager-command-title {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
  color: #f3f7ff;
}

.manager-command-subtitle {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}

.manager-command-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.manager-command-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
}

.manager-metric {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
}

.manager-metric.ok {
  border-color: rgba(77, 153, 97, 0.25);
  background: rgba(77, 153, 97, 0.10);
}

.manager-metric.warn {
  border-color: rgba(201, 167, 74, 0.28);
  background: rgba(201, 167, 74, 0.12);
}

.manager-metric.critical {
  border-color: rgba(210, 106, 120, 0.30);
  background: rgba(210, 106, 120, 0.13);
}

.manager-metric-value {
  font-size: 18px;
  font-weight: 900;
  color: #eef4ff;
}

.manager-metric-label {
  min-width: 0;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.manager-concept-strip,
.manager-problem-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.manager-concept-chip,
.manager-problem-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  max-width: 280px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #dbe8ff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.manager-concept-chip {
  padding: 8px 10px;
}

.manager-problem-chip {
  padding: 7px 9px;
}

.manager-concept-chip:hover,
.manager-problem-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(122, 165, 255, 0.24);
  background: rgba(122, 165, 255, 0.10);
}

.manager-concept-chip.warn,
.manager-problem-chip.warn {
  color: #f1e2ae;
  border-color: rgba(201, 167, 74, 0.28);
  background: rgba(201, 167, 74, 0.12);
}

.manager-concept-chip.critical,
.manager-problem-chip.critical {
  color: #ffd3d9;
  border-color: rgba(210, 106, 120, 0.30);
  background: rgba(210, 106, 120, 0.13);
}

.manager-concept-chip b,
.manager-problem-chip b {
  flex: 0 0 auto;
  font-size: 11px;
  color: #fff;
}

.manager-problem-time {
  flex: 0 0 auto;
  font-weight: 900;
  color: #fff;
}

.manager-problem-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-command-ok {
  padding: 10px 12px;
  border: 1px solid rgba(77, 153, 97, 0.24);
  border-radius: 12px;
  color: #d7f0dd;
  background: rgba(77, 153, 97, 0.10);
  font-size: 12px;
  font-weight: 800;
}

.publish-btn.needs-review {
  background: linear-gradient(135deg, #c9a74a, #a77c24);
  box-shadow: 0 10px 28px rgba(201, 167, 74, 0.22);
}

.publish-btn.ready {
  background: linear-gradient(135deg, #34c759, #22a447);
}

.manager-focus-pulse {
  animation: managerFocusPulse 1.1s ease;
}

@keyframes managerFocusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(122, 165, 255, 0.45);
  }

  55% {
    box-shadow: 0 0 0 8px rgba(122, 165, 255, 0.05);
  }

  100% {
    box-shadow: none;
  }
}

@media (max-width: 980px) {
  .manager-command-head {
    flex-direction: column;
  }

  .manager-command-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .manager-command-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .manager-command {
    padding: 12px;
  }

  .manager-command-metrics {
    grid-template-columns: 1fr;
  }
}

.day-off-limit-table-wrap {
  width: 100%;
  min-width: 0;
  overflow: visible;
  margin-top: 14px;
}

.day-off-limit-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 4px 6px;
}

.day-off-limit-table th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.02em;
}

.day-off-limit-table thead th {
  height: 28px;
  padding: 5px 2px;
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.60);
}

.day-off-limit-table thead th:first-child {
  width: 92px;
  text-align: left;
  overflow-wrap: anywhere;
}

.day-off-limit-table th[scope="row"] {
  width: 92px;
  max-width: 92px;
  padding: 7px 6px;
  color: #eef4ff;
  font-size: 11px;
  line-height: 1.2;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: normal;
  border: 1px solid rgba(122, 165, 255, 0.10);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.66);
}

.day-off-limit-table td {
  min-width: 0;
  padding: 0;
}

.day-off-limit-input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 2px;
  text-align: center;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 180ms ease;
}

.day-off-limit-input::placeholder {
  color: rgba(183, 198, 221, 0.62);
  opacity: 1;
}

.day-off-limit-input::-webkit-inner-spin-button,
.day-off-limit-input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
}

.day-off-limit-input:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(122, 165, 255, 0.34);
}

.day-off-limit-input:focus {
  transform: translateY(-1px);
  border-color: rgba(122, 165, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, 0.14);
}

.day-off-limit-input.is-unlimited {
  color: #9eacc3;
  background: rgba(15, 23, 42, 0.72);
}

.day-off-limit-input.is-zero {
  color: #ff9aa7;
  border-color: rgba(210, 106, 120, 0.32);
  background: rgba(210, 106, 120, 0.10);
}

.day-off-limit-input.is-set {
  color: #dce9ff;
  border-color: rgba(91, 141, 239, 0.32);
  background: rgba(91, 141, 239, 0.12);
}

.day-off-limit-input:disabled {
  cursor: progress;
  opacity: 0.55;
}

.day-off-limit-section {
  padding: 14px !important;
  border-color: rgba(122, 165, 255, 0.16) !important;
  background:
    radial-gradient(circle at top right, rgba(91, 141, 239, 0.09), transparent 42%),
    rgba(10, 17, 29, 0.82) !important;
}

.day-off-limit-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.day-off-limit-section-head .section-title {
  margin: 0;
  color: #f3f7ff;
  font-size: 13px;
}

.day-off-limit-section-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid rgba(122, 165, 255, 0.24);
  border-radius: 11px;
  color: #b8ccff;
  background: rgba(91, 141, 239, 0.12);
  font-size: 19px;
}

.day-off-limit-section-meta {
  margin-top: 2px;
  color: #8495b0;
  font-size: 10px;
  font-weight: 750;
}

.day-off-limit-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -2px 0 16px;
}

.day-off-limit-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 999px;
  color: #aab8cf;
  background: rgba(15, 23, 42, 0.58);
  font-size: 10px;
  font-weight: 750;
}

.day-off-limit-legend-item b {
  color: #eef4ff;
  font-size: 11px;
}

.day-off-limit-legend-item.blocked {
  border-color: rgba(210, 106, 120, 0.24);
  background: rgba(210, 106, 120, 0.08);
}

.day-off-limit-legend-item.limited {
  border-color: rgba(91, 141, 239, 0.24);
  background: rgba(91, 141, 239, 0.08);
}

@media (max-width: 520px) {
  .day-off-limit-section {
    padding: 11px !important;
  }

  .day-off-limit-table,
  .day-off-limit-table tbody {
    display: block;
    width: 100%;
  }

  .day-off-limit-table {
    border-spacing: 0;
  }

  .day-off-limit-table thead {
    display: none;
  }

  .day-off-limit-table tbody {
    display: grid;
    gap: 10px;
  }

  .day-off-limit-table tbody tr {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
    border: 1px solid rgba(122, 165, 255, 0.12);
    border-radius: 13px;
    background: rgba(15, 23, 42, 0.48);
  }

  .day-off-limit-table th[scope="row"] {
    grid-column: 1 / -1;
    width: auto;
    max-width: none;
    padding: 0 0 3px;
    border: 0;
    background: transparent;
    font-size: 11px;
  }

  .day-off-limit-table td {
    display: grid;
    gap: 4px;
  }

  .day-off-limit-table td::before {
    content: attr(data-day);
    color: #8292aa;
    font-size: 9px;
    font-weight: 900;
    text-align: center;
  }

  .day-off-limit-input {
    height: 34px;
    border-radius: 9px;
    font-size: 11px;
  }
}

/* The complete settings drawer scrolls as one document. This keeps the
   title and tab bar at the top of the content instead of covering fields. */
.restaurant-settings-panel {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.restaurant-settings-head {
  flex: 0 0 auto !important;
}

.restaurant-settings-body {
  flex: 0 0 auto !important;
  height: auto !important;
  overflow: visible !important;
}

.restaurant-settings-panel .settings-tabs {
  position: static;
  top: auto;
}

/* Staff drawer follows the same single-scroll layout as restaurant settings. */
.staff-management-panel {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.staff-management-head {
  flex: 0 0 auto;
}

.staff-management-body {
  flex: 0 0 auto;
  overflow: visible;
}

.staff-management-panel .staff-tools {
  position: static;
  top: auto;
}
