/* 조사 상세 기록지 페이지 전용 CSS */

/* 페이지 컨테이너 */
.report-page-container {
    background-color: rgb(15, 23, 42);
    /* dashboard-bg */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', 'Noto Sans KR', sans-serif;
}

/* 페이지 헤더 */
.report-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    /* p-6 */
    border-bottom: 1px solid rgb(51, 65, 85);
    /* panel-border */
    background-color: rgb(30, 41, 59);
    /* panel-bg */
}

.report-page-title-group {
    flex: 1;
}

.report-page-title {
    font-size: 1.5rem;
    /* text-2xl */
    font-weight: 700;
    color: rgb(241, 245, 249);
    /* slate-100 */
    margin-bottom: 0.5rem;
    /* mb-2 */
}

.report-page-subtitle {
    display: flex;
    align-items: center;
    gap: 1rem;
    /* gap-4 */
    font-size: 0.875rem;
    /* text-sm */
    color: rgb(148, 163, 184);
    /* slate-400 */
}

.report-page-close {
    width: 2.5rem;
    /* w-10 */
    height: 2.5rem;
    /* h-10 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    /* rounded-lg */
    background: none;
    border: none;
    color: rgb(148, 163, 184);
    /* slate-400 */
    cursor: pointer;
    transition: all 150ms;
}

.report-page-close:hover {
    background-color: rgb(51, 65, 85);
    /* slate-700 */
    color: rgb(241, 245, 249);
    /* slate-100 */
}

/* 상태 및 액션 버튼 영역 (Gis 레이아웃 스타일 적용) */
.report-status-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background-color: rgba(15, 23, 42, 0.5);
    border: 1px solid rgb(51, 65, 85);
    border-radius: 9999px;
    /* Pill shape */
    margin: 0 1.5rem;
}

.report-status-current {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-right: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.report-status-label {
    font-size: 0.75rem;
    color: rgb(148, 163, 184);
    font-weight: 600;
    white-space: nowrap;
}

.report-status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-pending {
    background: rgba(148, 163, 184, 0.1);
    color: rgb(148, 163, 184);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-waiting {
    background: rgba(245, 158, 11, 0.1);
    color: rgb(245, 158, 11);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: rgb(16, 185, 129);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-retry {
    background: rgba(239, 68, 68, 0.1);
    color: rgb(239, 68, 68);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.report-action-buttons {
    display: flex;
    gap: 0.5rem;
}

.report-action-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms;
    border: 1px solid transparent;
}

.report-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.report-btn-approve {
    background-color: rgba(16, 185, 129, 0.1);
    color: rgb(16, 185, 129);
    border-color: rgba(16, 185, 129, 0.2);
}

.report-btn-approve:not(:disabled):hover {
    background-color: rgb(16, 185, 129);
    color: white;
}

.report-btn-reject {
    background-color: rgba(239, 68, 68, 0.1);
    color: rgb(239, 68, 68);
    border-color: rgba(239, 68, 68, 0.2);
}

.report-btn-reject:not(:disabled):hover {
    background-color: rgb(239, 68, 68);
    color: white;
}

.report-action-btn .material-symbols-outlined {
    font-size: 1.125rem;
}

/* 페이지 바디 */
.report-page-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    /* p-6 */
}

.report-page-body::-webkit-scrollbar {
    width: 8px;
}

.report-page-body::-webkit-scrollbar-track {
    background: rgb(15, 23, 42);
    /* dashboard-bg */
}

.report-page-body::-webkit-scrollbar-thumb {
    background: rgb(51, 65, 85);
    /* slate-700 */
    border-radius: 4px;
}

.report-page-body::-webkit-scrollbar-thumb:hover {
    background: rgb(71, 85, 105);
    /* slate-600 */
}

/* 레이아웃 */
.report-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    /* gap-6 */
}

@media (min-width: 1280px) {
    .report-layout {
        grid-template-columns: 2fr 1fr;
    }
}

.report-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* gap-6 */
}

.report-right {
    display: flex;
    flex-direction: column;
}

/* 섹션 */
.report-section {
    background-color: rgb(30, 41, 59);
    /* panel-bg */
    border: 1px solid rgb(51, 65, 85);
    /* panel-border */
    border-radius: 0.5rem;
    /* rounded-lg */
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.report-section-sticky {
    position: sticky;
    top: 0;
}

.report-section-title {
    font-size: 0.9375rem;
    /* text-[15px] */
    font-weight: 700;
    color: rgb(241, 245, 249);
    /* slate-100 */
    background-color: rgb(15, 23, 42);
    /* dashboard-bg */
    padding: 0.75rem 1rem;
    /* px-4 py-3 */
    border-bottom: 1px solid rgb(51, 65, 85);
    /* panel-border */
}

.report-section-title-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* gap-2 */
}

.report-section-title-icon .material-symbols-outlined {
    color: #3b82f6;
    /* primary */
    font-size: 1.25rem;
    /* text-[20px] */
}

/* 그리드 레이아웃 */
.report-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
}

.report-label {
    grid-column: span 1;
    display: flex;
    align-items: center;
    background-color: rgb(15, 23, 42);
    /* dashboard-bg */
    padding: 0.5rem 0.75rem;
    /* px-3 py-2 */
    font-size: 0.8125rem;
    /* text-[13px] */
    font-weight: 600;
    color: rgb(148, 163, 184);
    /* slate-400 */
    border-bottom: 1px solid rgb(51, 65, 85);
    /* panel-border */
    border-right: 1px solid rgb(51, 65, 85);
}

.report-label-full {
    grid-column: span 1;
    border-bottom: none;
}

.report-value {
    grid-column: span 1;
    display: flex;
    align-items: center;
    background-color: rgb(30, 41, 59);
    /* panel-bg */
    padding: 0.5rem 0.75rem;
    /* px-3 py-2 */
    font-size: 0.875rem;
    /* text-[14px] */
    color: rgb(226, 232, 240);
    /* slate-200 */
    border-bottom: 1px solid rgb(51, 65, 85);
    /* panel-border */
    border-right: 1px solid rgb(51, 65, 85);
}

.report-value-full {
    grid-column: span 5;
    border-right: none;
    border-bottom: none;
}

.report-value-wide {
    grid-column: span 4;
}

.report-grid>div:nth-child(6n) {
    border-right: none;
}

.report-grid>div:last-child {
    border-bottom: none;
}

.report-grid>div:nth-last-child(-n+6) {
    border-bottom: none;
}

/* 사진 섹션 */
.report-photos {
    padding: 1rem;
    /* p-4 */
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    /* gap-4 */
}

.report-photo-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    /* gap-1 */
}

.report-photo-label {
    font-size: 0.6875rem;
    /* text-[11px] */
    font-weight: 700;
    text-align: center;
    color: rgb(148, 163, 184);
    /* slate-400 */
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.report-photo-box {
    aspect-ratio: 1;
    border-radius: 0.5rem;
    /* rounded-lg */
    border: 1px solid rgb(51, 65, 85);
    /* panel-border */
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.report-photo-box:hover .report-photo-overlay {
    opacity: 1;
}

.report-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.report-photo-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 150ms;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-photo-overlay .material-symbols-outlined {
    color: white;
    font-size: 2rem;
}

/* AI 분석 섹션 */
.report-ai-section {
    margin: 1rem;
    /* m-4 */
    margin-top: 1.5rem;
    /* mt-6 */
    padding: 1rem;
    /* p-4 */
    background-color: rgba(59, 130, 246, 0.1);
    /* primary/10 */
    border-radius: 0.5rem;
    /* rounded-lg */
    border: 1px solid rgba(59, 130, 246, 0.2);
    /* primary/20 */
}

.report-ai-title {
    font-size: 0.6875rem;
    /* text-[11px] */
    color: #3b82f6;
    /* primary */
    font-weight: 700;
    margin-bottom: 0.5rem;
    /* mb-2 */
    text-transform: uppercase;
}

.report-ai-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* gap-2 */
    font-size: 0.875rem;
    /* text-sm */
}

.report-ai-icon {
    color: #3b82f6;
    /* primary */
    font-size: 1.125rem;
    /* text-[18px] */
}

.report-ai-text {
    color: rgb(148, 163, 184);
    /* slate-400 */
}

.report-ai-value {
    font-weight: 700;
    color: rgb(241, 245, 249);
    /* slate-100 */
}

/* 페이지 푸터 */
.report-page-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    /* gap-3 */
    padding: 1rem 1.5rem;
    /* px-6 py-4 */
    border-top: 1px solid rgb(51, 65, 85);
    /* panel-border */
    background-color: rgb(30, 41, 59);
    /* panel-bg */
}

/* 버튼 */
.report-button-secondary {
    height: 2.25rem;
    /* h-9 */
    padding: 0 1rem;
    /* px-4 */
    border-radius: 0.375rem;
    /* rounded-md */
    border: 1px solid rgb(51, 65, 85);
    /* panel-border */
    background-color: transparent;
    color: rgb(226, 232, 240);
    /* slate-200 */
    font-size: 0.875rem;
    /* text-sm */
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* gap-2 */
}

.report-button-secondary:hover {
    background-color: rgb(51, 65, 85);
    /* slate-700 */
}

.report-button-secondary .material-symbols-outlined {
    font-size: 1.125rem;
    /* text-[18px] */
}

/* 주 버튼 (엑셀 다운로드 등) */
.report-button-primary {
    height: 2.25rem;
    padding: 0 1rem;
    background-color: #3b82f6;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 150ms;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.report-button-primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.report-button-primary .material-symbols-outlined {
    font-size: 1.125rem;
}/* 계량??치?보 ?션 */
.report-installation-admin {
    padding: 1.25rem;
    background-color: rgba(15, 23, 42, 0.3);
    border-bottom: 1px solid rgb(51, 65, 85);
}

.report-installation-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.report-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.report-input-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(148, 163, 184);
}

.report-field-input {
    background-color: rgb(15, 23, 42);
    border: 1px solid rgb(71, 85, 105);
    border-radius: 0.375rem;
    padding: 0.4rem 0.6rem;
    color: white;
    font-size: 0.8125rem;
    outline: none;
    transition: border-color 150ms;
}

.report-field-input:focus {
    border-color: #3b82f6;
}

.report-installation-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.report-btn-mini {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms;
    border: 1px solid transparent;
}

.report-btn-add {
    background-color: #3b82f6;
    color: white;
}

.report-btn-add:hover {
    background-color: #2563eb;
}

.report-btn-edit {
    background-color: #10b981;
    color: white;
}

.report-btn-edit:hover {
    background-color: #059669;
}

.report-btn-del {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.report-btn-del:hover {
    background-color: #ef4444;
    color: white;
}

.report-btn-cancel {
    background-color: transparent;
    color: rgb(148, 163, 184);
    border-color: rgb(71, 85, 105);
}

.report-btn-cancel:hover {
    background-color: rgb(71, 85, 105);
    color: white;
}

.report-installation-list {
    max-height: 250px;
    overflow-y: auto;
}

.report-mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.report-mini-table th {
    position: sticky;
    top: 0;
    background-color: rgb(15, 23, 42);
    padding: 0.6rem 0.75rem;
    text-align: left;
    color: rgb(148, 163, 184);
    font-weight: 600;
    border-bottom: 1px solid rgb(51, 65, 85);
}

.report-mini-table td {
    padding: 0.6rem 0.75rem;
    color: rgb(226, 232, 240);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.report-mini-table tr {
    cursor: pointer;
    transition: background-color 150ms;
}

.report-mini-table tr:hover {
    background-color: rgba(59, 130, 246, 0.05);
}

.report-mini-table tr.selected {
    background-color: rgba(59, 130, 246, 0.15);
}

.report-mini-table tr.selected td {
    color: #3b82f6;
    font-weight: 600;
}

.report-btn-amber { background-color: rgba(245, 158, 11, 0.15); color: rgb(245, 158, 11); }
.report-btn-grey { background-color: rgba(100, 116, 139, 0.15); color: rgb(148, 163, 184); }

/* ?? ?? ?? */
.report-hope-badge {
    margin-left: auto;
    background: #3b82f6;
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    min-width: 1.25rem;
    text-align: center;
}

.report-hope-desc {
    font-size: 0.75rem;
    color: rgb(148, 163, 184);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgb(51, 65, 85);
}

.report-hope-table-wrap {
    max-height: 300px;
    overflow-y: auto;
}

.report-hope-thumb {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: cover;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: transform 150ms, box-shadow 150ms;
    border: 1px solid rgb(51, 65, 85);
}

.report-hope-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.report-hope-no-image {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(100, 116, 139, 0.1);
    border-radius: 0.375rem;
    color: rgb(100, 116, 139);
    font-size: 0.6875rem;
}

/* ?? ??? ?? ?? */
.report-hope-image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.report-hope-image-full {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 0.5rem;
}

.report-hope-image-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2001;
    transition: background 150ms;
}

.report-hope-image-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.report-hope-image-close .material-symbols-outlined {
    font-size: 1.5rem;
}

/* ? ????? ??? */
.report-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background-color: rgb(15, 23, 42);
    border-bottom: 1px solid rgb(51, 65, 85);
}

.report-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgb(71, 85, 105);
    border-radius: 9999px;
    color: rgb(148, 163, 184);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms;
}

.report-tab:hover {
    color: rgb(226, 232, 240);
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
}

.report-tab.active {
    color: white;
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.report-tab .material-symbols-outlined {
    font-size: 1rem;
}

.report-tab-count {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    min-width: 1.25rem;
    text-align: center;
}

.report-tab:not(.active) .report-tab-count {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.report-tab.active .report-tab-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* ? ??? ?? ?? */
.report-tab-content-full {
    max-width: 100%;
}

.report-tab-content-full .report-section {
    margin-bottom: 1.5rem;
}

/* ????? ?? ? */
.report-reading-form {
    padding: 1.25rem;
    background-color: rgba(15, 23, 42, 0.3);
    border-bottom: 1px solid rgb(51, 65, 85);
}

.report-reading-inputs {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.report-reading-inputs .report-input-group {
    min-width: 100px;
}

.report-reading-list {
    max-height: 500px;
    overflow-y: auto;
}

.report-reading-list .report-mini-table td.text-right {
    text-align: right;
}
