:root {
    --brand-accent: #4f5ee8;
    --brand-accent-soft: #eef0ff;
    --brand-text: #17204a;
    --brand-muted: #74809d;
    --brand-border: #e5e9f3;
    --brand-surface: #ffffff;
    --brand-page: #f7f8fc;
    --brand-radius: 14px;
}

.brand-catalog, .brand-detail, .brand-editor { color: var(--brand-text); }
.brand-primary-action { padding: 11px 20px; border-radius: 9px; box-shadow: 0 8px 20px rgba(79,94,232,.18); }
.brand-tabs { display:flex; flex-wrap:wrap; align-items:center; gap:4px; width:max-content; max-width:100%; margin-bottom:14px; padding:8px; background:#fff; border:1px solid var(--brand-border); border-radius:13px; }
.brand-tab { display:flex; align-items:center; gap:8px; min-height:42px; padding:9px 16px; border-radius:10px; color:#56617d; font-weight:600; transition:.18s ease; }
.brand-tab:hover { color:var(--brand-accent); background:#f7f8ff; }
.brand-tab.is-active { color:var(--brand-accent); background:var(--brand-accent-soft); box-shadow:inset 0 0 0 1px #d9ddff; }
.brand-tab span { min-width:27px; padding:2px 7px; border-radius:999px; background:#eef1f7; color:#76819a; text-align:center; font-size:12px; }
.brand-tab.is-active span { color:#fff; background:var(--brand-accent); }
.brand-tab--archive { border-left:1px solid var(--brand-border); border-radius:0 10px 10px 0; }
.brand-catalog-panel { background:#fff; border:1px solid var(--brand-border); border-radius:var(--brand-radius); box-shadow:0 9px 28px rgba(31,43,85,.05); overflow:hidden; }
.brand-toolbar { position:relative; z-index:5; display:grid; grid-template-columns:minmax(280px, 1fr) auto; gap:18px; align-items:center; padding:18px; border-bottom:1px solid var(--brand-border); }
.brand-search { position:relative; margin:0; }
.brand-search i { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:#7d87a1; font-size:20px; }
.brand-search input { width:100%; height:46px; padding:0 44px; border:1px solid var(--brand-border); border-radius:10px; color:var(--brand-text); outline:none; font-size:14px; }
.brand-search input:focus { border-color:#aab2ff; box-shadow:0 0 0 3px rgba(79,94,232,.1); }
.brand-search__loader { position:absolute; top:50%; right:15px; width:15px; height:15px; margin-top:-8px; border:2px solid #d9ddf0; border-top-color:var(--brand-accent); border-radius:50%; opacity:0; pointer-events:none; }
.brand-catalog.is-loading .brand-search__loader { opacity:1; animation:brand-spin .65s linear infinite; }
.brand-catalog.is-loading .brand-results-shell { opacity:.48; pointer-events:none; transition:opacity .16s ease; }
.brand-toolbar__actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; min-width:0; }
.brand-sort-control, .brand-filter-control { display:flex; align-items:center; justify-content:space-between; height:46px; border:1px solid var(--brand-border); border-radius:10px; background:#fff; color:#303951; font-size:14px; transition:border-color .16s ease, box-shadow .16s ease, color .16s ease; }
.brand-sort-control:hover, .brand-sort-control:focus, .brand-filter-control:hover, .brand-filter-control:focus { border-color:#c9cee0; color:var(--brand-accent); box-shadow:0 4px 14px rgba(38,49,91,.06); outline:none; }
.brand-sort-control { width:270px; padding:0 15px 0 17px; text-align:left; }
.brand-sort-control > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.brand-sort-control__label { color:#7a849d; font-weight:500; }
.brand-sort-control strong { color:#303951; font-weight:700; }
.brand-sort-control > i { margin-left:14px; color:#363f59; font-size:22px; }
.brand-filter-control { gap:9px; justify-content:center; min-width:126px; padding:0 17px; font-weight:650; }
.brand-filter-control i { font-size:21px; }
.brand-sort-menu { width:270px; margin-top:7px !important; padding:7px; border:1px solid var(--brand-border); border-radius:11px; box-shadow:0 16px 36px rgba(31,43,85,.14); }
.brand-sort-menu .dropdown-item { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 10px; border-radius:7px; color:#4e5871; font-size:13px; font-weight:550; }
.brand-sort-menu .dropdown-item:hover { color:var(--brand-accent); background:#f5f6ff; }
.brand-sort-menu .dropdown-item i { opacity:0; color:var(--brand-accent); font-size:17px; }
.brand-sort-menu .dropdown-item.is-active { color:var(--brand-accent); background:var(--brand-accent-soft); font-weight:700; }
.brand-sort-menu .dropdown-item.is-active i { opacity:1; }
.brand-filter-menu { width:520px; max-width:calc(100vw - 32px); margin-top:7px !important; padding:0; border:1px solid var(--brand-border); border-radius:13px; box-shadow:0 18px 42px rgba(31,43,85,.16); overflow:hidden; }
.brand-filter-menu__header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:17px 18px 14px; border-bottom:1px solid #edf0f6; }
.brand-filter-menu__header strong, .brand-filter-menu__header span { display:block; }
.brand-filter-menu__header strong { color:#263052; font-size:15px; }
.brand-filter-menu__header span { margin-top:2px; color:#8a93a9; font-size:12px; }
.brand-filter-menu__close { display:grid; place-items:center; width:30px; height:30px; padding:0; border:0; border-radius:8px; background:#f4f5f9; color:#6c7690; font-size:20px; }
.brand-filter-menu__grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; padding:17px 18px; }
.brand-filter-menu__grid label { margin:0; min-width:0; }
.brand-filter-menu__grid label > span { display:block; margin:0 0 6px; color:#68738d; font-size:12px; font-weight:650; }
.brand-filter-menu__grid .form-select { width:100%; height:42px; border-color:var(--brand-border); border-radius:9px; color:#44506d; font-size:13px; }
.brand-filter-menu__actions { display:flex; justify-content:flex-end; gap:9px; padding:13px 18px 17px; border-top:1px solid #edf0f6; background:#fafbfe; }
.brand-filter-menu__actions .btn { min-width:112px; height:40px; border-radius:9px; font-size:13px; font-weight:650; }
.brand-view-switch { display:flex; padding:3px; background:#f4f6fb; border-radius:10px; white-space:nowrap; }
.brand-view-switch a { display:flex; align-items:center; gap:7px; min-height:40px; padding:9px 13px; border-radius:8px; color:#66718d; font-size:14px; font-weight:650; }
.brand-view-switch a.is-active { color:var(--brand-accent); background:#fff; box-shadow:0 2px 8px rgba(38,49,91,.1); }
.brand-results-shell { min-height:180px; transition:opacity .16s ease; }
@keyframes brand-spin { to { transform:rotate(360deg); } }
.brand-results-meta { padding:12px 18px 0; color:var(--brand-muted); font-size:13px; }
.brand-grid { display:grid; grid-template-columns:repeat(4, minmax(250px, 1fr)); gap:12px; padding:14px 18px 22px; }
.brand-card { position:relative; display:grid; grid-template-columns:38% 1fr; min-height:170px; padding:38px 16px 16px; border:1px solid var(--brand-border); border-radius:13px; background:#fff; transition:.18s ease; }
.brand-card:hover { transform:translateY(-2px); border-color:#cfd5f2; box-shadow:0 10px 24px rgba(38,49,91,.08); }
.brand-card--special { border-color:#f4d9a1; box-shadow:inset 0 3px 0 #f5b942; }
.brand-card__rank { position:absolute; top:12px; left:12px; display:grid; place-items:center; width:23px; height:23px; border-radius:50%; background:var(--brand-accent); color:#fff; font-size:12px; font-weight:700; }
.brand-special-mark { position:absolute; top:10px; left:44px; display:inline-flex; align-items:center; gap:5px; padding:4px 9px; border:1px solid #ffd88a; border-radius:7px; background:#fffaf0; color:#e89400; font-size:11px; font-weight:700; }
.brand-card__logo { display:flex; align-items:center; justify-content:center; min-width:0; padding:10px; }
.brand-card__logo img { object-fit:cover; width: 100%; height: 100%;}
.brand-card__logo > span, .brand-detail-logo > span { display:grid; place-items:center; width:92px; height:92px; border-radius:18px; background:linear-gradient(135deg,#eef0ff,#f8f9ff); color:var(--brand-accent); font-size:28px; font-weight:700; text-transform:uppercase; }
.brand-card__content { min-width:0; padding-left:10px; }
.brand-card__header { display:flex; justify-content:space-between; gap:8px; }
.brand-card__name { display:block; margin:3px 0 8px; color:#26336f; font-weight:700; line-height:1.25; overflow-wrap:anywhere; }
.brand-category-chip { display:inline-flex; align-items:center; padding:4px 8px; border-radius:6px; background:#f1f3ff; color:var(--chip-color); font-size:11px; font-weight:700; }
.brand-edit-button { flex:0 0 auto; display:grid; place-items:center; width:34px; height:34px; border:1px solid var(--brand-border); border-radius:8px; color:#65718e; }
.brand-edit-button:hover { color:var(--brand-accent); background:var(--brand-accent-soft); }
.brand-card__facts { margin:12px 0 0; font-size:12px; }
.brand-card__facts div { display:flex; gap:6px; margin-top:7px; }
.brand-card__facts dt { color:#7a86a1; font-weight:500; white-space:nowrap; }
.brand-card__facts dd { margin:0; color:#4c5878; font-weight:600; overflow-wrap:anywhere; }
.brand-flag, .country-flag {
    display:inline-block;
    width:22px;
    height:16px;
    margin-right:6px;
    border-radius:2px;
    object-fit:cover;
    box-shadow:0 0 0 1px rgba(15,23,42,.1);
    vertical-align:-.18em;
}
.country-flag--fallback {
    height:auto;
    box-shadow:none;
    font-family:"Twemoji Mozilla", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size:16px;
    line-height:1;
    text-align:center;
}
.brand-state-form { position:absolute; right:15px; bottom:13px; margin:0; }
.brand-switch { position:relative; display:inline-block; width:39px; height:22px; margin:0; cursor:pointer; }
.brand-switch input { opacity:0; width:0; height:0; }
.brand-switch span { position:absolute; inset:0; border-radius:999px; background:#c9cfde; transition:.2s; }
.brand-switch span:before { content:""; position:absolute; width:16px; height:16px; left:3px; top:3px; border-radius:50%; background:#fff; box-shadow:0 2px 5px rgba(0,0,0,.18); transition:.2s; }
.brand-switch input:checked + span { background:var(--brand-accent); }
.brand-switch input:checked + span:before { transform:translateX(17px); }
.brand-empty { padding:70px 20px; text-align:center; color:var(--brand-muted); }
.brand-empty > i { font-size:48px; color:#b8bfd2; }
.brand-empty h4 { margin:12px 0 4px; color:var(--brand-text); }
.brand-table-wrap { margin:14px 18px 22px; overflow:auto; border:1px solid var(--brand-border); border-radius:12px; }
.brand-table { width:100%; min-width:820px; border-collapse:collapse; }
.brand-table th { padding:13px 16px; background:#f8f9fc; color:#7a849e; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; }
.brand-table td { padding:12px 16px; border-top:1px solid var(--brand-border); color:#4d5875; }
.brand-table__identity { display:flex; align-items:center; gap:11px; color:#27346f; }
.brand-table__logo { display:grid; place-items:center; width:54px; height:42px; border-radius:8px; background:#fafbfe; color:var(--brand-accent); font-weight:700; overflow:hidden; }
.brand-table__logo img { width:100%; height:100%; object-fit:contain; }
.brand-special-dot { color:#f5a70b; }
.brand-table .brand-state-form { position:static; }

.brand-form-section { margin-bottom:16px; padding:22px; background:#fff; border:1px solid var(--brand-border); border-radius:var(--brand-radius); }
.brand-form-section__title { display:flex; align-items:flex-start; gap:12px; margin-bottom:18px; }
.brand-form-section__title > i { display:grid; place-items:center; width:38px; height:38px; border-radius:10px; background:var(--brand-accent-soft); color:var(--brand-accent); font-size:21px; }
.brand-form-section__title h4 { margin:0 0 3px; color:var(--brand-text); }
.brand-form-section__title p { margin:0; color:var(--brand-muted); }
.brand-checkbox-field { display:flex; align-items:center; padding-top:26px; }
.brand-region-search { position:relative; display:block; max-width:420px; margin-bottom:12px; }
.brand-region-search i { position:absolute; left:13px; top:50%; transform:translateY(-50%); color:#8590a8; }
.brand-region-search input { width:100%; height:42px; padding:0 14px 0 39px; border:1px solid var(--brand-border); border-radius:9px; }
.brand-region-options { max-height:320px; overflow:auto; padding:12px; border:1px solid var(--brand-border); border-radius:11px; background:#fafbfe; }
.brand-region-options .form-group > div { display:grid; grid-template-columns:repeat(3, minmax(190px,1fr)); gap:8px; }
.brand-region-option { display:flex; align-items:center; gap:8px; margin:0; padding:8px 10px; border-radius:8px; background:#fff; color:#4d5873; font-weight:500; }
.brand-region-option:hover { background:#f0f2ff; }
.brand-form-actions { display:flex; justify-content:flex-end; gap:10px; padding:4px 0 20px; }
.brand-form-actions .btn { min-width:145px; padding:11px 18px; border-radius:9px; }
.brand-form-section .dropzone { min-height:150px; border:1.5px dashed #cbd2e5; border-radius:12px; background:#fafbfe; }

.brand-detail-hero { display:grid; grid-template-columns:1fr minmax(250px, 34%); gap:30px; padding:26px; background:#fff; border:1px solid var(--brand-border); border-radius:var(--brand-radius); }
.brand-detail-labels { display:flex; flex-wrap:wrap; gap:8px; min-height:28px; }
.brand-status { display:inline-flex; align-items:center; padding:5px 11px; border-radius:999px; font-size:12px; font-weight:700; }
.brand-status.is-active { background:#e9fbf1; color:#19a55b; }
.brand-status.is-archived { background:#eef0f4; color:#68738a; }
.brand-special-mark--inline { position:static; }
.brand-detail-title { display:flex; align-items:center; flex-wrap:wrap; gap:14px; margin:14px 0 20px; }
.brand-detail-title h1 { margin:0; color:#14204d; font-size:34px; line-height:1.15; }
.brand-detail-facts { margin:0; max-width:720px; }
.brand-detail-facts > div { display:grid; grid-template-columns:200px 1fr; gap:20px; padding:11px 0; border-bottom:1px dashed #e1e5ef; }
.brand-detail-facts dt { color:#6d7893; font-weight:600; }
.brand-detail-facts dt i { width:22px; color:#62708f; font-size:17px; vertical-align:-2px; }
.brand-detail-facts dd { margin:0; color:#394665; font-weight:600; }
.priority-star { margin-right:7px; }
.brand-detail-logo { display:flex; align-items:center; justify-content:center; padding:20px; border:1px solid var(--brand-border); border-radius:13px; background:#fff; }
.brand-detail-logo img { width:100%; object-fit:cover; }
.brand-detail-assets { display:grid; grid-template-columns:40% 60%; margin-top:16px; background:#fff; border:1px solid var(--brand-border); border-radius:var(--brand-radius); overflow:hidden; }
.brand-manual-block, .brand-objects-block { min-width:0; padding:24px; }
.brand-manual-block { border-right:1px solid var(--brand-border); }
.brand-detail h3 { display:flex; align-items:center; gap:9px; margin:0 0 16px; color:#1e2b58; }
.brand-detail h3 i { color:#5866a2; }
.brand-manual { display:flex; align-items:center; gap:12px; padding:12px; border:1px solid var(--brand-border); border-radius:11px; color:#3a4666; }
.brand-manual:hover { border-color:#bcc4f3; color:var(--brand-accent); }
.brand-manual__icon { display:grid; place-items:center; width:52px; height:52px; border-radius:8px; background:#ef3340; color:#fff; font-size:12px; font-weight:800; }
.brand-manual > span:nth-child(2) { flex:1; min-width:0; }
.brand-manual strong, .brand-manual small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.brand-manual small { margin-top:3px; color:var(--brand-muted); }
.brand-object-gallery { display:grid; grid-template-columns:repeat(5, minmax(80px,1fr)); gap:10px; }
.brand-object-gallery a { display:block; aspect-ratio:1/1; padding:7px; border:1px solid var(--brand-border); border-radius:10px; overflow:hidden; }
.brand-object-gallery img { width:100%; height:100%; object-fit:contain; }
.brand-muted { color:var(--brand-muted); }
.brand-regions-section { margin-top:16px; padding:24px; background:#fff; border:1px solid var(--brand-border); border-radius:var(--brand-radius); }
.brand-regions-section > div:first-child p { margin:-10px 0 18px; color:var(--brand-muted); }
.brand-region-list { display:flex; flex-wrap:wrap; gap:8px; }
.brand-region-list span { display:inline-flex; align-items:center; gap:5px; padding:7px 10px; border-radius:8px; font-size:12px; font-weight:600; }
.brand-region-list .is-available { background:#eef8f3; color:#29815a; }
.brand-region-list .is-unavailable { background:#fff0f0; color:#cf3e49; box-shadow:inset 0 0 0 1px #f4c6ca; }
.brand-comments-section { margin-top:16px; }
.brand-comments-section .card { border:1px solid var(--brand-border); border-radius:var(--brand-radius); box-shadow:none; }

@media (max-width: 1500px) {
    .brand-grid { grid-template-columns:repeat(3, minmax(250px,1fr)); }
}
@media (max-width: 1050px) {
    .brand-toolbar { grid-template-columns:1fr; }
    .brand-toolbar__actions { justify-content:space-between; }
    .brand-grid { grid-template-columns:repeat(2, minmax(250px,1fr)); }
    .brand-detail-hero { grid-template-columns:1fr; }
    .brand-detail-assets { grid-template-columns:1fr; }
    .brand-manual-block { border-right:0; border-bottom:1px solid var(--brand-border); }
    .brand-region-options .form-group > div { grid-template-columns:repeat(2, minmax(180px,1fr)); }
}
@media (max-width: 700px) {
    .brand-tabs { width:100%; flex-wrap:nowrap; overflow-x:auto; }
    .brand-tab { flex:0 0 auto; }
    .brand-toolbar { display:flex; flex-direction:column; align-items:stretch; gap:12px; padding:14px; }
    .brand-toolbar__actions { display:grid; grid-template-columns:1fr auto; gap:8px; }
    .brand-sort-dropdown { min-width:0; }
    .brand-sort-control { width:100%; }
    .brand-filter-control { min-width:112px; }
    .brand-view-switch { grid-column:1 / -1; width:100%; }
    .brand-view-switch a { flex:1; justify-content:center; }
    .brand-filter-menu { position:fixed !important; inset:auto 12px 12px !important; width:auto; max-width:none; transform:none !important; }
    .brand-filter-menu__grid { grid-template-columns:1fr; max-height:48vh; overflow:auto; }
    .brand-grid { grid-template-columns:1fr; padding:12px; }
    .brand-card { grid-template-columns:34% 1fr; }
    .brand-detail-hero, .brand-manual-block, .brand-objects-block, .brand-regions-section { padding:18px; }
    .brand-detail-title h1 { font-size:27px; }
    .brand-detail-facts > div { grid-template-columns:1fr; gap:4px; }
    .brand-object-gallery { grid-template-columns:repeat(3, minmax(75px,1fr)); }
    .brand-region-options .form-group > div { grid-template-columns:1fr; }
}
