:root{
  --primary:#0870f2;
  --primary-dark:#0759bd;
  --primary-soft:#e8f1ff;
  --accent:#6638ef;
  --success:#087047;
  --warning:#b45309;
  --danger:#b42318;
  --bg:#f4f7fc;
  --surface:#ffffff;
  --surface-soft:#f8fafc;
  --text:#101828;
  --muted:#667085;
  --line:#dbe4ef;
  --shadow:0 16px 42px rgba(16,24,40,.08);
  --radius:8px;
  --topbar:76px;
  color-scheme:light;
}
*{box-sizing:border-box}
html{min-height:100%;-webkit-text-size-adjust:100%}
body{margin:0;min-height:100dvh;background:radial-gradient(circle at 0 0,rgba(8,112,242,.09),transparent 30%),radial-gradient(circle at 100% 0,rgba(102,56,239,.08),transparent 25%),var(--bg);color:var(--text);font:16px/1.5 Inter,Segoe UI,system-ui,-apple-system,Arial,sans-serif}
a{color:inherit}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.client-shell{display:grid;grid-template-columns:260px minmax(0,1fr);min-height:100dvh}
.client-sidebar{position:sticky;top:0;height:100dvh;padding:18px;border-right:1px solid var(--line);background:rgba(255,255,255,.9);backdrop-filter:blur(14px)}
.client-brand{display:flex;align-items:center;gap:10px;min-height:48px;margin-bottom:22px;text-decoration:none;font-weight:900;color:var(--text)}
.client-brand img{width:38px;height:38px;object-fit:contain;border-radius:8px;background:#fff;border:1px solid var(--line);padding:5px}
.client-brand-mark{display:grid;place-items:center;width:38px;height:38px;border-radius:8px;background:linear-gradient(135deg,var(--primary),var(--accent));color:#fff;font-weight:950}
.client-brand-mark:has(img){background:#fff;border:1px solid var(--line);padding:4px;overflow:hidden}.client-brand-mark img{width:100%;height:100%;object-fit:contain;display:block}
.side-nav{display:grid;gap:6px}
.side-nav a{display:flex;align-items:center;gap:10px;min-height:46px;padding:10px 12px;border-radius:var(--radius);color:#475467;text-decoration:none;font-weight:750;transition:background .18s ease,color .18s ease,transform .18s ease}
.side-nav a:hover{background:var(--surface-soft);color:var(--primary);transform:translateX(2px)}
.side-nav a.active{background:linear-gradient(135deg,rgba(8,112,242,.13),rgba(102,56,239,.09));color:var(--primary)}
.client-main{min-width:0}
.client-topbar{position:sticky;top:0;z-index:20;min-height:var(--topbar);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 24px;border-bottom:1px solid rgba(219,228,239,.86);background:rgba(245,247,251,.88);backdrop-filter:blur(14px)}
.client-topbar h1{margin:2px 0 0;font-size:24px;line-height:1.16;letter-spacing:0}
.eyebrow{display:inline-flex;color:var(--primary);font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:0}
.top-actions{display:flex;align-items:center;gap:10px}
.icon-button{position:relative;display:grid;place-items:center;width:46px;height:46px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:#344054;text-decoration:none}
.badge{position:absolute;right:5px;top:4px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--danger);color:#fff;font-size:11px;font-weight:900;display:grid;place-items:center;animation:pulse 1.8s ease infinite}
.client-avatar,.profile-avatar{display:grid;place-items:center;border-radius:999px;background:linear-gradient(135deg,var(--primary),var(--accent));color:#fff;font-weight:950}
.client-avatar{width:46px;height:46px}.profile-avatar{width:88px;height:88px;font-size:34px;margin-bottom:14px}
.client-content{width:min(1180px,100%);margin:0 auto;padding:24px 24px 104px}
.hero-panel,.panel-card,.metric-card,.ticket-card,.device-card,.zone-card,.login-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.hero-panel{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:24px;margin-bottom:18px;overflow:hidden;animation:rise .32s ease both}
.hero-panel h2{margin:4px 0 8px;font-size:30px;line-height:1.15;letter-spacing:0}.hero-panel p,.muted{color:var(--muted);margin:0}
.ticket-zone-note{display:block;margin:-2px 0 8px;color:var(--muted);font-size:12px;font-weight:850}
.hero-actions,.action-row{display:flex;gap:10px;flex-wrap:wrap}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 14px;border-radius:var(--radius);border:1px solid transparent;text-decoration:none;font-weight:850;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.btn:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(16,24,40,.12)}.btn:active{transform:translateY(0) scale(.98)}
.btn.primary{background:linear-gradient(135deg,var(--primary),var(--accent));color:#fff;box-shadow:0 12px 28px rgba(8,112,242,.22)}.btn.primary:hover{background:linear-gradient(135deg,var(--primary-dark),var(--accent))}
.btn.secondary{background:#fff;color:#344054;border-color:var(--line)}
.btn.disabled{background:#fef3f2;color:var(--danger);border-color:#fecdca;box-shadow:none;cursor:not-allowed}
.btn.disabled:hover{transform:none;box-shadow:none}
.btn.small{min-height:36px;padding:7px 10px;font-size:13px}.btn.danger{color:var(--danger)}
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.metric-card{padding:18px;animation:rise .32s ease both}
.metric-card span,.ticket-meta span,.info-list span{display:block;color:var(--muted);font-size:12px;font-weight:800;text-transform:uppercase}
.metric-card strong{display:block;margin-top:8px;font-size:24px;line-height:1.2;color:var(--text);font-variant-numeric:tabular-nums}
.metric-card small{display:block;margin-top:8px;color:var(--muted)}
.progress{height:8px;border-radius:999px;background:#e7edf5;overflow:hidden;margin-top:14px}.progress i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--primary),var(--accent));animation:fill .7s ease both}
.two-col{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}.panel-card{padding:20px;animation:rise .32s ease both}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.section-head h3,.panel-card h3{margin:0;font-size:18px}.section-head a{color:var(--primary);font-weight:850;text-decoration:none}
.list{display:grid;gap:8px}.list-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-soft)}
.list-row strong{display:block}.list-row span{display:block;color:var(--muted);font-size:13px}.list-row.unread{border-color:var(--primary);background:#f0fdfa}
.right{text-align:right}.status{display:inline-flex;align-items:center;min-height:26px;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:900}.status.ok{background:#ecfdf3;color:var(--success)}.status.warn{background:#fffaeb;color:var(--warning)}.status.bad{background:#fef3f2;color:var(--danger)}.status.muted{background:#eef2f6;color:#475467}
.alert{padding:12px 14px;border-radius:var(--radius);font-weight:800;margin-bottom:12px}.alert.ok{background:#ecfdf3;color:var(--success)}.alert.warn{background:#fffaeb;color:var(--warning)}.alert.bad{background:#fef3f2;color:var(--danger)}
.empty{padding:18px;border:1px dashed #b8c4d4;border-radius:var(--radius);color:var(--muted);text-align:center;background:#fff}.empty.wide{grid-column:1/-1}
.card-grid,.device-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px}
.ticket-card,.device-card,.zone-card{padding:18px;display:grid;gap:14px;animation:rise .32s ease both}
.history-list{display:grid;gap:10px}
.history-row{display:grid;grid-template-columns:minmax(240px,1.2fr) minmax(260px,1fr) minmax(220px,.8fr) auto;gap:14px;align-items:center;padding:14px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:0 8px 22px rgba(16,24,40,.06);animation:rise .28s ease both}
.history-main{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0}
.history-main h2{margin:4px 0 0;font-size:18px;line-height:1.2}
.history-meta{grid-template-columns:repeat(3,minmax(0,1fr))}
.history-credentials{grid-template-columns:1fr 1fr}
.ticket-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.ticket-top h2,.zone-card h2,.device-card h2{margin:4px 0 0;font-size:20px;line-height:1.2}
.ticket-meta{display:grid;grid-template-columns:1fr 1fr;gap:10px}.ticket-meta strong,.info-list strong{display:block;color:var(--text);font-size:14px;margin-top:3px}
.credential-box{display:grid;grid-template-columns:1fr 1fr;gap:10px}.credential-box div{min-width:0;padding:12px;border-radius:var(--radius);background:var(--surface-soft);border:1px solid var(--line)}.credential-box small{display:block;color:var(--muted);font-weight:800}.credential-box code{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:4px;font-weight:900;color:var(--text)}
.filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.filters label,.form-stack label{display:grid;gap:6px;color:#344054;font-weight:800}.filters input,.filters select,.form-stack input,.form-stack select,.form-stack textarea{min-height:44px;border:1px solid #cfd8e3;border-radius:var(--radius);padding:10px 12px;background:#fff;color:var(--text);outline:none}.filters input:focus,.filters select:focus,.form-stack input:focus,.form-stack select:focus,.form-stack textarea:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(15,118,110,.14)}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:var(--radius)}table{width:100%;border-collapse:collapse;min-width:780px;background:#fff}th,td{padding:12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}th{font-size:12px;color:var(--muted);text-transform:uppercase;background:var(--surface-soft)}
.zone-status{width:max-content;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:900}.zone-status.ok{background:#ecfdf3;color:var(--success)}.zone-status.warn{background:#fffaeb;color:var(--warning)}.zone-status.bad{background:#fef3f2;color:var(--danger)}
.profile-card{text-align:center}.info-list{display:grid;gap:10px}.info-list div{padding:12px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-soft)}
.floating-action{position:fixed;right:22px;bottom:22px;z-index:40;display:grid;place-items:center;width:58px;height:58px;border-radius:999px;background:var(--primary);color:#fff;box-shadow:0 18px 42px rgba(15,118,110,.32);transition:transform .16s ease}.floating-action:hover{transform:translateY(-2px)}.floating-action svg{width:26px;height:26px}
.bottom-nav{display:none}.toast-host{position:fixed;right:18px;bottom:18px;z-index:80;display:grid;gap:8px}.toast{padding:12px 14px;border-radius:var(--radius);background:#101828;color:#fff;box-shadow:var(--shadow);animation:toast .2s ease both}
.login-screen,.client-auth-screen{display:grid;place-items:center;padding:18px;background:radial-gradient(circle at 0 0,rgba(8,112,242,.12),transparent 32%),radial-gradient(circle at 100% 15%,rgba(102,56,239,.1),transparent 28%),var(--bg)}.login-wrap{width:min(520px,100%)}.login-card{padding:24px}.login-brand{display:flex;align-items:center;gap:12px;margin-bottom:12px}.login-brand img{width:52px;height:52px;object-fit:contain}.login-brand h1{margin:0;font-size:28px}.form-stack{display:grid;gap:14px;margin-top:18px}.login-actions{display:flex;justify-content:space-between;gap:12px;margin-top:18px}.login-actions a{color:var(--primary);font-weight:850;text-decoration:none}
.client-auth-shell{width:min(1080px,100%);display:grid;grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr);gap:18px;align-items:stretch}
.auth-visual,.auth-card{background:rgba(255,255,255,.9);border:1px solid rgba(219,228,239,.92);border-radius:8px;box-shadow:var(--shadow);animation:rise .32s ease both}
.auth-visual{position:relative;overflow:hidden;min-height:620px;padding:24px;display:grid;align-content:space-between;background:linear-gradient(135deg,rgba(8,112,242,.92),rgba(102,56,239,.9));color:#fff}
.auth-visual:before{content:"";position:absolute;inset:auto -18% -26% auto;width:430px;height:430px;border-radius:50%;background:rgba(255,255,255,.13);animation:floatAuth 12s ease-in-out infinite}
.auth-brand{position:relative;z-index:1;display:flex;align-items:center;gap:11px;color:#fff;text-decoration:none}.auth-brand img{width:44px;height:44px;border-radius:8px;background:#fff;padding:6px;object-fit:contain}.auth-brand strong{display:block}.auth-brand small{display:block;opacity:.76;font-weight:700}
.auth-hero{position:relative;z-index:1;max-width:560px}.auth-hero .eyebrow{background:rgba(255,255,255,.18);color:#fff}.auth-hero h1{margin:14px 0 12px;font-size:clamp(32px,4.5vw,52px);line-height:1.04;letter-spacing:0}.auth-hero p{margin:0;color:rgba(255,255,255,.82);font-size:17px;line-height:1.65}
.auth-preview{position:relative;z-index:1;display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.auth-preview div{padding:13px;border-radius:8px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.2);backdrop-filter:blur(10px)}.auth-preview span{display:block;font-size:11px;text-transform:uppercase;font-weight:900;opacity:.72}.auth-preview strong{display:block;margin-top:5px;font-size:15px}
.auth-card{padding:24px;align-self:center}.auth-card-head h2{margin:6px 0 4px;font-size:30px;line-height:1.15}.auth-card-head p{margin:0;color:var(--muted)}
.btn.block{width:100%}.auth-message{margin-top:14px}
.auth-modal{position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;padding:18px;background:rgba(15,23,42,.52);backdrop-filter:blur(7px)}.auth-modal.open{display:flex;animation:fade .18s ease both}
.auth-modal-card{position:relative;width:min(420px,100%);padding:24px;background:#fff;border-radius:8px;border:1px solid var(--line);box-shadow:0 28px 80px rgba(15,23,42,.28);text-align:center;animation:modalPop .24s cubic-bezier(.2,.9,.3,1.15) both}.auth-modal-card h2{margin:10px 0 6px;font-size:24px}.auth-modal-card p{margin:0 0 16px;color:var(--muted)}
.modal-close{position:absolute;right:12px;top:12px;width:40px;height:40px;border:0;border-radius:8px;background:#f1f5f9;color:#334155;font-weight:900;cursor:pointer}.modal-check{width:54px;height:54px;margin:0 auto;border-radius:999px;background:linear-gradient(135deg,var(--primary),var(--accent));display:grid;place-items:center;color:#fff;font-weight:950}
.otp-inputs{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin:16px 0}.otp-inputs input{height:52px;text-align:center;font-size:22px;font-weight:900;border:1px solid #cfd8e3;border-radius:8px;outline:none}.otp-inputs input:focus{border-color:var(--primary);box-shadow:0 0 0 3px rgba(8,112,242,.14)}
@keyframes floatAuth{50%{transform:translate(-26px,-18px) rotate(10deg)}}@keyframes fade{from{opacity:0}to{opacity:1}}@keyframes modalPop{from{opacity:0;transform:translateY(16px) scale(.97)}to{opacity:1;transform:none}}
.auth-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin-top:18px;padding:4px;border-radius:8px;background:#eef2f8}
.auth-tabs button{border:0;background:transparent;min-height:42px;border-radius:7px;color:var(--muted);font-weight:850;cursor:pointer;transition:background .18s ease,color .18s ease,box-shadow .18s ease}
.auth-tabs button.active{background:#fff;color:var(--primary);box-shadow:0 2px 8px rgba(16,24,40,.08)}
.auth-panel{display:none}.auth-panel.active{display:grid}
.form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes fill{from{width:0}}@keyframes pulse{50%{transform:scale(1.08)}}@keyframes toast{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:980px){.client-shell,.client-auth-shell{grid-template-columns:1fr}.auth-visual{min-height:360px}.client-sidebar{display:none}.client-topbar{min-height:68px;padding:12px 16px}.client-content{padding:16px 16px 112px}.hero-panel{display:grid}.metric-grid{grid-template-columns:1fr 1fr}.two-col{grid-template-columns:1fr}.history-row{grid-template-columns:1fr}.history-main{align-items:center}.floating-action{bottom:86px;right:16px}.bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:45;display:grid;grid-template-columns:repeat(5,1fr);gap:2px;padding:7px 8px calc(7px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:rgba(255,255,255,.94);backdrop-filter:blur(14px)}.bottom-nav a{display:grid;place-items:center;gap:2px;min-height:52px;border-radius:var(--radius);text-decoration:none;color:#667085;font-size:11px;font-weight:850}.bottom-nav a.active{background:var(--primary-soft);color:var(--primary-dark)}.bottom-nav svg{width:21px;height:21px}.toast-host{left:16px;right:16px;bottom:92px}.toast{width:100%}}
@media(max-width:560px){.client-auth-screen{padding:10px}.auth-visual{min-height:270px;padding:18px}.auth-hero h1{font-size:28px}.auth-hero p{font-size:14px}.auth-preview{grid-template-columns:1fr}.auth-card{padding:18px}.auth-card-head h2{font-size:24px}.otp-inputs{gap:6px}.otp-inputs input{height:46px;font-size:19px}.client-topbar h1{font-size:20px}.hero-panel,.panel-card,.metric-card,.ticket-card,.device-card,.zone-card{padding:16px}.hero-panel h2{font-size:24px}.metric-grid,.ticket-meta,.credential-box,.form-grid-2{grid-template-columns:1fr}.filters{display:grid}.filters .btn,.filters label{width:100%}.action-row,.hero-actions{display:grid}.action-row .btn,.hero-actions .btn{width:100%}.top-actions{gap:6px}.icon-button,.client-avatar{width:42px;height:42px}.login-card{padding:20px}.auth-tabs{grid-template-columns:1fr}.login-actions{display:grid}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

/* Client login: compact responsive shell inspired by the provided client/index mockup. */
.client-auth-screen{
  display:block;
  min-height:100dvh;
  padding:clamp(12px,3vw,28px);
  background:
    radial-gradient(820px 360px at 8% -8%,rgba(14,165,233,.18),transparent 62%),
    radial-gradient(820px 360px at 105% 5%,rgba(11,138,91,.16),transparent 56%),
    #f6f7f9;
  overflow-x:hidden;
}
.client-auth-shell{
  width:min(1120px,100%);
  min-height:calc(100dvh - clamp(24px,6vw,56px));
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(360px,430px);
  gap:16px;
  align-items:center;
}
.auth-visual,.auth-card{
  border-radius:18px;
  border:1px solid rgba(234,236,239,.92);
  box-shadow:0 12px 32px rgba(15,23,42,.10);
}
.auth-visual{
  min-height:min(640px,calc(100dvh - 56px));
  padding:clamp(20px,4vw,34px);
  background:linear-gradient(135deg,#0b8a5b 0%,#0ea5e9 100%);
}
.auth-visual:before{
  width:360px;
  height:360px;
  right:-110px;
  bottom:-150px;
}
.auth-brand{align-self:start}
.auth-brand img,.auth-brand-mark{
  width:44px;
  height:44px;
  border-radius:12px;
  background:#fff;
  color:#0b8a5b;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  font-weight:900;
  box-shadow:0 10px 24px rgba(2,6,23,.12);
}
.auth-brand img{padding:6px;object-fit:contain}
.auth-hero h1{
  max-width:13ch;
  margin:14px 0 12px;
  font-size:clamp(32px,5vw,54px);
  line-height:1.03;
}
.auth-hero p{
  max-width:58ch;
  font-size:16px;
}
.auth-preview{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.auth-preview div{
  min-width:0;
  border-radius:14px;
}
.auth-preview strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.auth-card{
  align-self:center;
  width:100%;
  max-height:calc(100dvh - 56px);
  overflow:auto;
  padding:clamp(20px,3vw,28px);
  background:rgba(255,255,255,.96);
}
.auth-card-head h2{
  font-size:clamp(24px,3vw,32px);
}
.auth-card-head p{
  font-size:14px;
  line-height:1.55;
}
.auth-tabs{
  grid-template-columns:repeat(3,minmax(0,1fr));
  border-radius:14px;
  padding:4px;
  gap:4px;
}
.auth-tabs button{
  min-width:0;
  min-height:44px;
  padding:8px 6px;
  border-radius:11px;
  font-size:13px;
  line-height:1.15;
  overflow:hidden;
  text-overflow:ellipsis;
}
.auth-panel.active{
  display:grid;
  animation:rise .24s ease both;
}
.form-stack{
  gap:13px;
}
.form-stack label{
  gap:7px;
  font-size:13px;
}
.form-stack input,.form-stack select,.form-stack textarea{
  width:100%;
  min-height:46px;
  border-radius:12px;
  font-size:16px;
}
.form-grid-2{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.client-auth-screen .btn.block{
  min-height:48px;
  border-radius:12px;
}
.login-actions{
  align-items:center;
  flex-wrap:wrap;
}
.auth-modal-card{
  border-radius:18px;
}
.otp-inputs{
  grid-template-columns:repeat(6,minmax(0,1fr));
}
.otp-inputs input{
  min-width:0;
}
@media(max-width:900px){
  .client-auth-shell{
    grid-template-columns:1fr;
    align-items:start;
    min-height:0;
  }
  .auth-visual{
    min-height:0;
    gap:24px;
  }
  .auth-card{
    max-height:none;
    overflow:visible;
  }
  .auth-hero h1{
    max-width:15ch;
  }
}
@media(max-width:560px){
  .client-auth-screen{
    padding:10px;
  }
  .client-auth-shell{
    gap:10px;
  }
  .auth-visual,.auth-card{
    border-radius:16px;
  }
  .auth-visual{
    padding:16px;
  }
  .auth-hero{
    margin-top:18px;
  }
  .auth-hero h1{
    max-width:none;
    font-size:28px;
    line-height:1.08;
  }
  .auth-hero p{
    font-size:14px;
    line-height:1.55;
  }
  .auth-preview{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
  }
  .auth-preview div{
    padding:9px 8px;
  }
  .auth-preview span{
    font-size:9px;
  }
  .auth-preview strong{
    font-size:12px;
  }
  .auth-card{
    padding:16px;
  }
  .auth-tabs{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
  .auth-tabs button{
    font-size:11px;
    padding:7px 4px;
  }
  .form-grid-2{
    grid-template-columns:1fr;
  }
  .login-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    text-align:center;
  }
}
@media(max-width:380px){
  .auth-preview{
    grid-template-columns:1fr;
  }
  .login-actions{
    grid-template-columns:1fr;
  }
}
@media(prefers-reduced-motion:reduce){
  .auth-panel.active,.auth-visual:before{
    animation:none!important;
  }
}

/* Client auth redesign v2: mobile-first, stable logo, clean form hierarchy. */
.client-auth-screen{
  --auth-bg:#f6f8fb;
  --auth-panel:#ffffff;
  --auth-text:#0f172a;
  --auth-muted:#5b6472;
  --auth-line:#e5e9f2;
  --auth-brand:#0b8a5b;
  --auth-brand-2:#0ea5e9;
  --auth-focus:rgba(11,138,91,.16);
  display:block!important;
  min-height:100dvh;
  padding:16px;
  color:var(--auth-text);
  background:
    radial-gradient(720px 320px at 8% -8%,rgba(14,165,233,.16),transparent 60%),
    radial-gradient(640px 280px at 100% 0,rgba(11,138,91,.14),transparent 58%),
    var(--auth-bg)!important;
}
.client-auth-screen .client-auth-shell{
  width:min(1040px,100%);
  min-height:calc(100dvh - 32px);
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(360px,430px);
  gap:18px;
  align-items:center;
}
.client-auth-screen .auth-card,
.client-auth-screen .auth-visual{
  border:1px solid var(--auth-line);
  border-radius:18px;
  box-shadow:0 1px 2px rgba(15,23,42,.04),0 18px 46px rgba(15,23,42,.10);
}
.client-auth-screen .auth-card{
  width:100%;
  max-height:none;
  overflow:visible;
  align-self:center;
  padding:28px;
  background:rgba(255,255,255,.97);
}
.client-auth-screen .auth-visual{
  position:relative;
  min-height:560px;
  padding:28px;
  display:grid;
  align-content:space-between;
  gap:28px;
  overflow:hidden;
  color:#fff;
  background:linear-gradient(135deg,#0b8a5b 0%,#0f8fc6 100%);
}
.client-auth-screen .auth-visual:before{
  content:"";
  position:absolute;
  right:-120px;
  bottom:-140px;
  width:340px;
  height:340px;
  border-radius:50%;
  background:rgba(255,255,255,.14);
  filter:none;
  animation:floatAuth 12s ease-in-out infinite;
}
.client-auth-screen .auth-brand{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  width:max-content;
  max-width:100%;
  color:#fff;
  text-decoration:none;
}
.client-auth-screen .auth-brand img,
.client-auth-screen .auth-brand-mark{
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  max-width:36px!important;
  max-height:36px!important;
  padding:5px;
  border-radius:10px;
  background:#fff;
  object-fit:contain;
  display:grid;
  place-items:center;
  flex:0 0 36px;
  color:var(--auth-brand);
  font-size:15px;
  font-weight:900;
  box-shadow:0 8px 18px rgba(2,6,23,.14);
}
.client-auth-screen .auth-brand span:last-child{
  min-width:0;
}
.client-auth-screen .auth-brand strong,
.client-auth-screen .auth-brand small{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.client-auth-screen .auth-brand strong{
  max-width:260px;
  font-size:14px;
  line-height:1.2;
}
.client-auth-screen .auth-brand small{
  margin-top:2px;
  color:rgba(255,255,255,.76);
  font-size:11px;
  font-weight:700;
}
.client-auth-screen .auth-hero{
  position:relative;
  z-index:1;
  max-width:580px;
}
.client-auth-screen .auth-hero .eyebrow,
.client-auth-screen .auth-card-head .eyebrow{
  display:inline-flex;
  width:max-content;
  max-width:100%;
  min-height:26px;
  align-items:center;
  padding:4px 9px;
  border-radius:999px;
  letter-spacing:0;
  font-size:11px;
  font-weight:900;
}
.client-auth-screen .auth-hero .eyebrow{
  background:rgba(255,255,255,.16);
  color:#fff;
}
.client-auth-screen .auth-card-head .eyebrow{
  background:#e8f6ef;
  color:#087049;
}
.client-auth-screen .auth-hero h1{
  max-width:13.5ch;
  margin:14px 0 12px;
  font-size:clamp(34px,4.8vw,50px);
  line-height:1.04;
  letter-spacing:0;
}
.client-auth-screen .auth-hero p{
  max-width:58ch;
  margin:0;
  color:rgba(255,255,255,.84);
  font-size:15px;
  line-height:1.65;
}
.client-auth-screen .auth-preview{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.client-auth-screen .auth-preview div{
  min-width:0;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.13);
  backdrop-filter:blur(8px);
}
.client-auth-screen .auth-preview span{
  display:block;
  color:rgba(255,255,255,.72);
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
}
.client-auth-screen .auth-preview strong{
  display:block;
  margin-top:5px;
  overflow:hidden;
  color:#fff;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:14px;
}
.client-auth-screen .auth-card-head h2{
  margin:7px 0 5px;
  font-size:30px;
  line-height:1.14;
  letter-spacing:0;
}
.client-auth-screen .auth-card-head p{
  margin:0;
  color:var(--auth-muted);
  font-size:14px;
  line-height:1.55;
}
.client-auth-screen .auth-tabs{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:4px;
  margin-top:18px;
  padding:4px;
  border-radius:14px;
  background:#eef2f8;
}
.client-auth-screen .auth-tabs button{
  min-width:0;
  min-height:44px;
  padding:8px 6px;
  border:0;
  border-radius:11px;
  color:#667085;
  background:transparent;
  font-size:13px;
  font-weight:850;
  line-height:1.15;
  cursor:pointer;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  transition:background .18s ease,color .18s ease,box-shadow .18s ease,transform .12s ease;
}
.client-auth-screen .auth-tabs button.active{
  background:#fff;
  color:var(--auth-brand);
  box-shadow:0 1px 2px rgba(15,23,42,.06),0 5px 14px rgba(15,23,42,.06);
}
.client-auth-screen .auth-tabs button:active,
.client-auth-screen .btn:active,
.client-auth-screen .login-actions a:active{
  transform:scale(.98);
}
.client-auth-screen .auth-panel.active{
  display:grid;
  animation:rise .22s ease both;
}
.client-auth-screen .form-stack{
  margin-top:16px;
  gap:13px;
}
.client-auth-screen .form-grid-2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.client-auth-screen .form-stack label{
  display:grid;
  gap:7px;
  color:#344054;
  font-size:13px;
  font-weight:850;
}
.client-auth-screen .form-stack input,
.client-auth-screen .form-stack select,
.client-auth-screen .form-stack textarea{
  width:100%;
  min-height:48px;
  border:1px solid #cfd8e3;
  border-radius:12px;
  padding:10px 12px;
  background:#fff;
  color:var(--auth-text);
  font-size:16px;
  outline:none;
}
.client-auth-screen .form-stack input:focus,
.client-auth-screen .form-stack select:focus,
.client-auth-screen .form-stack textarea:focus,
.client-auth-screen .auth-tabs button:focus-visible,
.client-auth-screen .login-actions a:focus-visible,
.client-auth-screen .btn:focus-visible{
  outline:none;
  border-color:var(--auth-brand);
  box-shadow:0 0 0 4px var(--auth-focus);
}
.client-auth-screen .btn.primary,
.client-auth-screen .btn.block{
  width:100%;
  min-height:48px;
  border-radius:12px;
}
.client-auth-screen .login-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}
.client-auth-screen .login-actions a{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  border-radius:10px;
  color:var(--auth-brand);
  font-size:13px;
  font-weight:850;
  text-decoration:none;
}
.client-auth-screen .auth-modal-card{
  border-radius:18px;
}
.client-auth-screen .modal-check{
  width:50px;
  height:50px;
}
.client-auth-screen .otp-inputs{
  grid-template-columns:repeat(6,minmax(0,1fr));
}
.client-auth-screen .otp-inputs input{
  min-width:0;
  height:50px;
  font-size:20px;
}
@media(max-width:900px){
  .client-auth-screen .client-auth-shell{
    min-height:0;
    grid-template-columns:1fr;
    align-items:start;
  }
  .client-auth-screen .auth-card{
    order:1;
  }
  .client-auth-screen .auth-visual{
    order:2;
    min-height:0;
  }
  .client-auth-screen .auth-hero h1{
    max-width:none;
    font-size:30px;
  }
}
@media(max-width:560px){
  .client-auth-screen{
    padding:10px;
  }
  .client-auth-screen .client-auth-shell{
    gap:10px;
  }
  .client-auth-screen .auth-card,
  .client-auth-screen .auth-visual{
    border-radius:16px;
  }
  .client-auth-screen .auth-card{
    padding:16px;
  }
  .client-auth-screen .auth-visual{
    padding:16px;
    gap:16px;
  }
  .client-auth-screen .auth-brand img,
  .client-auth-screen .auth-brand-mark{
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
    max-width:32px!important;
    max-height:32px!important;
    flex-basis:32px;
    border-radius:9px;
    padding:4px;
  }
  .client-auth-screen .auth-brand strong{
    max-width:220px;
    font-size:13px;
  }
  .client-auth-screen .auth-card-head h2{
    font-size:24px;
  }
  .client-auth-screen .auth-tabs button{
    font-size:11px;
    padding:7px 3px;
  }
  .client-auth-screen .form-grid-2{
    grid-template-columns:1fr;
  }
  .client-auth-screen .auth-hero h1{
    font-size:24px;
  }
  .client-auth-screen .auth-hero p{
    font-size:13px;
    line-height:1.5;
  }
  .client-auth-screen .auth-preview{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:6px;
  }
  .client-auth-screen .auth-preview div{
    padding:8px 7px;
  }
  .client-auth-screen .auth-preview span{
    font-size:9px;
  }
  .client-auth-screen .auth-preview strong{
    font-size:11px;
  }
  .client-auth-screen .login-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    text-align:center;
  }
  .client-auth-screen .login-actions a{
    justify-content:center;
  }
}
@media(max-width:380px){
  .client-auth-screen .auth-preview,
  .client-auth-screen .login-actions{
    grid-template-columns:1fr;
  }
}
@media(prefers-reduced-motion:reduce){
  .client-auth-screen *,
  .client-auth-screen *:before,
  .client-auth-screen *:after{
    animation:none!important;
    transition:none!important;
  }
}
