/* Account Styles - Enhanced */

.btn-task-complete.completed {
    background: #4fc3f7 !important;
}

.next-task-card {
    background: rgba(0, 51, 102, 0.03);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.task-name {
    font-weight: 500;
    color: #003366;
    display: block;
    margin-bottom: 0.25rem;
}

.btn-task-complete {
    background: #4fc3f7;
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-task-complete:hover {
    background: #29b6f6;
    transform: translateY(-1px);
}

.alert-success {
    background: rgba(79, 195, 247, 0.1);
    border-color: rgba(79, 195, 247, 0.2);
    color: #003366;
    margin: 0;
}

.dashboard-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 51, 102, 0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 51, 102, 0.08);
    overflow: hidden;
    position: relative;
    height: 100%;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #003366, #0056b3, #003366);
    opacity: 0.7;
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 51, 102, 0.18);
}

.card-header {
    background: linear-gradient(135deg, #003366 0%, #004080 50%, #003366 100%);
    color: white !important;
    padding: 2rem;
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.dashboard-card:hover .card-header::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.card-header h3 {
    font-weight: 700;
    margin: 0;
    color: white !important;
    font-size: 1.4rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card-header i {
    color: white !important;
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(0, 51, 102, 0.25);
    background: linear-gradient(145deg, #003366, #0056b3);
    position: relative;
    overflow: hidden;
}

.avatar-circle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #003366, #0056b3, #003366, #0056b3);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.avatar-initials {
    color: white !important;
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.profile-header {
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.05) 0%, rgba(0, 86, 179, 0.05) 100%);
    border-radius: 25px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23003366" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23003366" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23003366" opacity="0.15"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 0;
}

.profile-header>* {
    position: relative;
    z-index: 1;
}

.profile-header h1 {
    color: #003366 !important;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #003366, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-tracker {
    background: linear-gradient(90deg, rgba(0, 51, 102, 0.08) 0%, rgba(0, 86, 179, 0.08) 100%);
    border-radius: 15px;
    height: 20px;
    overflow: hidden;
    position: relative;
    border: 2px solid rgba(0, 51, 102, 0.1);
}

.progress-bar-animated {
    height: 100%;
    border-radius: 15px;
    position: relative;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(90deg, #003366 0%, #0056b3 50%, #003366 100%);
    background-size: 200% 100%;
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.progress-percent {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: white !important;
    font-size: 0.85rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-dashboard {
    background: linear-gradient(135deg, #003366 0%, #0056b3 100%);
    color: white !important;
    padding: 1rem 2rem;
    border-radius: 15px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    border: none;
    box-shadow: 0 8px 25px rgba(0, 51, 102, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-dashboard:hover::before {
    left: 100%;
}

.btn-dashboard:hover {
    background: linear-gradient(135deg, #002244 0%, #003d7a 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 51, 102, 0.35);
    color: white !important;
}

.account-details-grid {
    display: grid;
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.05) 0%, rgba(0, 86, 179, 0.05) 100%);
    border-radius: 15px;
    border: 1px solid rgba(0, 51, 102, 0.1);
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.08) 0%, rgba(0, 86, 179, 0.08) 100%);
    transform: translateX(5px);
    border-color: rgba(0, 51, 102, 0.2);
}

.detail-item i {
    font-size: 1.4rem;
    color: #003366;
    margin-right: 1.5rem;
    width: 50px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.1) 0%, rgba(0, 86, 179, 0.1) 100%);
    border-radius: 12px;
    padding: 12px;
}

.guidance-card {
    padding: 2rem;
    border: 2px solid rgba(0, 51, 102, 0.1);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Add gap between rows of guidance cards */
.guidance-card:nth-child(n+3) {
    margin-top: 1.5rem;
}

/* Target the column containers for better row spacing */
.row .col-md-6:nth-child(n+3) {
    margin-top: 1.5rem;
}

/* Tablet and mobile spacing for Journey Progress and Account Details */
@media (max-width: 991.98px) {
    /* Add spacing between Journey Progress and Account Details boxes when stacked */
    .row.g-4 .col-lg-6:nth-child(2) {
        margin-top: 2rem;
    }
    
    /* Add spacing between Document Certification and Passport Update on tablet */
    .row.g-3 .col-md-6:nth-child(2) {
        margin-top: 1.5rem;
    }
}

/* Mobile-specific spacing adjustments */
@media (max-width: 767.98px) {
    .row .col-md-6:nth-child(n+3) {
        margin-top: 1rem;
    }
    
    /* Ensure consistent spacing on smaller mobile devices */
    .row.g-4 .col-lg-6:nth-child(2) {
        margin-top: 2rem;
    }
    
    /* Add consistent spacing between Update Password and Start Name Change buttons */
    .security-actions .btn-security:first-child {
        margin-bottom: 1rem;
    }
    
    /* Ensure consistent gap between Document Certification and Passport Update boxes */
    .guidance-card:nth-child(2) {
        margin-top: 1rem;
    }
    
    /* Add specific spacing between Document Certification and Passport Update */
    .row.g-3 .col-md-6:nth-child(2) {
        margin-top: 1.5rem;
    }
    
    /* Override any existing margins for consistency */
    .security-actions {
        display: flex;
        flex-direction: column;
    }
    
    .security-actions .btn-security {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .security-actions .btn-security:last-child {
        margin-bottom: 0;
    }
}

.guidance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #003366, #0056b3);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.guidance-card:hover::before {
    transform: scaleX(1);
}

.guidance-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 1) 100%);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 51, 102, 0.15);
    border-color: rgba(0, 51, 102, 0.2);
}

.guidance-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #003366 0%, #0056b3 100%);
    box-shadow: 0 8px 25px rgba(0, 51, 102, 0.25);
}

.guidance-icon i {
    color: white !important;
    font-size: 1.8rem;
}

.guidance-card h5 {
    color: #003366;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    margin-top: 0;
    line-height: 1.3;
    min-height: 50px;
    display: flex;
    align-items: center;
}

.guidance-card p {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
    flex-grow: 1;
}

.text-link {
    color: #003366;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.text-link:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
    text-decoration: none;
}

.btn-security {
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    color: white !important;
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.3);
}

.btn-security:hover {
    background: linear-gradient(135deg, #29b6f6 0%, #03a9f4 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.4);
    color: white !important;
}

/* Enhanced card body styling */
.card-body {
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Typography improvements */
.card-body h4 {
    color: #003366;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.card-body h5 {
    color: #003366;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Text color specifications for white text */
.card-header h3,
.card-header i,
.progress-percent,
.avatar-initials {
    color: white !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .dashboard-card {
        margin-bottom: 2rem;
        border-radius: 15px;
        min-height: 400px;
    }

    .card-header {
        padding: 1.5rem;
        border-radius: 15px 15px 0 0;
    }

    .card-body {
        padding: 1.5rem;
    }

    .profile-header {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .avatar-circle {
        width: 100px;
        height: 100px;
    }

    .avatar-initials {
        font-size: 2.5rem;
    }

    .guidance-card {
        padding: 1.5rem;
        border-radius: 15px;
        min-height: 240px;
    }

    .guidance-card h5 {
        font-size: 1.1rem;
        min-height: 45px;
    }

    .guidance-card p {
        font-size: 0.9rem;
    }

    .guidance-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }

    .guidance-icon i {
        font-size: 1.5rem;
    }

    .btn-dashboard {
        padding: 0.8rem 1.5rem;
        border-radius: 12px;
    }
}

/* Additional enhancements */
.container-xl {
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.02) 0%, rgba(0, 86, 179, 0.02) 100%);
    border-radius: 30px;
    padding: 3rem 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Loading animation for progress bar */
.progress-bar-animated.loading {
    background: linear-gradient(90deg, #e9ecef 25%, rgba(0, 51, 102, 0.1) 50%, #e9ecef 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}