/* Profile, redesigned: tabs with icons, badges instead of sentences, skill rows on one grid,
   trader and station cards with their level at a glance, settings as a two-column board.
   Loaded after companion.css and layout.css, so these win without !important. */

/* Tabs: one segmented bar. */
.profile-tabs{display:inline-flex;gap:4px;padding:4px;margin:0 0 18px;border:1px solid var(--border);border-radius:10px;background:#0f150f}
.profile-tabs button{display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border:0;border-radius:7px;background:transparent;color:var(--muted);font-size:13px}
.profile-tabs button:hover{color:var(--text);background:#ffffff08}
.profile-tabs [aria-selected="true"]{background:#2b3826;color:var(--accent);font-weight:600;box-shadow:inset 0 0 0 1px #526345}
.tab-icon{font-size:13px;opacity:.85}

/* Cards on this page share one look: a quiet header line and even padding. */
#profilePage .companion-card{border-radius:12px;padding:22px 24px}
#profilePage .card-heading{align-items:flex-start;gap:14px;margin-bottom:12px}
#profilePage .card-heading h2{margin:2px 0 0;font-size:19px}
#profilePage .companion-card>.hint{margin:0 0 14px}

/* Character */
.character-card h2{margin:6px 0 10px}
#profileSummary{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 18px}
.profile-badge{padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600;background:#ffffff0f;color:var(--text)}
.profile-badge.level{background:#2b3826;color:var(--accent)}
.profile-badge.faction.usec{background:#1f2c3d;color:#9cc2f0}
.profile-badge.faction.bear{background:#3a2120;color:#f0a39c}
.profile-badge.muted{color:var(--muted);font-weight:400}
#profileForm{display:grid;gap:12px}
#profileForm>label,#profileForm .form-pair>label{display:grid;gap:6px;font-size:12px;color:var(--muted)}
#profileForm input,#profileForm select{width:100%}
#profileForm>button{justify-self:start;margin-top:4px}

/* Skills: name · bar · value · ✕ on one grid, every input in the same column. */
#profileSkills{max-height:440px;padding-right:6px}
.skill-row{display:grid!important;grid-template-columns:minmax(110px,190px) minmax(40px,1fr) 78px 30px;align-items:center;gap:12px;padding:7px 0}
.skill-row label{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.skill-row input{width:100%;max-width:none!important;padding:6px 8px;text-align:right;font-variant-numeric:tabular-nums}
.skill-bar{height:5px;border-radius:3px;background:#ffffff12;overflow:hidden}
.skill-bar>span{display:block;height:100%;border-radius:3px;background:linear-gradient(90deg,#7c965e,var(--accent))}
.skill-remove{display:inline-grid;place-items:center;width:28px;height:28px;padding:0;border-radius:50%;font-size:12px;color:var(--muted);background:#1b241b}
.skill-remove:hover{color:#f2a19b;border-color:#7a3a35}
#addSkill{display:grid;grid-template-columns:minmax(0,1fr) 110px auto;gap:10px;align-items:end;margin-top:14px;padding-top:14px;border-top:1px solid var(--border)}

/* tarkov.dev snapshot */
.public-player-summary{display:grid;gap:4px;padding:14px 16px;border:1px solid var(--border);border-radius:10px;background:#121912}
.public-player-summary h3{margin:0}
.public-player-summary>p{margin:0}
#profilePage .public-player-details{border-top:0;border-bottom:1px solid var(--border);padding:11px 2px}

/* Traders: the loyalty badge beside the name, inputs stacked evenly. */
#profilePage .profile-traders{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
#profilePage .trader-setting{display:grid;gap:10px;padding:14px;border-radius:10px;background:#121912}
#profilePage .trader-setting-title{margin:0}
#profilePage .trader-setting-title img{width:44px;height:44px;border-radius:8px;object-fit:cover;border:1px solid var(--border)}
.trader-setting-title strong{flex:1;min-width:0;font-size:14px}
.trader-setting-ll{padding:3px 9px;border-radius:999px;font-size:11px;font-weight:700;background:#c2dc91;color:#142012}
.trader-setting-ll.locked{background:#3a3f37;color:#c9cdc2}
#profilePage .trader-setting label{display:grid;gap:5px;font-size:11px;color:var(--muted)}
#profilePage .trader-setting small{font-size:10.5px}

/* Hideout: pips under the name show the level at a glance. */
#profilePage .hideout-stations{grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}
#profilePage .hideout-station{display:grid;gap:8px;align-content:start;border-radius:10px;background:#121912}
#profilePage .hideout-station strong{margin:0}
.hideout-pips{display:flex;gap:4px}
.hideout-pips>span{flex:1;max-width:28px;height:5px;border-radius:3px;background:#ffffff14}
.hideout-pips>span.on{background:var(--accent)}
#profilePage .hideout-station select{margin:0!important}
#profilePage .hideout-station small.hideout-max{justify-self:start}
#profilePage .hideout-upgrades{margin:16px 0 0}

@media(max-width:900px){.skill-row{grid-template-columns:minmax(0,1fr) 70px 30px}.skill-bar{display:none}#addSkill{grid-template-columns:1fr}}

/* Settings: one column of sections, each a list of rows - what a setting is on the left, its
   control on the right - with switches instead of bare checkboxes. */
.settings-board:not([hidden]){display:grid;gap:18px;max-width:880px}
.settings-section{padding:6px 22px 10px;border:1px solid var(--border);border-radius:12px;background:var(--panel)}
.settings-section>h2{margin:16px 0 4px;font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--accent)}
.settings-rows{display:grid}
.companion-page .settings-row,.friends-dock .settings-row{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:14px 0;border-top:1px solid var(--border);margin:0;cursor:default}
.settings-rows>.settings-row:first-child{border-top:0}
.settings-words{display:grid;gap:3px;min-width:0}
.settings-words strong{font-size:14px;font-weight:600;color:var(--text)}
.settings-words small{font-size:12px;line-height:1.45;color:var(--muted)}
.settings-row>select,.settings-row>input[type=number]{flex:0 0 200px;width:200px}
.settings-row>button{flex:none}
.companion-page .settings-row-block{display:grid;justify-content:stretch;gap:12px}
.settings-actions{display:flex;align-items:center;justify-content:flex-end;gap:16px;padding:14px 0 6px;border-top:1px solid var(--border)}
.settings-actions .hint{margin:0 auto 0 0}
/* Beats `.companion-page input` (full width) and any checkbox margin rule. */
.companion-page input.switch,.friends-dock input.switch{width:42px;max-width:42px;appearance:none;-webkit-appearance:none;flex:none;position:relative;width:42px;height:24px;margin:0;padding:0;border-radius:999px;border:1px solid #4a5a40;background:#2a3227;cursor:pointer;transition:background .15s}
input.switch::before{content:'';position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#a8b3a0;transition:transform .15s,background .15s}
input.switch:checked{background:#7c965e;border-color:#9fbf6a}
input.switch:checked::before{transform:translateX(18px);background:#eef6da}
input.switch:disabled{opacity:.45;cursor:not-allowed}
input.switch:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.trader-chips{display:flex;flex-wrap:wrap;gap:8px}
.trader-chips label{display:inline-flex!important;align-items:center;gap:7px;margin:0!important;padding:6px 12px;border:1px solid var(--border);border-radius:999px;background:#121912;font-size:12px;color:var(--text);cursor:pointer}
.trader-chips label:has(input:checked){border-color:#7c965e;background:#2b3826;color:var(--accent)}
.trader-chips input{width:14px;height:14px;margin:0;accent-color:#9fbf6a}
#profileSharingSettings .gs-notice{margin:0 0 10px}
.friends-dock .settings-row{padding:10px 0;gap:12px}
.friends-dock .settings-words small{font-size:11px}
@media(max-width:700px){.companion-page .settings-row{flex-wrap:wrap}.settings-row>select,.settings-row>input[type=number]{flex-basis:100%;width:100%}}

/* A friend's profile window. */
.friend-profile{width:min(860px,94vw);max-height:88vh;padding:0;border:1px solid #7c965e;border-radius:14px;background:#151d14;color:var(--text);overflow:auto}
.friend-profile::backdrop{background:#000b}
.friend-profile-head{display:flex;align-items:center;gap:16px;padding:20px 22px 14px;background:linear-gradient(180deg,#26341f,#151d14)}
.friend-profile-head h2{margin:0;font-size:22px}
.friend-profile-head p{margin:2px 0 0}
.friend-profile-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.friend-avatar.large{width:56px;height:56px;font-size:24px}
.friend-profile-close{margin-left:auto;align-self:flex-start}
.friend-profile-tabs{margin:0 22px 4px}
.friend-profile-tabs button:disabled{opacity:.4;cursor:not-allowed}
.friend-profile-note{margin:8px 22px 0}
.friend-profile-body{padding:10px 22px 22px}
.friend-profile-body h3{margin:18px 0 10px;font-size:12px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.friend-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.friend-stat{display:grid;gap:2px;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:#121912}
.friend-stat strong{font-size:20px;color:var(--accent);font-variant-numeric:tabular-nums}
.friend-stat small{font-size:11px;color:var(--muted)}
.friend-skill-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));column-gap:24px}
.friend-skill-list .skill-row{grid-template-columns:minmax(110px,160px) minmax(40px,1fr) 44px}
.friend-skill-value{text-align:right;font-size:12px;font-variant-numeric:tabular-nums;color:var(--text)}
.friend-achievements{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px}
.friend-achievements>div{display:grid;gap:2px;padding:9px 11px;border:1px solid var(--border);border-radius:8px;background:#121912;font-size:12px}
.friend-task-list{display:grid;gap:8px;margin-top:14px}
.friend-task{display:grid;gap:3px;padding:10px 12px;border-left:3px solid #85b5f6;border-radius:6px;background:#121912}
.friend-task .linkish{justify-self:start;padding:0;border:0;background:none;color:var(--text);font-weight:600;text-align:left}
.friend-task .linkish:hover{color:var(--accent)}
.friend-trader-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.friend-trader{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:#121912}
.friend-trader img{width:40px;height:40px;border-radius:8px;object-fit:cover}
.friend-trader>div{display:grid;flex:1;min-width:0}
.friend-hideout-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}
.friend-station{display:grid;gap:7px;padding:11px 12px;border:1px solid var(--border);border-radius:10px;background:#121912}
.friend-station strong{font-size:13px}
/* Older rules for these ids (style.css, layout.css) set grids and widths; the settings rows win here. */
#profilePanel-settings .settings-row{display:flex}
#profilePanel-settings .settings-row-block{display:grid}
#profilePanel-settings .settings-words{flex:1}
#profilePanel-settings #traderSettings{display:flex;flex-wrap:wrap;gap:8px;margin:0}
#profileSharingSettings .gs-notice:empty{display:none}
#profilePanel-settings .management-setting{max-width:none;margin:0}
#profileSharingSettings>.gs-notice{margin:0}
#profileSharingSettings>.gs-notice:not(:empty){margin:4px 0 12px}
.friend-profile .friend-profile-tabs{grid-template-columns:repeat(4,1fr)}
