/* Middleby Shared Authentication UI — Phase 1
 * Visual-only layer for login, password and MFA flows.
 * Namespaced to avoid changing operational screens.
 */
:root{
  --mb-auth-navy-950:#062f47;
  --mb-auth-navy-900:#073954;
  --mb-auth-navy-800:#0b4a68;
  --mb-auth-blue-700:#126581;
  --mb-auth-red-600:#df263f;
  --mb-auth-red-700:#c91f36;
  --mb-auth-bg:#eef5f8;
  --mb-auth-surface:#fff;
  --mb-auth-soft:#f7fafc;
  --mb-auth-text:#10283a;
  --mb-auth-muted:#5b7083;
  --mb-auth-line:#cbdce6;
  --mb-auth-success:#137a4e;
  --mb-auth-focus:0 0 0 3px rgba(18,101,129,.24);
  --mb-auth-shadow:0 22px 58px rgba(6,47,71,.16);
}
body.mb-auth-page{
  display:block;
  min-height:100vh;
  margin:0;
  padding:0;
  background:var(--mb-auth-bg);
  color:var(--mb-auth-text);
  font-family:"Segoe UI",Roboto,Arial,sans-serif;
}
.mb-auth-page *{box-sizing:border-box}
.mb-auth-shell{display:grid;grid-template-columns:minmax(370px,46%) minmax(0,54%);min-height:100vh}
.mb-auth-hero{
  position:relative;
  isolation:isolate;
  display:flex;
  align-items:center;
  overflow:hidden;
  padding:clamp(42px,6vw,88px);
  color:#fff;
  background:
    linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px),
    linear-gradient(145deg,var(--mb-auth-navy-900),#07516d 62%,#0b637c);
  background-size:70px 70px,70px 70px,auto;
}
.mb-auth-hero::before,.mb-auth-hero::after{content:"";position:absolute;z-index:-1;border:1px solid rgba(255,255,255,.12);border-radius:50%;pointer-events:none}
.mb-auth-hero::before{width:480px;height:480px;right:-165px;top:-145px}
.mb-auth-hero::after{width:270px;height:270px;left:48%;bottom:-120px;border-width:28px;border-color:rgba(255,255,255,.055)}
.mb-auth-hero-content{position:relative;width:min(560px,100%);margin:auto}
.mb-auth-logo-plate{display:inline-flex;align-items:center;justify-content:center;max-width:350px;min-height:78px;margin-bottom:26px;padding:16px 24px;border-radius:17px;background:#fff;box-shadow:0 14px 36px rgba(2,27,40,.24)}
.mb-auth-logo-plate img{display:block;width:auto;height:auto;max-width:100%;max-height:58px;object-fit:contain}
.mb-auth-product-pill{display:inline-flex;align-items:center;min-height:31px;margin-bottom:24px;padding:5px 15px;border:1px solid rgba(255,255,255,.32);border-radius:999px;background:rgba(4,37,54,.18);color:#fff;font-size:.79rem;font-weight:850;letter-spacing:.14em;text-transform:uppercase}
.mb-auth-hero h1{max-width:620px;margin:0 0 18px;color:#fff;font-size:clamp(2.65rem,5vw,4.65rem);font-weight:800;line-height:1.02;letter-spacing:-.035em}
.mb-auth-hero p{max-width:580px;margin:0;color:#dcecf2;font-size:clamp(1rem,1.5vw,1.2rem);line-height:1.62}
.mb-auth-main{position:relative;display:flex;align-items:center;justify-content:center;padding:84px clamp(24px,5vw,72px) 48px;background:radial-gradient(circle at 90% 5%,rgba(18,101,129,.08),transparent 30%),var(--mb-auth-bg)}
.mb-auth-toolbar{position:absolute;top:25px;right:clamp(24px,4vw,52px);display:flex;align-items:center;gap:11px;z-index:2}
.mb-auth-toolbar label,.mb-auth-context-label{color:#405d70;font-size:.86rem;font-weight:800}
.mb-auth-toolbar select{min-width:190px;min-height:47px;padding:9px 42px 9px 14px;border:1px solid var(--mb-auth-line);border-radius:12px;background:#fff;color:var(--mb-auth-text);font:inherit;font-weight:700;box-shadow:0 4px 16px rgba(6,47,71,.06)}
.mb-auth-toolbar select:focus-visible{outline:none;box-shadow:var(--mb-auth-focus)}
.mb-auth-context{display:flex;align-items:center;gap:8px;min-height:45px;padding:8px 14px;border:1px solid var(--mb-auth-line);border-radius:999px;background:#fff;color:var(--mb-auth-navy-900);font-size:.86rem;font-weight:800;box-shadow:0 4px 16px rgba(6,47,71,.06)}
.mb-auth-context::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--mb-auth-blue-700);box-shadow:0 0 0 4px rgba(18,101,129,.10)}
.mb-auth-wrap{width:min(680px,100%)}
.mb-auth-card{width:100%;padding:clamp(25px,4vw,38px);border:1px solid rgba(203,220,230,.94);border-radius:22px;background:rgba(255,255,255,.98);box-shadow:var(--mb-auth-shadow)}
.mb-auth-card--wide{width:min(820px,100%)}
.mb-auth-card-brand{display:flex;align-items:center;gap:13px;min-height:52px;padding-bottom:20px;border-bottom:1px solid #dbe5eb}
.mb-auth-card-brand img{display:block;width:auto;height:auto;max-width:245px;max-height:47px;margin:0;object-fit:contain;object-position:left center}
.mb-auth-card-product{display:inline-flex;align-items:center;justify-content:center;min-height:31px;padding:5px 12px;border-radius:8px;background:var(--mb-auth-red-600);color:#fff;font-size:.76rem;font-weight:850;letter-spacing:.07em;text-transform:uppercase}
.mb-auth-heading{margin:25px 0 8px;color:var(--mb-auth-text);font-size:clamp(1.85rem,3.5vw,2.55rem);line-height:1.15;letter-spacing:-.025em}
.mb-auth-subtitle{margin:0 0 23px;color:var(--mb-auth-muted);font-size:1rem;line-height:1.55}
.mb-auth-page .field{display:flex;flex-direction:column;gap:7px;margin-bottom:17px}
.mb-auth-page .field label{color:var(--mb-auth-text);font-size:.91rem;font-weight:800}
.mb-auth-page .field input,.mb-auth-page .field select{width:100%;min-height:48px;padding:10px 13px;border:1px solid #afc4d0;border-radius:10px;background:#fff;color:var(--mb-auth-text);font:inherit}
.mb-auth-page .field input:focus,.mb-auth-page .field select:focus{outline:none;border-color:var(--mb-auth-blue-700);box-shadow:var(--mb-auth-focus)}
.mb-auth-page .field input::placeholder{color:#8ba0af}
.mb-auth-page .help,.mb-auth-help{margin:0;color:var(--mb-auth-muted);font-size:.84rem;line-height:1.45}
.mb-auth-page .btn,.mb-auth-page button{min-height:48px;border-radius:10px;padding:10px 17px;font-weight:800}
.mb-auth-page .btn-red{background:var(--mb-auth-red-600);box-shadow:0 8px 20px rgba(223,38,63,.20)}
.mb-auth-page .btn-red:hover{background:var(--mb-auth-red-700);filter:none}
.mb-auth-page .btn-outline{border-color:#9eb8c7;background:#fff;color:var(--mb-auth-navy-900)}
.mb-auth-page .btn-outline:hover{background:#edf5f8;filter:none}
.mb-auth-page .button-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:18px}
.mb-auth-page .button-row>.btn,.mb-auth-page .button-row>button{flex:1 1 170px}
.mb-auth-links{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:19px;padding-top:18px;border-top:1px solid #e2ebef;font-size:.9rem;font-weight:750}
.mb-auth-links a{color:var(--mb-auth-navy-800)}
.mb-auth-back{margin:20px 0 0;text-align:center;font-size:.9rem}
.mb-auth-page .alert{margin:18px 0;border-radius:11px}
.mb-auth-version{margin:22px 0 0;color:#8a9aa6;font-size:.77rem;text-align:center}
.mb-auth-eyebrow{display:inline-flex;align-items:center;gap:7px;margin-top:23px;color:var(--mb-auth-blue-700);font-size:.78rem;font-weight:850;letter-spacing:.08em;text-transform:uppercase}
.mb-auth-eyebrow::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
.mb-qr-card{display:grid;grid-template-columns:minmax(215px,255px) minmax(0,1fr);gap:24px;align-items:start;margin-top:20px;padding:20px;border:1px solid var(--mb-auth-line);border-radius:15px;background:var(--mb-auth-soft)}
.mb-qr-visual{display:grid;gap:12px;justify-items:center}
.mb-qr-title{margin:0;color:var(--mb-auth-text);font-size:1rem;font-weight:800;text-align:center}
.mb-qr-frame{display:grid;place-items:center;width:min(100%,230px);aspect-ratio:1;padding:14px;border:1px solid #dbe6ec;border-radius:12px;background:#fff;box-shadow:0 5px 18px rgba(6,47,71,.08);overflow:hidden}
.mb-qr-frame canvas,.mb-qr-frame svg,.mb-qr-frame img{display:block;width:100%;height:100%;image-rendering:pixelated}
.mb-qr-fallback{padding:18px;color:var(--mb-auth-muted);font-size:.9rem;text-align:center;line-height:1.45}
.mb-qr-details{display:grid;gap:15px;min-width:0}
.mb-copy-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:stretch}
.mb-secret-code{display:flex;align-items:center;min-height:46px;padding:10px 12px;border:1px dashed var(--mb-auth-line);border-radius:9px;background:#edf4f7;color:var(--mb-auth-text);font:700 .92rem ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow-wrap:anywhere;word-break:break-all}
.mb-copy-button{min-width:78px;min-height:46px;border:1px solid #9ebcca;border-radius:9px;background:#fff;color:var(--mb-auth-navy-900);font-weight:800;cursor:pointer;box-shadow:none}
.mb-copy-button:hover{background:#eaf3f7;filter:none}
.mb-copy-button:focus-visible,.mb-qr-tech summary:focus-visible{outline:none;box-shadow:var(--mb-auth-focus)}
.mb-qr-help{margin:6px 0 0;color:var(--mb-auth-muted);font-size:.82rem;line-height:1.4}
.mb-qr-tech{border-top:1px solid #dce6eb;padding-top:10px}
.mb-qr-tech summary{cursor:pointer;color:var(--mb-auth-text);font-weight:780}
.mb-qr-tech code{display:block;max-height:118px;margin-top:8px;padding:10px;border-radius:8px;background:#eaf1f5;color:#24455a;font-size:.78rem;overflow:auto;overflow-wrap:anywhere;white-space:normal}
.mb-recovery-panel{margin-top:20px;padding:20px;border:1px solid #b8dfca;border-radius:14px;background:#eefaf3}
.mb-recovery-panel h2{margin:0 0 8px;color:#0f5f3a}
.mb-recovery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:16px 0}
.mb-recovery-grid code{display:block;padding:10px;border:1px solid #cae7d6;border-radius:8px;background:#fff;color:#143b2a;font:750 .9rem ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;text-align:center}
.mb-recovery-actions{display:flex;gap:10px;flex-wrap:wrap}
.mb-recovery-copy-source{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:pre!important;border:0!important}
.mb-auth-note{margin:18px 0 0;padding:13px 15px;border-left:4px solid var(--mb-auth-blue-700);border-radius:9px;background:#eaf4f8;color:#244b61;font-size:.88rem;line-height:1.48}
@media(max-width:980px){
  .mb-auth-shell{grid-template-columns:minmax(300px,38%) minmax(0,62%)}
  .mb-auth-hero{padding:42px 34px}
  .mb-auth-logo-plate{max-width:290px}
  .mb-auth-hero h1{font-size:clamp(2.25rem,5vw,3.5rem)}
}
@media(max-width:760px){
  .mb-auth-shell{display:block}
  .mb-auth-hero{min-height:255px;padding:34px 24px}
  .mb-auth-hero::before{width:330px;height:330px;right:-130px;top:-155px}
  .mb-auth-logo-plate{min-height:62px;margin-bottom:18px;padding:11px 17px}
  .mb-auth-logo-plate img{max-height:42px}
  .mb-auth-product-pill{margin-bottom:14px}
  .mb-auth-hero h1{max-width:520px;margin-bottom:10px;font-size:clamp(2rem,9vw,3rem)}
  .mb-auth-hero p{font-size:.96rem}
  .mb-auth-main{display:block;padding:82px 16px 30px}
  .mb-auth-toolbar{top:18px;left:16px;right:16px;justify-content:flex-end}
  .mb-auth-toolbar select{min-width:170px}
  .mb-auth-wrap{margin:auto}
  .mb-auth-card{padding:24px 20px;border-radius:18px}
  .mb-qr-card{grid-template-columns:1fr}
  .mb-qr-frame{width:min(100%,210px)}
}
@media(max-width:480px){
  .mb-auth-hero{min-height:225px}
  .mb-auth-hero p{display:none}
  .mb-auth-toolbar label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .mb-auth-toolbar select{width:100%;min-width:0}
  .mb-auth-context{max-width:100%;font-size:.8rem}
  .mb-auth-card-brand{align-items:flex-start;flex-direction:column}
  .mb-auth-card-brand img{max-width:210px;max-height:43px}
  .mb-copy-row{grid-template-columns:1fr}
  .mb-copy-button{width:100%}
  .mb-recovery-grid{grid-template-columns:1fr}
  .mb-auth-links{flex-direction:column}
}
@media(prefers-reduced-motion:reduce){.mb-auth-page *{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
