/* ============================================================
   Zenfinity Creators Portal - Shared Styles
   Premium dark cosmic SaaS dashboard
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  min-height: 100%;
  background: #060612;
  color: #f5f5ff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  overflow-x: hidden;
}
body {
  background:
    radial-gradient(1400px 700px at 85% -15%, rgba(0, 212, 255, 0.12), transparent 55%),
    radial-gradient(1100px 600px at -15% 25%, rgba(168, 85, 247, 0.12), transparent 55%),
    radial-gradient(800px 800px at 50% 80%, rgba(0, 212, 255, 0.04), transparent 60%),
    #060612;
  min-height: 100vh;
  padding: 24px 16px 64px;
  position: relative;
}

/* Floating cosmic orbs */
body::before {
  content: '';
  position: fixed;
  top: 10%;
  right: -10%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.06) 0%, transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: portalOrb1 28s ease-in-out infinite;
}
body::after {
  content: '';
  position: fixed;
  bottom: 5%;
  left: -10%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, transparent 65%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: portalOrb2 32s ease-in-out infinite;
}
@keyframes portalOrb1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 30px) scale(1.06); }
  66% { transform: translate(30px, -20px) scale(0.94); }
}
@keyframes portalOrb2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -25px) scale(1.08); }
  66% { transform: translate(-35px, 20px) scale(0.92); }
}

a { color: #00d4ff; text-decoration: none; transition: color 0.18s ease; }
a:hover { color: #33dfff; text-decoration: underline; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

.container { max-width: 1100px; margin: 0 auto; position: relative; z-index: 1; }

/* ============================================================
   Header
   ============================================================ */
.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  margin-bottom: 32px;
  background: rgba(17, 17, 37, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  transition: border-color 0.25s ease;
}
.portal-header:hover { border-color: rgba(255, 255, 255, 0.09); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: #fff;
}
.brand-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
  border: 1px solid rgba(0, 212, 255, 0.25);
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
  color: rgba(220, 225, 255, 0.6);
  transition: border-color 0.2s ease;
}
.user-pill:hover { border-color: rgba(255, 255, 255, 0.12); }
.user-pill .email {
  color: #fff;
  font-weight: 500;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-pill .signout-link {
  color: #a855f7;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease;
}
.user-pill .signout-link:hover { color: #c084fc; text-decoration: underline; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: rgba(17, 17, 37, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 26px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), 0 0 0 0.5px rgba(255, 255, 255, 0.04) inset;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { border-color: rgba(255, 255, 255, 0.09); }
.card + .card { margin-top: 20px; }

.section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: rgba(220, 225, 255, 0.4);
  margin: 32px 4px 16px;
}

/* ============================================================
   Metrics
   ============================================================ */
.metric {
  background: rgba(17, 17, 37, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.25s ease;
}
.metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #00d4ff, #a855f7);
  opacity: 0.6;
  transition: opacity 0.25s ease;
}
.metric:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 212, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 212, 255, 0.08);
}
.metric:hover::before { opacity: 1; }
.metric .label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(220, 225, 255, 0.45);
  margin-bottom: 12px;
}
.metric .value {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.5px;
  font-family: 'Bebas Neue', 'Inter', sans-serif;
  font-size: 40px;
  letter-spacing: 1px;
}
.metric .sub {
  font-size: 12px;
  color: rgba(220, 225, 255, 0.45);
  margin-top: 10px;
  line-height: 1.45;
}
.metric .sub strong { color: #00d4ff; font-weight: 600; }
.metric.glow-cyan {
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.15), 0 8px 36px rgba(0, 212, 255, 0.1);
}
.metric.glow-purple {
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.15), 0 8px 36px rgba(168, 85, 247, 0.1);
}

/* ============================================================
   Grids
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

@media (max-width: 880px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.15), transparent 70%);
  pointer-events: none;
}
.btn:active::after { opacity: 1; }
.btn-primary {
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  color: #060612;
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(0, 212, 255, 0.35);
  filter: brightness(1.08);
  text-decoration: none;
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 212, 255, 0.2);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: #f5f5ff;
  border-color: rgba(255, 255, 255, 0.1);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.35);
  transform: translateY(-1px);
  text-decoration: none;
}
.btn-ghost:active { transform: translateY(0); }
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  filter: saturate(0.5);
}

/* ============================================================
   Form Inputs
   ============================================================ */
.label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(220, 225, 255, 0.5);
  margin-bottom: 8px;
}
.input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(6, 6, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: all 0.2s ease;
}
.input::placeholder { color: rgba(220, 225, 255, 0.3); }
.input:focus {
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
  background: rgba(6, 6, 18, 0.85);
}
.field { margin-bottom: 20px; }

/* ============================================================
   Copy Link
   ============================================================ */
.copy-link {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: rgba(6, 6, 18, 0.6);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.copy-link:hover { border-color: rgba(0, 212, 255, 0.35); }
.copy-link input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  padding: 14px 16px;
  font-size: 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  min-width: 0;
}
.copy-link button {
  background: linear-gradient(135deg, #00d4ff, #0099cc);
  color: #060612;
  border: none;
  padding: 0 24px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.copy-link button:hover { filter: brightness(1.1); }
.copy-link button.copied {
  background: linear-gradient(135deg, #22c55e, #15803d);
  color: #fff;
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.4;
}
.badge-active { background: rgba(34, 197, 94, 0.1); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.2); }
.badge-pending { background: rgba(234, 179, 8, 0.1); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.2); }
.badge-paused { background: rgba(168, 85, 247, 0.1); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.2); }
.badge-disabled { background: rgba(239, 68, 68, 0.1); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.2); }

/* ============================================================
   Tables
   ============================================================ */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(220, 225, 255, 0.4);
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}
.table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 14px;
  color: rgba(220, 225, 255, 0.85);
}
.table tr:last-child td { border-bottom: none; }
.table tr { transition: background 0.18s ease; }
.table tr:hover td { background: rgba(0, 212, 255, 0.03); }

/* ============================================================
   Program Cards
   ============================================================ */
.program-card {
  background: rgba(17, 17, 37, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.25s ease;
}
.program-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 212, 255, 0.2);
  box-shadow: 0 8px 36px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 212, 255, 0.08);
}
.program-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a1a2e, #0f0f20);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(220, 225, 255, 0.25);
  font-size: 13px;
  overflow: hidden;
}
.program-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.program-card:hover .program-thumb img { transform: scale(1.04); }
.program-body { padding: 20px; }
.program-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.program-price {
  font-size: 13px;
  color: #00d4ff;
  font-weight: 600;
  margin-bottom: 14px;
}
.program-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(220, 225, 255, 0.45);
}
.program-stats strong {
  display: block;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
}

/* ============================================================
   States
   ============================================================ */
.empty-state {
  padding: 80px 28px;
  text-align: center;
  color: rgba(220, 225, 255, 0.4);
  font-size: 14px;
  line-height: 1.6;
}
.empty-state strong {
  color: rgba(220, 225, 255, 0.7);
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.error-msg {
  color: #f87171;
  font-size: 13px;
  margin-top: 8px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.2);
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.5;
}
.success-msg {
  color: #4ade80;
  font-size: 13px;
  margin-top: 8px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.5;
}

.muted {
  color: rgba(220, 225, 255, 0.45);
  font-size: 13px;
  line-height: 1.55;
}

/* ============================================================
   Spinner
   ============================================================ */
.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(0, 212, 255, 0.15);
  border-top-color: #00d4ff;
  animation: spin 0.85s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-block {
  padding: 80px 0;
  text-align: center;
}
.loading-block .muted { margin-top: 16px; }

/* ============================================================
   Login
   ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(17, 17, 37, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 40px 36px;
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(0, 212, 255, 0.06) inset;
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(500px circle at 25% 0%, rgba(0, 212, 255, 0.12), transparent 50%),
    radial-gradient(400px circle at 80% 100%, rgba(168, 85, 247, 0.12), transparent 50%);
  pointer-events: none;
  animation: loginGlow 12s ease-in-out infinite;
}
@keyframes loginGlow {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.03) rotate(2deg); }
}
.login-card > * { position: relative; }
.login-card .brand { justify-content: center; margin-bottom: 24px; }
.login-title {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.login-sub {
  font-size: 14px;
  color: rgba(220, 225, 255, 0.45);
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.55;
}
.login-card .btn-primary {
  width: 100%;
  padding: 16px;
  font-size: 15px;
}
.forgot-row {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
}
.forgot-row a {
  color: #a855f7;
  font-weight: 600;
  cursor: pointer;
}
.forgot-row a:hover { color: #c084fc; }

/* ============================================================
   Footer
   ============================================================ */
.portal-footer {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  color: rgba(220, 225, 255, 0.3);
  font-size: 12px;
}
.portal-footer .btn { margin-bottom: 14px; }
.portal-footer a { color: rgba(220, 225, 255, 0.55); transition: color 0.18s ease; }
.portal-footer a:hover { color: #00d4ff; }

/* ============================================================
   Welcome Card (Non-affiliate)
   ============================================================ */
.welcome-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(17, 17, 37, 0.95), rgba(17, 17, 37, 0.8));
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 28px;
  max-width: 700px;
  margin: 48px auto 0;
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(0, 212, 255, 0.05) inset;
}
.welcome-glow {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(600px circle at 30% 0%, rgba(0, 212, 255, 0.18), transparent 50%),
    radial-gradient(500px circle at 80% 100%, rgba(168, 85, 247, 0.18), transparent 50%);
  pointer-events: none;
  animation: welcomeGlow 15s ease-in-out infinite;
}
@keyframes welcomeGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04) rotate(1deg); }
}
.welcome-inner {
  position: relative;
  padding: 52px 48px;
  text-align: center;
}
.welcome-icon {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: linear-gradient(135deg, #00d4ff, #a855f7);
  color: #060612;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  box-shadow: 0 14px 48px rgba(0, 212, 255, 0.3);
  transition: transform 0.3s ease;
}
.welcome-icon:hover { transform: scale(1.05) rotate(2deg); }
.welcome-title {
  font-size: 34px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -0.4px;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 40%, #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.welcome-sub {
  font-size: 15px;
  color: rgba(220, 225, 255, 0.55);
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto 36px;
}
.welcome-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin-bottom: 36px;
}
.welcome-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(6, 6, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 18px 20px;
  transition: all 0.2s ease;
}
.welcome-step:hover {
  border-color: rgba(0, 212, 255, 0.15);
  background: rgba(6, 6, 18, 0.7);
}
.welcome-step-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00d4ff, #a855f7);
  color: #060612;
  font-weight: 900;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.2);
}
.welcome-step strong { display: block; color: #fff; font-size: 14px; font-weight: 800; margin-bottom: 3px; }
.welcome-step span { display: block; color: rgba(220, 225, 255, 0.45); font-size: 13px; line-height: 1.5; }
.welcome-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.welcome-cta .btn { padding: 14px 28px; font-size: 13px; letter-spacing: 0.5px; }

/* ============================================================
   Responsive - Tablet
   ============================================================ */
@media (max-width: 880px) {
  body { padding: 20px 12px 56px; }
  .portal-header { padding: 14px 18px; }
}

/* ============================================================
   Responsive - Mobile
   ============================================================ */
@media (max-width: 560px) {
  body { padding: 16px 10px 56px; }

  /* Header stacks vertically */
  .portal-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    gap: 10px;
  }
  .user-pill {
    width: 100%;
    justify-content: space-between;
  }
  .user-pill .email { max-width: 180px; font-size: 12px; }

  /* Cards */
  .card { padding: 20px; border-radius: 16px; }
  .metric { padding: 20px; }
  .metric .value { font-size: 32px; }

  /* Inputs - bigger touch targets */
  .input { padding: 16px 16px; font-size: 16px; }
  .btn { padding: 14px 22px; font-size: 14px; }

  /* Program cards */
  .program-body { padding: 16px; }

  /* Copy link */
  .copy-link { border-radius: 12px; }
  .copy-link input { padding: 14px 12px; font-size: 12px; }
  .copy-link button { padding: 0 16px; font-size: 12px; }

  /* Login */
  .login-card { padding: 32px 24px; }
  .login-title { font-size: 24px; }
  .login-sub { font-size: 13px; margin-bottom: 24px; }

  /* Welcome */
  .welcome-inner { padding: 36px 24px; }
  .welcome-title { font-size: 26px; }
  .welcome-sub { font-size: 14px; }
  .welcome-step { padding: 14px 16px; }

  /* Tables */
  .table th { padding: 12px 12px; font-size: 9px; }
  .table td { padding: 12px 12px; font-size: 13px; }

  /* Section title */
  .section-title { margin: 24px 4px 14px; }
}

/* ============================================================
   Responsive - Very Small
   ============================================================ */
@media (max-width: 400px) {
  .brand-title { font-size: 16px; }
  .brand-badge { font-size: 9px; padding: 3px 8px; }
  .metric .value { font-size: 28px; }
  .welcome-inner { padding: 28px 18px; }
  .welcome-title { font-size: 22px; }
  .welcome-icon { width: 72px; height: 72px; border-radius: 20px; }
}

/* --- Selection Color --- */
::selection { background: rgba(0, 212, 255, 0.25); color: #fff; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.14); }

/* ═══════════ PROGRAM PREVIEW (mirrors DynamicProgramViewer) ═══════════ */
.pv-wrap { color: #e8e8f0; font-family: Inter, system-ui, sans-serif; max-width: 720px; margin: 0 auto 24px; }

.pv-draft-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; margin-bottom: 16px;
  background: rgba(234,179,8,0.1);
  border: 1px solid rgba(234,179,8,0.3);
  border-radius: 14px;
  flex-wrap: wrap;
}
.pv-draft-chip {
  font-size: 10px; font-weight: 800; color: #facc15;
  letter-spacing: 1.5px; text-transform: uppercase;
  background: rgba(234,179,8,0.2);
  padding: 5px 10px; border-radius: 6px;
  white-space: nowrap;
}
.pv-draft-text { color: #a7a9be; font-size: 13px; }

.pv-hero {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(20,20,40,0.4);
  border-radius: 22px;
  overflow: hidden;
  text-align: center;
  margin-bottom: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.pv-hero-cover-wrap { width: 100%; height: 210px; position: relative; }
.pv-hero-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-hero-cover-fallback {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(168,85,247,0.08));
  display: flex; align-items: center; justify-content: center;
  font-size: 64px;
}
.pv-hero-gradient {
  position: absolute; left: 0; right: 0; bottom: 0; height: 110px;
  background: linear-gradient(to bottom, transparent, rgba(6,6,18,0.85));
  pointer-events: none;
}
.pv-hero-badge {
  position: absolute; top: 14px; right: 14px;
  padding: 6px 14px; border-radius: 20px;
  background: #00d4ff;
  color: #060612; font-weight: 900; font-size: 12px; letter-spacing: 1.5px;
}
.pv-hero-name { font-size: 26px; font-weight: 800; color: #fff; margin: 16px 20px 0; line-height: 1.15; letter-spacing: -0.5px; }
.pv-hero-creator { font-size: 13px; font-weight: 600; color: #00d4ff; margin-top: 8px; letter-spacing: 1.2px; }
.pv-hero-tag { font-size: 15px; color: #a7a9be; font-weight: 500; margin: 8px 24px 22px; line-height: 1.5; }

.pv-stats {
  display: flex; justify-content: space-around;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(20,20,40,0.4);
  border-radius: 14px;
  padding: 18px 12px;
  margin-bottom: 16px;
  gap: 10px;
}
.pv-stat { flex: 1; text-align: center; }
.pv-stat-val { font-family: 'Bebas Neue', Inter, system-ui, sans-serif; font-size: 32px; letter-spacing: 1.5px; color: #00d4ff; line-height: 1; }
.pv-stat-lbl { font-size: 10px; color: #8a8aac; text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; font-weight: 700; }

.pv-tabbar {
  display: flex; gap: 4px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(20,20,40,0.4);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}
.pv-tab {
  flex: 1; padding: 10px;
  background: none; border: none;
  border-radius: 9px;
  color: #a7a9be; font-size: 13px; font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer; transition: all 0.15s;
  font-family: inherit;
}
.pv-tab:hover { color: #fff; }
.pv-tab-active { background: #00d4ff !important; color: #060612 !important; }

.pv-section-head { font-size: 16px; font-weight: 800; color: #fff; margin: 18px 4px 12px; }
.pv-desc { font-size: 15px; color: #c8cad8; line-height: 1.6; margin-bottom: 18px; white-space: pre-wrap; }
.pv-feature-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.pv-feature-check {
  width: 22px; height: 22px; border-radius: 6px;
  background: rgba(0,212,255,0.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.pv-feature-text { color: #c8cad8; font-size: 15px; line-height: 1.5; }

.pv-phase {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(20,20,40,0.4);
  border-left: 4px solid #00d4ff;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.pv-phase-head { display: flex; justify-content: space-between; align-items: center; }
.pv-phase-name { font-size: 15px; font-weight: 700; color: #fff; }
.pv-phase-weeks { font-size: 11px; font-weight: 700; color: #00d4ff; letter-spacing: 0.4px; }
.pv-phase-desc { font-size: 12px; color: #8a8aac; margin-top: 6px; line-height: 1.5; }

.pv-week {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(20,20,40,0.4);
  border-left: 4px solid #00d4ff;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.pv-week-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pv-week-label { font-size: 12px; font-weight: 800; color: #fff; letter-spacing: 0.8px; }
.pv-week-phase { font-size: 11px; font-weight: 700; letter-spacing: 0.4px; }
.pv-week-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-chip { padding: 6px 12px; border-radius: 8px; min-width: 48px; text-align: center; font-size: 11px; font-weight: 800; color: #060612; letter-spacing: 0.3px; }
.pv-chip-rest { padding: 6px 12px; border-radius: 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); font-size: 11px; font-weight: 600; color: #8a8aac; }

.pv-day {
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(20,20,40,0.4);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
}
.pv-day-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}
.pv-day-head::-webkit-details-marker { display: none; }
.pv-day-badge {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pv-day-badge span { color: #060612; font-weight: 900; font-size: 13px; letter-spacing: 0.5px; }
.pv-day-title { flex: 1; min-width: 0; }
.pv-day-name { font-size: 15px; font-weight: 700; color: #fff; }
.pv-day-target { font-size: 12px; color: #8a8aac; margin-top: 2px; }
.pv-day-chev { font-size: 24px; font-weight: 800; color: #00d4ff; padding: 0 4px; transition: transform 0.2s; }
.pv-day[open] .pv-day-chev { transform: rotate(45deg); }

.pv-exercises { padding: 0 14px 10px; }
.pv-ex-row { padding: 12px 0; border-top: 1px solid rgba(255,255,255,0.05); }
.pv-ex-row:first-child { border-top: none; }
.pv-ex-name { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.pv-ex-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.pv-ex-chip { font-size: 12px; font-weight: 700; color: #00d4ff; }
.pv-ex-chip-muted { font-size: 12px; font-weight: 500; color: #8a8aac; }
.pv-ex-notes { font-size: 12px; color: #a7a9be; font-style: italic; margin-top: 2px; }

.pv-start-btn { margin: 14px 0 4px; padding: 14px; border-radius: 12px; background: #00d4ff; color: #060612; font-weight: 800; font-size: 13px; letter-spacing: 0.8px; text-align: center; box-shadow: 0 4px 16px rgba(0,212,255,0.25); opacity: 0.95; }

.pv-nutrition-card { border: 1px solid rgba(255,255,255,0.08); background: rgba(20,20,40,0.4); border-radius: 14px; padding: 16px; margin-bottom: 10px; }
.pv-target-row { display: flex; justify-content: space-around; gap: 8px; }
.pv-target-block { flex: 1; text-align: center; }
.pv-target-val { font-family: 'Bebas Neue', Inter, system-ui, sans-serif; font-size: 22px; letter-spacing: 1px; color: #00d4ff; line-height: 1; }
.pv-target-lbl { font-size: 10px; color: #8a8aac; text-transform: uppercase; letter-spacing: 0.8px; margin-top: 4px; font-weight: 700; }

.pv-meals { padding: 0 14px 10px; }
.pv-meal-row { padding: 14px 0; border-top: 1px solid rgba(255,255,255,0.05); }
.pv-meal-row:first-child { border-top: none; }
.pv-meal-img { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; display: block; }
.pv-meal-tag { font-size: 11px; font-weight: 700; color: #00d4ff; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 2px; }
.pv-meal-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.pv-macros { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.pv-macro { font-size: 12px; font-weight: 600; color: #c8cad8; }
.pv-ingredients { margin-top: 6px; }
.pv-ingredients-lbl { font-size: 11px; font-weight: 700; color: #8a8aac; text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 4px; }
.pv-ingredient-line { font-size: 13px; color: #c8cad8; line-height: 1.5; }
.pv-meal-instructions { font-size: 13px; color: #a7a9be; line-height: 1.5; margin-top: 8px; }
.pv-log-meal { margin-top: 10px; padding: 10px 16px; border: 1.5px solid #00d4ff; border-radius: 10px; color: #00d4ff; font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-align: center; display: inline-block; opacity: 0.95; }
.pv-log-day { margin: 14px 0 4px; padding: 14px; border-radius: 12px; background: #00d4ff; color: #060612; font-weight: 800; font-size: 13px; letter-spacing: 0.8px; text-align: center; box-shadow: 0 4px 16px rgba(0,212,255,0.25); opacity: 0.95; }

.pv-resource { display: flex; align-items: center; gap: 12px; border: 1px solid rgba(255,255,255,0.08); background: rgba(20,20,40,0.4); border-radius: 12px; padding: 14px; margin-bottom: 10px; text-decoration: none; }
.pv-resource-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.pv-resource-body { flex: 1; }
.pv-resource-name { font-size: 14px; font-weight: 600; color: #fff; }
.pv-resource-type { font-size: 11px; color: #8a8aac; margin-top: 2px; letter-spacing: 0.5px; font-weight: 600; }
.pv-resource-open { font-size: 13px; font-weight: 700; color: #00d4ff; }

.pv-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.pv-approve { flex: 1; min-width: 200px; padding: 14px !important; font-size: 15px !important; font-weight: 800 !important; letter-spacing: 0.3px; }
.pv-feedback { flex: 1; min-width: 200px; padding: 14px !important; font-size: 15px !important; font-weight: 700 !important; }
