/*
 * AMAC theme — sign-in pages (login, two-step verification, screen lock) and the privacy notice. Loaded after
 * modules/auth/users/auth.css only when A1H_THEME=amac. Split layout: a navy brand panel (Theme::authPanel) beside
 * the card on a wide screen, a band above it on a phone. Scoped to html[data-a1h-theme="amac"].
 */
html[data-a1h-theme="amac"] {
    --brand: #13294b;
    --brand-dark: #0c1c36;
    --accent: #8a5a00;
    --gold: #f2b134;
    background: #eef1f5;
}
html[data-a1h-theme="amac"] body {
    font-family: 'IBM Plex Sans', 'Segoe UI', Roboto, Arial, sans-serif;
    color: #14213d;
}

/* the split: brand panel | card */
html[data-a1h-theme="amac"] body:has(> .a1t-auth-brand) {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    justify-items: center;
    padding: 0;
    min-height: 100vh;
}
html[data-a1h-theme="amac"] .a1t-auth-brand {
    align-self: stretch;
    justify-self: stretch;
    display: flex; align-items: center; justify-content: center;
    padding: 48px 40px;
    background:
        linear-gradient(180deg, rgba(242,177,52,.0) 0, rgba(242,177,52,.0) 100%),
        repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 14px),
        #13294b;
    border-right: 6px solid var(--gold);
    color: #ffffff;
}
html[data-a1h-theme="amac"] .a1t-auth-brand-inner { max-width: 360px; }
html[data-a1h-theme="amac"] .a1t-auth-logo {
    display: block; max-width: 240px; max-height: 110px; object-fit: contain;
    background: #ffffff; padding: 10px 14px; border-radius: 4px;
}
html[data-a1h-theme="amac"] .a1t-wordmark { display: inline-flex; align-items: center; gap: 14px; }
html[data-a1h-theme="amac"] .a1t-mono {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 4px;
    background: var(--gold); color: #13294b;
    font: 700 32px/1 'IBM Plex Serif', Georgia, serif;
}
html[data-a1h-theme="amac"] .a1t-name {
    font: 700 34px/1.1 'IBM Plex Serif', Georgia, serif; letter-spacing: .02em; color: #ffffff;
}
html[data-a1h-theme="amac"] .a1t-name span { color: var(--gold); font-weight: 600; }
html[data-a1h-theme="amac"] .a1t-auth-tag {
    margin-top: 22px; padding-top: 16px;
    border-top: 2px solid rgba(242,177,52,.55);
    font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: #c9d3e3;
}
html[data-a1h-theme="amac"] .a1t-auth-fac { margin-top: 10px; font-size: 16px; font-weight: 600; color: #ffffff; }

/* the card: white, square corners, no coloured header */
html[data-a1h-theme="amac"] .login-card {
    width: 420px; max-width: calc(100% - 32px);
    margin: 32px 16px;
    border-radius: 4px;
    border-top: 4px solid #13294b;
    box-shadow: 0 6px 24px rgba(19,41,75,.12);
}
html[data-a1h-theme="amac"] .login-header {
    background: #ffffff; color: #13294b;
    text-align: left;
    padding: 28px 36px 4px;
}
html[data-a1h-theme="amac"] .login-header .logo-wrap { display: none; }   /* the brand panel carries the logo */
html[data-a1h-theme="amac"] .login-header h2 { font-size: 22px; font-weight: 700; color: #13294b; }
html[data-a1h-theme="amac"] .login-header p { font-size: 13px; opacity: 1; color: #55627a; }
html[data-a1h-theme="amac"] .login-body { padding: 22px 36px 24px; }
html[data-a1h-theme="amac"] .form-group label { color: #33415c; letter-spacing: .08em; font-size: 11px; }
html[data-a1h-theme="amac"] .form-group select,
html[data-a1h-theme="amac"] .form-group input[type="text"],
html[data-a1h-theme="amac"] .form-group input[type="password"] {
    border-radius: 4px; border: 1px solid #b7c1cf; background: #ffffff;
}
html[data-a1h-theme="amac"] .form-group select:focus,
html[data-a1h-theme="amac"] .form-group input:focus { border-color: #13294b; box-shadow: 0 0 0 3px rgba(242,177,52,.45); }
html[data-a1h-theme="amac"] .btn-login {
    border-radius: 4px; background: #13294b;
    border-bottom: 3px solid var(--gold);
    letter-spacing: .04em;
}
html[data-a1h-theme="amac"] .btn-login:hover { background: #0c1c36; }
html[data-a1h-theme="amac"] .info-msg { background: #e3e9f2; border-color: #b9c6da; color: #13294b; border-radius: 4px; }
html[data-a1h-theme="amac"] .error-msg,
html[data-a1h-theme="amac"] .level-error { border-radius: 4px; }
html[data-a1h-theme="amac"] .login-footer { text-align: left; padding: 0 36px 24px; color: #55627a; }
html[data-a1h-theme="amac"] .login-footer a,
html[data-a1h-theme="amac"] .login-card a { color: #1d4e89; }
html[data-a1h-theme="amac"] .mfa-code:focus { border-color: #13294b; box-shadow: 0 0 0 3px rgba(242,177,52,.45); }

/* privacy notice (no brand panel) */
html[data-a1h-theme="amac"] main { border-top: 6px solid #13294b; }
html[data-a1h-theme="amac"] main h1 { color: #13294b; padding-bottom: 6px; border-bottom: 3px solid var(--gold); display: inline-block; }
html[data-a1h-theme="amac"] main h2 { color: #13294b; }
html[data-a1h-theme="amac"] main a { color: #1d4e89; }

/* phone: the brand panel becomes a band above the card */
@media (max-width: 820px) {
    html[data-a1h-theme="amac"] body:has(> .a1t-auth-brand) {
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
    }
    html[data-a1h-theme="amac"] .a1t-auth-brand {
        padding: 26px 20px 22px;
        border-right: 0; border-bottom: 5px solid var(--gold);
        justify-content: flex-start;
    }
    html[data-a1h-theme="amac"] .a1t-mono { width: 40px; height: 40px; font-size: 24px; }
    html[data-a1h-theme="amac"] .a1t-name { font-size: 26px; }
    html[data-a1h-theme="amac"] .a1t-auth-tag { margin-top: 12px; padding-top: 10px; font-size: 11px; }
    html[data-a1h-theme="amac"] .login-card { margin: 20px 16px 28px; }
    html[data-a1h-theme="amac"] .login-header { padding: 22px 22px 2px; }
    html[data-a1h-theme="amac"] .login-body { padding: 18px 22px 20px; }
    html[data-a1h-theme="amac"] .login-footer { padding: 0 22px 20px; }
}
