* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #6575f0;
    color: #333;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-card {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-card h1 {
    margin-bottom: 20px;
    color: #6575f0;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    background: #4285f4;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
}

.google-signin-btn {
    width: 100%;
    padding: 18px 32px;
    background: #6575F0;
    border: 2px solid black;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
}

.google-signin-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--medical-secondary);
}

.google-signin-btn:active {
    transform: translateY(-1px);
}

.google-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.btn-text {
    position: relative;
    z-index: 2;
    color: black;
}

.btn-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        transparent);
    transition: left 0.6s;
}

.google-signin-btn:hover .btn-shimmer {
    left: 100%;
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #6575f0;
    color: white;
    padding: 0 24px;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    font-size: 1.5rem;
    color: white;
}

.nav-paginacion {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.nav-paginacion button {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.nav-paginacion button:hover {
    background: rgba(255,255,255,0.3);
}

.nav-paginacion button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* LAYOUT DOS COLUMNAS */
.layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    height: calc(100vh - 64px);
    overflow: hidden;
}

.panel-caso {
    overflow-y: auto;
    padding: 24px;
    background: #f0f4f8;
}

.filtros input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    margin-bottom: 20px;
    background: white;
}

.filtros input:focus {
    border-color: #6575f0;
}

/* CASO CARD */
.caso-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.caso-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.caso-card.seleccionado {
    border-left-color: #6575f0;
}

.caso-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.caso-header h3 {
    color: #6575f0;
    font-size: 1rem;
    line-height: 1.4;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-facil { background: #d4edda; color: #155724; }
.badge-medio { background: #fff3cd; color: #856404; }
.badge-dificil { background: #f8d7da; color: #721c24; }

.caso-detalle {
    display: none;
    margin-top: 16px;
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.caso-detalle.visible {
    display: block;
}

.campo-largo {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.campo-largo label {
    font-size: 0.75rem;
    color: #6575f0;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

.campo-largo p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #333;
}

/* PANEL VALORACIÓN */
.panel-valoracion {
    background: white;
    padding: 24px;
    overflow-y: auto;
    border-left: 2px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel-valoracion h2 {
    color: #6575f0;
    font-size: 1.2rem;
}

.valoracion-desc {
    color: #666;
    font-size: 0.85rem;
}

.criterio {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
}

.criterio label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.estrellas {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.estrellas span {
    font-size: 1.6rem;
    cursor: pointer;
    color: #ddd;
    transition: color 0.15s;
    user-select: none;
}

.estrellas span:hover,
.estrellas span.activa {
    color: #f59e0b;
}

.puntuacion-texto {
    font-size: 0.78rem;
    color: #666;
}

.valoracion-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #6575f0;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
}

#media-total {
    font-size: 1.4rem;
}

#comentario {
    width: 100%;
    height: 90px;
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 8px;
    resize: none;
    font-size: 0.9rem;
    outline: none;
}

#comentario:focus {
    border-color: #6575f0;
}

.btn-guardar {
    background: #6575f0;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    width: 100%;
    transition: background 0.2s;
}

.btn-guardar:hover {
    background: #5a6fd6;
}

/* BARRAS DE PROGRESO */
.barra-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.barra {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    cursor: pointer;
}

.barra::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6575f0;
    cursor: pointer;
    transition: background 0.2s;
}

.barra::-webkit-slider-thumb:hover {
    background: #5a6fd6;
}

.barra-valor {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6575f0;
    min-width: 30px;
}