/* DC Pole Member Portal - Mobile-First PWA */
@font-face {
  font-family: 'Roboto Slab';
  src: url('/portal/assets/roboto-slab-regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto Slab';
  src: url('/portal/assets/roboto-slab-bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('/portal/assets/roboto-regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('/portal/assets/roboto-medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('/portal/assets/roboto-bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #000000;
  --surface: #141414;
  --surface-light: #1E1E1E;
  --card: #1A1A1A;
  --text: #FFFFFF;
  --text-dim: #A0A0A0;
  --text-muted: #606060;
  --accent: #FF6600;
  --accent-hover: #E55A00;
  --accent-soft: rgba(255,102,0,0.12);
  --border: #2A2A2A;
  --border-light: #333333;
  --green: #2F8E69;
  --green-soft: rgba(47,142,105,0.15);
  --red: #D04A4A;
  --red-soft: rgba(208,74,74,0.12);
  --font-body: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Roboto Slab', Georgia, serif;
  --radius: 0px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { min-height: 100vh; overflow-x: hidden; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
a { color: var(--accent); text-decoration: none; }
img { display: block; max-width: 100%; }

/* ===== AUTH SCREEN ===== */
.auth-screen {
  display: block;
  min-height: 100vh;
  padding: 1rem 1.25rem;
  padding-top: calc(1.5rem + var(--safe-top, 0px));
  padding-bottom: calc(1rem + var(--safe-bottom, 0px));
  background: var(--bg);
  background-image: linear-gradient(180deg, #0a0a0a 0%, #000 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.auth-container {
  width: 100%;
  max-width: 360px;
  text-align: center;
  margin: 0 auto;
}
.auth-logo {
  height: 56px;
  margin: 0 auto 0.25rem;
}
.auth-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.15rem;
}
.auth-title span { color: var(--accent); }
.auth-subtitle {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.auth-intro {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
  text-align: left;
  line-height: 1.35;
}
.auth-toggle {
  display: flex;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  background: var(--surface);
}
.auth-toggle-btn {
  flex: 1;
  padding: 0.7rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.auth-toggle-btn.active {
  background: var(--accent);
  color: #fff;
}
.auth-form {
  display: none;
  text-align: left;
}
.auth-form.active {
  display: block;
  animation: fadeIn 0.3s ease;
}
.auth-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-body);
  margin-bottom: 0.75rem;
  border-radius: 0;
  transition: border-color 0.2s ease;
  min-height: 44px;
  -webkit-appearance: none;
  appearance: none;
}
.auth-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.auth-input::placeholder { color: var(--text-muted); }
.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-light);
}
.auth-input[type="date"] {
  color: var(--text-dim);
  color-scheme: dark;
}
.auth-error {
  color: var(--red);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  min-height: 1.2rem;
  text-align: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: 0;
  transition: all 0.15s ease;
  min-height: 44px;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:active {
  background: var(--accent-hover);
}
.btn-secondary {
  background: var(--surface-light);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:active {
  background: #2A2A2A;
}
.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
}
.btn-danger:active {
  background: var(--red);
  color: #fff;
}
.btn-green {
  background: var(--green);
  color: #fff;
}
.btn-full {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
}
.btn-sm {
  padding: 0.5rem 0.875rem;
  font-size: 0.85rem;
  min-height: 36px;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== APP LAYOUT ===== */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
}

.app-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  padding-top: calc(0.75rem + var(--safe-top));
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-header-logo {
  height: 32px;
}
.app-header-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.app-content {
  padding: 1rem;
  padding-bottom: calc(80px + var(--safe-bottom, 0px));
  min-height: calc(100vh - 60px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
  z-index: 100;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0.5rem 0.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  min-height: 60px;
  transition: color 0.15s ease;
}
.nav-item.active {
  color: var(--accent);
}
.nav-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.nav-label {
  font-size: 0.7rem;
  font-weight: 500;
}

/* ===== VIEW TRANSITIONS ===== */
.view {
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== SECTIONS ===== */
.section-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  margin-top: 0.25rem;
}
.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.section-divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}
.section-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-bottom: 0.625rem;
  margin-top: 1.5rem;
}
.section-label:first-child { margin-top: 0; }

/* ===== CARDS ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1rem;
  margin-bottom: 0.625rem;
}
.card-highlight {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--card) 0%, rgba(255,102,0,0.05) 100%);
}
.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.card-row + .card-row {
  margin-top: 0.625rem;
  padding-top: 0.625rem;
  border-top: 1px solid var(--border);
}

/* ===== START TAB ===== */
.welcome {
  font-size: 1.5rem;
  font-family: var(--font-display);
  margin-bottom: 0.25rem;
}
.welcome-sub {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}
.abo-card-active {
  background: var(--card);
  border: 1px solid var(--accent);
  padding: 1.125rem;
  margin-bottom: 0.625rem;
}
.abo-card-active .abo-name {
  font-size: 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
}
.abo-card-active .abo-credits {
  font-size: 2rem;
  font-family: var(--font-display);
  color: var(--accent);
  font-weight: 700;
  line-height: 1;
}
.abo-card-active .abo-credits-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.abo-card-active .abo-valid {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}
.quick-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}
.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.875rem;
  text-align: center;
}
.stat-box .stat-num {
  font-size: 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}
.stat-box .stat-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}
.stat-num.accent { color: var(--accent); }
.stat-num.green { color: var(--green); }
.stat-num.red { color: var(--red); }

.cta-card {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  padding: 1.25rem;
  text-align: center;
  margin-bottom: 0.625rem;
}
.cta-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.cta-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.next-booking {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  margin-bottom: 0.625rem;
}
.nav-arrow { width:18px; height:18px; color:var(--text-muted); flex-shrink:0; }
.next-booking-date {
  text-align: center;
  min-width: 48px;
}
.next-booking-date .nb-day {
  font-size: 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1;
}
.next-booking-date .nb-month {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
}
.next-booking-info { flex: 1; }
.next-booking-info .nb-course {
  font-size: 0.95rem;
  font-weight: 500;
}
.next-booking-info .nb-time {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.empty-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.875rem;
  margin-bottom: 0.625rem;
}

/* ===== KURSE TAB ===== */
/* ===== CATEGORY TILES ===== */
.cat-tiles { display:flex; flex-direction:column; gap:0.75rem; margin-bottom:1rem; }
.cat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.cat-tile:active { border-color: var(--accent); }
.cat-tile-bar { width:4px; align-self:stretch; flex-shrink:0; }
.cat-tile-body { flex:1; padding:0.85rem 1rem; }
.cat-tile-name { font-weight:700; font-size:1rem; font-family:var(--font-display); }
.cat-tile-desc { font-size:0.78rem; color:var(--text-dim); margin-top:0.2rem; line-height:1.3; }
.cat-tile-count { font-size:0.72rem; color:var(--text-muted); margin-top:0.3rem; text-transform:uppercase; letter-spacing:0.05em; }
.cat-tile-arrow { width:20px; height:20px; color:var(--text-dim); margin-right:1rem; transition:transform 0.2s ease; flex-shrink:0; }
.cat-detail { padding:0 0.5rem; }
.cat-detail .course-card { margin:0.5rem 0; }

/* ===== COURSE FEATURES ===== */
.course-features { list-style:none; padding:0; margin:0.5rem 0; }
.course-features li {
  font-size:0.8rem; color:var(--text-dim); padding-left:1rem; position:relative; margin-bottom:0.2rem; line-height:1.35;
}
.course-features li::before {
  content:'▸'; color:var(--accent); position:absolute; left:0; font-size:0.7rem;
}

/* ===== FILTER CHIPS ===== */
.filter-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  -webkit-overflow-scrolling: touch;
}
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  padding: 0.4rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 32px;
  display: flex;
  align-items: center;
}
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.schedule-course-filter {
  margin-bottom: 0.75rem;
}
.schedule-course-filter select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0;
  font-size: 0.85rem;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FF6600' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.course-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1rem;
  margin-bottom: 0.625rem;
}
.course-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.course-card-name {
  font-size: 1.05rem;
  font-family: var(--font-display);
  font-weight: 700;
}
.course-card-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.course-card-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 0.625rem;
  line-height: 1.4;
}
.course-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.course-meta-item {
  font-size: 0.75rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.cat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* ABO SHOP */
.abo-shop-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.125rem;
  margin-bottom: 0.625rem;
  position: relative;
}
.abo-shop-card.featured {
  border-color: var(--accent);
}
.abo-shop-name {
  font-size: 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
}
.abo-shop-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.625rem;
}
.abo-shop-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.abo-price-main {
  font-size: 1.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
}
.abo-price-member {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.abo-shop-features {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 0.875rem;
  white-space: pre-line;
}
.abo-shop-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ===== STUNDENPLAN TAB ===== */
/* ===== DATE SELECTOR ===== */
.schedule-month-header {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-transform: capitalize;
}
.date-month-sep {
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem 0 0.5rem;
  flex-shrink: 0;
  align-self: flex-start;
}
.date-selector {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.date-selector::-webkit-scrollbar { display: none; }
.date-chip {
  flex-shrink: 0;
  width: 56px;
  padding: 0.5rem 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  scroll-snap-align: start;
}
.date-chip.active {
  background: var(--accent);
  border-color: var(--accent);
}
.date-chip .dc-weekday {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
}
.date-chip.active .dc-weekday { color: rgba(255,255,255,0.7); }
.date-chip .dc-day {
  font-size: 1.1rem;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

.session-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.875rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.session-card.past {
  opacity: 0.4;
}
.session-card.full {
  opacity: 0.6;
}
.session-card.booked {
  border-color: var(--green);
  border-left: 3px solid var(--green);
}
.si-booked-badge {
  display: inline-block;
  background: rgba(47, 142, 105, 0.15);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.session-time {
  text-align: center;
  min-width: 50px;
}
.session-time .st-start {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-display);
}
.session-time .st-end {
  font-size: 0.7rem;
  color: var(--text-dim);
}
.session-info {
  flex: 1;
  min-width: 0;
}
.session-info .si-course {
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.session-info .si-instructor {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.session-info .si-spots {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.125rem;
}
.session-info .si-spots.full { color: var(--red); }
.session-cat-dot {
  width: 4px;
  align-self: stretch;
  border-radius: 0;
  margin-right: -0.375rem;
}

/* ===== BUCHUNGEN TAB ===== */
.booking-item {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.875rem;
  margin-bottom: 0.5rem;
}
.booking-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.booking-item-course {
  font-size: 0.9rem;
  font-weight: 500;
}
.booking-item-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.125rem;
}
.booking-item.past {
  opacity: 0.5;
}

/* ===== INVOICE BADGES ===== */
.badge-paid { background: rgba(47, 142, 105, 0.15); color: var(--green); }
.badge-partial { background: rgba(255, 165, 0, 0.15); color: #FFA500; }
.badge-cancelled { background: rgba(208, 74, 74, 0.15); color: var(--red); }
.badge-pending { background: rgba(255, 170, 0, 0.15); color: #FFAA00; }
.badge-open { background: var(--accent-soft); color: var(--accent); }
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ===== INVOICE DETAIL ===== */
.inv-detail-grid { margin-bottom: 0.5rem; }
.inv-detail-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.6rem 0; border-bottom: 1px solid var(--border);
}
.idr-label { font-size: 0.82rem; color: var(--text-dim); }
.idr-value { font-size: 0.88rem; font-weight: 500; text-align: right; }

.invoice-item {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.875rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.invoice-item .inv-num {
  font-size: 0.85rem;
  font-weight: 500;
}
.invoice-item .inv-abo {
  font-size: 0.78rem;
  color: var(--text-dim);
}
.invoice-item .inv-amount {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-display);
}

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-active { background: var(--green-soft); color: var(--green); }
.badge-expired { background: rgba(96,96,96,0.2); color: var(--text-dim); }
.badge-cancelled { background: var(--red-soft); color: var(--red); }
.badge-open { background: var(--accent-soft); color: var(--accent); }
.badge-paid { background: var(--green-soft); color: var(--green); }
.badge-booked { background: var(--green-soft); color: var(--green); }
.badge-partial { background: var(--accent-soft); color: var(--accent); }

/* ===== PROFIL TAB ===== */
.profile-header {
  text-align: center;
  padding: 1.5rem 0 1rem;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}
.profile-name {
  font-size: 1.25rem;
  font-family: var(--font-display);
  font-weight: 700;
}
.profile-email {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.profile-info {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.25rem 1rem;
  margin-bottom: 0.625rem;
}
.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.profile-info-row:last-child { border-bottom: none; }
.profile-info-row .pi-label {
  color: var(--text-dim);
  font-size: 0.8rem;
}
.profile-info-row .pi-value {
  text-align: right;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-edit-form { display: none; }
.profile-edit-form.active { display: block; animation: fadeIn 0.25s ease; }

.form-group {
  margin-bottom: 1rem;
}
.form-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.form-input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-body);
  border-radius: 0;
  min-height: 44px;
  transition: border-color 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
}
.form-input:disabled {
  color: var(--text-dim);
  cursor: not-allowed;
}
.form-actions {
  display: flex;
  gap: 0.625rem;
  margin-top: 1rem;
}

/* ===== ACTION SHEET ===== */
.action-sheet-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 250;
}
.action-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  padding-bottom: calc(1.5rem + var(--safe-bottom, 0px));
  z-index: 251;
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.action-sheet-handle {
  width: 36px; height: 4px;
  background: var(--border);
  margin: 0 auto 1rem;
}
.action-sheet-title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}
.action-sheet-info {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}
.asi-course { font-weight: 700; font-size: 1rem; }
.asi-detail { color: var(--text-dim); font-size: 0.85rem; margin-top: 0.2rem; }
.asi-spots { color: var(--green); font-size: 0.82rem; margin-top: 0.3rem; font-weight: 500; }
.action-sheet-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.35;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: calc(90px + var(--safe-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--surface-light);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 90%;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast.success {
  border-color: var(--green);
  color: var(--green);
}
.toast.error {
  border-color: var(--red);
  color: var(--red);
}

/* ===== LOADING ===== */
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}
.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Inline loading */
.inline-loading {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  z-index: 250;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-sheet {
  background: var(--surface);
  width: 100%;
  max-width: 480px;
  padding: 1.5rem;
  padding-bottom: calc(2rem + var(--safe-bottom));
  border-top: 1px solid var(--accent);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-title {
  font-size: 1.1rem;
  font-family: var(--font-display);
  margin-bottom: 0.5rem;
}
.modal-body {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.modal-actions {
  display: flex;
  gap: 0.625rem;
}
.modal-actions .btn { flex: 1; }

/* ===== UTILITY ===== */
.text-accent { color: var(--accent); }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }