:root {
    --profile-ink: #0f1d35;
    --profile-muted: #687891;
    --profile-blue: #236ff5;
    --profile-blue-dark: #1454c8;
    --profile-orange: #ff6b35;
    --profile-green: #16a36a;
    --profile-glass: rgba(255, 255, 255, .68);
    --profile-shadow: 0 22px 70px rgba(61, 88, 135, .12);
}

* { box-sizing: border-box; }
html { background: #f3f7ff; }
body.profile-page {
    min-height: 100vh;
    margin: 0;
    color: var(--profile-ink);
    background: radial-gradient(circle at 12% 10%, rgba(77, 142, 255, .15), transparent 28rem), radial-gradient(circle at 88% 15%, rgba(255, 122, 77, .10), transparent 27rem), linear-gradient(145deg, #f4f8ff 0%, #eef4ff 48%, #f7f9fd 100%);
    overflow-x: hidden;
}

.profile-page .navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .76);
    border-bottom: 1px solid rgba(255, 255, 255, .82);
    box-shadow: 0 8px 30px rgba(32, 62, 111, .07);
    backdrop-filter: blur(24px) saturate(170%);
    -webkit-backdrop-filter: blur(24px) saturate(170%);
}

.profile-icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.profile-ambient { position: fixed; z-index: 0; border-radius: 50%; filter: blur(8px); pointer-events: none; }
.profile-ambient-one { width: 340px; height: 340px; left: -120px; top: 120px; background: rgba(72, 137, 255, .10); }
.profile-ambient-two { width: 270px; height: 270px; right: -85px; top: 330px; background: rgba(255, 130, 82, .08); }
.profile-ambient-three { width: 260px; height: 260px; left: 42%; bottom: -110px; background: rgba(91, 216, 216, .08); }

.profile-shell { position: relative; z-index: 1; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 80px; }
.profile-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; padding: 0 6px; }
.profile-intro h1 { margin: 6px 0; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; letter-spacing: -.045em; font-weight: 760; }
.profile-intro p { margin: 0; color: var(--profile-muted); font-size: 15px; }
.profile-eyebrow { color: var(--profile-blue); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.secure-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; color: #52657f; background: rgba(255, 255, 255, .60); border: 1px solid rgba(255, 255, 255, .86); border-radius: 999px; font-size: 12px; font-weight: 650; box-shadow: 0 8px 24px rgba(62, 90, 135, .07); }
.secure-pill svg { width: 16px; height: 16px; fill: none; stroke: var(--profile-green); stroke-width: 1.8; }

.glass-card { background: var(--profile-glass); border: 1px solid rgba(255, 255, 255, .88); box-shadow: var(--profile-shadow), inset 0 1px 0 rgba(255, 255, 255, .74); backdrop-filter: blur(26px) saturate(155%); -webkit-backdrop-filter: blur(26px) saturate(155%); }
.identity-card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px 30px; border-radius: 24px; overflow: hidden; }
.identity-card::after { content: ""; position: absolute; width: 230px; height: 230px; right: -75px; top: -105px; border-radius: 50%; background: linear-gradient(145deg, rgba(36, 111, 245, .13), rgba(36, 111, 245, .02)); pointer-events: none; }
.identity-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 22px; min-width: 0; }
.profile-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 84px; height: 84px; border: 4px solid rgba(255, 255, 255, .84); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #1d65e7, #5f9bff); box-shadow: 0 12px 30px rgba(41, 83, 145, .18); font-size: 31px; font-weight: 760; }
.identity-copy { min-width: 0; }
.identity-line { display: flex; align-items: center; gap: 12px; }
.identity-line h2 { max-width: 420px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 28px; line-height: 1.2; letter-spacing: -.025em; }
.account-state { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; color: #087b50; background: rgba(36, 190, 124, .10); font-size: 11px; font-weight: 700; white-space: nowrap; }
.account-state > span { width: 6px; height: 6px; border-radius: 50%; background: #1cb777; box-shadow: 0 0 0 4px rgba(28, 183, 119, .12); }
.identity-meta { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 14px; }
.identity-meta span { display: grid; gap: 3px; min-width: 180px; }
.identity-meta strong { color: #8290a5; font-size: 11px; font-weight: 650; }
.identity-meta em { color: #33445e; font-size: 13px; font-style: normal; word-break: break-all; }
.loading-text { color: #73849d !important; }

.secondary-button { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 17px; border: 1px solid rgba(35, 111, 245, .18); border-radius: 12px; color: var(--profile-blue-dark); background: rgba(255, 255, 255, .72); font-weight: 700; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.secondary-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.secondary-button:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(34, 94, 189, .12); }

.overview-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.stat-card { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) 20px; align-items: center; gap: 13px; min-height: 132px; padding: 20px; border-radius: 20px; color: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
button.stat-card { width: 100%; font: inherit; }
.stat-card:hover { transform: translateY(-4px); border-color: rgba(62, 125, 231, .28); box-shadow: 0 26px 70px rgba(52, 81, 130, .16); }
.stat-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #49709f; background: rgba(231, 239, 251, .80); }
.stat-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.stat-blue .stat-icon { color: var(--profile-blue); background: rgba(35, 111, 245, .10); }
.stat-orange .stat-icon { color: var(--profile-orange); background: rgba(255, 107, 53, .10); }
.stat-copy { min-width: 0; display: grid; }
.stat-copy small { color: #73839a; font-size: 11px; font-weight: 650; }
.stat-copy strong { margin: 5px 0 3px; font-size: 25px; line-height: 1; letter-spacing: -.02em; }
.stat-copy em { overflow: hidden; color: #94a0b1; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.stat-arrow { width: 18px; height: 18px; fill: none; stroke: #9aa8ba; stroke-width: 1.8; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 18px; margin-top: 18px; }
.recent-panel, .tools-panel { min-width: 0; padding: 26px; border-radius: 24px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.025em; }
.section-heading > a { display: inline-flex; align-items: center; gap: 2px; color: var(--profile-blue); font-size: 12px; font-weight: 700; text-decoration: none; }
.section-heading > a svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.recent-list { display: grid; gap: 10px; }
.task-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 70px; padding: 11px 13px; border: 1px solid rgba(153, 170, 198, .16); border-radius: 15px; color: inherit; background: rgba(255, 255, 255, .48); text-decoration: none; }
.task-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--profile-blue); background: rgba(35, 111, 245, .09); }
.task-icon.orange { color: var(--profile-orange); background: rgba(255, 107, 53, .09); }
.task-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.task-copy { min-width: 0; display: grid; gap: 4px; }
.task-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.task-copy small { color: #8290a4; font-size: 10px; }
.task-action { padding: 7px 10px; border-radius: 9px; color: var(--profile-blue); background: rgba(35, 111, 245, .08); font-size: 11px; font-weight: 700; }
.empty-state { display: grid; place-items: center; min-height: 150px; color: #8996a8; text-align: center; }
.empty-state strong { display: block; margin-bottom: 5px; color: #52647c; font-size: 14px; }
.empty-state span { font-size: 11px; }
.task-skeleton > span, .task-skeleton b, .task-skeleton small { display: block; border-radius: 10px; background: linear-gradient(100deg, rgba(223, 230, 241, .65) 20%, rgba(246, 248, 252, .95) 40%, rgba(223, 230, 241, .65) 60%); background-size: 220% 100%; animation: profile-shimmer 1.4s infinite linear; }
.task-skeleton > span { width: 42px; height: 42px; }
.task-skeleton b { width: 65%; height: 11px; }
.task-skeleton small { width: 42%; height: 8px; margin-top: 8px; }
@keyframes profile-shimmer { to { background-position-x: -220%; } }

.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool-link { width: 100%; min-width: 0; display: grid; grid-template-columns: 36px minmax(0, 1fr) 15px; align-items: center; gap: 10px; min-height: 76px; padding: 12px; border: 1px solid rgba(153, 170, 198, .16); border-radius: 15px; color: inherit; background: rgba(255, 255, 255, .47); font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.tool-link:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .82); }
.tool-link > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--profile-blue); background: rgba(35, 111, 245, .09); }
.tool-link > span svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.tool-link div { min-width: 0; display: grid; gap: 4px; }
.tool-link strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tool-link small { overflow: hidden; color: #8b98aa; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.tool-arrow { width: 14px; height: 14px; fill: none; stroke: #a0acbb; stroke-width: 2; }

.account-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 18px 8px; }
.account-footer > div { display: flex; align-items: center; gap: 12px; color: #64758e; }
.account-footer > div > svg { width: 20px; height: 20px; fill: none; stroke: #8492a5; stroke-width: 1.7; }
.account-footer span { display: grid; gap: 3px; }
.account-footer strong { color: #42546d; font-size: 12px; }
.account-footer small { font-size: 10px; }
.account-footer button { border: 0; color: #dc554f; background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }

.user-menu { position: relative; }
.user-info { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.user-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #236ff5, #6ca4ff); }
.user-dropdown { position: absolute; top: calc(100% + 12px); right: 0; min-width: 160px; padding: 8px; border: 1px solid rgba(213, 224, 239, .88); border-radius: 14px; background: rgba(255, 255, 255, .96); box-shadow: 0 18px 46px rgba(28, 55, 100, .15); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .18s ease; }
.user-menu:hover .user-dropdown, .user-menu.open .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-radius: 9px; color: #45566e; font-size: 13px; cursor: pointer; }
.dropdown-item:hover { background: #f0f5fd; color: var(--profile-blue); }

#notificationContainer { position: fixed; top: 86px; right: 22px; z-index: 2000; display: grid; gap: 8px; }
.notification { display: flex; align-items: center; gap: 9px; max-width: 340px; padding: 12px 15px; border: 1px solid rgba(255, 255, 255, .86); border-radius: 13px; color: #fff; background: rgba(15, 29, 53, .92); box-shadow: 0 16px 45px rgba(20, 41, 75, .22); backdrop-filter: blur(14px); }
.notification.success { background: rgba(13, 132, 86, .94); }
.notification.error { background: rgba(202, 65, 60, .94); }

.password-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(12, 27, 50, .36); backdrop-filter: blur(13px); -webkit-backdrop-filter: blur(13px); }
.password-modal-content { position: relative; width: min(440px, 100%); padding: 28px; border: 1px solid rgba(255, 255, 255, .85); border-radius: 24px; background: rgba(255, 255, 255, .94); box-shadow: 0 30px 90px rgba(13, 37, 76, .24); }
.password-modal-content .close { position: absolute; right: 20px; top: 16px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #65758d; background: #edf2f9; font-size: 24px; cursor: pointer; }
.password-modal-content h2 { margin: 0 0 22px; font-size: 23px; }
.password-modal-content .form-group { margin-bottom: 14px; }
.password-modal-content label { display: block; margin-bottom: 7px; color: #4f6077; font-size: 12px; font-weight: 700; }
.password-modal-content input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid #dce5f0; border-radius: 12px; color: var(--profile-ink); background: rgba(247, 250, 255, .90); outline: none; }
.password-modal-content input:focus { border-color: rgba(35, 111, 245, .55); box-shadow: 0 0 0 4px rgba(35, 111, 245, .08); }
.password-modal-content .error-message { display: block; min-height: 16px; margin-top: 4px; color: #d44f4a; font-size: 11px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.form-actions button { min-height: 42px; padding: 0 18px; border-radius: 11px; font-weight: 700; cursor: pointer; }
.form-actions .cancel-btn { border: 1px solid #dce5f0; color: #65758d; background: #fff; }
.form-actions .primary-btn { border: 0; color: #fff; background: linear-gradient(135deg, #236ff5, #3d8cff); box-shadow: 0 12px 26px rgba(35, 111, 245, .22); }

.contact-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(12, 27, 50, .36); backdrop-filter: blur(13px); -webkit-backdrop-filter: blur(13px); }
.contact-modal-content { width: min(440px, 100%); max-height: 90vh; overflow: auto; border: 1px solid rgba(255, 255, 255, .85); border-radius: 24px; background: rgba(255, 255, 255, .95); box-shadow: 0 30px 90px rgba(13, 37, 76, .24); }
.contact-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 12px; }
.contact-modal-title { margin: 0; font-size: 22px; }
.contact-modal-close { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; color: #65758d; background: #edf2f9; cursor: pointer; }
.contact-modal-body { padding: 8px 24px 24px; }
.contact-modal-section { padding: 16px 0; border-bottom: 1px solid #e7edf5; }
.contact-modal-section:last-child { border-bottom: 0; }
.section-header { display: flex; align-items: center; gap: 9px; }
.section-header h3 { margin: 0; }
.contact-modal-qrcode { display: grid; place-items: center; min-height: 140px; margin: 14px 0; border-radius: 16px; color: #76879e; background: #f3f7fd; }
.contact-modal-qrcode img { display: block; width: min(260px, 100%); height: auto; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 12px; background: #fff; }
.contact-modal-section.info { display: flex; align-items: center; gap: 12px; }
.contact-modal-section.info svg { flex: 0 0 auto; color: var(--profile-blue); }
.info-title { margin: 0 0 3px; font-weight: 700; }
.info-desc { margin: 0; color: #718198; font-size: 13px; }
.text-sm { font-size: 12px; }
.text-gray-600 { color: #718198; }
.profile-page .minimal-footer { position: relative; z-index: 1; background: rgba(255, 255, 255, .58); border-top: 1px solid rgba(255, 255, 255, .82); backdrop-filter: blur(16px); }

@media (max-width: 900px) {
    .profile-shell { width: min(100% - 28px, 720px); padding-top: 32px; padding-bottom: 72px; }
    .profile-intro { align-items: flex-start; }
    .overview-grid { grid-template-columns: 1fr 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .profile-page .navbar { position: relative; padding: 14px 18px; }
    .profile-page .navbar-nav { display: none !important; }
    .profile-page .navbar-nav.mobile-open { position: absolute; top: calc(100% + 8px); left: 12px; right: 12px; z-index: 90; display: grid !important; gap: 4px; padding: 10px; border: 1px solid rgba(214, 224, 238, .9); border-radius: 16px; background: rgba(255, 255, 255, .96); box-shadow: 0 18px 48px rgba(25, 53, 97, .16); }
    .profile-page .navbar-nav.mobile-open .nav-link { display: block; padding: 10px 12px; border-radius: 10px; }
    .profile-page .mobile-menu-toggle { display: block !important; }
    .profile-page .navbar-brand h1 { font-size: 19px; }
    .profile-page .navbar-auth { margin-left: auto; margin-right: 8px; }
    .profile-shell { width: calc(100% - 24px); padding: 28px 0 52px; }
    .profile-intro { margin-bottom: 18px; }
    .profile-intro h1 { font-size: 30px; }
    .profile-intro p { font-size: 13px; }
    .secure-pill { display: none; }
    .identity-card { align-items: flex-start; padding: 20px; border-radius: 20px; }
    .identity-main { align-items: flex-start; gap: 14px; }
    .profile-avatar { width: 62px; height: 62px; font-size: 23px; }
    .identity-line { align-items: flex-start; flex-direction: column; gap: 7px; }
    .identity-line h2 { max-width: 190px; font-size: 21px; }
    .identity-meta { display: grid; gap: 8px; margin-top: 12px; }
    .identity-meta span { min-width: 0; }
    .identity-meta em { max-width: 190px; font-size: 11px; }
    .secondary-button { position: absolute; right: 18px; top: 18px; width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 11px; font-size: 0; }
    .secondary-button svg { width: 17px; height: 17px; }
    .overview-grid { gap: 10px; margin-top: 12px; }
    .stat-card { grid-template-columns: 36px minmax(0, 1fr); min-height: 112px; padding: 14px; border-radius: 17px; }
    .stat-icon { width: 36px; height: 36px; border-radius: 11px; }
    .stat-icon svg { width: 18px; height: 18px; }
    .stat-copy strong { font-size: 21px; }
    .stat-copy em { font-size: 9px; }
    .stat-arrow { display: none; }
    .dashboard-grid { gap: 12px; margin-top: 12px; }
    .recent-panel, .tools-panel { padding: 19px; border-radius: 20px; }
    .tool-grid { grid-template-columns: 1fr; }
    .tool-link { min-height: 68px; }
    .account-footer { align-items: flex-start; padding: 16px 6px 0; }
    .account-footer small { max-width: 220px; line-height: 1.45; }
    #notificationContainer { top: 76px; left: 16px; right: 16px; }
    .notification { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
