﻿:root {
  --bg: #f6f2ea;
  --surface: #ffffff;
  --surface-muted: #f0ebe3;
  --ink: #1e1b16;
  --ink-muted: #5f5a52;
  --accent: #1f6f78;
  --accent-strong: #0f3d42;
  --accent-soft: #c5e3e1;
  --shadow: 0 24px 60px rgba(31, 23, 14, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fdf5e5 0%, #f3f0eb 45%, #e5f2f0 100%);
  min-height: 100vh;
}

body.logged-out .sidebar {
  display: none;
}

body.logged-out .topbar-actions {
  display: none;
}

body.logged-out .app-main {
  padding: 24px;
}

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

.sidebar {
  width: 260px;
  background: #171410;
  color: #f8f5f1;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  gap: 24px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #3ba3ad, #1f6f78);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 12px;
  color: #c9c2b7;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-link {
  border: none;
  background: transparent;
  color: #d8d1c6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-footer {
  margin-top: auto;
  font-size: 13px;
}

.app-main {
  flex: 1;
  padding: 32px 32px 48px;
}

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

.topbar h1 {
  font-size: 32px;
  margin: 4px 0 0;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--ink-muted);
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border: none;
}

.btn-accent:hover {
  background: var(--accent-strong);
  color: #fff;
}

.btn-accent-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.login-section {
  display: none;
  margin-bottom: 32px;
}

.card-panel {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow);
  animation: rise 0.6s ease both;
}

.card-panel h4 {
  margin-bottom: 16px;
}

.status-line {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-muted);
}

.content-section {
  display: none;
  animation: fadeIn 0.5s ease both;
}

.content-section.active {
  display: block;
}

.stat-card {
  background: linear-gradient(145deg, #fff6e7, #eaf7f5);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  animation: rise 0.6s ease both;
}

.attendance-toggle .btn {
  border-radius: 999px;
}

.stat-title {
  font-size: 13px;
  color: var(--ink-muted);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  margin-top: 8px;
}

.checklist {
  padding-left: 20px;
  color: var(--ink-muted);
}

.helper-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.helper-chip {
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #e6e0d8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.table {
  margin-bottom: 0;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 991px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }

  .nav-list {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .sidebar-footer {
    display: none;
  }

  .app-main {
    padding: 24px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
