@charset "euc-kr";

/* 권리분석 페이지 공통 모던 레이아웃 */
.analysis-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 60px 16px;
    box-sizing: border-box;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, "Malgun Gothic", "맑은 고딕", sans-serif;
    color: #1e293b;
    font-size: 15.5px;
    line-height: 1.75;
}
.analysis-wrap * {
    box-sizing: border-box;
}

/* 상단 메인 타이틀 */
.analysis-title-wrap {
    margin: 15px 0 20px 0;
}
.analysis-main-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 탭 네비게이션 */
.analysis-nav-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 35px 0;
    padding: 6px;
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.analysis-nav-tabs::-webkit-scrollbar {
    display: none;
}
.analysis-nav-tabs a {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    font-size: 15px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.analysis-nav-tabs a:hover {
    color: #0f3ba2;
    background: rgba(255, 255, 255, 0.6);
}
.analysis-nav-tabs a.active {
    background: #ffffff;
    color: #0f3ba2;
    font-weight: 800;
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06);
}

/* 섹션 블록 및 타이틀 */
.anal-section {
    margin-bottom: 45px;
}
.anal-sec-title {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    border-left: 4px solid #0f3ba2;
    padding-left: 12px;
}

/* 카드 박스 */
.anal-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 28px 32px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

/* 1. 권리분석 규칙 리스트 */
.anal-rule-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.anal-rule-list li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.num-badge {
    width: 26px;
    height: 26px;
    background: #eff6ff;
    color: #0f3ba2;
    border: 1px solid #bfdbfe;
    border-radius: 50%;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 3px;
}

/* 소제목 뱃지 및 안내 박스 */
.point-badge {
    display: inline-block;
    font-weight: 800;
    color: #0f3ba2;
    font-size: 16.5px;
    margin-bottom: 8px;
}
.highlight-box {
    background: #f8fafc;
    border-left: 3px solid #0f3ba2;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 14.5px;
    color: #334155;
    border-radius: 0 6px 6px 0;
}
.quote-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 14px 18px;
    margin: 14px 0;
    font-size: 14.5px;
    color: #475569;
}

/* 표 1 vs 표 2 (2열 그리드) */
.anal-grid-2col {
    display: flex;
    gap: 20px;
    margin: 22px 0 16px 0;
}
.anal-col-box {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px;
}
.table-caption {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}
.table-caption.safe { color: #0284c7; }
.table-caption.danger { color: #e11d48; }
.table-caption.default { color: #0f172a; }
.table-comment {
    font-size: 13px;
    color: #64748b;
    margin: 10px 0 0 0;
    text-align: right;
}

/* 미니 비교 테이블 */
.anal-mini-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
}
.anal-mini-table th, .anal-mini-table td {
    padding: 9px 10px;
    text-align: center;
    font-size: 14px;
    border-bottom: 1px solid #e2e8f0;
}
.anal-mini-table th {
    background: #f1f5f9;
    font-weight: 700;
    color: #334155;
}
.anal-mini-table .highlight-row td {
    background: #eff6ff;
}
.anal-mini-table .danger-row td {
    background: #fff1f2;
}

/* 데이터 테이블 (대항력 및 사례 테이블) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}
.anal-data-table {
    width: 100%;
    border-collapse: collapse;
    border-top: 2px solid #0f3ba2;
    background: #ffffff;
    margin-bottom: 20px;
}
.anal-data-table th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 10px;
    border-bottom: 1px solid #cbd5e1;
    text-align: center;
}
.anal-data-table td {
    padding: 13px 12px;
    font-size: 14.5px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    text-align: center;
}
.anal-data-table td:nth-child(2) {
    text-align: left;
}
.step-txt {
    font-size: 14px;
    color: #475569;
    display: inline-block;
    margin-top: 4px;
}
.desc-sub {
    font-size: 13px;
    color: #64748b;
    display: inline-block;
    margin-top: 4px;
}

/* 뱃지 스타일 */
.badge-ext {
    display: inline-block;
    padding: 2px 7px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
}
.badge-take {
    display: inline-block;
    padding: 2px 7px;
    background: #fee2e2;
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
}
.badge-status {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12.5px;
    font-weight: 800;
    border-radius: 4px;
}
.badge-status.ok {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}
.badge-status.no {
    background: #fff1f2;
    color: #e11d48;
    border: 1px solid #fecdd3;
}

/* 주의사항 박스 */
.caution-note-box {
    margin-top: 20px;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-radius: 6px;
    padding: 16px 20px;
    font-size: 14px;
    color: #92400e;
}
.caution-note-box ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}
.caution-note-box li {
    margin-bottom: 4px;
}

/* 사례별 해설 리스트 */
.case-detail-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}
.case-item {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}
.case-head {
    padding: 10px 16px;
    font-size: 14.5px;
    font-weight: 800;
}
.case-head.ok {
    background: #f0fdf4;
    color: #15803d;
    border-bottom: 1px solid #dcfce7;
}
.case-head.danger {
    background: #fff1f2;
    color: #be123c;
    border-bottom: 1px solid #ffe4e6;
}
.case-body {
    padding: 12px 16px;
    background: #ffffff;
    font-size: 14px;
    color: #334155;
    line-height: 1.65;
}

/* 모바일 반응형 미디어 쿼리 */
@media (max-width: 768px) {
    .analysis-wrap {
        padding: 0 12px 40px 12px;
        font-size: 14.5px;
    }
    .anal-card {
        padding: 20px 16px;
    }
    .anal-grid-2col {
        flex-direction: column;
        gap: 16px;
    }
    .anal-sec-title {
        font-size: 17px;
    }
    .anal-data-table th, .anal-data-table td {
        padding: 10px 8px;
        font-size: 14px;
    }
}

/* =======================================================
   자료입력 후 분석하기(rightanal_go.php) 폼 스타일
======================================================= */
/* 폼 테이블 공통 */
.anal-form-table {
    width: 100%;
    border-collapse: collapse;
}
.anal-form-table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
}
.anal-form-table td {
    padding: 9px 12px;
    font-size: 14px;
    color: #334155;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}
.anal-form-table td select {
height: 32px;
    padding: 0 6px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    outline: none;
}
/* 입력 컨트롤 */
.input-anal {
    height: 32px;
    padding: 0 8px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
}
.input-anal:focus {
    border-color: #0f3ba2;
}
.select-anal {
    height: 32px;
    padding: 0 6px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    outline: none;
}

/* 주소 입력 그룹 */
.addr-input-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.btn-anal-addr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: #475569;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.15s ease;
}
.btn-anal-addr:hover {
    background: #1e293b;
}

/* 특이사항 체크박스 그리드 */
.checkbox-option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    padding: 6px 0;
}
.checkbox-option-grid label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* 폼 하단 도움말 박스 */
.anal-form-tip {
    margin-top: 14px;
    background: #f8fafc;
    border-left: 3px solid #0f3ba2;
    padding: 10px 14px;
    font-size: 13px;
    color: #475569;
    border-radius: 0 4px 4px 0;
}

/* 섹션 타이틀 + 우측 컨트롤 버튼 */
.anal-sec-title-with-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.btn-ctrl-group {
    display: flex;
    gap: 6px;
}
.btn-item-ctrl {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    transition: all 0.15s ease;
}
.btn-item-ctrl.add {
    background: #eff6ff;
    color: #0f3ba2;
    border-color: #bfdbfe;
}
.btn-item-ctrl.add:hover {
    background: #dbeafe;
}
.btn-item-ctrl.del {
    background: #fff1f2;
    color: #e11d48;
    border-color: #fecdd3;
}
.btn-item-ctrl.del:hover {
    background: #ffe4e6;
}

/* 자바스크립트 생성 테이블 호환 */
#step2ItemDIV table, #step3ItemDIV table {
    width: 100%;
    margin-bottom: 6px;
    border-collapse: collapse;
}
#step2ItemDIV td, #step3ItemDIV td {
    padding: 4px;
    font-size: 14px;
}
.analysis-wrap select, .analysis-wrap input {
	background: #ffffff;
    border: 1px solid #cccccc;
    color: #262626;
    padding: 5px 8px;
    border-radius: 4px;
	font-size: 14px;
	height:32px;
}
/* 하단 분석하기 제출 버튼 */
.anal-submit-wrap {
    text-align: center;
    margin: 40px 0 60px 0;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}
.submit-guide-txt {
    font-size: 14.5px;
    color: #64748b;
    margin-bottom: 14px;
}
.btn-anal-execute {
    padding: 14px 40px;
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    background: #0f3ba2;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 59, 162, 0.2);
    transition: all 0.15s ease;
}
.btn-anal-execute:hover {
    background: #0b2d7d;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 59, 162, 0.3);
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .anal-form-table th, .anal-form-table td {
        display: block;
        width: 100%;
        text-align: left;
    }
    .anal-form-table th {
        background: #f1f5f9;
        padding: 6px 10px;
    }
    .anal-sec-title-with-btn {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .btn-anal-execute {
        width: 100%;
        padding: 14px 0;
    }
}

/* =======================================================
   권리분석 결과 페이지(rightanal_view.php) 스타일
======================================================= */
.anal-legend-bar {
    display: flex;
    justify-content: flex-end;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}
.anal-total-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 18px;
    margin-top: 14px;
}
.anal-total-bar .total-price {
    font-size: 16px;
    font-weight: 800;
    color: #e11d48;
}
.btn-group-mini {
    display: flex;
    gap: 6px;
}
.btn-mini-view {
    padding: 5px 10px;
    font-size: 12.5px;
    font-weight: 600;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    color: #334155;
    transition: all 0.15s ease;
}
.btn-mini-view:hover {
    background: #eff6ff;
    color: #0f3ba2;
    border-color: #0f3ba2;
}

/* 종합분석 4분할 결과 그리드 */
.summary-result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.summary-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px 20px;
}
.summary-box.danger {
    background: #fff1f2;
    border-color: #fecdd3;
}
.summary-box.safe {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.sum-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}
.sum-value {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}
.summary-box.danger .sum-value { color: #e11d48; }
.summary-box.safe .sum-value { color: #16a34a; }
.sum-desc {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .summary-result-grid {
        grid-template-columns: 1fr;
    }
}

/* 상단 액션 바 (인쇄, 재수정, 보고서) */
.anal-action-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 14px 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 12px;
}
.case-badge-title {
    font-size: 16px;
    color: #1e293b;
}
.case-badge-title strong {
    color: #0f3ba2;
}
.action-btn-group {
    display: flex;
    gap: 8px;
}
.btn-anal-action {
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-anal-action:hover {
    background: #f1f5f9;
    color: #0f3ba2;
    border-color: #0f3ba2;
}
.btn-anal-action.primary {
    background: #0f3ba2;
    color: #ffffff;
    border-color: #0f3ba2;
}
.btn-anal-action.primary:hover {
    background: #0b2d7d;
}