/* static/style.css — минимализм с акцентом на фуксию */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: #f9f7fc;
    padding: 24px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    color: #1e1a2b;
}

.dashboard {
    max-width: 1400px;
    width: 100%;
}

/* Шапка */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.date-badge {
    background: white;
    padding: 10px 22px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(190, 130, 255, 0.05);
    border: 1px solid #f0e4ff;
    color: #2b1b3a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-badge::before {
    content: "📅";
    font-size: 1.2rem;
}

.update-time {
    background: #f5edff;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #a259ff;
    border: 1px solid #e4d0ff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.update-time::before {
    content: "⏱️";
    font-size: 1rem;
}

/* Двухпанельная сетка */
.two-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

/* Общие стили карточек */
.panel-card {
    background: white;
    border-radius: 28px;
    padding: 26px;
    box-shadow: 0 12px 30px rgba(180, 130, 255, 0.08);
    border: 1px solid #f1e4ff;
    transition: all 0.2s ease;
}

.panel-title {
    font-size: 1.4rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2c1c42;
}

.panel-title span {
    background: #f7eeff;
    padding: 4px 14px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #c454ff;
    border: 1px solid #edd0ff;
}

/* Левая панель — список офисов */
.office-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.office-item {
    border-bottom: 1px solid #f3e9ff;
    padding-bottom: 16px;
}

.office-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.office-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.toggle {
    color: #ff66b5;
    font-weight: 700;
    font-size: 1.2rem;
    width: 22px;
    cursor: default;
}

.office-name {
    font-weight: 650;
    font-size: 1.1rem;
    color: #321f4a;
}

.office-count {
    background: #f7eaff;
    padding: 2px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ff4da6;
    margin-left: 6px;
    border: 1px solid #ffceec;
}

.office-objects {
    margin-left: 32px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.object-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    padding: 4px 0;
}

.object-name {
    color: #3c2b55;
    position: relative;
    padding-left: 16px;
}

.object-name::before {
    content: "•";
    color: #ff44a5;
    font-weight: 900;
    position: absolute;
    left: 0;
    font-size: 1.6rem;
    line-height: 0.7;
}

.object-value {
    background: #faf4ff;
    padding: 4px 14px;
    border-radius: 40px;
    font-weight: 600;
    color: #1e1433;
    border: 1px solid #ecd9ff;
    font-size: 0.9rem;
}

.empty-objects {
    margin-left: 32px;
    color: #b09ec9;
    font-style: italic;
    background: #faf5ff;
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.9rem;
    display: inline-block;
    border: 1px dashed #d9c0ff;
}

/* Правая панель — расхождения */
.discrepancy-section {
    margin-bottom: 28px;
}

.subtitle {
    font-weight: 650;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.subtitle.red {
    color: #d43d8c;
}

.subtitle.green {
    color: #2aa582;
}

.subtitle.orange {
    color: #ff8c4d;
}

.subtitle.blue {
    color: #4361ee;
}

.subtitle.purple {
    color: #9c27b0;
}

.subtitle.blue span {
    color: #4361ee;
}

.subtitle.orange span {
    color: #ff8c4d;
}

.subtitle.purple span {
    color: #9c27b0;
}

.discrepancy-list {
    background: #fdfbff;
    border-radius: 24px;
    padding: 8px;
    border: 1px solid #f3e6ff;
    max-height: 300px;
    overflow-y: auto;
}

.discrepancy-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f5eaff;
    font-size: 0.95rem;
}

.discrepancy-item:last-child {
    border-bottom: none;
}

.discrepancy-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.object-tag {
    font-weight: 500;
    color: #392a4d;
    min-width: 170px;
    word-break: break-word;
    padding-right: 10px;
    flex: 1;
}

.numbers {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 4px 14px;
    border-radius: 40px;
    border: 1px solid #ecd9ff;
}

.plan {
    color: #5e4a77;
    font-weight: 500;
}

.fact {
    color: #ff4da6;
    font-weight: 650;
}

.arrow {
    color: #d1b9ff;
    font-weight: 400;
}

.badge-red {
    background: #ffeaf3;
    color: #e0257e;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    border: 1px solid #ffb8da;
    white-space: nowrap;
}

.badge-green {
    background: #e1fff3;
    color: #1e8a6b;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    border: 1px solid #a0eed5;
    white-space: nowrap;
}

.badge-blue {
    background: #e6ecff;
    color: #4361ee;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    border: 1px solid #b8c7ff;
    white-space: nowrap;
}

.badge-purple {
    background: #f3e5f5;
    color: #9c27b0;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    border: 1px solid #ce93d8;
    white-space: nowrap;
}

/* Сводный блок с прогрессом */
.summary-block {
    margin-top: 28px;
    background: #fbf6ff;
    border-radius: 22px;
    padding: 18px 20px;
    border: 1px solid #f1e1ff;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1rem;
    color: #3c2b57;
}

.summary-value {
    font-weight: 700;
    color: #1a1030;
}

.summary-value.green {
    color: #1e8a6b;
}

.summary-value.red {
    color: #e0257e;
}

.progress-bar {
    height: 14px;
    background: #e9dcf5;
    border-radius: 30px;
    margin-top: 16px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #ff44a5;
    border-radius: 30px;
    width: 0%;
    transition: width 0.3s ease;
}

/* Загрузка и пустые состояния */
.loading {
    text-align: center;
    color: #b29fd6;
    padding: 20px;
    font-style: italic;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.loading {
    animation: pulse 1.5s infinite;
}

.more-indicator {
    text-align: center;
    color: #b29fd6;
    font-size: 0.85rem;
    padding: 8px;
    border-top: 1px dashed #e2d0fc;
    margin-top: 8px;
}

.empty-state {
    text-align: center;
    color: #b29fd6;
    padding: 16px;
    font-style: italic;
}

/* Скроллбар */
.discrepancy-list::-webkit-scrollbar {
    width: 6px;
}

.discrepancy-list::-webkit-scrollbar-track {
    background: #f1e4ff;
    border-radius: 10px;
}

.discrepancy-list::-webkit-scrollbar-thumb {
    background: #c7a9ff;
    border-radius: 10px;
}

.discrepancy-list::-webkit-scrollbar-thumb:hover {
    background: #a97cd6;
}

/* Адаптивность */
@media (max-width: 900px) {
    .two-panel {
        grid-template-columns: 1fr;
    }
    
    body {
        padding: 16px;
    }
    
    .panel-card {
        padding: 20px;
    }
    
    .object-tag {
        min-width: 120px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .discrepancy-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .object-tag {
        min-width: auto;
        width: 100%;
    }
    
    .badge-red, .badge-green, .badge-blue, .badge-purple {
        align-self: flex-end;
    }
}

/* Микро-детали */
::selection {
    background: #ffd9f0;
    color: #b80074;
}