/* Estilos específicos para vista móvil */
.student-app,
.attendant-app,
.teacher-app {
    max-width: 480px;
    margin: 0 auto;
    background: var(--ivs-gray);
    min-height: 100vh;
    position: relative;
}

/* Header móvil */
.app-header {
    background: linear-gradient(135deg, var(--ivs-blue), var(--ivs-dark-blue));
    color: var(--ivs-text-light);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-content .logo {
    height: 35px;
    width: auto;
}

.header-content h2 {
    font-size: 18px;
    flex: 1;
    font-weight: 500;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-notification {
    background: none;
    border: none;
    color: var(--ivs-text-light);
    font-size: 20px;
    position: relative;
    cursor: pointer;
}

.btn-notification .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff1744;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 10px;
    min-width: 18px;
    text-align: center;
}

.user-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

/* Contenido principal */
.app-content {
    padding: 16px;
    padding-bottom: 80px;
}

/* Tarjetas en móvil */
.card {
    background: var(--ivs-white);
    border-radius: var(--ivs-border-radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Footer de navegación */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    max-width: 480px;
    width: 100%;
    background: var(--ivs-white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    padding: 6px 0;
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #888;
    font-size: 11px;
    padding: 4px 8px;
    transition: var(--ivs-transition);
    position: relative;
}

.bottom-nav .nav-item i {
    font-size: 22px;
    margin-bottom: 2px;
}

.bottom-nav .nav-item.active {
    color: var(--ivs-blue);
}

.bottom-nav .nav-item.active i {
    color: var(--ivs-blue);
}

.bottom-nav .nav-item.logout {
    color: #c62828;
}

/* Resumen de asistencias */
.attendance-summary {
    background: var(--ivs-white);
    border-radius: var(--ivs-border-radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.summary-item {
    text-align: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.summary-item .label {
    display: block;
    font-size: 12px;
    color: #888;
}

.summary-item .value {
    font-size: 22px;
    font-weight: 700;
    color: var(--ivs-text-dark);
}

.value-green {
    color: var(--ivs-green);
}

.value-red {
    color: #c62828;
}

.value-blue {
    color: var(--ivs-blue);
}

.value-orange {
    color: #f57f17;
}

.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ivs-light-green), var(--ivs-green));
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* Escáner QR */
.scanner-container {
    position: relative;
    background: #000;
    border-radius: var(--ivs-border-radius);
    overflow: hidden;
    aspect-ratio: 1/1;
    max-width: 400px;
    margin: 0 auto;
}

#reader {
    width: 100%;
    height: 100%;
}

.scanner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    border: 3px solid var(--ivs-blue);
    border-radius: 12px;
    box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.scanner-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.scanner-controls .btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
}

/* Scanner result */
.scan-result {
    margin-top: 20px;
    padding: 16px;
    border-radius: var(--ivs-border-radius);
    text-align: center;
    animation: slideUp 0.5s ease;
}

.scan-result.success {
    background: #c8e6c9;
    color: var(--ivs-green);
}

.scan-result.error {
    background: #ffcdd2;
    color: #c62828;
}

.scan-result .student-name {
    font-size: 20px;
    font-weight: 700;
}

.scan-result .student-time {
    font-size: 14px;
    opacity: 0.8;
}

/* Credencial digital */
.credential-card {
    background: linear-gradient(135deg, var(--ivs-blue), var(--ivs-dark-blue));
    border-radius: var(--ivs-border-radius);
    padding: 20px;
    color: var(--ivs-text-light);
    text-align: center;
    box-shadow: 0 4px 20px rgba(21, 101, 192, 0.3);
}

.credential-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--ivs-text-light);
    margin: 0 auto 15px;
    overflow: hidden;
    background: #fff;
}

.credential-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.credential-info {
    margin-bottom: 15px;
}

.credential-info .name {
    font-size: 20px;
    font-weight: 700;
}

.credential-info .details {
    font-size: 14px;
    opacity: 0.9;
}

.credential-qr {
    background: var(--ivs-white);
    padding: 10px;
    border-radius: 8px;
    display: inline-block;
}

.credential-qr img {
    width: 120px;
    height: 120px;
}

/* Animaciones */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 400px;
    width: 90%;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: slideUp 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.toast-success {
    background: var(--ivs-green);
}

.toast-error {
    background: #c62828;
}

.toast-info {
    background: var(--ivs-blue);
}

/* Calificaciones en móvil */
.grade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.grade-item:last-child {
    border-bottom: none;
}

.grade-item .activity {
    font-weight: 500;
}

.grade-item .score {
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 20px;
    background: #f5f5f5;
}

/* Pagos en móvil */
.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.payment-item .payment-info {
    flex: 1;
}

.payment-item .payment-info .concept {
    font-weight: 500;
}

.payment-item .payment-info .date {
    font-size: 12px;
    color: #888;
}

.payment-item .payment-amount {
    font-weight: 700;
    font-size: 16px;
    margin-right: 10px;
}