:root {
  --bg-1: #0a0e1a;
  --bg-2: #0f1729;
  --bg-3: #1a1f3a;
  --surface: rgba(22, 28, 50, 0.7);
  --surface-2: rgba(30, 38, 65, 0.5);
  --border: rgba(99, 110, 145, 0.2);
  --border-strong: rgba(99, 110, 145, 0.4);
  --text: #e8ecf4;
  --text-2: #a8b2c8;
  --text-3: #6b7691;

  --primary: #f08229;
  --primary-2: #ff9a4a;
  --primary-glow: rgba(240, 130, 41, 0.35);
  --teal: #28acac;
  --teal-glow: rgba(40, 172, 172, 0.3);
  --success: #22c55e;
  --success-glow: rgba(34, 197, 94, 0.3);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.3);
  --warn: #eab308;

  --class-bike: #f97316;
  --class-pilates: #a855f7;
  --class-aerobica: #ec4899;
  --class-step: #eab308;
  --class-ritmos: #3b82f6;
  --class-hit: #ef4444;
  --class-funcional: #10b981;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.4);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  color: var(--text);
  background: var(--bg-1);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(240, 130, 41, 0.15), transparent),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(40, 172, 172, 0.1), transparent),
    radial-gradient(ellipse 60% 50% at 20% 90%, rgba(168, 85, 247, 0.08), transparent),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary-2); text-decoration: none; }
a:hover { color: var(--primary); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }

button { font-family: inherit; }

/* ====== Navbar ====== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 800;
  font-size: 1.0625rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.navbar-brand .logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), #ff6a00);
  border-radius: 8px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px var(--primary-glow);
  font-size: 16px;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem 0.375rem 0.375rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--text-2);
}

.user-pill .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
}

/* ====== Layout ====== */
.container-narrow {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.section { margin-top: 1.75rem; }

/* ====== Subnav (page tabs) ====== */
.subnav {
  position: sticky;
  top: 56px;
  z-index: 40;
  background: rgba(10, 14, 26, 0.7);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0.25rem;
  padding: 0 1.5rem;
  overflow-x: auto;
}

.subnav-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.subnav-tab:hover { color: var(--text); }
.subnav-tab.active {
  color: var(--primary-2);
  border-bottom-color: var(--primary);
}
.subnav-tab span:first-child {
  font-size: 1rem;
}

@media (max-width: 640px) {
  .subnav { top: 56px; padding: 0 0.75rem; }
  .subnav-tab { padding: 0.75rem 0.625rem; font-size: 0.8125rem; }
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title .icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 14px;
}

.section-subtitle {
  color: var(--text-2);
  font-size: 0.875rem;
  margin: 0.25rem 0 0;
  line-height: 1.5;
}

/* ====== Card ====== */
.card {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent);
  pointer-events: none;
}

.card-tight { padding: 1rem; }

/* ====== Buttons ====== */
.btn {
  appearance: none;
  border: 1px solid transparent;
  padding: 0.625rem 1.125rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.2;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #ff6a00 100%);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(30, 38, 65, 0.8);
  border-color: var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--text);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.3);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.5);
}

.btn-sm { padding: 0.4375rem 0.75rem; font-size: 0.8125rem; border-radius: 8px; }
.btn-block { width: 100%; }

.btn-icon {
  padding: 0.4375rem 0.625rem;
  font-size: 0.8125rem;
}

/* ====== Form ====== */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 0.625rem;
  align-items: end;
}
@media (max-width: 720px) { .form-row { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 0.875rem; }
.form-group:last-child { margin-bottom: 0; }

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: rgba(10, 14, 26, 0.5);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.form-control:hover { border-color: var(--border-strong); }
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: rgba(10, 14, 26, 0.7);
}
.form-control::placeholder { color: var(--text-3); }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a8b2c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.form-hint { color: var(--text-3); font-size: 0.8125rem; margin-top: 0.375rem; }

/* ====== Status / Pills ====== */
.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.status-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
}
.status-dot.ok { color: #86efac; border-color: rgba(34, 197, 94, 0.3); background: rgba(34, 197, 94, 0.1); }
.status-dot.ok::before { background: var(--success); box-shadow: 0 0 8px var(--success-glow); }
.status-dot.empty { color: var(--text-3); }
.status-dot.empty::before { background: var(--text-3); }
.status-dot.warn { color: #fcd34d; border-color: rgba(234, 179, 8, 0.3); background: rgba(234, 179, 8, 0.1); }
.status-dot.warn::before { background: var(--warn); box-shadow: 0 0 8px rgba(234, 179, 8, 0.3); }

/* ====== List items ====== */
.list { display: flex; flex-direction: column; gap: 0.5rem; }

.list-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
  position: relative;
  overflow: hidden;
}
.list-item:hover {
  border-color: var(--border-strong);
  background: rgba(30, 38, 65, 0.7);
}

.list-item .stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--text-3);
}
.list-item.class-bike .stripe { background: var(--class-bike); }
.list-item.class-pilates .stripe { background: var(--class-pilates); }
.list-item.class-aerobica .stripe { background: var(--class-aerobica); }
.list-item.class-step .stripe { background: var(--class-step); }
.list-item.class-ritmos .stripe { background: var(--class-ritmos); }
.list-item.class-hit .stripe { background: var(--class-hit); }
.list-item.class-funcional .stripe { background: var(--class-funcional); }

.list-item .info { flex: 1; min-width: 0; }
.list-item .info .title {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.list-item .info .meta {
  color: var(--text-2);
  font-size: 0.8125rem;
  margin-top: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.list-item .class-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.list-item.class-bike .class-tag { background: rgba(249, 115, 22, 0.15); color: #fdba74; }
.list-item.class-pilates .class-tag { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; }
.list-item.class-aerobica .class-tag { background: rgba(236, 72, 153, 0.15); color: #f9a8d4; }
.list-item.class-step .class-tag { background: rgba(234, 179, 8, 0.15); color: #fde047; }
.list-item.class-ritmos .class-tag { background: rgba(59, 130, 246, 0.15); color: #93c5fd; }
.list-item.class-hit .class-tag { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.list-item.class-funcional .class-tag { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }

.list-item .actions { display: flex; gap: 0.375rem; flex-shrink: 0; }

.time-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  background: rgba(10, 14, 26, 0.6);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.id-chip {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 0.7rem;
  color: var(--text-3);
  padding: 0.15rem 0.4rem;
  background: rgba(10, 14, 26, 0.4);
  border-radius: 4px;
}

/* ====== Empty state ====== */
.empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(10, 14, 26, 0.3);
}
.empty .empty-icon {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
  display: block;
}
.empty .empty-text {
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
  color: var(--text);
  font-weight: 500;
}
.empty .empty-hint { font-size: 0.8125rem; color: var(--text-3); }

/* ====== Toast ====== */
#toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 360px;
}
.toast {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  pointer-events: auto;
  animation: toastIn 0.2s ease-out;
  border-left-width: 3px;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--teal); }
.toast .toast-icon { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.toast .toast-body { flex: 1; color: var(--text); }
@keyframes toastIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
.toast.leaving { animation: toastOut 0.2s ease-in forwards; }
@keyframes toastOut {
  to { transform: translateX(20px); opacity: 0; }
}

/* ====== Auth (index) ====== */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2.25rem 1.875rem;
  position: relative;
  overflow: hidden;
}

.auth-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--teal), var(--class-pilates));
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-brand .brand-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.875rem;
  background: linear-gradient(135deg, var(--primary), #ff6a00);
  border-radius: 14px;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px var(--primary-glow);
  font-size: 28px;
}
.auth-brand h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text), var(--text-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-brand p {
  color: var(--text-2);
  font-size: 0.875rem;
  margin: 0.375rem 0 0;
}

.tabs {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 1.25rem;
}
.tab {
  flex: 1;
  padding: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}
.tab.active {
  background: var(--bg-3);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.tab:hover:not(.active) { color: var(--text); }

.form-pane.hidden { display: none; }

.auth-footer {
  text-align: center;
  color: var(--text-3);
  font-size: 0.75rem;
  margin-top: 1.25rem;
  line-height: 1.5;
}

/* ====== Helpers ====== */
.muted { color: var(--text-2); font-size: 0.875rem; }
.muted-2 { color: var(--text-3); font-size: 0.8125rem; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }

/* ====== Welcome hero ====== */
.welcome {
  background: linear-gradient(135deg, rgba(240, 130, 41, 0.1) 0%, rgba(40, 172, 172, 0.05) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem;
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
}
.welcome::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(240, 130, 41, 0.15), transparent 70%);
  pointer-events: none;
}
.welcome h2 { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.02em; }
.welcome p { color: var(--text-2); font-size: 0.9375rem; margin: 0.375rem 0 0; max-width: 520px; }

/* ====== Responsive ====== */
@media (max-width: 640px) {
  .container-narrow { padding: 1rem 0.875rem 3rem; }
  .card { padding: 1rem; }
  .navbar { padding: 0.75rem 1rem; }
  .navbar-user .user-pill { display: none; }
  .list-item { padding: 0.75rem; flex-wrap: wrap; }
  .list-item .actions { width: 100%; justify-content: flex-end; }
  .welcome { padding: 1.25rem; }
  .welcome h2 { font-size: 1.125rem; }
  .auth-card { padding: 1.5rem 1.25rem; }
}

/* ====== Schedule grid (Ultra-style) ====== */
.schedule-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.schedule-day-tabs {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  margin-bottom: 1rem;
  scrollbar-width: thin;
}

.day-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 0.625rem 0.875rem;
  min-width: 72px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.day-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.day-tab .day-tab-num {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.day-tab.active {
  background: linear-gradient(135deg, var(--primary) 0%, #ff6a00 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.day-tab.active .day-tab-num { color: white; }
.day-tab.has-classes::after {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  margin-top: 0.25rem;
}
.day-tab.active.has-classes::after { background: white; }
.day-tab.empty .day-tab-num { color: var(--text-3); }

.day-column-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: var(--text-3);
  font-size: 0.75rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(10, 14, 26, 0.3);
}

/* ====== Class filter pills ====== */
.class-filter {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  margin-bottom: 0.875rem;
  scrollbar-width: thin;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-pill:hover { color: var(--text); border-color: var(--border-strong); }
.filter-pill.active {
  background: var(--filter-color, var(--primary));
  border-color: var(--filter-color, var(--primary));
  color: white;
}
.filter-pill .pill-count {
  font-size: 0.6875rem;
  opacity: 0.8;
  font-weight: 500;
}
.filter-pill.active .pill-count { opacity: 1; }

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 0.625rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.schedule-grid.cols-7 { grid-template-columns: repeat(7, minmax(160px, 1fr)); }
@media (max-width: 1100px) { .schedule-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); } }
@media (max-width: 900px) { .schedule-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); } }
@media (max-width: 560px) { .schedule-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); } }

.day-column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.day-col-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.125rem;
  flex-wrap: wrap;
}
.day-col-header .dow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-2);
  text-transform: uppercase;
}
.day-col-header .date {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.day-col-header.today .date::after {
  content: 'hoje';
  margin-left: 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(240, 130, 41, 0.15);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  vertical-align: middle;
}

.class-card {
  display: block;
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.75rem 0.625rem;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  overflow: hidden;
  min-height: 96px;
}
.class-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--class-color, var(--text-3));
}
.class-card:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  background: rgba(30, 38, 65, 0.7);
}
.class-card .cc-time {
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.class-card .cc-class {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 5px;
  background: var(--class-color-bg, rgba(255, 255, 255, 0.06));
  color: var(--class-color, var(--text-2));
  margin-bottom: 0.375rem;
}
.class-card .cc-instructor {
  font-size: 0.6875rem;
  color: var(--text-3);
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-card .cc-next {
  font-size: 0.6875rem;
  color: var(--text-3);
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-card .cc-actions {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.class-card .cc-actions button {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 0.25rem 0.4rem;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.class-card .cc-actions button:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}
.class-card .cc-actions button.danger:hover {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}
.class-card.class-paused { opacity: 0.55; }
.class-card.class-paused::before { background: var(--text-3) !important; }

.sched-grid-wrapper {
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.day-empty {
  padding: 2rem 0.5rem;
  text-align: center;
  color: var(--text-3);
  font-size: 0.8125rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(10, 14, 26, 0.3);
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 0%, rgba(30, 38, 65, 0.8) 50%, var(--surface-2) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 6px;
  height: 1em;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.admin-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
}
.admin-row:hover { border-color: var(--border-strong); }
.admin-row.user-inactive { opacity: 0.7; }
.admin-row.invite-status-used { opacity: 0.55; }
.admin-row.invite-status-revoked { opacity: 0.55; }
.admin-row.invite-status-expired { opacity: 0.55; }
.admin-row-main { flex: 1; min-width: 0; }
.admin-row-name {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.admin-row-meta {
  font-size: 0.82rem;
  color: var(--text-2);
  margin-top: 0.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-row-meta span:not(:first-child)::before { content: ''; }
.admin-row-link {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  background: var(--bg-2);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  word-break: break-all;
}
.admin-row-link code { color: var(--text-2); font-size: 0.78rem; }
.admin-row-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  align-items: center;
}
.admin-row-actions .btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.admin-row-actions .danger { color: var(--danger); }
.admin-row-actions .danger:hover { background: rgba(239, 68, 68, 0.1); }
.admin-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-3);
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}
.user-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  vertical-align: middle;
}
.user-badge.admin { background: rgba(240, 130, 41, 0.2); color: var(--primary-2); border: 1px solid rgba(240, 130, 41, 0.4); }
.user-badge.off { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.admin-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  background: rgba(240, 130, 41, 0.2);
  color: var(--primary-2);
  border: 1px solid rgba(240, 130, 41, 0.4);
  border-radius: 4px;
  margin-left: 0.4rem;
}

.auth-loading {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-2);
}
.auth-loading p { margin-top: 1rem; }
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.auth-error {
  text-align: center;
  padding: 1.5rem 0;
}
.auth-error-icon { font-size: 3rem; margin-bottom: 0.5rem; }
.auth-error h3 { margin: 0.5rem 0; }
.auth-error p { color: var(--text-2); }
.invite-detail {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.invite-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}
.invite-row strong { color: var(--text); }
.muted-2 { color: var(--text-2); font-size: 0.82rem; }
.hidden { display: none !important; }

@media (max-width: 720px) {
  .admin-row { flex-direction: column; align-items: stretch; }
  .admin-row-actions { justify-content: flex-end; }
}
