html, body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#blazor-error-ui {
    background: #ef4444;
    color: #fff;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 0.875rem;
}

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

/* ─── Login page ───────────────────────────────────────────────────────────── */
/* Layout único centralizado (sem split hero+card). O card vive no centro vertical
   e horizontal da tela, sobre um gradiente roxo/azul que mantém a identidade visual.
   Em telas grandes a moldura abre mais espaço respirável; em mobile cola nas bordas. */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: radial-gradient(1200px 600px at 15% 0%, rgba(139,92,246,0.25), transparent 55%),
                radial-gradient(900px 500px at 95% 100%, rgba(14,165,233,0.22), transparent 55%),
                linear-gradient(135deg, #0b1020 0%, #1e1b4b 50%, #0b1020 100%);
    color: #f1f5f9;
    box-sizing: border-box;
}

.login-card-wrap {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
}

.login-card {
    background: #ffffff;
    color: #0f172a;
    border-radius: 20px;
    padding: 2.5rem 2.25rem 2rem;
    box-shadow: 0 30px 60px -15px rgba(0,0,0,0.55),
                0 0 0 1px rgba(255,255,255,0.04);
}

/* ── Marca (logo + nome) no topo do card ── */
.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
}

.login-brand-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #5b21b6 0%, #8b5cf6 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    box-shadow: 0 12px 28px -10px rgba(91,33,182,0.65);
}
.login-brand-icon svg { width: 32px; height: 32px; }

.login-brand-name {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #5b21b6 0%, #8b5cf6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-brand-subtitle {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

/* ── Título + subtítulo ── */
.login-card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.015em;
    text-align: center;
}

.login-card .subtitle {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
    text-align: center;
}

/* ── Campos com ícones inline ── */
.login-field { margin-bottom: 1rem; }

.login-card label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    margin: 0 0 0.4rem 0.15rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 0.85rem;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
    transition: color .15s ease;
}

.login-card input[type="text"],
.login-card input[type="email"],
.login-card input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1rem 0.85rem 2.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    background: #f8fafc;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.login-card input::placeholder { color: #cbd5e1; }

.login-card input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 4px rgba(139,92,246,0.18);
    background: #fff;
}

.login-input-wrap:focus-within .login-input-icon {
    color: #8b5cf6;
}

/* ── Copyright fora do card ── */
.login-copy {
    text-align: center;
    color: rgba(255,255,255,0.55);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

/* ── "Esqueci minha senha" + botões secundários ── */
.login-forgot {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: #5b21b6;
    text-decoration: none;
    font-weight: 500;
}
.login-forgot:hover { text-decoration: underline; }

.login-secondary-button {
    display: block;
    margin-top: 1.25rem;
    text-align: center;
    padding: 0.7rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
    transition: background-color .15s ease;
}
.login-secondary-button:hover { background-color: #f8fafc; }

.login-primary-link {
    display: block;
    margin-top: 1.5rem;
    text-align: center;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #5b21b6 0%, #8b5cf6 100%);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 8px 20px -8px rgba(91,33,182,0.6);
}

.login-info {
    margin-top: 1rem;
    background: #eff6ff;
    color: #1e40af;
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    font-size: 0.85rem;
    border: 1px solid #bfdbfe;
    line-height: 1.5;
}

.login-card button {
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.95rem 1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #5b21b6 0%, #8b5cf6 100%);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 8px 20px -8px rgba(91,33,182,0.6);
    transition: transform .08s ease, box-shadow .15s ease;
}

.login-card button:hover { box-shadow: 0 12px 24px -8px rgba(91,33,182,0.7); }
.login-card button:active { transform: translateY(1px); }

.login-card button[disabled] {
    opacity: .85;
    cursor: progress;
}

.login-card button.is-loading {
    pointer-events: none;
}

.login-card button .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 10px;
    border: 2px solid rgba(255,255,255,0.45);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -3px;
    animation: iigd-spin 0.7s linear infinite;
}

@keyframes iigd-spin {
    to { transform: rotate(360deg); }
}

.login-error {
    margin-top: 1rem;
    background: #fef2f2;
    color: #b91c1c;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-size: 0.875rem;
    border: 1px solid #fecaca;
}

.login-footer {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
}

/* Public portal (fornecedor responde cotação) */
.public-shell {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    padding: 2rem 1rem;
}

.public-container {
    max-width: 1100px;
    margin: 0 auto;
}

.public-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.public-brand {
    display: flex;
    align-items: baseline;
    gap: .6rem;
}

.public-brand-mark {
    color: #5b21b6;
    font-weight: 800;
    letter-spacing: .04em;
    font-size: 1.4rem;
}

.public-brand-text {
    color: #475569;
    font-size: 0.9rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-weight: 600;
}

.public-card {
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    background: #ffffff !important;
}

.public-footer {
    margin-top: 2.5rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
}
