/* ========== 全局变量 ========== */
:root {
  --bg-dark: #0a0c0f;
  --bg-card: rgba(20, 25, 30, 0.7);
  --bg-card-solid: #1a1e24;
  --primary: #00f5ff;
  --primary-glow: 0 0 15px rgba(0, 245, 255, 0.5);
  --text-title: #ffffff;
  --text-body: #cccccc;
  --text-muted: #888888;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-glow: 1px solid rgba(0, 245, 255, 0.2);
  --radius-card: 16px;
  --radius-btn: 12px;
  --shadow-card: 0 8px 20px rgba(0, 0, 0, 0.6);
  --font-main: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ========== 基础重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  font: inherit;
}

body,
.app {
  background: linear-gradient(135deg, #0a0c0f, #0f1215);
  color: var(--text-body);
  font: var(--font-main);
  min-height: 100vh;
  padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
}

.adaptive-container,
.adaptive-viewport {
  min-height: 100dvh;
}

/* ========== 布局容器 ========== */
.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: transparent;
}

.view {
  padding: 16px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

/* ========== 顶部栏 ========== */
.topbar {
  background: rgba(10, 12, 15, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 245, 255, 0.15);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-title);
  font-size: 18px;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar .title {
  color: var(--text-title);
}

.topbar .back-btn,
.topbar .right-btn {
  color: var(--primary);
  font-size: 24px;
  cursor: pointer;
}

/* ========== 底部导航栏 ========== */
.tabbar,
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 12, 15, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 245, 255, 0.2);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 1000;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.tabbar .tab,
.tabbar .tab-item,
.bottom-nav .nav-item {
  color: var(--text-muted);
  text-align: center;
  font-size: 12px;
  text-decoration: none;
  transition: color 0.2s;
  flex: 1;
  cursor: pointer;
}

.tabbar .tab.active,
.tabbar .tab-item.active,
.bottom-nav .nav-item.active {
  color: var(--primary);
}

.tabbar .tab-item i,
.tabbar .tab-item .icon,
.bottom-nav .nav-item i {
  display: block;
  font-size: 24px;
  margin-bottom: 4px;
}

.bottom-nav .nav-item span {
  display: block;
}

/* ========== 卡片 ========== */
.glass-card,
.card,
.order-card,
.profile-card,
.zone-card,
.product-card,
.dialog-content,
.item,
.list-item {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: var(--border-glow);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card), inset 0 0 20px rgba(0, 245, 255, 0.05);
  padding: 16px;
  transition: transform 0.2s, border-color 0.2s;
}

.glass-card:hover,
.order-card:active,
.product-card:active {
  border-color: var(--primary);
  box-shadow: var(--primary-glow);
}

.title {
  color: var(--text-title);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* 订单卡片特有样式 */
.order-card {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.order-card .product-image,
.order-image {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  object-fit: cover;
  background: #2a2e34;
}

.order-card .info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.order-card .title,
.order-title {
  font-weight: 600;
  color: var(--text-title);
}

.order-card .price,
.order-value,
.product-price,
.zone-rate,
.text-primary {
  color: var(--primary);
  font-weight: 600;
}

.order-card .status,
.order-label,
.text-muted,
.muted,
.section-note {
  font-size: 12px;
  color: var(--text-muted);
}

/* 产品卡片（网格） */
.product-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-card .product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  object-fit: cover;
  background: #2a2e34;
}

.product-card .product-name,
.zone-name,
.shop-title,
.account-name {
  font-weight: 600;
  color: var(--text-title);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 专区卡片（横向） */
.zone-card {
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ========== 按钮 ========== */
.btn-main,
.btn-primary,
.btn,
.btn-dark {
  background: linear-gradient(135deg, var(--primary), #7b2cff);
  border: none;
  border-radius: var(--radius-btn);
  color: white;
  font-weight: 600;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  display: inline-block;
  width: 100%;
}

.btn-main.is-loading,
.btn-primary.is-loading,
.btn.is-loading,
.btn-dark.is-loading,
.btn-secondary.is-loading {
  position: relative;
  opacity: 0.82;
  pointer-events: none;
}

.btn-main.is-loading::after,
.btn-primary.is-loading::after,
.btn.is-loading::after,
.btn-dark.is-loading::after,
.btn-secondary.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  display: inline-block;
  vertical-align: -2px;
  animation: spin 0.7s linear infinite;
}

.btn-main:active,
.btn-primary:active,
.btn:active,
.btn-dark:active {
  transform: scale(0.98);
  box-shadow: var(--primary-glow);
}

.btn-secondary,
.btn-light,
.sub-back-btn {
  background: transparent;
  border: var(--border-glow);
  border-radius: var(--radius-btn);
  color: var(--primary);
  padding: 12px 24px;
  cursor: pointer;
  text-align: center;
  display: inline-block;
  width: 100%;
}

.btn-small {
  padding: 8px 16px;
  font-size: 12px;
}

/* ========== 输入框 ========== */
.field,
.input-field {
  background: rgba(255, 255, 255, 0.05);
  border: var(--border-glow);
  border-radius: 12px;
  color: white;
  padding: 12px 16px;
  width: 100%;
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select.field,
select.input-field {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-title) 50%),
    linear-gradient(135deg, var(--text-title) 50%, transparent 50%);
  background-position:
    calc(100% - 24px) calc(50% - 3px),
    calc(100% - 16px) calc(50% - 3px);
  background-size: 8px 8px, 8px 8px;
  background-repeat: no-repeat;
  padding-right: 42px;
}

select.field option,
select.input-field option {
  color: #111827;
  background: #ffffff;
}

.field:focus,
.input-field:focus {
  border-color: var(--primary);
  box-shadow: var(--primary-glow);
}

.field::placeholder,
.input-field::placeholder {
  color: var(--text-muted);
}

/* ========== 登录页 ========== */
.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100dvh;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(28px + env(safe-area-inset-bottom, 0px));
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 46, 99, 0.34), transparent 22%),
    radial-gradient(circle at 88% 18%, rgba(0, 245, 255, 0.26), transparent 20%),
    linear-gradient(180deg, #121a2d 0%, #16172b 34%, #141c26 100%);
}

.login-screen::before,
.login-screen::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.78;
  z-index: -1;
}

.login-screen::before {
  width: 180px;
  height: 180px;
  top: -72px;
  right: -34px;
  background: radial-gradient(circle, rgba(0, 245, 255, 0.34), transparent 68%);
}

.login-screen::after {
  width: 170px;
  height: 170px;
  top: 92px;
  left: -72px;
  background: radial-gradient(circle, rgba(255, 46, 99, 0.3), transparent 70%);
}

.login-shell {
  width: 100%;
  max-width: 390px;
  display: grid;
  gap: 12px;
  position: relative;
}

.login-topbar,
.login-links,
.topbar-row,
.topbar-actions,
.topbar-meta,
.row,
.order-head,
.order-actions,
.subpage-header,
.tabs-filter {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-topbar,
.topbar-row,
.topbar-actions,
.row,
.order-head,
.subpage-header {
  justify-content: space-between;
}

.login-topbar {
  margin-bottom: 6px;
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 10px 12px;
  border-radius: 24px;
  justify-content: flex-end;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.56), rgba(243, 248, 255, 0.28)),
    linear-gradient(90deg, rgba(255, 46, 99, 0.06), rgba(0, 245, 255, 0.06) 58%, rgba(123, 44, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow:
    0 12px 34px rgba(6, 10, 20, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 0 0 1px rgba(0, 245, 255, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.login-topbar .settings-shortcut,
.login-topbar #loginMenuBtn {
  display: none !important;
}

.login-topbar .lang-chip,
.login-topbar #langOpenBtn {
  position: relative;
  min-width: 124px;
  height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background:
    linear-gradient(135deg, rgba(255, 87, 136, 0.52), rgba(0, 230, 255, 0.52) 58%, rgba(123, 84, 255, 0.56)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
  box-shadow:
    0 14px 28px rgba(16, 22, 40, 0.18),
    0 0 22px rgba(0, 245, 255, 0.12),
    0 0 16px rgba(255, 46, 99, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.login-topbar .lang-chip::before,
.login-topbar #langOpenBtn::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.96) 62%, rgba(232, 246, 255, 0.94)),
    radial-gradient(circle at 18% 18%, rgba(255, 46, 99, 0.08), transparent 28%);
  z-index: 0;
}

.login-topbar .lang-chip::after,
.login-topbar #langOpenBtn::after {
  content: "LANG";
  position: relative;
  z-index: 1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #243348;
}

.login-topbar .lang-chip-label,
.login-topbar .lang-chip-caret,
.login-topbar #langOpenBtn .topbar-icon {
  position: relative;
  z-index: 1;
}

.login-topbar .lang-chip-label {
  color: #1a2f49;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-shadow:
    -1px 0 rgba(255, 46, 99, 0.18),
    1px 0 rgba(0, 245, 255, 0.18);
}

.login-topbar .lang-chip-caret {
  color: #2b78c7;
  text-shadow: none;
}

.login-topbar #langOpenBtn .topbar-icon {
  width: 19px;
  height: 19px;
  filter:
    drop-shadow(-1px 0 0 rgba(255, 46, 99, 0.22))
    drop-shadow(1px 0 0 rgba(0, 245, 255, 0.22));
}

.login-topbar .lang-chip:hover,
.login-topbar .lang-chip:focus-visible,
.login-topbar #langOpenBtn:hover,
.login-topbar #langOpenBtn:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 16px 30px rgba(16, 22, 40, 0.22),
    0 0 24px rgba(0, 245, 255, 0.16),
    0 0 18px rgba(255, 46, 99, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.topbar-actions {
  position: relative;
}

.login-banner {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

.login-banner-image {
  display: block;
  width: 100%;
  height: clamp(156px, 24vh, 188px);
  object-fit: cover;
  object-position: center 42%;
}

.login-panel {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: var(--border-glow);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card), inset 0 0 20px rgba(0, 245, 255, 0.05);
  padding: clamp(22px, 4vw, 28px);
}

.login-panel-brand {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-screen h2,
.login-panel h1 {
  text-align: center;
  margin-bottom: 10px;
  color: var(--text-title);
}

.login-panel p {
  text-align: center;
  margin-bottom: 18px;
  color: var(--text-muted);
}

.login-field {
  margin-bottom: 14px;
}

.login-links {
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 15px;
}

.link-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--primary);
  cursor: pointer;
  line-height: 1.25;
}

.link-btn:hover,
.link-btn:focus-visible {
  color: #7dfaff;
  text-decoration: underline;
}

.login-links-sep,
.login-divider {
  color: var(--text-muted);
}

.login-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 2px 0 14px;
  font-size: 13px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  width: 72px;
  max-width: 28%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* ========== 弹窗 ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content,
.dialog-content {
  background: var(--bg-card-solid);
  border: var(--border-glow);
  border-radius: 20px;
  box-shadow: var(--shadow-card), inset 0 0 30px rgba(0, 245, 255, 0.1);
  padding: 24px;
  max-width: 420px;
  width: min(92vw, 420px);
}

.modal-content .title,
.dialog-content .title {
  color: var(--text-title);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.modal-content .message {
  color: var(--text-body);
  margin-bottom: 20px;
}

.dialog-content h3 {
  color: var(--text-title);
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.dialog-form {
  display: grid;
  gap: 12px;
}

.field-group {
  display: grid;
  gap: 6px;
}

.field-label {
  color: var(--text-body);
  font-size: 13px;
  font-weight: 600;
}

.field-note {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
  margin-bottom: 2px;
}

.dialog-content .field {
  margin-bottom: 0;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-actions .btn {
  flex: 1;
}

.dialog {
  border: 0;
  background: transparent;
  color: inherit;
  width: min(92vw, 420px);
  margin: auto;
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* ========== 提示条 ========== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 245, 255, 0.9);
  color: #000;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  box-shadow: var(--primary-glow);
  z-index: 3000;
  animation: fadeInOut 3s ease forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translate(-50%, 20px); }
  10% { opacity: 1; transform: translate(-50%, 0); }
  90% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* ========== 工具类 ========== */
.text-title { color: var(--text-title); font-size: 18px; font-weight: 600; }
.text-body { color: var(--text-body); font-size: 14px; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.p-4 { padding: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.grid-2,
.profile-grid,
.shop-grid,
.zone-grid,
.sub-grid,
.order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -52px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 245, 255, 0.24), rgba(123, 44, 255, 0.02) 70%);
  pointer-events: none;
}

.page-kicker {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title {
  color: var(--text-title);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 8px;
}

.page-subtitle {
  color: var(--text-body);
  margin-top: 10px;
}

.hero-actions,
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.metric-chip {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.metric-chip strong {
  display: block;
  color: var(--text-title);
  font-size: 18px;
  margin-top: 6px;
}

.section-stack > * + * {
  margin-top: 16px;
}

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

.section-header .section-title {
  color: var(--text-title);
  font-size: 18px;
  font-weight: 600;
}

.surface-note {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.18);
  color: var(--text-body);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-body);
  font-size: 12px;
}

.empty-state {
  padding: 22px 16px;
  text-align: center;
  color: var(--text-muted);
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  cursor: pointer;
}

.amount-btn.active {
  border-color: rgba(0, 245, 255, 0.45);
  box-shadow: var(--primary-glow);
  color: #fff;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

/* ========== 兼容旧类名 ========== */
.container,
.content {
  padding: 16px;
}

.list {
  display: grid;
  gap: 12px;
}

.subpage {
  display: grid;
  gap: 16px;
}

.sub-headings {
  display: grid;
  gap: 6px;
}

.sub-link {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 12px;
  border: var(--border-glow);
  text-align: left;
}

.sub-link.danger {
  border-color: rgba(255, 80, 80, 0.25);
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: var(--border-glow);
  border-radius: 999px;
  color: var(--text-body);
  padding: 8px 14px;
  cursor: pointer;
}

.chip.active {
  color: var(--primary);
}

.hidden {
  display: none !important;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: var(--border-glow);
  cursor: pointer;
}

.utility-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-body);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s;
}

.utility-btn:hover,
.utility-btn:focus-visible {
  border-color: rgba(0, 245, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.utility-btn:active {
  transform: scale(0.98);
}

.settings-shortcut {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  opacity: 0.88;
}

.control-icon {
  font-size: 14px;
  line-height: 1;
}

.control-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lang-chip {
  min-width: 74px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(13, 19, 28, 0.82);
  border-color: rgba(0, 245, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(0, 245, 255, 0.06);
}

.lang-chip-label {
  color: var(--text-title);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lang-chip-caret {
  color: var(--primary);
  font-size: 11px;
  transition: transform 0.2s ease;
}

.lang-chip[aria-expanded="true"] .lang-chip-caret {
  transform: rotate(180deg);
}

.topbar-icon {
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--bg-card-solid);
  border: var(--border-glow);
  border-radius: 14px;
  padding: 8px;
  z-index: 1001;
  width: min(168px, calc(100vw - 28px));
  box-shadow: var(--shadow-card), inset 0 0 18px rgba(0, 245, 255, 0.08);
}

.login-shell > .lang-menu {
  top: 60px;
  right: 0;
  z-index: 12;
}

.login-topbar .lang-menu {
  top: calc(100% + 10px);
  border-color: rgba(0, 245, 255, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.94));
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.22),
    0 0 18px rgba(0, 245, 255, 0.06);
}

.login-shell > .lang-menu .lang-item,
.login-topbar .lang-menu .lang-item {
  color: #233243;
}

.login-shell > .lang-menu .lang-item.active,
.login-shell > .lang-menu .lang-item:hover,
.login-topbar .lang-menu .lang-item.active,
.login-topbar .lang-menu .lang-item:hover {
  color: #111827;
  background: linear-gradient(135deg, rgba(255, 46, 99, 0.1), rgba(0, 245, 255, 0.14));
}

.lang-item {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  color: var(--text-body);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.lang-item.active,
.lang-item:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

.time-box {
  background: rgba(255, 255, 255, 0.04);
  border: var(--border-glow);
  border-radius: 12px;
  padding: 8px 12px;
}

.time-label,
.time-sync {
  color: var(--text-muted);
  font-size: 12px;
}

.time-value {
  color: var(--text-title);
  font-weight: 600;
}

.winner-list,
.winner-track,
.winner-row {
  display: grid;
  gap: 10px;
}

.winner-row {
  grid-template-columns: 1fr auto auto;
  align-items: center;
}

.winner-left,
.winner-mid,
.winner-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.winner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-title);
}

a {
  color: var(--primary);
  text-decoration: none;
}

hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 12px 0;
}

@media (max-width: 480px) {
  .grid-2,
  .profile-grid,
  .shop-grid,
  .zone-grid,
  .sub-grid,
  .order-grid {
    grid-template-columns: 1fr;
  }

  .login-screen {
    padding-inline: 14px;
  }

  .login-panel,
  .dialog-content {
    padding: 20px;
  }

  .login-banner-image {
    height: clamp(140px, 22vh, 170px);
  }

  .settings-shortcut {
    padding-inline: 10px;
  }

  .lang-chip {
    min-width: 68px;
    padding-inline: 11px;
  }

  .login-topbar .lang-chip {
    min-width: 102px;
    height: 40px;
    padding-inline: 12px;
  }
}

/* ========== Final Login Refresh ========== */
.login-screen {
  justify-content: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 18px calc(30px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 10% 14%, rgba(255, 77, 125, 0.24), transparent 25%),
    radial-gradient(circle at 88% 18%, rgba(55, 228, 255, 0.22), transparent 24%),
    radial-gradient(circle at 50% 72%, rgba(139, 92, 246, 0.08), transparent 28%),
    linear-gradient(180deg, #fff8fb 0%, #f9fbff 48%, #edf5ff 100%);
}

.login-screen::before {
  width: 240px;
  height: 240px;
  top: -102px;
  right: -58px;
  background: radial-gradient(circle, rgba(76, 230, 255, 0.3), transparent 68%);
}

.login-screen::after {
  width: 260px;
  height: 260px;
  left: -124px;
  bottom: 4%;
  top: auto;
  background: radial-gradient(circle, rgba(255, 89, 132, 0.24), transparent 70%);
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  display: grid;
  gap: 18px;
  position: relative;
}

.lang-switch {
  margin-inline-start: auto;
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(248, 251, 255, 0.74)),
    linear-gradient(135deg, rgba(255, 97, 145, 0.08), rgba(45, 212, 255, 0.1));
  border: 1px solid rgba(176, 192, 216, 0.3);
  box-shadow:
    0 18px 38px rgba(44, 79, 126, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.lang-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: #5a6881;
  padding: 10px 14px;
  min-width: 84px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, filter 0.18s ease;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  color: #172033;
  background: rgba(255, 255, 255, 0.84);
  box-shadow:
    0 10px 18px rgba(73, 101, 140, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.lang-btn.active {
  color: #162033;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.98)),
    linear-gradient(135deg, rgba(255, 72, 129, 0.16), rgba(62, 229, 255, 0.2));
  box-shadow:
    0 12px 28px rgba(58, 93, 141, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.92),
    inset 0 0 0 1px rgba(78, 210, 255, 0.18),
    0 0 20px rgba(71, 208, 255, 0.08);
  filter: saturate(1.08);
}

.login-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 32px 24px 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(252, 253, 255, 0.9)),
    linear-gradient(135deg, rgba(255, 85, 137, 0.04), rgba(61, 225, 255, 0.05));
  border: 1px solid rgba(180, 194, 215, 0.34);
  border-radius: 30px;
  box-shadow:
    0 28px 64px rgba(53, 85, 131, 0.16),
    0 10px 24px rgba(99, 126, 168, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.login-card::before,
.login-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.login-card::before {
  width: 160px;
  height: 160px;
  top: -56px;
  right: -40px;
  background: radial-gradient(circle, rgba(57, 222, 255, 0.16), transparent 70%);
}

.login-card::after {
  width: 150px;
  height: 150px;
  left: -52px;
  bottom: -68px;
  background: radial-gradient(circle, rgba(255, 92, 145, 0.12), transparent 72%);
}

.logo {
  text-align: center;
  margin-bottom: 26px;
  position: relative;
  z-index: 1;
}

.logo-badge {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: linear-gradient(135deg, #18d7f4 0%, #4d90ff 52%, #7a31ff 100%);
  box-shadow:
    0 16px 36px rgba(72, 107, 182, 0.24),
    0 0 0 4px rgba(255, 255, 255, 0.66);
}

.logo h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #172033;
  text-shadow: 0 8px 24px rgba(92, 112, 152, 0.08);
}

.logo p {
  margin: 10px 0 0;
  font-size: 14px;
  color: #6c7a94;
  font-weight: 600;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.input-group {
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.login-card .field,
.login-card .input-field,
.login-card .login-field {
  width: 100%;
  min-height: 54px;
  background:
    linear-gradient(180deg, rgba(249, 251, 255, 0.98), rgba(243, 247, 255, 0.98)),
    linear-gradient(135deg, rgba(255, 82, 139, 0.03), rgba(56, 221, 255, 0.04));
  border: 1px solid rgba(176, 190, 212, 0.48);
  border-radius: 16px;
  padding: 14px 16px;
  color: #111827;
  font-size: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 20px rgba(119, 142, 180, 0.05);
}

.login-card .field::placeholder,
.login-card .input-field::placeholder,
.login-card .login-field::placeholder {
  color: #91a0b7;
}

.login-card .field:focus,
.login-card .input-field:focus,
.login-card .login-field:focus {
  border-color: rgba(66, 208, 255, 0.82);
  box-shadow:
    0 0 0 4px rgba(64, 198, 255, 0.14),
    0 16px 28px rgba(72, 142, 196, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.login-btn {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  z-index: 1;
  background:
    linear-gradient(135deg, #18d7f4 0%, #5391ff 48%, #7a31ff 100%);
  box-shadow:
    0 18px 36px rgba(84, 111, 208, 0.28),
    0 0 28px rgba(95, 143, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.login-btn:hover,
.login-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 22px 44px rgba(84, 111, 208, 0.34),
    0 0 34px rgba(96, 143, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.login-btn:active {
  transform: scale(0.985);
}

.extra-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

.extra-link {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  color: #0b88d2;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.18s ease, text-shadow 0.18s ease;
}

.extra-link:hover,
.extra-link:focus-visible {
  color: #5a32ff;
  transform: translateY(-1px);
  text-shadow: 0 4px 14px rgba(104, 79, 255, 0.12);
}

.login-links,
.login-divider,
.login-topbar,
.login-banner,
.login-panel,
.login-shell > .lang-menu,
.login-topbar .lang-menu {
  display: none !important;
}

body.lang-ar .login-card {
  direction: rtl;
  text-align: right;
}

body.lang-ar .logo {
  text-align: right;
}

body.lang-ar .logo-badge {
  margin-inline: 0 auto;
}

body.lang-ar .extra-links {
  flex-direction: row-reverse;
}

body.lang-ar .login-card .field,
body.lang-ar .login-card .input-field,
body.lang-ar .login-card .login-field {
  text-align: right;
}

@media (max-width: 480px) {
  .login-screen {
    padding-inline: 14px;
  }

  .login-wrapper {
    gap: 14px;
  }

  .lang-switch {
    width: 100%;
    justify-content: center;
  }

  .lang-btn {
    min-width: 72px;
    padding-inline: 12px;
  }

  .login-card {
    padding: 28px 18px 22px;
    border-radius: 24px;
  }

  .logo h1 {
    font-size: 26px;
  }

  .extra-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ========== Brand Login Polish ========== */
.login-screen {
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 96, 144, 0.22), transparent 24%),
    radial-gradient(circle at 86% 10%, rgba(47, 214, 255, 0.2), transparent 24%),
    radial-gradient(circle at 50% 100%, rgba(114, 79, 255, 0.12), transparent 30%),
    linear-gradient(180deg, #fff8fc 0%, #f8fbff 42%, #edf4ff 100%);
}

.login-screen::before {
  width: 320px;
  height: 320px;
  top: -150px;
  left: -110px;
  background: radial-gradient(circle, rgba(255, 113, 156, 0.22), transparent 72%);
  filter: blur(6px);
}

.login-screen::after {
  width: 320px;
  height: 320px;
  right: -120px;
  bottom: -160px;
  background: radial-gradient(circle, rgba(59, 214, 255, 0.18), transparent 72%);
  filter: blur(8px);
}

.login-wrapper {
  max-width: 430px;
  gap: 22px;
}

.lang-switch {
  width: min(100%, 390px);
  margin-inline: auto;
  justify-content: space-between;
  gap: 6px;
  padding: 8px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(247, 251, 255, 0.86)),
    linear-gradient(120deg, rgba(255, 92, 145, 0.08), rgba(54, 216, 255, 0.1));
  border: 1px solid rgba(192, 206, 227, 0.56);
  box-shadow:
    0 22px 44px rgba(98, 122, 165, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    inset 0 -1px 0 rgba(177, 199, 226, 0.28);
}

.lang-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 14px;
  color: #61708a;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  color: #182033;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 12px 24px rgba(96, 122, 158, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.lang-btn.active {
  color: #111827;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.96));
  box-shadow:
    0 18px 34px rgba(94, 122, 164, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.94),
    inset 0 0 0 1px rgba(111, 202, 255, 0.22);
}

.login-card {
  padding: 38px 24px 26px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.94)),
    linear-gradient(135deg, rgba(255, 89, 142, 0.04), rgba(60, 221, 255, 0.06));
  border: 1px solid rgba(191, 204, 226, 0.5);
  box-shadow:
    0 30px 64px rgba(76, 101, 145, 0.16),
    0 10px 24px rgba(112, 135, 176, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.login-card::before {
  width: auto;
  height: 6px;
  inset: 0 24px auto;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 87, 141, 0.88), rgba(121, 83, 255, 0.82), rgba(36, 214, 255, 0.88));
}

.login-card::after {
  width: 180px;
  height: 180px;
  left: -70px;
  bottom: -84px;
  background: radial-gradient(circle, rgba(255, 100, 149, 0.1), transparent 72%);
}

.logo {
  margin-bottom: 28px;
}

.logo-badge {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background: linear-gradient(135deg, #18d7f5 0%, #4c92ff 52%, #7440ff 100%);
  box-shadow:
    0 22px 42px rgba(90, 118, 214, 0.26),
    0 0 30px rgba(43, 214, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.logo h1 {
  color: #151d30;
  font-size: clamp(32px, 8.4vw, 52px);
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.logo p {
  color: #70809b;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.input-group {
  margin-bottom: 16px;
}

.login-card .field,
.login-card .input-field,
.login-card .login-field {
  min-height: 58px;
  padding: 16px 18px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(249, 251, 255, 0.98), rgba(244, 248, 255, 0.98));
  border: 1px solid rgba(182, 196, 220, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 24px rgba(123, 145, 184, 0.06);
}

.login-card .field::placeholder,
.login-card .input-field::placeholder,
.login-card .login-field::placeholder {
  color: #92a0b5;
}

.login-card .field:focus,
.login-card .input-field:focus,
.login-card .login-field:focus {
  border-color: rgba(59, 203, 255, 0.9);
  box-shadow:
    0 0 0 4px rgba(76, 202, 255, 0.14),
    0 18px 30px rgba(87, 142, 201, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.login-btn {
  min-height: 58px;
  margin-top: 8px;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #1dd8f5 0%, #4293ff 50%, #713cff 100%);
  box-shadow:
    0 22px 44px rgba(89, 117, 214, 0.28),
    0 0 34px rgba(104, 152, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.login-btn:hover,
.login-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 28px 52px rgba(90, 118, 214, 0.32),
    0 0 38px rgba(93, 150, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.extra-links {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(209, 219, 236, 0.8);
}

.extra-link {
  color: #1293dd;
  font-size: 14px;
}

.extra-link:hover,
.extra-link:focus-visible {
  color: #5c3cff;
  text-shadow: 0 6px 18px rgba(94, 60, 255, 0.16);
}

@media (max-width: 480px) {
  .login-wrapper {
    max-width: none;
    gap: 16px;
  }

  .lang-switch {
    width: 100%;
  }

  .lang-btn {
    padding-inline: 10px;
    font-size: 13px;
  }

  .login-card {
    padding: 34px 20px 24px;
    border-radius: 28px;
  }

  .logo-badge {
    width: 76px;
    height: 76px;
    border-radius: 22px;
  }

  .logo h1 {
    font-size: 28px;
  }

  .logo p {
    font-size: 15px;
  }

  .extra-links {
    gap: 14px;
  }
}

/* ========== Mobile Login Final Fit ========== */
.login-screen {
  justify-content: flex-start;
  padding:
    calc(16px + env(safe-area-inset-top, 0px))
    14px
    calc(18px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 82, 137, 0.16), transparent 26%),
    radial-gradient(circle at 88% 14%, rgba(43, 216, 255, 0.16), transparent 24%),
    radial-gradient(circle at 52% 100%, rgba(117, 83, 255, 0.14), transparent 34%),
    linear-gradient(180deg, #f5f0ff 0%, #eef7ff 48%, #eef5ff 100%);
}

.login-wrapper {
  max-width: 360px;
  margin: 0 auto;
  gap: 14px;
}

.lang-switch {
  width: min(100%, 328px);
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(246, 249, 255, 0.58)),
    linear-gradient(135deg, rgba(255, 103, 154, 0.08), rgba(48, 215, 255, 0.09));
  border: 1px solid rgba(196, 207, 230, 0.48);
  box-shadow:
    0 14px 30px rgba(104, 123, 164, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.lang-btn {
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #60708b;
}

.lang-btn.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 255, 0.82));
  color: #121b2c;
  box-shadow:
    0 10px 22px rgba(106, 128, 173, 0.16),
    inset 0 0 0 1px rgba(91, 198, 255, 0.18);
}

.login-card {
  padding: 28px 18px 20px;
  border-radius: 28px;
  background:
    linear-gradient(165deg, rgba(251, 246, 255, 0.82), rgba(238, 246, 255, 0.78)),
    linear-gradient(135deg, rgba(255, 88, 143, 0.06), rgba(53, 220, 255, 0.06));
  border: 1px solid rgba(182, 197, 224, 0.42);
  box-shadow:
    0 22px 48px rgba(96, 118, 160, 0.14),
    0 8px 18px rgba(126, 145, 181, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.login-card::before {
  inset: 0 18px auto;
  height: 5px;
  background: linear-gradient(90deg, rgba(255, 91, 145, 0.86), rgba(111, 78, 255, 0.78), rgba(35, 211, 255, 0.86));
}

.login-card::after {
  width: 140px;
  height: 140px;
  right: -56px;
  top: -50px;
  left: auto;
  bottom: auto;
  background: radial-gradient(circle, rgba(53, 219, 255, 0.11), transparent 72%);
}

.logo {
  margin-bottom: 18px;
}

.logo-badge {
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  border-radius: 20px;
  font-size: 17px;
  box-shadow:
    0 16px 30px rgba(90, 118, 214, 0.2),
    0 0 18px rgba(43, 214, 255, 0.1);
}

.logo h1 {
  font-size: clamp(22px, 8vw, 34px);
  letter-spacing: -0.045em;
  margin-bottom: 6px;
}

.logo p {
  font-size: 12px;
  font-weight: 700;
  color: #74829a;
}

.input-group {
  margin-bottom: 12px;
}

.login-card .field,
.login-card .input-field,
.login-card .login-field {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 15px;
  font-size: 14px;
  background:
    linear-gradient(180deg, rgba(251, 252, 255, 0.88), rgba(245, 248, 255, 0.8));
  border: 1px solid rgba(186, 198, 220, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 18px rgba(126, 145, 181, 0.05);
}

.login-btn {
  min-height: 50px;
  margin-top: 6px;
  border-radius: 16px;
  font-size: 16px;
  box-shadow:
    0 16px 32px rgba(89, 117, 214, 0.22),
    0 0 24px rgba(104, 152, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.extra-links {
  margin-top: 16px;
  padding-top: 14px;
  gap: 10px;
}

.extra-link {
  font-size: 13px;
}

@media (max-width: 480px) {
  .login-screen {
    padding-inline: 12px;
  }

  .login-wrapper {
    max-width: 100%;
  }

  .lang-switch {
    width: 100%;
  }

  .lang-btn {
    min-width: 0;
    padding-inline: 6px;
  }

  .extra-links {
    justify-content: space-between;
    flex-wrap: nowrap;
  }
}

/* ========== Premium Light Glass Variant ========== */
.login-screen {
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 116, 166, 0.18), transparent 24%),
    radial-gradient(circle at 88% 10%, rgba(66, 215, 255, 0.14), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(124, 92, 255, 0.14), transparent 34%),
    linear-gradient(180deg, #f3efff 0%, #edf5ff 52%, #eaf2ff 100%);
}

.login-screen::before {
  width: 280px;
  height: 280px;
  top: -126px;
  left: -110px;
  background: radial-gradient(circle, rgba(255, 132, 176, 0.18), transparent 72%);
  filter: blur(10px);
}

.login-screen::after {
  width: 280px;
  height: 280px;
  right: -126px;
  bottom: -136px;
  background: radial-gradient(circle, rgba(82, 214, 255, 0.16), transparent 72%);
  filter: blur(10px);
}

.login-wrapper {
  max-width: 352px;
  gap: 12px;
}

.lang-switch {
  width: min(100%, 312px);
  gap: 5px;
  padding: 6px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.48), rgba(247, 250, 255, 0.34)),
    linear-gradient(135deg, rgba(255, 97, 150, 0.08), rgba(61, 216, 255, 0.08));
  border: 1px solid rgba(198, 205, 231, 0.38);
  box-shadow:
    0 16px 32px rgba(101, 118, 166, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.lang-btn {
  padding: 10px 8px;
  color: #66738d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.lang-btn:hover,
.lang-btn:focus-visible {
  color: #182033;
  background: rgba(255, 255, 255, 0.36);
  box-shadow:
    0 8px 18px rgba(107, 124, 170, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.lang-btn.active {
  color: #121a2b;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(248, 250, 255, 0.62));
  box-shadow:
    0 10px 22px rgba(103, 124, 171, 0.12),
    inset 0 0 0 1px rgba(123, 201, 255, 0.12);
}

.login-card {
  padding: 26px 18px 18px;
  border-radius: 30px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.38), rgba(245, 248, 255, 0.26)),
    linear-gradient(135deg, rgba(255, 108, 160, 0.08), rgba(64, 218, 255, 0.08));
  border: 1px solid rgba(194, 203, 229, 0.34);
  box-shadow:
    0 20px 44px rgba(97, 116, 161, 0.12),
    0 8px 18px rgba(120, 136, 177, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.login-card::before {
  inset: 0 16px auto;
  height: 4px;
  background: linear-gradient(90deg, rgba(255, 99, 151, 0.72), rgba(112, 84, 255, 0.68), rgba(63, 217, 255, 0.72));
}

.login-card::after {
  width: 126px;
  height: 126px;
  top: auto;
  right: -48px;
  bottom: -58px;
  background: radial-gradient(circle, rgba(107, 84, 255, 0.1), transparent 72%);
}

.logo {
  margin-bottom: 16px;
}

.logo-badge {
  width: 58px;
  height: 58px;
  margin-bottom: 10px;
  border-radius: 18px;
  font-size: 16px;
  box-shadow:
    0 14px 28px rgba(94, 118, 214, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.logo h1 {
  color: #172033;
  font-size: clamp(21px, 7.4vw, 30px);
  letter-spacing: -0.05em;
  margin-bottom: 4px;
  text-shadow: 0 6px 18px rgba(108, 125, 170, 0.08);
}

.logo p {
  color: #75839a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.input-group {
  margin-bottom: 10px;
}

.login-card .field,
.login-card .input-field,
.login-card .login-field {
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 15px;
  font-size: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(247, 250, 255, 0.4));
  border: 1px solid rgba(191, 200, 223, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 6px 16px rgba(121, 139, 178, 0.05);
}

.login-card .field::placeholder,
.login-card .input-field::placeholder,
.login-card .login-field::placeholder {
  color: #93a0b5;
}

.login-card .field:focus,
.login-card .input-field:focus,
.login-card .login-field:focus {
  border-color: rgba(86, 195, 255, 0.72);
  box-shadow:
    0 0 0 4px rgba(72, 196, 255, 0.1),
    0 12px 24px rgba(97, 143, 202, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.login-btn {
  min-height: 48px;
  margin-top: 4px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, #23d2ee 0%, #4b93ff 54%, #7146ff 100%);
  box-shadow:
    0 14px 28px rgba(91, 117, 213, 0.22),
    0 0 20px rgba(96, 145, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.login-btn:hover,
.login-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 18px 34px rgba(91, 117, 213, 0.24),
    0 0 24px rgba(96, 145, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.extra-links {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(205, 214, 234, 0.44);
}

.extra-link {
  color: #1986d9;
  font-size: 12px;
  font-weight: 700;
}

.extra-link:hover,
.extra-link:focus-visible {
  color: #5b43ff;
  text-shadow: 0 4px 12px rgba(91, 67, 255, 0.12);
}

@media (max-width: 480px) {
  .login-screen {
    padding:
      calc(14px + env(safe-area-inset-top, 0px))
      12px
      calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .login-wrapper {
    max-width: 340px;
    gap: 10px;
  }

  .lang-switch {
    width: 100%;
  }

  .lang-btn {
    padding-inline: 4px;
    font-size: 12px;
  }

  .login-card {
    padding: 24px 16px 18px;
    border-radius: 26px;
  }

  .logo-badge {
    width: 54px;
    height: 54px;
    border-radius: 17px;
  }

  .logo h1 {
    font-size: 20px;
  }

  .logo p {
    font-size: 11px;
  }

  .extra-links {
    gap: 8px;
  }
}

/* ========== Login No-Scroll Fit ========== */
.login-screen {
  position: fixed;
  inset: 0;
  min-height: 100svh;
  height: 100svh;
  overflow: hidden;
  padding:
    calc(10px + env(safe-area-inset-top, 0px))
    12px
    calc(10px + env(safe-area-inset-bottom, 0px));
}

.login-wrapper {
  width: min(100%, 344px);
  min-height: 100%;
  gap: 10px;
  justify-content: center;
  align-content: center;
}

.lang-switch {
  width: min(100%, 300px);
  margin-top: 0;
  margin-bottom: 0;
}

.lang-btn {
  min-height: 38px;
  padding: 8px 6px;
  font-size: 12px;
}

.login-card {
  padding: 22px 16px 16px;
  border-radius: 24px;
}

.login-card::before {
  inset: 0 14px auto;
  height: 4px;
}

.login-card::after {
  width: 116px;
  height: 116px;
  right: -42px;
  bottom: -44px;
}

.logo {
  margin-bottom: 14px;
}

.logo-badge {
  width: 50px;
  height: 50px;
  margin-bottom: 8px;
  border-radius: 16px;
  font-size: 15px;
}

.logo h1 {
  font-size: clamp(20px, 7.2vw, 28px);
  margin-bottom: 3px;
}

.logo p {
  font-size: 11px;
}

.input-group {
  margin-bottom: 9px;
}

.login-card .field,
.login-card .input-field,
.login-card .login-field {
  min-height: 42px;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13px;
}

.login-btn {
  min-height: 44px;
  margin-top: 2px;
  border-radius: 14px;
  font-size: 15px;
}

.extra-links {
  margin-top: 12px;
  padding-top: 10px;
}

.extra-link {
  font-size: 12px;
}

@media (max-width: 480px) {
  .login-wrapper {
    width: 100%;
    max-width: 344px;
  }

  .lang-switch {
    width: 100%;
  }
}

/* ========== Login Secondary Dialog Fit ========== */
.dialog {
  width: min(92vw, 352px);
  max-width: 352px;
  padding: 0;
}

.dialog::backdrop {
  background: rgba(29, 38, 61, 0.24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dialog-content {
  width: min(92vw, 352px);
  max-width: 352px;
  padding: 18px 16px 14px;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.44), rgba(245, 248, 255, 0.28)),
    linear-gradient(135deg, rgba(255, 107, 159, 0.08), rgba(70, 217, 255, 0.08));
  border: 1px solid rgba(193, 202, 227, 0.34);
  box-shadow:
    0 24px 48px rgba(86, 108, 152, 0.16),
    0 10px 24px rgba(120, 135, 173, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.dialog-content h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.2;
  color: #162033;
}

.dialog-form {
  gap: 10px;
}

.field-note {
  font-size: 12px;
  line-height: 1.45;
  color: #73839c;
}

.field-group {
  gap: 5px;
}

.field-label {
  font-size: 12px;
  color: #5f708a;
}

.dialog-content .field {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(247, 250, 255, 0.4));
  border: 1px solid rgba(191, 200, 223, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 6px 16px rgba(121, 139, 178, 0.05);
}

.dialog-content .field:focus {
  border-color: rgba(80, 192, 255, 0.72);
  box-shadow:
    0 0 0 4px rgba(75, 195, 255, 0.1),
    0 10px 20px rgba(93, 141, 201, 0.08);
}

.dialog-content .btn-main,
.dialog-content .btn-secondary,
.dialog-content .btn-light {
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
}

.dialog .row {
  gap: 8px;
  margin-top: 8px !important;
}

@media (max-width: 480px) {
  .dialog {
    width: min(92vw, 344px);
    max-width: 344px;
  }

  .dialog-content {
    width: min(92vw, 344px);
    max-width: 344px;
    padding: 16px 14px 12px;
    border-radius: 22px;
  }

  .dialog-content h3 {
    font-size: 17px;
    margin-bottom: 8px;
  }

  .dialog-form {
    gap: 8px;
  }

  .field-note,
  .field-label {
    font-size: 11px;
  }

  .dialog-content .field {
    min-height: 40px;
    padding: 9px 11px;
    font-size: 12px;
    border-radius: 13px;
  }

  .dialog-content .btn-main,
  .dialog-content .btn-secondary,
  .dialog-content .btn-light {
    min-height: 40px;
    font-size: 12px;
    border-radius: 13px;
  }

  .dialog .row {
    gap: 6px;
    margin-top: 6px !important;
  }
}

/* ========== Template Login Replica ========== */
.login-screen {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  position: fixed;
  inset: 0;
  min-height: 100svh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: #0a0a0f;
  overflow: hidden;
  isolation: isolate;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(254, 44, 85, 0.3), transparent 55%),
    radial-gradient(circle at 80% 70%, rgba(37, 244, 238, 0.2), transparent 60%),
    radial-gradient(circle at 40% 80%, rgba(156, 39, 176, 0.25), transparent 65%);
  z-index: 0;
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(254, 44, 85, 0.1), transparent 70%);
  filter: blur(50px);
  z-index: 0;
  animation: tkPulseGlow 8s infinite alternate;
}

@keyframes tkPulseGlow {
  0% { opacity: 0.4; transform: scale(1); }
  100% { opacity: 0.9; transform: scale(1.2); }
}

.login-screen .login-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 480px;
  margin: 20px;
}

.login-screen .tk-card {
  background: rgba(10, 10, 18, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 48px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 25px 45px rgba(0, 0, 0, 0.5),
    inset 0 0 0 0.5px rgba(254, 44, 85, 0.3),
    0 0 30px rgba(37, 244, 238, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.login-screen .tk-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 30px 55px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(254, 44, 85, 0.5),
    0 0 40px rgba(37, 244, 238, 0.3);
}

.login-screen .card-content {
  padding: 40px 32px 44px;
  position: relative;
}

.login-screen .lang-selector {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 20;
}

.login-screen .lang-dropdown {
  position: relative;
  display: inline-block;
}

.login-screen .lang-trigger {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(20, 20, 32, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 40px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.login-screen .lang-trigger i {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.login-screen .lang-trigger:hover,
.login-screen .lang-trigger:focus-visible {
  background: rgba(254, 44, 85, 0.2);
  border-color: rgba(254, 44, 85, 0.5);
}

.login-screen .lang-trigger[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.login-screen .lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(10, 10, 20, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  min-width: 120px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 30;
  display: block !important;
}

.login-screen .lang-menu:not(.hidden) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.login-screen .lang-option {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
  border: 0;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.login-screen .lang-option:last-child {
  border-bottom: none;
}

.login-screen .lang-option:hover,
.login-screen .lang-option.active {
  background: rgba(254, 44, 85, 0.2);
  color: #fe2c55;
}

.login-screen .logo-area {
  text-align: center;
  margin-bottom: 28px;
}

.login-screen .brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.login-screen .tiktok-icon {
  background: linear-gradient(135deg, #fe2c55, #9c27b0, #25f4ee);
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(254, 44, 85, 0.6);
}

.login-screen .tiktok-icon i {
  font-size: 28px;
  color: #ffffff;
}

.login-screen .brand-lockup h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff, #fe2c55, #25f4ee);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin: 0;
}

.login-screen .welcome-section {
  text-align: center;
  margin-bottom: 32px;
}

.login-screen .rush-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(254, 44, 85, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: 60px;
  margin-bottom: 18px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fe2c55;
  border: 0.5px solid rgba(254, 44, 85, 0.5);
  box-shadow: 0 0 8px rgba(254, 44, 85, 0.3);
}

.login-screen .rush-badge i {
  font-size: 0.7rem;
}

.login-screen .welcome-section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(120deg, #ffffff, #fe2c55, #25f4ee);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin: 0 0 8px;
}

.login-screen .welcome-section p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  font-weight: 400;
  margin: 0;
}

.login-screen .input-group {
  margin-bottom: 18px;
  position: relative;
}

.login-screen .input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  transition: color 0.2s;
  pointer-events: none;
  z-index: 1;
}

.login-screen .input-group:focus-within .input-icon {
  color: #fe2c55;
}

.login-screen .input-field,
.login-screen .field,
.login-screen .login-field {
  width: 100%;
  background: rgba(20, 20, 32, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 34px;
  padding: 15px 20px 15px 48px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  transition: all 0.25s ease;
  outline: none;
  backdrop-filter: blur(5px);
  box-shadow: none;
}

.login-screen .input-field:focus,
.login-screen .field:focus,
.login-screen .login-field:focus {
  border-color: #fe2c55;
  box-shadow: 0 0 0 3px rgba(254, 44, 85, 0.2), 0 0 12px rgba(254, 44, 85, 0.4);
  background: rgba(20, 20, 40, 0.9);
}

.login-screen .input-field::placeholder,
.login-screen .field::placeholder,
.login-screen .login-field::placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
  font-size: 0.9rem;
}

.login-screen .toggle-pwd {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s;
  z-index: 2;
  width: auto;
  min-height: auto;
  padding: 0;
}

.login-screen .toggle-pwd:hover,
.login-screen .toggle-pwd:focus-visible {
  color: #fe2c55;
}

.login-screen .commission-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(156, 39, 176, 0.15);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 28px;
  padding: 10px 16px;
  margin: 18px 0 24px;
  border: 1px solid rgba(37, 244, 238, 0.3);
  gap: 12px;
}

.login-screen .tip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #25f4ee;
}

.login-screen .tip-item i {
  font-size: 0.8rem;
  color: #fe2c55;
}

.login-screen .tip-item strong {
  color: #ffffff;
  font-weight: 700;
  text-shadow: 0 0 4px rgba(254, 44, 85, 0.5);
}

.login-screen .login-btn {
  width: 100%;
  background: linear-gradient(105deg, #fe2c55, #9c27b0, #25f4ee);
  border: 0;
  border-radius: 44px;
  padding: 15px 20px;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px rgba(254, 44, 85, 0.4);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.login-screen .login-btn i {
  font-size: 1rem;
}

.login-screen .login-btn:hover,
.login-screen .login-btn:focus-visible {
  transform: scale(1.02);
  box-shadow: 0 10px 28px rgba(254, 44, 85, 0.6), 0 0 12px rgba(37, 244, 238, 0.5);
  background: linear-gradient(105deg, #ff2c55, #b83a9e, #3ef4ee);
}

.login-screen .login-btn:active {
  transform: scale(0.98);
}

.login-screen .login-btn.is-loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

.login-screen .footer-links,
.login-screen .extra-links {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 28px;
  align-items: center;
  border-top: 0;
  padding-top: 0;
}

.login-screen .link-item,
.login-screen .extra-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.login-screen .link-item:hover,
.login-screen .link-item:focus-visible,
.login-screen .extra-link:hover,
.login-screen .extra-link:focus-visible {
  color: #fe2c55;
  text-shadow: 0 0 5px rgba(254, 44, 85, 0.5);
  transform: none;
}

.login-screen .order-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-screen .stat-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(20, 20, 32, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #25f4ee;
  border: 0.5px solid rgba(37, 244, 238, 0.3);
}

.login-screen .stat-badge i {
  font-size: 0.75rem;
  color: #fe2c55;
}

.login-screen .stat-badge strong {
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 2px rgba(254, 44, 85, 0.3);
  margin-inline: 3px 0;
}

body.lang-ar .login-screen .lang-selector {
  right: auto;
  left: 24px;
}

body.lang-ar .login-screen .lang-menu {
  right: auto;
  left: 0;
}

body.lang-ar .login-screen .input-field,
body.lang-ar .login-screen .field,
body.lang-ar .login-screen .login-field {
  direction: rtl;
  text-align: right;
  padding: 15px 48px;
}

body.lang-ar .login-screen .input-icon {
  left: auto;
  right: 18px;
}

body.lang-ar .login-screen .toggle-pwd {
  right: auto;
  left: 18px;
}

@media (max-width: 520px) {
  .login-screen {
    padding: 14px;
  }

  .login-screen .login-container {
    margin: 0;
    max-width: 100%;
  }

  .login-screen .card-content {
    padding: 72px 24px 34px;
  }

  .login-screen .lang-selector {
    top: 16px;
    right: 16px;
  }

  body.lang-ar .login-screen .lang-selector {
    left: 16px;
    right: auto;
  }

  .login-screen .brand-lockup h1 {
    font-size: 1.6rem;
  }

  .login-screen .welcome-section h2 {
    font-size: 1.3rem;
  }

  .login-screen .commission-row {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .login-screen .footer-links,
  .login-screen .extra-links {
    gap: 24px;
  }

  .login-screen .order-stats {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
}

/* ========== Forgot Password CTA Fix ========== */
.dialog-content .btn-main.btn-secondary[onclick="requestForgotCode()"] {
  background: linear-gradient(135deg, rgba(37, 210, 240, 0.96), rgba(79, 148, 255, 0.94));
  color: #ffffff;
  border: 0;
  box-shadow:
    0 12px 26px rgba(74, 140, 232, 0.22),
    0 0 18px rgba(67, 202, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.dialog-content .btn-main.btn-secondary[onclick="requestForgotCode()"]:hover,
.dialog-content .btn-main.btn-secondary[onclick="requestForgotCode()"]:focus-visible {
  transform: translateY(-1px);
  box-shadow:
    0 16px 30px rgba(74, 140, 232, 0.26),
    0 0 22px rgba(67, 202, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.dialog-content .btn-main.btn-secondary[onclick="requestForgotCode()"]:active {
  transform: scale(0.985);
}

.dialog-content .btn-main.btn-light[onclick="dialog.close()"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(245, 248, 255, 0.7)),
    linear-gradient(135deg, rgba(255, 107, 159, 0.08), rgba(95, 133, 255, 0.08));
  color: #4d5c77;
  border: 1px solid rgba(190, 201, 224, 0.56);
  box-shadow:
    0 10px 22px rgba(112, 130, 170, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.dialog-content .btn-main.btn-light[onclick="dialog.close()"]:hover,
.dialog-content .btn-main.btn-light[onclick="dialog.close()"]:focus-visible {
  color: #263247;
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px rgba(112, 130, 170, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.dialog-content .btn-main.btn-light[onclick="dialog.close()"]:active {
  transform: scale(0.985);
}

/* ========== Login Full Bleed ========== */
@media (max-width: 768px) {
  .login-screen {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .login-screen .login-container {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 100svh;
    margin: 0;
  }

  .login-screen .tk-card {
    width: 100%;
    min-height: 100svh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .login-screen .tk-card:hover {
    transform: none;
  }

  .login-screen .card-content {
    min-height: 100svh;
    padding:
      calc(38px + env(safe-area-inset-top, 0px))
      22px
      calc(30px + env(safe-area-inset-bottom, 0px));
  }

  .login-screen .lang-selector {
    top: calc(20px + env(safe-area-inset-top, 0px));
    right: 22px;
  }

  body.lang-ar .login-screen .lang-selector {
    left: 22px;
    right: auto;
  }
}
