/* ==========================================================================
   AstraDax - auth pages (login + register)
   Depends on base.css tokens. Flat dark surfaces, single accent, no orbs.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.auth {
  min-height: 100dvh;
  background: var(--ax-bg);
  color: var(--ax-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 16px;
  background-image: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(14, 165, 233, 0.07), transparent 70%);
}

.auth-shell {
  width: 100%;
  max-width: 1040px;
  display: grid;
  gap: 40px;
  align-items: center;
  animation: authIn 0.6s var(--ax-ease) both;
}
.auth-shell.wide { max-width: 1120px; }
@media (min-width: 1024px) {
  .auth-shell { grid-template-columns: 1fr 440px; gap: 72px; }
  .auth-shell.wide { grid-template-columns: 420px 1fr; gap: 56px; align-items: stretch; }
}
@keyframes authIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pageExit { to { opacity: 0; transform: translateY(-8px); } }
@keyframes authShake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.shake { animation: authShake 0.4s ease; }

/* ---- Brand side ---- */
.brand { display: none; flex-direction: column; justify-content: center; }
@media (min-width: 1024px) { .brand { display: flex; } }
.brand-logo { height: 56px; width: auto; max-width: 220px; object-fit: contain; object-position: left; margin-bottom: 36px; }
.brand h1 { font-size: 2.5rem; line-height: 1.1; font-weight: 650; letter-spacing: -0.03em; margin-bottom: 16px; }
.brand h1 .accent { color: var(--ax-accent-hover); }
.brand > p { color: var(--ax-text-2); font-size: 1rem; line-height: 1.65; max-width: 46ch; margin-bottom: 32px; }
.brand-list { list-style: none; display: grid; gap: 14px; }
.brand-list li { display: flex; align-items: center; gap: 12px; color: var(--ax-text-2); font-size: 0.925rem; }
.brand-list .ico {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  border-radius: var(--ax-r-sm); background: var(--ax-accent-soft); color: var(--ax-accent-hover);
}
.brand-list svg { width: 16px; height: 16px; }

/* ---- Price box (register) ---- */
.price-box { margin-top: 32px; padding: 20px; border: 1px solid var(--ax-line-strong); border-radius: var(--ax-r-lg); background: var(--ax-surface); }
.price-box .lbl { font-size: 0.75rem; color: var(--ax-text-3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.price-box .val { font-family: var(--ax-mono); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; }
.price-box .suffix { color: var(--ax-text-3); font-size: 0.85rem; margin-left: 6px; }
.price-box .note { margin-top: 8px; color: var(--ax-text-2); font-size: 0.85rem; }
.price-box .note b { color: var(--ax-text); font-weight: 600; }

/* ---- Card ---- */
.auth-card {
  background: var(--ax-surface);
  border: 1px solid var(--ax-line-strong);
  border-radius: 20px;
  padding: 32px 28px;
  width: 100%;
}
@media (min-width: 480px) { .auth-card { padding: 36px; } }
.mobile-logo { display: block; height: 40px; width: auto; margin-bottom: 24px; }
@media (min-width: 1024px) { .mobile-logo { display: none; } }
.card-head h2 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 6px; }
.card-head p { color: var(--ax-text-2); font-size: 0.9rem; line-height: 1.55; margin-bottom: 24px; }

/* ---- Role tabs ---- */
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 24px; background: var(--ax-bg); border: 1px solid var(--ax-line); border-radius: var(--ax-r-md); }
.tab-slider { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); background: var(--ax-surface-3); border: 1px solid var(--ax-line-strong); border-radius: var(--ax-r-sm); transition: transform 0.3s var(--ax-ease); }
.tabs.admin-active .tab-slider { transform: translateX(100%); }
.tab-btn { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 8px; font: inherit; font-size: 0.85rem; font-weight: 550; color: var(--ax-text-3); background: none; border: 0; border-radius: var(--ax-r-sm); cursor: pointer; transition: color 0.2s; }
.tab-btn svg { width: 15px; height: 15px; }
.tab-btn.active { color: var(--ax-text); }
.tab-btn:hover:not(.active) { color: var(--ax-text-2); }

/* ---- Fields ---- */
.field-group { margin-bottom: 16px; }
.field-label { display: block; font-size: 0.8rem; font-weight: 550; color: var(--ax-text-2); margin-bottom: 7px; }
.field-label span { color: var(--ax-bad); }
.field-label .opt { color: var(--ax-text-3); font-weight: 400; }
.field-wrapper { position: relative; }
.field-input, .modal-input {
  width: 100%; height: 44px; padding: 0 14px 0 40px; font: inherit; font-size: 0.925rem;
  color: var(--ax-text); background: var(--ax-bg); border: 1px solid var(--ax-line-strong);
  border-radius: var(--ax-r-md); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.field-input.has-eye { padding-right: 44px; }
.field-input::placeholder, .modal-input::placeholder { color: var(--ax-text-3); opacity: 0.7; }
.field-input:hover, .modal-input:hover { border-color: rgba(255, 255, 255, 0.22); }
.field-input:focus, .modal-input:focus { border-color: var(--ax-accent); box-shadow: 0 0 0 3px var(--ax-accent-soft); }
.field-input.error-field { border-color: var(--ax-bad); box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12); }
.field-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ax-text-3); pointer-events: none; }
.field-input:focus ~ .field-icon { color: var(--ax-accent-hover); }
.eye-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; background: none; border: 0; border-radius: var(--ax-r-sm); color: var(--ax-text-3); cursor: pointer; }
.eye-btn:hover { color: var(--ax-text); }
.eye-btn svg { width: 17px; height: 17px; }
.field-error { display: none; margin-top: 6px; font-size: 0.78rem; color: var(--ax-bad); }
.field-error.show { display: block; }
.grid-2 { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---- Hints ---- */
.phone-hint, .confirm-hint { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.78rem; }
.phone-hint svg, .confirm-hint svg { width: 12px; height: 12px; flex: none; }
.phone-hint.neutral { color: var(--ax-text-3); }
.phone-hint.valid, .confirm-hint.match { color: var(--ax-ok); }
.phone-hint.invalid, .confirm-hint.nomatch { color: var(--ax-bad); }
.confirm-hint { display: none; }
.confirm-hint.show { display: flex; }

/* ---- Strength ---- */
.strength-wrap { margin-top: 8px; }
.strength-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.strength-seg { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); transition: background 0.25s; }
.strength-label { margin-top: 5px; font-size: 0.75rem; color: var(--ax-text-3); }

/* ---- Buttons ---- */
.btn-submit, .btn-modal {
  width: 100%; height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 0.925rem; font-weight: 600; color: #fff;
  background: var(--ax-accent-press); border: 0; border-radius: var(--ax-r-md); cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-submit:hover:not(:disabled), .btn-modal:hover:not(:disabled) { background: var(--ax-accent); }
.btn-submit:active:not(:disabled), .btn-modal:active:not(:disabled) { transform: translateY(1px); }
.btn-submit:disabled, .btn-modal:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-submit svg { width: 16px; height: 16px; flex: none; }
.btn-modal { margin: 4px 0 12px; }
.btn-cancel { display: block; width: 100%; padding: 8px; font: inherit; font-size: 0.82rem; color: var(--ax-text-3); background: none; border: 0; cursor: pointer; }
.btn-cancel:hover { color: var(--ax-text); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }


/* ---- Misc rows ---- */
.row-remember { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 20px; font-size: 0.85rem; }
.remember-label { display: flex; align-items: center; gap: 8px; color: var(--ax-text-2); cursor: pointer; }
.remember-checkbox { width: 16px; height: 16px; accent-color: var(--ax-accent); }
.forgot-link, .alt-link a { color: var(--ax-accent-hover); text-decoration: none; font-weight: 550; }
.forgot-link:hover, .alt-link a:hover { text-decoration: underline; }
.alt-link { margin-top: 22px; text-align: center; font-size: 0.88rem; color: var(--ax-text-3); }
.notice-box { display: flex; gap: 10px; padding: 12px 14px; margin-bottom: 18px; background: var(--ax-accent-soft); border: 1px solid rgba(14, 165, 233, 0.25); border-radius: var(--ax-r-md); color: var(--ax-text-2); font-size: 0.82rem; line-height: 1.55; }
.notice-box svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ax-accent-hover); }
.notice-box strong { color: var(--ax-text); }

/* ---- Step bar ---- */
.step-bar { display: flex; align-items: center; margin-bottom: 24px; }
.step-dot { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; font-size: 0.75rem; font-weight: 600; border: 1px solid var(--ax-line-strong); color: var(--ax-text-3); transition: all 0.25s; }
.step-dot.active { border-color: var(--ax-accent); color: var(--ax-accent-hover); background: var(--ax-accent-soft); }
.step-dot.done { border-color: var(--ax-accent-press); background: var(--ax-accent-press); color: #fff; }
.step-line { flex: 1; height: 2px; margin: 0 8px; background: var(--ax-line); overflow: hidden; border-radius: 2px; }
.step-line-fill { height: 100%; background: var(--ax-accent); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ax-ease); }

/* ---- Modals ---- */
.modal-overlay, .qris-overlay { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 7, 10, 0.8); }
.modal-overlay.active, .qris-overlay.active { display: flex; }
.modal-card, .qris-card { width: 100%; max-width: 400px; max-height: 92dvh; overflow-y: auto; padding: 28px; background: var(--ax-surface-2); border: 1px solid var(--ax-line-strong); border-radius: 20px; }
.modal-icon-wrap { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 16px; border-radius: var(--ax-r-md); background: var(--ax-accent-soft); color: var(--ax-accent-hover); }
.modal-icon-wrap.green { background: rgba(52, 211, 153, 0.12); color: var(--ax-ok); }
.modal-icon-wrap svg { width: 22px; height: 22px; }
.modal-title, .qris-card h3 { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 6px; }
.modal-desc, .qris-card > p { color: var(--ax-text-2); font-size: 0.86rem; line-height: 1.55; margin-bottom: 18px; }
.modal-label { display: block; margin-bottom: 7px; font-size: 0.8rem; font-weight: 550; color: var(--ax-text-2); }
.modal-input { padding-left: 14px; margin-bottom: 14px; }
.modal-input.otp-input { text-align: center; letter-spacing: 0.5em; font-family: var(--ax-mono); font-size: 1.25rem; font-weight: 600; }

/* ---- QRIS ---- */
.qris-card { text-align: center; }
.qris-img-wrap { display: inline-block; padding: 10px; margin-bottom: 16px; background: #fff; border-radius: var(--ax-r-md); }
.qris-img-wrap img { display: block; width: 220px; max-width: 100%; height: auto; }
.qris-amount-label { font-size: 0.75rem; color: var(--ax-text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.qris-amount { font-family: var(--ax-mono); font-size: 1.7rem; font-weight: 600; margin: 2px 0; }
.qris-orderid { font-family: var(--ax-mono); font-size: 0.75rem; color: var(--ax-text-3); margin-bottom: 16px; word-break: break-all; }
.qris-waiting { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; margin-bottom: 12px; color: var(--ax-warn); font-size: 0.82rem; background: rgba(251, 191, 36, 0.08); border-radius: var(--ax-r-md); }
.qris-cancel { width: 100%; padding: 8px; font: inherit; font-size: 0.82rem; color: var(--ax-text-3); background: none; border: 0; cursor: pointer; }
.qris-cancel:hover { color: var(--ax-text); }

.page-footer { padding: 24px 0 8px; text-align: center; font-size: 0.75rem; color: var(--ax-text-3); }

