:root {
  --bg: #111111;
  --panel: #171717;
  --panel-soft: #1b1b1b;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.64);
  --cyan: #00ffff;
  --magenta: #ff00ff;
  --danger: #ff6d8f;
  --success: #53ffcb;
  --warning: #ffdb72;
  --radius: 20px;
  --font-head: "Bahnschrift", "Arial Narrow", sans-serif;
  --font-body: "Segoe UI", "Trebuchet MS", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

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

.admin-body {
  background: #111111;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

.admin-sidebar {
  min-height: 100vh;
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--line);
  background: #0f0f0f;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-brand {
  display: inline-flex;
  align-items: flex-start;
}

.admin-brand__media {
  width: 92px;
  height: 112px;
  display: block;
}

.admin-brand__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-nav {
  display: grid;
  gap: 0.35rem;
}

.admin-nav__link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 52px;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.78);
}

.admin-nav__marker {
  width: 4px;
  height: 22px;
  border-radius: 999px;
  background: transparent;
}

.admin-nav__link:hover,
.admin-nav__link.is-active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.admin-nav__link.is-active .admin-nav__marker {
  background: linear-gradient(180deg, var(--cyan), var(--magenta));
}

.admin-sidebar__footer {
  margin-top: auto;
  display: grid;
  gap: 1rem;
}

.admin-userbox {
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.admin-userbox p,
.admin-userbox small {
  margin: 0;
}

.admin-userbox p {
  font-weight: 700;
}

.admin-userbox small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
}

.admin-main {
  min-width: 0;
  padding: 1.5rem 1.5rem 2rem;
}

.admin-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-topbar__intro {
  display: grid;
  gap: 0.55rem;
}

.admin-topbar__user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-bell {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.04);
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.admin-profile__avatar {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.admin-profile__meta {
  display: grid;
  gap: 0.15rem;
}

.admin-profile__meta strong {
  font-size: 0.98rem;
}

.admin-profile__meta small {
  color: var(--muted);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--muted);
}

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

.breadcrumbs a:hover {
  color: var(--text);
}

.admin-title {
  margin: 0;
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 0.95;
}

.admin-content {
  display: grid;
  gap: 1.25rem;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

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

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

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.panel--hero {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)), var(--panel);
}

.panel__head {
  padding: 1.35rem 1.5rem 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.panel__head h2,
.panel__head h3 {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
}

.panel__head p,
.panel__body p {
  color: var(--muted);
}

.panel__body {
  padding: 1.5rem;
}

.panel--collapsible .panel__head {
  padding-bottom: 1.25rem;
}

.panel--collapsible.is-collapsed .panel__head {
  padding-bottom: 1.35rem;
}

.panel-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 40px;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #101010;
  color: var(--muted);
}

.panel-toggle:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.panel-toggle__label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel-toggle__icon {
  position: relative;
  width: 12px;
  height: 12px;
}

.panel-toggle__icon::before,
.panel-toggle__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.panel-toggle__icon::before {
  width: 10px;
  height: 1px;
}

.panel-toggle__icon::after {
  width: 1px;
  height: 10px;
}

.panel--collapsible .panel-toggle[aria-expanded="true"] .panel-toggle__icon::after {
  display: none;
}

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

.panel-link:hover {
  color: var(--text);
}

.dashboard-hero {
  display: grid;
  gap: 1.5rem;
}

.dashboard-hero__eyebrow {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.dashboard-hero__title {
  margin: 0;
  max-width: 14ch;
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 0.96;
}

.dashboard-hero__lead {
  margin: 0;
  max-width: 64ch;
  line-height: 1.8;
}

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

.stat-card {
  display: grid;
  gap: 0.8rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.stat-card small {
  color: var(--muted);
  font-size: 0.82rem;
}

.stat-card strong {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.dashboard-bars {
  display: grid;
  gap: 1rem;
}

.dashboard-bars__row {
  display: grid;
  gap: 0.55rem;
}

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

.dashboard-bars__track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.dashboard-bars__track span {
  display: block;
  height: 100%;
  min-width: 10%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3c2dff, #8b3dff);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 48px;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
}

.button:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.button--primary {
  background: rgba(255, 255, 255, 0.04);
}

.button--secondary {
  background: rgba(60, 45, 255, 0.12);
}

.button--ghost {
  border-color: var(--line);
}

.button--danger {
  border-color: rgba(255, 109, 143, 0.4);
  color: #ffc2d2;
}

.button--wide {
  width: 100%;
}

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

.field {
  display: grid;
  gap: 0.5rem;
}

.field--wide {
  grid-column: 1 / -1;
}

.field span,
.field legend {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #101010;
  color: var(--text);
  outline: none;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(255, 255, 255, 0.28);
}

.admin-picker {
  position: relative;
  display: grid;
  gap: 0.75rem;
  width: 100%;
}

.admin-picker__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
}

.admin-picker__display,
.admin-picker__toggle,
.admin-picker__month,
.admin-picker__year,
.admin-time__segment {
  width: 100%;
  min-height: 52px;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #101010;
  color: var(--text);
}

.admin-picker__display {
  cursor: pointer;
}

.admin-picker__toggle {
  width: auto;
  min-width: 56px;
  padding-inline: 0.8rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.admin-picker__popover {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  z-index: 30;
  width: min(100%, 360px);
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: #0f0f0f;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.admin-picker__nav {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 92px 48px;
  gap: 0.5rem;
  align-items: center;
}

.admin-picker__nav-button {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #101010;
  color: var(--text);
}

.admin-picker__weekdays,
.admin-picker__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.admin-picker__weekday {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-picker__day {
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101010;
  color: var(--text);
}

.admin-picker__day.is-ghost {
  opacity: 0.34;
}

.admin-picker__day.is-today {
  border-color: rgba(0, 255, 255, 0.4);
}

.admin-picker__day.is-selected {
  border-color: var(--cyan);
  background: rgba(0, 255, 255, 0.08);
}

.admin-time {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
}

.admin-time__segment {
  text-align: center;
}

.admin-time__separator {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 700;
}

.admin-datetime {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.team-assignment__schedule {
  grid-template-columns: 1fr;
}

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

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #101010;
}

.checkbox input {
  accent-color: #7b4dff;
}

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

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

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

.table th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

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

.stack,
.list {
  display: grid;
  gap: 0.85rem;
}

.item-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
  padding: 1rem 1.1rem;
}

.item-card h3,
.item-card h4,
.item-card p {
  margin-top: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 30px;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(123, 77, 255, 0.4);
  border-radius: 999px;
  background: rgba(123, 77, 255, 0.12);
  color: #d7c8ff;
  font-size: 0.76rem;
  font-weight: 700;
}

.chip--inline {
  white-space: nowrap;
}

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

.empty-state {
  padding: 1.25rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
}

.flash-stack {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.flash {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.flash--success {
  border-color: rgba(83, 255, 203, 0.35);
}

.flash--warning {
  border-color: rgba(255, 219, 114, 0.35);
}

.flash--error {
  border-color: rgba(255, 109, 143, 0.35);
}

.calendar-grid {
  display: grid;
  gap: 1rem;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.6rem;
}

.month-grid__weekday,
.month-cell {
  min-height: 116px;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #131313;
}

.month-grid__weekday {
  min-height: auto;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.month-cell--ghost {
  opacity: 0.28;
}

.month-cell--available {
  border-color: rgba(83, 255, 203, 0.32);
}

.month-cell--partial {
  border-color: rgba(255, 255, 255, 0.22);
}

.month-cell--busy,
.month-cell--blocked {
  border-color: rgba(255, 109, 143, 0.26);
}

.month-cell__events {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.event-pill {
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.74rem;
}

.event-pill--confirmed {
  border-color: rgba(83, 255, 203, 0.35);
}

.event-pill--new,
.event-pill--waiting,
.event-pill--in_progress {
  border-color: rgba(123, 77, 255, 0.35);
}

.event-pill--cancelled,
.event-pill--rejected,
.event-pill--occupied {
  border-color: rgba(255, 109, 143, 0.3);
}

.inline-form {
  display: inline;
}

.status-note {
  font-size: 0.82rem;
  color: var(--muted);
}

.disclosure-panel {
  overflow: hidden;
}

.disclosure-panel > summary {
  cursor: pointer;
  list-style: none;
}

.disclosure-panel > summary::-webkit-details-marker {
  display: none;
}

.disclosure-panel > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  color: var(--cyan);
  font-weight: 900;
}

.disclosure-panel[open] > summary::after {
  content: "-";
}

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

  .admin-sidebar {
    min-height: auto;
  }
}

@media (max-width: 980px) {
  .grid--2,
  .grid--3,
  .stat-grid,
  .form-grid,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .admin-datetime {
    grid-template-columns: 1fr;
  }

  .admin-topbar,
  .split {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (min-width: 1240px) {
  .team-assignment__schedule {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-main {
    padding: 1rem;
  }

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

  .admin-picker__row,
  .admin-picker__nav {
    grid-template-columns: 1fr;
  }

  .admin-picker__toggle {
    min-width: 0;
  }
}
