/* ============================================================
   DASHBOARD HOME (VIEW 1001) - MODERN REWRITE
   ============================================================ */

.home-main {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    padding: 1.5rem 1.5rem 1.5rem 4.5rem; /* Extra safe padding for sidebar */
    max-width: 1600px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PROFILE SECTION
   ============================================================ */

.profile-container {
    width: 100%;
}

.profile-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 2rem;
    transition: transform 0.3s ease;
}

.profile-card:hover {
    transform: translateY(-5px);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-photo-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-img, .profile-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-light);
    box-shadow: var(--shadow-md);
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-placeholder i {
    font-size: 3.5rem;
    color: var(--text-muted);
}

.change-photo-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: 3px solid var(--bg-card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.change-photo-btn:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

.user-main-info .user-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.user-main-info .user-role {
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    background: var(--bg-hover);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

/* Details Grid */
.profile-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.detail-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.025em;
}

.detail-group p {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    margin: 0;
}

/* Profile Alert */
.profile-alert {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.03) 100%);
    border: 1px dashed var(--warning);
    border-radius: 12px;
    display: flex;
    gap: 1.25rem;
}

.alert-icon {
    font-size: 1.5rem;
    color: var(--warning);
}

.alert-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0.5rem;
}

.alert-content p {
    font-size: 0.9rem;
    color: #b45309;
    margin-bottom: 0.75rem;
}

.alert-content ul {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.alert-content li {
    font-size: 0.85rem;
    color: #b45309;
    margin-bottom: 0.25rem;
}

.complete-profile-btn {
    display: inline-block;
    background: var(--warning);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.complete-profile-btn:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ============================================================
   STUDENTS SECTION
   ============================================================ */

.students-container {
    width: 100%;
}

.students-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.students-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    position: relative;
    padding-left: 1rem;
}

.students-header h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--secondary);
    border-radius: 2px;
}

.count-badge {
    background: var(--primary);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
}

.students-list {
    display: grid;
    gap: 1.25rem;
}

.student-item {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.student-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
    border-color: var(--secondary);
}

.student-avatar {
    flex-shrink: 0;
}

.student-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.student-info {
    flex: 1;
}

.student-info h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.student-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

.acudiente-mini {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
    font-style: italic;
}

.student-actions {
    display: flex;
    gap: 0.75rem;
}

.view-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-hover);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.view-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Empty State */
.no-students {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--bg-card);
    border-radius: 20px;
    border: 2px dashed var(--border-color);
}

.no-students i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    opacity: 0.4;
}

.no-students p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
    .home-main {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .profile-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .home-main {
        padding: 1rem;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .user-main-info .user-name {
        font-size: 1.5rem;
    }

    .student-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 2rem 1.5rem;
    }

    .student-actions {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}