* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f0f2f5;
    color: #1c1e21;
    transition: background .3s, color .3s;
}

/* HEADER */

.topbar {
    height: 65px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6%;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 5px #00000012;
}

.logo {
    font-size: 27px;
    font-weight: 900;
    color: #1877f2;
    text-decoration: none;
}

.top-actions {
    display: flex;
    gap: 25px;
}

.top-actions a {
    color: #555;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}


/* LAYOUT */

.settings-layout {
    display: flex;
    max-width: 1250px;
    margin: 30px auto;
    padding: 0 20px;
    gap: 25px;
}


/* SIDEBAR */

.sidebar {
    width: 250px;
    flex-shrink: 0;
    height: fit-content;
    background: white;
    border-radius: 12px;
    padding: 22px 15px;
    position: sticky;
    top: 85px;
}

.sidebar h2 {
    font-size: 22px;
    margin-bottom: 20px;
    padding-left: 10px;
}

.sidebar a {
    display: block;
    padding: 14px 12px;
    color: #444;
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    margin-bottom: 5px;
}

.sidebar a:hover {
    background: #e7f0ff;
    color: #1877f2;
}

.sidebar .delete-link {
    color: #e53935;
}


/* MAIN */

.settings-main {
    flex: 1;
    min-width: 0;
}

.page-heading {
    margin-bottom: 25px;
}

.page-heading h1 {
    font-size: 29px;
    margin-bottom: 7px;
}

.page-heading p,
.description {
    color: #777;
    font-size: 14px;
    line-height: 1.6;
}


/* CARDS */

.settings-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 7px #00000008;
}

.settings-card h2 {
    font-size: 19px;
    margin-bottom: 8px;
}

.settings-card h3 {
    font-size: 15px;
    margin: 20px 0 12px;
}

.description {
    margin-bottom: 20px;
}


/* ACCOUNT INFO */

.account-info > div {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.account-info span {
    color: #777;
    font-size: 14px;
}

.account-info strong {
    font-size: 14px;
    overflow-wrap: anywhere;
}


/* AVATAR */

.avatar-settings {
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 20px 0;
}

.avatar-settings img {
    width: 105px;
    height: 105px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e7f0ff;
}

.avatar-settings button {
    margin: 5px;
}

.settings-card small {
    color: #888;
}


/* INPUTS */

.settings-card input[type="text"],
.settings-card input[type="password"] {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 10px 0;
    outline: none;
    font-size: 14px;
    background: white;
    color: #222;
}

.settings-card input:focus {
    border-color: #1877f2;
}


/* BUTTONS */

.primary-btn,
.secondary-btn,
.text-btn,
.delete-btn,
.theme-btn {
    display: inline-block;
    padding: 11px 16px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    text-decoration: none;
    margin-top: 12px;
}

.primary-btn {
    background: #1877f2;
    color: white;
}

.secondary-btn {
    background: #e7f0ff;
    color: #1877f2;
}

.text-btn {
    background: transparent;
    color: #e53935;
}

.primary-btn:hover {
    background: #1264ce;
}


/* SETTING ROW */

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px 0;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.setting-row strong {
    font-size: 14px;
}

.setting-row p {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}


/* SWITCH */

.switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 30px;
    cursor: pointer;
    transition: .3s;
}

.slider:before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: .3s;
}

.switch input:checked + .slider {
    background: #1877f2;
}

.switch input:checked + .slider:before {
    transform: translateX(22px);
}


/* THEMES */

.theme-options {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.theme-btn {
    background: #e7f0ff;
    color: #1877f2;
}


/* PRIVACY */

.privacy-note {
    color: #888;
    font-size: 12px;
    margin-top: 15px;
    line-height: 1.6;
}


/* DELETE */

.danger-card {
    border: 1px solid #ffcccc;
}

.danger-card h2 {
    color: #d93025;
}

.danger-card p {
    color: #777;
    font-size: 13px;
    line-height: 1.6;
    margin: 12px 0;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #b52b38;
}


/* FOOTER */

.settings-footer {
    text-align: center;
    padding: 30px;
    color: #888;
    font-size: 12px;
}


/* TOAST */

#toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    color: white;
    padding: 13px 22px;
    border-radius: 8px;
    display: none;
    z-index: 500;
    font-size: 13px;
}


/* DARK MODE */

body.dark-mode {
    background: #101318;
    color: #f1f1f1;
}

body.dark-mode .topbar,
body.dark-mode .sidebar,
body.dark-mode .settings-card,
body.dark-mode .section-title {
    background: #1c222b;
    color: #f1f1f1;
}

body.dark-mode .top-actions a,
body.dark-mode .sidebar a {
    color: #ddd;
}

body.dark-mode .sidebar a:hover {
    background: #28364a;
    color: #70aaff;
}

body.dark-mode .account-info > div,
body.dark-mode .setting-row {
    border-color: #343b46;
}

body.dark-mode .account-info span,
body.dark-mode .description,
body.dark-mode .setting-row p,
body.dark-mode .danger-card p {
    color: #aaa;
}

body.dark-mode .settings-card input {
    background: #252d38;
    border-color: #414b58;
    color: white;
}

body.dark-mode .secondary-btn,
body.dark-mode .theme-btn {
    background: #293b57;
    color: #91bdff;
}

body.dark-mode .danger-card {
    border-color: #743333;
}


/* MOBILE */

@media(max-width: 750px) {

    .topbar {
        padding: 0 15px;
    }

    .settings-layout {
        display: block;
        padding: 0 12px;
        margin-top: 15px;
    }

    .sidebar {
        width: 100%;
        position: static;
        display: flex;
        overflow-x: auto;
        gap: 5px;
        padding: 12px;
        margin-bottom: 20px;
    }

    .sidebar h2 {
        display: none;
    }

    .sidebar a {
        white-space: nowrap;
        margin: 0;
        padding: 11px;
        font-size: 12px;
    }

    .settings-card {
        padding: 18px;
    }

    .page-heading h1 {
        font-size: 24px;
    }

    .avatar-settings {
        gap: 15px;
        align-items: flex-start;
    }

    .avatar-settings img {
        width: 80px;
        height: 80px;
    }

    .account-info > div {
        flex-direction: column;
        gap: 7px;
    }

    .top-actions {
        gap: 12px;
    }

    .top-actions a {
        font-size: 12px;
    }

}