/* EDIVIC premium authentication pages — shared login/register visual system */
:root{
  --auth-barley:#fff4d6;
  --auth-yellow:#ffc400;
  --auth-yellow-2:#ffd75a;
  --auth-gold:#d89200;
  --auth-brown:#2b1b0d;
  --auth-soft-brown:#6f563d;
  --auth-white:#fffdf7;
  --auth-black:#090909;
  --auth-border:rgba(43,27,13,.16);
  --auth-danger:#b42318;
  --auth-success:#157347;
  --auth-info:#73510a;
  --auth-radius-lg:30px;
  --auth-radius-md:18px;
  --auth-radius-sm:13px;
  --auth-shadow:0 28px 80px rgba(43,27,13,.18);
  --auth-transition:180ms cubic-bezier(.2,.8,.2,1);
}

*{box-sizing:border-box}
html{color-scheme:light;background:var(--auth-barley)}
body.auth-page{
  margin:0;
  min-width:320px;
  min-height:100vh;
  overflow-x:hidden;
  color:var(--auth-brown);
  font-family:"Outfit",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:
    radial-gradient(circle at 7% 13%,rgba(255,196,0,.22),transparent 30rem),
    radial-gradient(circle at 96% 80%,rgba(216,146,0,.13),transparent 34rem),
    linear-gradient(145deg,#fffaf0 0%,#fff4d6 54%,#fffdf7 100%);
}
body.auth-page a{color:inherit}
body.auth-page button,body.auth-page input{font:inherit}
body.auth-page button{cursor:pointer}
body.auth-page main{display:block}

.auth-skip-link{
  position:fixed;left:14px;top:10px;z-index:13000;
  padding:11px 15px;border-radius:11px;background:var(--auth-brown);color:var(--auth-white);
  transform:translateY(-160%);transition:transform var(--auth-transition)
}
.auth-skip-link:focus{transform:translateY(0)}

.auth-page-shell{
  width:min(1320px,calc(100% - 40px));
  margin:0 auto;
  padding:44px 0 64px;
}
.auth-card{
  display:grid;
  grid-template-columns:minmax(0,.46fr) minmax(460px,.54fr);
  min-height:min(790px,calc(100vh - 150px));
  border:1px solid rgba(43,27,13,.12);
  border-radius:var(--auth-radius-lg);
  overflow:hidden;
  background:rgba(255,253,247,.92);
  box-shadow:var(--auth-shadow);
  isolation:isolate;
}

.auth-visual{
  position:relative;
  min-height:640px;
  padding:clamp(34px,4vw,58px);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  overflow:hidden;
  color:var(--auth-white);
  background-color:#2b1b0d;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
}
.auth-page--login .auth-visual{
  background-image:
    linear-gradient(155deg,rgba(9,9,9,.84) 0%,rgba(43,27,13,.68) 42%,rgba(90,56,11,.38) 100%),
    url("images/auth-login-visual.jpg");
  background-image:
    linear-gradient(155deg,rgba(9,9,9,.84) 0%,rgba(43,27,13,.68) 42%,rgba(90,56,11,.38) 100%),
    image-set(url("images/auth-login-visual.webp") type("image/webp"),url("images/auth-login-visual.jpg") type("image/jpeg"));
}
.auth-page--register .auth-visual{
  background-image:
    linear-gradient(150deg,rgba(9,9,9,.82) 0%,rgba(43,27,13,.66) 42%,rgba(104,67,11,.34) 100%),
    url("images/auth-register-visual.jpg");
  background-image:
    linear-gradient(150deg,rgba(9,9,9,.82) 0%,rgba(43,27,13,.66) 42%,rgba(104,67,11,.34) 100%),
    image-set(url("images/auth-register-visual.webp") type("image/webp"),url("images/auth-register-visual.jpg") type("image/jpeg"));
}
.auth-visual::before{
  content:"";position:absolute;inset:0;z-index:-1;
  background:
    radial-gradient(circle at 74% 22%,rgba(255,196,0,.36),transparent 27%),
    linear-gradient(180deg,transparent 38%,rgba(9,9,9,.42) 100%);
}
.auth-visual::after{
  content:"";position:absolute;right:-90px;bottom:-110px;width:330px;height:330px;z-index:-1;
  border:1px solid rgba(255,196,0,.35);border-radius:50%;box-shadow:0 0 0 34px rgba(255,196,0,.08),0 0 0 74px rgba(255,196,0,.04)
}
.auth-visual-top,.auth-visual-bottom{position:relative;z-index:1}
.auth-brand-chip{
  display:inline-flex;align-items:center;gap:12px;width:max-content;max-width:100%;
  padding:9px 13px 9px 9px;border:1px solid rgba(255,255,255,.18);border-radius:16px;
  background:rgba(9,9,9,.28);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)
}
.auth-brand-chip img{width:42px;height:42px;object-fit:contain;border-radius:12px;background:var(--auth-yellow);padding:3px}
.auth-brand-chip strong{display:block;font-size:1.02rem;letter-spacing:.08em}
.auth-brand-chip span{display:block;margin-top:3px;color:#f9e5b5;font-size:.64rem;font-weight:700;letter-spacing:.12em}
.auth-kicker{
  display:inline-flex;align-items:center;gap:9px;margin-top:clamp(48px,8vh,92px);
  color:#ffe28a;font-size:.72rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase
}
.auth-kicker::before{content:"";width:34px;height:3px;border-radius:99px;background:var(--auth-yellow)}
.auth-display{
  margin:17px 0 18px;max-width:620px;color:#fffdf7;
  font-family:"Fraunces",Georgia,serif;font-size:clamp(2.65rem,5vw,4.9rem);font-weight:750;line-height:.98;letter-spacing:-.045em
}
.auth-display span{color:var(--auth-yellow)}
.auth-lede{max-width:570px;margin:0;color:#f7ead3;font-size:clamp(1rem,1.45vw,1.13rem);line-height:1.72}
.auth-trust-list{display:grid;gap:12px;margin-top:38px}
.auth-trust-item{
  display:grid;grid-template-columns:42px minmax(0,1fr);gap:13px;align-items:center;
  padding:13px 14px;border:1px solid rgba(255,255,255,.16);border-radius:16px;
  background:rgba(9,9,9,.28);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)
}
.auth-trust-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:rgba(255,196,0,.16);color:var(--auth-yellow)}
.auth-trust-icon svg{width:21px;height:21px}
.auth-trust-item strong{display:block;color:#fffdf7;font-size:.94rem}
.auth-trust-item span{display:block;margin-top:3px;color:#e8d9bd;font-size:.79rem;line-height:1.4}

.auth-form-side{
  display:flex;align-items:center;justify-content:center;
  padding:clamp(34px,5vw,72px);
  background:
    linear-gradient(145deg,rgba(255,253,247,.98),rgba(255,248,225,.96)),
    radial-gradient(circle at 90% 8%,rgba(255,196,0,.18),transparent 17rem)
}
.auth-page--register .auth-form-side{align-items:flex-start;padding-top:clamp(34px,4vw,58px);padding-bottom:clamp(34px,4vw,58px)}
.auth-form-wrap{width:min(100%,520px)}
.auth-top-helper{margin:0 0 28px;text-align:right;color:var(--auth-soft-brown);font-size:.92rem}
.auth-top-helper a,.auth-inline-link{color:#9a6500;font-weight:800;text-underline-offset:3px}
.auth-top-helper a:hover,.auth-inline-link:hover{color:var(--auth-brown)}
.auth-form-kicker{display:inline-flex;align-items:center;gap:8px;color:#9a6500;font-size:.72rem;font-weight:850;letter-spacing:.13em;text-transform:uppercase}
.auth-form-kicker::before{content:"";width:28px;height:3px;border-radius:99px;background:var(--auth-yellow)}
.auth-title{margin:12px 0 8px;font-family:"Fraunces",Georgia,serif;font-size:clamp(2.25rem,4vw,3.35rem);line-height:1.04;letter-spacing:-.035em}
.auth-subtitle{margin:0 0 24px;color:var(--auth-soft-brown);font-size:1rem;line-height:1.6}

.auth-message{
  display:none;align-items:flex-start;gap:10px;margin:0 0 18px;padding:13px 14px;border-radius:14px;
  border:1px solid rgba(180,35,24,.2);background:#fff1f0;color:#7a1d16;font-size:.88rem;line-height:1.45
}
.auth-message.show{display:flex;animation:auth-message-in .18s ease-out}
.auth-message.success{border-color:rgba(21,115,71,.22);background:#eefaf4;color:#115b39}
.auth-message.info{border-color:rgba(115,81,10,.22);background:#fff8dc;color:#664609}
.auth-message i,.auth-message strong{flex:0 0 auto;margin-top:2px}
@keyframes auth-message-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}

.auth-form{display:grid;gap:17px}
.auth-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px}
.auth-form-grid .full{grid-column:1/-1}
.auth-field{display:grid;gap:8px;min-width:0}
.auth-field label{color:var(--auth-brown);font-size:.85rem;font-weight:750}
.auth-input-shell{position:relative;display:flex;align-items:center;min-width:0}
.auth-field-icon{
  position:absolute;left:14px;width:19px;height:19px;color:#876d4a;pointer-events:none;z-index:1
}
.auth-input-shell input{
  width:100%;height:52px;padding:0 48px 0 45px;border:1px solid var(--auth-border);border-radius:14px;
  outline:0;background:rgba(255,255,255,.8);color:var(--auth-brown);font-size:.94rem;
  transition:border-color var(--auth-transition),box-shadow var(--auth-transition),background var(--auth-transition)
}
.auth-input-shell input::placeholder{color:#9b8a72}
.auth-input-shell input:hover{border-color:rgba(216,146,0,.46);background:#fff}
.auth-input-shell input:focus{border-color:var(--auth-gold);box-shadow:0 0 0 4px rgba(255,196,0,.18);background:#fff}
.auth-input-shell input[aria-invalid="true"]{border-color:#d92d20;box-shadow:0 0 0 4px rgba(217,45,32,.10)}
.auth-password-toggle{
  position:absolute;right:8px;width:38px;height:38px;display:grid;place-items:center;border:0;border-radius:11px;
  background:transparent;color:#765d3f;transition:background var(--auth-transition),color var(--auth-transition)
}
.auth-password-toggle:hover,.auth-password-toggle:focus-visible{background:var(--auth-barley);color:var(--auth-brown);outline:0}
.auth-password-toggle svg{width:19px;height:19px}
.auth-field-note{color:#8c785e;font-size:.74rem;line-height:1.45}
.auth-form-row{display:flex;align-items:center;justify-content:flex-end;gap:14px;margin-top:-2px}
.auth-text-button{border:0;background:transparent;padding:5px 0;color:#8c5d00;font-weight:800;font-size:.84rem}
.auth-text-button:hover,.auth-text-button:focus-visible{color:var(--auth-brown);outline:0;text-decoration:underline;text-underline-offset:3px}
.auth-text-button:disabled{opacity:.55;cursor:not-allowed}

.auth-button{
  min-height:48px;display:inline-flex;align-items:center;justify-content:center;gap:10px;
  padding:0 20px;border-radius:13px;font-weight:800;text-decoration:none;border:1px solid transparent;
  transition:transform var(--auth-transition),box-shadow var(--auth-transition),background var(--auth-transition),border-color var(--auth-transition),color var(--auth-transition)
}
.auth-button svg{width:19px;height:19px;flex:0 0 auto}
.auth-button--full{width:100%}
.auth-button--primary{
  color:var(--auth-brown);background:linear-gradient(135deg,var(--auth-yellow-2),var(--auth-yellow));
  border-color:rgba(216,146,0,.72);box-shadow:0 13px 28px rgba(216,146,0,.25)
}
.auth-button--primary:hover:not(:disabled),.auth-button--primary:focus-visible:not(:disabled){transform:translateY(-2px);background:linear-gradient(135deg,#ffe37a,#ffcb1d);box-shadow:0 17px 34px rgba(216,146,0,.32);outline:0}
.auth-button--primary:active:not(:disabled){transform:translateY(0);box-shadow:0 8px 18px rgba(216,146,0,.24)}
.auth-button--secondary{color:var(--auth-brown);background:rgba(255,253,247,.72);border-color:rgba(216,146,0,.64)}
.auth-button--secondary:hover:not(:disabled),.auth-button--secondary:focus-visible:not(:disabled){background:var(--auth-barley);border-color:var(--auth-gold);outline:0;box-shadow:0 10px 24px rgba(43,27,13,.10)}
.auth-button:focus-visible{outline:3px solid rgba(43,27,13,.82)!important;outline-offset:3px!important}
.auth-button:disabled{opacity:.58;cursor:not-allowed;transform:none;box-shadow:none}
.auth-provider-button{
  width:100%;min-height:50px;display:flex;align-items:center;justify-content:center;gap:11px;
  border:1px solid var(--auth-border);border-radius:13px;background:#fff;color:var(--auth-brown);font-weight:750;
  transition:border-color var(--auth-transition),box-shadow var(--auth-transition),transform var(--auth-transition)
}
.auth-provider-button:hover:not(:disabled),.auth-provider-button:focus-visible:not(:disabled){border-color:rgba(216,146,0,.7);box-shadow:0 10px 24px rgba(43,27,13,.09);transform:translateY(-1px);outline:0}
.auth-provider-button:disabled{opacity:.58;cursor:not-allowed}
.auth-provider-mark{width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:#fff;border:1px solid rgba(43,27,13,.12);font-weight:900;color:#4285f4}
.auth-spinner{width:18px;height:18px;border:2px solid rgba(43,27,13,.25);border-top-color:var(--auth-brown);border-radius:50%;animation:auth-spin .72s linear infinite}
@keyframes auth-spin{to{transform:rotate(360deg)}}
.auth-divider{display:flex;align-items:center;gap:12px;margin:21px 0;color:#99856b;font-size:.76rem;font-weight:650}
.auth-divider::before,.auth-divider::after{content:"";height:1px;flex:1;background:rgba(43,27,13,.12)}
.auth-bottom-copy{margin:19px 0 0;text-align:center;color:var(--auth-soft-brown);font-size:.9rem}
.auth-security-note{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:16px;color:#8c785e;font-size:.75rem}
.auth-security-note svg{width:16px;height:16px;color:#9a6500}

.auth-role-selector{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:4px 0 22px}
.auth-role-option{position:relative;min-width:0}
.auth-role-option input{position:absolute;opacity:0;pointer-events:none}
.auth-role-card{
  min-height:84px;display:flex;align-items:center;gap:12px;padding:13px;border:1px solid var(--auth-border);border-radius:15px;
  background:rgba(255,255,255,.76);cursor:pointer;transition:all var(--auth-transition)
}
.auth-role-card:hover{border-color:rgba(216,146,0,.55);background:#fffaf0}
.auth-role-option input:focus-visible + .auth-role-card{outline:3px solid rgba(43,27,13,.78);outline-offset:3px}
.auth-role-option input:checked + .auth-role-card{border-color:var(--auth-gold);background:linear-gradient(135deg,#ffe27a,#ffc400);box-shadow:0 10px 24px rgba(216,146,0,.20)}
.auth-role-icon{width:42px;height:42px;display:grid;place-items:center;flex:0 0 auto;border-radius:13px;background:rgba(43,27,13,.08);color:var(--auth-brown)}
.auth-role-icon svg{width:21px;height:21px}
.auth-role-copy strong{display:block;font-size:.91rem}
.auth-role-copy span{display:block;margin-top:3px;color:#7d664a;font-size:.72rem;line-height:1.35}
.auth-role-option input:checked + .auth-role-card .auth-role-copy span{color:#5f4200}

.auth-password-strength{display:grid;gap:7px;margin-top:1px}
.auth-strength-bars{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}
.auth-strength-bars span{height:4px;border-radius:99px;background:#e8dece}
.auth-password-strength[data-level="1"] .auth-strength-bars span:nth-child(-n+1){background:#d92d20}
.auth-password-strength[data-level="2"] .auth-strength-bars span:nth-child(-n+2){background:#e6a700}
.auth-password-strength[data-level="3"] .auth-strength-bars span:nth-child(-n+3){background:#8a9d22}
.auth-password-strength[data-level="4"] .auth-strength-bars span{background:#157347}
.auth-strength-copy{display:flex;justify-content:space-between;gap:10px;color:#8c785e;font-size:.69rem}
.auth-strength-copy strong{color:var(--auth-soft-brown)}
.auth-terms-row{display:grid;grid-template-columns:20px minmax(0,1fr);gap:10px;align-items:start;color:#6d5940;font-size:.78rem;line-height:1.5;cursor:pointer}
.auth-terms-row input{width:18px;height:18px;margin:1px 0 0;accent-color:var(--auth-yellow)}
.auth-terms-row a{color:#8c5d00;font-weight:800;text-underline-offset:2px}

.auth-loader{
  position:fixed;inset:0;z-index:14000;display:grid;place-items:center;padding:20px;
  background:rgba(255,244,214,.94);backdrop-filter:blur(16px);transition:opacity .25s ease,visibility .25s ease
}
.auth-loader.hide{opacity:0;visibility:hidden;pointer-events:none}
.auth-loader-card{display:grid;justify-items:center;gap:11px;padding:26px;border:1px solid var(--auth-border);border-radius:22px;background:var(--auth-white);box-shadow:var(--auth-shadow);text-align:center}
.auth-loader-logo{width:62px;height:62px;display:grid;place-items:center;border-radius:19px;background:var(--auth-yellow);box-shadow:0 12px 25px rgba(216,146,0,.25);animation:auth-loader-pulse 1.15s ease-in-out infinite}
.auth-loader-logo img{width:52px;height:52px;object-fit:contain}
.auth-loader-card strong{font-family:"Fraunces",Georgia,serif;font-size:1.25rem}
.auth-loader-card span{color:var(--auth-soft-brown);font-size:.82rem}
@keyframes auth-loader-pulse{50%{transform:scale(1.04);box-shadow:0 0 0 12px rgba(255,196,0,.15)}}
.auth-noscript{margin:20px;padding:14px;border-radius:12px;background:#fff1f0;color:#7a1d16;text-align:center}

@media(max-width:1050px){
  .auth-page-shell{width:min(940px,calc(100% - 28px));padding-top:28px}
  .auth-card{grid-template-columns:minmax(0,.44fr) minmax(420px,.56fr)}
  .auth-visual{padding:34px;min-height:660px}
  .auth-display{font-size:clamp(2.45rem,5vw,3.7rem)}
  .auth-form-side{padding:36px}
}
@media(max-width:840px){
  .auth-page-shell{width:min(720px,calc(100% - 24px));padding:22px 0 44px}
  .auth-card{display:block;min-height:0;border-radius:25px}
  .auth-visual{min-height:390px;padding:28px;background-position:center 38%}
  .auth-page--register .auth-visual{background-position:center 42%}
  .auth-kicker{margin-top:38px}
  .auth-display{max-width:560px;font-size:clamp(2.35rem,8vw,3.7rem)}
  .auth-lede{max-width:580px}
  .auth-trust-list{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:28px}
  .auth-trust-item{display:flex;min-width:0;padding:10px}
  .auth-trust-icon{width:36px;height:36px;flex:0 0 auto}
  .auth-trust-item span{display:none}
  .auth-form-side{padding:36px 30px 42px}
  .auth-form-wrap{width:min(100%,560px)}
}
@media(max-width:620px){
  .auth-page-shell{width:100%;padding:0}
  .auth-card{border:0;border-radius:0;box-shadow:none}
  .auth-visual{min-height:360px;padding:24px 20px 26px}
  .auth-brand-chip{padding:7px 10px 7px 7px}.auth-brand-chip img{width:38px;height:38px}
  .auth-kicker{margin-top:32px;font-size:.65rem}
  .auth-display{margin-top:12px;font-size:clamp(2.18rem,11vw,3.25rem)}
  .auth-lede{font-size:.94rem;line-height:1.58}
  .auth-trust-list{grid-template-columns:1fr;gap:8px;margin-top:24px}
  .auth-trust-item{display:grid;grid-template-columns:36px minmax(0,1fr);padding:9px 11px}
  .auth-trust-item span{display:block;font-size:.72rem}
  .auth-form-side{padding:32px 20px 44px}
  .auth-top-helper{text-align:left;margin-bottom:22px}
  .auth-title{font-size:2.35rem}
  .auth-form-grid{grid-template-columns:1fr}
  .auth-form-grid .full{grid-column:auto}
  .auth-role-selector{grid-template-columns:1fr}
  .auth-role-card{min-height:72px}
  .auth-button{min-height:50px}
}
@media(max-width:380px){
  .auth-visual{padding-inline:17px}.auth-form-side{padding-inline:16px}.auth-display{font-size:2.05rem}.auth-input-shell input{padding-left:42px}
}
@media(max-height:720px) and (min-width:841px){
  .auth-page-shell{padding-top:24px;padding-bottom:34px}.auth-card{min-height:700px}.auth-visual{min-height:700px}.auth-kicker{margin-top:38px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}

.auth-input-shell select{width:100%;min-height:52px;border:0;background:transparent;color:var(--auth-brown);font:inherit;padding:0 44px 0 46px;outline:0;appearance:auto}.auth-input-shell select:focus-visible{outline:0}.auth-input-shell:focus-within{border-color:var(--auth-gold);box-shadow:0 0 0 4px rgba(255,196,0,.18)}

/* Phase 10: country selector uses the same accessible control system as other auth fields. */
.auth-input-wrap{
  position:relative;display:flex;align-items:center;width:100%;min-height:52px;
  border:1px solid var(--auth-border);border-radius:var(--auth-radius-sm);background:#fffdfa;
  transition:border-color var(--auth-transition),box-shadow var(--auth-transition),background var(--auth-transition)
}
.auth-input-wrap:focus-within{border-color:var(--auth-gold);box-shadow:0 0 0 4px rgba(255,196,0,.18);background:#fff}
.auth-input-wrap select{
  width:100%;min-width:0;min-height:52px;border:0!important;border-radius:inherit;background:transparent;color:var(--auth-brown);
  padding:0 42px 0 48px;font:inherit;font-size:16px;outline:0;appearance:auto
}
.auth-input-icon{
  position:absolute;left:15px;top:50%;z-index:1;width:21px;height:21px;display:grid;place-items:center;
  color:#9a7632;transform:translateY(-50%);pointer-events:none
}
.auth-input-icon svg{display:block;width:21px!important;height:21px!important;max-width:21px!important;max-height:21px!important;stroke-width:2}
.auth-field>small{display:block;margin-top:7px;color:var(--auth-soft-brown);font-size:.78rem;line-height:1.45}
