:root {
  color-scheme: light;
  --bg: #f5f9fc;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #ffffff;
  --stroke: #d8e4ec;
  --text: #153947;
  --muted: #6f8190;
  --brand: #48b8c6;
  --brand-deep: #1f4250;
  --accent: #ff9f7a;
  --warning: #d8952b;
  --danger: #cb5858;
  --success: #1f9c76;
  --shadow: 0 18px 60px rgba(24, 53, 67, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(72, 184, 198, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(255, 159, 122, 0.16), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color: var(--text);
}

body.auth-only {
  min-height: 100vh;
}

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

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

.admin-shell.is-authenticated {
  display: grid;
}

.admin-shell.hidden,
.login-shell.hidden,
.flash.hidden {
  display: none;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 460px);
  padding: 28px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(216, 228, 236, 0.92);
  box-shadow: var(--shadow);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-card h1 {
  margin: 0;
}

.login-copy {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  padding: 28px 22px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  border-right: 1px solid rgba(216, 228, 236, 0.8);
}

.brand-card,
.sidebar-note,
.panel,
.stat-card,
.announcement-card,
.result-card {
  background: var(--panel);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(216, 228, 236, 0.92);
  box-shadow: var(--shadow);
}

.brand-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: 28px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--brand), #7fdfe7);
  color: #fff;
  font-weight: 800;
  font-size: 1.45rem;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-card h1,
.hero h2,
.panel-header h3 {
  margin: 0;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
  margin: 26px 0;
}

.sidebar-nav a {
  padding: 14px 16px;
  border-radius: 18px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease;
}

.sidebar-nav a:hover {
  background: rgba(72, 184, 198, 0.08);
  transform: translateX(2px);
}

.sidebar-note {
  border-radius: 24px;
  padding: 18px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.94rem;
}

.content {
  padding: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-bottom: 20px;
}

.hero-copy {
  margin: 12px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-points span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(72, 184, 198, 0.1);
  color: var(--brand-deep);
  font-size: 0.88rem;
  font-weight: 700;
}

.session-box {
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(216, 228, 236, 0.92);
  box-shadow: var(--shadow);
}

.session-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status-idle {
  background: rgba(216, 228, 236, 0.65);
  color: var(--brand-deep);
}

.status-ok {
  background: rgba(31, 156, 118, 0.12);
  color: var(--success);
}

.status-warning {
  background: rgba(216, 149, 43, 0.12);
  color: var(--warning);
}

.status-danger {
  background: rgba(203, 88, 88, 0.12);
  color: var(--danger);
}

.panel,
.result-card {
  border-radius: 28px;
  padding: 22px;
  margin-bottom: 18px;
}

.panel.hidden,
.result-card.hidden {
  display: none;
}

.panel-header {
  margin-bottom: 18px;
}

.panel-header.split {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.auth-grid,
.form-columns,
.search-bar,
.action-grid,
.announcement-grid,
.stat-grid,
.result-grid {
  display: grid;
  gap: 14px;
}

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

.search-bar {
  grid-template-columns: minmax(0, 1fr) 140px;
}

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

.action-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
}

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

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

.result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0;
}

label,
.detail-label {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.full-width {
  margin-top: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  padding: 14px 16px;
  color: var(--text);
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(72, 184, 198, 0.8);
  box-shadow: 0 0 0 4px rgba(72, 184, 198, 0.12);
}

button {
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.primary-button {
  background: linear-gradient(135deg, var(--brand-deep), #2b5f71);
  color: #fff;
  font-weight: 700;
}

.ghost-button {
  background: rgba(72, 184, 198, 0.08);
  color: var(--brand-deep);
  font-weight: 700;
}

.warning-button {
  background: rgba(216, 149, 43, 0.14);
  color: var(--warning);
  font-weight: 700;
}

.danger-button {
  background: rgba(203, 88, 88, 0.14);
  color: var(--danger);
  font-weight: 700;
}

.stat-card {
  border-radius: 24px;
  padding: 20px;
}

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

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.result-header,
.report-card-header,
.card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.result-title,
.report-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.result-subtitle,
.report-meta,
.helper-copy,
.empty-state,
.detail-value {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.announcement-card {
  border-radius: 24px;
  padding: 20px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
}

.inline-toggle {
  margin-top: 8px;
}

.toggle input {
  width: 18px;
  height: 18px;
}

.report-list {
  display: grid;
  gap: 14px;
}

.flagged-grid,
.activity-list {
  display: grid;
  gap: 14px;
}

.report-card {
  border: 1px solid var(--stroke);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.flagged-card,
.activity-card {
  border: 1px solid var(--stroke);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.report-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.flagged-meta,
.activity-meta {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.flagged-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.flash {
  margin-top: 16px;
  min-width: 0;
  max-width: 100%;
  padding: 16px 18px;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.flash-success {
  background: #ecfbf5;
  color: var(--success);
}

.flash-error {
  background: #fff2f2;
  color: var(--danger);
}

@media (max-width: 1180px) {
  .admin-shell,
  .hero,
  .stat-grid,
  .announcement-grid,
  .result-grid,
  .action-grid,
  .form-columns {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(216, 228, 236, 0.8);
  }
}
