:root {
  --bg-1:#f9fafb;
  --bg-2:#f3f4f6;
  --bg-3:#f9fafb;
  --panel:#ffffff;
  --panel-soft:#f9fafb;
  --panel-soft-2:#f3f4f6;
  --border:#e5e7eb;
  --border-strong:#d1d5db;
  --text:#111827;
  --text-soft:#4b5563;
  --text-muted:#6b7280;
  --input:#ffffff;
  --input-placeholder:#9ca3af;
  --green:#22c55e;
  --green-strong:#16a34a;
  --green-deep:#059669;
  --green-soft:#dcfce7;
  --amber:#f59e0b;
  --red:#ef4444;
  --shadow:0 25px 50px -12px rgba(0,0,0,.16);
}
html.dark {
  --bg-1:#111827;
  --bg-2:#1f2937;
  --bg-3:#111827;
  --panel:#1f2937;
  --panel-soft:#374151;
  --panel-soft-2:#4b5563;
  --border:#374151;
  --border-strong:#4b5563;
  --text:#ffffff;
  --text-soft:#d1d5db;
  --text-muted:#9ca3af;
  --input:#374151;
  --input-placeholder:#9ca3af;
  --green:#22c55e;
  --green-strong:#16a34a;
  --green-deep:#059669;
  --green-soft:#14532d;
  --shadow:0 25px 50px -12px rgba(0,0,0,.55);
}
*{box-sizing:border-box}
html{min-height:100%;background:var(--bg-1)}
body{margin:0;min-height:100vh;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--text);background:linear-gradient(135deg,var(--bg-1),var(--bg-2) 50%,var(--bg-3));transition:background .2s ease,color .2s ease;position:relative;overflow-x:hidden}
body::before{content:"";position:fixed;inset:0;background-image:radial-gradient(circle at 20% 50%,rgba(34,197,94,.05) 0%,transparent 50%),radial-gradient(circle at 80% 80%,rgba(16,185,129,.05) 0%,transparent 50%);pointer-events:none;z-index:0}
a{color:inherit;text-decoration:none}
button,input{font:inherit}
button{border:0}
svg{display:block}
.auth-shell{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px;position:relative;z-index:1}
.auth-container{width:100%;max-width:1152px;margin:0 auto}
.auth-columns{display:flex;flex-direction:column;gap:32px;align-items:center}
.auth-brand,.auth-right{width:100%}
.auth-brand{text-align:center}
.brand-logo-row{display:inline-flex;align-items:center;gap:16px;margin-bottom:48px}
.brand-logo-box{width:80px;height:80px;border-radius:16px;display:flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(135deg,#22c55e,#059669);box-shadow:0 20px 30px -12px rgba(34,197,94,.38)}
.brand-logo-box svg{width:40px;height:40px}
.brand-copy{text-align:left}
.brand-copy h1{margin:0;font-size:50px;line-height:1;font-weight:800;letter-spacing:-.025em;background:linear-gradient(90deg,#16a34a,#059669);-webkit-background-clip:text;background-clip:text;color:transparent}
html.dark .brand-copy h1{background:linear-gradient(90deg,#4ade80,#34d399);-webkit-background-clip:text;background-clip:text;color:transparent}
.brand-copy p{margin:7px 0 0;font-size:18px;color:var(--text-muted)}
.brand-features{display:none;max-width:448px;margin:0 auto;text-align:left}
.brand-feature{display:flex;align-items:flex-start;gap:16px}
.brand-feature+.brand-feature{margin-top:24px}
.brand-feature-icon{width:48px;height:48px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex:0 0 auto;background:#dcfce7;color:#16a34a}
html.dark .brand-feature-icon{background:#14532d;color:#4ade80}
.brand-feature-icon svg{width:24px;height:24px}
.brand-feature h3{margin:3px 0 4px;font-size:16px;line-height:1.25;font-weight:800;color:var(--text)}
.brand-feature p{margin:0;font-size:14px;line-height:1.45;color:var(--text-muted)}
.auth-right{max-width:560px;margin:0 auto}
.auth-card{background:var(--panel);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}
.auth-card-inner{padding:32px}
.auth-content--login{width:100%;max-width:448px;margin:0 auto}
.auth-content--register{width:100%;max-width:672px;margin:0 auto}
.form-header{text-align:center;margin-bottom:32px}
.form-icon-box{width:64px;height:64px;border-radius:16px;margin:0 auto 16px;display:flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(135deg,#22c55e,#059669);box-shadow:0 12px 24px rgba(34,197,94,.28)}
.form-icon-box svg{width:32px;height:32px}
.form-header h2{margin:0;font-size:30px;line-height:1.2;font-weight:800;color:var(--text);letter-spacing:-.01em}
.auth-form{width:100%}
.auth-form--login>.form-field+.form-field{margin-top:20px}
.form-field{min-width:0}
.form-field label{display:block;margin-bottom:8px;font-size:14px;line-height:1.4;font-weight:600;color:var(--text-soft)}
.required{color:var(--red)}
.input-wrap{position:relative;min-width:0;flex:1}
.input-icon{position:absolute;left:12px;top:50%;width:20px;height:20px;transform:translateY(-50%);color:#9ca3af;pointer-events:none}
.input-wrap input{width:100%;height:46px;border-radius:8px;border:1px solid var(--border-strong);background:var(--input);color:var(--text);padding:10px 14px 10px 40px;outline:none;transition:border-color .16s ease,box-shadow .16s ease,background .2s ease,color .2s ease}
.input-wrap input::placeholder{color:var(--input-placeholder)}
.input-wrap input:focus{border-color:transparent;box-shadow:0 0 0 2px #22c55e}
.form-section--amber .input-wrap input:focus{box-shadow:0 0 0 2px #f59e0b}
.field-help{margin:6px 0 0;font-size:12px;line-height:1.45;color:var(--text-muted)}
.field-error,.field-success{display:block;min-height:0;margin-top:5px;font-size:12px;line-height:1.35}
.field-error{color:#ef4444}.field-success{color:#22c55e}
.submit-btn{width:100%;height:51px;border-radius:12px;margin-top:20px;padding:0 18px;display:flex;align-items:center;justify-content:center;gap:9px;background:linear-gradient(90deg,#22c55e,#059669);color:#fff;font-weight:800;cursor:pointer;box-shadow:0 10px 20px rgba(34,197,94,.18);transition:transform .18s ease,filter .18s ease,box-shadow .18s ease}
.submit-btn svg{width:20px;height:20px}
.submit-btn:hover{transform:translateY(-2px);filter:brightness(.96);box-shadow:0 14px 28px rgba(34,197,94,.24)}
.submit-btn:active{transform:translateY(0)}
.submit-btn:disabled{opacity:.55;cursor:not-allowed;transform:none}
.auth-or{position:relative;margin:30px 0}
.auth-or::before{content:"";position:absolute;left:0;right:0;top:50%;height:1px;background:var(--border-strong)}
.auth-or span{position:relative;display:table;margin:0 auto;padding:0 10px;background:var(--panel);font-size:14px;color:var(--text-muted)}
.login-links{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.utility-btn{min-height:44px;border-radius:8px;border:1px solid var(--border-strong);display:flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;font-size:14px;font-weight:600;transition:background .15s ease,border-color .15s ease,color .15s ease}
.utility-btn svg{width:16px;height:16px}
.utility-btn--muted{color:var(--text-soft)}
.utility-btn--muted:hover{background:var(--panel-soft)}
.utility-btn--green{border:2px solid #22c55e;color:#16a34a;font-weight:800}
html.dark .utility-btn--green{color:#4ade80;border-color:#16a34a}
.utility-btn--green:hover{background:rgba(34,197,94,.08)}
.security-note{margin-top:22px;border:1px solid #bbf7d0;border-radius:12px;padding:16px;display:flex;align-items:flex-start;background:linear-gradient(135deg,#f0fdf4,#ecfdf5);color:#166534}
html.dark .security-note{border-color:#4b5563;background:linear-gradient(135deg,#374151,#4b5563);color:#86efac}
.security-note-icon{width:20px;height:20px;flex:0 0 auto;margin:2px 12px 0 0;color:#16a34a}
html.dark .security-note-icon{color:#4ade80}
.security-note strong{display:block;margin-bottom:5px;font-size:14px}
.security-note ul{margin:0;padding:0;list-style:none;font-size:12px;line-height:1.6}
.security-note li{position:relative;padding-left:16px}
.security-note li::before{content:"";position:absolute;left:2px;top:.65em;width:6px;height:6px;border-radius:999px;background:#22c55e}
.auth-footer{text-align:center;margin-top:24px;font-size:14px;color:var(--text-muted)}
.theme-toggle{position:fixed;right:16px;top:16px;z-index:50;width:48px;height:48px;border-radius:12px;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;background:var(--panel);box-shadow:0 8px 20px rgba(0,0,0,.15);cursor:pointer;transition:transform .15s ease,box-shadow .15s ease,background .2s ease}
.theme-toggle:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(0,0,0,.2)}
.theme-icon{width:24px;height:24px}.theme-icon--moon{fill:#1f2937}.theme-icon--sun{fill:#facc15;display:none}html.dark .theme-icon--moon{display:none}html.dark .theme-icon--sun{display:block}
.auth-alert{margin:0 0 20px;border-left:4px solid;border-radius:12px;padding:14px 16px;display:flex;align-items:center;gap:12px;font-size:14px;box-shadow:0 8px 20px rgba(0,0,0,.08)}
.auth-alert-icon{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;flex:0 0 auto}
.auth-alert--error{background:rgba(239,68,68,.08);border-color:#ef4444;color:#991b1b}.auth-alert--error .auth-alert-icon{background:#ef4444}html.dark .auth-alert--error{color:#fecaca;background:rgba(127,29,29,.28)}
.auth-alert--success{background:rgba(34,197,94,.08);border-color:#22c55e;color:#166534}.auth-alert--success .auth-alert-icon{background:#22c55e}html.dark .auth-alert--success{color:#bbf7d0;background:rgba(20,83,45,.28)}
.auth-alert--info{background:rgba(59,130,246,.08);border-color:#3b82f6;color:#1e40af}.auth-alert--info .auth-alert-icon{background:#3b82f6}html.dark .auth-alert--info{color:#bfdbfe;background:rgba(30,58,138,.25)}

/* Register */
.auth-columns--register{align-items:center}
.auth-card .auth-form--register{display:flex;flex-direction:column;gap:22px}
.form-section{border:1px solid var(--border);border-radius:12px;padding:24px;background:var(--panel)}
.section-title{display:flex;align-items:center;gap:9px;margin-bottom:16px}
.section-title>span{width:4px;height:24px;border-radius:999px;background:linear-gradient(#22c55e,#059669)}
.form-section--amber .section-title>span{background:linear-gradient(#f59e0b,#ea580c)}
.section-title h3{margin:0;font-size:18px;font-weight:700;color:var(--text)}
.section-description{margin:-5px 0 16px;font-size:14px;color:var(--text-muted)}
.section-stack{display:flex;flex-direction:column;gap:16px}
.form-grid-2{display:grid;grid-template-columns:1fr;gap:16px}
.input-action--reference{display:flex;gap:8px;align-items:stretch}
.inline-action-btn{min-width:88px;border:1px solid var(--border-strong);border-radius:8px;background:var(--panel-soft);color:var(--text-soft);padding:0 12px;font-size:12px;font-weight:700;cursor:pointer;transition:background .15s ease,border-color .15s ease}
.inline-action-btn:hover{border-color:#22c55e;background:rgba(34,197,94,.08);color:#16a34a}
.inline-action-btn:disabled{opacity:.55;cursor:not-allowed}
.password-rules{margin-top:7px;font-size:12px;line-height:1.6;color:var(--text-muted)}
.password-rules p{margin:0;position:relative;padding-left:0}.password-rules p::first-letter{color:#22c55e}
.captcha-section{padding:24px}
.captcha-reference{width:100%}
.captcha-reference-row{display:flex;align-items:flex-end;justify-content:center;gap:10px;flex-wrap:wrap}
.captcha-input-wrap{flex:1;min-width:190px}
.captcha-reference img{width:138px;height:46px;object-fit:cover;border:1px solid var(--border-strong);border-radius:7px;background:#fff;cursor:pointer}
.captcha-refresh{width:46px;height:46px;border-radius:8px;border:1px solid var(--border-strong);background:var(--panel-soft);color:var(--text);font-size:22px;cursor:pointer}
.captcha-refresh:hover{border-color:#22c55e;color:#22c55e}
.submit-btn--register{margin-top:0}
.register-login-link{text-align:center;padding-top:6px;font-size:14px;color:var(--text-muted)}
.register-login-link a{color:#16a34a;font-weight:700}.register-login-link a:hover{text-decoration:underline}html.dark .register-login-link a{color:#4ade80}

@media (min-width:768px){.form-grid-2{grid-template-columns:1fr 1fr}}
@media (min-width:1024px){
  .auth-columns{flex-direction:row;gap:32px}
  .auth-brand,.auth-right{width:50%}
  .auth-brand{text-align:left}
  .brand-logo-row{margin-bottom:48px}
  .brand-features{display:block;margin-left:0}
  .auth-right{max-width:none}
  .auth-brand--register{align-self:center}
}
@media (max-width:1023px){
  .auth-shell{padding-top:80px;padding-bottom:32px}
  .brand-logo-row{margin-bottom:10px}
  .brand-copy h1{font-size:42px}
  .brand-logo-box{width:68px;height:68px}.brand-logo-box svg{width:34px;height:34px}
  .auth-brand--register{margin-bottom:4px}
}
@media (max-width:640px){
  .auth-card-inner{padding:22px 18px}
  .form-header{margin-bottom:24px}.form-header h2{font-size:26px}
  .form-icon-box{width:58px;height:58px}.form-icon-box svg{width:29px;height:29px}
  .login-links{grid-template-columns:1fr}
  .form-section{padding:18px 15px}
  .input-action--reference{flex-direction:column}.inline-action-btn{height:42px}
  .captcha-reference-row{align-items:stretch}.captcha-input-wrap{flex-basis:100%}.captcha-reference img{flex:1;width:auto;min-width:150px}.captcha-refresh{flex:0 0 46px}
  .theme-toggle{width:44px;height:44px;right:12px;top:12px}
}


/* ===== Cloudflare Turnstile - port tu id2.jxmienphi.com ===== */
.turnstile-login-block{width:100%}
.turnstile-panel{display:flex;justify-content:center;align-items:center;min-height:92px;padding:14px;background:var(--panel-soft);border-radius:8px;overflow:hidden}
.turnstile-register-section{padding:24px}
.turnstile-register-panel{display:flex;justify-content:center;align-items:center;min-height:72px;width:100%;overflow:hidden}
.turnstile-error{display:block;text-align:left;margin-top:7px}
.cf-turnstile{max-width:100%}
@media (max-width:380px){
  .turnstile-panel,.turnstile-register-panel{justify-content:flex-start;overflow-x:auto}
  .turnstile-login-block,.turnstile-register-section{max-width:100%}
}
