
:root {
    --bg: #f3f2ee;
    --surface: rgba(255,255,255,.92);
    --surface-strong: rgba(255,255,255,.98);
    --stroke: #e7e6dd;
    --text: #20201d;
    --muted: #7d7d74;
    --green: #7ea81b;
    --green-2: #9fc545;
    --green-soft: #eef3df;
    --danger: #c74d3e;
    --hero: linear-gradient(180deg, #1f1f1f 0%, #161716 100%);
    --shadow: 0 14px 34px rgba(42, 44, 35, 0.08);
    --radius-xl: 18px;
    --radius-lg: 16px;
    --radius-md: 12px;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body.bi-portal, body.bi-login, body.bi-admin { margin:0; min-height:100vh; background:var(--bg); color:var(--text); font-family:Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.bi-login { display:flex; align-items:center; justify-content:center; padding:24px; overflow:auto; }
.login-shell { width:100%; max-width:1080px; display:grid; grid-template-columns:1.08fr .92fr; gap:16px; align-items:stretch; }
.brand-panel, .login-card, .portal-card, .admin-card { border:1px solid var(--stroke); border-radius:var(--radius-xl); box-shadow:var(--shadow); overflow:hidden; }
.brand-panel { background:var(--hero); color:#fff; padding:38px; position:relative; }
.brand-panel:after { content:""; position:absolute; right:-90px; bottom:-130px; width:270px; height:270px; border-radius:50%; background:rgba(126,168,27,.22); filter:blur(10px); }
.logo-box, .brand-logo-box { background:#fff; display:grid; place-items:center; overflow:hidden; border-radius:12px; border:1px solid rgba(255,255,255,.18); }
.logo-box { width:210px; height:74px; padding:6px; margin-bottom:28px; }
.logo-box img, .brand-logo-box img { max-width:100%; max-height:100%; object-fit:contain; }
.brand-panel h1 { font-size:clamp(2rem,4vw,3.6rem); line-height:1; letter-spacing:-.04em; margin:0 0 12px; font-weight:850; }
.brand-panel p { color:rgba(255,255,255,.76); max-width:620px; margin:0; }
.security-list { margin-top:30px; display:grid; gap:12px; }
.security-item { display:flex; gap:10px; align-items:center; color:rgba(255,255,255,.88); }
.security-item i { color:var(--green-2); }
.login-card { background:var(--surface-strong); padding:34px; }
.login-card h2, .portal-title, .admin-title { font-weight:850; letter-spacing:-.03em; }
.form-label { font-size:.78rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); font-weight:800; }
.form-control, .form-select { border-radius:13px; border-color:var(--stroke); padding:11px 13px; }
.btn-bi-primary { background:var(--green); border-color:var(--green); color:#fff; font-weight:800; border-radius:14px; padding:11px 16px; }
.btn-bi-primary:hover { background:#6f9618; border-color:#6f9618; color:#fff; }
.btn-bi-dark { background:#1f1f1f; border-color:#1f1f1f; color:#fff; font-weight:800; border-radius:14px; }
.btn-bi-dark:hover { background:#111; color:#fff; }
.btn-bi-soft { background:var(--green-soft); color:#4f6f0d; border:1px solid rgba(126,168,27,.25); font-weight:800; border-radius:14px; }
.portal-topbar { background:var(--hero); color:#fff; padding:12px 0; box-shadow:0 14px 32px rgba(42,44,35,.16); }
.portal-brand { display:flex; align-items:center; gap:14px; }
.brand-logo-box { width:160px; height:58px; padding:5px; }
.portal-brand h1 { margin:0; font-size:1.25rem; font-weight:850; }
.portal-brand p { margin:1px 0 0; color:rgba(255,255,255,.68); font-size:.85rem; }
.user-pill { background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); border-radius:999px; padding:9px 13px; color:#fff; display:inline-flex; align-items:center; gap:8px; }
.portal-main { padding:22px 0; }
.portal-card, .admin-card { background:var(--surface-strong); }
.module-card { height:100%; border:1px solid var(--stroke); border-radius:var(--radius-xl); background:var(--surface-strong); box-shadow:var(--shadow); transition:.18s ease; overflow:hidden; }
.module-card:hover { transform:translateY(-3px); }
.module-link { text-decoration:none; color:inherit; display:block; height:100%; }
.module-body { min-height:172px; padding:22px; display:flex; flex-direction:column; justify-content:space-between; }
.module-icon { width:52px; height:52px; border-radius:16px; background:var(--green-soft); color:var(--green); display:grid; place-items:center; font-size:1.55rem; margin-bottom:16px; }
.module-title { font-size:1.18rem; font-weight:850; margin:0; }
.module-text { color:var(--muted); font-size:.9rem; margin:7px 0 0; }
.table-admin { vertical-align:middle; }
.badge-scope { background:var(--green-soft); color:#4f6f0d; border:1px solid rgba(126,168,27,.25); }
@media (max-width: 860px) { .login-shell { grid-template-columns:1fr; } .brand-panel,.login-card{padding:26px;} .portal-actions{margin-top:12px;} }

/* Recuperação de senha */
.bi-login-link {
    color: var(--bi-green, #73a90b);
    font-weight: 700;
}
.bi-login-link:hover {
    color: var(--bi-dark, #181818);
}


/* Fase 3.1 - responsividade portal/admin/login */
.license-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.license-grid > div { background:#fff; border:1px solid var(--stroke); border-radius:14px; padding:12px; }
.license-grid span { display:block; color:var(--muted); font-size:.76rem; text-transform:uppercase; letter-spacing:.06em; font-weight:800; }
.license-grid strong { display:block; margin-top:3px; overflow-wrap:anywhere; }
.license-block-shell { width:100%; max-width:720px; margin:auto; padding:24px; }

@media (max-width: 1200px) {
    .module-body { min-height:160px; }
    .portal-main { padding:18px 0; }
}
@media (max-width: 992px) {
    .portal-topbar .container-fluid, .portal-main .container-fluid { padding-left:18px!important; padding-right:18px!important; }
    .portal-brand { width:100%; justify-content:flex-start; }
    .portal-actions, .portal-topbar .d-flex.gap-2 { width:100%; justify-content:flex-start; margin-top:10px; }
    .brand-logo-box { width:132px; height:50px; }
    .portal-brand h1 { font-size:1.05rem; }
    .user-pill { max-width:100%; overflow-wrap:anywhere; }
}
@media (max-width: 768px) {
    .bi-login { padding:14px; align-items:flex-start; }
    .login-shell { gap:12px; }
    .brand-panel, .login-card, .portal-card, .admin-card { border-radius:16px; }
    .brand-panel, .login-card { padding:22px; }
    .logo-box { width:170px; height:62px; margin-bottom:18px; }
    .brand-panel h1 { font-size:2rem; }
    .security-list { margin-top:20px; }
    .module-body { min-height:auto; padding:18px; }
    .module-icon { width:46px; height:46px; font-size:1.35rem; }
    .table-responsive { border-radius:14px; }
    .table-admin { min-width:720px; }
    .license-grid { grid-template-columns:1fr; }
}
@media (max-width: 480px) {
    .portal-topbar { padding:10px 0; }
    .portal-brand { gap:10px; }
    .brand-logo-box { width:118px; height:46px; }
    .portal-card, .admin-card { padding:18px!important; }
    .module-title { font-size:1.05rem; }
    .btn, .user-pill { width:100%; justify-content:center; }
    .portal-topbar .d-flex.gap-2 { gap:8px!important; }
}
