:root {
    --bs-primary: #102a70;
    --bs-primary-rgb: 16, 42, 112;
    --bs-primary-text-emphasis: #0b1d4d;
    --bs-primary-bg-subtle: #dce5ff;
    --bs-primary-border-subtle: #b7c7fb;
    --bs-body-bg: #eef1f6;
    --admin-surface: #ffffff;
    --admin-muted: #64748b;
}

body {
    background: radial-gradient(circle at 0 0, #f7f9ff, var(--bs-body-bg) 55%);
    color: #0f172a;
}

.navbar {
    backdrop-filter: blur(10px);
    /* backdrop-filter crea su propio contexto de apilamiento; sin
       position+z-index explícitos, los dropdowns del menú quedan
       atrapados detrás del contenido de <main> (las tarjetas). */
    position: relative;
    z-index: 1030;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.navbar .nav-link {
    border-radius: 10px;
    padding: .5rem .85rem;
    transition: background-color .15s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    background-color: rgba(255, 255, 255, 0.12);
}

.navbar .nav-link.active,
.navbar .nav-link.show {
    background-color: rgba(255, 255, 255, 0.18);
    font-weight: 600;
}

.navbar .dropdown-menu {
    border: none;
    border-radius: 14px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
    padding: .5rem;
    margin-top: .5rem;
}

.navbar .dropdown-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    border-radius: 10px;
    padding: .5rem .75rem;
    font-size: .93rem;
}

.navbar .dropdown-item i {
    color: var(--bs-primary);
    width: 1.1rem;
    text-align: center;
    flex-shrink: 0;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    background-color: var(--bs-primary-bg-subtle);
}

.navbar .dropdown-item.active {
    background-color: var(--bs-primary);
    color: #fff;
}

.navbar .dropdown-item.active i {
    color: #fff;
}

.admin-user-chip {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: right;
    color: #fff;
}

.admin-user-chip-name {
    font-size: .88rem;
    font-weight: 600;
}

.admin-user-chip-role {
    font-size: .74rem;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.btn-primary {
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: #0d235e;
    --bs-btn-hover-border-color: #0d235e;
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
    --bs-btn-active-bg: #081742;
    --bs-btn-active-border-color: #081742;
}

.alert-primary {
    --bs-alert-bg: rgba(var(--bs-primary-rgb), 0.1);
    --bs-alert-border-color: rgba(var(--bs-primary-rgb), 0.35);
    --bs-alert-color: #001043;
}

.card,
.table,
.bootstrap-table .fixed-table-container,
.modal-content {
    background-color: var(--admin-surface);
    border: 1px solid #dbe2ef;
    border-radius: 16px;
}

.card {
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06) !important;
}

.admin-page-title {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.dashboard-tile {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    padding: 1.25rem;
    border: 1px solid #dbe2ef;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.dashboard-tile:hover {
    transform: translateY(-2px);
    border-color: #9fb2ea;
    box-shadow: 0 12px 24px rgba(16, 42, 112, 0.14);
}

.dashboard-tile-icon {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: var(--bs-primary);
    background: #e6edff;
    flex-shrink: 0;
}

.dashboard-tile-title {
    display: block;
    font-weight: 700;
    font-size: 1.15rem;
}

.dashboard-tile-text {
    color: var(--admin-muted);
    margin: 0;
    font-size: 0.95rem;
}

.login-shell {
    min-height: calc(100vh - 90px);
    display: grid;
    place-items: center;
}

.login-card {
    width: min(430px, 100%);
    border-radius: 20px;
}

.login-logo {
    width: 78px;
    height: 78px;
    object-fit: contain;
    margin-bottom: .75rem;
}

.login-card .form-control {
    padding: .75rem .9rem;
}

.form-control:not(:disabled):not([readonly]),
.form-select:not(:disabled):not([readonly]) {
    background-color: #fff;
}


.form-stack {
    display: flex;
    flex-direction: column;
    gap: .95rem;
}

.form-switch .form-check-input {
    width: 2.8rem;
    height: 1.4rem;
}

.table .actions-cell {
    min-width: 180px;
}

.logo-preview {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid #dbe2ef;
    background: #fff;
}

.alert-error {
    color: var(--bs-danger-text-emphasis);
    background-color: var(--bs-danger-bg-subtle);
    border: 1px solid var(--bs-danger-border-subtle);
}

.alert-success {
    color: var(--bs-success-text-emphasis);
    background-color: var(--bs-success-bg-subtle);
    border: 1px solid var(--bs-success-border-subtle);
}

.admin-submit-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none !important;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(1px);
}

.admin-submit-loader.is-visible {
    display: flex  !important;
}

.admin-submit-loader__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 1px solid #dbe2ef;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    min-width: 220px;
}
