html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.layout {
    display: flex;
    height: 100vh;
}

.sidebar-img {
    width: 250px;
    margin: 20px 0px;
    height: auto;
}

.sidebar {
    width: 280px;
    background-color: white;
    padding: 1rem;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 0;
    padding: 0;
    overflow: hidden;
}


.main-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    transition: margin 0.3s ease;
    overflow-x: hidden;
    width: calc(100% - 280px);
}


.top-navbar {
    height: 60px;
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    position: fixed;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 1rem;
    top: 0;
    left: 280px;
    right: 0;
    z-index: 1030;
    transition: all 0.3s ease;
}

.top-navbar.with-sidebar {
    left: 280px;
    transition: all 0.3s ease;
}

.top-navbar.sidebar-collapsed {
    left: 0;
    transition: all 0.3s ease;
}

.content-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-top: 60px; /* espacio para el navbar superior */
    background: #e0ddff;
    display: flex;
    flex-direction: column;
}

.content-body {
    flex-grow: 1;
    margin: 15px;
}

.content-table {
    margin: 24px;
    background-color: #ffffff;
    padding: 24px;
    border-radius: 12px;
}

.content-margin {
    margin: 24px;
}


footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    background-color: white;
}

.nav-link {
    margin-bottom: 0.5rem;
}

.nav-link.active {
    background-color: #e9ecef;
    font-weight: bold;
    color: #0d6efd !important;
    border-left: 4px solid #0d6efd;
}

/* Focus para formularios y botones */
.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;
}

.neohr {
    height: 2px !important;
    color: #624bff;
}

.icon-back {
    font-size: 20px;
    margin-right: 10px;

}

.subject-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subject-item {
    display: inline-flex;
    align-items: center;
    background-color: #f1f3f5;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-size: 1rem;
    width: fit-content; /* << clave: solo ocupa lo necesario */
}

/* Nombre de la asignatura */
.subject-name {
    font-weight: 500;
    color: #333;
}

/* Contador */
.subject-count {
    font-size: 1rem;
    font-weight: bold;
    color: #007bff;
}

.subject-label {
    font-weight: 600;
    color: #333;
    margin-right: 8px;
}

.subject-usage {
    font-weight: bold;
    color: #007bff;
}

.card {
    border-radius: 0.75rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
}
.btn-icon {
    width: 140px; /* iguala el ancho del botón de texto */
    height: 38px; /* iguala la altura */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem; /* tamaño del icono */
    padding: 0.375rem 0.75rem; /* igual a .btn por defecto */
}

.box {
    max-width: 800px;
    margin: auto;
    margin-top: 100px;
    border: 1px solid #ffffff;
    padding: 51px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.clickable-row {
    cursor: pointer;
}

.category-table {
    table-layout: fixed;
    width: 100%;
}

.category-table th,
.category-table td {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
}

.category-table caption {
    caption-side: top; 
    text-align: left; 
    margin-bottom: 0.5em;
}
