@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ==========================================================================
   VIVEXUS CERTIFICATE SERVICE PLATFORM - APPLE DEVELOPER DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f7;
  --bg-tertiary: #fbfbfd;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-dark: #161617;
  
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --text-inverse: #ffffff;
  
  --apple-blue: #0071e3;
  --apple-blue-hover: #0077ed;
  --apple-blue-active: #0062c4;
  --apple-blue-light: #e8f2fc;
  
  --border-subtle: #e5e5ea;
  --border-medium: #d2d2d7;
  --border-focus: #0071e3;
  
  --color-success: #34c759;
  --color-success-bg: #eafaf1;
  --color-warning: #ff9500;
  --color-warning-bg: #fff8eb;
  --color-danger: #ff3b30;
  --color-danger-bg: #ffebeb;
  --color-info: #0071e3;
  --color-info-bg: #e8f2fc;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-modal: 0 20px 40px rgba(0, 0, 0, 0.15);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  box-sizing: border-box;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
}

a {
  color: var(--apple-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--apple-blue-hover);
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--text-primary);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   NAVIGATION BAR (Apple Developer Style Glass Header)
   ========================================================================== */
.header-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  height: 52px;
  transition: background-color var(--transition-fast);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-icon-shield {
  width: 22px;
  height: 22px;
  color: var(--apple-blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

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

/* Apple-style Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--apple-blue);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background-color: var(--apple-blue-hover);
  text-decoration: none;
  color: var(--text-inverse);
}

.btn-primary:active {
  background-color: var(--apple-blue-active);
  transform: scale(0.98);
}

.btn-secondary {
  background-color: #e8e8ed;
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: #dedee3;
  text-decoration: none;
}

.btn-outline {
  border: 1px solid var(--border-medium);
  background-color: #ffffff;
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--text-secondary);
  background-color: #f5f5f7;
  text-decoration: none;
}

.btn-sm {
  font-size: 13px;
  padding: 5px 12px;
}

.btn-lg {
  font-size: 16px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
}

/* Wallet Chip in Header */
.wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.wallet-pill .amount {
  color: var(--apple-blue);
}

/* Notification Bell */
.icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background-color: transparent;
  transition: background-color var(--transition-fast);
}

.icon-btn:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.badge-unread {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background-color: var(--color-danger);
  border-radius: var(--radius-full);
}

/* ==========================================================================
   LANDING PAGE STYLES (Apple Minimalist Aesthetic)
   ========================================================================== */
.hero-section {
  min-height: calc(100vh - 52px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background-color: var(--apple-blue-light);
  color: var(--apple-blue);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 21px;
  line-height: 1.45;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 32px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

.service-notice {
  font-size: 13px;
  color: var(--text-tertiary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.4;
}

/* Workflow Step Section */
.section {
  padding: 80px 0;
}

.section-alt {
  background-color: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-kicker {
  font-size: 14px;
  font-weight: 600;
  color: var(--apple-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.section-desc {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: left;
  box-shadow: var(--shadow-subtle);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: var(--apple-blue-light);
  color: var(--apple-blue);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.step-title {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 10px;
}

.step-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Packages Grid */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.package-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-subtle);
  transition: border-color var(--transition-fast), transform var(--transition-normal);
}

.package-card.featured {
  border: 2px solid var(--apple-blue);
}

.featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--apple-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.package-header {
  margin-bottom: 20px;
}

.package-code {
  font-size: 12px;
  font-weight: 700;
  color: var(--apple-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.package-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.package-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  min-height: 42px;
}

.package-price-wrap {
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.price-val {
  font-size: 34px;
  font-weight: 700;
  color: var(--text-primary);
}

.price-period {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
}

.package-specs {
  list-style: none;
  margin-bottom: 24px;
  flex-grow: 1;
}

.package-specs li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.package-specs li strong {
  color: var(--text-primary);
}

.spec-icon-check {
  color: var(--apple-blue);
  flex-shrink: 0;
  margin-top: 2px;
}

/* Live Dynamic Calculator on Landing */
.calculator-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  max-width: 820px;
  margin: 0 auto;
}

.calc-controls {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.calc-result-box {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 20px 0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
  user-select: none;
}

.faq-question:hover {
  color: var(--apple-blue);
}

.faq-answer {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.6;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-icon {
  transition: transform var(--transition-fast);
}

/* Footer */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0 32px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   DASHBOARD & PORTAL COMMON STYLES
   ========================================================================== */
.portal-wrap {
  padding: 32px 0 64px;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.portal-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.portal-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Stats Row */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-subtle);
}

.stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Action Banner */
.action-banner {
  background: linear-gradient(135deg, #0071e3 0%, #0056b3 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  box-shadow: 0 8px 24px rgba(0, 113, 227, 0.25);
}

.action-banner-text h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.action-banner-text p {
  font-size: 14px;
  opacity: 0.9;
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 4px;
  width: 100%;
  max-width: 100%;
}

.tabs-nav::-webkit-scrollbar {
  height: 3px;
}

.tabs-nav::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}

.tab-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--apple-blue);
  border-bottom-color: var(--apple-blue);
  font-weight: 600;
}

/* Cards & Panels */
.panel {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  margin-bottom: 24px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.panel-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Tables */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.data-table th {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  background-color: #fafafc;
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tr:hover td {
  background-color: #f9f9fb;
}

/* Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.status-submitted {
  background-color: var(--color-warning-bg);
  color: var(--color-warning);
}

.status-processing {
  background-color: var(--apple-blue-light);
  color: var(--apple-blue);
}

.status-awaiting-provider {
  background-color: #f3e8ff;
  color: #7e22ce;
}

.status-completed {
  background-color: var(--color-success-bg);
  color: var(--color-success);
}

.status-failed,
.status-refunded {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
}

/* Pulsing processing dot */
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: currentColor;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.3; transform: scale(0.8); }
}

/* Certificate Cards List */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 20px;
}

.cert-card {
  background-color: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cert-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.cert-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.cert-ref {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.cert-device {
  font-size: 12px;
  color: var(--text-secondary);
}

.cert-countdown {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.countdown-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.countdown-clock {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--apple-blue);
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 18px;
}

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

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background-color: #ffffff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
  outline: none;
}

.form-helper {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* Modals & Scroll Lock */
html.modal-open,
body.modal-open {
  overflow: hidden !important;
}

body:has(.modal-overlay.active) {
  overflow: hidden !important;
}


.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.active {
  display: flex !important;
}

.modal-container {
  background-color: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 100%;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  margin: auto !important;
  position: relative;
  z-index: 2001;
  animation: modalCenterScale 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalCenterScale {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  background-color: #fafafc;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: #1d1d1f;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
}

.toast.toast-error {
  background-color: #d70015;
}

.toast.toast-success {
  background-color: #1a8738;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Live Operational Status Ticker */
.status-ticker {
  background-color: #fafafc;
  border-bottom: 1px solid var(--border-subtle);
  padding: 5px 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.status-ticker-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-live-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background-color: var(--color-success);
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(52, 199, 89, 0.25);
  animation: livePing 2s infinite;
}

@keyframes livePing {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Authentic Enterprise Payment Gateway Styles */
.gateway-container {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.gateway-header-strip {
  background: linear-gradient(135deg, #0b1f3f 0%, #173b75 100%);
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gateway-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.gateway-security-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.15);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.gateway-tabs {
  display: flex;
  background-color: #f2f3f7;
  padding: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.gateway-tab-btn {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-align: center;
  transition: all var(--transition-fast);
}

.gateway-tab-btn.active {
  background-color: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.gateway-qr-box {
  background: #ffffff;
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin: 16px 0;
}

.gateway-qr-img {
  width: 140px;
  height: 140px;
  margin: 0 auto 8px;
  display: block;
}

.upi-apps-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.upi-pill {
  font-size: 11px;
  font-weight: 600;
  background-color: #f5f5f7;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.gateway-pay-btn {
  background: #0071e3;
  color: #ffffff;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
  transition: all var(--transition-fast);
}

.gateway-pay-btn:hover {
  background: #0077ed;
  box-shadow: 0 6px 16px rgba(0, 113, 227, 0.4);
}

/* ==========================================================================
   MOBILE HAMBURGER MENU & SLIDE-OUT DRAWER (Apple iOS Design)
   ========================================================================== */
.hamburger-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-secondary);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}
.hamburger-btn:hover {
  background: #e8e8ed;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background: #ffffff;
  z-index: 2600;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-menu-drawer.active {
  transform: translateX(-320px);
}

.mobile-menu-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-drawer-user-card {
  padding: 14px 18px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu-body {
  padding: 12px 14px;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-nav-group-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 10px 4px;
  margin-top: 4px;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background var(--transition-fast);
  cursor: pointer;
  margin-bottom: 2px;
}
.mobile-nav-item:hover,
.mobile-nav-item.active {
  background: rgba(0, 113, 227, 0.08);
  color: var(--apple-blue);
  font-weight: 600;
}
.mobile-nav-item svg {
  flex-shrink: 0;
  color: var(--text-secondary);
}
.mobile-nav-item:hover svg,
.mobile-nav-item.active svg {
  color: var(--apple-blue);
}

.mobile-menu-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border-subtle);
  background: #fafafc;
}

/* ==========================================================================
   COMPREHENSIVE MOBILE & RESPONSIVE DESIGN SYSTEM (Apple Mobile Experience)
   ========================================================================== */

/* Tablet & Smaller Desktops (<= 992px) */
@media (max-width: 992px) {
  .container {
    padding: 0 16px;
  }
  .steps-grid,
  .packages-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .hero-title {
    font-size: 38px;
  }
}

/* Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
  /* Prevent any horizontal sliding */
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    position: relative;
    width: 100% !important;
  }

  /* Prevent iOS automatic input zoom */
  input, select, textarea, .form-control {
    font-size: 16px !important;
  }

  /* Header Navigation */
  .header-nav {
    height: auto !important;
    min-height: 52px;
    padding: 8px 0;
  }

  .nav-inner {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
  }

  .brand-logo {
    font-size: 15px;
    gap: 6px;
  }

  .brand-icon-shield {
    width: 20px;
    height: 20px;
  }

  .nav-actions {
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
  }

  .wallet-pill {
    padding: 4px 8px;
    font-size: 11px;
    gap: 4px;
    white-space: nowrap;
  }

  .hamburger-btn {
    display: inline-flex !important;
  }

  /* Hide direct desktop navigation buttons in mobile header */
  .nav-actions .btn-outline,
  .nav-actions .btn-secondary {
    display: none !important;
  }

  /* Hero Section */
  .hero-section {
    padding: 36px 0 28px;
    min-height: auto;
  }

  .hero-pill-badge {
    font-size: 11px;
    padding: 4px 10px;
    margin-bottom: 14px;
  }

  .hero-title {
    font-size: 26px !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
  }

  .hero-subtitle {
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin-bottom: 20px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
    margin-bottom: 24px;
  }

  .hero-actions .btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
  }

  /* Sections & Grids */
  .section {
    padding: 40px 0;
  }

  .section-header {
    margin-bottom: 28px;
  }

  .section-title {
    font-size: 24px !important;
  }

  .section-desc {
    font-size: 14px !important;
  }

  .steps-grid,
  .packages-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .step-card,
  .package-card {
    padding: 22px 18px;
  }

  .calculator-card {
    padding: 20px 16px;
  }

  .calc-controls {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .calc-result-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  /* Stats Grid (Admin) */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .stat-card {
    padding: 12px 14px;
  }

  .stat-value {
    font-size: 19px;
  }

  .stat-label {
    font-size: 11px;
  }

  /* Cards & Panels */
  .panel {
    padding: 16px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Hide tabs from mobile screen: all portal options now live inside the Hamburger Menu */
  .tabs-nav,
  #adminPortalTabs,
  #userPortalTabs,
  .portal-wrap > .container > div[style*="justify-content: flex-end"] {
    display: none !important;
  }

  /* Certificate Grid */
  .certs-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .cert-card {
    padding: 16px 14px;
  }

  /* Responsive Multi-column Form Layouts */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Flex Header Wrappers in Admin & Portals */
  .panel-header > div:last-child {
    width: 100%;
  }

  /* Search & Scope Filters */
  #tabContent_certs .panel-header > div:last-child {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  #adminCertsScopeToggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  #adminCertsScopeToggle button {
    flex: 1;
    text-align: center;
  }

  #myCertsSearchInput {
    width: 100%;
  }

  #tabContent_certs .panel-header div[style*="min-width: 270px"] {
    min-width: 0 !important;
    width: 100% !important;
  }

  /* Modals on Mobile - Center Always */
  .modal-overlay {
    padding: 16px 12px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .modal-container {
    max-width: min(440px, 94vw) !important;
    width: 100% !important;
    border-radius: var(--radius-xl) !important;
    max-height: 90vh !important;
    margin: auto !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28) !important;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-title {
    font-size: 16px;
  }

  .modal-body {
    padding: 16px 14px;
    max-height: calc(94vh - 120px);
  }

  .modal-footer {
    padding: 12px 14px;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-footer .btn {
    width: 100%;
    height: 42px;
  }

  /* Admin Live Banner */
  #adminLiveBanner {
    padding: 14px !important;
  }

  #adminLiveBanner div {
    max-width: 100%;
  }

  #adminLiveBanner a,
  #adminLiveLinkAnchor {
    word-break: break-all !important;
    white-space: normal !important;
    font-size: 11px !important;
    max-width: 100% !important;
  }

  #adminLiveBanner div[style*="display: flex; gap: 10px;"] {
    width: 100%;
    flex-direction: column;
  }

  #adminLiveBanner button,
  #adminLiveBanner a.btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* Extra Small Mobile Screens (<= 400px) */
@media (max-width: 400px) {
  .container {
    padding: 0 12px;
  }

  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .hero-title {
    font-size: 22px !important;
  }

  .brand-logo span {
    font-size: 13px;
  }

  .wallet-pill {
    font-size: 10px;
    padding: 2px 6px;
  }

  .panel {
    padding: 14px 10px;
  }
}

/* User Portal Package Section & Comparison Matrix */
.pkg-platform-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.pkg-platform-btn.active {
  background-color: var(--apple-blue);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 113, 227, 0.25);
}
.pkg-platform-btn:not(.active) {
  background-color: transparent;
  color: var(--text-secondary);
}
.pkg-platform-btn:not(.active):hover {
  color: var(--text-primary);
  background-color: rgba(0, 0, 0, 0.05);
}

.package-card .pkg-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.pkg-tag-v1 {
  background: #e8f2ff;
  color: var(--apple-blue);
}
.pkg-tag-v2 {
  background: #eff6ff;
  color: #1d4ed8;
}
.pkg-tag-v3 {
  background: #fef3c7;
  color: #b45309;
}

.package-card .price-breakdown-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.table-comparison {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table-comparison th,
.table-comparison td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.table-comparison th {
  background: var(--bg-secondary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}
.table-comparison tr:hover td {
  background-color: rgba(0, 0, 0, 0.012);
}
.table-comparison td.col-featured {
  background-color: rgba(0, 113, 227, 0.03);
  font-weight: 600;
}
.table-comparison th.col-featured {
  background-color: rgba(0, 113, 227, 0.08);
  color: var(--apple-blue);
}

