/* Shared form dimensions; dashboard rules stay outside the login surface. */
.portal-auth-ui {--auth-ink:#163341;--auth-muted:#617785;--auth-line:#d5e2e8;--auth-accent:#117d89;}
.portal-auth-ui .hidden {display:none !important;}
.portal-auth-ui #loginView,
body.partner-auth-page.portal-auth-ui {
  box-sizing:border-box;min-height:100vh;min-height:100svh;padding:32px;
  font-family:"Segoe UI",Arial,sans-serif;
  background:radial-gradient(ellipse at 85% 15%,#1c5860 0,transparent 45%),linear-gradient(145deg,#0c2531,#103b47);
}
.portal-auth-ui #loginView:not(.hidden) {display:grid;place-items:center;}
body.partner-auth-page.portal-auth-ui {display:flex;align-items:center;overflow-x:hidden;}
.portal-auth-ui :is(.login-card,.auth-form-card) {
  box-sizing:border-box;width:min(480px,100%);max-width:480px;margin:0;padding:32px;
  border:1px solid #dce7ec;border-radius:28px;background:#fcfefe;color:var(--auth-ink);
  box-shadow:0 24px 70px #041b2c40;font-family:"Segoe UI",Arial,sans-serif;
}
.portal-auth-ui .login-card,
.portal-auth-ui .auth-form-card--login {min-height:700px;display:grid;align-content:start;}
.portal-auth-ui .login-brand {align-items:center;gap:16px;padding:0;border:0;min-height:90px;}
.portal-auth-ui .login-brand>div:last-child {min-width:0;}
.portal-auth-ui .login-brand :is(.logo,.logo-mark) {
  flex:0 0 64px;width:64px;height:64px;padding:10px;border-radius:20px;
  background:#edf4f5;border:1px solid #d9e7ea;box-sizing:border-box;
}
.portal-auth-ui .login-brand img {display:block;width:100%;height:100%;object-fit:contain;}
.portal-auth-ui :is(.login-brand h1,.auth-form-head h2) {font-size:30px;line-height:1.15;letter-spacing:-.8px;margin:0;color:var(--auth-ink);}
.portal-auth-ui :is(.login-brand p,.auth-form-head>p:not(.auth-form-badge)) {margin:8px 0 0;font-size:14px;line-height:1.6;color:var(--auth-muted);}
.portal-auth-ui .login-brand .eyebrow {font-size:11px;letter-spacing:.13em;margin:0 0 8px;}
.portal-auth-ui #loginView :is(.form,.login-form) {grid-template-columns:1fr;margin-top:20px;gap:16px;}
.portal-auth-ui #loginView :is(.admin-login-credentials,#employeeLoginCredentialsStep) {display:grid;grid-template-columns:1fr;gap:16px;}
.portal-auth-ui #loginView .field {gap:8px;}
.portal-auth-ui #loginView :is(.field>label,.field>span:first-child),
.portal-auth-ui .auth-field-group>label {font-size:13px;line-height:1.4;font-weight:600;color:#35505e;letter-spacing:0;text-transform:none;}
.portal-auth-ui #loginView input:not([type=checkbox]):not([type=radio]),
.portal-auth-ui .auth-field-group :is(input,select):not([type=checkbox]):not([type=radio]) {
  box-sizing:border-box;width:100%;height:52px;min-height:52px;padding:12px 14px;margin:0;
  font:400 16px/1.4 "Segoe UI",Arial,sans-serif;color:var(--auth-ink);letter-spacing:normal;
  border:1px solid var(--auth-line);border-radius:14px;background:#f7fafb;box-shadow:none;
}
.portal-auth-ui #loginView input::placeholder,
.portal-auth-ui .auth-field-group input::placeholder {color:#8093a0;opacity:1;font-weight:400;}
.portal-auth-ui #loginView input:focus,
.portal-auth-ui .auth-field-group :is(input,select):focus {outline:none;border-color:var(--auth-accent);box-shadow:0 0 0 4px #117d8915;}
.portal-auth-ui #loginView .goat-password-field .goat-password-toggle {width:36px;height:36px;min-height:36px;right:8px;background:#e7eff2;}
.portal-auth-ui #loginView .btn,
.portal-auth-ui .auth-form-card :is(.btn,.auth-btn-primary,.auth-btn-secondary,.auth-btn-link) {
  box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:52px;padding:12px 16px;border-radius:14px;font:600 15px/1.3 "Segoe UI",Arial,sans-serif;
}
.portal-auth-ui #loginView :is(.primary,.btn-primary),
.portal-auth-ui .auth-btn-primary {color:#fff;border:0;background:linear-gradient(135deg,#117d89,#12616c);box-shadow:0 8px 20px #117d891e;}
.portal-auth-ui #loginView :is(.actions,.login-actions) {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;}
.portal-auth-ui #loginView :is(.actions,.login-actions)>button[type=submit] {grid-column:1/-1;}
.portal-auth-ui #loginView :is(.admin-login-banner,.login-security-banner) {
  box-sizing:border-box;min-height:130px;padding:16px;gap:10px;margin:0;
  border:1px solid #d6e7ea;border-radius:18px;background:#eef6f6;box-shadow:none;
}
.portal-auth-ui #loginView :is(.admin-login-banner p,.login-security-banner p) {margin:10px 0 0;font-size:14px;line-height:1.5;color:#506b79;font-weight:400;}
.portal-auth-ui #loginView :is(.admin-login-pill,.login-security-pill) {font-size:10px;font-weight:700;letter-spacing:.1em;padding:7px 12px;}
.portal-auth-ui .login-links-row {margin:0;min-height:40px;align-items:center;}
.portal-auth-ui .login-link-btn {font-size:14px;line-height:1.4;min-height:40px;}
.portal-auth-ui #loginView .hint:empty {display:none;}
.portal-auth-ui .auth-shell {width:min(984px,100%);grid-template-columns:minmax(0,480px) minmax(0,480px);gap:24px;align-items:start;}
.portal-auth-ui .auth-form-panel {min-width:0;width:100%;align-items:start;}
.portal-auth-ui .auth-form-card {gap:20px;}
.portal-auth-ui .auth-form-head {gap:0;margin-bottom:4px;}
.portal-auth-ui .auth-form-badge {width:max-content;min-height:28px;font-size:10px;letter-spacing:.12em;padding:0 12px;margin:0 0 12px;}
.portal-auth-ui .auth-field-group {gap:8px;margin:0;min-width:0;}
.portal-auth-ui .auth-remember-row {margin:0;min-height:40px;flex-direction:row;flex-wrap:wrap;align-items:center;gap:12px;}
.portal-auth-ui .auth-remember {font-size:13px;font-weight:500;}
.portal-auth-ui .auth-link {font-size:13px;line-height:1.4;}
.portal-auth-ui .auth-footer {font-size:13px;line-height:1.6;margin:0;color:var(--auth-muted);}
.portal-auth-ui .auth-mobile-field {height:52px;min-height:52px;min-width:0;border-radius:14px;}
.portal-auth-ui .auth-field-group .auth-mobile-field input:not([type=checkbox]):not([type=radio]) {height:50px;min-height:50px;border:0;background:transparent;border-radius:0;}
.portal-auth-ui .auth-mobile-prefix {height:50px;min-height:50px;min-width:56px;padding:0 10px;font-size:16px;}
.portal-auth-ui .auth-field-grid {gap:16px;grid-template-columns:repeat(2,minmax(0,1fr));}
.portal-auth-ui .auth-section-card {padding:20px;gap:16px;border-radius:18px;}
.portal-auth-ui .auth-section-head strong {font-size:20px;line-height:1.3;}
.portal-auth-ui .auth-section-head span {font-size:13px;line-height:1.6;}
.portal-auth-ui .auth-brand-panel {
  position:relative;overflow:hidden;min-height:700px;height:auto;padding:32px;border-radius:28px;gap:24px;
  background:radial-gradient(ellipse at 100% 0,#26767b60,transparent 60%),linear-gradient(150deg,#123b48,#0b2633);
  border:1px solid #86c4ca33;align-content:start;box-sizing:border-box;
}
.portal-auth-ui .auth-brand-top {position:relative;z-index:1;flex-direction:row;align-items:center;gap:16px;}
.portal-auth-ui .auth-brand-mark {flex:0 0 72px;width:72px;height:72px;padding:12px;border-radius:22px;box-sizing:border-box;}
.portal-auth-ui .auth-brand-chip {min-height:30px;font-size:9px;letter-spacing:.1em;padding:0 12px;white-space:normal;width:auto;}
.portal-auth-ui .auth-brand-copy {position:relative;z-index:1;gap:16px;}
.portal-auth-ui .auth-brand-eyebrow {font-size:10px;letter-spacing:.16em;min-height:28px;padding:0;max-width:100%;background:transparent;}
.portal-auth-ui .auth-brand-panel h1 {max-width:none;font:600 42px/1.12 "Segoe UI",Arial,sans-serif;letter-spacing:-1.4px;}
.portal-auth-ui .auth-brand-lead {font-size:15px;line-height:1.7;}
.portal-auth-ui .auth-brand-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.portal-auth-ui .auth-brand-metric {padding:16px;border-radius:18px;background:#ffffff08;border:1px solid #bde2e517;}
.portal-auth-ui .auth-brand-metric__label {padding:0;font-size:10px;min-height:20px;letter-spacing:.1em;}
.portal-auth-ui .auth-brand-metric strong {font-size:15px;line-height:1.5;}
.partner-welcome-features {display:grid;gap:12px;position:relative;z-index:1;}
.partner-welcome-feature {display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:16px;background:#ffffff06;border:1px solid #bde2e517;}
.partner-welcome-icon {display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:12px;background:#9ce5dd15;color:#9ce5dd;}
.partner-welcome-icon svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
.partner-welcome-feature strong {display:block;font-size:14px;line-height:1.4;font-weight:600;color:#effafa;}
.partner-welcome-feature p {margin:3px 0 0;font-size:12px;line-height:1.5;color:#9fbfc6;}
.partner-welcome-note {font-size:11px;letter-spacing:.1em;color:#a8d5d5;position:relative;z-index:1;display:flex;align-items:center;gap:8px;}
.partner-welcome-note::before {content:"";width:6px;height:6px;border-radius:50%;background:#76d6b9;box-shadow:0 0 14px #76d6b950;}
.partner-welcome-mobile-note {display:none;}
.partner-welcome-watermark {position:absolute;width:300px;height:300px;bottom:-90px;right:-85px;opacity:.04;pointer-events:none;object-fit:contain;}
@media(max-width:900px) {
  .portal-auth-ui #loginView,body.partner-auth-page.portal-auth-ui {padding:24px;}
  .portal-auth-ui .auth-shell {max-width:480px;grid-template-columns:minmax(0,1fr);gap:20px;}
  .portal-auth-ui .auth-brand-panel {min-height:0;padding:24px;gap:16px;}
  .portal-auth-ui .auth-brand-panel h1 {font-size:30px;letter-spacing:-.8px;}
  .portal-auth-ui .auth-brand-mark {width:56px;height:56px;flex-basis:56px;border-radius:18px;padding:10px;}
  .portal-auth-ui .auth-brand-copy {gap:8px;}
  .portal-auth-ui .auth-brand-lead {font-size:14px;line-height:1.6;}
  .portal-auth-ui :is(.partner-welcome-features,.partner-welcome-note,.auth-brand-grid) {display:none;}
  .portal-auth-ui .auth-brand-eyebrow {display:none;}
}
@media(max-width:560px) {
  .portal-auth-ui #loginView,body.partner-auth-page.portal-auth-ui {padding:20px 16px;}
  .portal-auth-ui :is(.login-card,.auth-form-card) {padding:24px;border-radius:24px;}
  .portal-auth-ui :is(.login-card,.auth-form-card--login) {min-height:0;}
  .portal-auth-ui .login-brand {align-items:flex-start;gap:12px;}
  .portal-auth-ui .login-brand :is(.logo,.logo-mark) {width:56px;height:56px;flex-basis:56px;border-radius:18px;}
  .portal-auth-ui :is(.login-brand h1,.auth-form-head h2) {font-size:26px;}
  .portal-auth-ui .auth-brand-panel {padding:20px;border-radius:24px;}
  .portal-auth-ui .auth-brand-panel h1 {font-size:28px;}
  .portal-auth-ui .auth-field-grid {grid-template-columns:minmax(0,1fr);}
  .portal-auth-ui .auth-section-card {padding:16px;}
  .portal-auth-ui .auth-brand-chip {font-size:9px;}
  .portal-auth-ui .auth-form-card {gap:16px;}
  .portal-auth-ui .partner-welcome {gap:12px;}
  .portal-auth-ui .partner-welcome .auth-brand-copy :is(h1,.auth-brand-lead) {display:none;}
  .partner-welcome-mobile-note {display:block;margin:0;color:#b9d3d9;font:400 13px/1.6 "Segoe UI",Arial,sans-serif;}
}
