/* WontelCorp Portal CSS — Subscriber-facing pages only (Blue/Orange/White theme) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');

/* ============================================================
   CSS VARIABLES — Light Blue / Orange / White palette
   ============================================================ */
:root {
  --blue-dark:    #1565C0;
  --blue:         #1565C0;
  --blue-mid:     #1976D2;
  --blue-light:   #42A5F5;
  --orange:       #F57C00;
  --orange-light: #FFB74D;
  --white:        #FFFFFF;
  --off-white:    #F5F8FF;
  --text:         #1A237E;
  --text-body:    #37474F;
  --text2:        #607D8B;
  --border:       #BBDEFB;
  --card:         #FFFFFF;
  --card2:        #EEF4FF;
  --bg:           #F5F8FF;
  --success:      #2E7D32;
  --success-bg:   #E8F5E9;
  --warn:         #E65100;
  --warn-bg:      #FFF3E0;
  --danger:       #C62828;
  --danger-bg:    #FFEBEE;
  --shadow:       0 2px 12px rgba(21,101,192,0.10);
  --shadow-lg:    0 8px 32px rgba(21,101,192,0.16);
  --radius:       14px;
  --radius-sm:    10px;
  --topbar-h:     56px;
  --tabbar-h:     0px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.standalone {
  padding-bottom: 0;
}

a { color: var(--blue-mid); text-decoration: none; }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; }

/* ============================================================
   PAGE WRAP
   ============================================================ */
.page-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

/* ============================================================
   PORTAL TOPBAR
   ============================================================ */
.portal-topbar {
  background: linear-gradient(135deg, #1565C0, #1976D2);
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(21,101,192,.25);
}

.portal-topbar-brand {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.portal-topbar-brand span {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  margin-left: 6px;
}

.portal-topbar-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  text-decoration: none;
}

.portal-topbar-logout:hover { color: #fff; }

/* ============================================================
   CONTENT
   ============================================================ */
.portal-content {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.card-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text2);
  margin-bottom: 12px;
}

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--blue-dark);
  color: #fff;
  box-shadow: 0 3px 12px rgba(21,101,192,.28);
}

.btn-primary:hover {
  background: var(--blue-mid);
  box-shadow: 0 5px 18px rgba(21,101,192,.40);
}

/* CTA / Pay Now / Activate buttons */
.btn-orange,
.btn-cta {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 3px 12px rgba(245,124,0,.30);
}

.btn-orange:hover,
.btn-cta:hover {
  background: #EF6C00;
  box-shadow: 0 5px 18px rgba(245,124,0,.42);
}

.btn-outline {
  background: transparent;
  color: var(--blue-mid);
  border: 1.5px solid var(--blue-mid);
}

.btn-outline:hover {
  background: #EEF4FF;
}

.btn-warn {
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid rgba(230,81,0,.25);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(198,40,40,.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--card2);
  color: var(--text);
}

.btn-full { width: 100%; justify-content: center; }
.btn-sm   { padding: 7px 12px; font-size: 12px; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 14px; }

label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text2);
  margin-bottom: 6px;
}

.input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}

.input:focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(25,118,210,.18);
}

.input::placeholder { color: #B0BEC5; }

.input:disabled {
  opacity: 0.6;
  background: var(--card2);
  cursor: not-allowed;
}

textarea.input { resize: vertical; min-height: 70px; }

/* Global bare inputs */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="file"]):not(.btn):not(.input),
select:not(.input),
textarea:not(.input) {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="file"]):not(.btn):not(.input):focus,
select:not(.input):focus,
textarea:not(.input):focus {
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(25,118,210,.18);
}

input::placeholder, textarea:not(.input)::placeholder { color: #B0BEC5; }

select:not(.input) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231976D2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

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

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

.form-hint {
  font-size: 11px;
  color: var(--text2);
  margin-top: 4px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.badge.blue   { background: rgba(25,118,210,.12);  color: var(--blue-mid);     border: 1px solid rgba(25,118,210,.25); }
.badge.green  { background: rgba(46,125,50,.12);   color: #2E7D32;             border: 1px solid rgba(46,125,50,.25); }
.badge.amber  { background: rgba(245,124,0,.12);   color: var(--orange);       border: 1px solid rgba(245,124,0,.25); }
.badge.red    { background: rgba(198,40,40,.10);   color: var(--danger);       border: 1px solid rgba(198,40,40,.2); }
.badge.gray   { background: rgba(96,125,139,.10);  color: var(--text2);        border: 1px solid rgba(96,125,139,.2); }

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
  background: var(--border);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1565C0, #42A5F5);
  transition: width .4s ease;
}

/* ============================================================
   VALIDITY DISPLAY
   ============================================================ */
.validity-big {
  font-size: 56px;
  font-weight: 800;
  color: var(--blue-dark);
  line-height: 1;
  display: block;
  text-align: center;
  margin: 10px 0 4px;
}

.validity-label {
  text-align: center;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 14px;
}

/* ============================================================
   BALANCE CHIP
   ============================================================ */
.balance-chip {
  background: var(--blue-dark);
  color: #fff;
  border-radius: 12px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

.alert span { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

.alert.success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(46,125,50,.2); }
.alert.danger  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid rgba(198,40,40,.2); }
.alert.warn    { background: var(--warn-bg);    color: var(--warn);    border: 1px solid rgba(230,81,0,.2); }
.alert.info    { background: #EEF4FF;           color: var(--blue-mid); border: 1px solid var(--border); }

/* ============================================================
   TABLES
   ============================================================ */
.tbl-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
}

.tbl {
  width: 100%;
  min-width: 400px;
  border-collapse: collapse;
}

.tbl th {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text2);
  padding: 10px 12px;
  background: var(--card2);
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.tbl td {
  padding: 12px;
  font-size: 13px;
  border-top: 1px solid var(--border);
  vertical-align: top;
  white-space: nowrap;
  color: var(--text-body);
}

.tbl tr:hover td { background: rgba(21,101,192,.04); }

.tbl .empty td {
  text-align: center;
  padding: 32px;
  color: var(--text2);
  white-space: normal;
}

.right  { text-align: right; }
.center { text-align: center; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal-bg.show { display: flex; }

.modal-sheet {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 24px 20px 32px;
  box-shadow: 0 -8px 40px rgba(21,101,192,.18);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 0 auto 20px;
  display: block;
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 18px;
}

/* ============================================================
   TOASTS
   ============================================================ */
.toast-wrap {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 400px;
  pointer-events: none;
}

.toast {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease;
  pointer-events: auto;
}

.toast.success { background: var(--blue-dark); color: #fff; }
.toast.error   { background: var(--danger);    color: #fff; }
.toast.info    { background: var(--blue-mid);  color: #fff; }

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

/* ============================================================
   COUNTDOWN / OTP
   ============================================================ */
.countdown {
  font-size: 12px;
  color: var(--text2);
  font-weight: 600;
}

.countdown.urgent { color: var(--danger); }

/* ============================================================
   LOGIN PAGE SPECIFICS
   ============================================================ */
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.login-hero {
  width: 100%;
  background: linear-gradient(160deg, #1565C0 0%, #0D47A1 100%);
  padding: 40px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.login-hero-icon {
  width: 68px;
  height: 68px;
  background: rgba(255,255,255,.18);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

.login-hero h1 { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.login-hero p  { font-size: 13px; color: rgba(255,255,255,.8); }

.login-tagline {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  margin-top: 8px;
  letter-spacing: 0.5px;
}

.login-card-area {
  width: 100%;
  max-width: 400px;
  padding: 0 16px 40px;
  margin-top: -24px;
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px 24px;
  box-shadow: var(--shadow-lg);
}

.step-indicator {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--text2);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-indicator::before {
  content: '';
  display: block;
  width: 20px;
  height: 3px;
  background: var(--orange);
  border-radius: 2px;
}

.otp-input {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 14px;
  text-align: center;
  font-family: monospace;
  padding: 16px 14px;
  color: var(--blue-dark) !important;
}

.masked-mobile {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 4px;
}

.otp-note {
  font-size: 12px;
  color: var(--text2);
  text-align: center;
  margin-bottom: 16px;
}

.countdown-wrap { text-align: center; margin: 10px 0 4px; }

.resend-link { text-align: center; margin-top: 8px; }
.resend-link a { font-size: 13px; font-weight: 600; color: var(--orange); cursor: pointer; }

.login-footer { display: flex; justify-content: center; gap: 20px; margin-top: 20px; }
.login-footer a { font-size: 12px; font-weight: 600; color: var(--blue-mid); }

.turnstile-wrap { display: flex; justify-content: center; margin: 8px 0 12px; }

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.muted { color: var(--text2); font-size: 13px; }

/* Desktop sidebar — hidden on portal pages (subscriber pages are mobile-only) */
.desktop-sidebar { display: none; }
