:root {
 --fb-bg: #f0f2f5;
 --fb-card: #ffffff;
 --fb-surface: #f7f8fa;
 --fb-text: #1c1e21;
 --fb-muted: #65676b;
 --fb-border: #dadde1;
 --fb-primary: #1877f2;
 --fb-primary-hover: #166fe5;
 --fb-success: #42b72a;
 --fb-danger: #e41e3f;
 --fb-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 4px 14px rgba(0,0,0,0.05);
}

body.dark {
  --fb-bg: #091326;
  --fb-card: rgba(15, 29, 56, 0.72);
  --fb-surface: rgba(18, 36, 70, 0.78);
  --fb-text: #eef4ff;
  --fb-muted: rgba(196, 214, 245, 0.75);
  --fb-border: rgba(148, 184, 255, 0.22);
  --fb-primary: #3b82f6;
  --fb-primary-hover: #2563eb;
  --fb-success: #10b981;
  --fb-danger: #f43f5e;
  --fb-shadow: 0 12px 30px rgba(2, 8, 23, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
 background: var(--fb-bg);
 color: var(--fb-text);
 padding-bottom: 88px;
 transition: background 0.2s ease, color 0.2s ease;
}

.hidden { display: none !important; }
.muted { color: var(--fb-muted); }
.small { font-size: 13px; }
.error-text { color: var(--fb-danger); font-size: 13px; margin: 6px 0; min-height: 18px; }

.outline-icon {
 width: 18px;
 height: 18px;
 display: inline-block;
 vertical-align: middle;
 stroke: currentColor;
 fill: none;
 stroke-width: 1.8;
 stroke-linecap: round;
 stroke-linejoin: round;
 flex-shrink: 0;
}

.topbar {
 position: sticky; top: 0; z-index: 40;
 background: var(--fb-card); border-bottom: 1px solid var(--fb-border);
 padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
 box-shadow: var(--fb-shadow);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--fb-text); }
.brand .logo {
 width: 38px; height: 38px; border-radius: 50%; background: transparent;
 border: 1.5px solid var(--fb-border); overflow: hidden;
 display: grid; place-items: center; flex-shrink: 0; color: var(--fb-text);
}
.brand .logo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }

.lang-select, .filter-select {
 padding: 7px 10px; border-radius: 8px; border: 1px solid var(--fb-border);
 background: var(--fb-surface); color: var(--fb-text); font-weight: 600; font-size: 13px;
}
.lang-select {
 flex: 0 1 112px; width: 112px; min-width: 0; max-width: min(112px, 42vw);
 box-sizing: border-box; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.icon-btn {
 border: 1px solid var(--fb-border); background: var(--fb-surface); color: var(--fb-text);
 border-radius: 8px; padding: 7px 10px; cursor: pointer; font-weight: 700; font-size: 13px;
 display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--fb-border); }

.btn {
 min-width: 0; max-width: 100%; border: none; border-radius: 8px; padding: 9px 14px; font-weight: 700; font-size: 14px;
 cursor: pointer; transition: 0.15s ease; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
 white-space: normal; text-align: center; line-height: 1.25; overflow-wrap: anywhere;
}
[data-i18n] { min-width: 0; overflow-wrap: anywhere; }
.btn-primary { background: var(--fb-primary); color: #fff; }
.btn-primary:hover { background: var(--fb-primary-hover); }
.btn-success { background: var(--fb-success); color: #fff; }
.btn-success:hover { filter: brightness(1.06); }
.btn-danger { background: var(--fb-danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.06); }
.btn-secondary { background: var(--fb-surface); color: var(--fb-text); border: 1px solid var(--fb-border); }
.btn-secondary:hover { background: var(--fb-border); }
.btn-sm { padding: 6px 10px; font-size: 12.5px; }
.btn-xs { padding: 4px 8px; font-size: 11.5px; border-radius: 6px; }

.activity-ticker-wrap {
 display: flex; align-items: center; gap: 10px;
 background: var(--fb-card); border-bottom: 1px solid var(--fb-border);
 padding: 7px 16px; font-size: 12.5px; overflow: hidden;
}
.activity-ticker-label {
 background: transparent; color: var(--fb-text);
 border: 1px solid var(--fb-border); font-weight: 800;
 font-size: 11px; padding: 2px 8px; border-radius: 999px; flex-shrink: 0;
}
.activity-ticker-viewport { flex: 1; overflow: hidden; white-space: nowrap; }
.activity-ticker-track { display: inline-block; padding-left: 100%; animation: tickerScroll 26s linear infinite; }
.activity-ticker-track:hover { animation-play-state: paused; }
@keyframes tickerScroll {
 0% { transform: translateX(0); }
 100% { transform: translateX(-100%); }
}

.container { max-width: 1180px; margin: 16px auto; padding: 0 14px; }
.page { display: none; animation: fadeIn 0.18s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hero {
 background: linear-gradient(125deg, #0b192c 0%, #163a63 55%, #1877f2 100%);
 background-size: cover; background-position: center;
 color: #fff; border-radius: 14px; padding: 26px 22px; margin-bottom: 16px;
 box-shadow: var(--fb-shadow); position: relative; overflow: hidden; min-height: 158px;
 display: flex; align-items: flex-end; transition: background-image 0.45s ease;
}
.hero::before {
 content: ""; position: absolute; inset: 0;
 background: linear-gradient(180deg, rgba(10,18,30,0.35) 0%, rgba(10,18,30,0.78) 100%); z-index: 0;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero h1 { font-size: 25px; margin-bottom: 6px; font-weight: 800; }
.hero p { opacity: 0.94; font-size: 14.5px; }
.hero-hotel-tag {
 display: inline-block; margin-top: 10px; padding: 4px 10px; border-radius: 999px;
 background: rgba(255,255,255,0.16); backdrop-filter: blur(4px);
 font-size: 12px; font-weight: 700; color: #fff; border: 1px solid rgba(255,255,255,0.28);
}

.fx-hero-card {
 background: var(--fb-card); border: 1px solid var(--fb-border); border-radius: 14px;
 padding: 14px 18px; margin-bottom: 16px; box-shadow: var(--fb-shadow);
 display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.fx-hero-label { font-size: 12px; font-weight: 700; color: var(--fb-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.fx-hero-rate { font-size: 22px; font-weight: 900; color: var(--fb-text); margin-top: 2px; }
.fx-hero-sub { font-size: 12px; color: var(--fb-muted); margin-top: 2px; }
.fx-hero-pill {
 background: transparent; color: var(--fb-text);
 border: 1px solid var(--fb-border); font-size: 12px; font-weight: 800;
 padding: 6px 12px; border-radius: 999px;
}

.fx-chart-card {
 background: var(--fb-card); border: 1px solid var(--fb-border); border-radius: 14px;
 padding: 16px; margin-bottom: 18px; box-shadow: var(--fb-shadow);
}
.fx-chart-header {
 display: flex; align-items: center; justify-content: space-between;
 gap: 10px; flex-wrap: wrap; margin-bottom: 10px;
}
.fx-chart-title { font-size: 16px; font-weight: 800; }
.fx-chart-sub { font-size: 12.5px; color: var(--fb-muted); }
.fx-chart-live-readout { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fx-current-rate { font-size: 15px; font-weight: 800; }
.fx-current-rate.is-up { color: #2fb344; }
.fx-current-rate.is-down { color: #f85149; }

.fx-timeframe-bar {
 display: flex; align-items: center; justify-content: space-between;
 gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
 padding-bottom: 8px; border-bottom: 1px solid var(--fb-border);
}
.fx-tf-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fx-tf-btn {
 border: 1px solid transparent; background: transparent; color: var(--fb-muted);
 font-weight: 700; font-size: 12.5px; padding: 5px 10px; border-radius: 7px; cursor: pointer;
 transition: 0.14s ease;
}
.fx-tf-btn:hover { color: var(--fb-text); background: var(--fb-surface); }
.fx-tf-btn.active {
 color: var(--fb-primary); background: rgba(24, 119, 242, 0.12);
 border-color: rgba(24, 119, 242, 0.35);
}
.fx-scrub-readout { font-size: 12px; font-weight: 700; color: var(--fb-text); }

.fx-canvas-box {
 position: relative; width: 100%; height: 245px; border-radius: 10px;
 overflow: hidden; background: var(--fb-surface); border: 1px solid var(--fb-border);
 touch-action: none;
}
#fxLiveCanvas { width: 100%; height: 100%; display: block; cursor: crosshair; }

.fx-chart-footer {
 display: flex; align-items: center; justify-content: space-between;
 gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--fb-muted);
}

.promo-deals-wrap {
 background: var(--fb-card); border: 1px solid var(--fb-border);
 border-radius: 14px; padding: 15px; margin-bottom: 18px; box-shadow: var(--fb-shadow);
}
.promo-deals-head {
 display: flex; align-items: center; justify-content: space-between;
 gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.promo-deals-title { font-size: 16.5px; font-weight: 800; color: var(--fb-text); }
.promo-deals-sub { font-size: 12.5px; color: var(--fb-muted); margin-top: 2px; }
.promo-deals-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.promo-cycle-pill {
 font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
 background: transparent; color: var(--fb-text);
 border: 1px solid var(--fb-border);
}
.promo-viewport {
 position: relative; width: 100%; overflow: hidden; border-radius: 12px;
 touch-action: pan-y; user-select: none; cursor: grab;
}
.promo-viewport.is-dragging { cursor: grabbing; }
.promo-track {
 display: flex; gap: 12px; will-change: transform;
 transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.promo-track.no-anim { transition: none !important; }
.promo-slide-card {
 flex: 0 0 calc((100% - 24px) / 3); min-width: 240px;
 background: var(--fb-surface); border: 1px solid var(--fb-border);
 border-radius: 12px; overflow: hidden; display: flex; flex-direction: column;
 position: relative; transition: border-color 0.15s ease, transform 0.15s ease;
}
.promo-slide-card:hover { border-color: var(--fb-primary); transform: translateY(-2px); }
.promo-img-box {
 position: relative; width: 100%; height: 146px; background: var(--fb-card); overflow: hidden;
}
.promo-img-box img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.promo-disc-tag {
 position: absolute; top: 8px; left: 8px; background: #cf222e; color: #ffffff;
 font-size: 12px; font-weight: 900; padding: 3px 8px; border-radius: 7px;
 box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
.promo-days-tag {
 position: absolute; top: 8px; right: 8px; background: rgba(15, 20, 26, 0.84);
 color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.45);
 font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 7px;
 backdrop-filter: blur(4px);
}
.promo-card-body {
 padding: 11px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; justify-content: space-between;
}
.promo-hotel-name { font-weight: 800; font-size: 14.5px; color: var(--fb-text); line-height: 1.3; }
.promo-loc-line { font-size: 12px; color: var(--fb-muted); }
.promo-date-window { font-size: 11.5px; font-weight: 700; color: var(--fb-primary); }
.promo-price-row {
 display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
 margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--fb-border);
}
.promo-old-price { font-size: 12.5px; color: var(--fb-muted); text-decoration: line-through; font-weight: 700; }
.promo-new-price { font-size: 16.5px; font-weight: 900; color: var(--fb-success); }
.promo-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.promo-dot {
 width: 8px; height: 8px; border-radius: 50%; border: none;
 background: var(--fb-border); cursor: pointer; padding: 0;
 transition: width 0.2s ease, background 0.2s ease;
}
.promo-dot.active { width: 20px; border-radius: 999px; background: var(--fb-primary); }

@media (max-width: 820px) {
 .promo-slide-card { flex: 0 0 calc((100% - 12px) / 2); min-width: 210px; }
}
@media (max-width: 520px) {
 .promo-slide-card { flex: 0 0 84%; min-width: 220px; }
 .promo-img-box { height: 132px; }
}

.section-head {
 display: flex; align-items: center; justify-content: space-between;
 gap: 10px; flex-wrap: wrap; margin-bottom: 14px;
}
.count-badge {
 background: transparent; color: var(--fb-text); border: 1px solid var(--fb-border);
 font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
}
.search-input {
 padding: 8px 12px; border-radius: 8px; border: 1px solid var(--fb-border);
 background: var(--fb-card); color: var(--fb-text); font-size: 14px; min-width: 220px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
.hotel-card {
 background: var(--fb-card); border: 1px solid var(--fb-border); border-radius: 12px;
 overflow: hidden; box-shadow: var(--fb-shadow); display: flex; flex-direction: column;
 transition: transform 0.15s ease;
}
.hotel-card:hover { transform: translateY(-2px); }
.hotel-card img { width: 100%; height: 162px; object-fit: cover; background: var(--fb-surface); }
.hotel-body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hotel-title { font-weight: 700; font-size: 15.5px; }
.stars { color: var(--fb-muted); font-size: 13.5px; letter-spacing: 1px; }
.price-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; }
.price { font-weight: 800; color: var(--fb-text); font-size: 16px; }
.load-more-wrap { display: flex; justify-content: center; margin-top: 18px; }

#adminConsole .panel {
  background: rgba(15, 29, 56, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 184, 255, 0.22);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(2, 8, 23, 0.45);
  margin-bottom: 14px;
}
.panel { min-width: 0; background: var(--fb-card); border: 1px solid var(--fb-border); border-radius: 12px; padding: 16px; box-shadow: var(--fb-shadow); margin-bottom: 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 12px; margin-bottom: 14px; }
#adminConsole .stat {
  background: rgba(15, 29, 56, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 184, 255, 0.22);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(2, 8, 23, 0.45);
}
.stat { min-width: 0; background: var(--fb-card); border: 1px solid var(--fb-border); border-radius: 12px; padding: 14px; box-shadow: var(--fb-shadow); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat h2 { font-size: 21px; margin-top: 4px; color: var(--fb-text); }

.order-circle {
 width: 132px; height: 132px; border-radius: 50%; margin: 18px auto;
 display: grid; place-items: center; font-weight: 800; font-size: 22px;
 background: conic-gradient(var(--fb-text) 0deg, var(--fb-border) 0deg);
 position: relative;
}
.order-circle::before {
 content: ""; position: absolute; width: 104px; height: 104px; border-radius: 50%;
 background: var(--fb-card);
}
.order-circle span { position: relative; z-index: 1; }

.pending-profit-banner {
 margin: 10px auto 6px; max-width: 560px; padding: 10px 14px; border-radius: 10px;
 background: var(--fb-surface); border: 1px solid var(--fb-border);
 color: var(--fb-text); font-size: 13px; font-weight: 600; text-align: left;
}
.last-order-box {
 margin: 14px auto 0; max-width: 520px; padding: 12px 14px; border-radius: 10px;
 background: var(--fb-surface); border: 1px solid var(--fb-border); text-align: left; font-size: 13.5px;
}
.booking-progress-block { width: min(100%, 440px); margin: 0 auto 12px; }
.booking-progress-heading { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 700; color: var(--fb-muted); }
.booking-progress-track, .admin-booking-progress {
 height: 8px; overflow: hidden; border-radius: 999px; background: var(--fb-border);
}
.booking-progress-track { margin-top: 6px; }
.booking-progress-fill, .admin-booking-progress span {
 display: block; height: 100%; width: 0; border-radius: inherit;
 background: linear-gradient(90deg, #0ea5e9, #22c55e); transition: width 240ms ease;
}
.pending-lucky-order-panel {
 display: flex; align-items: center; justify-content: space-between; gap: 10px;
 max-width: 560px; margin: 10px auto; padding: 10px 12px; border: 1px solid #ef4444;
 border-radius: 10px; background: rgba(239, 68, 68, 0.1); color: var(--fb-text); text-align: left;
}
.pending-lucky-order-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.held-order-balance { border-color: #dc2626 !important; background: rgba(220, 38, 38, 0.12) !important; color: #b91c1c !important; }
.held-order-balance h2, .held-order-balance .profile-info-val { color: #b91c1c !important; }
.admin-booking-progress { width: 84px; height: 5px; margin-top: 4px; }
.catch-rule-actions { white-space: nowrap; }
.catch-rule-actions .btn { margin: 2px; }

.profile-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile-avatar-wrap { display: flex; flex-direction: column; align-items: center; }
.avatar {
 width: 76px; height: 76px; border-radius: 50%; background: var(--fb-surface); color: var(--fb-text);
 border: 1.5px solid var(--fb-border);
 display: grid; place-items: center; font-size: 28px; font-weight: 800;
}
.avatar-img {
 width: 76px; height: 76px; border-radius: 50%; object-fit: cover;
 border: 2px solid var(--fb-border); background: var(--fb-surface);
}
.profile-info-grid {
 display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
 gap: 10px; margin-top: 8px;
}
.profile-info-box {
 background: var(--fb-surface); border: 1px solid var(--fb-border);
 border-radius: 10px; padding: 9px 11px;
}
.profile-info-val { font-weight: 800; font-size: 14px; margin-top: 2px; word-break: break-word; }
.profile-copy-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.share-link-box {
 display: flex; align-items: center; justify-content: space-between; gap: 10px;
 flex-wrap: wrap; background: var(--fb-surface); border: 1px solid var(--fb-border);
 border-radius: 10px; padding: 10px 12px;
}
.share-link-text {
 font-size: 12.5px; font-weight: 700; color: var(--fb-text);
 word-break: break-all; margin-top: 2px;
}
.profile-actions {
 display: grid;
 grid-template-columns: repeat(4, minmax(0, 1fr));
 gap: 10px;
 margin: 16px 0 6px;
}
.profile-actions .btn { min-width: 0; min-height: 44px; white-space: normal; }

.suspended-banner {
 background: #cf222e; color: #fff; padding: 10px 16px;
 font-size: 13.5px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.2);
}
.suspended-banner-inner {
 max-width: 1180px; margin: 0 auto; display: flex;
 align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.live-order-banner {
 background: var(--fb-surface); border: 1px solid var(--fb-border);
 color: var(--fb-text); padding: 10px 14px; border-radius: 10px;
 font-size: 13px; font-weight: 700; margin-bottom: 12px;
}
.admin-header-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--fb-border); text-align: left; vertical-align: middle; }
th { background: var(--fb-surface); font-weight: 700; white-space: nowrap; }
.mini-input {
 width: 78px; padding: 5px 7px; border-radius: 6px; border: 1px solid var(--fb-border);
 background: var(--fb-surface); color: var(--fb-text); font-size: 12.5px;
}
.status-pill { padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; display: inline-block; }
.pill-online { background: rgba(47, 179, 68, 0.16); color: #2fb344; }
.pill-offline { background: rgba(154, 167, 184, 0.18); color: var(--fb-muted); }
.pill-warn { background: rgba(248, 81, 73, 0.16); color: #f85149; }
.pill-partial { background: rgba(245, 158, 11, 0.18); color: #f59e0b; }
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
 background: var(--fb-surface); border: 1px solid var(--fb-border); border-radius: 10px;
 padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13.5px;
}
.history-filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.history-filter-tab {
 border: 1px solid var(--fb-border); border-radius: 999px; padding: 8px 14px;
 background: var(--fb-surface); color: var(--fb-muted); font: inherit; font-size: 13px;
 font-weight: 700; cursor: pointer; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.history-filter-tab.active { border-color: var(--fb-primary); background: var(--fb-primary); color: #fff; }
.history-record {
 display: grid; gap: 8px; padding: 12px; border: 1px solid var(--fb-border);
 border-radius: 10px; background: var(--fb-surface); min-width: 0;
}
.history-record-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.history-record-type, .history-record-status {
 display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 9px;
 font-size: 12px; font-weight: 700;
}
.history-record-type { background: rgba(24, 119, 242, 0.12); color: var(--fb-primary); }
.history-record-status--approved { background: rgba(66, 183, 42, 0.14); color: var(--fb-success); }
.history-record-status--pending, .history-record-status--partial { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.history-record-status--rejected { background: rgba(228, 30, 63, 0.12); color: var(--fb-danger); }
.history-record-details { display: grid; gap: 4px; overflow-wrap: anywhere; font-size: 13.5px; }
.history-record-amount { font-weight: 700; }
.history-record-date { color: var(--fb-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) {
 .history-filter-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .history-filter-tab { padding-inline: 8px; }
}

.support-chat-card {
 background: var(--fb-card); border: 1px solid var(--fb-border); border-radius: 14px;
 box-shadow: var(--fb-shadow); overflow: hidden; display: flex; flex-direction: column;
 height: clamp(22rem, 72vh, 48rem); height: clamp(22rem, 72dvh, 48rem);
 min-height: min(460px, calc(100vh - 170px)); min-height: min(460px, calc(100dvh - 170px));
}
.support-chat-header {
 padding: 12px 16px; border-bottom: 1px solid var(--fb-border);
 display: flex; align-items: center; gap: 12px; background: var(--fb-card);
}
.support-agent-avatar {
 position: relative; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%;
 background: radial-gradient(circle at 35% 25%, #2aa7ff, #1555ca 65%, #103c91);
 border: 1px solid rgba(101, 190, 255, 0.8); color: #fff;
 display: grid; place-items: center; font-weight: 800;
 box-shadow: 0 0 18px rgba(37, 145, 255, 0.48), inset 0 0 12px rgba(160, 222, 255, 0.18);
}
.support-agent-avatar .outline-icon { width: 23px; height: 23px; }
.support-agent-online-dot,
.support-online-count-dot {
 width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%;
 background: #2fbf71; box-shadow: 0 0 9px rgba(47, 191, 113, 0.7);
}
.support-agent-online-dot {
 position: absolute; right: 0; bottom: 0; border: 2px solid var(--fb-card);
}
.support-agent-details { min-width: 0; flex: 1; }
.support-agent-title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.support-agent-title { color: var(--fb-text); font-size: 16px; font-weight: 800; line-height: 1.2; }
.support-live-badge {
 display: inline-flex; align-items: center; justify-content: center;
 padding: 3px 8px; border-radius: 999px;
 color: #a7f3c3; background: rgba(37, 180, 95, 0.16);
 border: 1px solid rgba(47, 191, 113, 0.42);
 font-size: 10px; font-weight: 800; letter-spacing: 0.06em; white-space: nowrap;
}
.support-online-count {
 display: inline-flex; align-items: center; gap: 7px; margin-left: auto;
 color: var(--fb-muted); font-size: 12px; font-weight: 700; white-space: nowrap;
}
.support-online-count-dot { width: 8px; height: 8px; flex-basis: 8px; }
.support-chat-start {
 flex: 1; min-height: 0; display: grid; place-content: center; justify-items: center;
 gap: 16px; padding: 24px; text-align: center;
}
.support-chat-prompt {
 max-width: 36ch; margin: 0; color: var(--fb-muted);
 font-size: clamp(14px, 2.4vw, 17px); line-height: 1.5; text-wrap: pretty;
}
.chat-now-button {
 min-width: 150px; min-height: 48px; padding: 12px 28px;
 border: 1px solid rgba(97, 195, 255, 0.85); border-radius: 999px;
 color: #fff; background: linear-gradient(110deg, #176de2, #24b7f4);
 box-shadow: 0 0 18px rgba(38, 149, 255, 0.42), inset 0 1px 0 rgba(255,255,255,0.22);
 font: inherit; font-weight: 800; letter-spacing: 0.02em; cursor: pointer;
 animation: chatNowPulse 2.8s ease-in-out infinite;
}
.chat-now-button:hover { filter: brightness(1.08); }
.chat-now-button:focus-visible { outline: 3px solid rgba(81, 183, 255, 0.55); outline-offset: 3px; }
@keyframes chatNowPulse {
 0%, 100% { transform: translateY(0) scale(1) rotate(0); box-shadow: 0 0 18px rgba(38, 149, 255, 0.42), inset 0 1px 0 rgba(255,255,255,0.22); }
 45% { transform: translateY(-2px) scale(1.025) rotate(-0.7deg); box-shadow: 0 0 25px rgba(38, 170, 255, 0.58), inset 0 1px 0 rgba(255,255,255,0.24); }
 55% { transform: translateY(-2px) scale(1.025) rotate(0.7deg); }
}
.support-messages, .cs-messages {
 flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px;
 background: var(--fb-surface);
}
.support-composer {
 display: flex; align-items: flex-end; gap: clamp(6px, 1vw, 10px); padding: clamp(8px, 1.5vw, 14px);
 border-top: 1px solid var(--fb-border); background: var(--fb-card);
}
.support-composer textarea {
 flex: 1; min-width: 0; min-height: clamp(42px, 5vh, 50px); max-height: min(24vh, 140px); padding: 9px 12px;
 border: 1px solid var(--fb-border); border-radius: 12px;
 background: var(--fb-surface); color: var(--fb-text); font: inherit; font-size: clamp(13px, 1.2vw, 15px); line-height: 1.4;
 resize: none; overflow-y: auto;
}
.support-attach-button {
 display: inline-flex; align-items: center; justify-content: center;
 width: clamp(44px, 3.8vw, 48px); min-width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--fb-border);
 border-radius: 10px; background: var(--fb-surface); color: var(--fb-text);
 font: inherit; cursor: pointer; flex: 0 0 auto;
}
.support-attach-button .outline-icon { width: 19px; height: 19px; flex: 0 0 19px; }
.support-attach-button:hover { border-color: var(--fb-primary); }
.support-attach-button:focus-visible,
.support-send-button:focus-visible { outline: 3px solid rgba(81, 183, 255, 0.55); outline-offset: 2px; }
.support-file-input { display: none; }
.support-send-button { min-height: 44px; padding-inline: clamp(12px, 2vw, 20px); }
.cs-messages { height: clamp(18rem, 50vh, 32rem); height: clamp(18rem, 50dvh, 32rem); flex: none; }
.chat-msg {
 max-width: 78%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; word-break: break-word;
}
.chat-msg > div:not(.chat-meta) { white-space: pre-line; }
.chat-msg.user { align-self: flex-end; background: var(--fb-primary); color: #fff; border-bottom-right-radius: 3px; }
.chat-msg.admin { align-self: flex-start; background: var(--fb-card); color: var(--fb-text); border: 1px solid var(--fb-border); border-bottom-left-radius: 3px; }
.chat-meta { font-size: 11px; opacity: 0.75; margin-top: 4px; }
.chat-photo-img {
 max-width: 220px; max-height: 220px; border-radius: 8px; display: block; margin-top: 4px; object-fit: cover;
 cursor: zoom-in; touch-action: manipulation;
}
.chat-image-lightbox {
 position: fixed; inset: 0; z-index: 10001; display: grid; place-items: center;
 padding: 48px 16px 16px; background: rgba(5, 10, 18, 0.94);
}
body.chat-image-viewer-open { overflow: hidden; }
.chat-image-lightbox.hidden { display: none; }
.chat-image-lightbox img {
 max-width: min(96vw, 1200px); max-height: calc(100vh - 76px); max-height: calc(100dvh - 76px); object-fit: contain;
}
.chat-image-lightbox-close {
 position: absolute; top: 12px; right: 16px; width: 42px; height: 42px; border: 0;
 border-radius: 50%; background: rgba(255,255,255,0.12); color: #fff; font-size: 30px; cursor: pointer;
}
.chat-image-context-menu {
 position: fixed; z-index: 10002; display: grid; min-width: 150px; overflow: hidden;
 border: 1px solid var(--fb-border); border-radius: 10px; background: var(--fb-card); box-shadow: var(--fb-shadow);
}
.chat-image-context-menu.hidden { display: none; }
.chat-image-context-menu button {
 border: 0; padding: 10px 14px; background: transparent; color: var(--fb-text); text-align: left; cursor: pointer;
}
.chat-image-context-menu button:hover, .chat-image-context-menu button:focus-visible { background: var(--fb-surface); }
.chat-msg-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 5px; }
.chat-msg-actions button {
 padding: 2px 6px; border: 1px solid currentColor; border-radius: 6px;
 background: transparent; color: inherit; font-size: 11px; cursor: pointer;
}
.admin-cs-composer {
 display: flex; gap: clamp(6px, 1vw, 10px); padding: clamp(8px, 1.5vw, 14px); border-top: 1px solid var(--fb-border);
 background: var(--fb-card); align-items: flex-end;
}
.admin-cs-composer textarea {
 flex: 1; min-width: 0; min-height: clamp(42px, 5vh, 50px); padding: 9px 12px; border-radius: 12px; border: 1px solid var(--fb-border);
 background: var(--fb-surface); color: var(--fb-text); font-size: clamp(13px, 1.2vw, 15px);
 font-family: inherit; line-height: 1.4; resize: none; max-height: 120px; overflow-y: auto;
}
@media (max-width: 600px) {
 .support-chat-card { height: clamp(22rem, 68vh, 40rem); height: clamp(22rem, 68dvh, 40rem); }
 .support-composer textarea, .admin-cs-composer textarea { padding: 8px 10px; }
 .support-send-button { min-height: 44px; padding-inline: 12px; }
 .admin-cs-composer > .btn { min-height: 44px; padding-inline: clamp(9px, 2.5vw, 14px); }
}
@media (max-width: 420px) {
 .admin-cs-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
 .admin-cs-composer textarea { grid-column: 1 / -1; grid-row: 1; width: 100%; }
 .admin-cs-composer > .btn-secondary { grid-column: 1; grid-row: 2; justify-self: start; }
 .admin-cs-composer .admin-cs-photo-button { grid-column: 2; grid-row: 2; }
 .admin-cs-composer > .btn-primary { grid-column: 3; grid-row: 2; justify-self: end; }
}
.bank-picker-panel {
 position: absolute; bottom: 58px; left: 12px; right: 12px; max-width: 460px;
 background: var(--fb-card); border: 1px solid var(--fb-border); border-radius: 12px;
 box-shadow: 0 10px 28px rgba(0,0,0,0.28); padding: 10px; z-index: 35;
 max-height: 250px; overflow-y: auto;
}
.bank-picker-item {
 display: flex; align-items: center; justify-content: space-between; gap: 8px;
 padding: 8px 10px; border-radius: 8px; border: 1px solid var(--fb-border);
 background: var(--fb-surface); margin-bottom: 6px; font-size: 12.5px;
}
.bank-picker-item:last-child { margin-bottom: 0; }

.bank-provider-grid {
 display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
 gap: 10px; margin-top: 10px;
}
.bank-provider-card {
 background: var(--fb-surface); border: 1px solid var(--fb-border);
 border-radius: 12px; padding: 12px; cursor: pointer;
 transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
 display: flex; flex-direction: column; gap: 4px;
}
.bank-provider-card:hover { transform: translateY(-2px); border-color: var(--fb-primary); }
.bank-provider-card.active {
 border-color: var(--fb-primary); background: rgba(24, 119, 242, 0.12);
 box-shadow: 0 0 0 1px var(--fb-primary);
}
.bank-provider-name { font-weight: 800; font-size: 14px; }
.bank-provider-type { font-size: 11.5px; color: var(--fb-muted); font-weight: 600; }
.bank-provider-count { font-size: 11.5px; color: var(--fb-text); font-weight: 700; margin-top: 2px; }
.bank-entry-form-card {
 margin-top: 12px; padding: 14px; border-radius: 12px;
 background: var(--fb-surface); border: 1px solid var(--fb-border);
}
.bank-form-head {
 display: flex; align-items: center; justify-content: space-between;
 gap: 8px; margin-bottom: 10px;
}

.cs-layout { display: grid; grid-template-columns: 290px 1fr; gap: 12px; }
.cs-client-list { border: 1px solid var(--fb-border); border-radius: 10px; overflow: hidden; background: var(--fb-surface); }
.cs-list-head { padding: 10px; border-bottom: 1px solid var(--fb-border); display: flex; gap: 6px; align-items: center; }
.cs-thread-item {
 padding: 10px 12px; border-bottom: 1px solid var(--fb-border); cursor: pointer;
 display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.cs-thread-item:hover, .cs-thread-item.active { background: rgba(24, 119, 242, 0.14); }
.cs-chat-pane { border: 1px solid var(--fb-border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; background: var(--fb-card); }
.cs-pane-head { padding: 10px 14px; border-bottom: 1px solid var(--fb-border); background: var(--fb-surface); }

.cs-incoming-toast {
 position: fixed; top: 68px; right: 16px; z-index: 95; width: 310px; max-width: calc(100vw - 32px);
 background: var(--fb-card); border: 1px solid var(--fb-border); border-left: 4px solid var(--fb-text);
 border-radius: 12px; padding: 11px 13px; box-shadow: 0 10px 28px rgba(0,0,0,0.28); cursor: pointer;
}
.cs-toast-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.cs-toast-badge { font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--fb-border); color: var(--fb-text); }
.cs-toast-time { font-size: 11px; color: var(--fb-muted); }
.cs-toast-sender { font-weight: 800; font-size: 13.5px; margin-bottom: 2px; }
.cs-toast-preview { font-size: 12.5px; color: var(--fb-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.reg-success-toast {
 position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 96;
 min-width: 280px; max-width: calc(100vw - 32px);
 background: var(--fb-card); border: 1px solid var(--fb-border); border-left: 4px solid var(--fb-text);
 border-radius: 12px; padding: 11px 14px; box-shadow: 0 12px 30px rgba(0,0,0,0.3);
 display: flex; align-items: center; gap: 10px;
}
.reg-toast-check {
 width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--fb-border);
 color: var(--fb-text); display: grid; place-items: center; font-weight: 900; flex-shrink: 0;
}
.reg-toast-title { font-weight: 800; font-size: 13.5px; }
.reg-toast-sub { font-size: 12px; color: var(--fb-muted); margin-top: 2px; }

.center-rounded-alert {
 position: fixed; inset: 0; z-index: 120;
 background: rgba(0, 0, 0, 0.52); backdrop-filter: blur(2px);
 display: flex; align-items: center; justify-content: center; padding: 18px;
}
.center-rounded-card {
 width: 100%; max-width: 370px; background: var(--fb-card);
 border: 1px solid var(--fb-border); border-radius: 22px;
 padding: 22px 20px 18px; box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
 text-align: center; animation: fadeIn 0.16s ease;
}
.center-rounded-badge {
 display: inline-block; font-size: 11px; font-weight: 800;
 padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; letter-spacing: 0.4px;
 border: 1px solid var(--fb-border); color: var(--fb-text);
}
.center-rounded-title { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.center-rounded-msg { font-size: 13.5px; color: var(--fb-muted); line-height: 1.5; white-space: pre-line; }
.center-rounded-actions { margin-top: 16px; display: flex; justify-content: center; }

.platform-dialog-backdrop {
 position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
 padding: clamp(16px, 4vw, 36px); background: rgba(3, 8, 18, 0.68); backdrop-filter: blur(4px);
}
.platform-dialog-card {
 width: 100%; max-width: 460px; max-height: min(90vh, 760px); max-height: min(90dvh, 760px); overflow-y: auto;
 padding: clamp(20px, 4vw, 28px); border: 1px solid var(--fb-border); border-radius: 20px;
 background: var(--fb-card); color: var(--fb-text);
 box-shadow: 0 22px 64px rgba(0, 0, 0, 0.38), 0 0 28px rgba(24, 119, 242, 0.14);
}
.platform-dialog-badge {
 display: inline-flex; align-items: center; margin-bottom: 10px; padding: 4px 10px;
 border: 1px solid var(--fb-border); border-radius: 999px; color: var(--fb-primary);
 font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
}
.platform-dialog-title { font-size: clamp(18px, 3vw, 21px); line-height: 1.3; font-weight: 800; overflow-wrap: anywhere; }
.platform-dialog-message {
 margin-top: 9px; color: var(--fb-muted); font-size: clamp(14px, 2.4vw, 16px);
 line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere;
}
.platform-dialog-input-wrap { margin-top: 16px; }
.platform-dialog-input {
 display: block; width: 100%; min-width: 0; min-height: 48px; padding: 11px 13px;
 border: 1px solid var(--fb-border); border-radius: 11px; background: var(--fb-surface);
 color: var(--fb-text); font: inherit; outline: none;
}
.platform-dialog-input:focus { border-color: var(--fb-primary); box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.16); }
.platform-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.platform-dialog-actions .btn { min-width: 100px; min-height: 44px; }
.platform-dialog-card button:focus-visible { outline: 3px solid rgba(81, 183, 255, 0.58); outline-offset: 3px; }
.platform-dialog-card.is-danger .platform-dialog-confirm {
 border-color: var(--fb-danger); background: var(--fb-danger); color: #fff;
}
body.platform-dialog-open { overflow: hidden; }
@media (max-width: 480px) {
 .platform-dialog-card { max-height: min(88vh, 720px); max-height: min(88dvh, 720px); border-radius: 18px; }
 .platform-dialog-actions .btn { flex: 1 1 0; min-width: 0; }
}

.bottom-nav {
 position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
 background: var(--fb-card); border-top: 1px solid var(--fb-border);
 display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 6px 4px;
 box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}
.bottom-nav button {
 min-width: 0; background: none; border: none; color: var(--fb-muted);
 display: flex; flex-direction: column; align-items: center; gap: 3px;
 font-size: 11px; font-weight: 700; padding: 5px 2px; cursor: pointer; border-radius: 8px;
 overflow-wrap: anywhere; text-align: center;
}
.bottom-nav button.active { color: var(--fb-text); background: var(--fb-surface); }

.modal-backdrop {
 position: fixed; inset: 0; background: rgba(0,0,0,0.58); z-index: 80;
 display: flex; align-items: center; justify-content: center; padding: 14px;
}
body.account-banned { overflow: hidden; }
body.account-banned #welcomeSplash,
body.account-banned .topbar,
body.account-banned #csIncomingToast,
body.account-banned main.container > .page:not(#supportPage),
body.account-banned .modal-backdrop,
body.account-banned .bottom-nav button:not(:nth-child(3)) { display: none !important; }
body.account-banned main.container > #supportPage { display: block !important; }
body.account-banned .bottom-nav { grid-template-columns: 1fr; }
body.account-banned .bottom-nav button:nth-child(3) { display: flex; }
.modal-card {
 background: var(--fb-card); border: 1px solid var(--fb-border); border-radius: 14px;
 width: 100%; max-width: 440px; padding: 18px; box-shadow: 0 12px 32px rgba(0,0,0,0.35);
 max-height: 90vh; overflow-y: auto;
}
.modal-card.wide-modal { max-width: 820px; }
.booking-modal-backdrop { animation: booking-modal-fade-in 180ms ease-out; }
.booking-modal-backdrop.is-closing { animation: booking-modal-fade-out 160ms ease-in forwards; }
.booking-modal-backdrop .modal-card { animation: booking-card-enter 180ms ease-out; }
.booking-modal-backdrop.is-closing .modal-card { animation: booking-card-exit 160ms ease-in forwards; }
.booking-success-card { border-color: var(--fb-success); box-shadow: 0 18px 48px rgba(22, 163, 74, 0.24); }
#bookingCommentInput {
 display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
 border: 1px solid var(--fb-border); border-radius: 8px; background: var(--fb-surface);
 color: var(--fb-text); font: inherit; resize: vertical;
}
#bookingStarGroup.has-validation-error { outline: 2px solid var(--fb-danger); outline-offset: 3px; border-radius: 8px; }
#bookingCommentInput.has-validation-error { border-color: var(--fb-danger); outline: 2px solid var(--fb-danger); }
#bookingValidationWarning { min-height: 18px; }
#bookingConfirmButton:disabled { opacity: 0.48; filter: saturate(0.55); cursor: not-allowed; box-shadow: none; }
#bookingConfirmButton:not(:disabled) { box-shadow: 0 0 0 2px rgba(66, 183, 42, 0.22); }
@keyframes booking-modal-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes booking-modal-fade-out { to { opacity: 0; } }
@keyframes booking-card-enter { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes booking-card-exit { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) {
 .booking-modal-backdrop, .booking-modal-backdrop .modal-card { animation-duration: 1ms; }
}
@media (max-width: 520px) {
 .pending-lucky-order-panel { align-items: stretch; flex-direction: column; }
 .pending-lucky-order-actions { justify-content: flex-end; }
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.close-x { background: none; border: none; color: var(--fb-muted); font-size: 20px; cursor: pointer; }
.field { margin-bottom: 11px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 4px; color: var(--fb-muted); }
.field input, .field select {
 width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--fb-border);
 background: var(--fb-surface); color: var(--fb-text); font-size: 14px;
}
.password-input-control { position: relative; width: 100%; }
.password-input-control input { padding-right: 44px; }
.password-visibility-toggle {
 position: absolute;
 top: 50%;
 right: 6px;
 display: grid;
 place-items: center;
 width: 32px;
 height: 32px;
 padding: 0;
 transform: translateY(-50%);
 border: 0;
 border-radius: 6px;
 background: transparent;
 color: var(--fb-muted);
 cursor: pointer;
}
.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible { background: var(--fb-border); color: var(--fb-text); }
.password-visibility-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.auth-phone-input {
 display: flex;
 min-width: 0;
 overflow: hidden;
 border: 1px solid var(--fb-border);
 border-radius: 8px;
 background: var(--fb-surface);
}
.auth-phone-input .country-code-select {
 flex: 0 0 124px;
 width: 124px;
 max-width: 124px;
 min-width: 0;
 box-sizing: border-box;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
 padding: 8px 6px;
 border: 0;
 border-right: 1px solid var(--fb-border);
 border-radius: 0;
 background: var(--fb-surface);
 color: var(--fb-text);
 font-size: 13px;
}
.auth-phone-input input {
 min-width: 0;
 border: 0;
 border-radius: 0;
 background: transparent;
}
.auth-phone-input input:focus,
.auth-phone-input .country-code-select:focus { outline: 2px solid var(--fb-primary); outline-offset: -2px; }
.auth-field.auth-invalid { animation: authShake 0.34s ease; }
.auth-field.auth-invalid > input,
.auth-field.auth-invalid .password-input-control input {
 border-color: var(--fb-danger);
 box-shadow: 0 0 0 1px var(--fb-danger);
}
.auth-field.auth-invalid .auth-phone-input {
 border: 1px solid var(--fb-danger);
 box-shadow: 0 0 0 1px var(--fb-danger);
}
.auth-field.auth-invalid .auth-phone-input input,
.auth-field.auth-invalid .auth-phone-input select { box-shadow: none; }
.auth-terms,
.auth-remember-row {
 display: flex;
 align-items: flex-start;
 gap: 9px;
 color: var(--fb-text);
 font-size: 13px;
 line-height: 1.45;
}
.auth-terms { margin: 4px 0 11px; padding: 3px; border-radius: 8px; }
.auth-remember-row { margin: 4px 0 12px; cursor: pointer; }
.auth-terms input,
.auth-remember-row input {
 flex: 0 0 auto;
 width: 16px;
 height: 16px;
 margin: 1px 0 0;
 accent-color: var(--fb-primary);
}
.auth-terms.auth-invalid {
 border: 1px solid var(--fb-danger);
 box-shadow: 0 0 0 1px var(--fb-danger);
 animation: authShake 0.34s ease;
}
@keyframes authShake {
 0%, 100% { transform: translateX(0); }
 20%, 60% { transform: translateX(-5px); }
 40%, 80% { transform: translateX(5px); }
}

@media (max-width: 820px) {
 .cs-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
 .topbar { padding: 8px 10px; gap: 6px; }
 .brand { font-size: 15px; gap: 6px; }
 .brand .logo { width: 32px; height: 32px; }
 .support-chat-header { gap: 8px; padding: 10px 12px; }
 .support-agent-avatar { width: 38px; height: 38px; flex-basis: 38px; }
 .support-agent-title { font-size: 14px; }
 .support-live-badge { padding: 2px 6px; font-size: 9px; }
 .support-online-count { gap: 5px; font-size: 10px; }
 .support-chat-start { padding: 18px; }
 .lang-select { padding: 5px 6px; font-size: 11.5px; }
 .icon-btn { padding: 6px 8px; font-size: 12px; }
 .topbar .btn-sm { padding: 6px 8px; font-size: 11.5px; white-space: nowrap; }
 .auth-phone-input .country-code-select { flex-basis: 124px; width: 124px; font-size: 12px; }
 .hero h1 { font-size: 20px; }
 .fx-canvas-box { height: 210px; }
 .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
 .hotel-card img { height: 124px; }
 .hotel-body { padding: 9px; gap: 4px; }
 .hotel-title { font-size: 13.5px; line-height: 1.25; }
 .stars { font-size: 11.5px; }
 .price { font-size: 14px; }
 .hotel-body .btn-sm { padding: 5px 8px; font-size: 11.5px; }
}

.demo-market-panel,
.member-rewards-panel {
 margin-top: 16px;
 padding: 16px;
 border: 1px solid var(--fb-border);
 border-radius: 14px;
 background: var(--fb-card);
 box-shadow: var(--fb-shadow);
}
.demo-market-heading,
.demo-market-footer,
.profile-notification-controls {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 10px;
 flex-wrap: wrap;
}
.demo-market-heading h2,
.member-rewards-panel h3 { margin-bottom: 4px; }
.demo-market-status,
.vip-level-badge {
 display: inline-flex;
 align-items: center;
 padding: 5px 10px;
 border-radius: 999px;
 background: var(--fb-surface);
 color: var(--fb-primary);
 font-size: 12px;
 font-weight: 800;
}
.demo-market-assets,
.member-rewards-grid {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
 gap: 12px;
 margin-top: 14px;
}
.demo-market-asset-card,
.member-reward-card {
 min-width: 0;
 padding: 14px;
 border: 1px solid var(--fb-border);
 border-radius: 12px;
 background: var(--fb-surface);
}
.demo-market-price {
 margin: 6px 0;
 font-size: 22px;
 font-weight: 900;
}
.demo-market-direction { font-size: 12px; font-weight: 800; }
.demo-market-direction.is-up { color: var(--fb-success); }
.demo-market-direction.is-down { color: var(--fb-danger); }
.demo-market-direction.is-flat { color: var(--fb-muted); }
.demo-market-controls {
 display: flex;
 align-items: flex-end;
 gap: 10px;
 flex-wrap: wrap;
 margin-top: 14px;
}
.demo-market-controls .field {
 flex: 1 1 145px;
 min-width: 130px;
 margin: 0;
}
.demo-market-controls .field > span { display: block; margin-bottom: 4px; color: var(--fb-muted); font-size: 12.5px; font-weight: 700; }
.demo-market-controls button { min-height: 40px; }
.demo-market-footer { margin-top: 12px; }
.demo-market-bets {
 display: grid;
 gap: 6px;
 margin-top: 12px;
 font-size: 12px;
}
.member-reward-value {
 margin: 5px 0;
 font-size: 22px;
 font-weight: 900;
}
.checkin-days {
 display: grid;
 grid-template-columns: repeat(7, minmax(0, 1fr));
 gap: 5px;
 margin: 10px 0;
}
.checkin-day {
 display: grid;
 place-items: center;
 min-height: 32px;
 border: 1px solid var(--fb-border);
 border-radius: 8px;
 background: var(--fb-card);
 color: var(--fb-muted);
 font-size: 11px;
 font-weight: 800;
}
.checkin-day.is-claimed {
 border-color: var(--fb-success);
 background: var(--fb-surface);
 color: var(--fb-success);
}
.checkin-day.is-current {
 border-color: var(--fb-primary);
 color: var(--fb-primary);
}
.vip-progress-track {
 height: 8px;
 overflow: hidden;
 margin-top: 9px;
 border-radius: 999px;
 background: var(--fb-border);
}
.vip-progress-fill {
 width: 0;
 height: 100%;
 border-radius: inherit;
 background: linear-gradient(90deg, var(--fb-primary), var(--fb-success));
 transition: width 0.25s ease;
}
.profile-notification-controls { justify-content: flex-start; margin-top: 14px; }
.admin-demo-market-panel { border-color: var(--fb-primary); }
.app-event-toast {
 position: fixed;
 z-index: 9999;
 right: 16px;
 bottom: 96px;
 width: min(360px, calc(100vw - 32px));
 padding: 13px 15px;
 border: 1px solid var(--fb-border);
 border-radius: 12px;
 background: var(--fb-card);
 color: var(--fb-text);
 box-shadow: var(--fb-shadow);
 cursor: pointer;
 animation: appToastIn 0.2s ease-out;
}
.app-event-toast strong { display: block; margin-bottom: 3px; }
.app-event-toast span { color: var(--fb-muted); font-size: 13px; }
@keyframes appToastIn {
 from { opacity: 0; transform: translateY(8px); }
 to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
 .demo-market-panel,
 .member-rewards-panel { padding: 12px; }
 .demo-market-controls .field { flex-basis: calc(50% - 6px); }
 .demo-market-controls > button { width: 100%; }
 .app-event-toast { right: 10px; bottom: 90px; }
}

.home-search-panel { margin: 14px 0; }
.home-search-panel > label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 800; }
.home-search-panel > input { width: 100%; }
.home-search-results { display: grid; gap: 8px; margin-top: 10px; color: var(--fb-muted); font-size: 13px; }
.home-search-result,
.local-sample-profile {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 12px;
 padding: 10px 12px;
 border: 1px solid var(--fb-border);
 border-radius: 10px;
 background: var(--fb-surface);
 color: var(--fb-text);
}
.home-search-result > div { min-width: 0; }
.finance-trend-intro { margin-bottom: 14px; }
.finance-trend-intro h1 { margin-bottom: 5px; }
.finance-trend-intro p { margin: 0; }
.demo-market-footer strong { margin-right: auto; }
.verification-request-card {
 display: grid;
 gap: 12px;
 margin-top: 14px;
 padding: 14px;
 border: 1px solid var(--fb-border);
 border-radius: 12px;
 background: var(--fb-surface);
}
.verification-status-row { display: flex; align-items: center; gap: 10px; }
.verification-mark {
 display: grid;
 place-items: center;
 flex: 0 0 30px;
 width: 30px;
 height: 30px;
 border: 2px solid #8a929e;
 border-radius: 50%;
 color: #777f8a;
 font-size: 18px;
 font-weight: 900;
}
.verification-mark.is-unverified { background: rgba(120, 128, 140, 0.1); }
.verification-mark.is-verified {
 border-color: #1687ff;
 background: rgba(22, 135, 255, 0.12);
 color: #0876e8;
 box-shadow: 0 0 0 3px rgba(22, 135, 255, 0.1);
}
.verification-request-button {
 width: fit-content;
 max-width: 100%;
 padding: 10px 14px;
 border: 1px solid var(--fb-primary);
 border-radius: 10px;
 background: var(--fb-card);
 color: var(--fb-primary);
 font-weight: 800;
 cursor: pointer;
 animation: verificationPulse 2.2s ease-in-out infinite;
}
.verification-request-button:hover { animation-play-state: paused; }
.local-sample-profiles h2 { margin-bottom: 4px; }
.local-sample-profile-grid { display: grid; gap: 8px; }
.local-sample-profile { justify-content: flex-start; }
.local-sample-profile img { flex: 0 0 44px; border-radius: 50%; }
.local-sample-profile .small { margin-top: 2px; }
@keyframes verificationPulse {
 0%, 100% { transform: scale(1); }
 50% { transform: scale(1.035); }
}
@media (max-width: 600px) {
 .bottom-nav button { min-width: 0; padding: 5px 1px; font-size: 9px; }
 .bottom-nav button .outline-icon { width: 19px; height: 19px; }
 .profile-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .lang-select { max-width: min(112px, 34vw); }
 .home-search-result { align-items: flex-start; }
 .home-search-result .btn { flex: 0 0 auto; padding: 7px 8px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
 .verification-request-button { animation: none; }
}

.welcome-splash {
 position: fixed;
 inset: 0;
 z-index: 10000;
 overflow: hidden;
 isolation: isolate;
 background-color: #06152f;
 background-image:
  radial-gradient(ellipse at 50% 46%, rgba(39, 130, 255, 0.22), transparent 38%),
  radial-gradient(circle at 18% 24%, rgba(38, 107, 230, 0.18), transparent 30%),
  linear-gradient(140deg, #06132b 0%, #0a2148 54%, #06152f 100%);
 background-repeat: no-repeat;
 background-position: center;
 background-size: auto, auto, auto;
 color: #fff;
}
.welcome-splash__artwork {
 position: absolute;
 inset: 0 0 auto;
 z-index: 0;
 height: min(360px, 46vh);
 overflow: hidden;
 background: url("welcome-world-map.svg") center 18% / min(1300px, 125vw) auto no-repeat;
 pointer-events: none;
 -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.72) 58%, transparent 100%);
 mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.72) 58%, transparent 100%);
}
.welcome-splash__artwork-wordmark {
 position: absolute;
 top: clamp(24px, 5vh, 52px);
 left: 50%;
 display: flex;
 box-sizing: border-box;
 max-width: calc(100% - 32px);
 align-items: center;
 gap: 12px;
 padding: 10px 18px;
 border: 1px solid rgba(195, 225, 255, 0.24);
 border-radius: 999px;
 background: rgba(6, 21, 47, 0.46);
 box-shadow: 0 8px 26px rgba(0, 0, 0, 0.16);
 color: rgba(235, 246, 255, 0.94);
 font-size: clamp(15px, 1.8vw, 18px);
 font-weight: 900;
 letter-spacing: 0.14em;
 line-height: 1;
 transform: translateX(-50%);
 white-space: nowrap;
 backdrop-filter: blur(8px);
}
.welcome-splash__artwork-wordmark img {
 flex: 0 0 auto;
 width: 38px;
 height: 38px;
 border: 1px solid rgba(195, 225, 255, 0.38);
 border-radius: 50%;
 object-fit: cover;
}
.welcome-splash__artwork-route {
 position: absolute;
 top: 76px;
 left: 50%;
 width: min(680px, 86vw);
 height: 150px;
 overflow: visible;
 color: rgba(132, 190, 255, 0.24);
 transform: translateX(-50%);
}
.welcome-splash__artwork-route path {
 fill: none;
 stroke: currentColor;
 stroke-dasharray: 4 10;
 stroke-width: 1.5;
}
.welcome-splash__artwork-route circle {
 fill: rgba(158, 219, 255, 0.28);
}
body.welcome-splash-active { overflow: hidden; }
.welcome-splash__stage {
 position: absolute;
 inset: 0;
 z-index: 1;
 display: grid;
 place-items: center;
 padding: 24px;
 opacity: 1;
 visibility: visible;
 transition: opacity 450ms ease, visibility 450ms ease;
}
.welcome-splash__card {
 position: relative;
 width: min(430px, 100%);
 padding: clamp(26px, 5vw, 42px) clamp(22px, 5vw, 36px);
 border: 1px solid rgba(173, 211, 255, 0.24);
 border-radius: 22px;
 background: linear-gradient(145deg, rgba(10, 31, 64, 0.9), rgba(4, 17, 39, 0.86));
 box-shadow: 0 20px 56px rgba(0, 0, 0, 0.34), 0 0 34px rgba(34, 130, 255, 0.12);
 text-align: center;
 backdrop-filter: blur(14px);
 animation: welcomeCardAppear 480ms ease-out both, welcomeCardSettleGlow 600ms ease-out 1600ms both;
}
.welcome-splash__brand-badge {
 display: grid;
 width: 66px;
 height: 66px;
 margin: 0 auto 18px;
 place-items: center;
 border: 1px solid rgba(173, 211, 255, 0.36);
 border-radius: 50%;
 background: radial-gradient(circle at 35% 25%, rgba(88, 174, 255, 0.22), rgba(7, 24, 50, 0.8));
 box-shadow: 0 0 26px rgba(58, 158, 255, 0.2), inset 0 0 16px rgba(173, 211, 255, 0.08);
}
.welcome-splash__brand-badge img {
 display: block;
 width: 44px;
 height: 44px;
 border-radius: 50%;
 object-fit: cover;
}
.welcome-splash__eyebrow {
 margin: 0 0 10px;
 color: #9edbff;
 font-size: clamp(11px, 2.5vw, 13px);
 font-weight: 800;
 letter-spacing: 0.16em;
}
.welcome-splash__card h1 {
 margin: 0;
 color: #fff;
 font-size: clamp(34px, 7vw, 48px);
 font-weight: 900;
 letter-spacing: -0.035em;
 text-shadow: 0 0 22px rgba(67, 159, 255, 0.34);
}
.welcome-splash__character {
 display: inline-block;
 animation: welcomeCharacterConverge 640ms cubic-bezier(0.2, 0.68, 0.25, 1) both;
 animation-delay: var(--character-delay, 0ms);
}
.welcome-splash__cta {
 display: flex;
 align-items: center;
 justify-content: center;
 width: fit-content;
 min-width: 148px;
 margin: 22px auto 0;
 padding: 11px 22px;
 border: 1px solid rgba(153, 222, 255, 0.62);
 border-radius: 999px;
 background: linear-gradient(110deg, #1877f2, #35bfff);
 box-shadow: 0 0 22px rgba(37, 151, 255, 0.3);
 color: #fff;
 cursor: pointer;
 font-size: 12px;
 font-weight: 900;
 letter-spacing: 0.16em;
 touch-action: manipulation;
 animation: welcomeCtaReady 400ms ease-out 2200ms both;
}
.welcome-splash__cta:hover { filter: brightness(1.12); }
.welcome-splash__cta:focus-visible {
 outline: 3px solid #fff;
 outline-offset: 4px;
}
.welcome-splash__loading {
 align-content: center;
 opacity: 0;
 visibility: hidden;
}
.welcome-splash.is-loading #welcomeSplashWelcome {
 opacity: 0;
 visibility: hidden;
}
.welcome-splash.is-loading .welcome-splash__loading {
 opacity: 1;
 visibility: visible;
}
.welcome-splash__loading-content {
 display: grid;
 justify-items: center;
 width: min(360px, 100%);
 text-align: center;
}
.welcome-splash__brand-loader {
 position: relative;
 display: grid;
 width: 104px;
 height: 104px;
 margin-bottom: 22px;
 place-items: center;
 border: 1px solid rgba(158, 219, 255, 0.2);
 border-radius: 50%;
 overflow: hidden;
 background: rgba(10, 31, 64, 0.52);
 box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 24px rgba(45, 154, 255, 0.12);
 animation: welcomeMarkPulse 1.8s ease-in-out infinite;
}
.welcome-splash__brand-mark {
 display: block;
 width: 70px;
 height: 70px;
 border-radius: 50%;
 object-fit: cover;
 filter: drop-shadow(0 0 10px rgba(68, 178, 255, 0.35));
}
.welcome-splash__loading-title,
.welcome-splash__loading-subtitle {
 margin: 0;
 font-weight: 700;
}
.welcome-splash__loading-title {
 color: #f1f7ff;
 font-size: clamp(18px, 4vw, 23px);
}
.welcome-splash__loading-subtitle {
 margin-top: 9px;
 color: #9cb6d8;
 font-size: clamp(13px, 3vw, 15px);
 font-weight: 500;
}
.welcome-splash__progress-wrap {
 position: relative;
 width: min(320px, 78vw);
 height: 26px;
 margin-top: 24px;
}
.welcome-splash__progress-track {
 position: absolute;
 inset: 50% 0 auto;
 width: 100%;
 height: 10px;
 transform: translateY(-50%);
 overflow: hidden;
 border: 1px solid rgba(162, 199, 242, 0.2);
 border-radius: 999px;
 background: linear-gradient(180deg, rgba(114, 198, 238, 0.34), rgba(23, 79, 133, 0.48));
 box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.28), 0 0 12px rgba(54, 166, 226, 0.16);
}
.welcome-splash__progress-track::after {
 position: absolute;
 z-index: 2;
 inset: 0;
 content: "";
 background: repeating-linear-gradient(112deg, transparent 0 10px, rgba(206, 244, 255, 0.24) 10px 12px, transparent 12px 23px);
 animation: welcomeWaterCurrent 2.2s linear infinite;
 pointer-events: none;
}
.welcome-splash__progress-fill {
 position: relative;
 z-index: 1;
 width: var(--progress, 0%);
 height: 100%;
 border-radius: inherit;
 overflow: hidden;
 background: linear-gradient(180deg, #73e5ff, #2586e6);
 box-shadow: 0 0 14px rgba(69, 188, 255, 0.72);
}
.welcome-splash__progress-fill::after {
 position: absolute;
 inset: 0;
 content: "";
 background: repeating-linear-gradient(112deg, transparent 0 8px, rgba(235, 252, 255, 0.36) 8px 10px, transparent 10px 20px);
 animation: welcomeWaterCurrent 1.5s linear infinite;
 pointer-events: none;
}
.welcome-splash__progress-value {
 margin-top: 10px;
 color: #b7d5f7;
 font-size: 13px;
 font-variant-numeric: tabular-nums;
 font-weight: 700;
}
@keyframes welcomeCardAppear {
 from { opacity: 0; transform: translateY(8px) scale(0.98); }
 to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes welcomeCharacterConverge {
 0% { opacity: 0; transform: translate3d(var(--fly-x), var(--fly-y), 0) scale(0.72) rotate(var(--fly-rotate)); }
 78% { opacity: 1; transform: translate3d(0, 0, 0) scale(1.045) rotate(0); }
 100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(0); }
}
@keyframes welcomeCardSettleGlow {
 from { box-shadow: 0 20px 56px rgba(0, 0, 0, 0.34), 0 0 34px rgba(34, 130, 255, 0.12); }
 to { box-shadow: 0 20px 56px rgba(0, 0, 0, 0.34), 0 0 42px rgba(58, 158, 255, 0.2); }
}
@keyframes welcomeCtaReady {
 from { box-shadow: 0 0 22px rgba(37, 151, 255, 0.3); filter: brightness(1); }
 to { box-shadow: 0 0 30px rgba(56, 184, 255, 0.52); filter: brightness(1.08); }
}
@keyframes welcomeMarkPulse {
 0%, 100% { opacity: 0.86; transform: scale(0.98); }
 50% { opacity: 1; transform: scale(1.03); }
}
@keyframes welcomeWaterCurrent {
 to { background-position: 23px 0; }
}
@media (max-width: 600px) {
 .welcome-splash__card { border-radius: 18px; }
 .welcome-splash__eyebrow { letter-spacing: 0.12em; }
 .welcome-splash__brand-badge { width: 58px; height: 58px; margin-bottom: 15px; }
 .welcome-splash__brand-badge img { width: 39px; height: 39px; }
 .welcome-splash__artwork-wordmark {
  gap: 10px;
  padding: 9px 13px;
  font-size: clamp(14px, 4vw, 16px);
 }
 .welcome-splash__artwork-wordmark img { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
 .welcome-splash__card,
 .welcome-splash__character,
 .welcome-splash__eyebrow,
 .welcome-splash__card h1,
 .welcome-splash__cta,
 .welcome-splash__brand-loader,
 .welcome-splash__progress-track::after,
 .welcome-splash__progress-fill::after,
 .chat-now-button { animation: none; }
 .welcome-splash__stage { transition: none; }
}
.finance-chart-asset-picker {
 display: flex;
 flex: 0 1 190px;
 flex-direction: column;
 gap: 4px;
 margin: 0;
 font-size: 12px;
 font-weight: 700;
 color: var(--fb-muted);
}
.finance-chart-asset-picker select {
 width: 100%;
 min-width: 0;
 padding: 7px 9px;
 border: 1px solid var(--fb-border);
 border-radius: 8px;
 background: var(--fb-surface);
 color: var(--fb-text);
 font: inherit;
}
@media (max-width: 600px) {
 .fx-timeframe-bar { align-items: stretch; }
 .finance-chart-asset-picker { flex: 1 1 100%; }
}

.finance-terminal-heading {
 display: flex;
 align-items: flex-end;
 justify-content: space-between;
 gap: 16px;
 margin: 0 0 12px;
}
.finance-terminal-heading h1 { margin-bottom: 4px; font-size: 23px; }
.finance-simulation-disclosure {
 max-width: 720px;
 color: #b7c4d6;
 font-size: 12px;
 line-height: 1.45;
}
.finance-terminal-market {
 display: flex;
 align-items: flex-end;
 gap: 14px;
}
.finance-symbol-select {
 display: flex;
 flex-direction: column;
 gap: 4px;
 min-width: 142px;
 color: var(--fb-muted);
 font-size: 11px;
 font-weight: 700;
}
.finance-symbol-select select {
 min-width: 142px;
 border: 1px solid #303a4b;
 border-radius: 7px;
 padding: 8px 10px;
 background: #131722;
 color: #e7edf5;
 font-weight: 700;
}
.finance-live-quote { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.finance-live-value { display: flex; align-items: center; gap: 7px; }
.finance-live-quote strong { color: #e7edf5; font-size: 20px; font-variant-numeric: tabular-nums; }
.finance-asset-icon {
 display: grid;
 width: 25px;
 height: 25px;
 place-items: center;
 border: 1px solid #3b4658;
 border-radius: 50%;
 background: #192437;
 color: #a9c8f5;
 font-size: 11px;
 font-weight: 800;
}
.finance-change { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.finance-change.is-up { color: #089981; }
.finance-change.is-down { color: #f23645; }
.finance-terminal {
 display: grid;
 grid-template-columns: minmax(0, 1fr) 292px;
 align-items: start;
 gap: 10px;
 border: 1px solid #252d3b;
 border-radius: 12px;
 padding: 10px;
 background: #0b111e;
 color: #d1d4dc;
 box-shadow: 0 12px 30px rgba(2, 8, 23, 0.3);
}
.finance-terminal-main {
 min-width: 0;
 display: grid;
 grid-template-columns: 38px minmax(0, 1fr);
 gap: 8px;
}
.finance-terminal-toolbar {
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 4px;
 padding: 2px 0;
 border-right: 1px solid #202938;
}
.finance-tool {
 width: 30px;
 height: 30px;
 border: 1px solid transparent;
 border-radius: 5px;
 background: transparent;
 color: #8b98a9;
 font-size: 17px;
 line-height: 1;
 cursor: pointer;
}
.finance-tool:hover, .finance-tool.active { color: #d1d4dc; background: #202938; border-color: #303a4b; }
.finance-tool-danger:hover { color: #f23645; }
.finance-chart-area { min-width: 0; }
.finance-chart-topline, .finance-timeframe-row, .finance-chart-bottom {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 10px;
 min-width: 0;
}
.finance-chart-topline {
 min-height: 32px;
 margin-bottom: 4px;
}
.finance-chart-topline > div:first-child { display: flex; align-items: center; gap: 9px; min-width: 0; }
.finance-chart-topline strong { color: #e7edf5; font-size: 14px; white-space: nowrap; }
.finance-feed-status {
 display: inline-flex;
 align-items: center;
 gap: 5px;
 color: #d5ab45;
 font-size: 9px;
 font-weight: 800;
 letter-spacing: 0.07em;
 white-space: nowrap;
}
.finance-feed-status i { width: 6px; height: 6px; border-radius: 50%; background: #d5ab45; }
.finance-ohlc-readout { display: flex; align-items: center; gap: 8px; color: #8b98a9; font-size: 10px; white-space: nowrap; }
.finance-ohlc-readout b { color: #c9d1d9; font-weight: 600; font-variant-numeric: tabular-nums; }
.finance-indicator-btn {
 border: 1px solid #303a4b;
 border-radius: 5px;
 padding: 5px 8px;
 background: #131722;
 color: #c9d1d9;
 font-size: 10px;
 cursor: pointer;
 white-space: nowrap;
}
.finance-indicator-btn.active { color: #7aa7ff; border-color: #365b95; }
.finance-timeframe-row { min-height: 34px; border-top: 1px solid #202938; }
.finance-timeframe-row .fx-tf-group { gap: 1px; }
.finance-timeframe-row .fx-tf-btn {
 min-width: 34px;
 padding: 5px 7px;
 color: #8b98a9;
 font-size: 11px;
}
.finance-timeframe-row .fx-tf-btn.active { color: #e7edf5; background: #202938; border-color: transparent; }
.finance-hover-readout {
 overflow: hidden;
 color: #8b98a9;
 font-size: 10px;
 text-overflow: ellipsis;
 white-space: nowrap;
}
.finance-canvas-box {
 position: relative;
 width: 100%;
 height: min(58vh, 500px);
 min-height: 330px;
 overflow: hidden;
 border-top: 1px solid #202938;
 background: #0b111e;
 touch-action: none;
}
#fxLiveCanvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
.finance-chart-bottom {
 min-height: 35px;
 border-top: 1px solid #202938;
 color: #8b98a9;
 font-size: 10px;
}
.finance-range-group, .finance-chart-scale { display: flex; align-items: center; gap: 2px; }
.finance-range-group button, .finance-chart-scale button {
 border: 0;
 border-radius: 4px;
 padding: 4px 6px;
 background: transparent;
 color: #8b98a9;
 font-size: 10px;
 cursor: pointer;
}
.finance-range-group button:hover, .finance-chart-scale button:hover,
.finance-range-group button.active, .finance-chart-scale button.active { color: #e7edf5; background: #202938; }
.finance-chart-scale { white-space: nowrap; }
.finance-chart-scale span { margin-right: 5px; font-variant-numeric: tabular-nums; }
.finance-market-strip {
 grid-column: 1 / -1;
 display: grid;
 grid-template-columns: repeat(5, minmax(0, 1fr));
 gap: 6px;
 margin-top: 1px;
}
.finance-market-strip .demo-market-asset-card {
 min-width: 0;
 padding: 8px;
 border: 1px solid #252d3b;
 border-radius: 7px;
 background: #131722;
 color: #9aa4b2;
}
.finance-market-strip .demo-market-asset-card strong { display: block; color: #c9d1d9; font-size: 10px; }
.finance-market-strip .demo-market-price { margin: 4px 0 2px; color: #e7edf5; font-size: 12px; font-variant-numeric: tabular-nums; }
.finance-market-strip .demo-market-direction { font-size: 9px; }
.finance-terminal-footer {
 grid-column: 1 / -1;
 display: flex;
 justify-content: space-between;
 gap: 8px;
 color: #778497;
 font-size: 10px;
}
.finance-trade-hint {
 grid-column: 1 / -1;
 min-height: 0;
 color: #8b98a9;
 font-size: 11px;
}
.finance-trade-hint:empty { display: none; }
.finance-position-list {
 grid-column: 1 / -1;
 display: grid;
 gap: 5px;
}
.finance-position-row {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 8px;
 padding: 7px 9px;
 border: 1px solid #252d3b;
 border-radius: 6px;
 background: #131722;
 font-size: 10px;
}
.finance-position-row > div { min-width: 0; display: flex; flex-wrap: wrap; gap: 7px; }
.finance-position-row strong { color: #e7edf5; }
.finance-position-row .is-buy { color: #089981; }
.finance-position-row .is-sell { color: #f23645; }
.finance-position-row button {
 flex-shrink: 0;
 border: 1px solid #465267;
 border-radius: 4px;
 padding: 4px 7px;
 background: transparent;
 color: #c9d1d9;
 font-size: 10px;
 cursor: pointer;
}
.finance-order-panel {
 min-width: 0;
 padding: 12px;
 border: 1px solid #252d3b;
 border-radius: 8px;
 background: #131722;
}
.finance-order-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.finance-order-heading h2 { color: #e7edf5; font-size: 14px; }
.finance-switch { position: relative; display: inline-flex; width: 34px; height: 18px; }
.finance-switch input { position: absolute; opacity: 0; }
.finance-switch span { position: absolute; inset: 0; border-radius: 99px; background: #394354; cursor: pointer; transition: 0.18s; }
.finance-switch span::before { content: ""; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #c9d1d9; transition: 0.18s; }
.finance-switch input:checked + span { background: #089981; }
.finance-switch input:checked + span::before { transform: translateX(16px); background: #fff; }
.finance-quote-pair { display: grid; grid-template-columns: 1fr 44px 1fr; align-items: center; gap: 4px; margin: 14px 0 5px; }
.finance-side-quote {
 min-width: 0;
 display: flex;
 flex-direction: column;
 gap: 5px;
 border: 1px solid #354052;
 border-radius: 6px;
 padding: 9px 5px;
 background: #1b2230;
 cursor: pointer;
}
.finance-side-quote span { font-size: 10px; font-weight: 800; letter-spacing: 0.04em; }
.finance-side-quote strong { color: #e7edf5; font-size: 12px; font-variant-numeric: tabular-nums; }
.finance-side-quote.sell span { color: #f23645; }
.finance-side-quote.buy span { color: #089981; }
.finance-side-quote.active { border-color: #7aa7ff; box-shadow: 0 0 0 1px rgba(122,167,255,.25); }
.finance-spread { color: #8b98a9; font-size: 9px; text-align: center; }
.finance-order-side-note { min-height: 16px; color: #8b98a9; font-size: 9px; text-align: center; }
.finance-segment { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 10px 0; padding: 3px; border-radius: 6px; background: #0b111e; }
.finance-segment button { border: 0; border-radius: 4px; padding: 6px; background: transparent; color: #8b98a9; font-size: 10px; cursor: pointer; }
.finance-segment button.active { background: #263248; color: #e7edf5; }
.finance-order-field { display: grid; gap: 5px; margin: 9px 0; color: #9aa4b2; font-size: 10px; }
.finance-order-field input {
 width: 100%;
 min-width: 0;
 height: 34px;
 border: 1px solid #354052;
 border-radius: 5px;
 padding: 6px 8px;
 background: #0b111e;
 color: #e7edf5;
 font-size: 12px;
}
.finance-input-wrap { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px; }
.finance-input-wrap small { color: #8b98a9; }
.finance-margin-message { min-height: 29px; padding: 6px 7px; border-radius: 5px; background: #0b111e; color: #8b98a9; font-size: 9px; line-height: 1.4; }
.finance-margin-message.is-error { color: #ff7b86; }
.finance-margin-message.is-ok { color: #52c7ae; }
.finance-toggle-row { display: flex; align-items: center; gap: 7px; margin: 10px 0; color: #c9d1d9; font-size: 10px; cursor: pointer; }
.finance-toggle-row input { accent-color: #2962ff; }
.finance-conditional-field { margin-top: -3px; }
.finance-tpsl-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.finance-place-order {
 width: 100%;
 display: flex;
 flex-direction: column;
 align-items: center;
 gap: 4px;
 margin-top: 12px;
 border: 0;
 border-radius: 6px;
 padding: 11px 8px;
 background: #089981;
 color: #fff;
 font-weight: 800;
 cursor: pointer;
}
.finance-place-order.is-sell { background: #f23645; }
.finance-place-order span { font-size: 12px; }
.finance-place-order strong { font-size: 11px; font-variant-numeric: tabular-nums; }
.finance-order-account { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; color: #8b98a9; font-size: 9px; }
.finance-order-account strong { color: #e7edf5; font-size: 10px; }
.finance-legacy-bets { margin-top: 10px; color: var(--fb-text); }
.finance-legacy-bets summary, .finance-legacy-admin summary { padding: 8px 2px; color: var(--fb-muted); font-size: 12px; cursor: pointer; }
.finance-legacy-bets .demo-market-panel { margin-top: 0; }
.finance-control-panel { border-color: #39598a; }
.finance-control-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.finance-control-grid .field { min-width: 0; margin: 0; }
.finance-control-grid .field input, .finance-control-grid .field select {
 width: 100%;
 min-width: 0;
 min-height: 38px;
 border: 1px solid var(--fb-border);
 border-radius: 7px;
 padding: 7px 9px;
 background: var(--fb-surface);
 color: var(--fb-text);
}
.finance-control-grid > button { min-height: 38px; }
.finance-control-current { min-height: 18px; margin-top: 10px; color: var(--fb-muted); font-size: 12px; }
.finance-legacy-admin { margin-top: 6px; border-top: 1px solid var(--fb-border); }
.finance-legacy-admin .demo-market-controls { margin-top: 8px; }
@media (max-width: 980px) {
 .finance-terminal { grid-template-columns: minmax(0, 1fr); }
 .finance-order-panel { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 12px; }
 .finance-order-heading, .finance-quote-pair, .finance-order-side-note,
 .finance-segment, .finance-margin-message, .finance-place-order, .finance-order-account,
 .finance-tpsl-fields { grid-column: 1 / -1; }
 .finance-quote-pair { margin: 4px 0; }
 .finance-toggle-row { margin: 3px 0; }
 .finance-order-field { margin: 3px 0; }
}
@media (max-width: 600px) {
 .finance-terminal-heading { display: block; }
 .finance-terminal-market { align-items: flex-end; justify-content: space-between; margin-top: 10px; }
 .finance-terminal-main { grid-template-columns: 1fr; }
 .finance-terminal-toolbar { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 2px; border-right: 0; border-bottom: 1px solid #202938; padding-bottom: 4px; }
 .finance-tool { width: 28px; height: 28px; }
 .finance-canvas-box { height: 390px; min-height: 300px; }
 .finance-chart-topline { align-items: flex-start; flex-wrap: wrap; }
 .finance-chart-topline > div:first-child { flex-wrap: wrap; }
 .finance-chart-topline strong { white-space: normal; overflow-wrap: anywhere; }
 .finance-ohlc-readout { order: 3; width: 100%; justify-content: space-between; }
 .finance-timeframe-row { align-items: flex-start; flex-direction: column; padding: 5px 0; }
 .finance-hover-readout { max-width: 100%; }
 .finance-chart-bottom { align-items: flex-start; flex-direction: column; padding: 5px 0; }
 .finance-market-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
 .finance-terminal-footer { flex-direction: column; }
 .finance-order-panel { display: block; }
 .finance-order-field { margin: 9px 0; }
 .finance-tpsl-fields { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
 .finance-switch span, .finance-switch span::before { transition: none; }
}
