.settings-shell { width: min(100%, 1380px); margin: 0 auto; padding: 36px clamp(18px, 3vw, 46px) 64px; }
.settings-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.settings-intro h1 { margin: 0; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.045em; }
.settings-intro p:last-child { max-width: 760px; margin: 12px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.65; }
.settings-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.settings-badges span { border: 1px solid var(--border); border-radius: 999px; padding: 6px 10px; color: var(--text-soft); background: rgba(20, 29, 48, .72); font-size: 9px; font-weight: 750; }
.settings-badges .is-secure { color: var(--success); border-color: rgba(86, 214, 154, .3); }
.settings-badges .is-warning { color: var(--warning); border-color: rgba(247, 198, 107, .3); }
.settings-alert { margin: 0 0 12px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; color: var(--text-soft); background: rgba(14, 21, 37, .9); font-size: 10px; line-height: 1.5; }
.settings-alert.is-warning { border-color: rgba(247, 198, 107, .35); background: rgba(91, 67, 25, .18); }
.settings-alert.is-error { color: #ffc0c7; border-color: rgba(255, 124, 139, .48); background: rgba(119, 38, 50, .2); }
.settings-alert code, .settings-footer code { color: var(--primary-strong); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.settings-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: rgba(14, 21, 37, .9); box-shadow: 0 22px 60px rgba(0, 0, 0, .2); }
.settings-card-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 18px; border-bottom: 1px solid var(--border); }
.settings-card-head h2 { margin: 0; }
.settings-button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; color: var(--text-soft); background: var(--surface); font-size: 10px; font-weight: 800; }
.settings-button:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); background: var(--surface-raised); transform: translateY(-1px); }
.settings-button svg { width: 15px; height: 15px; }
.settings-button.is-primary { color: #090d18; border-color: var(--primary-strong); background: var(--primary-strong); }
.settings-button.is-primary:hover:not(:disabled) { color: #090d18; background: #c8caff; }
.settings-button.is-ghost { background: transparent; }
.option-table-head, .option-row { display: grid; grid-template-columns: 62px minmax(125px, .75fr) minmax(160px, 1fr) minmax(210px, 1.15fr) minmax(170px, .95fr) 112px; align-items: center; gap: 9px; }
.option-table-head { padding: 9px 18px; border-bottom: 1px solid var(--border); color: var(--muted); background: #0a111f; font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.option-list { display: grid; }
.option-row { min-width: 0; padding: 11px 18px; border-bottom: 1px solid var(--border); background: rgba(11, 18, 32, .72); }
.option-row:last-child { border-bottom: 0; }
.option-order { display: flex; align-items: center; gap: 5px; }
.option-index { min-width: 18px; color: var(--primary-strong); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 800; }
.order-buttons { display: grid; gap: 3px; }
.mini-button { width: 22px; height: 18px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 5px; padding: 0; color: var(--muted); background: var(--surface); font-size: 8px; }
.mini-button:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); }
.option-row label { min-width: 0; }
.option-row label > span { display: none; }
.option-row input { height: 36px; font-family: inherit; }
.option-row .option-id, .option-row .option-url, .option-row .option-token-env { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.option-token-wrap { position: relative; }
.token-state { position: absolute; top: -6px; right: 6px; border-radius: 999px; padding: 2px 5px; color: var(--success); background: #15362c; font-size: 7px; font-weight: 800; pointer-events: none; }
.remove-button { width: 100%; color: #ffabb5; border-color: rgba(255, 124, 139, .28); background: rgba(119, 38, 50, .15); }
.remove-button:hover:not(:disabled) { color: #ffd7dc; border-color: rgba(255, 124, 139, .55); background: rgba(119, 38, 50, .28); }
.empty-options { padding: 34px 18px; color: var(--muted); text-align: center; font-size: 11px; }
.settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 18px; border-top: 1px solid var(--border); background: #0a111f; }
.settings-footer > div:first-child { display: grid; gap: 4px; }
.settings-footer strong { color: var(--text-soft); font-size: 10px; }
.settings-footer span { color: var(--muted); font-size: 9px; line-height: 1.45; }
.settings-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.settings-toast { position: fixed; right: 24px; bottom: 24px; max-width: min(420px, calc(100vw - 32px)); padding: 11px 14px; border: 1px solid rgba(86, 214, 154, .42); border-radius: 10px; color: #bdf7dc; background: #12352c; box-shadow: 0 16px 44px rgba(0, 0, 0, .36); font-size: 10px; font-weight: 700; }
.settings-toast.is-error { color: #ffc0c7; border-color: rgba(255, 124, 139, .48); background: #43212a; }

@media (max-width: 980px) {
    .option-table-head { display: none; }
    .option-list { gap: 10px; padding: 12px; }
    .option-row { grid-template-columns: 64px 1fr 1fr; gap: 11px; border: 1px solid var(--border); border-radius: 11px; padding: 12px; }
    .option-row label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 8px; font-weight: 750; }
    .option-order { grid-row: span 2; align-self: stretch; border-right: 1px solid var(--border); }
    .option-actions { align-self: end; }
}

@media (max-width: 680px) {
    .settings-shell { padding: 25px 14px 44px; }
    .settings-intro { display: block; }
    .settings-badges { justify-content: flex-start; margin-top: 15px; }
    .settings-card-head, .settings-footer { align-items: stretch; flex-direction: column; }
    .settings-card-head .settings-button { width: 100%; }
    .option-row { grid-template-columns: 48px 1fr; }
    .option-order { grid-row: span 5; }
    .settings-actions { width: 100%; }
    .settings-actions .settings-button { flex: 1; }
}
