/* ==========================================================================
   LOGINPAGE 15 - BENTO FIBER PRO
   Modern SaaS / Fiber ISP Bento Grid Portal
   Offline-Ready + FontAwesome Pro 7.2.0
   ========================================================================== */

:root {
  --bg-base: #09090b;
  --bg-surface: rgba(18, 18, 24, 0.86);
  --bg-surface-hover: rgba(26, 26, 35, 0.95);
  --bg-elevated: rgba(255, 255, 255, 0.04);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --accent-indigo: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-grad: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

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

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Subtle Ambient Mesh + Dot Grid */
.bento-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 15% 10%, rgba(99, 102, 241, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 85% 20%, rgba(6, 182, 212, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 50% 95%, rgba(16, 185, 129, 0.08) 0%, transparent 45%),
    radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 24px 24px;
}

/* Preloader */
#app-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
#app-loader.fade-out {
  opacity: 0;
  visibility: hidden;
}
.bento-spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(99, 102, 241, 0.18);
  border-top-color: var(--accent-indigo);
  border-right-color: var(--accent-cyan);
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Layout Shell */
.portal-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 16px 36px;
}

.portal-shell.centered-shell {
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 16px;
}

/* Top Navbar */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(6, 182, 212, 0.18));
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818cf8;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #34d399;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.status-chip .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

/* Announcement Bar */
.ticker-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  margin-bottom: 16px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.ticker-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: #a5b4fc;
  flex-shrink: 0;
}
.ticker-viewport {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-track {
  display: inline-block;
  font-size: 11.5px;
  color: #e4e4e7;
  padding-left: 100%;
  animation: tickerScroll 22s linear infinite;
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Bento Card Base */
.bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px -15px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Main Bento Hero Grid */
.bento-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .bento-hero-grid {
    grid-template-columns: 1.12fr 0.88fr;
    align-items: stretch;
  }
}

.bento-side-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Card Header */
.auth-header {
  margin-bottom: 16px;
}
.pill-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #22d3ee;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 10px;
}
.auth-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.auth-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Segmented Tab Control */
.segmented-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: rgba(9, 9, 11, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  margin-bottom: 16px;
}
.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 8px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.seg-btn:hover {
  color: var(--text-primary);
}
.seg-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.seg-btn.active i {
  color: #22d3ee;
}

/* Form Controls */
.field-group {
  margin-bottom: 12px;
}
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
  transition: color 0.2s;
}
.input-field {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 40px;
  background: rgba(9, 9, 11, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.input-field::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}
.input-field:focus {
  border-color: var(--accent-indigo);
  background: rgba(9, 9, 11, 0.95);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
}
.input-wrap:focus-within .input-icon {
  color: #818cf8;
}
.input-action-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.input-action-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

/* Error Alert */
.alert-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
  font-size: 12px;
  font-weight: 600;
}

/* QR Scanner Card */
.scanner-box {
  background: rgba(9, 9, 11, 0.65);
  border: 1px dashed rgba(6, 182, 212, 0.4);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 12px;
}
.scanner-frame {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #22d3ee;
  font-size: 28px;
  overflow: hidden;
}
.scanner-laser {
  position: absolute;
  left: 6px;
  right: 6px;
  height: 2px;
  background: #22d3ee;
  box-shadow: 0 0 8px #22d3ee;
  animation: scanSweep 2s ease-in-out infinite;
}
@keyframes scanSweep {
  0%, 100% { top: 10px; opacity: 0.4; }
  50% { top: 56px; opacity: 1; }
}

/* Primary & Secondary Buttons */
.btn-primary {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-grad);
  color: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.55);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -6px rgba(99, 102, 241, 0.7);
  filter: brightness(1.06);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  width: 100%;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
}

.btn-danger {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fda4af;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.18s ease;
}
.btn-danger:hover {
  background: rgba(244, 63, 94, 0.24);
}

.trial-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
  font-size: 11px;
  color: var(--text-muted);
}
.trial-divider::before,
.trial-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* Telemetry & Bento Mini Tiles */
.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stat-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}
.stat-tile-head i {
  font-size: 14px;
}
.stat-tile-val {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  word-break: break-all;
}

.featured-promo-tile {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.18), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(99, 102, 241, 0.32);
  border-radius: var(--radius-xl);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
}

.device-meta-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
}
.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.meta-row span:first-child {
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.meta-row span:last-child {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-weight: 600;
}

/* Section Headers */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.section-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Packages Bento Grid */
.packages-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
@media (min-width: 640px) {
  .packages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 860px) {
  .packages-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pkg-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.pkg-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.pkg-card.popular {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.14) 0%, var(--bg-surface) 100%);
  border-color: rgba(99, 102, 241, 0.45);
}
.pkg-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.pkg-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}
.pkg-card.popular .pkg-badge {
  background: var(--accent-grad);
  color: #fff;
}
.pkg-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.pkg-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
}
.pkg-duration {
  font-size: 11px;
  color: var(--text-secondary);
}
.pkg-speed {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #22d3ee;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 3px 9px;
  border-radius: 8px;
  width: fit-content;
}
.pkg-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
}
.pkg-features li {
  display: flex;
  align-items: center;
  gap: 7px;
}
.pkg-features i {
  color: var(--accent-emerald);
  font-size: 11px;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 13px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.faq-trigger i {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.faq-item.open .faq-trigger i {
  transform: rotate(180deg);
  color: #818cf8;
}
.faq-body {
  display: none;
  padding: 0 16px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.faq-item.open .faq-body {
  display: block;
}

/* Footer */
.portal-footer {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

/* Floating WhatsApp & Modal */
.wa-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(18, 140, 126, 0.45);
  transition: transform 0.2s ease;
}
.wa-fab:hover {
  transform: scale(1.06);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.open {
  display: flex;
}
.modal-box {
  width: 100%;
  max-width: 380px;
  background: #121218;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}
.qris-card {
  background: #ffffff;
  color: #09090b;
  border-radius: var(--radius-lg);
  padding: 14px;
  text-align: center;
  margin: 14px 0;
}
.qris-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin: 8px auto;
  display: block;
  border-radius: 8px;
}

/* Toast */
.bento-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  z-index: 60;
  background: #18181b;
  border: 1px solid var(--border-strong);
  color: #fafafa;
  padding: 10px 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.bento-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
