/* ── Afren brand fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Montserrat:wght@400;500;600&display=swap');

@font-face {
    font-family: 'ClashDisplay';
    src: url('/fonts/ClashDisplay-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'ClashDisplay';
    src: url('/fonts/ClashDisplay-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'ClashDisplay';
    src: url('/fonts/ClashDisplay-Semibold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'ClashDisplay';
    src: url('/fonts/ClashDisplay-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

html, body {
    height: 100%;
    margin: 0;
}

/* ── Auth screens (split-screen: branded hero + sign-in card) ──────── */
.erp-auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

/* Left: branded hero */
.erp-auth-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: clamp(2.5rem, 6vw, 5.5rem);
    color: #fff;
    background: radial-gradient(125% 125% at 0% 0%, #3E86C9 0%, #2664A1 46%, #17395C 100%);
}

.erp-auth-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 32rem;
}

.erp-auth-hero-logo {
    height: 34px;
    margin-bottom: clamp(2rem, 6vh, 3.5rem);
    opacity: .96;
}

.erp-auth-hero-title {
    font-family: 'ClashDisplay', system-ui, -apple-system, sans-serif;
    font-size: clamp(2.6rem, 4.2vw, 4rem);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 0 0 1.25rem;
}

.erp-auth-hero-sub {
    font-size: 1.15rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    max-width: 27rem;
    margin: 0 0 2.25rem;
}

.erp-auth-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.erp-auth-badge {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
}

/* Decorative glow + faint grid, masked toward the top-right */
.erp-auth-hero-glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(42% 42% at 88% 18%, rgba(63, 182, 193, 0.38), transparent 70%),
        radial-gradient(38% 38% at 92% 92%, rgba(205, 227, 250, 0.22), transparent 70%);
}

.erp-auth-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.10;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.7) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.7) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(80% 80% at 72% 28%, #000, transparent 78%);
    mask-image: radial-gradient(80% 80% at 72% 28%, #000, transparent 78%);
}

/* Right: sign-in area */
.erp-auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #F7FAFE;
}

.erp-auth-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem 2.25rem;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px -28px rgba(23, 57, 92, 0.28);
    border: 1px solid #EAF1F9;
}

.erp-auth-logo {
    height: 26px;
    margin-bottom: 1.75rem;
}

.erp-auth-heading {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.erp-auth-submit {
    border-radius: 10px;
    text-transform: none;
    font-weight: 600;
    box-shadow: 0 10px 24px -12px rgba(38, 100, 161, 0.7);
}

.erp-auth-foot {
    margin: 1.6rem 0 0;
    font-size: 0.8rem;
    color: #8A929E;
    text-align: center;
}

@media (max-width: 900px) {
    .erp-auth-page { grid-template-columns: 1fr; }
    .erp-auth-hero { display: none; }
}

.mud-theme-dark .erp-auth-main { background: #0F1216; }
.mud-theme-dark .erp-auth-card { background: #171B21; border-color: #232A33; box-shadow: 0 24px 60px -30px rgba(0,0,0,0.6); }

/* ── Shell ─────────────────────────────────────────────────────────── */
.erp-appbar-logo {
    height: 22px;
    display: block;
}

.erp-appbar-logo-dark {
    display: none;
}

.mud-theme-dark .erp-appbar-logo-light {
    display: none;
}

.mud-theme-dark .erp-appbar-logo-dark {
    display: block;
}

/* Dense, data-first grids */
.mud-table.erp-dense .mud-table-cell {
    padding: 6px 12px;
    font-size: 0.8125rem;
}

.erp-kpi-value {
    font-family: 'ClashDisplay', 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.1;
}

.erp-kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.7;
}

#blazor-error-ui {
    color-scheme: light only;
    background: #C93030;
    color: #fff;
    bottom: 0;
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
