/* MetaTrader 5 iOS Web Application Stylesheet */
:root {
  --bg: #ffffff;
  --bg-secondary: #f6f6f8;
  --bg-tertiary: #eeeef1;
  --card-bg: #ffffff;
  --line: #e5e5ea;
  --line-strong: #d1d1d6;
  --text: #111111;
  --text-muted: #8a8a93;
  --text-dim: #aeaebe;
  --blue: #2f80e8;
  --blue-hover: #1c6ed6;
  --red: #e04a3c;
  --red-bg: rgba(224, 74, 60, 0.08);
  --green: #1aa88b;
  --green-bg: rgba(26, 168, 139, 0.08);
  --amber: #f59e0b;
  --phone-border: #14161c;
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.22);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body.dark-theme {
  --bg: #0f1218;
  --bg-secondary: #161b24;
  --bg-tertiary: #1f2633;
  --card-bg: #151a23;
  --line: #222938;
  --line-strong: #2c3547;
  --text: #f0f2f5;
  --text-muted: #858e9d;
  --text-dim: #5c667a;
  --phone-border: #08090d;
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  font-family: 'Zain', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  background: #cbd3de;
  min-height: 100%;
  display: grid;
  place-items: center;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  transition: background-color 0.25s ease;
  font-size: 15.5px;
  line-height: 1.4;
}

/* Condensed font for financial numbers & quotes */
.num, .pa, .pb, .symbol-name, .pip-box, .stat-val {
  font-family: 'Roboto Condensed', 'Zain', -apple-system, Arial, sans-serif;
  letter-spacing: -0.2px;
}

/* Smooth micro-interactions & lively button feedback */
button, .nav-btn, .quick-btn, .order-btn-buy, .order-btn-sell, .order-btn-place {
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease, background-color 0.15s ease;
}
button:active, .nav-btn:active {
  transform: scale(0.94);
}


/* Phone Bezel Frame */
.device-container {
  width: 392px;
  height: 820px;
  max-height: 96vh;
  background: var(--bg);
  border-radius: 46px;
  border: 11px solid var(--phone-border);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

/* Dynamic Island */
.dynamic-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  pointer-events: none;
}
.dynamic-island-cam {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111b2d;
  margin-left: auto;
}

/* Mobile Fullscreen Override */
@media (max-width: 540px) {
  body {
    display: block;
    background: var(--bg);
  }
  .device-container {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
    padding-top: var(--safe-top);
  }
  .dynamic-island {
    display: none;
  }
}

/* Top Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 22px 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  z-index: 10;
}
.status-bar-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}
.status-bar-icons svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Live Global Feed Badge with Radar Pulse */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--green);
  background: var(--green-bg);
  padding: 2.5px 8px;
  border-radius: 12px;
  border: 1px solid rgba(26, 168, 139, 0.35);
  box-shadow: 0 1px 4px rgba(26, 168, 139, 0.12);
}
.live-dot-pulse {
  position: relative;
  width: 8px;
  height: 8px;
  display: grid;
  place-items: center;
}
.live-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}
.live-dot-pulse::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  border-radius: 50%;
  border: 1.5px solid var(--green);
  animation: radarRipple 1.6s infinite ease-out;
}
@keyframes radarRipple {
  0% { transform: scale(0.8); opacity: 0.9; }
  100% { transform: scale(2.8); opacity: 0; }
}



/* Header Navigation Bar */
.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 10px;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}
body.dark-theme .nav-header {
  background: rgba(15, 18, 24, 0.92);
}

.nav-header .title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-size: 16.5px;
  font-weight: 600;
  white-space: nowrap;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-header .title small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}
.nav-btn {
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-size: 15.5px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 6px;
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.nav-btn:active {
  opacity: 0.6;
}
.nav-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Main Viewport */
main#view-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg);
  position: relative;
  animation: viewFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes viewFadeIn {
  from { opacity: 0.88; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bottom Tab Bar */
nav.tab-bar {
  display: flex;
  border-top: 1px solid var(--line);
  background: rgba(246, 246, 248, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding-bottom: max(var(--safe-bottom), 4px);
  z-index: 10;
}
body.dark-theme nav.tab-bar {
  background: rgba(22, 27, 36, 0.92);
}

nav.tab-bar button {
  flex: 1;
  border: 0;
  background: none;
  padding: 7px 0 5px;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease;
}
nav.tab-bar button:active {
  transform: scale(0.92);
}
nav.tab-bar button.active {
  color: var(--blue);
}
nav.tab-bar button svg {
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
nav.tab-bar button.active svg {
  transform: scale(1.12);
  filter: drop-shadow(0 2px 6px rgba(47, 128, 232, 0.35));
}
nav.tab-bar button.active span {
  font-weight: 700;
}
nav.tab-bar svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Search Bar */
.search-box {
  padding: 6px 12px 10px;
  background: var(--bg);
}
.search-box input {
  width: 100%;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--bg-tertiary);
  font: inherit;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: box-shadow 0.2s ease;
}
.search-box input:focus {
  box-shadow: 0 0 0 2px rgba(47, 128, 232, 0.3);
}
.search-box input::placeholder {
  color: var(--text-muted);
}

/* Segmented Control */
.segmented-control {
  display: flex;
  margin: 6px 14px 10px;
  background: var(--bg-tertiary);
  padding: 3px;
  border-radius: 10px;
}
.segmented-control button {
  flex: 1;
  border: 0;
  background: none;
  padding: 6px 0;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.segmented-control button.active {
  background: var(--card-bg);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: scale(1.02);
}


/* Quotes Rows */
.quote-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background-color 0.4s ease-out;
  user-select: none;
}
.quote-row:active {
  background: var(--bg-secondary);
}
.quote-row.flash-up {
  background-color: rgba(47, 128, 232, 0.18) !important;
  transition: background-color 0.08s ease-in;
}
.quote-row.flash-dn {
  background-color: rgba(224, 74, 60, 0.18) !important;
  transition: background-color 0.08s ease-in;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.quote-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.symbol-name {
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}
.quote-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quote-spread {
  font-size: 11px;
  color: var(--text-muted);
}
.quote-right {
  display: flex;
  gap: 12px;
  text-align: right;
}
[dir="rtl"] .quote-right {
  text-align: left;
}
.quote-price-col {
  min-width: 86px;
}
.pa {
  font-size: 16px;
  font-weight: 500;
}
.pb {
  font-size: 24.5px;
  font-weight: 700;
  line-height: 1;
}
sup {
  font-size: 11px;
  font-weight: 700;
  vertical-align: super;
  margin-left: 1px;
}
.price-up {
  color: var(--blue);
}
.price-down {
  color: var(--red);
}
.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Section Header */
.section-hdr {
  padding: 8px 14px;
  background: var(--bg-secondary);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

/* Trade Screen Top Stats */
.trade-summary-card {
  padding: 10px 14px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.kv-row {
  display: flex;
  justify-content: space-between;
  padding: 3.5px 0;
  font-size: 14.5px;
  color: var(--text);
}
.kv-row span {
  color: var(--text-muted);
}
.kv-row b {
  font-weight: 600;
}

/* Position Row */
.position-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.position-row:active {
  background: var(--bg-secondary);
}
.pos-title {
  font-size: 16px;
  font-weight: 700;
}
.pos-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.pos-pnl {
  font-size: 19px;
  font-weight: 700;
}

/* Chart Canvas Wrapper & Universal Financial Orientation */
.chart-nav-hdr {
  direction: ltr !important;
}

.chart-wrapper {
  flex: 1;
  position: relative;
  min-height: 240px;
  background: var(--bg);
  overflow: hidden;
  direction: ltr !important;
}

/* Symbol Header Overlay inside Chart (Matching MT5 iOS Reference) */
.chart-symbol-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 5;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  user-select: none;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 5px 12px 6px;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transition: transform 0.12s ease, opacity 0.12s ease;
  direction: ltr !important;
  text-align: left !important;
}
.chart-symbol-badge:active {
  transform: scale(0.96);
  opacity: 0.9;
}
body.dark-theme .chart-symbol-badge {
  background: rgba(21, 26, 35, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.cs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}
.cs-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.3px;
  font-family: 'Roboto Condensed', 'Zain', sans-serif;
}
.cs-arrow {
  font-size: 10px;
  color: var(--blue);
}
.cs-tf {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-left: 2px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.04);
}
body.dark-theme .cs-tf {
  background: rgba(255, 255, 255, 0.08);
}
.cs-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#chart-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* One Click Trading Bar */
.one-click-bar {
  display: none;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--line);
  height: 54px;
  align-items: stretch;
  animation: slideDownBar 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideDownBar {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.one-click-bar.active {
  display: flex;
}
.quick-btn {
  flex: 1;
  border: 0;
  background: none;
  color: #ffffff;
  padding: 4px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  user-select: none;
  transition: filter 0.12s, transform 0.1s;
}
.quick-btn:active {
  filter: brightness(0.88);
  transform: scale(0.98);
}
.quick-sell {
  background: var(--red);
  text-align: left;
}
[dir="rtl"] .quick-sell {
  text-align: right;
}
.quick-buy {
  background: var(--blue);
  text-align: right;
}
[dir="rtl"] .quick-buy {
  text-align: left;
}
.quick-btn small {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  opacity: 0.92;
}
.quick-lot-btn {
  flex: 0 0 120px;
  background: var(--bg);
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-around;
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
  transition: background-color 0.15s ease;
}
.quick-lot-btn:active {
  background: var(--bg-secondary);
}


/* Full Screen Order Page */
#order-page {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding-top: 40px; /* Safe spacing to clear iPhone Dynamic Island */
  background: var(--bg);
  z-index: 50;
  display: none;
  flex-direction: column;
  animation: slideIn 0.22s ease-out;
}
#order-page.active {
  display: flex;
}
@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
[dir="rtl"] @keyframes slideIn {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.order-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  min-height: 46px;
  color: var(--text);
}
.order-form-row select {
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15.5px;
  text-align: right;
  direction: ltr;
}
[dir="rtl"] .order-form-row select {
  text-align: left;
}

/* Stepper input */
.stepper-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
}
.stepper-wrap button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-secondary);
  color: var(--blue);
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.stepper-wrap input {
  width: 100px;
  text-align: center;
  border: 0;
  background: none;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

/* Lot adjust bar */
.lot-adjust-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-secondary);
}
.lot-adjust-bar button {
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}
.lot-adjust-bar input {
  width: 90px;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 6px;
  padding: 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* Dual Sell/Buy Large Buttons */
.order-prices-box {
  display: flex;
  justify-content: space-around;
  padding: 14px 10px 8px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--line);
}
.order-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}
.order-btn-sell {
  background: var(--red);
  color: #ffffff;
  border: 0;
  padding: 14px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.order-btn-buy {
  background: var(--blue);
  color: #ffffff;
  border: 0;
  padding: 14px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
.order-btn-place {
  width: 100%;
  background: var(--blue);
  color: #ffffff;
  border: 0;
  padding: 15px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

/* Modal Bottom Sheets */
.overlay-sheet-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 90;
  display: none;
  align-items: flex-end;
}
.overlay-sheet-wrap.active {
  display: flex;
}
.bottom-sheet {
  background: var(--bg);
  width: 100%;
  border-radius: 24px 24px 0 0;
  max-height: 82%;
  overflow-y: auto;
  padding-bottom: max(var(--safe-bottom), 16px);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.22);
  animation: sheetUp 0.26s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 16.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.sheet-item:active {
  background: var(--bg-secondary);
  transform: scale(0.985);
}

.sheet-item.danger {
  color: var(--red);
}
.sheet-item.primary {
  color: var(--blue);
}

/* Toast Banner */
.toast-banner {
  position: absolute;
  bottom: 68px;
  left: 14px;
  right: 14px;
  background: rgba(20, 24, 33, 0.94);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}
.toast-banner.show {
  transform: translateY(0);
  opacity: 1;
}

/* Login & Auth Page */
.auth-container {
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  overflow-y: auto;
}
.auth-logo {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: var(--blue);
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  box-shadow: 0 4px 12px rgba(47, 128, 232, 0.3);
}
.auth-logo svg {
  width: 34px;
  height: 34px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
}
.auth-container h1 {
  font-size: 24px;
  font-weight: 700;
}
.auth-container p {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.45;
}
.auth-input {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-secondary);
  font: inherit;
  font-size: 15.5px;
  color: var(--text);
  outline: none;
}
.auth-input:focus {
  border-color: var(--blue);
}
.btn-primary {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 13px;
  background: var(--blue);
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-primary:active {
  opacity: 0.85;
}
.btn-secondary {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 13px;
  background: var(--bg-tertiary);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: 15.5px;
  cursor: pointer;
}
.auth-error {
  color: var(--red);
  font-size: 13px;
  min-height: 18px;
}

/* ============================================================
   SO APP PRELOADER & SPLASH SCREEN
   ============================================================ */
.app-preloader {
  position: absolute;
  inset: 0;
  z-index: 10000;
  background: radial-gradient(circle at 50% 40%, #0d1527 0%, #06080e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: inherit;
  user-select: none;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s;
}

.app-preloader.fade-out {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
  visibility: hidden;
}

.preloader-bg-glow {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(37, 99, 235, 0.08) 50%, transparent 70%);
  filter: blur(45px);
  pointer-events: none;
  animation: preloaderGlowPulse 3.5s ease-in-out infinite alternate;
}

.preloader-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 0 24px;
}

/* Luxury Emblem */
.preloader-emblem {
  position: relative;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.emblem-spin-ring {
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-top-color: #38bdf8;
  animation: preloaderSpin 3s linear infinite;
}

.emblem-aura {
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  background: rgba(56, 189, 248, 0.18);
  filter: blur(12px);
}

.emblem-badge {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(145deg, #131d2e 0%, #090e18 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  animation: preloaderFloat 2.8s ease-in-out infinite alternate;
}

.sim-mark {
  font-family: 'Zain', sans-serif;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.5px;
  background: linear-gradient(180deg, #ffffff 30%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(56, 189, 248, 0.4));
}

/* Minimalist Clean Typography */
.sim-main-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #f8fafc;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.sim-tagline {
  font-family: 'Zain', sans-serif;
  font-size: 11.5px;
  font-weight: 400;
  color: #64748b;
  margin-top: 3px;
  letter-spacing: 0.3px;
}

/* Minimalist Progress & Status */
.preloader-loading-box {
  width: 120px;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.preloader-bar-bg {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.preloader-bar-fill {
  height: 100%;
  width: 8%;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
  border-radius: 99px;
  transition: width 0.35s cubic-bezier(0.1, 0.9, 0.2, 1);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}

.preloader-status-msg {
  font-family: 'Zain', sans-serif;
  font-size: 11px;
  color: #64748b;
  text-align: center;
  min-height: 14px;
  line-height: 14px;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

@keyframes preloaderSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes preloaderFloat {
  from { transform: translateY(0px); }
  to { transform: translateY(-3px); }
}

@keyframes preloaderGlowPulse {
  from { transform: scale(0.95); opacity: 0.6; }
  to { transform: scale(1.08); opacity: 0.95; }
}

