body {
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #222;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1000px;
    margin: 50px auto;
    background: #fff;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

h1 {
    margin-top: 0;
    margin-bottom: 10px;
}

p {
    margin-top: 0;
    color: #555;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

input[type="text"] {
    flex: 1;
    padding: 14px 16px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 16px;
}

button {
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    background: #111;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background: #333;
}

.result-box {
    margin-top: 30px;
    padding: 20px;
    border-radius: 12px;
    background: #f0f3f8;
    border: 1px solid #d9e0ea;
}

.hidden {
    display: none;
}

pre {
    white-space: pre-wrap;
    word-break: break-word;
    background: #111;
    color: #eee;
    padding: 15px;
    border-radius: 10px;
    max-height: 400px;
    overflow: auto;
}
.analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.analysis-grid > div {
    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 10px;
    padding: 14px;
    line-height: 1.5;
}
@media (max-width: 700px) {
    .form-row {
        flex-direction: column;
    }

    .analysis-grid {
        grid-template-columns: 1fr;
    }
}
.rules-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.rule-item {
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid #d9e0ea;
    background: #fff;
}

.rule-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.rule-message {
    line-height: 1.5;
    color: #444;
}

.rule-success {
    border-left: 6px solid #1f9d55;
    background: #eefaf3;
}

.rule-warning {
    border-left: 6px solid #d98e04;
    background: #fff8e8;
}

.rule-error {
    border-left: 6px solid #d93025;
    background: #fff1f0;
}
.score-box {
    display: flex;
    gap: 20px;
    align-items: center;
    border-radius: 14px;
    padding: 20px;
    margin: 25px 0 30px;
    border: 1px solid #d9e0ea;
}

.score-number {
    width: 110px;
    height: 110px;
    min-width: 110px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 700;
    background: #fff;
    border: 6px solid #ddd;
}

.score-content {
    flex: 1;
}

.score-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
}

.score-text {
    color: #444;
    line-height: 1.6;
    margin-bottom: 14px;
}

.score-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stat-pill {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.stat-error {
    background: #fff1f0;
    color: #b42318;
    border: 1px solid #f2b8b5;
}

.stat-warning {
    background: #fff8e8;
    color: #9a6700;
    border: 1px solid #f3d89a;
}

.stat-success {
    background: #eefaf3;
    color: #157347;
    border: 1px solid #b7e4c7;
}

.score-excellent {
    background: #eefaf3;
    border-color: #b7e4c7;
}

.score-excellent .score-number {
    border-color: #1f9d55;
    color: #1f9d55;
}

.score-good {
    background: #f2f8ff;
    border-color: #c8ddff;
}

.score-good .score-number {
    border-color: #2f6feb;
    color: #2f6feb;
}

.score-medium {
    background: #fff8e8;
    border-color: #f3d89a;
}

.score-medium .score-number {
    border-color: #d98e04;
    color: #d98e04;
}

.score-weak,
.score-poor {
    background: #fff1f0;
    border-color: #f2b8b5;
}

.score-weak .score-number,
.score-poor .score-number {
    border-color: #d93025;
    color: #d93025;
}
.analysis-grid .stat-pill {
    margin-right: 8px;
    margin-bottom: 8px;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.category-card {
    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 12px;
    padding: 16px;
}

.category-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.category-label {
    font-weight: 700;
    font-size: 15px;
}

.category-score {
    font-size: 24px;
    font-weight: 700;
}

.category-summary {
    color: #555;
    margin-bottom: 12px;
    line-height: 1.4;
}

.category-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.category-excellent {
    background: #eefaf3;
    border-color: #b7e4c7;
}

.category-good {
    background: #f2f8ff;
    border-color: #c8ddff;
}

.category-medium {
    background: #fff8e8;
    border-color: #f3d89a;
}

.category-weak,
.category-poor {
    background: #fff1f0;
    border-color: #f2b8b5;
}

.rule-meta-line {
    margin-bottom: 8px;
}

.rule-category-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: #edf2f7;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

@media (max-width: 1000px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.recommendation-item {
    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 12px;
    padding: 16px;
}

.recommendation-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.recommendation-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
}

.recommendation-action {
    color: #444;
    line-height: 1.5;
}

.priority-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.priority-high {
    background: #fff1f0;
    color: #b42318;
    border: 1px solid #f2b8b5;
}

.priority-medium {
    background: #fff8e8;
    color: #9a6700;
    border: 1px solid #f3d89a;
}

.priority-low {
    background: #eefaf3;
    color: #157347;
    border: 1px solid #b7e4c7;
}

.recommendation-high {
    border-left: 6px solid #d93025;
}

.recommendation-medium {
    border-left: 6px solid #d98e04;
}

.recommendation-low {
    border-left: 6px solid #1f9d55;
}
.history-box {
    margin-top: 30px;
    padding: 20px;
    border-radius: 12px;
    background: #f0f3f8;
    border: 1px solid #d9e0ea;
}

.history-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.secondary-button {
    padding: 10px 14px;
    border: 1px solid #c7d0db;
    border-radius: 10px;
    background: #fff;
    color: #222;
    cursor: pointer;
    font-size: 14px;
}

.secondary-button:hover {
    background: #f8fafc;
}

.history-table-wrap {
    overflow-x: auto;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.history-table th,
.history-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5eaf0;
    text-align: left;
    font-size: 14px;
    vertical-align: top;
}

.history-table th {
    background: #f8fafc;
    font-weight: 700;
}

.save-notice {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 700;
}

.save-success {
    background: #eefaf3;
    color: #157347;
    border: 1px solid #b7e4c7;
}

.save-error {
    background: #fff1f0;
    color: #b42318;
    border: 1px solid #f2b8b5;
}
.history-row:hover {
    background: #fafcff;
}

.history-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #1d4ed8;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.history-link:hover {
    text-decoration: underline;
}

.save-info {
    background: #f2f8ff;
    color: #1d4ed8;
    border: 1px solid #c8ddff;
}
.compare-box {
    margin-top: 30px;
    padding: 20px;
    border-radius: 12px;
    background: #f0f3f8;
    border: 1px solid #d9e0ea;
}

.compare-summary-box {
    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 18px;
}

.compare-summary-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.compare-summary-title {
    font-size: 18px;
    font-weight: 700;
}

.compare-summary-meta {
    color: #555;
    font-size: 14px;
}

.compare-stats-line {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: #333;
}

.compare-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.compare-card {
    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 12px;
    padding: 16px;
}

.compare-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.compare-card-label {
    font-weight: 700;
}

.compare-values {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #444;
}

.delta-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.delta-up {
    background: #eefaf3;
    color: #157347;
    border: 1px solid #b7e4c7;
}

.delta-down {
    background: #fff1f0;
    color: #b42318;
    border: 1px solid #f2b8b5;
}

.delta-same {
    background: #f3f4f6;
    color: #475569;
    border: 1px solid #d1d5db;
}

@media (max-width: 1000px) {
    .compare-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .compare-grid {
        grid-template-columns: 1fr;
    }
}
.insights-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.insight-item {
    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 12px;
    padding: 16px;
}

.insight-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.insight-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
}

.insight-text {
    color: #444;
    line-height: 1.5;
}

.insight-problem {
    border-left: 6px solid #d93025;
    background: #fff7f7;
}

.insight-win {
    border-left: 6px solid #1f9d55;
    background: #f5fcf7;
}
#domainResult {
    margin-top: 18px;
}

.domain-summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.domain-history-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #1d4ed8;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.domain-history-link:hover {
    text-decoration: underline;
}
.csv-link {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 700;
}

.csv-link:hover {
    text-decoration: underline;
}

.export-actions {
    margin-bottom: 16px;
}

.export-button {
    display: inline-block;
    text-decoration: none;
}
.mini-status {
    margin-top: 12px;
    font-size: 14px;
    color: #475569;
}
.project-link {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 700;
}

.project-link:hover {
    text-decoration: underline;
}
.project-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.project-kpi-card {
    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 12px;
    padding: 16px;
}

.project-kpi-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.project-kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

@media (max-width: 1200px) {
    .project-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .project-kpi-grid {
        grid-template-columns: 1fr;
    }
}
.task-item{
padding:14px;
border:1px solid #ddd;
border-radius:8px;
margin-bottom:10px;
}

.task-title{
font-weight:700;
margin-bottom:6px;
}

.task-meta{
font-size:13px;
color:#666;
margin-bottom:8px;
}

.task-actions button{
margin-right:5px;
}

.task-automation-box {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #d9e0ea;
}

.task-automation-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: #0f172a;
}

.task-automation-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.optimization-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.optimization-card {
    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: 12px;
    padding: 16px;
}

.optimization-title {
    font-weight: 700;
    margin-bottom: 10px;
    color: #0f172a;
}

.optimization-text {
    color: #334155;
    line-height: 1.5;
}

.suggestion-list {
    margin: 0;
    padding-left: 18px;
}

.suggestion-list li {
    margin-bottom: 6px;
}

@media (max-width: 700px) {
    .optimization-grid {
        grid-template-columns: 1fr;
    }
}