@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;800&family=Sora:wght@600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #fff8f1;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-border: rgba(223, 106, 33, 0.16);
  --text: #2f241d;
  --muted: #826c5c;
  --accent: #df6a21;
  --accent-soft: #fff0e3;
  --accent-deep: #9b4c17;
  --sand: #f7ecdf;
  --success: #2b8a5d;
  --shadow: 0 24px 60px rgba(130, 74, 34, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body,
#root {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255, 201, 153, 0.55), transparent 24%),
    radial-gradient(circle at bottom left, rgba(255, 170, 108, 0.32), transparent 28%),
    linear-gradient(180deg, #fffaf5 0%, var(--bg) 100%);
}

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

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 108px;
  padding: 24px 18px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(18px);
  border-right: 1px solid rgba(223, 106, 33, 0.08);
  transition: width 220ms ease, transform 220ms ease;
  overflow: hidden;
  z-index: 10;
}

.sidebar.open {
  width: 292px;
}

.sidebar-handle {
  position: absolute;
  top: 22px;
  right: 18px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
}

.brand {
  margin-top: 56px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 240, 227, 0.86));
}

.brand p,
.brand strong,
.nav-item span {
  white-space: nowrap;
}

.brand p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.brand strong {
  font-family: "Sora", sans-serif;
  font-size: 22px;
}

.nav-list {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.nav-item {
  text-align: left;
  padding: 16px 18px;
  border-radius: 18px;
  background: transparent;
  color: var(--text);
}

.nav-item strong {
  display: block;
  font-size: 16px;
}

.nav-item span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--accent), #f29a2e);
  color: white;
  box-shadow: 0 18px 40px rgba(223, 106, 33, 0.25);
}

.nav-item.active span {
  color: rgba(255, 255, 255, 0.82);
}

.main-content {
  flex: 1;
  padding: 28px;
}

.topbar,
.overview-strip,
.module-grid {
  width: min(1400px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.05;
}

h2 {
  font-size: clamp(20px, 2.3vw, 28px);
  line-height: 1.15;
}

.topbar-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(223, 106, 33, 0.12);
  color: var(--muted);
  font-size: 14px;
}

.dot {
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 999px;
  box-shadow: 0 0 0 8px rgba(43, 138, 93, 0.12);
}

.overview-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.overview-card {
  padding: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.overview-card.accent {
  background: linear-gradient(140deg, #ffefe0, #fffdfa);
}

.overview-card span,
.stat-card span,
.report-meta span {
  color: var(--muted);
  font-size: 13px;
}

.overview-card strong,
.stat-card strong,
.report-card strong {
  display: block;
  margin: 10px 0 8px;
  font-size: clamp(24px, 4vw, 34px);
  font-family: "Sora", sans-serif;
}

.overview-card small {
  color: var(--muted);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 28px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

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

.panel.hero-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 242, 231, 0.96)),
    var(--panel);
}

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

.panel-actions,
.voice-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--sand);
  color: var(--accent-deep);
  font-size: 12px;
}

.tag.warm {
  background: #ffedd6;
}

.voice-box textarea {
  width: 100%;
  min-height: 140px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(223, 106, 33, 0.14);
  background: rgba(255, 255, 255, 0.9);
  resize: vertical;
  line-height: 1.6;
}

.primary,
.ghost,
.icon-btn {
  padding: 12px 18px;
  border-radius: 14px;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.primary {
  background: linear-gradient(135deg, var(--accent), #f39a2d);
  color: white;
  box-shadow: 0 12px 30px rgba(223, 106, 33, 0.28);
}

.ghost {
  background: rgba(255, 239, 224, 0.9);
  color: var(--accent-deep);
}

.ghost.small,
.icon-btn {
  padding: 8px 12px;
  font-size: 13px;
}

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

.primary:disabled,
.icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.confirm-card,
.report-card,
.extras-card,
.staff-card {
  border: 1px solid rgba(223, 106, 33, 0.12);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 22px;
  padding: 18px;
}

.confirm-grid,
.form-grid,
.filters-grid,
.staff-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
}

.field input,
.field select,
.upload-box,
.staff-toolbar input,
.staff-toolbar select {
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(223, 106, 33, 0.14);
  background: white;
  padding: 0 14px;
  color: var(--text);
}

.field.compact input,
.field.compact select {
  width: 100%;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 22px;
}

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

.stat-card,
.report-card {
  padding: 20px;
}

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

.report-meta {
  display: grid;
  gap: 6px;
  text-align: right;
}

.table-shell {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(223, 106, 33, 0.12);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

td small {
  display: block;
  color: var(--muted);
}

.bar-list {
  display: grid;
  gap: 18px;
}

.bar-row {
  display: grid;
  gap: 10px;
}

.bar-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.bar-track {
  height: 16px;
  background: #f4e6d7;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f29a2e, #df6a21);
}

.upload-box {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 72px;
  padding: 12px 14px;
}

.upload-box input[type="file"] {
  padding: 0;
  height: auto;
  border: 0;
}

.upload-tip {
  display: flex;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  min-height: 72px;
}

.extras-grid,
.staff-list {
  display: grid;
  gap: 14px;
}

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

.extra-item,
.subject-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid rgba(223, 106, 33, 0.08);
}

.staff-toolbar {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 0.8fr auto;
  gap: 12px;
  margin-bottom: 18px;
}

.staff-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.subject-configs {
  margin-top: 14px;
}

.subject-row input[type="number"] {
  width: 140px;
  height: 42px;
  border: 1px solid rgba(223, 106, 33, 0.14);
  border-radius: 12px;
  padding: 0 12px;
}

.switch-line {
  display: flex;
  gap: 10px;
  align-items: center;
}

.empty-state {
  min-height: 260px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 10px;
}

@media (max-width: 1080px) {
  .overview-strip,
  .module-grid,
  .stats-row,
  .stats-row.two-up,
  .confirm-grid,
  .form-grid,
  .filters-grid,
  .staff-card-grid,
  .staff-toolbar {
    grid-template-columns: 1fr;
  }

  .report-card,
  .topbar,
  .bar-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .sidebar {
    position: fixed;
    transform: translateX(-70%);
    width: 280px;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    padding: 18px;
  }
}

@media (max-width: 720px) {
  .main-content {
    padding: 16px;
  }

  .panel,
  .overview-card {
    border-radius: 20px;
    padding: 18px;
  }

  .sidebar {
    width: 250px;
  }

  .sidebar-handle {
    right: 14px;
  }
}
