/* VTRACK v2 — 3-колоночный layout */

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

:root {
    --bg: #f5f6f8;
    --white: #ffffff;
    --border: #e1e4e8;
    --text: #24292f;
    --text-secondary: #57606a;
    --text-muted: #8b949e;
    --accent: #0969da;
    --accent-light: #ddf4ff;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
}

.app {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    grid-template-rows: 52px 1fr 28px;
    height: 100vh;
}

/* HEADER */
.header {
    grid-column: 1 / -1;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-credit {
    font-size: 11px;
    color: var(--text-muted);
}

.header-credit a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.header-credit a:hover {
    text-decoration: underline;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
}

.logo:hover {
    opacity: 0.8;
}

.logo span { 
    color: var(--accent); 
}

/* ЛЕВАЯ КОЛОНКА */
.nav-panel {
    background: var(--white);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 16px;
}

.hint-block {
    margin-bottom: 24px;
}

.hint-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.hint-text {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.hint-block-highlight {
    padding: 12px;
    background: var(--accent-light);
    border-radius: 6px;
}

.hint-title-highlight {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent);
}

.hint-list {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ЦЕНТРАЛЬНАЯ КОЛОНКА */
.main-content {
    background: var(--bg);
    overflow-y: auto;
    padding: 32px;
}

/* Поисковая секция */
.search-section {
    max-width: 100%;
    margin-bottom: 32px;
}

.search-header {
    text-align: center;
    margin-bottom: 24px;
}

.search-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.search-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.search-box-large {
    position: relative;
    max-width: 700px;
    margin: 0 auto 12px;
}

.search-box-large input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    font-family: 'JetBrains Mono', monospace;
}

.search-box-large input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(9,105,218,0.2);
}

.search-box-large::before {
    content: "🔍";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.search-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.search-hint strong {
    color: var(--text-secondary);
}

.search-hint a {
    color: var(--accent);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
}

.search-hint a:hover {
    text-decoration: underline;
}

/* Разделитель */
.divider {
    text-align: center;
    margin: 32px 0 24px;
    position: relative;
}

.divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--border);
}

.divider span {
    background: var(--bg);
    padding: 0 16px;
    color: var(--text-muted);
    font-size: 12px;
    position: relative;
}

/* Таблица производителей */
.brands-table {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 50px 180px 1fr 100px 100px 100px;
    padding: 10px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.table-row {
    display: grid;
    grid-template-columns: 50px 180px 1fr 100px 100px 100px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    color: inherit;
}

.table-row:hover {
    background: var(--bg);
}

.table-row:last-child {
    border-bottom: none;
}

.brand-icon {
    font-size: 9px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    width: 40px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    transition: all 0.15s;
    color: #475569;
    letter-spacing: 0px;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.table-row:hover .brand-icon {
    border-color: var(--accent);
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--accent);
    transform: scale(1.05);
}

.brand-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 2px;
}

.brand-country {
    font-size: 10px;
    color: var(--text-muted);
}

.brand-types {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.vehicle-type-icon {
    width: 28px;
    height: 28px;
    display: inline-block;
    transition: all 0.15s;
    cursor: help;
    vertical-align: middle;
}

.vehicle-type-icon:hover {
    transform: scale(1.2);
    filter: brightness(1.1);
}

.stat-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.stat-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ПРАВАЯ КОЛОНКА */
.info-panel {
    background: var(--white);
    border-left: 1px solid var(--border);
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.info-section {
    margin-bottom: 24px;
}

.info-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-large {
    background: var(--bg);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 26px;
    font-weight: 600;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.stat-label-large {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.recent-item {
    padding: 10px 12px;
    background: var(--bg);
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 12px;
}

.recent-code {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 2px;
}

.recent-name {
    color: var(--text-secondary);
}

/* FOOTER */
.statusbar {
    grid-column: 1 / -1;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}


/* Навигационные секции с селектами */
.nav-section {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.select-box {
    padding: 7px 12px 7px 9px;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 0 4px 4px 0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    width: 100%;
}

.select-box::after {
    content: '›';
    font-size: 18px;
    color: var(--accent);
    font-weight: 400;
    line-height: 1;
}

.select-box:hover {
    background: #f0f9ff;
    border-left-width: 4px;
    color: var(--text);
}

.select-box.selected {
    background: #f0f9ff;
    color: var(--text);
    border-left-width: 4px;
}

.select-box option {
    padding: 12px;
    font-size: 14px;
}
