:root {

    --brand: #16404a;
    --brand-700: #1f5a66;
    --brand-800: #0e2f37;
    --brand-050: #e4f7f9;
    --brand-100: #b6e9ee;

    --turq: #3fd5df;
    --turq-600: #149aa6;
    --orange: #ef8a2c;
    --orange-600: #d9761a;
    --orange-text: #0d2e34;

    --ink: #16181c;
    --ink-2: #5a626e;
    --ink-3: #6b7280;
    --ink-body: #2a2f37;

    --bg: #eef4f5;
    --surface: #ffffff;
    --surface-2: #f4f8f9;

    --line: #e3e9ea;
    --line-2: #d3dbdc;

    --green: #127a3a;
    --green-700: #0f6c33;
    --red: #e21b35;
    --red-700: #c0182d;
    --amber: #ef8a2c;

    --shadow-sm: 0 1px 2px rgba(20, 28, 46, 0.06);
    --shadow-md: 0 4px 14px rgba(20, 28, 46, 0.09);

    --r-xs: 6px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-pill: 999px;

    --header-h: 64px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "Golos Text", -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: break-word;
}

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

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

p {
    margin: 0;
}

.container {
    width: 100%;
    max-width: 1264px;
    margin: 0 auto;
    padding: 0 16px;
}

.icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

.icon-solid {
    fill: currentColor;
    stroke: none;
}

.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.nowrap { white-space: nowrap; }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 3px;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -48px;
    z-index: 200;
    padding: 10px 16px;
    background: var(--brand);
    color: #fff;
    border-radius: var(--r-sm);
    font-weight: 600;
    transition: top 0.15s;
}
.skip-link:focus { top: 12px; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: var(--header-h);
    padding: 10px 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.04em;
}

.logo-text {
    display: grid;
    line-height: 1.1;
}

.logo-text b {
    font-size: 21px;
    letter-spacing: -0.03em;
    color: var(--brand);
}

.logo-text span {
    font-size: 11px;
    color: var(--ink-3);
}

.header-search {
    flex: 1 1 auto;
    min-width: 0;
}

.search-box {
    display: flex;
    align-items: stretch;
    background: var(--surface);
    border: 1.5px solid var(--line-2);
    border-radius: var(--r-sm);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-050);
}

.search-box input,
.search-box select {
    border: 0;
    background: transparent;
    height: 44px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--ink);
    min-width: 0;
}

.search-box input { flex: 1 1 auto; }
.search-box input:focus,
.search-box select:focus { outline: none; }

.search-box .search-sep {
    width: 1px;
    background: var(--line);
    margin: 8px 0;
}

.search-box select {
    flex: 0 0 auto;
    max-width: 200px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235a626e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.search-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    padding: 0 20px;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s;
}

.search-btn:hover { background: var(--brand-700); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logout-form { display: contents; }

.header-burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-2);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 5px 12px 5px 5px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: var(--surface);
    font-weight: 600;
    font-size: 14px;
    max-width: 200px;
}

.user-chip:hover { background: var(--surface-2); }

.user-chip .avatar-xs,
.user-chip .avatar-xs-empty {
    width: 30px;
    height: 30px;
    border-radius: var(--r-pill);
    object-fit: cover;
}

.avatar-xs-empty {
    display: grid;
    place-items: center;
    background: var(--brand-050);
    color: var(--brand);
    font-weight: 700;
    font-size: 13px;
}

.user-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1.5px solid transparent;
    border-radius: var(--r-sm);
    background: var(--surface-2);
    color: var(--ink);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }

.btn-outline {
    background: var(--surface);
    border-color: var(--line-2);
    color: var(--ink);
}
.btn-outline:hover { border-color: var(--ink-3); background: var(--surface-2); }

.btn-ghost {
    background: transparent;
    color: var(--ink-2);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-700); }

.btn-danger-soft {
    background: #fdecee;
    color: var(--red-700);
}
.btn-danger-soft:hover { background: #fbdde1; }

.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: var(--green-700); }

.btn-accent { background: var(--orange); color: var(--orange-text); }
.btn-accent:hover { background: var(--orange-600); }
.btn-accent .icon { stroke-width: 2.2; }

.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 50px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-icon {
    width: 44px;
    min-height: 44px;
    padding: 0;
}

.main { padding: 24px 0 56px; }

.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 10px; }

.section-title {
    font-size: 22px;
    margin-bottom: 14px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ink-3);
    margin-bottom: 14px;
}
.breadcrumbs a { padding: 4px 0; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs .sep { color: var(--line-2); }

.messages {
    display: grid;
    gap: 10px;
    margin: 16px 0 0;
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--r-sm);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
}
.alert .icon { width: 1.1em; height: 1.1em; }
.alert.success { background: #e9f7ee; border-color: #bfe6cc; color: #14713a; }
.alert.error { background: #fdecee; border-color: #f3c2c8; color: #a31226; }
.alert.info,
.alert.warning,
.alert.debug { background: var(--brand-050); border-color: var(--brand-100); color: var(--brand-800); }

.rubric {
    margin-bottom: 28px;
    padding: 20px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.rubric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 6px;
}

.rubric-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 4px;
    color: var(--ink);
    border-radius: var(--r-xs);
    transition: color 0.15s;
}

.rubric-ico {
    display: inline-flex;
    color: var(--ink-3);
    flex-shrink: 0;
    transition: color 0.15s;
}
.rubric-ico .icon { width: 18px; height: 18px; }

.rubric-item:hover,
.rubric-item:hover .rubric-ico { color: var(--brand); }

.rubric-name {
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.3;
    min-width: 0;
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rubric-count {
    font-size: 12.5px;
    color: var(--ink-3);
    font-variant-numeric: tabular-nums;
}
.rubric-item.is-active .rubric-name { color: var(--brand); font-weight: 600; }
.rubric-item.rubric-all .rubric-name { color: var(--brand); }

.catalog-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.catalog-head h1 {
    font-size: 26px;
}
.catalog-head .count {
    color: var(--ink-3);
    font-size: 14px;
    margin-top: 4px;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.toolbar-label {
    margin-left: 4px;
    font-size: 13px;
    color: var(--ink-3);
}

.select-field {
    height: 42px;
    padding: 0 36px 0 13px;
    border: 1.5px solid var(--line-2);
    border-radius: var(--r-sm);
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235a626e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.select-field:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050); }

.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 18px;
    scrollbar-width: thin;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--r-pill);
    background: var(--surface);
    border: 1px solid var(--line-2);
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 500;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--r-pill);
    background: var(--brand-050);
    color: var(--brand-800);
    font-size: 13px;
    font-weight: 600;
}
.filter-clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border-radius: var(--r-pill);
    border: 1px dashed var(--line-2);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
}
.filter-clear:hover { color: var(--red); border-color: var(--red); }

.listings-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    overflow: hidden;
    transition: box-shadow 0.15s, border-color 0.15s;
}

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

.card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
}
.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-ph {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--ink-3);
    background: repeating-linear-gradient(45deg, #f0f1f4, #f0f1f4 12px, #eceef2 12px, #eceef2 24px);
}
.card-ph .icon { width: 34px; height: 34px; }

.card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    height: 24px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    border-radius: var(--r-xs);
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(2px);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 13px 14px;
    flex: 1 1 auto;
}

.card-price {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}
.card:hover .card-title { color: var(--brand); }

.card-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--ink-3);
    margin-top: auto;
}
.card-meta .icon { width: 14px; height: 14px; }

.card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
    color: var(--ink-3);
}
.card-stats span { display: inline-flex; align-items: center; gap: 4px; }
.card-stats .icon { width: 14px; height: 14px; }
.card-stats .rating { color: var(--ink-2); font-weight: 600; }
.card-stats .rating .icon { color: var(--amber); }

.card-manage {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 8px;
    padding: 0 13px 13px;
}
.card-manage .btn { flex: 1 1 0; }

.empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
    padding: 56px 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}
.empty-ico {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: var(--r-pill);
    background: var(--brand-050);
    color: var(--brand);
    margin-bottom: 4px;
}
.empty-ico .icon { width: 30px; height: 30px; }
.empty h2 { font-size: 19px; }
.empty p { color: var(--ink-2); max-width: 420px; }

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 28px;
}
.page-link,
.page-current,
.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: 14px;
}
.page-link {
    background: var(--surface);
    border: 1px solid var(--line-2);
    color: var(--ink);
}
.page-link:hover { border-color: var(--brand); color: var(--brand); }
.page-current {
    background: var(--brand);
    color: #fff;
}
.page-dots { color: var(--ink-3); }

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 22px;
}
.panel + .panel { margin-top: 16px; }
.panel-title {
    font-size: 18px;
    margin-bottom: 14px;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}
.panel-head h2 { font-size: 18px; }
.link {
    color: var(--brand);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.link:hover { color: var(--brand-700); }

.detail-head { margin-bottom: 16px; }
.detail-head h1 { font-size: 28px; margin-bottom: 8px; }
.detail-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--ink-3);
    font-size: 13px;
}
.detail-sub span { display: inline-flex; align-items: center; gap: 5px; }
.detail-sub .icon { width: 15px; height: 15px; }

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}
.detail-main { min-width: 0; display: grid; gap: 16px; }
.detail-side { display: grid; gap: 16px; }
.detail-sticky { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 16px; }

.detail-photo {
    aspect-ratio: 4 / 3;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--line);
}
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.detail-photo .card-ph { border-radius: 0; }

.detail-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink-body);
    white-space: pre-line;
}

.specs { display: grid; gap: 0; }
.spec-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.spec-row:last-child { border-bottom: 0; }
.spec-row dt { color: var(--ink-3); }
.spec-row dd { margin: 0; font-weight: 500; }

.buy-box .price {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    margin-bottom: 14px;
}
.buy-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -4px 0 14px;
    font-size: 14px;
}
.buy-rating b { font-weight: 700; }
.buy-actions { display: grid; gap: 9px; margin-bottom: 16px; }
.phone-reveal {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    text-align: center;
    padding: 8px;
    font-variant-numeric: tabular-nums;
}
.facts { display: grid; gap: 0; }
.fact {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}
.fact:last-child { border-bottom: 0; }
.fact dt { color: var(--ink-3); }
.fact dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

.seller {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: center;
}
.seller-avatar,
.seller-avatar-empty {
    width: 56px;
    height: 56px;
    border-radius: var(--r-pill);
    object-fit: cover;
}
.seller-avatar-empty {
    display: grid;
    place-items: center;
    background: var(--brand-050);
    color: var(--brand);
    font-size: 22px;
    font-weight: 700;
}
.seller-name { font-size: 16px; font-weight: 700; }
.seller-role {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--ink-2);
}
.seller-stats {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    padding-top: 12px;
    margin-top: 2px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--ink-2);
}
.seller-stats b { display: block; font-size: 17px; color: var(--ink); }

.review {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}
.review:first-child { padding-top: 0; }
.review:last-child { border-bottom: 0; padding-bottom: 0; }
.review-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.review-ava {
    width: 38px; height: 38px; border-radius: var(--r-pill);
    display: grid; place-items: center;
    background: var(--brand-050); color: var(--brand);
    font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.review-who { font-weight: 600; font-size: 14px; }
.review-date { font-size: 12px; color: var(--ink-3); }
.stars { display: inline-flex; gap: 1px; color: var(--amber); }
.stars .icon { width: 15px; height: 15px; }
.stars .off { color: var(--line-2); }
.review-text { font-size: 14px; line-height: 1.6; color: var(--ink-body); white-space: pre-line; }
.review-meta { flex: 1 1 auto; min-width: 0; }
img.review-ava { padding: 0; object-fit: cover; }
.review-actions { display: flex; gap: 8px; margin-top: 10px; }

.form-wrap { max-width: 640px; margin: 0 auto; }
.form-wide { max-width: 760px; }

.form-head { margin-bottom: 20px; }
.form-head h1 { font-size: 24px; margin-bottom: 6px; }
.form-head p { color: var(--ink-2); }

.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > label {
    font-size: 14px;
    font-weight: 600;
}
.field .req { color: var(--red); }

.form-control {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1.5px solid var(--line-2);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font-size: 16px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control::placeholder { color: var(--ink-3); }
.form-control:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-050);
}
textarea.form-control { min-height: 130px; resize: vertical; line-height: 1.5; }
select.form-control {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235a626e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
    cursor: pointer;
}
input[type="file"].form-control {
    padding: 9px 13px;
    font-size: 14px;
    color: var(--ink-2);
}

.field-hint { font-size: 13px; color: var(--ink-3); }
.field-error { font-size: 13px; color: var(--red-700); font-weight: 500; }
.field.has-error .form-control { border-color: var(--red); }
.field.has-error .form-control:focus { box-shadow: 0 0 0 3px rgba(226, 27, 53, 0.12); }

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.form-foot {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 14px;
    color: var(--ink-2);
    text-align: center;
}
.form-foot a { color: var(--brand); font-weight: 600; }
.linklike {
    border: 0;
    background: none;
    padding: 0;
    color: var(--brand);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}
.linklike:hover { color: var(--brand-700); }

.pw-rules {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
    gap: 6px;
}
.pw-rules li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-3);
}
.pw-rules li::before {
    content: "";
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    border: 1.5px solid var(--line-2);
    border-radius: 50%;
}
.pw-rules li.is-ok {
    color: var(--ink-2);
}
.pw-rules li.is-ok::before {
    border-color: var(--green);
    background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.rate {
    position: relative;
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 2px;
}
.rate input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.rate label {
    cursor: pointer;
    color: var(--line-2);
    line-height: 0;
    transition: color 0.12s;
}
.rate label .icon { width: 32px; height: 32px; }
.rate label:hover,
.rate label:hover ~ label,
.rate input:checked ~ label { color: var(--amber); }
.rate input:focus-visible + label {
    outline: 2px solid var(--brand);
    outline-offset: 3px;
    border-radius: 4px;
}

.cover-pick {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 10px;
    margin: 10px 0 12px;
}
.cover-tile {
    position: relative;
    aspect-ratio: 4 / 3;
    border: 2px solid var(--line-2);
    border-radius: var(--r-sm);
    overflow: hidden;
    cursor: pointer;
    background: var(--surface-2);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.cover-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-tile:hover { border-color: var(--ink-3); }
.cover-tile.is-selected { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050); }
.cover-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}
.cover-upload .icon { width: 24px; height: 24px; color: var(--brand); }
.cover-current { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.cover-current[hidden] { display: none; }
.cover-current img {
    width: 132px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
}

.account {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.account-card { text-align: center; }
.account-avatar,
.account-avatar-empty {
    width: 104px;
    height: 104px;
    border-radius: var(--r-pill);
    object-fit: cover;
    margin: 0 auto 14px;
}
.account-avatar-empty {
    display: grid;
    place-items: center;
    background: var(--brand-050);
    color: var(--brand);
    font-size: 38px;
    font-weight: 700;
}

.avatar-edit {
    position: relative;
    width: 104px;
    height: 104px;
    margin: 0 auto 12px;
    border-radius: var(--r-pill);
}
.avatar-edit .account-avatar,
.avatar-edit .account-avatar-empty {
    width: 100%;
    height: 100%;
    margin: 0;
}
.avatar-edit__btn {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: var(--r-pill);
    cursor: pointer;
}
.avatar-edit__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: var(--r-pill);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.15s;
}
.avatar-edit__overlay .icon { width: 22px; height: 22px; }
.avatar-edit__btn:hover .avatar-edit__overlay,
.avatar-edit__btn:focus-visible .avatar-edit__overlay { opacity: 1; }
.avatar-edit__badge {
    position: absolute;
    right: 2px;
    bottom: 2px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: var(--r-pill);
    background: var(--brand);
    color: #fff;
    border: 2px solid var(--surface);
    transition: opacity 0.15s;
}
.avatar-edit__badge .icon { width: 15px; height: 15px; }
.avatar-edit__btn:hover .avatar-edit__badge { opacity: 0; }
.avatar-remove-form { margin: -4px 0 12px; }
.avatar-remove {
    border: 0;
    background: none;
    color: var(--ink-3);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 2px 6px;
}
.avatar-remove:hover { color: var(--red); }

.account-card h1 { font-size: 21px; margin-bottom: 6px; }
.account-contacts {
    display: grid;
    gap: 7px;
    margin: 16px 0;
    text-align: left;
    font-size: 14px;
    color: var(--ink-2);
}
.account-contacts div { display: flex; align-items: center; gap: 9px; }
.account-contacts .icon { color: var(--ink-3); width: 17px; height: 17px; }
.account-about {
    text-align: left;
    font-size: 14px;
    color: var(--ink-2);
    line-height: 1.6;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.account-actions { display: grid; gap: 9px; margin-top: 16px; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    padding: 0 11px;
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 600;
}
.badge .icon { width: 14px; height: 14px; }
.badge-brand { background: var(--brand-050); color: var(--brand-800); }
.badge-green { background: #e9f7ee; color: var(--green-700); }
.badge-amber { background: #fff3e0; color: #b06a00; }
.badge-gray { background: var(--surface-2); color: var(--ink-2); }
.badge-red { background: #fdecee; color: var(--red-700); }

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.stat {
    padding: 16px;
    background: var(--surface-2);
    border-radius: var(--r-md);
}
.stat b { display: block; font-size: 26px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--ink-3); }

.mini-list { display: grid; }
.mini-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}
.mini-item:last-child { border-bottom: 0; }
.mini-item:first-child { padding-top: 0; }
.mini-item > :first-child { min-width: 0; }
.mini-item > a, .mini-item > form { flex-shrink: 0; }
.mini-item b { font-size: 15px; font-weight: 600; }
.mini-item .sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; }

.admin-stats { grid-template-columns: repeat(6, 1fr); }

.mode-panel { margin-bottom: 16px; }
.mode-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.mode-head .panel-title { margin-bottom: 4px; }
.mode-head p { max-width: 640px; }
.mode-switch { display: inline-flex; gap: 8px; flex-shrink: 0; }

.charts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 16px 0;
}
.chart-box { position: relative; height: 240px; }

.promote-form {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    max-width: 520px;
}
.promote-form .form-control { flex: 1 1 auto; min-width: 0; }
.promote-form .btn { flex: 0 0 auto; }

.mod-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}
.mod-item:first-child { padding-top: 0; }
.mod-item:last-child { border-bottom: 0; padding-bottom: 0; }
.mod-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.mod-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mod-actions form { display: contents; }

.confirm { max-width: 520px; margin: 24px auto 0; text-align: center; }
.confirm-ico {
    display: grid; place-items: center;
    width: 60px; height: 60px; margin: 0 auto 16px;
    border-radius: var(--r-pill);
    background: #fdecee; color: var(--red);
}
.confirm-ico .icon { width: 28px; height: 28px; }
.confirm h1 { font-size: 21px; margin-bottom: 8px; }
.confirm p { color: var(--ink-2); margin-bottom: 20px; }
.confirm .form-actions { justify-content: center; }

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 32px 0;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { color: var(--ink-3); font-size: 14px; max-width: 320px; line-height: 1.6; }
.footer-col h4 { font-size: 14px; margin-bottom: 12px; }
.footer-col a, .footer-col span {
    display: block;
    color: var(--ink-2);
    font-size: 14px;
    padding: 8px 0;
}
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--ink-3);
    font-size: 13px;
}

body { display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1 0 auto; }

.modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal[hidden] { display: none; }
.modal__scrim {
    position: absolute;
    inset: 0;
    background: rgba(15, 20, 28, 0.55);
}
.modal__card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border-radius: var(--r-lg);
    padding: 22px;
    box-shadow: 0 20px 50px rgba(15, 20, 28, 0.3);
}
.modal__title { font-size: 19px; margin-bottom: 6px; }
.modal__hint { font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }
.modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.cropper {
    position: relative;
    width: max-content;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--r-sm);
    background: var(--surface-2);
    line-height: 0;
    touch-action: none;
}
.cropper img {
    display: block;
    max-width: 100%;
    max-height: 52vh;
    width: auto;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}
.crop-box {
    position: absolute;
    border: 2px solid #fff;
    border-radius: var(--r-pill);
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    cursor: move;
    touch-action: none;
}
.crop-size {
    display: block;
    width: 100%;
    margin-top: 16px;
    accent-color: var(--brand);
    cursor: pointer;
}

@media (max-width: 1100px) {
    .rubric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .listings-grid { grid-template-columns: repeat(3, 1fr); }
    .detail-layout { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 900px) {
    .header-search { order: 3; flex-basis: 100%; }
    .header-inner { flex-wrap: wrap; }
    .header-burger { display: inline-flex; }
    .header-actions[data-menu] {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 12px 16px 16px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
        display: none;
    }
    .header-actions[data-menu].is-open { display: flex; }
    .header-actions .btn,
    .header-actions .user-chip { width: 100%; max-width: none; justify-content: center; }
    .site-header { position: relative; }
    .detail-sticky { position: static; }
    .detail-layout { grid-template-columns: 1fr; }
    .account { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .spec-row { grid-template-columns: 150px 1fr; }
}

@media (max-width: 640px) {
    .rubric { padding: 16px; }
    .rubric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
    .rubric-name { white-space: normal; }
    .listings-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .card-body { padding: 10px; }
    .card-price { font-size: 17px; }
    .catalog-head h1 { font-size: 22px; }
    .detail-head h1 { font-size: 23px; }
    .buy-box .price { font-size: 27px; }
    .stat-row { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .search-box select { display: none; }
    .panel { padding: 16px; }
    .spec-row { grid-template-columns: 1fr; gap: 2px; padding: 8px 0; }
}

@media (max-width: 900px) {
    .charts-grid { grid-template-columns: minmax(0, 1fr); }
    .admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .promote-form { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
