/* DermaTR Auth CSS v3 */
:root {
  --auth-accent: #ca2f44;
  --auth-accent-hover: #a82538;
  --auth-accent-light: rgba(202,47,68,0.08);
  --auth-accent-glow: rgba(202,47,68,0.18);
  --auth-bg: #f0f2f7;
  --auth-card-bg: #fff;
  --auth-dark: #0f1117;
  --auth-dark-2: #181b24;
  --auth-text: #1a1a2e;
  --auth-text-light: #6b7280;
  --auth-text-muted: #9ca3af;
  --auth-border: #e5e7eb;
  --auth-input-bg: #f7f8fb;
  --auth-input-focus: #fff;
  --auth-success: #059669;
  --auth-success-bg: rgba(5,150,105,0.07);
  --auth-error: #dc2626;
  --auth-error-bg: rgba(220,38,38,0.07);
  --auth-radius: 20px;
  --auth-radius-sm: 12px;
  --auth-shadow: 0 8px 40px rgba(0,0,0,0.06),0 1px 3px rgba(0,0,0,0.04);
}
*,*::before,*::after{box-sizing:border-box}
body{margin:0;padding:0;font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;background:var(--auth-bg);color:var(--auth-text);-webkit-font-smoothing:antialiased}

.auth-page{display:flex;min-height:100vh;min-height:100dvh}

/* Left Brand */
.auth-brand{flex:0 0 46%;background:var(--auth-dark);color:#fff;display:flex;align-items:center;justify-content:center;padding:48px;position:relative;overflow:hidden}
.auth-brand::before{content:'';position:absolute;top:-120px;right:-120px;width:400px;height:400px;background:radial-gradient(circle,var(--auth-accent-glow) 0%,transparent 70%);border-radius:50%;pointer-events:none}
.auth-brand::after{content:'';position:absolute;bottom:-80px;left:-80px;width:300px;height:300px;background:radial-gradient(circle,rgba(99,102,241,0.12) 0%,transparent 70%);border-radius:50%;pointer-events:none}
.auth-brand-inner{position:relative;z-index:1;max-width:440px;width:100%}
.auth-brand-logo img{height:32px;opacity:.9;filter:brightness(0) invert(1);margin-bottom:40px}
.auth-brand h2{font-size:2rem;font-weight:700;line-height:1.25;margin:0 0 16px;letter-spacing:-0.02em}
.auth-brand h2 span{background:linear-gradient(135deg,var(--auth-accent) 0%,#e8657a 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
.auth-brand-desc{font-size:.95rem;color:rgba(255,255,255,0.6);line-height:1.6;margin:0 0 36px}

.auth-brand-features{display:flex;flex-direction:column;gap:20px;margin-bottom:36px}
.auth-brand-feat{display:flex;align-items:flex-start;gap:14px}
.auth-brand-feat-icon{flex-shrink:0;width:40px;height:40px;border-radius:12px;background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.08);display:flex;align-items:center;justify-content:center;color:var(--auth-accent)}
.auth-brand-feat-text strong{display:block;font-size:.875rem;font-weight:600;color:#fff;margin-bottom:2px}
.auth-brand-feat-text span{font-size:.8rem;color:rgba(255,255,255,0.45)}

.auth-brand-stats{display:flex;gap:24px;padding-top:28px;border-top:1px solid rgba(255,255,255,0.08)}
.auth-brand-stat strong{display:block;font-size:1.25rem;font-weight:700;color:#fff}
.auth-brand-stat span{font-size:.75rem;color:rgba(255,255,255,0.4)}

/* Right Form */
.auth-form-side{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 40px;background:var(--auth-bg);overflow-y:auto}
.auth-card{width:100%;max-width:440px;background:var(--auth-card-bg);border-radius:var(--auth-radius);padding:40px 36px;box-shadow:var(--auth-shadow);border:1px solid rgba(0,0,0,0.04);overflow:hidden}

.auth-mobile-logo{display:none;margin-bottom:24px}
.auth-mobile-logo img{height:28px}

.auth-header{margin-bottom:28px}
.auth-header h1{font-size:1.5rem;font-weight:700;margin:0 0 6px;letter-spacing:-0.01em;color:var(--auth-text)}
.auth-subtitle{color:var(--auth-text-light);font-size:.9rem;margin:0;line-height:1.5}

/* Tabs */
.auth-tabs{display:flex;background:var(--auth-input-bg);border-radius:var(--auth-radius-sm);padding:4px;gap:4px;margin-bottom:24px}
.auth-tab{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;border-radius:8px;font-size:.85rem;font-weight:500;color:var(--auth-text-light);text-decoration:none;transition:all .2s}
.auth-tab:hover{color:var(--auth-text)}
.auth-tab.active{background:var(--auth-card-bg);color:var(--auth-accent);box-shadow:0 1px 4px rgba(0,0,0,0.06);font-weight:600}
.auth-tab svg{flex-shrink:0}

/* Alerts */
.auth-alert{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:var(--auth-radius-sm);font-size:.85rem;font-weight:500;margin-bottom:20px;line-height:1.4}
.auth-alert svg{flex-shrink:0}
.auth-alert-error{background:var(--auth-error-bg);color:var(--auth-error);border:1px solid rgba(220,38,38,0.12)}
.auth-alert-success{background:var(--auth-success-bg);color:var(--auth-success);border:1px solid rgba(5,150,105,0.12)}

/* Form */
.auth-form{display:flex;flex-direction:column;gap:18px}
.auth-field{display:flex;flex-direction:column;gap:6px}
.auth-field label{font-size:.82rem;font-weight:600;color:var(--auth-text);display:flex;align-items:center;justify-content:space-between}
.auth-forgot{font-size:.78rem;font-weight:500;color:var(--auth-accent);text-decoration:none}
.auth-forgot:hover{text-decoration:underline}
.auth-optional{font-weight:400;color:var(--auth-text-muted);font-size:.78rem}

.auth-input-wrap{position:relative;display:flex;align-items:center;background:var(--auth-input-bg);border:1.5px solid var(--auth-border);border-radius:var(--auth-radius-sm);padding:0 14px;transition:all .2s;gap:10px}
.auth-input-wrap:focus-within{background:var(--auth-input-focus);border-color:var(--auth-accent);box-shadow:0 0 0 3px var(--auth-accent-light)}
.auth-input-wrap svg{flex-shrink:0;color:var(--auth-text-muted)}
.auth-input-wrap:focus-within svg{color:var(--auth-accent)}
.auth-input-wrap input,.auth-input-wrap select{flex:1;border:none;background:transparent;padding:13px 0;font-size:.9rem;font-family:inherit;color:var(--auth-text);outline:none;min-width:0}
.auth-input-wrap input::placeholder{color:var(--auth-text-muted)}
.auth-input-wrap input:-webkit-autofill,
.auth-input-wrap input:-webkit-autofill:hover,
.auth-input-wrap input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 40px var(--auth-input-bg) inset !important;-webkit-text-fill-color:var(--auth-text) !important;font-size:.9rem;transition:background-color 5000s ease-in-out 0s}
.auth-input-wrap:focus-within input:-webkit-autofill{-webkit-box-shadow:0 0 0 40px var(--auth-input-focus) inset !important}
.auth-input-wrap select{cursor:pointer;-webkit-appearance:none;appearance:none}

.auth-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;min-width:0}
.auth-row .auth-field{min-width:0}
.auth-row .auth-input-wrap{min-width:0}

/* Password toggle */
.auth-toggle-pass{display:flex;align-items:center;justify-content:center;background:none;border:none;padding:4px;cursor:pointer;color:var(--auth-text-muted);transition:color .2s;flex-shrink:0}
.auth-toggle-pass:hover{color:var(--auth-text)}

/* Password strength */
.auth-pass-strength{display:flex;gap:4px;margin-top:4px}
.auth-pass-bar{flex:1;height:3px;border-radius:2px;background:var(--auth-border);transition:all .3s}
.auth-pass-bar.active.weak{background:#ef4444}
.auth-pass-bar.active.medium{background:#f59e0b}
.auth-pass-bar.active.strong{background:#10b981}
.auth-pass-hint{font-size:.75rem;color:var(--auth-text-muted);margin-top:2px;transition:color .2s}
.auth-pass-hint.weak{color:#ef4444}
.auth-pass-hint.medium{color:#f59e0b}
.auth-pass-hint.strong{color:#10b981}

/* Button */
.auth-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:14px 24px;background:var(--auth-accent);color:#fff;border:none;border-radius:var(--auth-radius-sm);font-size:.92rem;font-weight:600;font-family:inherit;cursor:pointer;transition:all .2s;margin-top:6px;position:relative}
.auth-btn:hover{background:var(--auth-accent-hover);transform:translateY(-1px);box-shadow:0 4px 16px var(--auth-accent-glow)}
.auth-btn:active{transform:translateY(0)}
.auth-btn.loading{pointer-events:none;opacity:.8}
.auth-btn.loading::after{content:'';width:16px;height:16px;border:2px solid rgba(255,255,255,0.3);border-top-color:#fff;border-radius:50%;animation:authSpin .6s linear infinite;margin-left:8px}
.auth-btn.loading svg{display:none}
@keyframes authSpin{to{transform:rotate(360deg)}}

/* Divider */
.auth-divider{display:flex;align-items:center;gap:16px;margin:24px 0 20px;color:var(--auth-text-muted);font-size:.8rem}
.auth-divider::before,.auth-divider::after{content:'';flex:1;height:1px;background:var(--auth-border)}

/* Links */
.auth-links{text-align:center;margin-top:24px;font-size:.85rem;color:var(--auth-text-light)}
.auth-links a{color:var(--auth-accent);font-weight:600;text-decoration:none}
.auth-links a:hover{text-decoration:underline}
.auth-links p{margin:0 0 6px}
.auth-biz-link{font-size:.8rem;color:var(--auth-text-muted)}
.auth-biz-link a{font-weight:500}

/* Footer */
.auth-footer{margin-top:28px;text-align:center}
.auth-footer a{display:inline-flex;align-items:center;gap:6px;font-size:.8rem;color:var(--auth-text-muted);text-decoration:none;transition:color .2s}
.auth-footer a:hover{color:var(--auth-text)}

/* Success icon */
.auth-success-icon{width:56px;height:56px;border-radius:50%;background:var(--auth-success-bg);color:var(--auth-success);display:flex;align-items:center;justify-content:center;margin:0 auto 16px;animation:authPop .4s cubic-bezier(0.34,1.56,0.64,1)}
@keyframes authPop{0%{transform:scale(0);opacity:0}100%{transform:scale(1);opacity:1}}

/* Responsive */
@media(max-width:1024px){
  .auth-brand{flex:0 0 40%;padding:36px}
  .auth-brand h2{font-size:1.65rem}
  .auth-form-side{padding:36px 28px}
  .auth-card{padding:32px 28px}
}
@media(max-width:768px){
  .auth-page{flex-direction:column}
  .auth-brand{display:none}
  .auth-mobile-logo{display:block}
  .auth-form-side{padding:24px 16px;min-height:100vh;min-height:100dvh;justify-content:flex-start;padding-top:48px}
  .auth-card{padding:28px 22px;border-radius:16px}
  .auth-row{grid-template-columns:1fr;gap:18px}
}
@media(max-width:380px){
  .auth-card{padding:24px 18px}
  .auth-header h1{font-size:1.3rem}
}
