* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1769e0;
    --primary-dark: #0f56bd;
    --sidebar: #07152d;
    --text: #172033;
    --muted: #718096;
    --light: #f5f7fb;
    --border: #e5e9f0;
    --white: #ffffff;
    --success: #16803c;
    --success-bg: #eaf8ef;
    --danger: #c62828;
    --danger-bg: #fff0f0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--light);
    color: var(--text);
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input {
    font-family: inherit;
}


/* ========================================
   PAGE
======================================== */

.profile-page {
    min-height: 100vh;
    display: flex;
}


/* ========================================
   SIDEBAR
======================================== */

.sidebar {
    width: 255px;
    min-height: 100vh;

    background: linear-gradient(
        180deg,
        #07152d 0%,
        #0b2552 55%,
        #1554a7 100%
    );

    color: #ffffff;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 28px 14px 22px;

    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;

    z-index: 100;
}

.sidebar-top {
    width: 100%;
}


/* BRAND */

.sidebar-brand {
    display: block;

    padding: 0 12px 25px;

    color: #ffffff;

    font-size: 20px;
    font-weight: 800;

    letter-spacing: -0.5px;
}

.sidebar-brand span {
    color: #48d4dc;
}


/* USER */

.sidebar-user {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 13px 12px;

    margin-bottom: 30px;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.08);
}

.sidebar-avatar {
    width: 40px;
    height: 40px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #2ac4ce;
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: 800;

    overflow: hidden;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.sidebar-user-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.sidebar-user-info strong {
    overflow: hidden;

    color: #ffffff;

    font-size: 13px;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-user-info span {
    margin-top: 2px;

    color: rgba(255, 255, 255, 0.65);

    font-size: 11px;
}


/* NAV SECTIONS */

.sidebar-section {
    margin-bottom: 28px;
}

.sidebar-label {
    padding: 0 13px;

    margin-bottom: 9px;

    color: rgba(255, 255, 255, 0.45);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.5px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    min-height: 44px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 0 13px;

    border-radius: 8px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 13px;
    font-weight: 600;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.sidebar-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
    color: #ffffff;

    background: linear-gradient(
        90deg,
        rgba(52, 202, 215, 0.75),
        rgba(23, 105, 224, 0.75)
    );

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.12);
}

.nav-icon {
    width: 18px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 15px;
}


/* LOGOUT */

.sidebar-logout {
    width: 100%;
    min-height: 45px;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 0 13px;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: rgba(255, 255, 255, 0.72);

    cursor: pointer;

    font-size: 13px;
    font-weight: 600;

    text-align: left;

    transition: 0.2s;
}

.sidebar-logout:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar-logout:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ========================================
   MAIN AREA
======================================== */

.profile-main {
    width: calc(100% - 255px);

    min-height: 100vh;

    margin-left: 255px;
}


/* ========================================
   TOPBAR
======================================== */

.profile-topbar {
    min-height: 88px;

    padding: 22px 45px;

    background: #ffffff;

    border-bottom: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.page-label {
    color: var(--primary);

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.4px;
}

.profile-topbar h1 {
    margin-top: 3px;

    font-size: 25px;
    line-height: 1.2;
}

.topbar-user {
    display: flex;
    align-items: center;

    gap: 10px;
}

.topbar-avatar {
    width: 40px;
    height: 40px;

    border-radius: 50%;

    background: var(--primary);
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    font-size: 13px;
    font-weight: 800;
}

.topbar-avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.topbar-user div:last-child {
    display: flex;
    flex-direction: column;
}

.topbar-user strong {
    font-size: 13px;
}

.topbar-user span {
    margin-top: 2px;

    color: var(--muted);

    font-size: 11px;
}


/* ========================================
   CONTENT
======================================== */

.profile-content {
    max-width: 1050px;

    margin: 0 auto;

    padding: 38px 40px 60px;
}


/* ========================================
   INTRO
======================================== */

.profile-intro {
    margin-bottom: 25px;
}

.profile-intro h2 {
    margin-top: 5px;

    font-size: 27px;
}

.profile-intro p:last-child {
    margin-top: 7px;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.6;
}


/* ========================================
   PROFILE CARD
======================================== */

.profile-card {
    margin-bottom: 22px;

    padding: 30px;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 14px;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.035);
}

.card-heading {
    padding-bottom: 22px;

    margin-bottom: 25px;

    border-bottom: 1px solid var(--border);
}

.card-heading h2 {
    font-size: 19px;
}

.card-heading p {
    margin-top: 6px;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.5;
}


/* ========================================
   PROFILE IMAGE
======================================== */

.profile-image-area {
    display: flex;
    align-items: center;

    gap: 28px;

    margin-bottom: 30px;
}

.profile-image-preview {
    width: 115px;
    height: 115px;

    flex-shrink: 0;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #1769e0,
        #2ac4ce
    );

    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 4px solid #ffffff;

    box-shadow:
        0 5px 20px rgba(23, 105, 224, 0.2);
}

.profile-image-preview span {
    font-size: 30px;
    font-weight: 800;
}

.profile-image-preview img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.profile-image-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 10px;
}

.upload-button,
.secondary-button {
    min-height: 40px;

    padding: 0 17px;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition: 0.2s;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: var(--primary);

    color: #ffffff;
}

.upload-button:hover {
    background: var(--primary-dark);
}

.secondary-button {
    border: 1px solid var(--border);

    background: #ffffff;

    color: var(--text);
}

.secondary-button:hover {
    background: #f7f9fc;
}

.image-help {
    width: 100%;

    margin-top: 2px;

    color: var(--muted);

    font-size: 11px;
}


/* ========================================
   AVATAR SELECTION
======================================== */

.avatar-section {
    padding-top: 25px;

    border-top: 1px solid var(--border);
}

.avatar-section h3 {
    font-size: 14px;
}

.avatar-section > p {
    margin-top: 5px;

    color: var(--muted);

    font-size: 12px;
}

.avatar-grid {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    margin-top: 18px;
}

.avatar-option {
    width: 55px;
    height: 55px;

    border: 2px solid var(--border);

    border-radius: 12px;

    background: #f8faff;

    cursor: pointer;

    font-size: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.avatar-option:hover {
    transform: translateY(-2px);

    border-color: #b9d2f7;

    background: #edf4ff;
}

.avatar-option.selected {
    border-color: var(--primary);

    background: #edf4ff;

    box-shadow:
        0 0 0 3px rgba(23, 105, 224, 0.12);
}


/* ========================================
   FORM
======================================== */

.form-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;

    gap: 7px;
}

.form-group label {
    color: var(--text);

    font-size: 12px;
    font-weight: 700;
}

.form-group input {
    width: 100%;
    height: 46px;

    padding: 0 13px;

    border: 1px solid var(--border);

    border-radius: 8px;

    outline: none;

    background: #ffffff;

    color: var(--text);

    font-size: 13px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input::placeholder {
    color: #a0aec0;
}

.form-group input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(23, 105, 224, 0.1);
}


/* ========================================
   PASSWORD INPUT
======================================== */

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 65px;
}

.password-toggle {
    position: absolute;

    right: 10px;
    top: 50%;

    transform: translateY(-50%);

    border: 0;

    background: transparent;

    color: var(--primary);

    cursor: pointer;

    font-size: 11px;
    font-weight: 700;
}


/* ========================================
   BUTTONS
======================================== */

.primary-button {
    min-height: 43px;

    margin-top: 20px;

    padding: 0 20px;

    border: 0;
    border-radius: 8px;

    background: var(--primary);

    color: #ffffff;

    cursor: pointer;

    font-size: 12px;
    font-weight: 700;

    transition: 0.2s;
}

.primary-button:hover {
    background: var(--primary-dark);
}

.primary-button:disabled {
    opacity: 0.6;

    cursor: not-allowed;
}


/* ========================================
   FORM MESSAGES
======================================== */

.form-message {
    display: none;

    margin-top: 18px;

    padding: 11px 13px;

    border-radius: 8px;

    font-size: 12px;

    line-height: 1.5;
}

.form-message.success {
    display: block;

    background: var(--success-bg);

    color: var(--success);
}

.form-message.error {
    display: block;

    background: var(--danger-bg);

    color: var(--danger);
}


/* ========================================
   ACCOUNT INFORMATION
======================================== */

.account-information {
    display: flex;
    flex-direction: column;
}

.account-row {
    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    border-bottom: 1px solid var(--border);
}

.account-row:last-child {
    border-bottom: 0;
}

.account-row span {
    color: var(--muted);

    font-size: 12px;
}

.account-row strong {
    color: var(--text);

    font-size: 12px;

    text-align: right;
}


/* ========================================
   TABLET
======================================== */

@media (max-width: 1050px) {

    .sidebar {
        width: 225px;
    }

    .profile-main {
        width: calc(100% - 225px);

        margin-left: 225px;
    }

    .profile-topbar {
        padding: 22px 30px;
    }

    .profile-content {
        padding: 30px;
    }

}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 800px) {

    .profile-page {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;

        position: relative;

        padding: 18px;

        display: block;
    }

    .sidebar-brand {
        padding: 0 5px 18px;
    }

    .sidebar-user {
        margin-bottom: 18px;
    }

    .sidebar-section {
        margin-bottom: 15px;
    }

    .sidebar-label {
        padding-left: 5px;
    }

    .sidebar-nav {
        display: grid;

        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar-logout {
        margin-top: 10px;
    }

    .profile-main {
        width: 100%;

        margin-left: 0;
    }

    .profile-topbar {
        padding: 20px;
    }

    .profile-content {
        padding: 25px 18px 45px;
    }

    .profile-image-area {
        align-items: flex-start;

        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

}


/* ========================================
   SMALL MOBILE
======================================== */

@media (max-width: 500px) {

    .profile-topbar {
        align-items: flex-start;

        flex-direction: column;
    }

    .topbar-user {
        width: 100%;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .profile-card {
        padding: 23px;
    }

    .profile-intro h2 {
        font-size: 23px;
    }

    .profile-image-preview {
        width: 100px;
        height: 100px;
    }

    .profile-image-controls {
        width: 100%;
    }

    .upload-button,
    .secondary-button {
        flex: 1;
    }

    .account-row {
        align-items: flex-start;

        flex-direction: column;

        justify-content: center;

        gap: 5px;

        padding: 13px 0;
    }

    .account-row strong {
        text-align: left;
    }

}