/* Enhanced Modal Styling - Compact Version */
.account-info .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.account-info .modal-body {
    padding: 0;
    background: #fff;
}

/* Top Section - Horizontal Layout */
.top-section {
    display: flex;
    align-items: stretch;
    min-height: 140px;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Profile Section - Left Side (Combined Avatar + Info) */
.profile-section {
    flex: 2;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
}

/* Profile Avatar Section */
.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    font-size: 2.5rem;
    color: white;
    border: 3px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
}

/* Profile Info Section - Right of Avatar */
.profile-info-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    flex: 0.5;
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    position: relative;
    z-index: 2;
    color: white;
}

.profile-role {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
    display: inline-block;
    position: relative;
    z-index: 2;
    margin-bottom: 0.2rem;
    align-self: flex-start;
    line-height: 1.2;
}

.role-divider {
    width: 75px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.2));
    margin: 0.15rem auto;
    border-radius: 1px;
    position: relative;
    z-index: 2;
}

.role-divider::before {
    content: '';
    position: absolute;
    top: -0.5px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    border-radius: 1px;
}

.profile-department {
    background: rgba(255,255,255,0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    backdrop-filter: blur(10px);
    display: inline-block;
    position: relative;
    z-index: 2;
    margin-bottom: 0.3rem;
    align-self: flex-start;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.1);
}

.badge-custom {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin: 0.2rem 0.2rem 0.2rem 0;
    transition: all 0.3s ease;
    align-self: flex-start;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-custom:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.badge-admin {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.badge-admin:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* QR Code Section - Right Side (30% width) */
.qr-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    max-width: 40%;
}

.qr-container {
    background: rgba(255,255,255,0.1);
    padding: 0.8rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: inline-block;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    max-width: 60%;
    border: 1px solid rgba(255,255,255,0.2);
}

.qr-container:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.15);
}

#qr-code {
    margin-bottom: 0.75rem;
}

#qr-code canvas {
    max-width: 80px;
    border-radius: 8px;
}

.scan-text {
    color: rgba(255,255,255,0.9);
    font-size: 0.7rem;
    font-style: italic;
    margin-bottom: 0.6rem;
}

.copy-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1rem;
    border-radius: 18px;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.copy-btn:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    color: white;
}

/* Content Sections - Compact Grid */
.content-sections {
    padding: 1.5rem 1rem;
}

.section-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f3f4;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.section-title i {
    color: #667eea;
    font-size: 1.1rem;
}

.section-link {
    display: block;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.4rem;
    color: #6c757d;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
    font-size: 0.9rem;
}

.section-link:hover {
    background: #f8f9fa;
    color: #667eea;
    border-left-color: #667eea;
    transform: translateX(3px);
}

.section-link i {
    margin-right: 0.4rem;
    width: 16px;
    text-align: center;
    font-size: 0.85rem;
}

.badge-custom {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.4rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-custom:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.badge-admin {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.badge-admin:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Compact Grid Layout */
.compact-grid .col-xl-4 {
    margin-bottom: 0.75rem;
}

/* Responsive Design - Compact */
@media (max-width: 768px) {
    .top-section {
        flex-direction: row;
        min-height: 160px;
        padding: 1rem 0.75rem;
    }
    
    .profile-section {
        flex: 1.5;
    }
    
    .profile-avatar-section {
        margin-right: 1rem;
    }
    
    .profile-avatar {
        width: 90px;
        height: 90px;
        font-size: 2rem;
    }
    
    .profile-name {
        font-size: 1.3rem;
        margin-bottom: 0.3rem;
    }
    
    .profile-role {
        padding: 0.2rem 0.6rem;
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
    
    .role-divider {
        width: 75px;
        margin: 0.1rem auto;
    }
    
    .profile-department {
        padding: 0.15rem 0.5rem;
        font-size: 0.65rem;
        margin-bottom: 0.3rem;
    }
    
    .qr-section {
        flex: 1;
        max-width: 35%;
    }
    
    .badge-custom {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
        margin: 0.15rem 0.15rem 0.15rem 0;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .qr-container {
        max-width: 100%;
        padding: 0.6rem;
    }
    
    #qr-code canvas {
        max-width: 80px;
    }
    
    .scan-text {
        font-size: 0.65rem;
        margin-bottom: 0.4rem;
    }
    
    .copy-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .content-sections {
        padding: 1rem 0.75rem;
    }
    
    .section-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .section-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .section-link {
        padding: 0.4rem 0.6rem;
        margin-bottom: 0.3rem;
        font-size: 0.85rem;
    }
}

/* Extra Small Devices */
@media (max-width: 576px) {
    .top-section {
        min-height: 140px;
        padding: 0.75rem 0.5rem;
    }
    
    .profile-section {
        flex: 2;
    }
    
    .profile-avatar-section {
        margin-right: 0.75rem;
    }
    
    .profile-avatar {
        width: 90px;
        height: 90px;
        font-size: 1.8rem;
    }
    
    .profile-name {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }
    
    .profile-role {
        padding: 0.15rem 0.5rem;
        font-size: 0.7rem;
        margin-bottom: 0.15rem;
    }
    
    .role-divider {
        width: 75px;
        margin: 0.08rem auto;
    }
    
    .profile-department {
        padding: 0.12rem 0.4rem;
        font-size: 0.6rem;
        margin-bottom: 0.25rem;
    }
    
    .qr-section {
        flex: 1;
        max-width: 40%;
    }
    
    .badge-custom {
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
        margin: 0.1rem 0.1rem 0.1rem 0;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .qr-container {
        padding: 0.5rem;
    }
    
    #qr-code canvas {
        max-width: 80px;
    }
    
    .scan-text {
        font-size: 0.6rem;
        margin-bottom: 0.3rem;
    }
    
    .copy-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.65rem;
    }
    
    .content-sections {
        padding: 0.75rem 0.5rem;
    }
    
    .section-card {
        padding: 0.6rem;
    }
}

/* Ultra Small Devices */
@media (max-width: 480px) {
    .top-section {
        min-height: 90px;
        padding: 0.5rem 0.4rem;
    }
    
    .profile-section {
        flex: 2;
    }
    
    .profile-avatar-section {
        margin-right: 0.5rem;
    }
    
    .profile-avatar {
        width: 90px;
        height: 90px;
        font-size: 1.5rem;
    }
    
    .profile-name {
        font-size: 1rem;
    }
    
    .profile-role {
        padding: 0.12rem 0.4rem;
        font-size: 0.65rem;
        margin-bottom: 0.12rem;
    }
    
    .role-divider {
        width: 75px;
        margin: 0.06rem auto;
    }
    
    .profile-department {
        padding: 0.1rem 0.35rem;
        font-size: 0.55rem;
        margin-bottom: 0.2rem;
    }
    
    .qr-section {
        flex: 1;
        max-width: 45%;
    }
    
    .badge-custom {
        padding: 0.15rem 0.3rem;
        font-size: 0.6rem;
        margin: 0.08rem 0.08rem 0.08rem 0;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .qr-container {
        padding: 0.4rem;
    }
    
    #qr-code canvas {
        max-width: 80px;
    }
    
    .scan-text {
        font-size: 0.55rem;
        margin-bottom: 0.25rem;
    }
    
    .copy-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.6rem;
    }
}

/* Animation Classes - Faster for compact feel */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

.slide-in-left {
    animation: slideInLeft 0.4s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}