:root {
    --blue: #1A4D7C;
    --cream: #F5EFC6;
    --red: #4D0E12;
    --brown: #4A2E27;
    --dark: #231815;
    --white: #FFFFFF;
    --muted: #777777;
    --border: #E8E5DC;
    --background: #F8F9FC;
    --light-blue: #EAF1F8;
    --shadow: 0 5px 20px rgba(35, 24, 21, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--background);
    color: var(--dark);
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input {
    font: inherit;
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* SIDEBAR */

.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 25px 18px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
    margin-bottom: 35px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--blue);
}

.brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 10px;
    background: #F4F7FA;
    border-radius: 12px;
    margin-bottom: 30px;
    overflow: hidden;
}

.profile-avatar,
.top-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 15px;
}

.profile-details {
    min-width: 0;
}

.sidebar-profile strong {
    display: block;
    font-size: 13px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.sidebar-profile span {
    color: var(--muted);
    font-size: 11px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.nav-label {
    color: #9A9A9A;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.3px;
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-label-spaced {
    margin-top: 25px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px;
    color: #666;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    transition: 0.2s;
}

.nav-link i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
    background: var(--light-blue);
}

.sidebar-bottom {
    margin-top: auto;
}

.help-card {
    background: #F4F7FA;
    padding: 17px;
    border-radius: 12px;
    margin: 30px 0 20px;
}

.help-card > i {
    color: var(--blue);
    font-size: 20px;
    margin-bottom: 10px;
}

.help-card strong {
    display: block;
    font-size: 13px;
}

.help-card p {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.6;
    margin: 6px 0 12px;
}

.help-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: var(--blue);
    font-weight: 800;
    transition: 0.2s;
}

.help-link:hover {
    color: #143D63;
    gap: 11px;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: var(--red);
    font-size: 13px;
    font-weight: 800;
    border-radius: 9px;
}

.logout-link:hover {
    background: #FFF0F0;
}

/* TOPBAR */

.topbar {
    min-height: 82px;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 15px 38px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left,
.topbar-right,
.top-profile {
    display: flex;
    align-items: center;
}

.topbar-left {
    gap: 15px;
}

.topbar-small {
    display: block;
    color: var(--blue);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 4px;
}

.topbar h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 17px;
    font-weight: 800;
}

.topbar-right {
    gap: 20px;
}

.notification-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brown);
    background: #F5F5F5;
    border-radius: 50%;
}

.notification-btn:hover {
    background: var(--light-blue);
    color: var(--blue);
}

.top-profile {
    gap: 10px;
}

.top-profile-info strong {
    display: block;
    font-size: 12px;
    font-weight: 800;
}

.top-profile-info span {
    color: var(--muted);
    font-size: 10px;
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--blue);
    font-size: 20px;
    cursor: pointer;
}

/* CONTENT */

.content-wrapper {
    max-width: 1450px;
    margin: auto;
    padding: 35px 38px;
}

.page-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 28px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.section-label {
    display: block;
    color: var(--blue);
    font-size: 9px;
    letter-spacing: 1.4px;
    font-weight: 800;
    margin-bottom: 6px;
}

.page-intro h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 27px;
    margin: 7px 0;
}

.page-intro p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.intro-icon {
    width: 65px;
    height: 65px;
    border-radius: 15px;
    background: var(--light-blue);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

/* SETTINGS SECTIONS */

.settings-section {
    margin-bottom: 28px;
}

.settings-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 15px;
}

.settings-heading-icon {
    width: 43px;
    height: 43px;
    background: var(--light-blue);
    color: var(--blue);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.settings-heading h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
}

.settings-heading p {
    color: var(--muted);
    font-size: 11px;
}

.settings-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 25px;
    box-shadow: var(--shadow);
}

/* ACCOUNT INFORMATION */

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 12px;
    font-weight: 800;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: #FCFCFC;
    color: var(--dark);
    font-size: 12px;
}

.form-group input[readonly] {
    background: #F4F7FA;
    color: #666;
    cursor: default;
}

.form-group small {
    font-size: 10px;
    color: var(--muted);
}

/* NOTIFICATION PREFERENCES */

.setting-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #F0EEE8;
}

.setting-option:first-child {
    padding-top: 0;
}

.setting-option:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.setting-option strong {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
}

.setting-option p {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

/* TOGGLE SWITCH */

.switch {
    position: relative;
    display: inline-block;
    width: 43px;
    height: 23px;
    min-width: 43px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #D6D6D6;
    border-radius: 30px;
    transition: 0.3s;
}

.slider::before {
    content: "";
    position: absolute;
    height: 17px;
    width: 17px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked + .slider {
    background: var(--blue);
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
}

.switch input:focus-visible + .slider {
    outline: 2px solid var(--blue);
    outline-offset: 3px;
}

/* ACCOUNT SECURITY */

.security-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.security-card strong {
    font-size: 12px;
}

.security-card p {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
    margin-top: 6px;
    max-width: 650px;
}

.security-link {
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.security-link:hover {
    text-decoration: underline;
}

/* ACTION BUTTONS */

.settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
}

.cancel-button,
.save-button {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s;
}

.cancel-button {
    border: 1px solid var(--border);
    background: white;
    color: var(--muted);
}

.cancel-button:hover {
    background: #F4F4F4;
}

.save-button {
    border: none;
    background: var(--blue);
    color: white;
}

.save-button:hover {
    background: #143D63;
    transform: translateY(-2px);
}

.save-button i {
    margin-right: 7px;
}

.save-message {
    text-align: right;
    color: #3D8051;
    font-size: 12px;
    font-weight: 700;
    margin-top: 12px;
    min-height: 18px;
}

/* FOOTER */

.dashboard-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
}

/* OVERLAY */

.sidebar-overlay {
    display: none;
}

/* RESPONSIVE */

@media (max-width: 1050px) {
    .sidebar {
        width: 235px;
        min-width: 235px;
    }

    .content-wrapper {
        padding: 25px;
    }

    .topbar {
        padding: 15px 25px;
    }
}

@media (max-width: 800px) {
    .dashboard-layout {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -280px;
        width: 260px;
        min-width: 260px;
        overflow-y: auto;
        transition: left 0.25s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-overlay.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 5;
    }

    .menu-toggle {
        display: block;
    }

    .topbar {
        padding: 14px 18px;
    }

    .content-wrapper {
        padding: 22px 18px;
    }
}

@media (max-width: 560px) {
    .topbar-right {
        gap: 8px;
    }

    .top-profile-info {
        display: none;
    }

    .top-avatar {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }

    .page-intro {
        padding: 22px 18px;
    }

    .page-intro h1 {
        font-size: 22px;
    }

    .intro-icon {
        width: 50px;
        height: 50px;
        min-width: 50px;
        font-size: 20px;
    }

    .account-grid {
        grid-template-columns: 1fr;
    }

    .settings-card {
        padding: 20px;
    }

    .security-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-footer {
        flex-direction: column;
    }

    .settings-actions {
        flex-direction: column-reverse;
    }

    .settings-actions button {
        width: 100%;
    }
}