/* public/styles.css */
*,
::before,
::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb
}
::before,
::after {
    --tw-content: ''
}
html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    font-feature-settings: normal
}
body {
    margin: 0;
    line-height: inherit
}
hr {
    height: 0;
    color: inherit;
    border-top-width: 1px
}
abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit
}
a {
    color: inherit;
    text-decoration: inherit
}
b,
strong {
    font-weight: bolder
}
code,
kbd,
samp,
pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 1em
}
small {
    font-size: 80%
}
sub,
sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline
}
sub {
    bottom: -.25em
}
sup {
    top: -.5em
}
table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse
}
button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
    padding: 0
}
button,
select {
    text-transform: none
}
button,
[type=button],
[type=reset],
[type=submit] {
    -webkit-appearance: none;
    appearance: none;
    background-color: transparent;
    background-image: none
}
/* CORRECCIÓN: Usar el pseudo-elemento estándar en lugar del específico de Mozilla */
:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}
:-moz-ui-invalid {
    box-shadow: none
}
progress {
    vertical-align: baseline
}
[type=search] {
    /* CORRECCIÓN: Restaurar la apariencia para los campos de búsqueda */
    -webkit-appearance: auto;
    appearance: auto;
    outline-offset: -2px
}
::-webkit-search-decoration {
    -webkit-appearance: none
}
::-webkit-file-upload-button {
    -webkit-appearance: button;
    font: inherit
}
summary {
    display: list-item
}
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
    margin: 0
}
fieldset {
    margin: 0;
    padding: 0
}
legend {
    padding: 0
}
ol,
ul,
menu {
    list-style: none;
    margin: 0;
    padding: 0
}
textarea {
    resize: vertical
}
input::placeholder,
textarea::placeholder {
    opacity: 1;
    color: #9ca3af
}
button,
select,
input,
textarea {
    border-radius: .5rem;
    border-width: 1px
}
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid transparent;
    outline-offset: 2px
}
button {
    cursor: pointer
}
h1,
h2,
h3 {
    font-weight: 700
}
h1 {
    font-size: 1.875rem;
    line-height: 2.25rem
}
h2 {
    font-size: 1.5rem;
    line-height: 2rem
}
h3 {
    font-size: 1.25rem;
    line-height: 1.75rem
}
h4 {
    font-weight: 600 /* Un poco más de peso para los subtítulos */
}
/* =================================================================== */
/* --- CONFIGURACIÓN DE COLORES Y FUENTES (AFECTA AL PANEL PERFIL) --- */
/* =================================================================== */
:root {
    /* --- PALETA DE COLORES "SIENA Y CIELO" --- */

    /* Colores Principales y de Acento */
    --primary-blue: #3B82F6;      /* Azul Cielo (Botones principales) */
    --primary-blue-hover: #2563EB; /* Azul más oscuro para hover */
    --accent-orange: #EA580C;     /* Naranja vivo para acentos (ej. editar) */
    --accent-orange-hover: #C2410C;/* Naranja más oscuro para hover */

    /* Fondos y Paneles (Estos definen el aspecto del modal de Perfil) */
    --main-bg: #c7d6e4;           /* CAMBIO: Fondo principal: Tono sepia/pergamino claro */
    --header-bg: #4A5568;         /* Cabecera: Gris pizarra oscuro */
    --panel-bg: #d3c492;         /* Paneles y tarjetas (como el modal de Perfil) */
    --panel-bg-alt: #b6c9d6;     /* Fondo alternativo para paneles (gris azulado muy claro) */
    --input-bg: #ebdcbe;          /* Fondo para inputs */

    /* Bordes y Separadores */
    --border-color: #e2e8f0;      /* Borde principal (gris claro) */
    --border-color-dark: #D1D5DB; /* Borde más oscuro (tono gris medio) */

    /* Textos (Estos definen la tipografía y color de letra del modal de Perfil) */
    --text-primary: #2D3748;      /* Texto principal (gris muy oscuro, para títulos y datos importantes) */
    --text-secondary: #718096;    /* Texto secundario (gris medio, para etiquetas como "Nombre", "Especialidad") */
    --text-on-primary: #ffffff;   /* Texto sobre botones primarios (blanco) */
    --text-on-header: #ffffff;    /* Texto sobre la cabecera (blanco) */

    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* La fuente principal de la aplicación se define en el body y se hereda en el panel de Perfil */
/* Puedes cambiar "Inter" por otra fuente que prefieras, como "Lato", "Roboto", etc. */
/* =================================================================== */

/* Contador de alumnos (badge) */
.students-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary);
    color: var(--sepia-bg);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

/* Contenedor forzado 2x2 para botones de acción del alumno */
.student-actions-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    width: 100% !important;
}

/* Botones de acción mejorados */
.btn-action-mobile {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 0.75rem;
    background-color: var(--accent-orange);
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    min-height: 4.5rem; /* Altura mínima para que se vean como bloques */
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.1);
}

.btn-primary-mobile {
    background-color: var(--primary-blue);
}

/* NUEVO: Estilo para la barra de estado de la suscripción */
.subscription-status-bar {
    color: #d8e2e7; /* text-sky-700 - Azul intenso para que resalte */
    font-weight: 600;
    text-align: center;
    background-color: #0d4a72; /* bg-sky-100 - Fondo azul muy claro */
}

/* Estilo para el handle de arrastre */
.drag-handle {
    touch-action: none; /* Mejora el rendimiento en táctil */
    font-size: 1.1rem;
}

/* Utility classes for sepia palette */
.bg-sepia-bg {
    background-color: var(--main-bg);
}
.bg-sepia-panel {
    background-color: var(--panel-bg);
}
/* Nueva clase para la cabecera verde */
.bg-header-green {
    background-color: var(--header-bg);
}

body {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: var(--main-bg);
    color: var(--text-primary);
    min-height: 100vh;
}
input, select, textarea {
    background-color: var(--input-bg);
    border-color: var(--border-color);
}
input:focus,
select:focus,
textarea:focus {
    /* Mantenemos el fondo blanco en los inputs al hacer foco para máxima claridad */
    background-color: #FFFFFF;
}
.panel {
    /* Usamos el color alternativo para los paneles principales, reduciendo el brillo */
    background-color: var(--panel-bg-alt);
    border-radius: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

@media (max-width: 768px) {
    .panel {
        border-radius: 0; /* Eliminar redondeo en móvil para ganar espacio */
        border-left: none;
        border-right: none;
    }
}

.loader {
    border: 4px solid rgba(0, 0, 0, 0.08);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 1s linear infinite
}
@keyframes spin {
    0% {
        transform: rotate(0)
    }
    100% {
        transform: rotate(360deg)
    }
}
.modal-backdrop {
    /* Ligeramente más oscuro para que el modal resalte más */
    background: rgba(45, 55, 72, 0.6);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.btn-primary {
    background: var(--primary-blue);
    color: var(--text-on-primary);
    transition: background-color 0.2s
}
.btn-primary:hover {
    background-color: var(--primary-blue-hover);
}
.btn-edit {
    background: var(--accent-orange);
    color: var(--text-on-primary);
    transition: background-color 0.2s
}
.btn-edit:hover {
    background-color: var(--accent-orange-hover);
}
.btn-secondary {
    background: var(--border-color);
    color: var(--text-primary);
    transition: background-color 0.2s
}
.btn-secondary:hover {
    background-color: #d1c8b8
}
.btn-registered {
    background-color: #10b981;
    color: white;
}
.btn-registered:hover {
    background-color: #059669;
}
.btn-registered:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}
.btn-close {
    background-color: #e5e7eb;
    color: #4b5563;
    transition: background-color 0.2s, color 0.2s;
    border-radius: .375rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1
}
.btn-close:hover {
    background-color: #d1d5db;
    color: #1f2937
}
/* NUEVO: Estilo unificado para las tarjetas de la sección de Ajustes */
.settings-item {
    background-color: #ffffff;
    border: 1px solid #e5e7eb; /* border-gray-200 */
    border-radius: 0.5rem; /* rounded-lg */
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); /* shadow-sm */
}

.settings-item:hover {
    border-color: #93c5fd; /* hover:border-blue-300 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); /* shadow-md */
    transform: translateY(-2px);
}

/* Estilo para el botón de "Ver ventajas" en el perfil */
.btn-main-nav.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
/* Audition modal creation form fixes for desktop display */
.audition-creation-panel {
    align-items: start;
}
.audition-creation-panel button[type="submit"] {
    display: block;
    width: 100%;
}
#audition-modal .lg\:col-span-1 {
    min-width: 320px;
}
#audition-modal .modal-inner {
    min-height: 60vh;
}
/* MEJORA: Estilo para los botones de icono de la cabecera */
.btn-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem; /* 44px */
    height: 2.75rem; /* 44px */
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.student-selected {
    background-color: #e0f2fe!important;
    border-left-width: 4px;
    border-left-color: var(--primary-blue);
}
.modal-inner {
    /* Los modales sí serán de color blanco puro para que destaquen */
    background-color: var(--panel-bg);
    max-height: 90vh; /* Un poco más de altura permitida */
    overflow-y: auto
}
.list-modal-container {
    max-height: calc(85vh - 150px);
    overflow: auto;
    border-width: 1px;
    border-radius: .5rem;
    position: relative;
}
.fixed-header {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1)
}
.modal-scroll-container {
    max-height: calc(85vh - 180px);
    overflow-y: auto;
    border-width: 1px;
    border-radius: .5rem;
    padding: 1rem;
}
.progress-bar-bg {
    position: relative;
    width: 100%;
    height: 24px;
    background-color: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    border-radius: 12px;
    background-color: var(--primary-blue);
    transition: width .5s ease-in-out;
    min-width: 2px;
}
.progress-bar-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 600;
    color: #111827;
    pointer-events: none;
}
.chart-container {
    position: relative;
    width: 100%;
    min-height: 280px;
    max-height: 460px;
}
.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}
.fixed {
    position: fixed
}
.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0
}
.z-\[100\] {
    z-index: 100
}
.z-40 {
    z-index: 40
}
.z-50 {
    z-index: 50
}
.mx-auto {
    margin-left: auto;
    margin-right: auto
}
.mb-2 {
    margin-bottom: .5rem
}
.mb-3 {
    margin-bottom: .75rem
}
.mb-4 {
    margin-bottom: 1rem
}
.mb-6 {
    margin-bottom: 1.5rem
}
.ml-2 {
    margin-left: .5rem
}
.mr-2 {
    margin-right: .5rem
}
.mt-1 {
    margin-top: .25rem
}
.mt-2 {
    margin-top: .5rem
}
.mt-3 {
    margin-top: .75rem
}
.mt-4 {
    margin-top: 1rem
}
.mt-6 {
    margin-top: 1.5rem
}
.flex {
    display: flex
}
.h-16 {
    height: 4rem
}
.h-2 {
    height: .5rem
}
.h-8 {
    height: 2rem
}
.w-16 {
    width: 4rem
}
.w-24 {
    width: 6rem
}
.w-40 {
    width: 10rem
}
.w-8 {
    width: 2rem
}
.w-full {
    width: 100%
}
.max-w-2xl {
    max-width: 42rem
}
.max-w-4xl {
    max-width: 56rem;
}
.max-w-5xl {
    max-width: 64rem
}
.max-w-6xl {
    max-width: 72rem
}
.max-w-7xl {
    max-width: 80rem
}
.flex-1 {
    flex: 1 1 0%
}
.flex-shrink-0 {
    flex-shrink: 0
}
.flex-col {
    flex-direction: column
}
.items-start {
    align-items: flex-start
}
.items-center {
    align-items: center
}
.items-end {
    align-items: flex-end
}
.justify-center {
    justify-content: center
}
.justify-end {
    justify-content: flex-end
}
.justify-between {
    justify-content: space-between
}
.gap-2 {
    gap: .5rem
}
.gap-3 {
    gap: .75rem
}
.gap-4 {
    gap: 1rem
}
.gap-6 {
    gap: 1.5rem
}
.space-y-1>*,
[class~=space-y-1]>:not([hidden])~:not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(.25rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(.25rem * var(--tw-space-y-reverse))
}
.space-y-1\.5>*,
[class~=space-y-1\.5]>:not([hidden])~:not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(.375rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(.375rem * var(--tw-space-y-reverse))
}
.space-y-2>*,
[class~=space-y-2]>:not([hidden])~:not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(.5rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(.5rem * var(--tw-space-y-reverse))
}
.space-y-4>*,
[class~=space-y-4]>:not([hidden])~:not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(1rem * var(--tw-space-y-reverse))
}
.space-y-6>*,
[class~=space-y-6]>:not([hidden])~:not([hidden]) {
    --tw-space-y-reverse: 0;
    margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
    margin-bottom: calc(1.5rem * var(--tw-space-y-reverse))
}
.overflow-auto {
    overflow: auto
}
.overflow-hidden {
    overflow: hidden
}
.overflow-x-auto {
    overflow-x: auto
}
.overflow-y-auto {
    overflow-y: auto
}
.rounded-2xl {
    border-radius: 1rem
}
.rounded-full {
    border-radius: 9999px
}
.rounded-lg {
    border-radius: .5rem
}
.rounded-md {
    border-radius: .375rem
}
.border {
    border-width: 1px
}
.border-b {
    border-bottom-width: 1px
}
.border-t {
    border-top-width: 1px
}
.border-t {
    border-top-width: 1px
}
.bg-gray-100 {
    background-color: #f3f4f6
}
.bg-gray-200 {
    background-color: #e5e7eb
}
.bg-gray-800 {
    background-color: #1f2937
}
.bg-gray-50 {
    background-color: #f9fafb
}
.bg-red-100 {
    background-color: #fee2e2
}
.bg-red-600 {
    background-color: #dc2626
}
.bg-sky-100 {
    background-color: #e0f2fe
}
.bg-sky-600 {
    background-color: #0284c7
}
.bg-white {
    background-color: #fff
}
.p-1 {
    padding: .25rem
}
.p-2 {
    padding: .5rem
}
.p-3 {
    padding: .75rem
}
.p-4 {
    padding: 1rem
}
.p-6 {
    padding: 1.5rem
}
.p-8 {
    padding: 2rem
}
.px-2 {
    padding-left: .5rem;
    padding-right: .5rem
}
.px-3 {
    padding-left: .75rem;
    padding-right: .75rem
}
.px-4 {
    padding-left: 1rem;
    padding-right: 1rem
}
.px-5 {
    padding-left: 1.25rem;
    padding-right: 1.25rem
}
.py-1 {
    padding-top: .25rem;
    padding-bottom: .25rem
}
.py-1\.5 {
    padding-top: .375rem;
    padding-bottom: .375rem
}
.py-2 {
    padding-top: .5rem;
    padding-bottom: .5rem
}
.pr-4 {
    padding-right: 1rem
}
.pt-1 {
    padding-top: .25rem
}
.pt-3 {
    padding-top: .75rem
}
.pt-4 {
    padding-top: 1rem
}
.text-center {
    text-align: center
}
.text-right {
    text-align: right
}
.text-sm {
    font-size: .875rem;
    line-height: 1.25rem
}
.text-xs {
    font-size: .75rem;
    line-height: 1rem
}
.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem
}
.font-bold {
    font-weight: 700
}
.font-medium {
    font-weight: 500
}
.font-semibold {
    font-weight: 600
}
.text-gray-300 {
    color: #d1d5db
}
.text-gray-500 {
    color: #6b7280
}
.text-gray-600 {
    color: #4b5563
}
.text-red-500 {
    color: #ef4444
}
.text-red-600 {
    color: #dc2626
}
.text-sky-600 {
    color: #0284c7
}
.text-sky-700 {
    color: #0369a1
}
.text-sky-800 {
    color: #075985
}
.text-white {
    color: #fff
}
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)
}
.shadow-lg {
    --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -2px rgb(0 0 0 / .05);
    --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -2px var(--tw-shadow-color);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
}
.outline-none {
    outline: 2px solid transparent;
    outline-offset: 2px
}
.divide-y>*,
[class~=divide-y]>:not([hidden])~:not([hidden]) {
    --tw-divide-y-reverse: 0;
    border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
    border-bottom-width: calc(1px * var(--tw-divide-y-reverse))
}
.divide-gray-100>*,
[class~=divide-gray-100]>:not([hidden])~:not([hidden]) {
    border-color: #f3f4f6
}
.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(.4, 0, .2, 1);
    transition-duration: .15s
}
.duration-150 {
    transition-duration: .15s
}
.hover\:bg-gray-100:hover {
    background-color: #f3f4f6
}
.hover\:bg-gray-50:hover {
    background-color: #f9fafb
}
.hover\:bg-red-200:hover {
    background-color: #fecaca
}
.hover\:text-red-700:hover {
    color: #b91c1c
}
.focus\:bg-gray-100:focus {
    background-color: #f3f4f6
}
.hidden {
    display: none
}
@media (min-width:768px) {
    .md\:col-span-2 {
        grid-column: span 2/span 2
    }
    .md\:col-span-4 {
        grid-column: span 4/span 4
    }
    .md\:col-start-4 {
        grid-column-start: 4
    }
    .md\:mx-auto {
        margin-left: auto;
        margin-right: auto
    }
    .md\:flex-row {
        flex-direction: row
    }
    .md\:items-center {
        align-items: center
    }
    .md\:gap-2 {
        gap: .5rem
    }
    .md\:gap-3 {
        gap: .75rem
    }
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }
    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr))
    }
    .md\:p-8 {
        padding: 2rem
    }
}
@media (min-width:1024px) {
    .lg\:col-span-1 {
        grid-column: span 1/span 1
    }
    .lg\:col-span-2 {
        grid-column: span 2/span 2
    }
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }
}
.btn-icon-delete {
    color: #ef4444;
    font-weight: 700;
    transition: color .2s;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    border-radius: 9999px
}
.btn-icon-delete:hover {
    color: #b91c1c;
    background-color: #fee2e2
}
.h-main-panel {
    height: calc(100vh - 6rem); /* 100vh menos la altura de la cabecera */
}

/* CORRECCIÓN: Añadir padding al contenedor del formulario de registro de clase */
#class-journal-container {
    padding: 1rem;
}

@media (min-width: 768px) {
    #class-journal-container {
        padding: 0 1.5rem;
    }
}

/* Estilos para los botones de navegación principales */
.btn-main-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    height: 5rem; /* CORRECCIÓN: Altura fija para dar un tamaño uniforme y predecible. */
    width: 100%; /* CORRECCIÓN: Forzar que el botón ocupe todo el ancho de la celda del grid. */
    border-radius: 0.5rem;
    background-color: var(--panel-bg-alt); /* Fondo gris muy claro */
    color: var(--text-primary);
    font-size: 0.75rem; /* CORRECCIÓN: Tamaño de fuente legible */
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease-in-out;
    border: 1px solid rgba(0, 0, 0, 0.1); /* Borde sutilmente más oscuro */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0,0,0,0.04); /* Sombra más pronunciada */
}
.btn-main-nav { position: relative; } /* CORRECCIÓN: Necesario para que el posicionamiento absoluto del candado funcione */
.btn-main-nav i {
    font-size: 1.5rem; /* CORRECCIÓN: Asegurar que el icono tenga un tamaño visible */
    line-height: 1; /* Evitar que la altura de línea del icono afecte al layout */
}
/* CORRECCIÓN: Selector específico para el candado para que no ocupe espacio cuando está oculto */
.btn-main-nav .fa-lock {
    position: absolute; /* Sacarlo del flujo normal del layout */
    top: 0.25rem;
    right: 0.25rem;
}
/* Estado activo para el botón principal */
.btn-main-nav.active { background-color: var(--primary-blue); color: var(--text-on-primary); box-shadow: var(--shadow-lg); transform: none; }
.btn-main-nav.active i { color: white; }
/* Nueva clase para ocultar elementos solo en vista móvil */
@media (max-width: 768px) {
}

/* --- ESTILOS MOVIDOS DESDE INDEX.HTML --- */

/* Por defecto, ocultar fecha corta y mostrar fecha larga */
.date-short { display: none; }
.date-long { display: inline; }

/* Estilo para el badge de la versión en el pie de página */
#app-version-display {
  display: inline-block;
  vertical-align: middle;
  font-size: 0.7rem; /* 11.2px */
  font-weight: 600;
  background-color: #e0f2fe; /* bg-sky-100 */
  color: #0369a1; /* text-sky-800 */
}

/* Estilo para el badge del curso en el historial */
.course-badge {
    background-color: var(--primary-blue);
    color: var(--text-on-primary);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 0.375rem; /* rounded-md */
}

/* --- MEJORA VISUALIZACIÓN MÓVIL --- */
@media (max-width: 768px) {
  /* Apilar las piezas trabajadas verticalmente */
  .worked-pieces-container {
    flex-direction: column;
    align-items: stretch;
  }
  .worked-piece {
    margin-bottom: 0.5rem;
    width: 100%;
  }
  /* Aumentar tamaño de fuente base en móvil para legibilidad */
  html {
    font-size: 17px;
  }
  /* Ocultar fecha larga y mostrar fecha corta */
  .date-long { display: none; }
  .date-short { display: inline; }

  /* Reorganizar cabecera de la clase en móvil */
  .class-header-mobile-stack {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  /* Aumentar tamaño de letra en el historial */
  .class-history-item-details {
    font-size: 0.95rem;
  }
}

/* --- ANIMACIONES PARA TOAST --- */
@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
}

/* --- FIN ESTILOS MOVIDOS --- */

.editable-description {
    cursor: text;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: rgba(239, 246, 255, 0.7); /* bg-blue-50 with opacity */
    transition: background-color 0.2s;
}

.editable-description:hover,
.editable-description:focus {
    background-color: #eff6ff; /* bg-blue-50 */
    outline: 1px solid #93c5fd; /* ring-blue-300 */
}

/* --- ESTILOS PARA SERVICIOS Y PRODUCTOS --- */

.service-publico,
.product-publico {
    font-size: 0.875rem;
    color: #6b7280; /* text-gray-500 */
    margin: 0.25rem 0;
    font-weight: 500;
}

.product-stock {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    margin: 0.25rem 0;
    display: inline-block;
}

.product-stock.in-stock {
    background-color: #dcfce7; /* bg-green-100 */
    color: #166534; /* text-green-800 */
}

.product-stock.out-of-stock {
    background-color: #fef2f2; /* bg-red-100 */
    color: #991b1b; /* text-red-800 */
}

/* Estilos para el contenido del modal de ayuda */
.prose-styles h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.25rem;
}

.prose-styles p, .prose-styles ul, .prose-styles ol {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.prose-styles ul, .prose-styles ol {
    padding-left: 1.5rem;
    list-style-type: disc;
}
}
