
/* AI hotfix patch */
.ai-hotfix-hidden-status-text{display:none !important;}
.ai-hotfix-balance-chip{cursor:pointer !important;}
.ai-hotfix-modal-backdrop{position:fixed;inset:0;background:rgba(3,7,18,.72);backdrop-filter:blur(4px);z-index:999999;display:none;align-items:center;justify-content:center;padding:16px;}
.ai-hotfix-modal{width:min(100%,520px);max-height:min(90vh,820px);overflow:auto;background:linear-gradient(180deg,#071226 0%,#0b1630 100%);border:1px solid rgba(255,255,255,.08);border-radius:22px;box-shadow:0 30px 80px rgba(0,0,0,.45);color:#e5eefc;}
.ai-hotfix-header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 12px;border-bottom:1px solid rgba(255,255,255,.08);}
.ai-hotfix-title{font-size:24px;font-weight:800;color:#00f5a0;line-height:1.1;}
.ai-hotfix-close{width:36px;height:36px;border:none;border-radius:999px;background:rgba(255,255,255,.06);color:#c7d5ef;cursor:pointer;font-size:18px;}
.ai-hotfix-body{padding:18px 20px 22px;}
.ai-hotfix-label{display:block;font-size:12px;font-weight:700;letter-spacing:.03em;color:#b7c6e4;margin:0 0 8px;}
.ai-hotfix-input,.ai-hotfix-select,.ai-hotfix-textarea{width:100%;box-sizing:border-box;border:1px solid rgba(255,255,255,.10);background:#15233c;color:#edf5ff;border-radius:14px;padding:14px 16px;font-size:14px;outline:none;}
.ai-hotfix-input::placeholder,.ai-hotfix-textarea::placeholder{color:#8ba0c7;}
.ai-hotfix-field{margin-bottom:14px;}
.ai-hotfix-help{font-size:12px;color:#8fb1ff;margin-top:6px;}
.ai-hotfix-error{font-size:13px;color:#ffb4b4;margin:0 0 12px;display:none;}
.ai-hotfix-success{font-size:13px;color:#98f7cb;margin:0 0 12px;display:none;}
.ai-hotfix-btn{width:100%;border:none;border-radius:14px;background:#06b77c;color:#04131b;font-weight:800;padding:14px 16px;cursor:pointer;font-size:15px;}
.ai-hotfix-btn[disabled]{opacity:.6;cursor:not-allowed;}
.ai-hotfix-admin-card{margin-top:16px;padding:16px;border-radius:18px;background:rgba(10,18,30,.65);border:1px solid rgba(255,255,255,.10);color:#fff;}
.ai-hotfix-admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.ai-hotfix-admin-title{font-weight:800;font-size:16px;margin:0 0 10px;color:#fff;}
.ai-hotfix-admin-sub{font-size:12px;color:#9fb1d3;margin:0 0 14px;}
.ai-hotfix-admin-note{font-size:12px;color:#9cf1c7;margin-top:10px;display:none;}
@media (max-width: 768px){
  html,body{overflow-x:hidden !important;}
  .ai-hotfix-admin-grid{grid-template-columns:1fr;}
  .ai-hotfix-modal-backdrop{align-items:flex-start;padding:10px;overflow:auto;}
  .ai-hotfix-modal{width:100%;margin:10px 0 20px;border-radius:18px;max-height:none;}
  .ai-hotfix-header{padding:14px 14px 10px;}
  .ai-hotfix-body{padding:14px;}
  button, a, input, select, textarea{max-width:100%;}
  [class*="grid"],[class*="flex"]{min-width:0;}
}

/* FIX: force auth text to black — scoped to React app only (NOT landing page) */
body:not(.neo-landing-active) form,
body:not(.neo-landing-active) form * { color:#000 !important; }
body:not(.neo-landing-active) input,
body:not(.neo-landing-active) select,
body:not(.neo-landing-active) textarea { color:#000 !important; }
body:not(.neo-landing-active) input::placeholder { color:#555 !important; }
body:not(.neo-landing-active) label,
body:not(.neo-landing-active) p,
body:not(.neo-landing-active) span,
body:not(.neo-landing-active) a,
body:not(.neo-landing-active) h1,
body:not(.neo-landing-active) h2,
body:not(.neo-landing-active) h3,
body:not(.neo-landing-active) h4,
body:not(.neo-landing-active) h5,
body:not(.neo-landing-active) h6 { color:#000 !important; }

/* FIX: Admin AI System Prompt textarea — force readable black text on white */
.ai-hotfix-admin-prompt-ta,
.ai-hotfix-admin-prompt-ta * {
  color:#000 !important;
  -webkit-text-fill-color:#000 !important;
  background:#ffffff !important;
  caret-color:#000 !important;
}
.ai-hotfix-admin-prompt-ta::placeholder { color:#666 !important; -webkit-text-fill-color:#666 !important; }

/* FIX: Student "Choose Language to Learn" — make every tile clickable
   even if no AI prompt is configured for that language in the DB. */
.ai-hotfix-lang-enabled,
.ai-hotfix-lang-enabled * {
  pointer-events:auto !important;
  cursor:pointer !important;
  opacity:1 !important;
  filter:none !important;
  user-select:none;
}
.ai-hotfix-lang-enabled[disabled],
.ai-hotfix-lang-enabled[aria-disabled="true"] {
  pointer-events:auto !important;
  cursor:pointer !important;
  opacity:1 !important;
}

/* Floating admin "Bonus & Deposit" launcher + modal (admin route only). */
#ai-hotfix-bonus-launcher{
  position:fixed; right:20px; bottom:20px; z-index:999998;
  background:#7c3aed; color:#fff; border:none; border-radius:999px;
  padding:12px 18px; font-weight:700; font-size:14px; cursor:pointer;
  box-shadow:0 10px 24px rgba(124,58,237,.35);
  font-family:inherit; display:none;
}
#ai-hotfix-bonus-launcher:hover{ background:#6d28d9; }
#ai-hotfix-bonus-modal{
  position:fixed; inset:0; background:rgba(3,7,18,.72); backdrop-filter:blur(4px);
  z-index:999999; display:none; align-items:center; justify-content:center; padding:16px;
}
#ai-hotfix-bonus-modal .ai-hotfix-bonus-card{
  width:min(100%,520px); background:#ffffff; color:#111827;
  border-radius:18px; box-shadow:0 30px 80px rgba(0,0,0,.45);
  overflow:hidden; font-family:inherit;
}
#ai-hotfix-bonus-modal .ai-hotfix-bonus-head{
  padding:18px 22px; border-bottom:1px solid #e5e7eb;
  display:flex; align-items:center; justify-content:space-between;
}
#ai-hotfix-bonus-modal .ai-hotfix-bonus-title{
  font-size:18px; font-weight:800; color:#111827; margin:0;
}
#ai-hotfix-bonus-modal .ai-hotfix-bonus-sub{
  font-size:12px; color:#6b7280; margin:4px 0 0;
}
#ai-hotfix-bonus-modal .ai-hotfix-bonus-close{
  width:34px; height:34px; border:none; border-radius:999px;
  background:#f3f4f6; color:#374151; cursor:pointer; font-size:18px;
}
#ai-hotfix-bonus-modal .ai-hotfix-bonus-body{ padding:18px 22px 22px; }
#ai-hotfix-bonus-modal .ai-hotfix-bonus-row{ margin-bottom:14px; }
#ai-hotfix-bonus-modal .ai-hotfix-bonus-row label{
  display:block; font-size:12px; font-weight:700; color:#374151;
  letter-spacing:.03em; margin:0 0 6px;
}
#ai-hotfix-bonus-modal .ai-hotfix-bonus-row input[type="text"],
#ai-hotfix-bonus-modal .ai-hotfix-bonus-row input[type="number"]{
  width:100%; box-sizing:border-box; border:1px solid #d1d5db;
  background:#ffffff; color:#111827 !important; -webkit-text-fill-color:#111827 !important;
  border-radius:10px; padding:12px 14px; font-size:14px; outline:none;
}
#ai-hotfix-bonus-modal .ai-hotfix-bonus-toggle{
  display:flex; align-items:center; gap:8px; font-size:13px; color:#374151;
  margin:6px 0 14px;
}
#ai-hotfix-bonus-modal .ai-hotfix-bonus-actions{
  display:flex; gap:10px; justify-content:flex-end; margin-top:6px;
}
#ai-hotfix-bonus-modal .ai-hotfix-bonus-btn{
  border:none; border-radius:10px; padding:11px 18px; font-weight:700;
  font-size:14px; cursor:pointer;
}
#ai-hotfix-bonus-modal .ai-hotfix-bonus-btn.primary{ background:#7c3aed; color:#fff; }
#ai-hotfix-bonus-modal .ai-hotfix-bonus-btn.primary:hover{ background:#6d28d9; }
#ai-hotfix-bonus-modal .ai-hotfix-bonus-btn.ghost{ background:#f3f4f6; color:#374151; }
#ai-hotfix-bonus-modal .ai-hotfix-bonus-msg{
  font-size:13px; margin:0 0 10px; display:none;
}
#ai-hotfix-bonus-modal .ai-hotfix-bonus-msg.error{ color:#b91c1c; display:block; }
#ai-hotfix-bonus-modal .ai-hotfix-bonus-msg.success{ color:#047857; display:block; }

/* Minimum deposit hint shown under amount input */
.ai-hotfix-min-hint{
  margin-top:6px;
  font-size:12px;
  color:#10b981;
  font-weight:500;
  letter-spacing:0.2px;
}

/* Fix: SPA register form's <select name="sex"> renders with white text on
   white background, making the options unreadable. Force a readable dark
   color on the select itself (closed state shows the selected value) and
   on its options/placeholder option. -webkit-text-fill-color is required
   on Chrome/Safari because some themes set it to white explicitly, which
   overrides plain `color`. */
html body select,
html body select option,
html body form select,
html body form select option {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
  background-color: #ffffff !important;
  opacity: 1 !important;
}
html body select:focus,
html body form select:focus {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

/* "Soon" treatment for language tiles whose AI prompt isn't configured yet. */
.ai-hotfix-lang-soon{
  position:relative;
  filter:grayscale(0.6);
  opacity:0.65 !important;
}
.ai-hotfix-lang-soon:hover{ opacity:0.8 !important; }
.ai-hotfix-soon-badge{
  position:absolute;
  top:6px;
  right:6px;
  background:linear-gradient(135deg,#00f5a0,#00c97f);
  color:#032017;
  font-size:10px;
  font-weight:800;
  letter-spacing:0.04em;
  text-transform:uppercase;
  padding:3px 7px;
  border-radius:999px;
  box-shadow:0 2px 6px rgba(0,201,127,0.35);
  pointer-events:none;
  line-height:1;
  z-index:2;
}
/* Bottom-center "Coming soon" toast. */
.ai-hotfix-soon-toast{
  position:fixed;
  left:50%;
  bottom:32px;
  transform:translate(-50%, 20px);
  background:#0f172a;
  color:#fff;
  font-size:14px;
  font-weight:600;
  padding:12px 18px;
  border-radius:14px;
  box-shadow:0 12px 30px rgba(0,0,0,.25);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
  z-index:2147483647;
  max-width:90vw;
}
.ai-hotfix-soon-toast.show{
  opacity:1;
  transform:translate(-50%, 0);
}

/* ===========================================================================
   Direction picker modal (student) + admin direction tabs.
   =========================================================================== */
.ai-hotfix-dir-modal{
  position:fixed; inset:0; z-index:2147483646;
  background:rgba(8,12,24,.62);
  display:flex; align-items:center; justify-content:center;
  padding:20px; backdrop-filter: blur(4px);
}
.ai-hotfix-dir-card{
  background:#0f172a; color:#fff;
  border-radius:18px; padding:22px;
  width:100%; max-width:420px;
  box-shadow:0 30px 80px rgba(0,0,0,.45);
  border:1px solid rgba(255,255,255,.08);
}
.ai-hotfix-dir-title{
  font-size:18px; font-weight:700; margin-bottom:4px; text-align:center;
}
.ai-hotfix-dir-sub{
  font-size:14px; opacity:.7; text-align:center; margin-bottom:18px;
}
.ai-hotfix-dir-btn{
  display:block; width:100%;
  background:linear-gradient(135deg,#00f5a0 0%,#00c97f 100%);
  color:#04241a; border:0; cursor:pointer;
  text-align:left; padding:14px 16px;
  border-radius:14px; margin-bottom:10px;
  font-family:inherit;
  transition:transform .12s ease, box-shadow .12s ease, filter .12s ease;
  box-shadow:0 8px 20px rgba(0,201,127,.25);
}
.ai-hotfix-dir-btn:hover{ transform:translateY(-1px); filter:brightness(1.04); }
.ai-hotfix-dir-btn:active{ transform:translateY(0); }
.ai-hotfix-dir-btn-main{ font-weight:700; font-size:15px; line-height:1.2; }
.ai-hotfix-dir-btn-sub{ font-size:12px; opacity:.78; margin-top:4px; line-height:1.3; }
.ai-hotfix-dir-cancel{
  display:block; width:100%; background:transparent;
  color:#cbd5e1; border:1px solid rgba(255,255,255,.14);
  padding:10px; border-radius:12px; cursor:pointer; font-family:inherit;
  margin-top:6px;
}
.ai-hotfix-dir-cancel:hover{ background:rgba(255,255,255,.05); }

/* ---- Admin directional prompt editor ---- */
.ai-hotfix-dir-admin{
  margin-top:8px; margin-bottom:14px;
  background:#ffffff; border:1px solid #e2e8f0; border-radius:14px;
  padding:14px;
}
.ai-hotfix-dir-admin-head{ margin-bottom:10px; }
.ai-hotfix-dir-admin-langs{ display:flex; flex-wrap:wrap; gap:6px; }
.ai-hotfix-dir-admin-lang{
  background:#f1f5f9; color:#0f172a; border:1px solid #e2e8f0;
  padding:6px 10px; border-radius:999px; cursor:pointer;
  font-size:13px; font-family:inherit;
}
.ai-hotfix-dir-admin-lang.is-active{
  background:linear-gradient(135deg,#00f5a0 0%,#00c97f 100%);
  color:#04241a; border-color:transparent; font-weight:700;
}
.ai-hotfix-dir-admin-tabs{
  display:flex; gap:6px; margin:12px 0 8px;
  border-bottom:1px solid #e2e8f0;
}
.ai-hotfix-dir-tab{
  background:transparent; border:0; cursor:pointer;
  padding:8px 12px; font-size:13px; color:#475569;
  border-bottom:2px solid transparent; font-family:inherit;
}
.ai-hotfix-dir-tab.is-active{ color:#00c97f; border-bottom-color:#00c97f; font-weight:700; }
.ai-hotfix-dir-admin-ta{
  width:100%; min-height:200px;
  background:#fff !important; color:#000 !important;
  -webkit-text-fill-color:#000 !important;
  border:1px solid #cbd5e1 !important; border-radius:10px;
  padding:10px; font-family:inherit; font-size:14px;
  resize:vertical;
}
.ai-hotfix-dir-admin-row{
  display:flex; align-items:center; gap:10px; margin-top:10px; flex-wrap:wrap;
}
.ai-hotfix-dir-admin-key{
  font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:12px; color:#64748b;
}
.ai-hotfix-dir-admin-note{
  margin-top:6px; font-size:13px; min-height:18px;
}

/* Compact direction chip row injected above the SPA's prompt textarea (admin). */
.ai-hotfix-dir-chiprow{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  margin:8px 0 6px;
}
.ai-hotfix-dir-chip{
  background:#f1f5f9; color:#0f172a; border:1px solid #e2e8f0;
  padding:6px 12px; border-radius:999px; cursor:pointer;
  font-size:13px; font-family:inherit; line-height:1.2;
  transition:filter .12s ease, transform .12s ease;
}
.ai-hotfix-dir-chip:hover{ filter:brightness(1.04); }
.ai-hotfix-dir-chip.is-active{
  background:linear-gradient(135deg,#00f5a0 0%,#00c97f 100%);
  color:#04241a; border-color:transparent; font-weight:700;
  box-shadow:0 2px 8px rgba(0,201,127,.25);
}
.ai-hotfix-dir-chip-key{
  margin-left:auto;
  font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:11px; color:#64748b;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:60%;
}
