/* =========================================================
   PROFILE SETTINGS AND NAVIGATION ICONS
========================================================= */

.user-avatar.has-photo {
    background-color: #18365e;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: transparent;
}

.nav-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 10px;
    align-items: center;
    background: #172b46;
    transition:
        filter var(--transition),
        transform var(--transition);
}

.nav-item[data-view="dashboard"] .nav-icon {
    color: #82b3ff;
    background: rgba(59, 130, 246, 0.17);
}

.nav-item[data-view="add-video"] .nav-icon {
    color: #ff9fb6;
    background: rgba(244, 63, 94, 0.15);
}

.nav-item[data-view="add-carousel"] .nav-icon {
    color: #c4a5ff;
    background: rgba(139, 92, 246, 0.17);
}

.nav-item[data-view="content-list"] .nav-icon {
    color: #65dbc9;
    background: rgba(20, 184, 166, 0.15);
}

.nav-item[data-view="schedule"] .nav-icon {
    color: #fbbf64;
    background: rgba(245, 158, 11, 0.16);
}

.nav-item[data-view="posting-status"] .nav-icon {
    color: #75e0a1;
    background: rgba(34, 197, 94, 0.15);
}

.nav-item[data-view="profile-settings"] .nav-icon {
    color: #77d6f5;
    background: rgba(6, 182, 212, 0.15);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    filter: brightness(1.15);
}

.nav-item:hover .nav-icon {
    transform: translateY(-1px) scale(1.05);
}

.nav-item.active {
    box-shadow:
        inset 0 0 0 1px rgba(130, 179, 255, 0.1),
        0 5px 16px rgba(3, 10, 22, 0.12);
}

.nav-item.active .nav-icon {
    animation: navIconActivate 0.48s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes navIconActivate {

    0% {
        transform: scale(0.82) rotate(-10deg);
    }

    62% {
        transform: scale(1.12) rotate(3deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.8fr);
    align-items: start;
    gap: 20px;
    max-width: 1050px;
}

.profile-photo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 22px;
    border: 1px solid #263b58;
    border-radius: 18px;
    background: #12233b;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.profile-avatar-preview {
    display: flex;
    width: 112px;
    height: 112px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 3px solid rgba(130, 179, 255, 0.25);
    border-radius: 50%;
    background: linear-gradient(135deg, #3979e8, #8058ce);
    color: #ffffff;
    font-size: 36px;
    font-weight: 800;
}

.profile-avatar-preview.has-photo {
    background-color: #18365e;
}

.profile-photo-card h2 {
    color: #f1f6ff;
    font-size: 16px;
    overflow-wrap: anywhere;
}

.profile-photo-card p {
    margin-top: 4px;
    color: #9cb0ca;
    font-size: 11px;
}

.profile-photo-button {
    margin-top: 20px;
}

.profile-remove-photo {
    margin-top: 12px;
    border: 0;
    background: transparent;
    color: #a9bdd7;
    font-size: 10px;
    font-weight: 700;
}

.profile-remove-photo:hover {
    color: #fca5a5;
}

.profile-photo-card > small {
    margin-top: 14px;
    color: #8da2bf;
    font-size: 9px;
    line-height: 1.5;
}

.profile-crop-modal {
    max-width: 460px;
}

.profile-crop-body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-crop-canvas {
    display: block;
    width: min(100%, 280px);
    height: auto;
    aspect-ratio: 1;
    border: 1px solid #345174;
    border-radius: 14px;
    background: #0b192d;
    cursor: grab;
    touch-action: none;
}

.profile-crop-canvas.is-dragging {
    cursor: grabbing;
}

.profile-zoom-control {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 320px;
    margin-top: 22px;
    color: #a9bdd7;
}

.profile-zoom-control label {
    grid-column: 1 / -1;
    color: #dbe7f8;
    font-size: 11px;
    font-weight: 700;
}

.profile-zoom-control > i {
    color: #82b3ff;
    font-size: 11px;
}

.profile-zoom-control input[type="range"] {
    width: 100%;
    min-height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    accent-color: #5b96f5;
    cursor: pointer;
}

.profile-zoom-control output {
    min-width: 42px;
    color: #c1d0e4;
    font-size: 10px;
    text-align: right;
}

.profile-crop-hint {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    color: #9cb0ca;
    font-size: 10px;
    text-align: center;
}

.profile-crop-hint i {
    color: #82b3ff;
}

.profile-crop-modal .modal-footer {
    flex-wrap: wrap;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.visually-hidden:focus-visible + .profile-photo-button {
    outline: 2px solid #68a2ff;
    outline-offset: 3px;
}

.profile-form-card {
    max-width: none;
}

.profile-form-heading h2,
.profile-password-heading h3 {
    color: #f1f6ff;
    font-size: 14px;
}

.profile-form-heading p,
.profile-password-heading p {
    margin-top: 5px;
    color: #9cb0ca;
    font-size: 10px;
    line-height: 1.6;
}

.profile-form-heading {
    margin-bottom: 22px;
}

.profile-password-heading {
    margin: 26px 0 18px;
    padding-top: 20px;
    border-top: 1px solid #263b58;
}

.profile-password-grid {
    gap: 14px;
}

.profile-password-input {
    position: relative;
}

.profile-password-input input {
    padding-right: 48px;
}

.profile-password-input .password-toggle {
    top: 2px;
    right: 2px;
    color: #9cb0ca;
}

.profile-password-input .password-toggle:hover {
    background: #203958;
    color: #ffffff;
}

.profile-storage-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 4px;
    color: #9cb0ca;
    font-size: 10px;
    line-height: 1.6;
}

.profile-storage-note i {
    margin-top: 2px;
    color: #82b3ff;
}

.profile-form-card .form-actions {
    margin-top: 20px;
}

@media (max-width: 850px) {
    .profile-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-photo-card {
        padding: 22px;
    }

    .profile-avatar-preview {
        width: 96px;
        height: 96px;
        font-size: 31px;
    }
}

@media (max-width: 500px) {
    .profile-password-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .profile-form-card {
        padding: 18px;
    }

    .profile-form-card .form-actions .btn {
        width: 100%;
    }

    .profile-crop-modal .modal-header {
        padding: 16px;
    }

    .profile-crop-modal .modal-header p {
        max-width: 210px;
        line-height: 1.5;
    }

    .profile-crop-modal .modal-body {
        padding: 16px;
    }

    .profile-crop-modal .modal-footer {
        padding: 12px 16px;
    }

    .profile-crop-modal .modal-footer .btn {
        flex: 1;
        padding: 0 12px;
    }
}
