/* Enhanced Modern Profile Design - Complete Redesign */
:root {
    /* Enhanced Color Palette - Following established design criteria */
    --profile-primary: linear-gradient(135deg, #E87E1E 0%, #EE922B 100%);
    --profile-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --profile-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

    /* Neutral Colors */
    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;

    /* Modern Background Colors */
    --bg-primary: rgba(255, 255, 255, 0.98);
    --bg-secondary: rgba(248, 250, 252, 0.95);
    --bg-tertiary: rgba(241, 245, 249, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.1);
    --bg-glass-strong: rgba(255, 255, 255, 0.15);

    /* Enhanced Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-colored: 0 25px 50px -12px rgba(232, 126, 30, 0.25);
    --shadow-glow: 0 0 20px rgba(232, 126, 30, 0.3);

    /* Animation Timings */
    --timing-fast: 0.15s;
    --timing-medium: 0.3s;
    --timing-slow: 0.5s;
    --timing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --timing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Support */
[data-theme="dark"] {
    --bg-primary: rgba(31, 41, 55, 0.98);
    --bg-secondary: rgba(17, 24, 39, 0.95);
    --bg-tertiary: rgba(55, 65, 81, 0.9);
    --bg-glass: rgba(31, 41, 55, 0.2);
    --bg-glass-strong: rgba(31, 41, 55, 0.3);

    --neutral-50: #0f172a;
    --neutral-100: #1e293b;
    --neutral-200: #334155;
    --neutral-300: #475569;
    --neutral-400: #64748b;
    --neutral-500: #94a3b8;
    --neutral-600: #cbd5e1;
    --neutral-700: #e2e8f0;
    --neutral-800: #f1f5f9;
    --neutral-900: #f8fafc;
}

/* Enhanced Profile Hero Section - Modern */
.profile-hero-modern {
    position: relative;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    margin-bottom: 3rem;
    overflow: hidden;
    z-index: 1;
}

.profile-hero-backdrop {
    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.5" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.08"/><circle cx="50" cy="10" r="0.8" fill="white" opacity="0.06"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: -1;
}

.profile-hero-content-modern {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 600px;
    margin: 0 auto;
}

.profile-hero-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.profile-hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: linear-gradient(45deg, rgba(255,255,255,1), rgba(255,255,255,0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    font-weight: 300;
}

.profile-hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.hero-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 140px;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Modern Floating Elements */
.floating-element {
    position: absolute;
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.floating-element-1 {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.08);
    top: 10%;
    right: 8%;
    animation: float 6s ease-in-out infinite;
}

.floating-element-2 {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.06);
    bottom: 15%;
    left: 10%;
    animation: float 8s ease-in-out infinite 2s;
}

.floating-element-3 {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    top: 40%;
    right: 25%;
    animation: pulse 4s ease-in-out infinite;
}

.floating-element-4 {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.12);
    top: 70%;
    right: 15%;
    animation: float 10s ease-in-out infinite 4s;
}

/* Container and Layout */
.profile-container-modern {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (max-width: 992px) {
    .profile-container-modern { padding: 0 0.25rem; }
    .profile-form-container-modern, .progress-container-modern, .form-section-modern { margin: 0; }
    /* .form-section-modern { padding: 1rem; } */
    /* Enable vertical scrolling inside the sliding sidebar on mobile */
    .profile-sidebar-wrapper { overflow-y: auto; -webkit-overflow-scrolling: touch; max-height: 100vh; }
}

.profile-layout-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Mobile: collapse grid to a single column to avoid right shift */
@media (max-width: 992px) {
    .profile-layout-grid { display: block; gap: 0; }
}

/* Enhanced Sidebar */
.profile-sidebar-wrapper {
    position: sticky;
    top: 2rem;
}

.profile-sidebar-modern {
    background: var(--profile-card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--profile-card-border);
    border-radius: 24px;
    padding: 0;
    box-shadow: var(--profile-shadow);
    overflow: hidden;
    transition: all var(--timing-medium) var(--timing-smooth);
}

.profile-sidebar-modern:hover {
    box-shadow: var(--profile-hover-shadow);
    transform: translateY(-2px);
}

.sidebar-header {
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.sidebar-user-info {
    text-align: center;
}

.sidebar-username {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    background: var(--profile-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-user-role {
    font-size: 0.875rem;
    color: var(--neutral-600);
    margin: 0;
    opacity: 0.8;
}

.sidebar-navigation {
    padding: 0;
}

.sidebar-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-item {
    position: relative;
}

.sidebar-menu-item.sidebar-menu-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    text-decoration: none;
    color: var(--neutral-700);
    transition: all var(--timing-medium) var(--timing-smooth);
    position: relative;
    overflow: hidden;
}

.sidebar-menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--profile-primary);
    transform: scaleY(0);
    transition: transform var(--timing-medium) var(--timing-smooth);
}

.sidebar-menu-link:hover {
    background: rgba(102, 126, 234, 0.08);
    color: var(--neutral-800);
}

.sidebar-menu-link.active {
    background: rgba(102, 126, 234, 0.15);
    color: var(--neutral-900);
    font-weight: 600;
}

.sidebar-menu-link.active::before {
    transform: scaleY(1);
}

.sidebar-menu-link.sidebar-logout:hover {
    background: rgba(248, 113, 113, 0.1);
    color: #ef4444;
}

.menu-icon-wrapper {
    width: 40px;
    height: 40px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    transition: all var(--timing-medium) var(--timing-smooth);
}

.sidebar-menu-link:hover .menu-icon-wrapper {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

.sidebar-menu-link.active .menu-icon-wrapper {
    background: var(--profile-primary);
    color: white;
}

.menu-icon {
    font-size: 1rem;
    transition: all var(--timing-medium) var(--timing-smooth);
}

.menu-text {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
}

.menu-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    transition: all var(--timing-medium) var(--timing-smooth);
}

.sidebar-menu-link.active .menu-indicator {
    background: var(--profile-primary);
}

/* Enhanced Form Container */
.profile-form-wrapper {
    min-height: 100vh;
}

.profile-form-container-modern {
    background: var(--profile-card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--profile-card-border);
    border-radius: 24px;
    padding: 0;
    box-shadow: var(--profile-shadow);
    overflow: hidden;
}

@media (max-width: 992px) {
    .profile-form-container-modern { border-radius: 18px; }
}

/* Enhanced Progress Container */
.progress-container-modern {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.progress-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    background: var(--profile-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-percentage {
    text-align: right;
}

.progress-text {
    font-size: 2rem;
    font-weight: 800;
    color: #667eea;
    display: block;
    line-height: 1;
}

.progress-label {
    font-size: 0.875rem;
    color: var(--neutral-600);
    font-weight: 500;
}

.progress-steps-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.progress-step-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    border: 2px solid transparent;
    transition: all var(--timing-medium) var(--timing-smooth);
}

.progress-step-modern.active {
    border-color: rgba(102, 126, 234, 0.3);
    background: rgba(102, 126, 234, 0.1);
}

.progress-step-modern.completed {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.1);
}

.progress-step-circle-modern {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(156, 163, 175, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--timing-medium) var(--timing-smooth);
    flex-shrink: 0;
}

.progress-step-modern.active .progress-step-circle-modern {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.progress-step-modern.completed .progress-step-circle-modern {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.step-icon {
    font-size: 1.25rem;
    transition: all var(--timing-medium) var(--timing-smooth);
}

.step-check {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all var(--timing-medium) var(--timing-smooth);
}

.progress-step-modern.completed .step-check {
    opacity: 1;
    transform: scale(1);
}

.progress-step-content {
    flex: 1;
}

.progress-step-label-modern {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--neutral-800);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.progress-step-description {
    font-size: 0.8rem;
    color: var(--neutral-600);
    line-height: 1.3;
}

.progress-bar-container {
    position: relative;
    height: 8px;
    background: rgba(156, 163, 175, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(156, 163, 175, 0.2);
}

.progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width var(--timing-medium) var(--timing-smooth);
    background-size: 40px 40px;
    background-image: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.1) 75%, transparent 75%, transparent);
    animation: progressShimmer 2s linear infinite;
}

/* Responsive fixes for progress section on small screens */
@media (max-width: 768px) {
    .progress-container-modern { padding: 1.25rem; }
    .progress-header { flex-direction: column; align-items: flex-start; gap: .5rem; }
    .progress-title { font-size: 1.35rem; }
    .progress-text { font-size: 1.5rem; }
    .progress-steps-modern { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .progress-container-modern { padding: 1rem; }
    .progress-steps-modern { grid-template-columns: 1fr; gap: .75rem; }
    .progress-step-modern { padding: .75rem; }
}

/* Modern Form Sections */
.form-section-modern {
    /* padding: 2rem; */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--timing-medium) var(--timing-smooth);
}

.form-section-modern:last-child {
    border-bottom: none;
}

.form-section-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #667eea;
    flex-shrink: 0;
}

.section-title-wrapper {
    flex: 1;
}

.form-section-title-modern {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    background: var(--profile-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-section-description {
    font-size: 0.9rem;
    color: var(--neutral-600);
    margin: 0;
    line-height: 1.4;
}

/* Form Fields Grid */
.form-fields-grid {
    display: grid;
    gap: 1.5rem;
}

.personal-grid {
    grid-template-columns: 1fr 1fr 1fr;
}

.contact-grid {
    grid-template-columns: 1fr 1fr;
}

.location-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "city district"
        "address address";
}

.address-full-width {
    grid-area: address;
}

.documents-grid {
    grid-template-columns: 1fr 1fr;
}

/* Enhanced Modern Floating Inputs */
.modern-floating-input-group {
    position: relative;
    margin-bottom: 0;
}

.modern-floating-input {
    width: 100%;
    padding: 1.5rem 3.5rem 0.75rem 4rem;
    border: 2px solid var(--neutral-200);
    border-radius: 16px;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--neutral-800);
    transition: all var(--timing-medium) var(--timing-smooth);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.modern-floating-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    background: var(--bg-primary);
    transform: translateY(-1px);
}

.modern-floating-label {
    position: absolute;
    left: 4rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--neutral-500);
    pointer-events: none;
    transition: all var(--timing-medium) var(--timing-smooth);
    background: var(--bg-primary);
    padding: 0 0.5rem;
    font-weight: 500;
}

.modern-floating-input:focus + .modern-floating-label,
.modern-floating-input:not(:placeholder-shown) + .modern-floating-label {
    top: 0;
    left: 3rem;
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 600;
}

.input-border-animation {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: all var(--timing-medium) var(--timing-smooth);
    transform: translateX(-50%);
    border-radius: 1px;
}

.modern-floating-input:focus ~ .input-border-animation {
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    color: var(--neutral-400);
    transition: all var(--timing-medium) var(--timing-smooth);
}

.modern-floating-input:focus ~ .input-icon {
    color: #667eea;
    transform: translateY(-50%) scale(1.1);
}

.input-validation-icon {
    position: absolute;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all var(--timing-medium) var(--timing-smooth);
    pointer-events: none;
    z-index: 5;
}

/* Enhanced Error Handling and Validation States */
.modern-floating-input-group.error,
.modern-floating-input-group.invalid {
    --input-border-color: #ef4444;
    --label-color: #ef4444;
}

.modern-floating-input-group.error .modern-floating-input,
.modern-floating-input-group.invalid .modern-floating-input {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.modern-floating-input-group.error .modern-floating-label,
.modern-floating-input-group.invalid .modern-floating-label {
    color: #ef4444;
}

.modern-floating-input-group.error .input-icon,
.modern-floating-input-group.invalid .input-icon {
    color: #ef4444;
}

.field-error-message {
    position: absolute;
    bottom: -1.5rem;
    left: 0;
    font-size: 0.75rem;
    color: #ef4444;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: all var(--timing-medium) var(--timing-smooth);
    pointer-events: none;
    z-index: 10;
}

.modern-floating-input-group.error .field-error-message,
.modern-floating-input-group.invalid .field-error-message {
    opacity: 1;
    transform: translateY(0);
}

/* Success validation state */
.modern-floating-input-group.valid {
    --input-border-color: #10b981;
    --label-color: #10b981;
}

.modern-floating-input-group.valid .modern-floating-input {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.modern-floating-input-group.valid .modern-floating-label {
    color: #10b981;
}

.modern-floating-input-group.valid .input-validation-icon {
    opacity: 1;
    color: #10b981;
}

/* Enhanced file upload error states */
.modern-file-upload-area.error {
    border-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.05);
}

.modern-file-upload-area.drag-over {
    border-color: var(--profile-primary);
    background-color: rgba(232, 126, 30, 0.05);
    transform: scale(1.02);
}

/* Loading states for form elements */
.modern-floating-input-group.loading .modern-floating-input {
    background-image: linear-gradient(90deg, transparent 25%, rgba(232, 126, 30, 0.1) 50%, transparent 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

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

/* Enhanced Animations and Interactions */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

@keyframes progressShimmer {
    0% { background-position: -40px 0; }
    100% { background-position: 40px 0; }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--profile-primary), 0 0 10px var(--profile-primary), 0 0 15px var(--profile-primary);
    }
    50% {
        box-shadow: 0 0 10px var(--profile-primary), 0 0 20px var(--profile-primary), 0 0 30px var(--profile-primary);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-up-stagger {
    animation: slideUp 0.5s ease-out;
}

.scale-in-stagger {
    animation: scaleIn 0.4s ease-out;
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

.step-animate-in {
    animation: slideUp 0.4s ease-out forwards;
}

/* Enhanced Focus States */
.modern-floating-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 126, 30, 0.1);
}

.modern-submit-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 126, 30, 0.3);
}

.sidebar-menu-link:focus {
    outline: none;
    background: rgba(232, 126, 30, 0.1);
}

/* Enhanced Hover Effects */
.modern-floating-input-group:hover .input-border-animation {
    opacity: 0.5;
}

.hero-stat:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.progress-step-modern:hover .progress-step-circle-modern {
    transform: scale(1.1);
}

/* Loading States */
.modern-submit-button.loading {
    pointer-events: none;
}

.modern-submit-button.loading .button-background-effect {
    animation: gradientShift 2s ease-in-out infinite;
}

/* Drag and Drop States */
.modern-file-upload-area.drag-over {
    border-color: var(--profile-primary);
    background-color: rgba(232, 126, 30, 0.05);
    transform: scale(1.02);
}

.modern-file-upload-area.upload-complete {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.modern-file-upload-area.upload-complete .file-upload-icon-modern {
    color: #10b981;
    animation: bounce 0.6s ease-out;
}

/* Validation States Enhanced */
.modern-floating-input-group.valid .input-border-animation {
    background: linear-gradient(90deg, #10b981, #059669);
    opacity: 1;
}

.modern-floating-input-group.invalid .input-border-animation {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    opacity: 1;
    animation: shake 0.5s ease-in-out;
}

.modern-floating-input-group.valid .input-validation-icon {
    opacity: 1;
    color: #10b981;
    animation: scaleIn 0.3s ease-out;
}

.modern-floating-input-group.invalid .input-validation-icon {
    opacity: 1;
    color: #ef4444;
    animation: shake 0.5s ease-in-out;
}

/* Tooltip Styles */
.custom-tooltip {
    position: absolute;
    background: rgba(17, 24, 39, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    transform: translateY(4px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.custom-tooltip.tooltip-visible {
    opacity: 1;
    transform: translateY(0);
}

.custom-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(17, 24, 39, 0.95);
}

/* Sticky Sidebar */
.profile-sidebar-modern.sidebar-sticky {
    position: fixed;
    top: 2rem;
    animation: slideUp 0.3s ease-out;
}

/* Enhanced File Preview */
.file-preview-image {
    position: relative;
    width: 100%;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
}

.file-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 0.75rem;
    color: white;
}

.file-info {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Enhanced Progress Indicators */
.progress-step-modern.completed .progress-step-circle-modern {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #10b981;
    animation: pulse 0.6s ease-out;
}

.progress-step-modern.active .progress-step-circle-modern {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    animation: glow 2s ease-in-out infinite;
}

/* Enhanced Toast Animations */
.modern-toast.toast-show {
    animation: slideUp 0.3s ease-out;
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .modern-floating-input {
        border: 2px solid currentColor;
    }

    .modern-submit-button {
        border: 2px solid currentColor;
    }

    .sidebar-menu-link {
        border: 1px solid transparent;
    }

    .sidebar-menu-link:focus {
        border-color: currentColor;
    }
}

/* Enhanced Dark Theme Support */
[data-theme="dark"] .custom-tooltip {
    background: rgba(255, 255, 255, 0.95);
    color: #1f2937;
}

[data-theme="dark"] .custom-tooltip::after {
    border-top-color: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] .file-preview-overlay {
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
    color: #1f2937;
}

/* Performance Optimizations */
.floating-element,
.progress-step-circle-modern,
.modern-submit-button {
    will-change: transform;
}

.profile-hero-modern {
    contain: layout style paint;
}

.form-section-modern {
    contain: layout style;
}

/* Additional Responsive Enhancements */
@media (max-width: 480px) {
    .profile-hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-stat {
        min-width: auto;
        width: 100%;
    }

    .form-fields-grid {
        grid-template-columns: 1fr !important;
    }

    .modern-floating-input-group.address-full-width {
        grid-column: 1;
    }
}

@media (max-width: 360px) {
    .profile-hero-modern {
        padding: 2rem 1rem;
    }

    .profile-hero-title {
        font-size: 2rem;
    }

    .sidebar-user-info {
        text-align: center;
    }

    .modern-submit-button {
        width: 100%;
        padding: 1rem;
    }
}

/* ======================
   MINIMAL HERO DESIGN
   ====================== */

/* Minimal Profile Hero Section */
.profile-hero-minimal {
    position: relative;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid var(--neutral-200);
    margin-bottom: 2rem;
}

.profile-hero-content-minimal {
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.profile-hero-title-minimal {
    font-size: 2rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.profile-hero-subtitle-minimal {
    font-size: 1rem;
    color: var(--neutral-600);
    font-weight: 400;
    margin: 0;
    opacity: 0.8;
}

/* Dark theme support for minimal hero */
[data-theme="dark"] .profile-hero-minimal {
    background: linear-gradient(135deg, var(--neutral-800) 0%, var(--neutral-700) 100%);
    border-bottom: 1px solid var(--neutral-600);
}

[data-theme="dark"] .profile-hero-title-minimal {
    color: var(--neutral-100);
}

[data-theme="dark"] .profile-hero-subtitle-minimal {
    color: var(--neutral-400);
}

/* Responsive design for minimal hero */
@media (max-width: 768px) {
    .profile-hero-minimal {
        padding: 1.5rem 1rem;
        text-align: center;
    }

    .profile-hero-title-minimal {
        font-size: 1.75rem;
    }

    .profile-hero-subtitle-minimal {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .profile-hero-minimal {
        padding: 1rem 0.75rem;
    }

    .profile-hero-title-minimal {
        font-size: 1.5rem;
    }

    .profile-hero-subtitle-minimal {
        font-size: 0.9rem;
    }
}

/* ======================
   RESPONSIVE INPUT FIXES
   ====================== */

/* Mobile responsive adjustments for input fields */
@media (max-width: 768px) {
    .modern-floating-input {
        padding: 1.25rem 3rem 0.75rem 3.5rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .modern-floating-label {
        left: 3.5rem;
    }

    .modern-floating-input:focus + .modern-floating-label,
    .modern-floating-input:not(:placeholder-shown) + .modern-floating-label {
        left: 2.75rem;
        font-size: 0.75rem;
    }

    .input-icon {
        left: 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .modern-floating-input {
        padding: 1rem 2.5rem 0.75rem 3rem;
        font-size: 16px;
    }

    .modern-floating-label {
        left: 3rem;
        font-size: 0.95rem;
    }

    .modern-floating-input:focus + .modern-floating-label,
    .modern-floating-input:not(:placeholder-shown) + .modern-floating-label {
        left: 2.5rem;
        font-size: 0.7rem;
    }

    .input-icon {
        left: 0.75rem;
        font-size: 0.95rem;
    }

    .form-fields-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Make profile form fields stack on mobile and ensure comfortable input size */
@media (max-width: 768px) {
    .personal-grid,
    .contact-grid,
    .location-grid,
    .documents-grid {
        grid-template-columns: 1fr !important;
    }
    .location-grid {
        grid-template-areas:
            "city"
            "district"
            "address";
    }
    .modern-floating-input {
        min-height: 52px;
        padding: 0.9rem 2.5rem 0.7rem 3rem;
    }
}

/* Enhanced input states for better UX */
.modern-floating-input-group:hover .input-icon {
    color: var(--neutral-600);
    transform: translateY(-50%) scale(1.05);
}

.modern-floating-input:focus ~ .input-icon {
    color: #667eea;
    transform: translateY(-50%) scale(1.1);
}

/* Better visibility for required fields */
.modern-floating-label::after {
    content: " *";
    color: #ef4444;
    opacity: 0.7;
}

.modern-floating-input:valid + .modern-floating-label::after,
.modern-floating-input:not(:placeholder-shown) + .modern-floating-label::after {
    display: none;
}

/* ================================
   BUTTON MODERN STYLES
   ================================ */

.btn-primary-modern {
    background: #000000;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    background: #333333;
    color: white;
    text-decoration: none;
}

.btn-secondary-modern {
    background: #ffffff;
    color: #000000;
    border: 1px solid #000000;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-secondary-modern:hover {
    background: #f5f5f5;
    border-color: #000000;
    color: #000000;
    text-decoration: none;
}

/* ================================
   EMPTY STATE MODERN STYLES
   ================================ */

/* Enhanced Empty State */
.empty-state-modern {
    text-align: center;
    padding: 5rem 2.5rem;
    background: #ffffff;
    border: none;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    margin: 0;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state-modern::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(248, 250, 252, 0.6) 50%,
        rgba(255, 255, 255, 0.8) 100%
    );
    opacity: 0.5;
    pointer-events: none;
}

.empty-state-modern::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.03) 0%, transparent 70%);
    animation: emptyStatePulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes emptyStatePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
}

@keyframes emptyStateShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.empty-state-icon {
    font-size: 5rem;
    color: #E87E1E;
    margin-bottom: 1.5rem;
    animation: iconFloat 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
    display: inline-block;
}

.empty-state-icon i {
    display: block;
    opacity: 0.8;
}

@keyframes iconFloat {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-state-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.empty-state-description {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-modern .btn-primary-modern {
    position: relative;
    z-index: 1;
    margin-top: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    background: linear-gradient(135deg, #E87E1E 0%, #EE922B 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(232, 126, 30, 0.3);
    transition: all 0.3s ease;
}

.empty-state-modern .btn-primary-modern:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #EE922B 0%, #E87E1E 100%);
    box-shadow: 0 6px 20px rgba(232, 126, 30, 0.4);
    color: white;
}

/* Ensure empty state has proper spacing within container */
.profile-form-container-modern .empty-state-modern {
    margin: 2rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* Responsive adjustments for empty state */
@media (max-width: 768px) {
    .profile-form-container-modern .empty-state-modern {
        margin: 1.5rem 1rem;
        padding: 3rem 1.5rem;
        border-radius: 12px;
        min-height: 350px;
    }
    
    .empty-state-icon {
        font-size: 3.5rem;
        margin-bottom: 1.25rem;
        color: #E87E1E;
    }
    
    .empty-state-title {
        font-size: 1.375rem;
        margin-bottom: 0.5rem;
    }
    
    .empty-state-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .empty-state-modern .btn-primary-modern {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
        max-width: 280px;
        background: linear-gradient(135deg, #E87E1E 0%, #EE922B 100%);
    }
}

@media (max-width: 480px) {
    .profile-form-container-modern .empty-state-modern {
        margin: 1rem 0.75rem;
        padding: 2.5rem 1rem;
        min-height: 300px;
    }
    
    .empty-state-icon {
        font-size: 3rem;
        color: #E87E1E;
    }
    
    .empty-state-title {
        font-size: 1.25rem;
    }
    
    .empty-state-description {
        font-size: 0.875rem;
    }
}
