/* ===== ServerScope — Redesign v2 ===== */

.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }

:root {
    --bg: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #eaeaee;
    --bg-row: #ffffff;
    --bg-row-hover: #fef7f5;
    --bg-row-alt: #fafafa;
    --text: #1d1d1f;
    --text-secondary: #555;
    --text-muted: #999;
    --border: #e0e0e0;
    --border-light: #eee;
    --accent: #c23a00;
    --accent-hover: #a03000;
    --accent-soft: #fff3ee;
    --accent-border: #f5c6b0;
    --price-color: #c23a00;
    --price-old: #999;
    --green: #2ea043;
    --green-bg: #ecfdf5;
    --nav-bg: #1d1d1f;
    --nav-text: #f5f5f7;
    --nav-text-muted: #999;
    --sidebar-bg: #ffffff;
    --badge-bg: #f0f0f2;
    --badge-text: #666;
    --input-bg: #fff;
    --input-border: #ddd;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 2px 12px rgba(194,58,0,0.12);
    --radius: 8px;
    --radius-sm: 6px;
    --row-height: 88px;
}

[data-theme="dark"] {
    --bg: #404040;
    --bg-secondary: #333333;
    --bg-tertiary: #484848;
    --bg-row: #404040;
    --bg-row-hover: #4a433d;
    --bg-row-alt: #434343;
    --text: #e8e8e8;
    --text-secondary: #aaa;
    --text-muted: #888;
    --border: #555;
    --border-light: #525252;
    --accent: #d4703c;
    --accent-hover: #e88550;
    --accent-soft: #3d3229;
    --accent-border: #5c4433;
    --price-color: #e88550;
    --price-old: #888;
    --green: #6dca7e;
    --green-bg: #2a3a2e;
    --nav-bg: #2c2c2c;
    --nav-text: #e8e8e8;
    --nav-text-muted: #888;
    --sidebar-bg: #333333;
    --badge-bg: #4a4a4a;
    --badge-text: #aaa;
    --input-bg: #2e2e2e;
    --input-border: #4a4a4a;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.25);
    --shadow-hover: 0 2px 12px rgba(224,74,16,0.15);
}

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

body {
    background: var(--bg-secondary);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Dark Navigation Bar ===== */
.site-nav {
    background: var(--nav-bg);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-inner {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-weight: 800;
    font-size: 18px;
    color: var(--nav-text);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    letter-spacing: -0.03em;
}

.nav-brand:hover { text-decoration: none; color: var(--nav-text); }
.nav-brand .brand-accent { color: var(--accent); }
.nav-brand svg { color: var(--nav-text); }

.nav-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    background: transparent;
    border: 1px solid #444;
    border-radius: var(--radius-sm);
    color: var(--nav-text-muted);
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}

.nav-btn:hover { border-color: var(--accent); color: var(--nav-text); }

.nav-select {
    background: transparent;
    border: 1px solid #444;
    border-radius: var(--radius-sm);
    color: var(--nav-text-muted);
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.nav-select option { background: var(--nav-bg); color: var(--nav-text); }
.nav-select:focus { outline: none; border-color: var(--accent); }

/* ===== Page Layout ===== */
.layout {
    max-width: 1480px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* ===== Sidebar Filters ===== */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    align-self: flex-start;
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow-sm);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.f-section {
    border-bottom: 1px solid var(--border-light);
}

.f-section:last-of-type { border-bottom: none; }

.f-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.f-section-header.f-toggle {
    cursor: pointer;
    user-select: none;
}
.f-section-header.f-toggle:hover { color: var(--text); }

.f-chevron {
    width: 12px;
    height: 12px;
    margin-left: auto;
    flex-shrink: 0;
    opacity: 0.4;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.f-section-header.is-open .f-chevron { transform: rotate(180deg); opacity: 0.7; }

.f-collapse-hint {
    margin-left: auto;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}
.f-collapse-hint + .f-chevron { margin-left: 4px; }

.f-section-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.5;
}

.f-section-body {
    padding: 2px 0 16px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.f-chip {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    transition: all 0.15s;
    line-height: 1;
    font-family: inherit;
}

.f-chip:hover { border-color: var(--accent); color: var(--accent); }
.f-chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

.f-range-vals {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.f-range-val {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.f-range-input {
    background: transparent;
    border: none;
    border-bottom: 1px dashed var(--border);
    font: inherit;
    font-weight: 600;
    color: var(--text);
    padding: 1px 4px;
    text-align: center;
    outline: none !important;
    border-radius: 4px 4px 0 0;
    min-width: 2ch;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.f-range-input:focus {
    background: var(--bg-secondary);
    border-bottom-color: var(--text-muted);
    border-bottom-style: solid;
}

.f-range-unit {
    color: var(--text-muted);
    pointer-events: none;
    white-space: nowrap;
}

.f-range-slider {
    position: relative;
    height: 24px;
}

.f-range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--bg-tertiary);
    border-radius: 2px;
    transform: translateY(-50%);
}

.f-range-fill {
    position: absolute;
    top: 50%;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    transform: translateY(-50%);
    pointer-events: none;
}

.f-range-slider input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
    padding: 0;
}

.f-range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    cursor: pointer;
    pointer-events: all;
}

.f-range-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    cursor: pointer;
    pointer-events: all;
}

.f-checkboxes {
    display: flex;
    gap: 14px;
    margin-top: 12px;
}

.f-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.f-check-box {
    width: 16px;
    height: 16px;
    border: 2px solid var(--input-border);
    border-radius: 3px;
    flex-shrink: 0;
    transition: all 0.15s;
    position: relative;
}

.f-check-box.on {
    background: var(--accent);
    border-color: var(--accent);
}

.f-check-box.on::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.f-select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 6px 10px;
    font-size: 13px;
    font-family: inherit;
    height: 34px;
    transition: border-color 0.15s;
}

.f-select:focus { outline: none; border-color: var(--accent); }

.f-search-input { cursor: text; }

.f-mobile-search-header { display: none; }
.f-dropdown-scroll { }

.f-mobile-back {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
}

.f-mobile-search-input {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 10px 12px;
    font-size: 16px;
    font-family: inherit;
}

.f-selected-value {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-sm);
    padding: 0 10px;
    font-size: 13px;
    color: var(--text);
    height: 34px;
}

.f-clear-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}

.f-clear-btn:hover { color: var(--text); }

.f-dropdown-list {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.f-dropdown-item {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s;
}

.f-dropdown-item:hover { background: var(--accent-soft); }
.f-dropdown-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

.f-dropdown-list::-webkit-scrollbar { width: 4px; }
.f-dropdown-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.f-dropdown-empty {
    padding: 12px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.f-provider-icon {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    object-fit: contain;
    flex-shrink: 0;
}

.f-input-wrap {
    position: relative;
}

.f-input-count {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 1px 7px;
    pointer-events: none;
}

.f-provider-count {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    align-items: center;
}

.active-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-border);
}

.active-chip-x {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.active-chip-x:hover { opacity: 1; }

.f-reset {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.15s;
    font-family: inherit;
}

.f-reset:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* ===== Main Content ===== */
.main-content { flex: 1; min-width: 0; }

/* ===== Disclaimer ===== */
.catalog-disclaimer {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    margin-bottom: 10px;
    line-height: 1.4;
}

/* ===== Toolbar ===== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 12px;
}

.toolbar-count {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
}

.toolbar-count strong {
    color: var(--text);
    font-weight: 800;
    font-size: 18px;
}


.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-sort {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

/* ===== Column Header ===== */
.col-header {
    display: grid;
    grid-template-columns: minmax(160px, 1.2fr) 1fr 80px 120px 100px;
    padding: 0 20px 10px;
    gap: 12px;
    align-items: center;
}

.col-header-item {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}

.col-header-item:hover { color: var(--accent); }
.col-header-item.sorted { color: var(--accent); }
.col-header-item .sort-arrow { font-size: 9px; }
.col-header-item:last-child { justify-content: flex-end; }

/* ===== Server Row ===== */
.server-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.server-row {
    display: grid;
    grid-template-columns: minmax(160px, 1.2fr) 1fr 80px 120px 100px;
    align-items: center;
    padding: 0 20px;
    min-height: var(--row-height);
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 12px;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
}

.server-row:last-child { border-bottom: none; }
.server-row:nth-child(even) { background: var(--bg-row-alt); }
.server-row:hover { background: var(--bg-row-hover); box-shadow: inset 3px 0 0 var(--accent); }

/* Location cell — flags only */
.cell-location {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}
.loc-extra {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 4px;
    padding: 1px 5px;
    line-height: 1.4;
    white-space: nowrap;
}

/* Provider cell */
.cell-provider {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.provider-link { cursor: pointer; transition: color 0.15s; }
.provider-link:hover { color: var(--accent); }

/* Specs cell (combined CPU / RAM / Disk + Network) */
.cell-specs { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.specs-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 1.5; }
.spec-net { color: var(--text-muted); font-weight: 500; }
.spec-item { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.spec-icon { width: 14px; height: 14px; color: var(--text-muted); flex-shrink: 0; }
.spec-gpu { color: #10b981; }

/* Price cell */
.cell-price { text-align: right; }
.price-amount { font-weight: 800; font-size: 22px; color: var(--price-color); line-height: 1; }
.price-period { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.price-per-core { font-size: 11px; color: var(--text-muted); font-weight: 400; }

/* Action cell */
.cell-action { text-align: right; }

.btn-configure {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-configure:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }

/* Badge */
.badge-type {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    line-height: 1;
    vertical-align: middle;
}

.badge-vps { background: #e0f2fe; color: #0369a1; }
.badge-dedicated { background: #fef3c7; color: #92400e; }
.badge-gpu { background: #d1fae5; color: #065f46; }

/* ===== Mobile Cards ===== */
.tariff-cards { display: none; }

.tariff-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tariff-card:hover { border-color: var(--accent-border); box-shadow: var(--shadow-md); }

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-provider {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-provider img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    background: var(--bg-secondary);
    padding: 2px;
}

.card-provider-fallback {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
}

.card-provider-name { font-weight: 700; font-size: 15px; }
.card-plan-name { font-size: 12px; color: var(--text-muted); }

.card-price-top {
    text-align: right;
}

.card-specs {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 12px;
}

.card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-location {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fi.fis { box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.card-location .fi { font-size: 20px; border-radius: 3px; }
.card-go-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}

.card-go-btn:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.pg-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.pg-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.pg-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pg-btn.current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ===== Empty / Loading ===== */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 16px;
}

.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.skeleton-container { display: flex; flex-direction: column; gap: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.skeleton-row {
    height: var(--row-height);
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Mobile Filters ===== */
.mobile-filter-btn {
    display: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.mobile-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    background: var(--bg);
    padding: 0;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    visibility: hidden;
}

.mobile-sheet.show {
    transform: translateX(0);
    visibility: visible;
}

.mobile-sheet .filter-panel {
    padding: 0 16px 16px;
}

.mobile-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 2;
}

.mobile-sheet-title { font-weight: 700; font-size: 16px; }

.mobile-sheet-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 22px;
    padding: 4px;
    line-height: 1;
}

/* Provider icon in rows */
img.provider-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
}

.provider-icon-fallback {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    flex-shrink: 0;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .col-header { grid-template-columns: minmax(140px, 1.2fr) 1fr 70px 110px; }
    .server-row { grid-template-columns: minmax(140px, 1.2fr) 1fr 70px 110px; }
    .cell-action { display: none; }
    .col-header .cell-action-hdr { display: none; }
}

@media (max-width: 900px) {
    .sidebar { display: none; }
    .mobile-filter-btn { display: flex; }
    .server-list { display: none; }
    .col-header { display: none; }
    .tariff-cards { display: flex; flex-direction: column; gap: 10px; }
    .layout { padding: 12px; }
    .toolbar-sort { font-size: 12px; padding: 6px 8px; max-width: 130px; }

    .f-dropdown-list {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        max-height: none;
        z-index: 80;
        border-radius: 0;
        margin-top: 0;
        padding-top: 0;
        background: var(--bg);
        display: flex;
        flex-direction: column;
    }

    .f-mobile-search-header {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        border-bottom: 1px solid var(--border);
        background: var(--bg);
        flex-shrink: 0;
    }

    .f-mobile-back { display: flex; }

    .f-dropdown-scroll {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .f-dropdown-list .f-dropdown-item {
        padding: 12px 16px;
        font-size: 15px;
        border-bottom: 1px solid var(--border-light);
    }
}

@media (max-width: 640px) {
    .layout { padding: 8px; gap: 8px; }
    .nav-inner { padding: 0 12px; }
    .card-specs { gap: 2px; }
}

.scroll-top {
    position: fixed; bottom: 72px; right: 16px; z-index: 900;
    width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg-secondary);
    color: var(--text); font-size: 20px; line-height: 1;
    cursor: pointer; opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .2s;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { background: var(--bg-tertiary); transform: translateY(-2px); }


/* ===== Animations ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes chipIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

.server-list { animation: fadeUp 0.35s ease both; }
.tariff-cards { animation: fadeUp 0.35s ease both; }
.skeleton-container { animation: fadeUp 0.25s ease both; }

.active-chip { animation: chipIn 0.2s ease both; }

.f-collapse-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
}
.f-collapse-wrap.is-open { grid-template-rows: 1fr; }
.f-collapse-wrap > .f-section-body { overflow: hidden; padding: 0; }
.f-collapse-wrap > .f-section-body > .f-section-inner { padding: 2px 0 16px; }

.f-chip { transition: all 0.15s ease; }
.f-chip:active { transform: scale(0.95); }

.pg-btn { transition: all 0.15s ease; }
.pg-btn:active:not(:disabled) { transform: scale(0.92); }

.btn-configure { transition: background 0.15s ease, transform 0.15s ease; }
.btn-configure:active { transform: scale(0.95); }

.card-go-btn { transition: background 0.15s ease, transform 0.15s ease; }
.card-go-btn:active { transform: scale(0.95); }

.f-dropdown-enter { transition: opacity 0.2s ease, transform 0.2s ease; }
.f-dropdown-enter-start { opacity: 0; transform: translateY(-6px); }
.f-dropdown-enter-end { opacity: 1; transform: translateY(0); }
.f-dropdown-leave { transition: opacity 0.15s ease, transform 0.15s ease; }

.site-nav { transition: background-color 0.3s ease; }
.sidebar { transition: background-color 0.3s ease, border-color 0.3s ease; }
.server-list { transition: background-color 0.3s ease, border-color 0.3s ease; }
.tariff-card { transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease; }

/* ===== Focus ===== */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.nav-btn:focus-visible,
.nav-select:focus-visible { outline-color: var(--accent); outline-offset: 1px; }
.f-chip:focus-visible { outline-offset: 1px; }
.pg-btn:focus-visible { outline-offset: 1px; }
.server-row:focus-visible { outline-offset: -2px; }
