:root{
    --bg:#f6f8fd;
    --panel:#ffffff;
    --border:#eef2fb;
    --border-strong:#d8e1f0;
    --text:#26344d;
    --muted:#7a8599;
    --primary:#4a8cff;
    --primary-soft:#edf4ff;
}

*{box-sizing:border-box;}

body.settings-page{
    margin:0;
    font-family:"Inter", Arial, sans-serif;
    background:var(--bg);
    color:var(--text);
}

a{
    color:inherit;
    text-decoration:none;
}

.settings-topbar{
    position:sticky;
    top:0;
    z-index:20;
    display:grid;
    grid-template-columns:1fr minmax(320px, 420px) auto;
    align-items:center;
    gap:20px;
    padding:14px 84px;
    background:#fff;
    border-bottom:1px solid #edf1f8;
}

.topbar-title{
    display:flex;
    align-items:center;
    gap:16px;
    min-width:0;
}

.title-icon{
    width:46px;
    height:46px;
    border-radius:14px;
    border:1px solid #ffd8d8;
    color:#ff6b6b;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    background:#fff;
}

.topbar-title h1{
    margin:0 0 4px;
    font-size:18px;
    font-weight:700;
}

.topbar-title p{
    margin:0;
    font-size:13px;
    color:var(--muted);
}

.topbar-search{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:40px;
    padding:0 14px;
    border:2px solid #9bc0ff;
    border-radius:12px;
    background:#fff;
    box-shadow:0 0 0 4px rgba(74,140,255,.08);
}

.topbar-search i{
    color:#6ea3ff;
    font-size:14px;
}

.topbar-search input{
    width:100%;
    border:none;
    outline:none;
    background:transparent;
    color:var(--text);
    font-size:14px;
}

.topbar-close{
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:32px;
    padding:0 12px;
    border-radius:8px;
    background:#f7f1f7;
    color:#59657a;
    font-size:14px;
    font-weight:500;
}

.topbar-close i{
    color:#ff6b91;
    font-size:13px;
}

.settings-main{
    max-width:1280px;
    margin:0 auto;
    padding:18px 24px 34px;
}

.settings-section{
    background:rgba(255,255,255,.72);
    border:1px solid #f1f4fb;
    border-radius:24px;
    padding:26px 16px 22px;
    box-shadow:0 10px 34px rgba(110,130,180,.07);
}

.settings-section + .settings-section{
    margin-top:0;
}

.settings-section h2{
    margin:0 14px 22px;
    font-size:17px;
    font-weight:500;
    color:#31415d;
}

.settings-column-grid{
    display:grid;
    gap:18px;
}

.settings-column-grid--five{
    grid-template-columns:repeat(5, minmax(0, 1fr));
}

.settings-column-grid--two{
    grid-template-columns:repeat(2, minmax(0, 1fr));
}

.settings-lower-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:22px;
    margin-top:22px;
}

.settings-support-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
    margin-top:22px;
}

.support-card{
    display:flex;
    align-items:center;
    gap:16px;
    padding:18px 20px;
    border-radius:18px;
    border:1px solid var(--border);
    background:#fff;
    box-shadow:0 8px 24px rgba(136,153,188,.06);
}

.support-card--primary{
    background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}

.support-card--secondary{
    background:linear-gradient(180deg,#fffdfa 0%,#fff6eb 100%);
}

.support-card__icon{
    width:44px;
    height:44px;
    border-radius:14px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
    font-size:18px;
    color:#4a8cff;
    background:#edf4ff;
}

.support-card--secondary .support-card__icon{
    background:#fff0db;
    color:#ff9838;
}

.support-card__content{
    display:flex;
    flex-direction:column;
    gap:4px;
    min-width:0;
}

.support-card__content strong{
    font-size:16px;
    color:#2b3a55;
}

.support-card__content small{
    font-size:13px;
    line-height:1.55;
    color:var(--muted);
}

.support-card__arrow{
    margin-left:auto;
    color:#8ca0bf;
    font-size:16px;
}

.settings-group-card{
    min-height:300px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    padding:0 0 10px;
    overflow:hidden;
    box-shadow:0 8px 24px rgba(136,153,188,.06);
}

.group-chip{
    display:flex;
    align-items:center;
    gap:10px;
    min-height:40px;
    padding:0 18px;
    font-size:14px;
    font-weight:600;
    border-bottom:1px solid rgba(0,0,0,.02);
}

.group-chip i{
    font-size:13px;
}

.chip-green{background:#effcf5;color:#2c9e6d;}
.chip-blue{background:#eef5ff;color:#5a8ef2;}
.chip-amber{background:#fff6eb;color:#ff9a3d;}
.chip-mint{background:#effbf5;color:#47b78d;}
.chip-sky{background:#eef5ff;color:#5f95ff;}
.chip-rose{background:#fff1f1;color:#ff7474;}

.group-links{
    display:flex;
    flex-direction:column;
    padding:8px 0;
}

.group-links a{
    display:block;
    padding:10px 20px;
    font-size:15px;
    color:#33415d;
    line-height:1.35;
}

.group-links a:hover{
    background:#f8fbff;
    color:#2563eb;
}

.sub-group-card{
    margin:8px 0 0;
    border-top:1px solid #f4f6fb;
}

@media (max-width: 1240px){
    .settings-topbar{
        padding:14px 28px;
        grid-template-columns:1fr;
    }

    .topbar-search{
        max-width:420px;
        width:100%;
    }

    .topbar-close{
        justify-self:start;
    }

    .settings-column-grid--five{
        grid-template-columns:repeat(3, minmax(0, 1fr));
    }

    .settings-lower-grid{
        grid-template-columns:1fr;
    }

    .settings-support-row{
        grid-template-columns:1fr;
    }
}

@media (max-width: 900px){
    .settings-main{
        padding:16px 14px 28px;
    }

    .settings-column-grid--five,
    .settings-column-grid--two{
        grid-template-columns:1fr;
    }

    .settings-group-card{
        min-height:auto;
    }
}
