:root {
    --sidebar-bg: #16213a;
    --sidebar-fg: #c9d3e6;
    --sidebar-active: #2d6cdf;
    --page-bg: #f3f5f9;
}

body { background: var(--page-bg); font-size: .925rem; }

.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px; flex-shrink: 0; background: var(--sidebar-bg); color: var(--sidebar-fg);
    display: flex; flex-direction: column; padding: 1rem .75rem;
}
.sidebar .brand {
    display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none;
    font-weight: 600; font-size: 1.05rem; padding: .25rem .5rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: .75rem;
}
.sidebar .brand img { max-height: 36px; max-width: 60px; object-fit: contain; }
.sidebar .brand i { font-size: 1.6rem; color: #6ea3ff; }
.sidebar .brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.sidebar .brand-desc { font-size: .72rem; font-weight: 400; color: var(--sidebar-fg); opacity: .75; margin-top: .15rem; }
.sidebar .nav-link { color: var(--sidebar-fg); border-radius: .4rem; padding: .45rem .75rem; display: flex; gap: .6rem; align-items: center; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .nav-link.active { background: var(--sidebar-active); color: #fff; }
.sidebar-version { margin-top: auto; padding: 1rem .75rem 0; font-size: .72rem; opacity: .5; }
.sidebar .nav-section { text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; opacity: .55; margin: 1rem .75rem .35rem; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    background: #fff; border-bottom: 1px solid #e3e7ef; padding: .6rem 1.25rem;
    display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 10;
}
.topbar .page-title { font-size: 1.1rem; margin: 0; flex: 1; font-weight: 600; }
.content { padding: 1.25rem; }

.card { border: 1px solid #e3e7ef; border-radius: .6rem; }
.card-header { background: #fff; font-weight: 600; }
.table > :not(caption) > * > * { vertical-align: middle; }
.badge-state { min-width: 80px; }
.form-hint { font-size: .8rem; color: #6c757d; }
.breadcrumb-files .breadcrumb-item a { text-decoration: none; }
.file-icon { width: 1.4rem; text-align: center; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: .85rem; }

/* Telas de instalação e login */
.setup-body { display: flex; align-items: flex-start; justify-content: center; min-height: 100vh; padding: 3rem 1rem; }
.setup-wrap { width: 100%; max-width: 460px; }
.setup-wrap.wide { max-width: 760px; }
.setup-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.setup-brand img { max-height: 56px; max-width: 120px; object-fit: contain; }
.setup-brand i { font-size: 2.4rem; color: var(--sidebar-active); }
.setup-brand .name { font-size: 1.3rem; font-weight: 600; }
.setup-brand .desc { color: #6c757d; font-size: .9rem; }
.setup-steps { display: flex; gap: .5rem; margin-bottom: 1.25rem; font-size: .8rem; }
.setup-steps .step { flex: 1; padding: .4rem .6rem; border-radius: .4rem; background: #eef1f6; color: #6c757d; }
.setup-steps .step.current { background: var(--sidebar-active); color: #fff; }
.setup-steps .step.done { background: #d1e7dd; color: #0f5132; }

.validation-summary-valid { display: none; }

.toast-container { z-index: 1090; }
.app-toast { min-width: 280px; max-width: 420px; box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.18); }
.app-toast .toast-body { white-space: pre-line; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }

.mfa-code { font-size: 1.8rem; letter-spacing: .6rem; text-align: center; font-family: Consolas, monospace; }

@media (max-width: 991.98px) {
    .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 1040; transform: translateX(-100%); transition: transform .2s; }
    .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
    .content { padding: 1rem; }
}
