/* ==========================================================
   Alcatraz Player - Cloud Web Portal & Account Dashboard CSS
   Design: Modern Dark Glassmorphism, WCAG 2.1 AA Compliant
   ========================================================== */

:root {
  --bg-dark: #05080f;
  --bg-card: rgba(14, 21, 35, 0.85);
  --bg-card-sub: rgba(9, 14, 24, 0.7);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --accent-gold: #f59e0b;
  --accent-gold-dark: #d97706;
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.25);
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.15);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

/* Accessibility: Visible Focus Indicators */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.is-hidden {
  display: none !important;
}

body.portal-body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Ambient Background Glow */
.portal-ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.28;
}

.glow-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #2563eb, #1e40af);
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
}

.glow-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #f59e0b, #d97706);
  bottom: -100px;
  right: -100px;
  opacity: 0.15;
}

.glow-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 40%, transparent 80%);
}

/* Layout Wrapper */
.portal-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px 20px;
  max-width: 1080px;
  margin: 0 auto;
}

/* Top Navigation Bar */
.portal-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 28px;
}

.portal-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.brand-icon-box {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 20px -4px var(--primary-glow);
}

.brand-name-group {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.brand-suffix {
  color: #60a5fa;
  font-weight: 600;
}

.brand-portal-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-lang-switcher {
  position: relative;
}

.portal-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.portal-lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.portal-globe-icon {
  color: var(--primary);
}

.portal-lang-code {
  letter-spacing: 0.5px;
}

.portal-lang-chevron {
  transition: transform 0.2s ease;
  color: var(--text-muted);
}

.portal-lang-switcher.is-open .portal-lang-chevron {
  transform: rotate(180deg);
}

.portal-lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(14, 21, 35, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.7);
  padding: 6px;
  min-width: 150px;
  list-style: none;
  z-index: 100;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.portal-lang-switcher.is-open .portal-lang-dropdown {
  display: flex;
}

.portal-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.portal-lang-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.portal-lang-option.active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  font-weight: 600;
}

.portal-lang-flag {
  font-size: 15px;
  line-height: 1;
}

.top-nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.top-nav-link:hover {
  color: white;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

/* Main Container */
.portal-main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Card Foundation */
.portal-card {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
  padding: 32px;
}

/* Auth Card Foundation & 2-Column Showcase Grid */
.auth-card {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 70px -15px rgba(0, 0, 0, 0.75), 0 0 50px -15px rgba(59, 130, 246, 0.12);
}

.auth-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 590px;
}

@media (max-width: 920px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }
}

/* Left Column: Airy Showcase */
.auth-showcase {
  background: linear-gradient(160deg, rgba(20, 30, 52, 0.7) 0%, rgba(9, 14, 25, 0.95) 100%);
  border-right: 1px solid var(--border);
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

@media (max-width: 920px) {
  .auth-showcase {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 32px 24px;
  }
}

.auth-showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #93c5fd;
  margin-bottom: 20px;
  width: fit-content;
}

.auth-showcase-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
}

.auth-showcase-title {
  font-family: var(--font-heading);
  font-size: 32px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: #ffffff;
}

.auth-showcase-desc {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

.auth-feature-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 32px;
}

.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.auth-feature-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-feature-icon.icon-orange {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.auth-feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-feature-text strong {
  font-size: 14px;
  color: #ffffff;
  font-weight: 600;
}

.auth-feature-text span {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.auth-showcase-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.trust-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

/* Right Column: Interaction Box */
.auth-interaction-box {
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 920px) {
  .auth-interaction-box {
    padding: 32px 24px;
  }
}

.portal-card-header {
  text-align: center;
  margin-bottom: 24px;
}

.portal-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.text-gradient {
  background: linear-gradient(135deg, #60a5fa, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.portal-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Tab Navigation */
.portal-tabs {
  display: flex;
  background: rgba(8, 14, 26, 0.75);
  padding: 5px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  border: 1px solid var(--border);
  gap: 6px;
}

.portal-tab {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.portal-tab:hover {
  color: white;
  background: rgba(255, 255, 255, 0.05);
}

.portal-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* Orange PRO Tab Highlight */
.portal-tab.tab-highlight-orange {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.22));
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  position: relative;
  font-weight: 700;
}

.portal-tab.tab-highlight-orange:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.32));
  border-color: #f59e0b;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.portal-tab.tab-highlight-orange.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: #f59e0b;
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.tab-badge-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* Form Controls */
.portal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 580px) {
  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.form-input {
  width: 100%;
  background: rgba(8, 13, 23, 0.9);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-checkout {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45);
}

.btn-checkout:hover:not(:disabled) {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  transform: translateY(-1px);
}

.btn-checkout-orange {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.45);
}

.btn-checkout-orange:hover:not(:disabled) {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.55);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.security-hint {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
}

/* Alerts */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.alert-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
  font-family: var(--font-heading);
}

.alert-desc {
  font-size: 13px;
  color: #a7f3d0;
  line-height: 1.5;
}

.alert-inline {
  width: 100%;
  display: block;
  margin-top: 14px;
  margin-bottom: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  box-sizing: border-box;
}

.alert-inline.is-error {
  background: var(--error-bg);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert-inline.is-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

/* Auth Notice Boxes (Spam Check Callout) */
.auth-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.5;
}

.auth-notice-box.notice-spam {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.auth-notice-box.notice-spam .notice-icon {
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-notice-box .notice-title {
  display: block;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
  font-size: 13.5px;
}

.auth-notice-box .notice-desc {
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.auth-notice-box .notice-desc strong {
  color: #fbbf24;
}

/* Pricing Presentation */
.pricing-card {
  text-align: center;
}

.pricing-pill {
  display: inline-block;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.pricing-pill.pricing-pill-orange {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-heading);
}

.pricing-price .currency {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
}

.pricing-price .amount {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -2px;
  color: #ffffff;
}

.pricing-price .amount.amount-orange {
  color: #f59e0b;
  text-shadow: 0 0 25px rgba(245, 158, 11, 0.35);
}

.pricing-price .period {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-desc {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 20px;
}

.feature-checklist {
  list-style: none;
  text-align: left;
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.3);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.feature-checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.feature-checklist li:last-child {
  border-bottom: none;
}

/* ========================================================== */
/* DASHBOARD STYLES (Logged-in view)                          */
/* ========================================================== */

.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.user-header-card {
  padding: 24px 28px;
}

.user-profile-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.user-avatar-circle {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(30, 64, 175, 0.4));
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
}

.user-info-text {
  flex: 1;
  min-width: 200px;
}

.user-email-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.user-email {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: white;
}

.plan-badge {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.plan-badge.is-trial {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.user-subtext {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card-full-width {
  grid-column: 1 / -1;
}

@media (max-width: 840px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.grid-card {
  display: flex;
  flex-direction: column;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon.gold {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.card-icon.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.card-icon.green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.card-heading {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.card-subheading {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* License Status Details */
.license-status-box,
.license-upgrade-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.status-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  width: fit-content;
}

.status-indicator-badge.is-success {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.status-indicator-badge.is-trial {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.status-box-desc,
.upgrade-box-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.license-key-widget {
  margin-top: 6px;
}

.license-key-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.key-copy-group {
  display: flex;
  gap: 8px;
}

.key-field {
  flex: 1;
  font-family: var(--font-mono);
  background: rgba(6, 10, 18, 0.9);
  border: 1px solid var(--border);
  color: #60a5fa;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
}

.btn-copy {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.16);
  color: white;
}

/* Playlist Subtabs */
.playlist-intro-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: #bfdbfe;
  line-height: 1.45;
  margin-bottom: 16px;
}

.playlist-subtabs {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.subtab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.subtab-btn:hover {
  color: white;
}

.subtab-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

#playlist-save-status {
  width: 100%;
  margin-top: 16px;
  margin-bottom: 8px;
  box-sizing: border-box;
}

/* Quick-Pair Box */
.quick-pair-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.quick-pair-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

.quick-pair-form {
  max-width: 620px;
  width: 100%;
}

.pair-input-group {
  display: flex;
  gap: 12px;
  width: 100%;
  align-items: stretch;
}

#pair-status-msg {
  width: 100%;
  margin-top: 16px;
  box-sizing: border-box;
}

@media (max-width: 520px) {
  .pair-input-group {
    flex-direction: column;
  }
}

.code-box-input {
  flex: 1;
  background: rgba(6, 10, 18, 0.95);
  border: 2px solid rgba(59, 130, 246, 0.4);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 3px;
  color: white;
  padding: 12px;
  text-transform: uppercase;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.code-box-input:focus-visible {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3);
}

.btn-pair {
  white-space: nowrap;
}

/* Device Management Card & Anti-Sharing Seat System */
.device-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.device-quota-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #93c5fd;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.device-quota-badge.is-full {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.device-quota-badge.is-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.devices-progress-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  margin: 14px 0 20px 0;
  overflow: hidden;
}

.devices-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 999px;
  transition: width 0.3s ease, background 0.3s ease;
}

.devices-progress-bar.is-full {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.devices-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.device-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(9, 14, 24, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  flex-wrap: wrap;
  gap: 14px;
}

.device-item-card:hover {
  background: rgba(14, 22, 38, 0.85);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
}

.device-item-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 240px;
  flex: 1;
}

.device-type-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.device-type-icon.desktop {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.device-meta-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.device-name-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
  display: inline-block;
  flex-shrink: 0;
}

.device-status-dot.online {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.device-details-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.device-detail-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.device-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-danger-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger-ghost:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ffffff;
}

.btn-danger-ghost:focus-visible {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}

.device-empty-state {
  text-align: center;
  padding: 32px 16px;
  background: rgba(9, 14, 24, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.device-empty-icon {
  margin-bottom: 12px;
  color: var(--text-dim);
}

.device-empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.device-empty-desc {
  font-size: 13px;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.5;
}

.device-info-alert {
  margin-top: 18px;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: #bfdbfe;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.device-info-alert svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Footer */
.portal-footer {
  margin-top: 48px;
  padding: 24px 0 12px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.copyright-line {
  font-size: 12px;
  color: var(--text-dim);
}

/* ========================================================== */
/* 3-SLOT PLAYLIST SELECTOR & PRO GATE STYLES                 */
/* ========================================================== */

.playlist-slots-container {
  margin-bottom: 20px;
}

.slots-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.slots-header-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.slots-active-label {
  font-size: 12px;
  font-weight: 600;
  color: #10b981;
}

.playlist-slots-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.slot-tab {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  text-align: left;
  position: relative;
}

.slot-tab:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-main);
}

.slot-tab:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

.slot-tab.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.2);
}

.slot-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-main);
}

.slot-tab.active .slot-num {
  background: var(--accent-blue);
  color: #ffffff;
}

.slot-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.slot-badge-active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.badge-pro-slot {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.35));
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.5);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.slot-tab.active .badge-pro-slot {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: #0f172a;
  border: none;
}

/* PRO Lock Notice Banner */
.slot-pro-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(30, 41, 59, 0.7));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.slot-pro-info strong {
  display: block;
  font-size: 14px;
  color: #fef08a;
  margin-bottom: 4px;
}

.slot-pro-info p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
}

/* Slot Metadata row */
.slot-meta-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
}

.slot-meta-bar .flex-grow {
  flex: 1;
  margin-bottom: 0;
}

.slot-buttons-group {
  display: flex;
  gap: 8px;
}

.btn-danger-soft {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger-soft:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
}

.btn-danger-soft:focus-visible {
  outline: 2px solid #ef4444;
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .playlist-slots-bar {
    grid-template-columns: 1fr;
  }

  .slot-meta-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .slot-buttons-group {
    justify-content: flex-end;
  }
}

/* Forgot & Reset Password Styles */
.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.form-label-row .form-label {
  margin-bottom: 0;
}

.btn-text-link {
  background: transparent;
  border: none;
  color: #60a5fa;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease, background 0.15s ease;
}

.btn-text-link:hover {
  color: #93c5fd;
}

.btn-text-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.form-back-row {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.panel-desc-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.panel-desc-text strong {
  color: var(--text-main);
}

/* Secret & Password Inputs Masking (Prevents Chrome Password Manager hijacking IPTV fields) */
.input-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-password-wrapper .form-input {
  padding-right: 44px;
}

.masked-secret-input {
  -webkit-text-security: disc;
  text-security: disc;
  letter-spacing: 0.12em;
  font-family: inherit;
}

.masked-secret-input.is-unmasked {
  -webkit-text-security: none;
  text-security: none;
  letter-spacing: normal;
}

.btn-toggle-secret {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.btn-toggle-secret:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.btn-toggle-secret:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* ==========================================================
   Web Player CTA & Integration Styles
   ========================================================== */

.btn-play-web {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #ffffff !important;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-decoration: none;
}

.btn-play-web:hover {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.5);
  color: #ffffff !important;
}

.btn-play-web:active {
  transform: translateY(0);
}

.btn-play-web:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.btn-header-webplayer {
  margin-right: 8px;
}

.playlist-webplayer-callout {
  margin-top: 18px;
  padding: 14px 18px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.5;
  color: #bae6fd;
}

.playlist-webplayer-callout a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.playlist-webplayer-callout a:hover {
  color: #7dd3fc;
}