/* static/css/style.css */

/* ЭТОТ ФАЙЛ - ОБЩИЙ ДИЗАЙН КОД СТРАНИЦ  */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
    background: #DDF0F8;
    color: #000000;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.card {
    background: #FFFFFF;
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #000000;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #B8FD9B;
    display: inline-block;
    color: #000000;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 500;
    color: #000000;
    word-break: break-all;
}

.accident-card {
    background: #FFFFFF;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.2s;
}

.accident-card:hover {
    border-color: #B8FD9B;
}

.accident-header {
    padding: 20px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.accident-header:hover {
    background: #DDF0F8;
}

.accident-title-section {
    flex: 1;
}

.accident-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000000;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.accident-badge {
    background: #B8FD9B;
    color: #000000;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}

.accident-summary {
    font-size: 0.85rem;
    color: #555;
    margin-top: 6px;
}

.toggle-icon {
    font-size: 1.3rem;
    transition: transform 0.2s;
    color: #000000;
    background: #DDF0F8;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toggle-icon.open {
    transform: rotate(180deg);
    background: #B8FD9B;
}

.accident-details {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #FFFFFF;
    border-top: 1px solid transparent;
}

.accident-details.open {
    padding: 20px 24px;
    max-height: 3000px;
    border-top-color: #e0e0e0;
}

.event {
    margin-bottom: 24px;
    padding: 16px;
    background: #DDF0F8;
    border-radius: 16px;
}

.event:last-child {
    margin-bottom: 0;
}

.event-title {
    font-weight: 700;
    font-size: 1rem;
    color: #000000;
    margin-bottom: 4px;
}

.event-date {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 10px;
}

.details {
    margin-top: 8px;
    margin-left: 12px;
    font-size: 0.9rem;
    color: #333;
}

.repair {
    background: #FFFFFF;
    border-left: 4px solid #B8FD9B;
    padding: 16px;
    border-radius: 12px;
    margin-top: 12px;
}

.repair-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.85rem;
}

.repair-table th {
    text-align: left;
    padding: 8px;
    background: #DDF0F8;
    font-weight: 600;
}

.repair-table td {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.repair-cost {
    font-weight: 700;
    color: #000000;
}

details summary {
    cursor: pointer;
    font-weight: 600;
    margin-top: 12px;
    padding: 8px;
    background: #DDF0F8;
    border-radius: 8px;
    color: #000000;
}

details[open] summary {
    background: #B8FD9B;
}

.works-list {
    margin-left: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.works-list li {
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.btn-back {
    display: inline-block;
    background: #000000;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    margin-right: 12px;
    transition: all 0.2s;
}

.btn-back:hover {
    background: #333333;
    transform: translateY(-2px);
}

.btn-secondary {
    display: inline-block;
    background: #B8FD9B;
    color: #000000;
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #a0e080;
    transform: translateY(-2px);
}

.actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    .card {
        padding: 20px;
    }
    .accident-header {
        padding: 16px;
    }
    .accident-title {
        font-size: 1rem;
    }
    h1 {
        font-size: 1.8rem;
    }
}



/* СХЕМА ПОВРЕЖДЕНИЙ */
/* Блок схемы повреждений */
.damage-section {
    margin-top: 20px;
    text-align: center;
}

.damage-schema-container {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.damage-schema-img {
    width: 250px;
    height: auto;
    border-radius: 12px;
    border: 1px solid #ddd;
}

.damage-legend {
    margin-top: 8px;
    font-size: 0.8rem;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 4px;
}

.legend-yellow {
    background-color: #f1c40f;
    border: 1px solid #333;
}

.legend-red {
    background-color: #e74c3c;
    border: 1px solid #333;
    margin-left: 12px;
}

/* Точки и тултипы */
.damage-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #333;
    box-shadow: 0 0 0 2px white;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.damage-dot:hover {
    transform: scale(1.5);
    box-shadow: 0 0 0 2px white, 0 0 0 4px rgba(0,0,0,0.3);
}

.damage-tooltip {
    position: absolute;
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    z-index: 20;
    transition: opacity 0.2s;
    opacity: 0;
    font-family: system-ui, -apple-system, sans-serif;
}

.damage-dot:hover + .damage-tooltip,
.damage-tooltip:hover {
    opacity: 1;
}

.legend-blue {
    background-color: #2196f3;
    border: 1px solid #333;
    margin-left: 12px;
}







