*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a1a2e;
  --accent: #e94560;
  --bg: #f4f4f4;
  --card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #888;
  --border: #e0e0e0;
  --success: #27ae60;
  --danger: #e94560;
  --warning: #f39c12;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

#app { min-height: 100vh; display: flex; flex-direction: column; }

/* Splash */
#splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--primary);
  color: white;
  gap: 1rem;
}
#splash img { width: 100px; height: 100px; border-radius: 50%; }
#splash h1 { font-size: 1.4rem; font-weight: 600; }

/* Login */
#login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--primary);
  padding: 2rem;
}
.login-box {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 360px;
}
.login-box img { width: 80px; height: 80px; border-radius: 50%; display: block; margin: 0 auto 1rem; }
.login-box h2 { text-align: center; margin-bottom: 1.5rem; font-size: 1.2rem; color: var(--primary); }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.4rem; }
.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: var(--accent); }

/* Buttons */
.btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn:active { opacity: 0.8; }
.btn-primary { background: var(--accent); color: white; }
.btn-secondary { background: var(--bg); color: var(--text); }

/* Error */
.error-msg {
  color: var(--danger);
  font-size: 0.85rem;
  text-align: center;
  margin-top: 0.75rem;
  min-height: 1.2rem;
}

/* Top bar */
.topbar {
  background: var(--primary);
  color: white;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar h2 { font-size: 1.1rem; font-weight: 600; }
.topbar-back { background: none; border: none; color: white; font-size: 1.4rem; cursor: pointer; }

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}
.bottom-nav button {
  flex: 1;
  padding: 0.75rem 0.5rem;
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}
.bottom-nav button.active { color: var(--accent); }
.bottom-nav button svg { width: 22px; height: 22px; }

/* Page */
.page { padding: 1.25rem; padding-bottom: 5rem; }

/* Cards */
.card {
  background: var(--card);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.card-title { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; }

/* Stats row */
.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.stat-card {
  background: var(--card);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.stat-card .stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; }

/* Badge */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-success { background: #e8f8f0; color: var(--success); }
.badge-danger { background: #fdecea; color: var(--danger); }
.badge-warning { background: #fef9e7; color: var(--warning); }
.badge-muted { background: #f0f0f0; color: var(--text-muted); }

/* List */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-item-label { font-size: 0.9rem; color: var(--text-muted); }
.list-item-value { font-size: 0.9rem; font-weight: 500; }

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* Announcement item */
.announcement-item {
  background: var(--card);
  border-radius: 12px;
  padding: 1.1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.announcement-item h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.announcement-item p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }
.announcement-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }

.accordion-header {
  transition: background 0.2s;
}
.accordion-header:hover {
  background: #f9f9f9;
}
.accordion-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}
.accordion-body.open {
  opacity: 1;
}
.accordion-inner {
  padding-top: 0.75rem;
}
.accordion-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.2s;
}
.accordion-arrow.open {
  transform: rotate(180deg);
  background: var(--accent);
  color: white;
}
.accordion-arrow svg {
  width: 14px;
  height: 14px;
}