html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

/* ============================================
   VARIABLES Y RESET
   ============================================ */
:root {
    --primary-color: #952F57 /*#1A73E8*/;
    --primary-dark: #952F57 /*#1557b0*/;
    --secondary-color: #D93025;
    --success-color: #34A853;
    --warning-color: #FBBC05;
    --dark-bg: #1a1a2e;
    --light-bg: #f8f9fa;
    --gold: #FFD700;
    --silver: #C0C0C0;
    --bronze: #CD7F32;
}


body {
  margin-bottom: 60px;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--light-bg);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.avatar-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
}

.profile-image {
    transition: transform 0.2s ease;
}

    .profile-image:hover {
        transform: scale(1.05);
    }

.profile-image-container {
    position: relative;
    display: inline-block;
}

.profile-image-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

    .profile-image-overlay:hover {
        background: #0056b3;
    }

/* ============================================
   TOP BANNER
   ============================================ */
.top-banner {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #2d2d44 100%);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
}

.banner-text {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.banner-link {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .banner-link:hover {
        color: var(--gold);
        text-decoration: none;
    }

/* ============================================
   MAIN HEADER
   ============================================ */
.main-header {
    background: linear-gradient(to right, #fff 0%, #f8f9fa 100%);
    border-bottom: 3px solid var(--gold);
}

.logo-container {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.academy-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    margin: 0;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.academy-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
    color: var(--secondary-color);
    letter-spacing: 4px;
}

.slogan-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.slogan-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   NAVIGATION
   ============================================ */
.navbar-dark.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.8rem 1.2rem;
    transition: all 0.3s ease;
}

    .navbar-dark .navbar-nav .nav-link:hover {
        color: var(--gold);
        background-color: rgba(255, 255, 255, 0.1);
    }

    .navbar-dark .navbar-nav .nav-link.active {
        color: var(--gold);
        background-color: rgba(255, 255, 255, 0.15);
        border-bottom: 3px solid var(--gold);
    }

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dropdown-item i {
    margin-right: 8px;
    width: 20px;
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb-container {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.breadcrumb {
    background: transparent;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    background-color: var(--light-bg);
}

/* ============================================
   APP SURFACE
   ============================================ */
.app-shell-container {
    width: 100%;
}

.page-title,
.page-header-responsive {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.page-title::after,
.page-title::before {
    display: none;
}

.title_left,
.title_right {
    float: none;
    width: auto;
}

.title_left h1,
.title_left h2,
.title_left h3,
.page-title h1,
.page-title h2,
.page-title h3,
.page-header-responsive h1,
.page-header-responsive h2,
.page-header-responsive h3 {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.pull-right {
    float: none !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.action-bar,
.btn-toolbar-responsive {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.x_panel {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(26, 26, 46, 0.06);
    margin-bottom: 1rem;
    padding: 1rem;
}

.x_title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
}

.x_title h1,
.x_title h2,
.x_title h3,
.x_title h4,
.x_title h5 {
    margin-bottom: 0;
}

.x_content {
    width: 100%;
}

.card,
.alert,
.modal-content,
.dropdown-menu,
.x_panel {
    max-width: 100%;
}

.card-title,
.card-text,
.dropdown-item,
.alert,
.badge,
.btn,
.form-label {
    overflow-wrap: anywhere;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

.table {
    vertical-align: middle;
}

.table th,
.table td {
    white-space: normal;
}

.table-actions,
td .btn-group,
td .btn-group-sm {
    flex-wrap: nowrap;
}

.nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.nav-tabs .nav-link {
    white-space: nowrap;
}

.stats-grid .card {
    min-height: 100%;
}

.responsive-avatar {
    flex: 0 0 auto;
}

/* ============================================
   PUBLIC HOME
   ============================================ */
.home-hero {
    min-height: clamp(420px, 62vh, 680px);
    display: flex;
    align-items: center;
    padding: clamp(2.5rem, 6vw, 5rem);
    background:
        linear-gradient(90deg, rgba(18, 18, 34, 0.94) 0%, rgba(48, 23, 39, 0.84) 48%, rgba(149, 47, 87, 0.38) 100%),
        var(--hero-image);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
    border-radius: 0;
    color: #fff;
    overflow: hidden;
}

.home-hero__content {
    max-width: 720px;
}

.home-eyebrow {
    color: var(--gold);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.home-hero h1 {
    font-size: clamp(2.25rem, 5vw, 4.75rem);
    font-weight: 800;
    line-height: 1.04;
    margin-bottom: 1rem;
}

.home-hero__lead {
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.65;
    max-width: 650px;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.home-section {
    padding: 2rem 0;
}

.home-feature {
    height: 100%;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 8px 18px rgba(26, 26, 46, 0.06);
}

.home-feature__icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(149, 47, 87, 0.1);
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.home-feature h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.home-feature p {
    color: #5f6874;
    margin-bottom: 0;
}

.home-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: #fff;
    border-left: 5px solid var(--gold);
    box-shadow: 0 8px 18px rgba(26, 26, 46, 0.06);
}

.home-band h2 {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.home-band p {
    color: #5f6874;
    margin-bottom: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #16213e 100%);
    color: #fff;
    margin-top: auto;
}

.footer-title {
    color: var(--gold);
    font-weight: 700;
}

.footer-heading {
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
}

.footer-text {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .footer-links li {
        margin-bottom: 0.5rem;
    }

    .footer-links a {
        color: #ccc;
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .footer-links a:hover {
            color: var(--gold);
        }

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

    .social-link:hover {
        background-color: var(--primary-color);
        color: var(--gold);
        transform: translateY(-3px);
    }

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 0;
}

.copyright {
    color: #888;
    font-size: 0.9rem;
}

.developer-credit {
    color: #888;
    font-size: 0.9rem;
}

.credit-link {
    color: var(--gold);
    text-decoration: none;
}

    .credit-link:hover {
        text-decoration: underline;
    }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .app-shell-container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .academy-title {
        font-size: 1.5rem;
    }

    .academy-subtitle {
        font-size: 0.8rem;
        letter-spacing: 2px;
    }

    .slogan-container {
        margin: 10px 0;
    }

    .top-banner .col-md-6:last-child {
        text-align: left !important;
        margin-top: 5px;
    }

    .banner-contact {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .home-hero {
        min-height: auto;
        padding: 2rem 1.25rem;
        background:
            linear-gradient(180deg, rgba(18, 18, 34, 0.94) 0%, rgba(48, 23, 39, 0.9) 100%),
            var(--hero-image);
        background-repeat: no-repeat;
        background-position: right bottom;
        background-size: 55%;
    }

    .home-hero__actions .btn {
        width: 100%;
    }

    .home-band {
        align-items: stretch;
        flex-direction: column;
    }

    .home-band .btn {
        width: 100%;
    }
}

@media (max-width: 991.98px) {
    .main-header .row {
        row-gap: 1rem;
    }

    .header-brand {
        justify-content: center;
        text-align: center;
    }

    .header-login {
        display: flex;
        justify-content: center;
    }

    .login-nav {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem 0.75rem;
    }

    .navbar .dropdown-menu {
        box-shadow: none;
        margin-left: 0.75rem;
        max-height: 65vh;
        overflow-y: auto;
    }

    .quick-search-form {
        width: 100%;
    }

    .quick-search-form .input-group {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    html {
        font-size: 14px;
    }

    body {
        margin-bottom: 0;
    }

    h1,
    .h1 {
        font-size: 1.65rem;
    }

    h2,
    .h2 {
        font-size: 1.35rem;
    }

    h3,
    .h3 {
        font-size: 1.2rem;
    }

    .top-banner {
        font-size: 0.78rem;
        padding: 0.45rem 0;
    }

    .top-banner .row {
        row-gap: 0.35rem;
    }

    .banner-text {
        letter-spacing: 0;
    }

    .banner-contact {
        gap: 0.25rem 0.75rem;
    }

    .banner-link {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        line-height: 1.2;
        margin-right: 0 !important;
    }

    .main-header .row {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .logo-container {
        width: 52px;
        height: 52px;
        margin-right: 0.75rem !important;
    }

    .academy-title {
        font-size: 1.35rem;
        letter-spacing: 1px;
    }

    .slogan-container {
        font-size: 0.8rem;
        gap: 0.35rem;
        margin: 0;
    }

    .slogan-text {
        letter-spacing: 0;
    }

    .navbar-dark .navbar-nav .nav-link {
        border-radius: 6px;
        padding: 0.7rem 0.85rem;
    }

    .navbar-dark .navbar-nav .nav-link.active {
        border-bottom: 0;
    }

    .breadcrumb-container {
        display: none;
    }

    .main-content > .container-fluid {
        padding-top: 0.75rem !important;
    }

    .page-title,
    .page-header-responsive,
    .d-flex.justify-content-between.align-items-center.mb-3 {
        align-items: stretch !important;
        flex-direction: column;
    }

    .title_right,
    .pull-right,
    .action-bar,
    .btn-toolbar-responsive,
    .d-flex.justify-content-between.align-items-center.mb-3 > .btn-group,
    .d-flex.justify-content-between.align-items-center.mb-3 > .d-flex {
        justify-content: stretch;
        width: 100%;
    }

    .pull-right > *,
    .action-bar > *,
    .btn-toolbar-responsive > *,
    .d-flex.justify-content-between.align-items-center.mb-3 > .btn-group > .btn,
    .d-flex.justify-content-between.align-items-center.mb-3 > .d-flex > .btn {
        flex: 1 1 auto;
    }

    .pull-right .me-2,
    .action-bar .me-2,
    .btn-toolbar-responsive .me-2 {
        margin-right: 0 !important;
    }

    .btn,
    .form-control,
    .form-select,
    .input-group-text {
        min-height: 42px;
    }

    .btn-group:not(.btn-group-sm),
    .btn-group-vertical {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .btn-group:not(.btn-group-sm) > .btn {
        border-radius: 0.375rem !important;
    }

    .card-body,
    .x_panel {
        padding: 0.85rem;
    }

    .card-header,
    .card-footer {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .x_title {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-tabs {
        margin-left: -0.85rem;
        margin-right: -0.85rem;
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .card-header .nav-tabs {
        margin-bottom: -1px;
    }

    .card-header.p-0 .nav-tabs {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .tab-content.border {
        padding: 0.85rem !important;
    }

    .card-body > .row .d-flex.align-items-center.mb-3 {
        align-items: flex-start !important;
    }

    .card-body > .row .d-flex.flex-wrap.gap-3 {
        gap: 0.45rem !important;
    }

    .alert {
        padding: 0.75rem;
    }

    .alert .ms-2,
    .alert .ms-3 {
        display: block;
        margin-left: 0 !important;
        margin-top: 0.35rem;
    }

    .row {
        --bs-gutter-x: 1rem;
    }

    .table-responsive {
        margin-left: -0.15rem;
        margin-right: -0.15rem;
    }

    .table-mobile-stack {
        border-collapse: separate;
        border-spacing: 0 0.75rem;
        min-width: 0 !important;
    }

    .table-mobile-stack thead {
        display: none;
    }

    .table-mobile-stack tbody,
    .table-mobile-stack tr,
    .table-mobile-stack td {
        display: block;
        width: 100%;
    }

    .table-mobile-stack tr {
        background: #fff;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        box-shadow: 0 6px 14px rgba(26, 26, 46, 0.06);
        overflow: hidden;
    }

    .table-mobile-stack td {
        border: 0;
        display: grid;
        grid-template-columns: minmax(7rem, 38%) minmax(0, 1fr);
        gap: 0.75rem;
        padding: 0.55rem 0.75rem;
        text-align: left !important;
    }

    .table-mobile-stack td + td {
        border-top: 1px solid #f1f3f5;
    }

    .table-mobile-stack td::before {
        color: #6c757d;
        content: attr(data-label);
        font-weight: 600;
    }

    .table-mobile-stack td[data-label="Acciones"],
    .table-mobile-stack td[data-label=""] {
        display: flex;
        justify-content: flex-end;
    }

    .table-mobile-stack td[data-label="Acciones"]::before,
    .table-mobile-stack td[data-label=""]::before {
        content: "";
        display: none;
    }

    .table-mobile-stack td .btn-group,
    .table-mobile-stack td .btn-group-sm {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 0.35rem;
        width: 100%;
    }

    .table-mobile-stack td .btn-group > .btn,
    .table-mobile-stack td .btn-group-sm > .btn {
        border-radius: 0.375rem !important;
        flex: 0 0 auto;
    }

    .main-footer .row {
        row-gap: 1rem;
    }

    .social-links {
        align-items: center;
        flex-wrap: wrap;
    }

    .copyright,
    .developer-credit {
        text-align: center;
    }
}
