/* Capa visual global: fondo sobrio y superficies legibles. */
html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    background: #f8fafc !important;
    color: #111827;
    isolation: isolate;
}

.enroque-internal-body {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 32%),
        linear-gradient(180deg, #eef4ff 0%, #f8fafc 58%, #f1f5f9 100%) !important;
}

.enroque-titlebar {
    background: linear-gradient(135deg, #0b1f3a 0%, #0d2d5a 52%, #2563eb 100%);
    border: 1px solid rgba(147, 197, 253, 0.22);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    color: #ffffff;
    margin-bottom: 1.5rem;
    overflow: hidden;
    padding: 1.15rem 1.25rem;
    position: relative;
}

.enroque-titlebar::after {
    content: "";
    position: absolute;
    inset: 0 0 auto auto;
    width: 360px;
    height: 160px;
    background-image: radial-gradient(rgba(191, 219, 254, 0.35) 1px, transparent 1px);
    background-size: 14px 14px;
    mask-image: radial-gradient(circle at top right, black 0%, transparent 72%);
    -webkit-mask-image: radial-gradient(circle at top right, black 0%, transparent 72%);
    pointer-events: none;
}

.enroque-titlebar-brand {
    align-items: center;
    display: flex;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.enroque-titlebar-logo {
    height: 42px;
    max-width: 150px;
    object-fit: contain;
    width: auto;
}

.enroque-titlebar-kicker {
    color: #bfdbfe;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.enroque-titlebar-title {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
}

.enroque-titlebar-subtitle {
    color: #dbeafe;
    font-size: 0.95rem;
    margin: 0.25rem 0 0;
}

.enroque-footer {
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.5;
    padding: 1.25rem 0 0.25rem;
    text-align: center;
}

.enroque-footer div + div {
    margin-top: 0.15rem;
}

.form-control,
.form-select {
    border-color: #dbe4f0;
    border-radius: 0.65rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.14);
}

.table thead,
.table-light {
    --bs-table-bg: #f1f5f9;
    --bs-table-color: #334155;
}

.bg-pattern {
    background-color: #f8fafc;
    background-image: url("/images/pattern.svg");
    background-repeat: no-repeat;
    background-position: left top;
    background-size: min(520px, 82vw);
    min-height: 100vh;
}

.sidebar-brand {
    text-align: center;
    padding: 1rem 0 1.25rem 0;
}

.sidebar-logo {
    max-width: 150px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.dashboard-bg,
.bg-enroque-pattern {
    min-height: 100vh;
    background-image:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.25), transparent 30%),
        url("/images/pattern.svg"),
        linear-gradient(180deg, #eef4ff 0%, #f8fafc 60%, #f1f5f9 100%);
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: top right, right top, center;
    background-size: auto, min(520px, 70vw) auto, auto;
}

.header-dashboard {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.header-dashboard h1 {
    font-weight: 700;
    color: #1e293b;
}

.card,
.modal-content,
.dropdown-menu {
    background-color: #ffffff;
}

.card,
.metric-card,
.dashboard-card {
    background: #ffffff;
    border-radius: 16px !important;
    border: 1px solid rgba(37, 99, 235, 0.08) !important;
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.06),
        0 4px 10px rgba(37, 99, 235, 0.05) !important;
    transition: all 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 16px 35px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(37, 99, 235, 0.08) !important;
}

.metric-card .card-body {
    padding: 1.5rem;
}

.table,
.table-responsive,
.modal-content,
.offcanvas {
    background-color: #ffffff;
}

.admin-sidebar {
    width: 280px !important;
    min-width: 280px;
    flex: 0 0 280px;
    background: linear-gradient(180deg, #0b1f3a 0%, #0d2d5a 100%) !important;
    color: #e5e7eb;
    z-index: 1045;
}

.admin-sidebar.sidebar-expanded {
    width: 280px !important;
    min-width: 280px;
    flex-basis: 280px;
}

@media (min-width: 992px) {
    .admin-sidebar.sidebar-expanded {
        transform: none !important;
        visibility: visible !important;
    }
}

.admin-sidebar .offcanvas-header,
.admin-sidebar .offcanvas-body {
    background: transparent;
}

.admin-sidebar .nav-link {
    color: #cbd5e1 !important;
}

.admin-sidebar .nav-link .bi {
    color: #9ca3af !important;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #ffffff !important;
    background: rgba(59, 130, 246, 0.18) !important;
}

.admin-sidebar .nav-link.active {
    background: linear-gradient(90deg, #2563eb, #3b82f6) !important;
    color: #ffffff !important;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.admin-sidebar .nav-link.active .bi {
    color: #93c5fd !important;
}

.admin-sidebar .btn-outline-secondary {
    --bs-btn-color: #e5e7eb;
    --bs-btn-border-color: #4b5563;
    --bs-btn-hover-bg: #1f2937;
    --bs-btn-hover-border-color: #6b7280;
}

.sidebar-brand-icon {
    background: rgba(13, 110, 253, 0.18) !important;
    color: #93c5fd !important;
}

.sidebar-brand-logo {
    width: 160px;
    max-width: 100%;
    height: 44px;
    object-fit: contain;
    display: block;
}

.sidebar-brand-subtitle {
    color: #9ca3af;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0;
    margin-top: 0.35rem;
}

.metric-value {
    font-size: 30px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.metric-label {
    font-size: 13px !important;
    color: #64748b !important;
}

.metric-icon {
    width: 2.5rem !important;
    height: 2.5rem !important;
    font-size: 1.12rem;
    background: rgba(37, 99, 235, 0.10) !important;
}

.alert {
    border-radius: 14px;
    padding: 16px 18px;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.10);
}
