@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;600;700&display=swap");

:root {
  --ink: #f5f5f5;
  --paper: #0d0d0f;
  --accent: #8bc34a;
  --accent-2: #5e8f2f;
  --shadow: rgba(0, 0, 0, 0.4);
  --glass: rgba(20, 20, 22, 0.88);
  --muted: rgba(255, 255, 255, 0.6);
  --stroke: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: #000000;
  min-height: 100vh;
  position: relative;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.2;
  z-index: 0;
}

.topbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  background: rgba(13, 13, 15, 0.85);
  border-bottom: 1px solid var(--stroke);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 28px;
  z-index: 2;
}

.header-title {
  font-family: "Manrope", sans-serif;
  text-align: center;
  color: var(--ink);
}

.title-main {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.title-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: 0.4px;
}

.grid {
  position: relative;
  z-index: 1;
  padding: 28px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.card {
  grid-column: span 12;
  background: var(--glass);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 12px 30px var(--shadow);
  border: 1px solid var(--stroke);
  animation: rise 500ms ease both;
}

.card.wide {
  grid-column: span 12;
}

.card.slim {
  padding: 16px;
}

.tabs {
  padding: 14px;
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.tab-btn {
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid var(--stroke);
  background: #0f0f12;
  color: var(--muted);
  cursor: pointer;
}

.tab-btn.active {
  background: rgba(139, 195, 74, 0.15);
  color: var(--accent);
  border-color: rgba(139, 195, 74, 0.35);
}

.tab-panels {
  border-top: 1px solid var(--stroke);
  padding-top: 12px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: rise 300ms ease;
}

.panel-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(12, 1fr);
}

.panel-grid .card {
  grid-column: span 12;
}

.panel-grid .card.wide {
  grid-column: span 12;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.stat {
  background: #0f0f12;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.stat-num {
  font-size: 22px;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chip {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(139, 195, 74, 0.15);
  color: var(--accent);
  border: 1px solid rgba(139, 195, 74, 0.35);
}

h2 {
  margin: 0 0 12px;
  font-family: "Manrope", sans-serif;
}

form .row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  align-items: flex-end;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  gap: 8px;
  margin-bottom: 8px;
}

.filter {
  margin: 6px 0 10px;
}

input,
select {
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: #111114;
  font-family: inherit;
  color: var(--ink);
  min-height: 40px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;
  width: fit-content;
  min-width: 260px;
}

.btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(139, 195, 74, 0.35);
  background: rgba(139, 195, 74, 0.08);
  cursor: pointer;
  font-family: "Manrope", sans-serif;
  letter-spacing: 0.4px;
  color: var(--ink);
  min-height: 40px;
}

.btn.primary {
  background: var(--accent);
  color: #0b0b0d;
  border: none;
}

.btn.ghost {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.35);
}

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

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

.actions-row {
  justify-content: flex-start;
  gap: 16px;
}

.schedule-row {
  align-items: flex-end;
}

.schedule-row .inline {
  display: inline-flex;
  align-items: center;
}

.export-force-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.export-force-group .checkbox.inline {
  margin: 0;
  white-space: nowrap;
}

.force-toggle.active {
  background: rgba(139, 195, 74, 0.18);
  border-color: rgba(139, 195, 74, 0.65);
}

.schedule-actions {
  justify-content: flex-start;
  gap: 12px;
  margin-top: 6px;
}

.week-grid {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--stroke);
  display: grid;
  gap: 16px;
}

.week-header,
.week-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
}

.week-header {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--stroke);
}

.week-day {
  font-weight: 600;
  padding-left: 8px;
}

.week-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
  padding: 12px;
}

.week-inputs input {
  text-transform: uppercase;
}

.coverage-code-select {
  min-width: 120px;
  width: 100%;
  max-height: 82px;
  overflow-y: auto;
  text-transform: uppercase;
  scrollbar-width: thin;
}

.coverage-code-select option {
  padding: 4px 8px;
}

.shift-pair {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: #0f0f12;
  align-items: end;
}

.week-row {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.week-row:nth-child(odd) {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
}

.shift-pair label {
  font-size: 12px;
  color: var(--muted);
}

.coverage-add {
  justify-self: start;
}

.coverage-save-status.ok {
  color: #8bc34a;
}

.coverage-save-status.err {
  color: #ff7b7b;
}

@media (max-width: 900px) {
  .week-header,
  .week-row {
    grid-template-columns: 1fr;
  }

  .week-inputs {
    grid-template-columns: repeat(2, minmax(70px, 1fr));
  }

  .shift-pair {
    grid-template-columns: 1fr;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--stroke);
  text-align: left;
}

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

.issue {
  padding: 10px;
  border-radius: 12px;
  background: rgba(18, 18, 20, 0.8);
  border: 1px solid var(--stroke);
  display: grid;
  gap: 4px;
}

.issue strong {
  font-family: "Manrope", sans-serif;
}

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

.issue.blocker {
  border-color: rgba(220, 67, 67, 0.5);
}

.issue.high {
  border-color: rgba(201, 106, 44, 0.6);
}

.issue.medium {
  border-color: rgba(31, 110, 140, 0.6);
}

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

.list.compact li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--stroke);
}

.employee-head-row {
  display: grid;
  grid-template-columns: 180px 1fr 1fr auto;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 0 8px;
  border-bottom: 1px solid var(--stroke);
}

.employee-edit-form {
  width: 100%;
  display: grid;
  grid-template-columns: 180px 1fr 1fr auto;
  gap: 12px;
  align-items: center;
}

.employee-edit-input {
  width: 100%;
  min-width: 0;
  background: transparent;
  border-color: transparent;
  padding: 6px 0;
}

.employee-edit-input:disabled {
  color: var(--ink);
  opacity: 1;
  cursor: default;
}

.employee-edit-input.editable {
  background: #111114;
  border-color: var(--stroke);
  padding: 10px 12px;
}

.employee-actions {
  display: inline-flex;
  gap: 8px;
  justify-self: end;
}

.shift-head-row {
  display: grid;
  grid-template-columns: 1fr 160px 160px auto;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 0 8px;
  border-bottom: 1px solid var(--stroke);
}

.shift-edit-form {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 160px 160px auto;
  gap: 12px;
  align-items: center;
}

.shift-edit-input {
  width: 100%;
  min-width: 0;
  background: transparent;
  border-color: transparent;
  padding: 6px 0;
}

.shift-edit-input:disabled {
  color: var(--ink);
  opacity: 1;
  cursor: default;
}

.shift-edit-input.editable {
  background: #111114;
  border-color: var(--stroke);
  padding: 10px 12px;
}

.shift-actions {
  display: inline-flex;
  gap: 8px;
  justify-self: end;
}

.btn.small {
  padding: 6px 10px;
  font-size: 12px;
}

.multi-select {
  min-height: 220px;
  padding: 8px;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: #0f0f12;
  color: var(--ink);
  width: fit-content;
  min-width: 320px;
}

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

.toast-wrap {
  position: static;
  margin: 18px 28px 10px;
  display: grid;
  gap: 8px;
  z-index: 1;
}

.toast {
  padding: 10px 14px;
  border-radius: 10px;
  background: #111114;
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 24px var(--shadow);
  animation: fade 240ms ease;
}

.footer {
  position: static;
  padding: 14px 28px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--stroke);
  background: transparent;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 700px) {
  .footer {
    flex-direction: column;
    gap: 6px;
  }

  .employee-head-row {
    display: none;
  }

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

  .employee-actions {
    justify-self: start;
  }

  .shift-head-row {
    display: none;
  }

  .shift-edit-form {
    grid-template-columns: 1fr;
  }

  .shift-actions {
    justify-self: start;
  }
}

.toast.ok {
  border-color: rgba(31, 110, 140, 0.4);
}

.toast.err {
  border-color: rgba(178, 34, 34, 0.5);
}

.toast.tip {
  border-color: rgba(139, 195, 74, 0.7);
  background: rgba(139, 195, 74, 0.12);
}

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

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

@media (max-width: 1100px) {
  .card,
  .card.wide {
    grid-column: span 12;
  }

  .panel-grid .card {
    grid-column: span 12;
  }
}
