:root {
    --bg-page: #f3f6fb;/* fondo de la página */
    --bg-panel: rgba(255, 255, 255, 0.95);/* fondo del panel */
    --bg-panel-soft: #f8fafc;/* fondo del panel (suave) */
    --bg-sidebar: #293040;/* fondo de la barra lateral */
    --bg-sidebar-muted: rgba(41, 48, 64, 0.94);/* fondo de la barra lateral (atenuado) */
    --text-primary: #D3AC2B;/* texto principal */
    --text-secondary: #4b5563;/* texto secundario */
    --text-inverse: #ffffff;/* texto inverso */
    --text-muted: #53607a;/* texto atenuado */
    --border: rgba(15, 23, 42, 0.08);/* borde */
    --border-strong: rgba(15, 23, 42, 0.16);/* borde fuerte */
    --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.08);/* sombra suave */
    --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.12);/*sombra de tarjeta */
    --radius: 1rem;/* radio de borde */
    --radius-sm: 0.85rem;/* radio de borde pequeño */
    --transition: 220ms ease;/* transición */
    --brand: #D3AC2B;/* color de la marca */
    --brand-dark: #293040;/* color de la marca (oscuro) */
    --success: #14d897;/* color de éxito */
    --warning: #f59e0b;/* color de advertencia */
    --danger: #ef4444;/* color de peligro */
    --sidebar-width: 280px;/* ancho de la barra lateral */
    --sidebar-higth: 70px;/* altura de la barra lateral */
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 28%),
                radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.12), transparent 25%),
                var(--bg-page);
    min-height: 100vh;
}

img,
svg {
    max-width: 100%;
    display: block;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color var(--transition), text-decoration var(--transition);
}

a:hover,
button:hover {
    color: var(--brand-dark);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

header,
main,
footer,
section,
article {
    display: block;
}

#app {
    min-height: 100vh;
}

main {
    padding: 1.5rem;
    max-width: 1320px;
    margin: 0 auto;
}

.container {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 0 1rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col-md-8 {
    width: 100%;
    padding: 0 0.75rem;
}

@media (min-width: 768px) {
    .col-md-8 {
        width: 66.6667%;
    }
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(248, 248, 248, 0.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.06);
}

.navbar-brand {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar-nav .nav-link {
    color: var(--text-secondary);
    padding: 0.7rem 1rem;
    border-radius: 999px;
    transition: all var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    background: rgba(59, 130, 246, 0.12);
    color: var(--text-primary);
}

.navbar-toggler {
    display: none;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    position: relative;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon span {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
}

.navbar-toggler-icon::before {
    top: 0;
}

.navbar-toggler-icon span {
    top: 50%;
    transform: translateY(-50%);
}

.navbar-toggler-icon::after {
    bottom: 0;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 1.5rem 1.2rem;
    background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
    color: var(--text-inverse);
    transform: translateX(-110%);
    transition: transform var(--transition);
    z-index: 1050;
    box-shadow: 6px 0 36px rgba(0, 0, 0, 0.24);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.sidebar-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.btn-close-sidebar {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    cursor: pointer;
    transition: background var(--transition);
}

.btn-close-sidebar:hover {
    background: rgba(255, 255, 255, 0.16);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: var(--text-inverse);
    font-weight: 700;
}

.user-info .user-name,
.user-info .user-role {
    margin: 0;
}

.user-info .user-name {
    color: #ffffff;
    font-weight: 700;
}

.user-info .user-role {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.93rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.nav-section-title {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.85rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
}

.nav-item i {
    font-size: 1.1rem;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.nav-item.active {
    box-shadow: inset 4px 0 0 #3b82f6;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    z-index: 1040;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.btn-toggle-sidebar {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 1060;+
    width: 3.5rem;
    height: 3.5rem;
    border: none;
    border-radius: 999px;
    background: var(--brand);
    color: var(--text-inverse);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
    transition: transform var(--transition), background var(--transition);
}

.btn-toggle-sidebar:hover {
    transform: translateY(-2px);
    background: var(--brand-dark);
}

.card {
    background: var(--bg-panel);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.glass-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
}

.card + .card,
.glass-card + .glass-card {
    margin-top: 1.5rem;
}

.card-header {
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(243, 244, 246, 0.95);
}

.card-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

.section-title {
    margin: 0 0 0.85rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.section-subtitle {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.75;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.badge-success {
    background: rgba(16, 185, 129, 0.13);
    color: #047857;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #92400e;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.table th,
.table td {
    padding: 1rem 1.25rem;
    text-align: left;
}

.table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.table tbody tr {
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    transition: background var(--transition);
}

.table tbody tr:hover {
    background: rgba(59, 130, 246, 0.06);
}

.table td {
    color: var(--text-secondary);
}

.table td.font-medium {
    color: var(--text-primary);
}

.button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--brand);
    color: var(--text-inverse);
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition);
}

.button:hover,
.btn:hover {
    background: var(--brand-dark);
}

.button:focus-visible,
.btn:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.3);
    outline-offset: 2px;
}

.button-secondary {
    background: #fffefe;
    color: #1f2937;
    border-color: rgba(15, 23, 42, 0.12);
}

.button-secondary:hover {
    background: #f8fafc;
}

.button-link {
    background: transparent;
    color: var(--brand);
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
select,
textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(34, 197, 94, 0.2);
    background: rgba(220, 252, 231, 0.9);
    color: #065f46;
}

.alert-success {
    border-color: rgba(16, 185, 129, 0.2);
    background: rgba(220, 252, 231, 0.9);
}

.alert-error {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(254, 226, 226, 0.9);
    color: #991b1b;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.75s ease-out both;
}

.animation-delay-100 {
    animation-delay: 0.1s;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

.animation-delay-500 {
    animation-delay: 0.5s;
}

@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay,
    .btn-toggle-sidebar {
        display: none;
    }

    body.has-sidebar main {
        margin-left: var(--sidebar-width);
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (max-width: 992px) {
    .navbar-toggler {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .navbar-nav {
        gap: 0.5rem;
        flex-direction: column;
        width: 100%;
    }

    .navbar-nav .nav-link {
        width: 100%;
        padding-left: 0.9rem;
        padding-right: 0.9rem;
    }

    .sidebar {
        width: min(100%, 320px);
    }

    .card {
        border-radius: 1rem;
    }

    .table {
        min-width: auto;
    }
}
