:root {
  --bg: #f3efe6;
  --bg-deep: #e9dfd1;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --sidebar: rgba(255, 255, 255, 0.94);
  --sidebar-soft: rgba(245, 248, 255, 0.92);
  --line: rgba(24, 36, 54, 0.1);
  --line-strong: rgba(24, 36, 54, 0.18);
  --ink: #162133;
  --ink-soft: #62708a;
  --brand: #0d6b61;
  --brand-dark: #0b5149;
  --accent: #d15c31;
  --accent-soft: rgba(209, 92, 49, 0.12);
  --highlight: #2653c6;
  --highlight-soft: rgba(38, 83, 198, 0.12);
  --success: #19895f;
  --success-soft: rgba(25, 137, 95, 0.14);
  --warning: #b77a13;
  --warning-soft: rgba(183, 122, 19, 0.16);
  --danger: #a54635;
  --danger-soft: rgba(165, 70, 53, 0.14);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-lg: 0 24px 60px rgba(23, 34, 53, 0.14);
  --shadow-md: 0 14px 30px rgba(23, 34, 53, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 2% 4%, rgba(13, 107, 97, 0.13), transparent 24%),
    radial-gradient(circle at 98% 12%, rgba(209, 92, 49, 0.15), transparent 28%),
    linear-gradient(180deg, #faf6f0 0%, var(--bg) 48%, var(--bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 85%);
  pointer-events: none;
  z-index: -1;
}

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

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Sora", sans-serif;
  line-height: 1.12;
}

p {
  margin: 0;
  color: var(--ink-soft);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 300px;
  padding: 1.2rem;
  background:
    radial-gradient(circle at top left, rgba(13, 107, 97, 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(209, 92, 49, 0.1), transparent 28%),
    var(--sidebar);
  color: var(--ink);
  transform: translateX(-320px);
  transition: transform 180ms ease;
  z-index: 40;
  display: grid;
  align-content: start;
  gap: 0.8rem;
  border-right: 1px solid rgba(24, 36, 54, 0.08);
  box-shadow: 0 22px 48px rgba(23, 34, 53, 0.12);
  backdrop-filter: blur(18px);
}

.sidebar:not(.hidden) {
  transform: translateX(0);
}

.demo-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.2rem;
}

.demo-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(13, 107, 97, 0.14), rgba(209, 92, 49, 0.28));
  font-weight: 800;
  color: #14345a;
}

.demo-brand span {
  display: grid;
  gap: 0.12rem;
}

.demo-brand strong {
  font-size: 0.98rem;
}

.demo-brand small {
  color: #68778f;
  font-size: 0.8rem;
}

.sidebar-copy {
  padding: 1rem;
  border-radius: 20px;
  background: var(--sidebar-soft);
  border: 1px solid rgba(24, 36, 54, 0.08);
}

.sidebar-kicker {
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.sidebar-copy h2 {
  font-size: 1.35rem;
  margin-bottom: 0.45rem;
}

.sidebar-copy p {
  color: #68778f;
}

.menu-item,
.menu-link,
.menu-btn {
  width: 100%;
  border: 1px solid rgba(24, 36, 54, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #31425d;
  text-align: left;
  padding: 0.75rem 0.88rem;
  cursor: pointer;
  font-weight: 700;
}

.menu-item:hover,
.menu-link:hover,
.menu-btn:hover {
  background: rgba(35, 78, 183, 0.08);
  color: #183766;
}

.menu-item.active {
  background: linear-gradient(135deg, #fefefe, #dfeaff);
  border-color: rgba(35, 78, 183, 0.16);
  color: #17315e;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.sidebar-note {
  margin-top: 0.25rem;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(245, 248, 255, 0.94);
  border: 1px solid rgba(24, 36, 54, 0.08);
}

.sidebar-note strong {
  display: block;
  margin-bottom: 0.45rem;
}

.sidebar-note p {
  color: #68778f;
  font-size: 0.86rem;
  margin-bottom: 0.22rem;
}

.menu-link {
  display: block;
}

.sidebar-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.sidebar-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.65rem 0.88rem;
  border-radius: 999px;
  border: 1px solid rgba(24, 36, 54, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: #31425d;
  font-size: 0.86rem;
  font-weight: 700;
}

.sidebar-legal a:hover {
  background: rgba(35, 78, 183, 0.08);
  color: #183766;
}

.sidebar-disclaimer {
  font-size: 0.8rem;
  line-height: 1.5;
}

.menu-btn {
  color: #8c3a22;
  border-color: rgba(209, 92, 49, 0.32);
  background: rgba(209, 92, 49, 0.1);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 248, 242, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 35;
}

.sidebar-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(24, 36, 54, 0.08);
  background: rgba(250, 246, 240, 0.82);
  backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.hamburger {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  color: #22314e;
  font-size: 1.2rem;
  cursor: pointer;
}

.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
  font-weight: 800;
  margin-bottom: 0.18rem;
}

.title-wrap h1 {
  font-size: 1.15rem;
}

.topbar-right {
  flex-wrap: wrap;
  justify-content: end;
}

.kpi-chip,
.clock {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  padding: 0.45rem 0.72rem;
  min-height: 48px;
  display: grid;
  align-content: center;
  box-shadow: var(--shadow-md);
}

.kpi-chip span,
.clock {
  font-size: 0.74rem;
  color: var(--ink-soft);
}

.kpi-chip strong {
  font-size: 0.9rem;
}

.clock {
  align-items: center;
}

.shell {
  width: min(1240px, calc(100% - 1.6rem));
  margin: 0 auto;
  padding: 1rem 0 1.8rem;
}

.card,
.panel,
.hero-banner {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-lg);
}

.card {
  padding: 1rem;
  margin-bottom: 1rem;
}

.hero-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.banner-kicker,
.section-kicker {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--brand);
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.hero-banner h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 0.55rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: end;
}

.btn-primary,
.btn-secondary {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.72rem 1rem;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ef7b51);
  color: #fff;
  box-shadow: 0 14px 24px rgba(209, 92, 49, 0.24);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--line-strong);
  color: #21314d;
}

.section-panel {
  display: grid;
  gap: 1rem;
}

.section-header,
.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.9rem;
}

.section-header h3 {
  font-size: 1.28rem;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: end;
}

.compact-field {
  display: grid;
  gap: 0.28rem;
  min-width: 220px;
}

.compact-field span,
.field label,
.leave-form label {
  font-size: 0.82rem;
  color: #56647f;
  font-weight: 700;
}

.compact-field select,
.field select,
.field textarea,
.leave-form input,
.leave-form select,
.leave-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 0.78rem 0.84rem;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
}

.field textarea,
.leave-form textarea {
  min-height: 94px;
  resize: vertical;
}

.status-pill,
.panel-tag,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
}

.status-pill {
  min-height: 44px;
  padding: 0.6rem 0.88rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line-strong);
  color: #2a3a57;
}

.panel-tag {
  padding: 0.38rem 0.68rem;
  font-size: 0.74rem;
  background: rgba(38, 83, 198, 0.08);
  color: #234b9e;
  border: 1px solid rgba(38, 83, 198, 0.12);
}

.metric-grid,
.content-grid,
.mini-metric-grid,
.week-bars,
.team-cards,
.approval-queue,
.planner-grid {
  display: grid;
  gap: 0.85rem;
}

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

.metric-card {
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.88));
  border: 1px solid rgba(24, 36, 54, 0.08);
}

.metric-card.accent {
  background: linear-gradient(180deg, rgba(209, 92, 49, 0.12), rgba(255, 255, 255, 0.94));
  border-color: rgba(209, 92, 49, 0.14);
}

.metric-card span,
.metric-card small {
  display: block;
}

.metric-card span {
  font-size: 0.8rem;
  color: #56647f;
}

.metric-card strong {
  display: block;
  margin: 0.25rem 0;
  font-family: "Sora", sans-serif;
  font-size: 1.6rem;
}

.metric-card small {
  font-size: 0.78rem;
  color: #73819b;
}

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

.panel {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.9);
}

.status-board,
.event-feed,
.stack-list,
.timeline-list,
.record-list,
.coverage-grid {
  display: grid;
  gap: 0.7rem;
}

.status-card,
.event-item,
.stack-item,
.timeline-item,
.record-card,
.coverage-card,
.approval-card,
.planner-card,
.team-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(24, 36, 54, 0.08);
  background: rgba(255, 255, 255, 0.95);
}

.status-card {
  padding: 0.9rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
  align-items: center;
}

.status-card strong,
.record-card strong,
.approval-card strong,
.team-card strong,
.stack-item strong,
.planner-card strong {
  display: block;
  margin-bottom: 0.18rem;
}

.status-card p,
.record-card p,
.stack-item p,
.team-card p {
  font-size: 0.84rem;
}

.status-badge {
  padding: 0.4rem 0.68rem;
  font-size: 0.72rem;
}

.status-live {
  background: var(--success-soft);
  color: var(--success);
}

.status-break {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-done {
  background: var(--highlight-soft);
  color: var(--highlight);
}

.status-leave {
  background: rgba(122, 150, 244, 0.14);
  color: #4a60a7;
}

.status-missing,
.status-rejected {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-approved {
  background: var(--success-soft);
  color: var(--success);
}

.status-info {
  background: var(--highlight-soft);
  color: var(--highlight);
}

.event-item,
.stack-item,
.timeline-item,
.record-card,
.coverage-card,
.approval-card,
.planner-card,
.team-card {
  padding: 0.9rem;
}

.event-item,
.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
}

.event-time,
.timeline-time {
  min-width: 58px;
  font-weight: 800;
  color: #24395d;
}

.event-item small,
.timeline-item small,
.approval-card small,
.planner-card small {
  color: #7b8699;
}

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

.coverage-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 247, 255, 0.88));
}

.coverage-card strong {
  font-family: "Sora", sans-serif;
  font-size: 1.2rem;
}

.timbrature-layout {
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.05fr);
}

.control-panel {
  display: grid;
  gap: 0.9rem;
}

.employee-hero {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: start;
  padding: 0.9rem;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(13, 107, 97, 0.1), rgba(38, 83, 198, 0.08)),
    rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(24, 36, 54, 0.08);
}

.employee-hero strong {
  font-size: 1.05rem;
}

.tiny-metric {
  min-width: 140px;
  padding: 0.72rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(24, 36, 54, 0.08);
}

.tiny-metric span {
  display: block;
  font-size: 0.74rem;
  color: #64728d;
}

.tiny-metric strong {
  font-size: 0.92rem;
}

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

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

.hint-text {
  min-height: 1.2rem;
  font-size: 0.86rem;
  color: #52627b;
}

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

.mini-metric-grid article {
  padding: 0.85rem;
  border-radius: 18px;
  border: 1px solid rgba(24, 36, 54, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(238, 244, 255, 0.88));
}

.mini-metric-grid span {
  display: block;
  font-size: 0.76rem;
  color: #64728d;
}

.mini-metric-grid strong {
  display: block;
  margin-top: 0.25rem;
  font-family: "Sora", sans-serif;
  font-size: 1.15rem;
}

.week-bars {
  grid-template-columns: 1fr;
}

.week-bar {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 0.7rem;
  align-items: center;
}

.week-bar strong {
  font-size: 0.88rem;
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(24, 36, 54, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--highlight));
}

.record-card {
  display: grid;
  gap: 0.55rem;
}

.record-top,
.approval-top,
.team-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: start;
}

.record-meta,
.team-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.32rem 0.58rem;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(38, 83, 198, 0.08);
  color: #284b94;
}

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

.leave-hours-field {
  display: none;
}

.leave-hours-field.visible {
  display: grid;
}

.leave-form .full-row,
.leave-form button,
.leave-form .hint-text {
  grid-column: 1 / -1;
}

.approval-queue,
.planner-grid,
.team-cards {
  grid-template-columns: 1fr;
}

.approval-card {
  display: grid;
  gap: 0.7rem;
}

.approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.btn-approve,
.btn-reject {
  border: none;
  border-radius: 999px;
  padding: 0.58rem 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-approve {
  background: var(--success);
  color: #fff;
}

.btn-reject {
  background: var(--danger);
  color: #fff;
}

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

.planner-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.9));
}

.planner-card ul {
  margin: 0.55rem 0 0;
  padding-left: 1rem;
  color: #4f5f78;
}

.planner-card li {
  margin-bottom: 0.2rem;
}

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

.team-card {
  display: grid;
  gap: 0.8rem;
}

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

.team-stats article {
  border-radius: 14px;
  border: 1px solid rgba(24, 36, 54, 0.08);
  background: rgba(245, 248, 255, 0.88);
  padding: 0.72rem;
}

.team-stats span {
  display: block;
  font-size: 0.72rem;
  color: #6f7c95;
}

.team-stats strong {
  display: block;
  margin-top: 0.18rem;
  font-size: 1rem;
}

.empty-state {
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  color: #67748d;
  background: rgba(255, 255, 255, 0.82);
  border: 1px dashed rgba(24, 36, 54, 0.14);
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  padding: 0.75rem 0.95rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
  box-shadow: var(--shadow-lg);
}

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

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--danger);
}

.toast.info {
  background: var(--highlight);
}

.demo-footer {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto 1.4rem;
  padding: 1rem 1.1rem;
  border-radius: 24px;
  border: 1px solid rgba(24, 36, 54, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.demo-footer p {
  max-width: 64ch;
}

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

.demo-footer-links a {
  color: #183766;
  font-weight: 700;
}

.demo-footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 1120px) {
  .metric-grid,
  .mini-metric-grid,
  .team-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-grid,
  .hero-banner,
  .timbrature-layout,
  .team-cards {
    grid-template-columns: 1fr;
  }

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

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

  .topbar-right {
    justify-content: space-between;
  }

  .kpi-chip,
  .clock {
    flex: 1;
    min-width: calc(50% - 0.35rem);
  }

  .shell {
    width: calc(100% - 1rem);
  }

  .demo-footer {
    width: calc(100% - 1rem);
  }

  .metric-grid,
  .leave-form,
  .team-stats {
    grid-template-columns: 1fr;
  }

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

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

  .week-bar {
    grid-template-columns: 72px 1fr;
  }

  .week-bar span:last-child {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

@media (max-width: 620px) {
  .hero-actions,
  .approval-actions {
    flex-direction: column;
  }

  .hero-actions button,
  .approval-actions button,
  .action-grid button {
    width: 100%;
  }

  .section-header,
  .panel-head,
  .employee-hero,
  .record-top,
  .approval-top,
  .team-top {
    flex-direction: column;
    align-items: start;
  }

  .inline-actions,
  .compact-field {
    width: 100%;
  }

  .event-item,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .toast {
    right: 0.65rem;
    left: 0.65rem;
    text-align: center;
  }

  .demo-footer-links {
    width: 100%;
  }
}
