.tool-main { padding: 32px 20px 48px; min-height: calc(100vh - 140px); }
.tool-container { max-width: 640px; margin: 0 auto; }
.tool-container.wide { max-width: 960px; }
.tool-hero { text-align: center; margin-bottom: 28px; }
.tool-hero h2 { font-size: 1.55rem; margin-bottom: 8px; }
.tool-hero p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; }

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    margin-bottom: 20px;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.form-group input, .form-group select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }

.action-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, #0ea5e9, #3b82f6); color: #fff; }

.result-box {
    margin-top: 18px;
    padding: 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg);
}
.result-box.good { border-color: #22c55e; background: rgba(34,197,94,.08); }
.result-box.ok { border-color: #3b82f6; background: rgba(59,130,246,.08); }
.result-box.warn { border-color: #f59e0b; background: rgba(245,158,11,.1); }
.result-box.bad { border-color: #ef4444; background: rgba(239,68,68,.1); }
.res-main { font-size: 2rem; font-weight: 800; }
.res-main small { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.res-status { font-size: 1.1rem; font-weight: 700; margin: 8px 0; }
.res-ref { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.res-advice { font-size: 0.92rem; line-height: 1.7; margin: 0; }

.tool-note {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.tool-note.warn { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.06); }

.tuning-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.tune-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px 16px;
}
.tune-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tune-icon { font-size: 1.5rem; }
.tune-level {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(139,92,246,.15);
    color: #c084fc;
}
.tune-card h3 { font-size: 1rem; margin-bottom: 8px; }
.tune-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; margin: 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-card); margin-bottom: 16px; }
.cons-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.cons-table th, .cons-table td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--border); }
.cons-table th { background: rgba(15,23,42,.6); color: var(--text-muted); font-weight: 600; }
.cons-table tr:last-child td { border-bottom: none; }
.cons-table .km { white-space: nowrap; color: #93c5fd; font-weight: 600; }

.card-fuel:hover { border-color: #0ea5e9; }
.card-fuel .card-btn { background: rgba(14,165,233,.15); color: #38bdf8; }
.card-fuel:hover .card-btn { background: #0ea5e9; color: #0f172a; }

.card-tuning:hover { border-color: #f43f5e; }
.card-tuning .card-btn { background: rgba(244,63,94,.15); color: #fb7185; }
.card-tuning:hover .card-btn { background: #f43f5e; color: #fff; }

.card-consumables:hover { border-color: #14b8a6; }
.card-consumables .card-btn { background: rgba(20,184,166,.15); color: #2dd4bf; }
.card-consumables:hover .card-btn { background: #14b8a6; color: #0f172a; }
.tune-image-wrap {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: #0f172a;
    aspect-ratio: 10 / 7;
}
.tune-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tune-summary {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0 0 10px;
}
.tune-more-btn {
    width: 100%;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(139,92,246,.12);
    color: #c4b5fd;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.tune-more-btn:hover { background: rgba(139,92,246,.25); }
.tune-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.75;
}
.tune-details p { margin: 0 0 10px; }
.tune-details h4 {
    color: var(--text);
    font-size: 0.9rem;
    margin: 0 0 6px;
}
.tune-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}
.tune-cols ul {
    margin: 0;
    padding-right: 18px;
}
.tune-cols li { margin-bottom: 4px; }
.tune-card.open {
    border-color: rgba(167,139,250,.5);
}
@media (max-width: 560px) {
    .tune-cols { grid-template-columns: 1fr; }
}
.tuning-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
}
