:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --border: #e5e5e3;
  --success: #16a34a;
  --warning-bg: #fef3c7;
  --warning-border: #f59e0b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* Header */
header {
  text-align: center;
  padding: 32px 0 24px;
}

.logo-mark {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 14px;
  margin: 0 auto 16px;
  position: relative;
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2.5px solid white;
  border-radius: 4px;
  border-top: none;
  border-right: none;
  transform: rotate(-45deg) translate(1px, -2px);
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 2px;
}

/* Views */
.view {
  animation: fadeIn 0.2s ease;
}

.view[hidden] {
  display: none;
}

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

/* Login */
.login-prompt {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.restriction-note {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 12px;
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-google {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.btn-google:hover {
  background: #fafafa;
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 16px;
}

.btn-secondary:hover {
  color: var(--text);
}

/* Status cards */
.status-card {
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  line-height: 1.5;
}

.status-card p + p {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.status-warning {
  background: var(--warning-bg);
  border-left: 3px solid var(--warning-border);
}

/* Greeting */
.greeting {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 20px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  overflow: hidden;
}

.card-header {
  padding: 14px 16px 0;
}

.card-header h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.card-body {
  padding: 14px 16px 16px;
}

/* Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.toggle-row > div {
  flex: 1;
}

.toggle-label {
  font-weight: 500;
  font-size: 0.95rem;
}

.toggle-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 2px;
  line-height: 1.4;
}

.toggle {
  position: relative;
  width: 52px;
  height: 30px;
  flex-shrink: 0;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle input:checked + .toggle-slider {
  background: var(--success);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* Group list */
.group-list {
  list-style: none;
}

.group-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-list li:last-child {
  border-bottom: none;
}

.group-code {
  font-size: 0.78rem;
  font-weight: 500;
  background: #f0f0ee;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: "SF Mono", "Fira Code", monospace;
  color: var(--text-muted);
}

.group-name {
  font-size: 0.95rem;
}

.groups-note {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 8px;
}

/* Spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 48px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
