/* IAVirtuals — dashboard and sign-in pages. Uses the tokens and components of base.css.
   Readability first: prices, codes and balances sit on calm surfaces. */

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 24px;
  padding: 24px 18px; border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(10, 16, 44, 0.92), rgba(6, 10, 30, 0.92));
}
.sidebar__top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.sidebar__close { display: none; }
.sidebar__nav { display: grid; gap: 4px; }
.sidebar__link {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px;
  color: #c9d2f0; text-decoration: none; font-weight: 500; transition: background-color 0.2s, color 0.2s;
}
.sidebar__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: rgba(99, 132, 255, 0.08); color: var(--muted); transition: inherit; }
.sidebar__link:hover { background: rgba(99, 132, 255, 0.08); color: #fff; }
.sidebar__link.is-current { background: linear-gradient(90deg, rgba(59, 108, 246, 0.35), rgba(99, 102, 241, 0.16)); color: #fff; box-shadow: inset 0 0 0 1px rgba(126, 156, 255, 0.3); }
.sidebar__link.is-current .sidebar__icon { background: var(--gradient); color: #fff; box-shadow: 0 6px 18px rgba(59, 108, 246, 0.45); }
.sidebar__badge { margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; display: grid; place-items: center; border-radius: 999px; background: var(--gradient); color: #fff; font-size: 0.75rem; font-weight: 700; }
.sidebar__bottom { margin-top: auto; display: grid; gap: 2px; padding-top: 16px; border-top: 1px solid var(--border); }
.sidebar__site { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: var(--muted); text-decoration: none; font-size: 0.9375rem; text-align: left; }
.sidebar__site:hover { color: #fff; background: rgba(99, 132, 255, 0.08); }
.sidebar-scrim { display: none; }

.app__main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 3vw, 32px); border-bottom: 1px solid var(--border);
  background: rgba(5, 8, 22, 0.78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: rgba(12, 19, 49, 0.6); color: var(--text); position: relative; text-decoration: none; }
.icon-button:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.topbar__menu { display: none; }
.topbar__search { flex: 1; min-width: 0; max-width: 460px; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: rgba(12, 19, 49, 0.6); color: var(--faint); }
.topbar__search:focus-within { border-color: var(--blue-bright); box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2); }
.topbar__search input { flex: 1; width: 100%; min-width: 0; height: 100%; border: 0; background: none; outline: none; color: var(--text); }
/* The close button only exists for the sliding phone menu. */
.sidebar__close.icon-button { display: none; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar__dot { position: absolute; top: 9px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.profile { position: relative; }
.profile__summary { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 14px; cursor: pointer; list-style: none; }
.profile__summary::-webkit-details-marker { display: none; }
.profile__summary:hover { background: rgba(99, 132, 255, 0.08); }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gradient); font-weight: 700; color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15); }
.profile__who { display: grid; line-height: 1.25; }
.profile__name { font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile__role { font-size: 0.8125rem; color: var(--faint); }
.profile__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 8px; border-radius: var(--radius); background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: 0 20px 50px rgba(2, 6, 23, 0.6); z-index: 20; }
.profile__email { padding: 8px 12px 10px; font-size: 0.8125rem; color: var(--faint); border-bottom: 1px solid var(--border); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; }
.profile__menu a, .profile__menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; text-decoration: none; text-align: left; color: var(--text); }
.profile__menu a:hover, .profile__menu button:hover { background: var(--surface-hover); }

/* minmax(0, 1fr): a wide table scrolls inside its .table-wrap instead of widening the page. */
.app__content { padding: clamp(16px, 3vw, 32px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; width: 100%; max-width: 1360px; }

/* ---------- Common blocks ---------- */
.page-head h1 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.1rem); margin-top: 6px; }
.page-head p { margin-top: 6px; color: var(--muted); }
.card { padding: clamp(18px, 2.4vw, 24px); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__head h2, .card__title { font-size: 1.1875rem; display: flex; align-items: center; gap: 10px; }
.card__title { margin-bottom: 16px; }
.empty { display: flex; align-items: center; gap: 10px; padding: 18px; border-radius: var(--radius-sm); border: 1px dashed var(--border-strong); color: var(--muted); }
.empty-state { display: grid; justify-items: center; gap: 14px; padding: 48px 24px; text-align: center; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: rgba(12, 19, 49, 0.6); color: #d4dbf5; text-decoration: none; font-size: 0.9375rem; font-weight: 500; transition: border-color 0.2s, background-color 0.2s; }
.chip:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.chip.is-current { background: var(--gradient); border-color: transparent; color: #fff; }
.chip__meta { font-size: 0.8125rem; opacity: 0.75; }
.search-row { display: flex; gap: 10px; }
.search-row .input { min-height: 44px; }
/* position: relative keeps absolutely placed bits (visually hidden labels) inside the scroll box. */
.table-wrap { position: relative; overflow-x: auto; }
.cell-action { text-align: right; }
.cell-sub { display: block; font-size: 0.8125rem; color: var(--faint); }
.muted-cell { color: var(--muted); }
.is-in { color: var(--success); }
.is-out { color: #e2e8ff; }
.country-cell { display: inline-flex; align-items: center; gap: 10px; }
.pager { margin-top: 16px; text-align: center; }
.facts { display: grid; gap: 14px; }
.facts dt { font-size: 0.8125rem; color: var(--faint); }
.facts dd { margin-top: 2px; word-break: break-word; }
.icon--back { transform: rotate(180deg); }

/* ---------- Dashboard ---------- */
.welcome {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(260px, 340px);
  align-items: center; gap: 20px; padding: clamp(20px, 3vw, 32px);
  background: radial-gradient(500px 220px at 62% 50%, rgba(59, 108, 246, 0.28), transparent 70%), linear-gradient(180deg, rgba(18, 27, 64, 0.8), rgba(11, 17, 44, 0.8));
}
.welcome__text h1 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); }
.welcome__text p { margin-top: 8px; color: var(--muted); }
.welcome__art { position: relative; width: 220px; height: 130px; }
.mini-globe { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(147, 197, 253, 0.6), rgba(37, 56, 160, 0.55) 40%, rgba(8, 14, 48, 0.95) 72%); box-shadow: 0 0 60px rgba(59, 108, 246, 0.55), inset 0 0 30px rgba(147, 197, 253, 0.35); }
.mini-globe::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: repeating-linear-gradient(90deg, transparent 0 13px, rgba(165, 190, 255, 0.18) 13px 14px), repeating-linear-gradient(0deg, transparent 0 13px, rgba(165, 190, 255, 0.14) 13px 14px); -webkit-mask: radial-gradient(circle, #000 66%, transparent 70%); mask: radial-gradient(circle, #000 66%, transparent 70%); }
.mini-orbit { position: absolute; left: 50%; top: 50%; width: 230px; height: 70px; margin: -35px 0 0 -115px; border-radius: 50%; border: 1px solid rgba(126, 156, 255, 0.5); transform: rotate(-14deg); box-shadow: 0 0 14px rgba(99, 132, 255, 0.35); }
.cube--mini { position: absolute; right: -6px; top: 6px; width: 26px; height: 26px; transform-style: preserve-3d; transform: rotateX(-24deg) rotateY(38deg); }
.cube--mini .cube__face { position: absolute; inset: 0; border: 1px solid rgba(165, 190, 255, 0.75); background: rgba(80, 120, 255, 0.18); }
.cube--mini .cube__face--front { transform: translateZ(13px); } .cube--mini .cube__face--back { transform: rotateY(180deg) translateZ(13px); }
.cube--mini .cube__face--left { transform: rotateY(-90deg) translateZ(13px); } .cube--mini .cube__face--right { transform: rotateY(90deg) translateZ(13px); }
.cube--mini .cube__face--top { transform: rotateX(90deg) translateZ(13px); } .cube--mini .cube__face--bottom { transform: rotateX(-90deg) translateZ(13px); }
.balance-card { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 14px; padding: 18px 20px; border-radius: var(--radius); background: rgba(5, 8, 22, 0.6); border: 1px solid var(--border-strong); }
.balance-card__label { grid-column: 1 / -1; font-size: 0.875rem; color: var(--muted); }
.balance-card__value { font: 700 1.6rem / 1.1 var(--font-text); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { position: relative; padding: 20px; }
.stat__icon { position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; }
.stat__icon--teal { background: rgba(45, 212, 191, 0.16); color: #5eead4; }
.stat__icon--violet { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
.stat__icon--green { background: rgba(52, 211, 153, 0.16); color: #6ee7b7; }
.stat__icon--blue { background: rgba(96, 165, 250, 0.18); color: #93c5fd; }
.stat__label { font-size: 0.875rem; color: var(--muted); padding-right: 48px; }
.stat__value { margin-top: 10px; font: 700 1.6rem / 1.1 var(--font-text); }
.stat__sub { margin-top: 8px; font-size: 0.8125rem; color: var(--faint); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.offer-list { display: grid; }
.offer-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid rgba(110, 140, 255, 0.1); }
.offer-row:last-child { border-bottom: 0; }
.offer-row__country { display: grid; font-weight: 500; }
.offer-row__stock { font-size: 0.8125rem; color: var(--faint); font-weight: 400; }
.offer-row__price { font-weight: 600; }
.offer-row__buy { min-height: 36px; padding: 0 16px; }
.activity { display: grid; }
.activity__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid rgba(110, 140, 255, 0.1); }
.activity__row:last-child { border-bottom: 0; }
.activity__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: rgba(96, 165, 250, 0.14); color: #93c5fd; }
.activity__icon--deposit, .activity__icon--refund { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; }
.activity__icon--sms { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; }
.activity__main { display: grid; min-width: 0; }
.activity__title { font-weight: 500; }
.activity__sub { font-size: 0.8125rem; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity__end { display: grid; justify-items: end; }
.activity__amount { font-weight: 600; }
.activity__time { font-size: 0.75rem; color: var(--faint); }
.cta-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 20px 24px; background: linear-gradient(90deg, rgba(37, 56, 160, 0.45), rgba(91, 33, 182, 0.35)); }
.cta-banner__art { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--gradient); box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5); }
.cta-banner h2 { font-size: 1.1875rem; }
.cta-banner p { color: var(--muted); font-size: 0.9375rem; margin-top: 4px; }

/* ---------- Buying ---------- */
/* minmax(0, 1fr) and min-width: 0 let the card shrink to a phone's width; a long
   value with no spaces (a payment reference) wraps instead of widening the page. */
.confirm { max-width: 560px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.confirm__facts { display: grid; gap: 0; }
.confirm__facts > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(110, 140, 255, 0.1); }
.confirm__facts dt { color: var(--muted); flex-shrink: 0; }
.confirm__facts dd { font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.confirm__price { font: 700 1.4rem / 1.1 var(--font-text); }
.confirm__terms { margin-top: 2px; }

/* ---------- SMS ---------- */
.sms-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.sms-list > .empty-state { grid-column: 1 / -1; }
.sms-card { display: grid; gap: 16px; padding: 20px; scroll-margin-top: 90px; }
.sms-card:target { box-shadow: 0 0 0 2px var(--blue-bright), var(--glow); }
.sms-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sms-card__country { display: block; font-size: 0.8125rem; color: var(--faint); }
.sms-card__number, .sms-card__code { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: rgba(5, 8, 22, 0.55); border: 1px solid var(--border); }
.sms-card__label { grid-column: 1 / -1; font-size: 0.8125rem; color: var(--faint); }
.sms-card__phone { font: 600 1.375rem / 1.2 var(--font-text); }
.sms-card__digits { font: 700 2.2rem / 1.1 var(--font-text); letter-spacing: 0.12em; background: var(--gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sms-card__waiting { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; color: var(--muted); }
.sms-card__note { grid-column: 1 / -1; color: var(--muted); font-size: 0.9375rem; }
.sms-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.sms-card__foot .hint { display: inline-flex; align-items: center; gap: 6px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(126, 156, 255, 0.3); border-top-color: var(--cyan); animation: spin 0.9s linear infinite; }

/* ---------- Wallet & settings ---------- */
.wallet-grid, .settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; align-items: start; }
.wallet-hero { padding: 28px; background: radial-gradient(400px 200px at 80% 0%, rgba(124, 92, 255, 0.3), transparent 70%), linear-gradient(180deg, rgba(18, 27, 64, 0.8), rgba(11, 17, 44, 0.8)); }
.wallet-hero__label { color: var(--muted); }
.wallet-hero__value { margin: 8px 0 10px; font: 700 clamp(2rem, 1.4rem + 2vw, 2.75rem) / 1.1 var(--font-text); }
#top-up .alert { margin-bottom: 16px; }
.settings-submit { margin-top: 18px; }

/* Top-up form. The radios stay real inputs (keyboard and screen readers);
   only their look moves to the span that follows them. */
.topup-result { margin-bottom: 20px; scroll-margin-top: 90px; }
.topup-result__body { display: grid; gap: 10px; justify-items: start; }
.topup-result__actions, .topup-row__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.topup-row__actions { justify-content: flex-end; gap: 16px; }
.topup-form { display: grid; gap: 20px; }
.topup-form__group { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice, .method { position: relative; display: block; cursor: pointer; }
.choice input, .method input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: rgba(6, 10, 30, 0.7); font-weight: 600;
  transition: border-color 0.2s, background-color 0.2s;
}
.choice input:checked + span { background: var(--gradient); border-color: transparent; color: #fff; }
.choice:hover input:not(:checked) + span, .method:hover input:not(:checked) + .method__card { border-color: var(--blue-bright); }
.choice input:focus-visible + span, .method input:focus-visible + .method__card { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.topup-form__other .input { max-width: 200px; }
.method-list { display: grid; gap: 10px; }
.method__card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: rgba(6, 10, 30, 0.7);
  transition: border-color 0.2s, background-color 0.2s;
}
.method input:checked + .method__card { border-color: var(--blue-bright); background: rgba(59, 108, 246, 0.14); box-shadow: inset 0 0 0 1px var(--blue-bright); }
.method__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(96, 165, 250, 0.14); color: var(--blue-bright); }
.method__text { display: grid; gap: 2px; min-width: 0; }
.method__title { font-weight: 600; }
.method__sub { font-size: 0.8125rem; color: var(--muted); }
.method__rate { font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }
.topup-form__summary { padding: 12px 16px; border-radius: var(--radius-sm); background: rgba(59, 108, 246, 0.1); color: #dbeafe; }
.topup-form__secure { display: flex; gap: 8px; align-items: flex-start; }
.topup-form__secure .icon { flex: none; margin-top: 3px; }
@media (max-width: 480px) {
  .method__card { grid-template-columns: auto minmax(0, 1fr); }
  .method__rate { grid-column: 2; }
}

/* ---------- Sign-in pages ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth__art { position: relative; overflow: hidden; display: grid; align-content: end; padding: clamp(24px, 5vw, 64px); border-right: 1px solid var(--border); background: radial-gradient(600px 400px at 60% 35%, rgba(59, 108, 246, 0.3), transparent 70%), rgba(6, 10, 30, 0.6); }
.auth__orb { position: absolute; left: 50%; top: 36%; width: min(360px, 60%); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(147, 197, 253, 0.55), rgba(37, 56, 160, 0.55) 40%, rgba(8, 14, 48, 0.95) 72%); box-shadow: 0 0 120px rgba(59, 108, 246, 0.5), inset 0 0 50px rgba(147, 197, 253, 0.3); }
.auth__orbit { position: absolute; left: -22%; right: -22%; top: 38%; height: 24%; border-radius: 50%; border: 1px solid rgba(126, 156, 255, 0.55); transform: rotate(-16deg); box-shadow: 0 0 18px rgba(99, 132, 255, 0.4); }
.auth__orbit--2 { left: -12%; right: -12%; top: 30%; height: 40%; transform: rotate(24deg); border-color: rgba(167, 139, 250, 0.45); }
.auth__flag { position: absolute; width: 48px; height: 48px; padding: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0 20px rgba(99, 132, 255, 0.5); }
.auth__flag img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.auth__flag--1 { left: 18%; top: 18%; } .auth__flag--2 { right: 20%; top: 14%; } .auth__flag--3 { left: 14%; top: 50%; } .auth__flag--4 { right: 14%; top: 46%; }
.auth__art-text { position: relative; }
.auth__art-title { font: 700 clamp(1.5rem, 1.1rem + 1.2vw, 2rem) / 1.2 var(--font-display); max-width: 16em; }
.auth__points { display: grid; gap: 12px; margin-top: 20px; color: var(--muted); }
.auth__points li { display: flex; align-items: center; gap: 12px; }
.auth__points .icon { color: var(--cyan); }
.auth__panel { display: grid; align-content: center; justify-items: center; gap: 20px; padding: clamp(20px, 4vw, 48px); }
.auth__top { width: min(100%, 440px); display: flex; justify-content: space-between; align-items: center; }
.auth__lang { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.875rem; }
.auth__lang:hover { color: #fff; background: rgba(99, 132, 255, 0.08); }
.auth-card { width: min(100%, 440px); padding: clamp(24px, 4vw, 36px); }
.auth-card h1 { font-size: 1.75rem; }
.auth-card__lead { margin: 8px 0 22px; color: var(--muted); }
.auth-card .alert { margin-bottom: 18px; }
.auth-form .btn { margin-top: 24px; }
.auth-card__switch { margin-top: 20px; text-align: center; color: var(--muted); }
.auth-card__switch a { color: var(--blue-bright); font-weight: 600; }
.auth-card__legal { margin-top: 16px; text-align: center; }
.auth-card__legal a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(126, 156, 255, 0.4); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .mini-globe { animation: float-y 7s ease-in-out infinite; }
  .cube--mini { animation: mini-cube 14s linear infinite; }
  .stat, .offer-row, .chip, .sms-card { transition: transform 0.25s var(--ease-out), border-color 0.25s, background-color 0.25s; }
  .stat:hover { transform: translateY(-2px); border-color: var(--border-strong); }
  .auth__flag { animation: float-y 6s ease-in-out infinite; }
  .auth__flag--2 { animation-delay: -2s; } .auth__flag--3 { animation-delay: -4s; }
}
@keyframes mini-cube { to { transform: rotateX(-24deg) rotateY(398deg); } }

/* ---------- Tablet ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome { grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); }
  .welcome__art { display: none; }
  .dash-grid { grid-template-columns: 1fr; }
}

/* ---------- Phone and small tablet: the sidebar slides in ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: min(300px, 86vw); transform: translateX(-102%); transition: transform 0.3s var(--ease-out); box-shadow: 20px 0 60px rgba(2, 6, 23, 0.6); }
  .sidebar.is-open { transform: none; }
  .sidebar__close.icon-button { display: grid; }
  .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(2, 6, 23, 0.6); }
  .topbar__menu { display: grid; }
  .profile__who { display: none; }
  /* Without JavaScript the menu cannot slide in: the links then sit on top. */
  html:not(.js) .sidebar { position: static; transform: none; width: auto; height: auto; box-shadow: none; }
  html:not(.js) .topbar__menu { display: none; }
}
@media (max-width: 640px) {
  .topbar { gap: 10px; padding-inline: 16px; }
  .topbar__search { max-width: none; padding: 0 10px; }
  .topbar__right { gap: 8px; }
  .profile__summary { padding: 0; }
  .profile__summary > .icon { display: none; }
  .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat { padding: 16px; }
  .stat__value { font-size: 1.3rem; }
  .stat__icon { width: 34px; height: 34px; top: 14px; right: 14px; }
  .welcome { grid-template-columns: 1fr; }
  .offer-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .offer-row__buy { grid-column: 2 / -1; justify-self: end; }
  .cta-banner { grid-template-columns: 1fr; text-align: left; }
  .cta-banner__art { display: none; }
  .search-row { flex-direction: column; }
  .auth { grid-template-columns: 1fr; }
  .auth__art { display: none; }
}

/* ---------- Admin ---------- */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px; align-items: start; }
.attention { display: grid; gap: 8px; margin-top: 4px; }
.attention:empty { display: none; }
.attention__item { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--info-bg); border-left: 3px solid var(--info); }
.attention__item--warn { background: var(--warning-bg); border-left-color: var(--warning); }
.attention__item--bad { background: var(--danger-bg); border-left-color: var(--danger); }
.attention__item a { color: inherit; font-weight: 600; }
.kv { display: grid; gap: 0; }
.kv > div { display: grid; grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.4fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(110, 140, 255, 0.1); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: 0.9375rem; }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.kv__big { font: 700 1.5rem / 1.1 var(--font-text); }
.log-list { display: grid; gap: 10px; }
.log-list li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid rgba(110, 140, 255, 0.1); }
.log-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; padding: 16px; }
.filters .field { flex: 1 1 200px; margin: 0; }
.filters--flat { padding: 0 0 16px; background: none; border: 0; }
.filters--flat .chips { flex-basis: 100%; margin-bottom: 0; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue-bright); }
.admin-form { display: grid; gap: 14px; justify-items: start; }
.admin-form + .admin-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(110, 140, 255, 0.12); }
.admin-form .field { width: 100%; margin: 0; }
.admin-form--row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.rule-form { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); align-items: end; }
.rule-form .btn { justify-self: start; }
.input--area { min-height: 84px; padding: 12px 16px; resize: vertical; font: inherit; }
.input--short { max-width: 160px; }
.range-row { display: flex; align-items: center; gap: 10px; }
.btn--danger { background: var(--danger); color: #1a0710; box-shadow: none; }
.btn--danger:hover { background: #fda4af; }
.link-button--danger { color: var(--danger); }
.link-button--danger:hover { color: #fecdd3; }
@media (max-width: 600px) {
  .admin-form--row { grid-template-columns: minmax(0, 1fr); }
  .kv > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
/* Jumping to a section (#…-title) keeps its heading clear of the sticky top bar. */
.app__content h2[id] { scroll-margin-top: 96px; }

/* "Continue with Google": Google's light button (white, grey outline, standard G). */
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; padding: 0 18px;
  border-radius: 999px; border: 1px solid #747775; background: #fff; color: #1f1f1f;
  font-weight: 600; font-size: 1rem; text-decoration: none; transition: background-color 0.2s, box-shadow 0.2s;
}
.google-btn:hover { background: #f2f4f8; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.google-btn:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 3px; }
.google-btn__logo { flex: none; }
.auth-google-hint { margin-top: 10px; text-align: center; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0 6px; color: var(--faint); font-size: 0.875rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { text-transform: lowercase; }
/* Google profile pictures in the top bar. */
.avatar--photo { padding: 0; overflow: hidden; }
.avatar--photo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* Sign-in methods in the dashboard settings. */
.signin-methods { display: grid; gap: 14px; }
.signin-method { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(110, 140, 255, 0.1); }
.signin-method:last-child { border-bottom: 0; }
.signin-method__name { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
