/* Вынесено из order.txt (style) 1:1 + небольшие дополнения для печати */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
    overflow-x: hidden;
}

/* ===== LOADING / SKELETON ===== */
.loading-wrap{
    margin: 18px 0 10px;
}
.loading-card{
    background:#fff;
    border:1px solid #eef2f6;
    border-radius: 28px;
    padding: 18px;
    box-shadow: 0 25px 45px -30px rgba(37,99,235,0.25);
}
.loading-title{
    font-weight: 800;
    font-size: 18px;
    color:#0f172a;
    display:flex;
    align-items:center;
    gap:10px;
}
.loading-sub{
    margin-top: 8px;
    color:#64748b;
    font-weight: 600;
}
.loading-actions{
    margin-top: 14px;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}
.loading-err{
    margin-top: 12px;
    background:#fee2e2;
    border:1px solid #fecaca;
    color:#b91c1c;
    border-radius: 18px;
    padding: 10px 12px;
    font-weight: 700;
}
.skeleton-grid{
    margin-top: 14px;
    display:grid;
    grid-template-columns: 1fr;
    gap: 10px;
}
.sk{
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: sk 1.25s ease-in-out infinite;
    border-radius: 14px;
}
.sk-line{ height: 14px; }
.sk-card{ height: 88px; }
@keyframes sk{
    0%{ background-position: 0% 0; }
    100%{ background-position: -200% 0; }
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== КНОПКИ ===== */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 40px;
    font-size: 15px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 8px 16px -6px #2563eb80;
}
.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-outline {
    border: 1.5px solid #e2e8f0;
    background: white;
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}
.btn-outline:hover {
    border-color: #2563eb;
    color: #2563eb;
}

/* ===== ХЕДЕР ===== */
header {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eef2f6;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
}
.logo {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.header-search {
    background: white;
    border-radius: 60px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    width: 300px;
}
.header-search i {
    color: #94a3b8;
    margin-right: 8px;
}
.header-search input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 15px;
}
.profile {
    display: flex;
    align-items: center;
    gap: 20px;
}
.avatar {
    width: 42px;
    height: 42px;
    border-radius: 42px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}
.mobile-menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
}
#menu-toggle {
    display: none;
}
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    padding: 20px;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid #eef2f6;
}
#menu-toggle:checked ~ .mobile-menu {
    display: flex;
}

/* ===== ОСНОВНОЙ БЛОК ===== */
.report-header {
    margin: 30px 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}
.report-title {
    font-size: 32px;
    font-weight: 700;
}
.report-title span {
    color: #475569;
    font-size: 18px;
    font-weight: 400;
}
.report-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Карточка с основными данными */
.vehicle-card {
    background: white;
    border-radius: 40px;
    padding: 30px;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.05);
    border: 1px solid #f0f4fe;
    margin-bottom: 30px;
}
.vehicle-main {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}
.vehicle-image {
    width: 240px;
    height: 160px;
    background: #e2e8f0;
    border-radius: 32px;
    object-fit: cover;
}
.vehicle-info {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.info-item {
    border-bottom: 1px solid #eef2f6;
    padding-bottom: 8px;
}
.info-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 4px;
}
.info-value {
    font-weight: 700;
    font-size: 18px;
}
.risk-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 60px;
    font-weight: 600;
    font-size: 14px;
}
.risk-low {
    background: #dcfce7;
    color: #166534;
}
.risk-medium {
    background: #fef9c3;
    color: #854d0e;
}
.risk-high {
    background: #fee2e2;
    color: #b91c1c;
}

/* Графики и индикаторы */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}
.chart-card {
    background: white;
    border-radius: 32px;
    padding: 20px;
    border: 1px solid #f0f4fe;
}
.chart-card h3 {
    margin-bottom: 16px;
    font-size: 18px;
}
canvas {
    max-height: 160px;
    width: 100% !important;
}

/* Секции отчёта */
.report-section {
    background: white;
    border-radius: 36px;
    padding: 28px;
    border: 1px solid #f0f4fe;
    margin-bottom: 30px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.section-header h2 {
    font-size: 24px;
    font-weight: 700;
}
.section-header i {
    color: #2563eb;
    margin-right: 8px;
}

.accident-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eef2f6;
    flex-wrap: wrap;
}
.accident-item:last-child {
    border-bottom: none;
}
.accident-date {
    min-width: 120px;
    font-weight: 600;
}
.accident-desc {
    flex: 1;
}
.accident-desc p {
    color: #334155;
}
.accident-tag {
    background: #fee2e2;
    color: #b91c1c;
    padding: 4px 16px;
    border-radius: 60px;
    font-weight: 600;
}
.legal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.legal-item {
    display: flex;
    gap: 16px;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding: 16px 0;
}
.legal-icon {
    width: 48px;
    height: 48px;
    background: #e0eaff;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 22px;
}
.legal-text h4 {
    font-weight: 600;
}
.legal-text p {
    color: #475569;
}

.owner-list {
    list-style: none;
}
.owner-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #eef2f6;
}

.base-status {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}
.base-item {
    background: #f8fafc;
    border-radius: 40px;
    padding: 8px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.base-item i {
    color: #2563eb;
}

/* Тарифы и рекомендации */
.recommend-card {
    background: #f1f5f9;
    border-radius: 32px;
    padding: 24px;
    margin-top: 20px;
}

/* Нижняя навигация для мобильных */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
    border-top: 1px solid #eef2f6;
    padding: 8px 4px;
    z-index: 1100;
    justify-content: space-around;
    align-items: center;
    backdrop-filter: blur(10px);
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    text-decoration: none;
    flex: 1;
}
.bottom-nav-item i {
    font-size: 22px;
}
.bottom-nav-item.active {
    color: #2563eb;
}

/* Адаптация */
@media screen and (max-width: 900px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
    .legal-grid {
        grid-template-columns: 1fr;
    }
    .vehicle-main {
        flex-direction: column;
    }
    .vehicle-image {
        width: 100%;
        height: 200px;
    }
    .header-search {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    .bottom-nav {
        display: flex;
    }
    body {
        padding-bottom: 70px;
    }
    .profile span {
        display: none;
    }
    .report-header {
        flex-direction: column;
        align-items: start;
        gap: 16px;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    .vehicle-info {
        grid-template-columns: 1fr;
    }
    .report-title {
        font-size: 26px;
    }
}

/* Дополнение: принт/PDF через печать браузера */
@media print {
    header, .bottom-nav, .report-actions { display: none !important; }
    body { background: white; }
    .report-section, .vehicle-card, .chart-card {
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }
}

