/* 소블록별 유량 비교 분석 페이지 전용 CSS */

.flow-container {
    background-color: #0f172a;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
    color: rgb(226 232 240);
    height: 100vh;
    overflow: hidden;
    letter-spacing: -0.025em;
}

.flow-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.flow-main {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

.flow-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    overflow-y: auto;
}

/* 페이지 헤더 */
.flow-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flow-title-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flow-title-icon {
    color: #3b82f6;
    font-size: 1.5rem;
}

.flow-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: rgb(241 245 249);
}

.flow-subtitle {
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgb(148 163 184);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* 요약 카드 */
.flow-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 1024px) {
    .flow-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 필터 영역 */
.flow-filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #1e293b;
    border: 1px solid rgb(51 65 85);
    border-radius: 0.75rem;
}

.flow-filter-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgb(148 163 184);
    white-space: nowrap;
}

.flow-filter-select {
    background: #0f172a;
    border: 1px solid rgb(51 65 85);
    border-radius: 0.5rem;
    color: rgb(226 232 240);
    font-size: 0.8125rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    min-width: 160px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.flow-filter-select:focus {
    outline: none;
    border-color: #3b82f6;
}

.flow-filter-select:hover {
    border-color: rgb(71 85 105);
}

/* 테이블 컨테이너 */
.flow-table-container {
    background: #1e293b;
    border: 1px solid rgb(51 65 85);
    border-radius: 0.75rem;
    overflow: hidden;
}

.flow-table-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgb(51 65 85);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 41, 59, 0.5);
}

.flow-table-title {
    font-size: 0.9375rem;
    font-weight: 800;
    color: rgb(241 245 249);
}

.flow-table-wrapper {
    overflow-x: auto;
}

.flow-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 1100px;
}

.flow-table thead tr {
    background: rgba(15, 23, 42, 0.5);
}

.flow-th {
    padding: 0.75rem 1rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgb(100 116 139);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border-bottom: 1px solid rgb(51 65 85);
}

.flow-th-right {
    text-align: right;
}

.flow-th-center {
    text-align: center;
}

.flow-td {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: rgb(203 213 225);
    border-bottom: 1px solid rgb(30 41 59);
    white-space: nowrap;
}

.flow-td-bold {
    font-weight: 700;
    color: rgb(241 245 249);
}

.flow-td-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.flow-td-center {
    text-align: center;
}

.flow-td-mono {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.flow-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.6);
}

/* 유수율 배지 */
.flow-rate-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.flow-rate-good {
    background: rgba(16, 185, 129, 0.15);
    color: rgb(52 211 153);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.flow-rate-warning {
    background: rgba(245, 158, 11, 0.15);
    color: rgb(251 191 36);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.flow-rate-danger {
    background: rgba(244, 63, 94, 0.15);
    color: rgb(251 113 133);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

/* 유량 입력 */
.flow-input-cell {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    justify-content: flex-end;
}

.flow-input {
    width: 100px;
    background: #0f172a;
    border: 1px solid rgb(51 65 85);
    border-radius: 0.375rem;
    color: rgb(226 232 240);
    font-size: 0.8125rem;
    padding: 0.375rem 0.5rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.15s;
}

.flow-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.flow-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 0.375rem;
    color: #3b82f6;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.flow-save-btn:hover {
    background: rgba(59, 130, 246, 0.25);
    color: rgb(147 197 253);
}

.flow-save-btn .material-symbols-outlined {
    font-size: 16px;
}

/* 하단 요약 행 */
.flow-table tfoot tr {
    background: rgba(15, 23, 42, 0.7);
}

.flow-tf {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 800;
    color: rgb(241 245 249);
    border-top: 2px solid rgb(51 65 85);
    white-space: nowrap;
}

.flow-tf-right {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* 토스트 */
.flow-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    z-index: 100;
    animation: flow-toast-in 0.3s ease-out;
}

.flow-toast-success {
    background: rgba(16, 185, 129, 0.2);
    color: rgb(52 211 153);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

@keyframes flow-toast-in {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 가구현황 미니 바 */
.flow-mini-bar {
    display: flex;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.25rem;
    width: 80px;
}

.flow-mini-bar-done {
    background: rgb(52 211 153);
}

.flow-mini-bar-closed {
    background: rgb(251 191 36);
}

.flow-mini-bar-missing {
    background: rgb(251 113 133);
}

.flow-mini-bar-pending {
    background: rgb(71 85 105);
}

.flow-excel-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.flow-excel-btn .material-symbols-outlined {
    font-size: 16px;
}

.flow-excel-download {
    background: rgba(6, 182, 212, 0.1);
    color: rgb(6 182 212);
    border-color: rgba(6, 182, 212, 0.3);
}

.flow-excel-download:hover {
    background: rgba(6, 182, 212, 0.2);
}

.flow-excel-upload {
    background: rgba(168, 85, 247, 0.1);
    color: rgb(168 85 247);
    border-color: rgba(168, 85, 247, 0.3);
}

.flow-excel-upload:hover {
    background: rgba(168, 85, 247, 0.2);
}

.flow-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.flow-upload-modal {
    background: rgb(30 41 59);
    border: 1px solid rgb(51 65 85);
    border-radius: 16px;
    width: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.flow-upload-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgb(51 65 85);
}

.flow-upload-modal-header h3 {
    color: white;
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.flow-modal-close {
    background: none;
    border: none;
    color: rgb(148 163 184);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
}

.flow-modal-close:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.flow-upload-modal-summary {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
}

.flow-upload-stat {
    flex: 1;
    background: rgb(15 23 42);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgb(51 65 85);
}

.flow-upload-stat-label {
    display: block;
    font-size: 11px;
    color: rgb(148 163 184);
    margin-bottom: 4px;
}

.flow-upload-stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: white;
}

.flow-upload-stat-success .flow-upload-stat-value {
    color: rgb(52 211 153);
}

.flow-upload-stat-fail .flow-upload-stat-value {
    color: rgb(251 113 133);
}

.flow-upload-changes {
    padding: 0 24px;
    max-height: 300px;
    overflow-y: auto;
}

.flow-upload-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.flow-upload-table thead th {
    color: rgb(148 163 184);
    font-weight: 600;
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgb(51 65 85);
    position: sticky;
    top: 0;
    background: rgb(30 41 59);
}

.flow-upload-table tbody td {
    color: rgb(203 213 225);
    padding: 8px 12px;
    border-bottom: 1px solid rgb(30 41 59);
}

.flow-upload-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid rgb(51 65 85);
}

.flow-upload-btn-cancel {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: rgb(51 65 85);
    color: rgb(203 213 225);
    border: 1px solid rgb(71 85 105);
}

.flow-upload-btn-cancel:hover {
    background: rgb(71 85 105);
}

.flow-upload-btn-apply {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: rgb(6 182 212);
    color: white;
    border: none;
}

.flow-upload-btn-apply:hover {
    background: rgb(8 145 178);
}
