/* Variables de color personalizadas */
:root {
    --bg: #e9e9eb;
    --ink: #2f3440;
    --brand: #ff6a00;
    --brand-soft: #ffe3cf;
    --line: #d8dbe0;
    --card: #ffffff;
    --topbar: #ff6a00;
    --topbar-ink: #ffffff;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Georgia, Cambria, "Times New Roman", serif;
    color: var(--ink);
    background: radial-gradient(circle at 10% 15%, #f4f4f5 0%, var(--bg) 45%, #dddddf 100%);
}

body.adminlte-page {
    background: #eef1f4;
    font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.brand {
    font-size: 20px;
    letter-spacing: .5px;
    font-weight: 700;
}

.brand span { color: #ffcf9f; }

.navbar-orange {
    background: var(--topbar);
    border-bottom: 1px solid #e95f00;
}

.navbar-orange .navbar-brand,
.navbar-orange .nav-link,
.navbar-orange .small {
    color: var(--topbar-ink) !important;
}

.navbar-orange .btn-outline-secondary,
.navbar-orange .btn-outline-dark {
    --bs-btn-color: #fff;
    --bs-btn-border-color: #fff;
    --bs-btn-hover-color: var(--brand);
    --bs-btn-hover-bg: #fff;
    --bs-btn-hover-border-color: #fff;
}

.navbar-orange .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.7);
}

.navbar-orange .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

.btn-brand {
    background: var(--brand);
    border-color: var(--brand);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-brand:hover {
    background: #e55d00;
    border-color: #e55d00;
    color: white;
}

.btn-brand:active,
.btn-brand:focus {
    background: #cc5000 !important;
    border-color: #cc5000 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 106, 0, 0.5) !important;
}

.btn-outline-brand {
    color: var(--brand);
    border-color: var(--brand);
}

.btn-outline-brand:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: white;
}

/* Estilos de tarjetas */
.intranet-course-card {
    border: 1px solid var(--line);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.intranet-course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.intranet-course-card-disabled {
    border: 1px solid #ccc;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    opacity: 0.6;
    filter: grayscale(80%);
}

/* Foco de formularios en azul */
.form-control:focus,
.form-select:focus,
textarea.form-control:focus,
input.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Barra de progreso personalizada */
.progress-bar {
    transition: width 0.6s ease;
}

.progress-bar.bg-brand {
    background-color: var(--brand) !important;
}

/* Estilos de tabla */
.table-hover tbody tr:hover {
    background-color: rgba(255, 106, 0, 0.05);
}

/* Tarjetas de dashboard */
.card {
    border: 1px solid var(--line);
    border-radius: 8px;
}

.card.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    border-radius: 4px;
}

.text-bg-brand {
    background-color: var(--brand) !important;
    color: white !important;
}

/* Links */
a { color: var(--brand); }
a:hover { color: #e55d00; }

/* Texto muted */
.text-muted { color: #999 !important; }

/* Light background */
.bg-light-subtle {
    background-color: #f5f5f5;
}

/* Listados admin estilo referencia */
.admin-list-shell {
    min-height: auto;
    background: transparent;
    display: flex;
    flex-direction: row !important;
    gap: 1rem;
}

.admin-list-shell .form-sidebar.admin-list-sidebar {
    display: flex !important;
    flex: 0 0 190px;
    background: linear-gradient(135deg, #061b36 0%, #0d2e4a 100%);
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 14px 30px rgba(8, 24, 46, 0.35);
    padding: 1rem;
    position: relative;
    overflow: hidden;
    min-height: 620px;
}

.admin-list-shell .form-sidebar.admin-list-sidebar::before {
    content: '';
    position: absolute;
    top: -25%;
    right: -30%;
    width: 260px;
    height: 260px;
    background: rgba(245, 138, 31, 0.11);
    border-radius: 50%;
}

.admin-list-rail-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.admin-list-sidebar .form-info-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 1rem;
    margin-bottom: 1rem;
}

.admin-list-sidebar .form-info-title {
    color: #fff;
    font-size: 0.95rem;
    gap: 0.5rem;
}

.admin-list-sidebar .form-info-text,
.admin-list-sidebar .form-info-list li {
    color: rgba(255, 255, 255, 0.86);
}

.admin-list-sidebar .form-info-text {
    font-size: 0.8rem;
    line-height: 1.35;
}

.admin-list-sidebar .form-info-list li {
    font-size: 0.78rem;
    line-height: 1.25;
    padding: 0.3rem 0;
}

.admin-list-rail-title {
    color: #b3d5ff;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin: 0 0 0.85rem;
}

.admin-list-rail-links {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.admin-list-rail-link {
    color: #e7f1ff;
    text-decoration: none;
    border: 1px solid rgba(179, 213, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.admin-list-rail-link span {
    line-height: 1.2;
    word-break: break-word;
}

.admin-list-rail-link:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.11);
}

.admin-list-rail-link.active {
    background: linear-gradient(90deg, #ff8a00 0%, #ff6a00 100%);
    border-color: rgba(255, 255, 255, 0.32);
    color: #fff;
}

.admin-list-shell .form-content.admin-list-content {
    display: block;
    flex: 1;
    width: auto;
    padding: 0;
    align-items: stretch;
    justify-content: flex-start;
    background: transparent;
    overflow: visible;
}

.admin-list-main {
    border-radius: 12px;
    padding: 1.2rem;
    width: 100%;
    max-width: none;
    margin-bottom: 0;
}

.admin-list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.admin-list-toolbar {
    background: #f8fafc;
    border: 1px solid #dde6ef;
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.admin-list-search {
    flex: 1 1 auto;
    min-width: 220px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid #cfdae6;
    border-radius: 10px;
    background: #fff;
    padding: 0 0.75rem;
}

.admin-list-search i {
    color: #6f8097;
}

.admin-list-search input {
    width: 100%;
    border: 0;
    outline: 0;
    height: 42px;
    background: transparent;
    color: #203247;
}

.admin-list-toolbar-actions {
    display: inline-flex;
    gap: 0.5rem;
}

.admin-list-meta {
    font-size: 0.9rem;
    color: #5f728a;
    margin-bottom: 0.6rem;
}

.admin-list-table-wrap {
    border: 1px solid #dbe5ef;
    border-radius: 12px;
}

.admin-list-table thead th {
    background: linear-gradient(180deg, #0c2f57 0%, #082648 100%);
    color: #f2f7ff;
    font-size: 0.84rem;
    font-weight: 700;
    border-bottom: 0;
    white-space: nowrap;
}

.admin-list-table tbody td {
    font-size: 0.92rem;
    color: #1f2f44;
    vertical-align: middle;
}

@media (max-width: 991.98px) {
    .admin-list-shell {
        flex-direction: row !important;
    }

    .admin-list-shell .form-sidebar.admin-list-sidebar {
        flex-basis: 165px;
        min-height: 560px;
    }

    .admin-list-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-list-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-list-toolbar-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 767.98px) {
    .admin-list-shell {
        display: block;
    }

    .admin-list-shell .form-sidebar.admin-list-sidebar {
        display: none !important;
    }

    .admin-list-main {
        padding: 0.9rem;
    }

    .admin-list-toolbar-actions {
        justify-content: stretch;
    }

    .admin-list-toolbar-actions .btn {
        flex: 1 1 auto;
    }
}

/* Detalle de curso con franja lateral */
.course-detail-shell {
    min-height: auto;
    background: transparent;
    display: flex;
    flex-direction: row !important;
    gap: 1rem;
}

.course-detail-shell .form-sidebar.course-detail-sidebar {
    display: flex !important;
    flex: 0 0 190px;
    background: linear-gradient(135deg, #061b36 0%, #0d2e4a 100%);
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 14px 30px rgba(8, 24, 46, 0.35);
    padding: 1rem;
    position: relative;
    overflow: hidden;
    min-height: 620px;
}

.course-detail-shell .form-sidebar.course-detail-sidebar::before {
    content: '';
    position: absolute;
    top: -25%;
    right: -30%;
    width: 260px;
    height: 260px;
    background: rgba(245, 138, 31, 0.11);
    border-radius: 50%;
}

.course-detail-shell .form-sidebar.course-detail-sidebar .form-info-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 1rem;
    margin-bottom: 1rem;
}

.course-detail-shell .form-sidebar.course-detail-sidebar .form-info-title {
    color: #fff;
    font-size: 0.95rem;
    gap: 0.5rem;
}

.course-detail-shell .form-sidebar.course-detail-sidebar .form-info-text,
.course-detail-shell .form-sidebar.course-detail-sidebar .form-info-list li {
    color: rgba(255, 255, 255, 0.86);
}

.course-detail-shell .form-sidebar.course-detail-sidebar .form-info-text {
    font-size: 0.8rem;
    line-height: 1.35;
}

.course-detail-shell .form-sidebar.course-detail-sidebar .form-info-list li {
    font-size: 0.78rem;
    line-height: 1.25;
    padding: 0.3rem 0;
}

.course-detail-shell .form-content.course-detail-content {
    flex: 1;
    width: auto;
    padding: 0;
    align-items: stretch;
    justify-content: flex-start;
    background: transparent;
    overflow: visible;
}

.course-detail-content .card {
    width: 100%;
    max-width: none;
}

.course-detail-sidebar .btn.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.45);
    color: #eef6ff;
}

.course-detail-sidebar .btn.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 991.98px) {
    .course-detail-shell {
        flex-direction: row !important;
    }

    .course-detail-shell .form-sidebar.course-detail-sidebar {
        flex-basis: 165px;
        min-height: 560px;
    }
}

@media (max-width: 767.98px) {
    .course-detail-shell {
        display: block;
    }

    .course-detail-shell .form-sidebar.course-detail-sidebar {
        display: none !important;
    }

    .course-detail-shell .form-content.course-detail-content {
        padding: 0;
    }
}
