:root {
  --bg: #111827;
  --panel: #172033;
  --panel-strong: #1f2a44;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #aeb9cc;
  --accent: #22d3ee;
  --accent-strong: #0891b2;
  --violet: #8b5cf6;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #fb7185;
}

html {
  min-height: 100%;
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 34rem),
    linear-gradient(135deg, #0f172a 0%, #111827 48%, #17132a 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
}

.app-container {
  max-width: 1180px;
}

.sleepops-nav {
  background: rgba(10, 16, 30, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-lockup small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.brand-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 0.45rem;
  color: #06121f;
  background: linear-gradient(135deg, var(--accent), #a7f3d0);
  font-weight: 900;
}

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

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

.nav-identity {
  color: var(--muted);
  font-size: 0.84rem;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  flex: 1;
  padding: 2rem 0 4rem;
}

.footer {
  margin-top: auto;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 1.2rem 0;
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 2rem;
  min-height: calc(100vh - 11rem);
  align-items: center;
}

.login-copy h1,
.page-header h1,
.confirmation h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.3rem, 6vw, 5.2rem);
  line-height: 0.96;
  font-weight: 850;
}

.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.15rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.status-strip span,
.badge-soft {
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  color: #cffafe;
  background: rgba(34, 211, 238, 0.08);
  font-size: 0.84rem;
}

.panel,
.request-card,
.metric-panel,
.summary-panel {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(23, 32, 51, 0.82);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.panel {
  padding: 1.5rem;
}

.panel h2,
.request-card h2 {
  margin: 0;
  font-size: 1.15rem;
}

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

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

.legal-panel address {
  margin: 0;
  color: var(--text);
  font-style: normal;
  line-height: 1.7;
}

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

.login-panel {
  width: 100%;
}

.form-label {
  color: #dbeafe;
  font-weight: 750;
}

.form-control,
.form-control:focus {
  color: var(--text);
  background: rgba(8, 13, 26, 0.72);
  border-color: var(--line);
}

.form-control::placeholder {
  color: #64748b;
}

.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.18rem rgba(34, 211, 238, 0.25);
}

.btn {
  border-radius: 0.45rem;
  font-weight: 800;
}

.btn-accent {
  color: #04111d;
  background: linear-gradient(135deg, var(--accent), #67e8f9);
  border: 0;
}

.btn-accent:hover {
  color: #04111d;
  background: #67e8f9;
}

.microcopy {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-end;
  margin: 2rem 0;
}

.metric-panel {
  min-width: 180px;
  padding: 1.25rem;
  text-align: right;
}

.metric-value {
  display: block;
  color: var(--accent);
  font-size: 2.4rem;
  font-weight: 900;
}

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

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 1rem;
  align-items: start;
}

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

.segmented-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.segmented-choice input {
  position: absolute;
  opacity: 0;
}

.segmented-choice label {
  min-height: 3rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  color: var(--muted);
  background: rgba(8, 13, 26, 0.72);
  cursor: pointer;
  font-weight: 800;
}

.segmented-choice input:checked + label {
  color: #04111d;
  background: var(--accent);
  border-color: var(--accent);
}

.info-stack {
  display: grid;
  gap: 1rem;
}

.compact-list p {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin: 0.8rem 0 0;
}

.compact-list span {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: var(--success);
}

.confirmation {
  max-width: 900px;
  margin: 4rem auto;
  text-align: center;
}

.success-mark {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  margin: 0 auto 1rem;
  border-radius: 50%;
  color: #052e16;
  background: var(--success);
  font-size: 2rem;
  font-weight: 900;
}

.summary-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 2rem 0;
  text-align: left;
  background: var(--line);
}

.summary-panel div {
  padding: 1rem;
  background: rgba(23, 32, 51, 0.96);
}

.summary-panel .wide {
  grid-column: 1 / -1;
}

dt {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 800;
}

dd {
  margin: 0.25rem 0 0;
  color: var(--text);
  font-size: 1.05rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.confirmation .action-row {
  justify-content: center;
}

.request-list {
  display: grid;
  gap: 1rem;
}

.calendar-panel {
  margin-bottom: 1.5rem;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.calendar-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.calendar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--line);
}

.calendar-weekday {
  padding: 0.7rem;
  color: var(--muted);
  background: rgba(8, 13, 26, 0.72);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 8.5rem;
  padding: 0.65rem;
  background: rgba(23, 32, 51, 0.96);
  overflow: hidden;
}

.calendar-day-muted {
  background: rgba(15, 23, 42, 0.78);
}

.calendar-day-muted .calendar-date {
  color: #64748b;
}

.calendar-day-today {
  outline: 2px solid rgba(34, 211, 238, 0.55);
  outline-offset: -2px;
}

.calendar-date {
  color: var(--text);
  font-weight: 900;
  margin-bottom: 0.45rem;
}

.calendar-events {
  display: grid;
  gap: 0.35rem;
}

.calendar-event {
  display: block;
  min-width: 0;
  border-radius: 0.35rem;
  padding: 0.35rem 0.45rem;
  color: #e5f8ff;
  background: rgba(8, 13, 26, 0.7);
  border-left: 3px solid var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-border-pending {
  border-left-color: var(--warning);
}

.status-border-approved {
  border-left-color: var(--success);
}

.status-border-rejected {
  border-left-color: var(--danger);
}

.request-card {
  padding: 1.25rem;
}

.request-main,
.request-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.request-meta {
  justify-content: flex-start;
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.request-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
}

.request-comment {
  color: #dbeafe;
  background: rgba(8, 13, 26, 0.48);
  border-left: 3px solid var(--accent);
  padding: 0.75rem;
}

.status-pill {
  align-self: flex-start;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font-weight: 900;
  font-size: 0.8rem;
}

.status-pending {
  color: #451a03;
  background: #fbbf24;
}

.status-approved {
  color: #052e16;
  background: #86efac;
}

.status-rejected {
  color: #4c0519;
  background: #fda4af;
}

.status-conflict {
  color: #fff7ed;
  background: #c2410c;
}

.calendar-event-conflict {
  box-shadow: inset 0 0 0 1px rgba(251, 146, 60, 0.65);
}

.alert-warning {
  color: #fff7ed;
  background: rgba(194, 65, 12, 0.18);
  border-color: rgba(251, 146, 60, 0.44);
}

.empty-state {
  text-align: center;
}

.alert-danger {
  color: #ffe4e6;
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.38);
}

.alert-info {
  color: #cffafe;
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.32);
}

.text-danger {
  color: #fda4af !important;
}

.user-actions,
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.inline-form {
  flex: 1 1 24rem;
}

.inline-form .form-control {
  max-width: 24rem;
}

@media (max-width: 820px) {
  .login-layout,
  .grid-two,
  .legal-layout,
  .page-header {
    display: block;
  }

  .login-panel,
  .metric-panel,
  .info-stack {
    margin-top: 1rem;
  }

  .calendar-header {
    display: block;
  }

  .calendar-nav {
    justify-content: flex-start;
    margin-top: 1rem;
  }

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

  .calendar-weekday {
    display: none;
  }

  .calendar-day {
    min-height: 5.5rem;
  }

  .calendar-day-muted:empty {
    display: none;
  }

  .form-grid,
  .summary-panel {
    grid-template-columns: 1fr;
  }

  .page-header h1,
  .login-copy h1,
  .confirmation h1 {
    font-size: 2.6rem;
  }
}
