/* Sign-in, activation and password pages (everything inside .auth-v2): one compact card, in the app's own theme
   colours. Remove the <link> in base.html to go back to the old two-panel design. */
.auth-v2 {
  --a-bg: #f5f5f7; --a-card: #fff; --a-text: #18181b; --a-mute: #6b6b73; --a-line: rgba(0,0,0,.14); --a-soft: #f2f2f4;
  --a-main: var(--brand, #18181b); --a-on-main: #fff;
  display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  min-height: 100vh; min-height: 100dvh; padding: 20px 14px; background: var(--a-bg) !important; color: var(--a-text);
}
[data-theme="dark"] .auth-v2 { --a-bg: #0b0b0d; --a-card: #17171a; --a-text: #f4f4f5; --a-mute: #a1a1aa; --a-line: rgba(255,255,255,.13); --a-soft: #232327; }
html[data-theme="dark"][data-palette="mono"] .auth-v2 { --a-main: #f4f4f5; --a-on-main: #111113; }

/* the logo is the top of the card */
html body .auth-v2 > .av-hero, html[data-theme="dark"] body .auth-v2 > .av-hero {
  display: block !important; width: 100%; max-width: 360px; padding: 22px 24px 0; overflow: visible; color: var(--a-text);
  background: var(--a-card) !important; border: 1px solid var(--a-line) !important; border-bottom: 0 !important;
  border-radius: 16px 16px 0 0; box-shadow: none !important;
}
.auth-v2 .av-hero::before, .auth-v2 .av-hero::after, .auth-v2 .av-hero-grid, .auth-v2 .av-hero-title,
.auth-v2 .av-hero-desc, .auth-v2 .av-feat, .auth-v2 .av-hero-foot { display: none !important; }
.auth-v2 .av-hero-content { height: auto; }
.auth-v2 .av-hero .av-brand, .auth-v2 .av-hero .brand-logo { display: flex; justify-content: center; align-items: center; margin: 0; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }
.auth-v2 .av-hero .brand-logo { gap: 10px; }
.auth-v2 .av-hero .brand-logo img { height: 13px; }
.auth-v2 .av-hero .brand-logo .bl-sub { font-size: 12.5px; padding-left: 10px; color: var(--a-mute) !important; border-left-color: var(--a-line) !important; }
.auth-v2 .brand-logo .bl-light { display: block !important; }
.auth-v2 .brand-logo .bl-dark { display: none !important; }
[data-theme="dark"] .auth-v2 .brand-logo .bl-light { display: none !important; }
[data-theme="dark"] .auth-v2 .brand-logo .bl-dark { display: block !important; }

.auth-v2 .av-panel {
  width: 100%; max-width: 360px; min-height: 0 !important; padding: 14px 24px 18px !important;
  background: var(--a-card); border: 1px solid var(--a-line); border-top: 0; border-radius: 0 0 16px 16px;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.25);
}
.auth-v2 .av-panel-inner { width: 100%; max-width: none; }
.auth-v2 .av-eyebrow { display: none; }
.auth-v2 .av-title { font-size: 18px; font-weight: 700; letter-spacing: -.015em; text-align: center; margin: 0 0 3px; color: var(--a-text); }
.auth-v2 .av-sub { font-size: 12.5px; line-height: 1.45; text-align: center; color: var(--a-mute); margin: 0 0 14px; }

.auth-v2 .av-roles { display: flex; gap: 2px; padding: 2px; margin-bottom: 14px; border-radius: 9px; background: var(--a-soft); }
.auth-v2 .av-role {
  flex: 1 1 auto; display: flex; flex-direction: row; align-items: center; justify-content: center; min-width: 0; padding: 5px 6px;
  border: 0 !important; border-radius: 7px; background: transparent !important; box-shadow: none !important; transform: none !important;
  font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--a-mute) !important;
}
.auth-v2 .av-role i { display: none; }
.auth-v2 .av-role.active { background: var(--a-card) !important; color: var(--a-text) !important; box-shadow: 0 1px 3px rgba(0,0,0,.14) !important; }

.auth-v2 .av-field { margin-bottom: 10px; }
.auth-v2 .av-label { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: var(--a-text); margin: 0 0 4px; }
.auth-v2 .av-input > i { color: var(--a-mute); font-size: 15px; left: 12px; }
.auth-v2 .av-input input, [data-theme="dark"] .auth-v2 .av-input input {
  width: 100%; height: 40px; font-size: 14px; border-radius: 9px !important; padding-left: 36px;
  background: var(--a-card) !important; border: 1px solid var(--a-line) !important; color: var(--a-text) !important; box-shadow: none;
}
.auth-v2 .av-input input:focus, [data-theme="dark"] .auth-v2 .av-input input:focus { border-color: var(--a-main) !important; box-shadow: 0 0 0 3px rgba(127,127,127,.22) !important; }
.auth-v2 .av-err { margin-top: 4px; font-size: 12px; }

.auth-v2 .av-row { margin: 2px 0 12px; flex-wrap: wrap; gap: 6px; }
.auth-v2 .av-check { font-size: 12.5px; color: var(--a-mute); gap: 6px; }
.auth-v2 .av-check input { width: 14px; height: 14px; accent-color: var(--a-main); }
.auth-v2 .av-link { font-size: 12.5px; font-weight: 600; color: var(--a-text) !important; }
.auth-v2 .av-btn {
  height: 40px; border-radius: 9px; font-size: 14px; font-weight: 600; letter-spacing: 0;
  background: var(--a-main) !important; color: var(--a-on-main) !important; box-shadow: none !important; transform: none !important;
}
.auth-v2 .av-btn:hover { filter: brightness(1.12); }
.auth-v2 .av-btn:active { filter: brightness(.9); }
.auth-v2 .av-alert { border: 0 !important; border-radius: 9px; font-size: 12.5px; padding: 8px 10px; margin-bottom: 12px; }
.auth-v2 .av-foot { margin: 14px 0 0; font-size: 11px; color: var(--a-mute); }
.auth-v2 .pw-toggle, .auth-v2 .pw-toggle .pw-label { text-transform: none !important; letter-spacing: 0 !important; font-size: 12px; font-weight: 600; color: var(--a-mute) !important; }
.auth-v2 .pw-toggle { background: transparent !important; border: 0 !important; box-shadow: none !important; }

/* phones: 16px text in the boxes so the browser doesn't zoom in */
@media (max-width: 576px) { .auth-v2 .av-input input { font-size: 16px; height: 44px; } .auth-v2 .av-btn { height: 44px; } }

/* the sign-in card shows only the IYtech wordmark */
.auth-v2 .av-hero .brand-logo .bl-sub { display: none !important; }
.auth-v2 .av-hero .brand-logo img { height: 15px; }
