/* frontend/assets/css/components.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    margin: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.brand-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-header .material-icons {
    font-size: 48px;
    color: var(--accent-color);
}

.brand-header h1 {
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: calc(var(--radius) - 4px);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
}

.input-field:focus {
    border-color: var(--accent-color);
}

/* Botón con Bloqueo y Spinner */
.btn-submit {
    width: 100%;
    padding: 0.85rem;
    background-color: var(--accent-color);
    color: #FFFFFF;
    border: none;
    border-radius: calc(var(--radius) - 4px);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.btn-submit:hover:not(:disabled) {
    background-color: var(--accent-hover);
}

.btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
/* Footer de Instalación PWA */
.pwa-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 1rem;
  display: flex;
  justify-content: center;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.pwa-footer.hidden {
  display: none !important;
}

#btn-install-pwa {
  width: auto;
  padding: 0.75rem 2rem;
  background-color: var(--accent-color);
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* Overlay del Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    /* Posicionamiento ligeramente arriba del centro visual */
    transform: translateY(-20px);
}

.splash-icon {
    font-size: 80px !important;
    color: var(--accent-color);
    animation: pulse-icon 2s infinite ease-in-out;
}

.splash-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

@keyframes pulse-icon {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.85;
    }
}

/* Modal / Banner de Sesión Expirada por Inactividad */
.session-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9990;
}

.session-modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.session-modal-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.session-modal-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}