:root {
    --captura-sidebar-width: 240px;
}

body {
    background: #f5f7fb;
}

.captura-topbar {
    z-index: 1030;
}

.captura-shell {
    display: flex;
    padding-top: 56px;
    min-height: 100vh;
}

.captura-sidebar {
    width: var(--captura-sidebar-width);
    min-height: calc(100vh - 56px);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .captura-sidebar.offcanvas-md {
        position: sticky;
        top: 56px;
        transform: none !important;
        visibility: visible !important;
        display: block !important;
    }
}

.captura-nav-link {
    color: rgba(255, 255, 255, 0.75);
    padding: 0.65rem 1.25rem;
}

.captura-nav-link:hover,
.captura-nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.captura-main {
    flex: 1;
    padding: 1.25rem;
    min-width: 0;
}

.captura-footer {
    margin-left: 0;
    background: #fff;
}

@media (min-width: 768px) {
    .captura-footer {
        margin-left: var(--captura-sidebar-width);
    }
}

.chave-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
}

.btn-copy {
    line-height: 1;
    vertical-align: baseline;
}

.btn-copy svg {
    display: block;
}

.xml-viewer {
    max-height: 60vh;
    overflow: auto;
    font-size: 0.75rem;
    background: #111;
    color: #eee;
}

.table-empty {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
}

.captura-pagination {
    flex-wrap: wrap;
    gap: 0.15rem;
}

.captura-pagination .page-link {
    min-width: 2.25rem;
    text-align: center;
    border-radius: 0.375rem !important;
}

.captura-pagination .page-item.disabled .page-link {
    opacity: 0.55;
}

/* —— Settings —— */
.settings-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.settings-callouts {
    display: grid;
    gap: 0.5rem;
}

.settings-callout {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: baseline;
    padding: 0.65rem 0.9rem;
    border-radius: 0.5rem;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.85rem;
}

.settings-callout strong {
    color: #111827;
}

.settings-callout-info {
    background: #eff6ff;
    color: #1e3a5f;
}

.settings-callout-ok {
    background: #ecfdf5;
    color: #065f46;
}

.settings-shell {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem 1.1rem 1.25rem;
}

.settings-tabs .nav-link {
    border-radius: 999px;
    padding: 0.4rem 0.95rem;
    font-size: 0.875rem;
    color: #4b5563;
}

.settings-tabs .nav-link.active {
    background: #111827;
    color: #fff;
}

.settings-pane-blurb {
    font-size: 0.84rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.settings-group + .settings-group {
    margin-top: 1.35rem;
}

.settings-group-label {
    font-size: 0.7rem;
    font-weight: 650;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 0.35rem;
    padding: 0 0.15rem;
}

.settings-rows {
    border: 1px solid #eef0f3;
    border-radius: 0.65rem;
    overflow: hidden;
    background: #fafbfc;
}

.settings-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 220px);
    gap: 0.85rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-top: 1px solid #eef0f3;
    background: #fff;
}

.settings-row:first-child {
    border-top: 0;
}

.settings-row-label {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    color: #111827;
    margin: 0;
}

.settings-row-meta {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #6b7280;
}

.settings-default {
    display: inline-block;
    margin-left: 0.25rem;
    color: #9ca3af;
}

.settings-row-control .form-control,
.settings-row-control .form-select {
    max-width: 100%;
}

.settings-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.1rem;
    padding-top: 0.9rem;
    border-top: 1px solid #eef0f3;
}

.settings-readonly {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem 1.1rem;
}

.settings-readonly-title {
    font-weight: 600;
    margin-bottom: 0.65rem;
}

.settings-readonly-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.75rem;
    padding: 0.35rem 0;
    align-items: start;
}

.settings-readonly-row code {
    font-size: 0.78rem;
    word-break: break-all;
    color: #374151;
}

@media (max-width: 767.98px) {
    .settings-row {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .settings-readonly-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

/* —— Usage today —— */
.usage-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 992px) {
    .usage-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.usage-tile {
    background: #f8fafc;
    border: 1px solid #eef0f3;
    border-radius: 0.65rem;
    padding: 0.85rem 0.9rem;
    min-height: 100%;
}

.usage-tile-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.2rem;
}

.usage-tile-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.usage-tile-hint {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: #9ca3af;
    line-height: 1.35;
}

.gaps-card .card-header {
    background: #fafbfc;
}
