/* ============ REGISTER / SIGN IN ============ */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(225, 6, 0, .25), transparent 55%),
    var(--bg);
}
.auth-top { display: flex; justify-content: space-between; align-items: center; height: 72px; }
.back-link { color: var(--muted); font-size: .9rem; }
.back-link:hover { color: var(--text); }
.auth-wrap { display: grid; grid-template-columns: 1fr minmax(0, 440px); gap: 48px; align-items: center; padding-block: 24px 64px; }
.auth-brand h1 { font-family: var(--font-head); text-transform: uppercase; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; margin: 0 0 24px; }
.auth-brand h1 span { color: var(--accent); }
.auth-brand .join-perks { flex-direction: column; color: var(--muted); font-size: 1rem; }

.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 8px 28px 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); margin: 0 -28px 20px; }
.auth-tabs button { background: none; border: 0; color: var(--muted); padding: 16px; font-weight: 600; border-bottom: 3px solid transparent; }
.auth-tabs button.active { color: #fff; border-bottom-color: var(--accent); }
.auth-form h2 { font-family: var(--font-head); text-transform: uppercase; font-size: 1.5rem; margin: 0 0 18px; }
.field { margin-bottom: 14px; }
.field > label:not(.check-row) { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.field input:not([type=checkbox]) {
  width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 11px 12px; font: inherit;
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(225, 6, 0, .18); }
.field.invalid input:not([type=checkbox]) { border-color: #ff6b66; }
.field-error { color: #ff6b66; font-size: .8rem; margin: 5px 0 0; }
.field-error:empty { display: none; }
.field-hint { color: var(--muted); font-size: .78rem; margin: 6px 0 0; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px !important; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font-size: .8rem; font-weight: 600; padding: 6px 8px; }
.pw-toggle:hover { color: var(--text); }
.pw-meter { height: 4px; background: var(--surface-2); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; transition: width .25s, background .25s; }
.pw-meter[data-level="0"] span { width: 10%; background: #ff6b66; }
.pw-meter[data-level="1"] span { width: 25%; background: #ff6b66; }
.pw-meter[data-level="2"] span { width: 50%; background: var(--accent-2); }
.pw-meter[data-level="3"] span { width: 75%; background: #6ee7a0; }
.pw-meter[data-level="4"] span { width: 100%; background: #22c55e; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); cursor: pointer; }
.check-row input { accent-color: var(--accent); width: 16px; height: 16px; margin-top: 2px; }
.check-row a { color: var(--text); text-decoration: underline; }
.forgot-link { display: inline-block; font-size: .85rem; color: var(--muted); margin: -4px 0 14px; }
.forgot-link:hover { color: var(--text); }
.auth-form .form-error { margin: 0 0 12px; }
.auth-form .form-error:empty { display: none; }
.form-error { color: #ff6b66; font-size: .88rem; }
.auth-switch { text-align: center; color: var(--muted); font-size: .88rem; margin: 16px 0 0; }
.auth-signed-in { text-align: center; padding: 24px 0 8px; display: grid; gap: 14px; }
.auth-signed-in p { margin: 0; color: var(--muted); }
.demo-note { color: var(--muted); font-size: .75rem; text-align: center; margin: 16px 0 0; opacity: .8; }

@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 24px; padding-top: 8px; }
  .auth-brand h1 { font-size: 2rem; margin-bottom: 12px; }
  .auth-brand .join-perks { display: none; }
}
@media (max-width: 480px) {
  .auth-card { padding: 8px 18px 20px; }
  .auth-tabs { margin-inline: -18px; }
}

/* ============ USER DASHBOARD ============ */
.welcome-banner { margin-bottom: 20px; padding: 14px 16px; border-radius: 10px; background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .4); color: #b7f5cf; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.quick-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, transform .2s; }
.quick-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.quick-card span:last-child { color: var(--muted); font-size: .9rem; }
.quick-icon { font-size: 1.8rem; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.panel-title { font-family: var(--font-head); text-transform: uppercase; font-size: 1.25rem; margin: 0 0 14px; }
.panel-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; align-items: center; }
.panel .form-error { margin: 12px 0 0; }
.panel .form-error:empty { display: none; }
.form-grid.flush { padding: 0; }
.form-grid textarea {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: 8px; padding: 9px 11px; font: inherit; font-size: .92rem; resize: vertical;
}
.form-grid textarea:focus { outline: none; border-color: var(--accent); }
.char-count { align-self: flex-end; font-size: .75rem; }
.list-title { font-family: var(--font-head); text-transform: uppercase; font-size: 1.25rem; margin: 8px 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }

/* Add-video form with live preview */
.video-form-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; }
.link-status { font-size: .78rem; color: var(--muted); }
.link-status.ok { color: #6ee7a0; }
.link-status.bad { color: #ff6b66; }
.link-preview { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px dashed var(--border); }
.link-preview iframe { width: 100%; height: 100%; border: 0; display: block; }
.preview-empty { height: 100%; display: grid; place-content: center; gap: 4px; text-align: center; padding: 16px; color: var(--muted); font-size: .85rem; }
.preview-empty strong { color: var(--text); font-size: 1rem; }

/* Lists of the user's videos / academies */
.item-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.item:last-child { border-bottom: 0; }
.item .mini-thumb { flex: none; width: 96px; }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.item-main { min-width: 0; }
.item-main strong { display: block; }
.item-main small { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.item-main .hint { color: var(--accent-2); }
.item-status { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.item-status small { color: var(--muted); font-size: .8rem; }
.item-actions { display: flex; gap: 6px; justify-content: flex-end; }
.empty-card { padding: 32px 20px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.status-pill.unpaid { background: rgba(225, 6, 0, .15); color: #ff8a85; }

/* Academy wizard */
.stepper { display: flex; list-style: none; padding: 0; margin: 0 0 22px; gap: 8px; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; padding-bottom: 10px; border-bottom: 3px solid var(--border); }
.stepper li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: .8rem; flex: none; }
.stepper li.active { color: #fff; border-color: var(--accent); }
.stepper li.active span { background: var(--accent); color: #fff; }
.stepper li.done { color: var(--text); border-color: rgba(225, 6, 0, .45); }
.stepper li.done span { background: rgba(225, 6, 0, .3); }
.wizard-foot .spacer { flex: 1; }
.disc-field { border: 0; padding: 0; margin: 0; min-width: 0; }
.disc-field legend { font-size: .82rem; color: var(--muted); font-weight: 500; margin-bottom: 8px; padding: 0; }
.disc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.disc-chip { position: relative; cursor: pointer; }
.disc-chip input { position: absolute; opacity: 0; pointer-events: none; }
.disc-chip span { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); font-size: .85rem; }
.disc-chip input:checked + span { background: rgba(225, 6, 0, .18); border-color: var(--accent); color: #fff; }
.disc-chip input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; padding-top: 8px; }
.plan-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 12px; border: 2px solid var(--border); background: var(--bg); cursor: pointer; transition: border-color .2s; }
.plan-card input { position: absolute; opacity: 0; }
.plan-card:hover { border-color: var(--muted); }
.plan-card.selected { border-color: var(--accent); background: rgba(225, 6, 0, .06); }
.plan-card.plan-featured.selected { border-color: var(--accent-2); background: rgba(255, 180, 0, .06); }
.plan-card:has(input:focus-visible) { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.plan-tag { position: absolute; top: -11px; right: 14px; background: var(--accent-2); color: #111; font-size: .7rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; }
.plan-name { font-family: var(--font-head); text-transform: uppercase; font-size: 1.2rem; }
.plan-price { font-family: var(--font-head); font-size: 2rem; }
.plan-price small { font-family: var(--font-body); font-size: .85rem; color: var(--muted); }
.plan-card ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; color: var(--muted); font-size: .9rem; }

.checkout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.order-summary, .pay-box { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.order-summary h3, .pay-box h3 { margin: 0 0 12px; font-size: 1rem; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: .92rem; }
.sum-row.total { font-weight: 700; font-size: 1.05rem; padding-top: 8px; }
.order-summary hr { border: 0; border-top: 1px solid var(--border); margin: 10px 0; }
.pay-box p { color: var(--muted); font-size: .85rem; margin: 0 0 14px; }
.pay-box .link-btn { display: block; margin: 12px auto 0; color: var(--muted); }
.boost-checkout { margin-top: 16px; }
.account-form { max-width: 560px; }
.form-grid input[readonly] { opacity: .7; }

@media (max-width: 860px) {
  .video-form-grid, .checkout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .item { grid-template-columns: auto 1fr; }
  .item-status { grid-column: 2; align-items: flex-start; flex-direction: row; }
  .item-actions { grid-column: 1 / -1; }
  .stepper li { font-size: .8rem; }
  .wizard-foot { flex-wrap: wrap; }
}

/* Whish payment step (manual transfer: code in the note, then the transaction number) */
.status-pill.confirming { background: rgba(255, 180, 0, .15); color: var(--accent-2); }
.status-pill.live { background: rgba(46, 204, 113, .15); color: #5fd68f; }
.status-pill.expired { background: rgba(154, 154, 168, .15); color: var(--muted); }
.pay-steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 8px; font-size: .9rem; }
.pay-steps strong { color: var(--text); }
.pay-code { font-family: ui-monospace, Consolas, monospace; font-size: .95rem; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); white-space: nowrap; }
.copy-btn { margin-left: 6px; padding: 2px 8px; font-size: .75rem; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--muted); }
.copy-btn:hover { color: var(--text); border-color: var(--muted); }
.whish-form { display: grid; gap: 10px; }
.whish-form label { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.whish-form input[type=text] { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.whish-form input[type=file] { color: var(--muted); font-size: .85rem; max-width: 100%; }
.pay-warning { color: #ff8a85 !important; }
.pay-sent { text-align: center; }
.pay-sent .pay-code { display: inline-block; margin: 6px 0; }
