/* ==========================================================================
   WAHNOTIF APPLE / iOS PREMIUM DESIGN SYSTEM (2026 EDITION)
   Ultra Clean Apple Light Glass, Segmented Controls, Pill Buttons, Soft Shadows
   ========================================================================== */

:root {
  --ios-bg-gradient: #f8fafc;
  --ios-card-bg: rgba(255, 255, 255, 0.95);
  --ios-card-border: rgba(226, 232, 240, 0.9);
  --ios-glass-bg: rgba(255, 255, 255, 0.9);
  --ios-text-primary: #0f172a;
  --ios-text-secondary: #64748b;
  --ios-accent-emerald: #10b981;
  --ios-accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --ios-shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  --ios-shadow-glow: 0 4px 20px rgba(16, 185, 129, 0.15);
  --ios-radius: 24px;
  --ios-radius-pill: 9999px;
  --ios-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

body.apple-theme {
  font-family: var(--ios-font);
  background: var(--ios-bg-gradient);
  color: var(--ios-text-primary);
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* Ensure sections display properly when active */
.app-main .section {
  display: none;
}
.app-main .section.active {
  display: block !important;
}

/* Glassmorphism Card (Apple Light Glass Style) */
.ios-glass-card {
  background: var(--ios-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--ios-card-border);
  border-radius: var(--ios-radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.04);
  padding: 28px;
  color: #0f172a;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.ios-glass-card:hover {
  border-color: rgba(203, 213, 225, 0.9);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

/* iOS Segmented Navigation Bar (Apple Light Segmented Control) */
.ios-segmented-nav {
  display: flex;
  background: rgba(241, 245, 249, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--ios-radius-pill);
  padding: 4px;
  max-width: 620px;
  margin: 0 auto 28px auto;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
}

.ios-segmented-btn {
  flex: 1;
  padding: 9px 18px;
  border-radius: var(--ios-radius-pill);
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ios-segmented-btn.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Apple Wallet / Wibi Coin Card (Apple Light White Glass Card) */
.wibi-coin-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-radius: var(--ios-radius);
  padding: 28px;
  color: #0f172a;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.wibi-coin-balance {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #10b981;
  margin: 12px 0 4px 0;
}

/* iOS Toggle Switch (Apple Style) */
.ios-switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #f8fafc;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
}

.ios-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ios-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 34px;
}

.ios-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

input:checked + .ios-slider {
  background-color: #10b981;
}

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

/* iOS Pill Button */
.ios-btn-pill {
  padding: 10px 22px;
  border-radius: var(--ios-radius-pill);
  border: none;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--ios-accent-emerald-glow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ios-btn-pill:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px var(--ios-accent-emerald-glow);
}

.ios-btn-pill.secondary {
  background: #f1f5f9;
  color: #334155;
  box-shadow: none;
  border: 1px solid #cbd5e1;
}

.ios-btn-pill.secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Role Selector Apple Cards (Light Mode) */
.ios-role-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.ios-role-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}

.ios-role-card.selected {
  border: 2px solid #10b981;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}

/* Responsive Grid System */
.ios-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.ios-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
