@charset "UTF-8";
:root {
    --green: #237c58;
    --ink: #21342d;
    --muted: #7b8782;
    --line: #e6ebe8;
    --bg: #f5f7f6;
}
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Malgun Gothic", Arial, sans-serif;
    font-size: 14px;
}
a {
    color: inherit;
    text-decoration: none;
}
.sidebar {
    width: 236px;
    background: #142f25;
    color: #d7e4dd;
    position: fixed;
    inset: 0 auto 0 0;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
}
.brand {
    display: flex;
    align-items: center;
    padding: 0 12px 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid #345044;
}
.brand .brand-title {
    font-size: 20px;
    font-weight: 700;
    color: #f2f6f3;
    line-height: 1.6;
    letter-spacing: -1px;
    white-space: nowrap;
}
.side-bottom small {
    display: block;
    margin-top: 9px;
    color: #89a495;
    font-size: 11px;
}
.nav {
    padding: 14px 12px;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 500;
    border-radius: 7px;
}
.nav:hover {
    background: #244537;
}
.nav.active {
    background: #2c5140;
    color: #fff;
}
.side-bottom {
    margin-top: auto;
    font-size: 12px;
    padding: 20px 10px 0;
}
.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #98c69e;
    border-radius: 50%;
    margin-right: 6px;
}
.shell {
    margin-left: 236px;
}
.topbar {
    height: 60px;
    background: white;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px;
    font-size: 12px;
    color: #7b8782;
}
.divider {
    margin: 0 15px;
    color: #c4ccc7;
}
.topbar strong {
    color: #31463b;
}
.user {
    display: flex;
    gap: 14px;
    align-items: center;
}
.user b {
    border-radius: 50%;
    background: #e9f1eb;
    padding: 10px;
    color: var(--green);
}
main {
    margin: 0;
    padding: 35px 36px;
}
.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.eyebrow {
    color: var(--green);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}
h1 {
    font-size: 27px;
    letter-spacing: -1px;
    margin: 10px 0;
}
p {
    color: var(--muted);
    font-size: 14px;
    margin: 8px 0;
}
button,
select {
    font: inherit;
}
.button {
    background: var(--green);
    color: white;
    border: 0;
    padding: 12px 17px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}
.button:hover {
    background: #195c41;
}
.notice {
    margin: 24px 0 18px;
    background: #eef4ef;
    border: 1px solid #dce9df;
    border-radius: 6px;
    padding: 12px 16px;
    color: #58735f;
    font-size: 12px;
}
.notice span {
    font-size: 9px;
    font-weight: 800;
    background: #d9e9dc;
    padding: 4px 6px;
    border-radius: 3px;
    margin-right: 10px;
}
.filters {
    display: flex;
    align-items: center;
    gap: 18px;
    background: white;
    border: 1px solid var(--line);
    padding: 17px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    margin-top: 15px;
}
.filters label {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
}
.filters select {
    min-width: 130px;
    border: 1px solid #dce3de;
    background: #fff;
    border-radius: 5px;
    padding: 8px 12px;
    color: #42544a;
    font-size: 12px;
}
.reset {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 15px;
    cursor: pointer;
}
.unit {
    margin-left: auto;
    font-size: 11px;
    color: var(--muted);
}
.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}
.metrics article {
    background: white;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 15px;
}
.metric-label {
    font-size: 14px;
    color: #64776b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.metric-label span {
    color: var(--green);
    background: #edf4ef;
    border-radius: 6px;
    padding: 7px;
}
.metric-value {
    font-size: 30px;
    font-weight: 700;
    margin: 16px 0 10px;
    letter-spacing: -0.8px;
}
.metric-value em {
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    color: var(--muted);
    margin-left: 5px;
}
.chart-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 22px;
    margin-bottom: 22px;
}
.panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
}
.panel-heading {
    padding: 16px 24px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.panel-heading p {
    margin: 4px 0 0;
}
h2 {
    font-size: 18px;
    margin: 0;
    letter-spacing: -0.4px;
}
.tag {
    font-size: 12px;
    color: var(--green);
    background: #eef6ef;
    border-radius: 4px;
    padding: 6px 9px;
}
.muted {
    font-size: 13px;
    color: var(--muted);
}
.progress-bars {
    padding: 15px 24px 21px;
}
.panel-footer {
    padding: 13px 24px;
    border-top: 1px solid var(--line);
    color: #6f7f75;
    font-size: 12px;
}
.crop-chart {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 28px;
    padding: 34px 24px 43px;
}
.donut {
    width: 185px;
    height: 185px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.donut > div {
    width: 140px;
    height: 140px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
}
.donut small,
.donut span {
    font-size: 11px;
    color: var(--muted);
}
.donut strong {
    font-size: 25px;
}
.legend {
    flex: 1;
    max-width: 200px;
}
.legend-row {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    align-items: center;
    gap: 8px;
    margin: 18px 0;
    font-size: 12px;
}
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.legend-row small {
    color: var(--muted);
    font-size: 10px;
    display: block;
    margin-top: 4px;
}
.table-wrap {
    overflow: auto;
}
table {
    border-collapse: collapse;
    width: 100%;
    white-space: nowrap;
    text-align: right;
    font-size: 14px;
}
th {
    background: #f8faf8;
    color: #64776b;
    font-size: 13px;
    font-weight: 500;
    padding: 15px 20px;
    border-bottom: 1px solid var(--line);
}
td {
    padding: 18px 20px;
    border-bottom: 1px solid #f0f3f1;
}
th:first-child,
td:first-child {
    text-align: left;
}
td:first-child {
    font-weight: 600;
}
.mini-progress {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.mini-progress i {
    display: inline-block;
    width: 65px;
    height: 5px;
    background: #edf1ee;
    border-radius: 4px;
    overflow: hidden;
}
.mini-progress i b {
    display: block;
    height: 100%;
    background: #408962;
}
.badge {
    font-size: 12px;
    border-radius: 4px;
    padding: 5px 8px;
    background: #eff4ed;
    color: #628358;
}
.badge.complete {
    background: #e8f4ed;
    color: #287954;
}
footer {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #91a096;
    margin-top: 25px;
    letter-spacing: 1px;
}
footer span {
    letter-spacing: 0;
}
button:focus-visible,
a:focus-visible,
select:focus-visible {
    outline: 3px solid #8fc7a9;
    outline-offset: 3px;
}
@media (min-width: 1600px) {
    main {
        /* padding-top: 44px; */
    }
    .crop-chart {
        padding-top: 40px;
        padding-bottom: 48px;
    }
}
@media (max-width: 1150px) {
    .sidebar {
        width: 236px;
        padding: 28px 20px;
    }
    .shell {
        margin-left: 236px;
    }
    main {
        padding: 28px 22px;
    }
    .filters {
        gap: 12px;
        flex-wrap: wrap;
    }
    .unit {
        display: none;
    }
    .metrics {
        gap: 12px;
    }
    .metrics article {
        padding: 16px;
    }
    .metric-value {
        font-size: 25px;
    }
    .crop-chart {
        gap: 15px;
    }
    .donut {
        width: 150px;
        height: 150px;
    }
    .donut > div {
        width: 112px;
        height: 112px;
    }
}
@media (max-width: 800px) {
    .sidebar {
        position: static;
        width: auto;
        padding: 18px 20px;
    }
    .side-bottom {
        display: none;
    }
    .brand {
        padding-bottom: 16px;
        margin-bottom: 8px;
    }
    .sidebar .nav {
        display: block;
        margin: 8px 0 0;
    }
    .shell {
        margin: 0;
    }
    .topbar {
        height: 56px;
        padding: 0 20px;
    }
    .metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    .chart-grid {
        grid-template-columns: 1fr;
    }
    .page-heading {
        align-items: flex-start;
    }
    h1 {
        font-size: 22px;
    }
    .button {
        white-space: nowrap;
        padding: 10px;
        font-size: 11px;
    }
    main {
        padding: 24px 16px;
    }
    .filters label {
        flex: 1;
        justify-content: space-between;
    }
    .filters select {
        min-width: 110px;
    }
    .crop-chart {
        justify-content: center;
    }
    .notice {
        line-height: 1.8;
    }
    .user {
        display: none;
    }
    footer {
        gap: 15px;
        font-size: 9px;
    }
}

/* Match chart content to the available panel space. */
.nationwide-panel {
    margin-bottom: 22px;
}
.nationwide-heading {
    padding-top: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}
.nationwide-heading > div:first-child {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.nationwide-heading p {
    margin: 0;
    font-size: 13px;
}
.region-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.region-header-actions .tag {
    font-size: 13px;
    white-space: nowrap;
}
.region-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    grid-template-rows: 44px 312px 36px;
    grid-template-areas:
        "map detail-heading"
        "map table"
        "caption status";
    column-gap: 40px;
    align-items: start;
    padding: 24px;
}
.region-grid > div {
    min-width: 0;
}
.region-detail-heading h3 {
    margin: 0;
    font-size: 16px;
    letter-spacing: -0.4px;
}
.region-detail-heading {
    grid-area: detail-heading;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    height: 44px;
}
.region-grid > .table-wrap {
    grid-area: table;
    height: 312px;
}
.region-status {
    grid-area: status;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 36px;
    font-size: 12px;
    color: var(--muted);
}
.is-empty .region-status {
    color: #7a6a47;
}
.region-crops-table {
    table-layout: fixed;
}
.region-crops-table thead tr {
    height: 44px;
}
.region-crops-table tbody tr {
    height: 54px;
}
.region-crops-table tfoot tr {
    height: 50px;
}
.nationwide-panel .region-crops-table th,
.nationwide-panel .region-crops-table td {
    padding: 0 18px;
    vertical-align: middle;
}
.region-crops-table .out-of-scope {
    color: #97a29b;
}
.region-crops-table .out-of-scope .table-crop-dot,
.is-empty .table-crop-dot {
    opacity: 0.35;
}
.map-reset {
    border: 1px solid #dce5df;
    background: #fff;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--green);
    cursor: pointer;
}
.map-reset:hover {
    background: #edf5ef;
}
.map-layout {
    grid-area: map;
    display: flex;
    align-items: center;
    height: 356px;
    padding: 0;
}
.province-map {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 356px;
    width: 100%;
    background: transparent;
    overflow: hidden;
}
.province-map svg {
    display: block;
    width: 100%;
    height: 356px;
}
.province path {
    fill: #e6ece8;
    stroke: #fff;
    stroke-width: 1.3;
    vector-effect: non-scaling-stroke;
    transition: fill 0.15s;
    cursor: pointer;
}
.province.has-data path {
    fill: #b2d2bd;
}
.province:hover path,
.province:focus-visible path {
    fill: #71b58e;
    stroke: #287c55;
    stroke-width: 1.5;
    outline: none;
}
.province.selected path {
    fill: #287c55;
    stroke: #184e37;
    stroke-width: 1.5;
}
.province:focus,
.province:focus-visible {
    outline: none;
}
.province-label {
    pointer-events: none;
}
.province-label.callout text {
    pointer-events: all;
    cursor: pointer;
}
.province-label text {
    fill: #42574a;
    font-size: 18px;
    text-anchor: middle;
    font-weight: 600;
    paint-order: stroke;
    stroke: #f8faf8;
    stroke-width: 3px;
    stroke-linejoin: round;
}
.province-label.selected text {
    fill: #165638;
    font-weight: 800;
}
.province-label line {
    stroke: #809789;
    stroke-width: 1;
    pointer-events: none;
}
.map-caption {
    grid-area: caption;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 0;
    height: 36px;
    gap: 12px;
    font-size: 11px;
    color: #7b8782;
}
.map-caption span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.map-key {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: #e6ece8;
    display: inline-block;
    border: 1px solid #d1dcd4;
}
.map-key.available {
    background: #b2d2bd;
    border-color: #97bea4;
}
.map-caption a {
    margin-left: auto;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.map-loading {
    padding: 24px;
    text-align: center;
    font-size: 14px;
}
.region-crops-table td {
    padding: 20px 24px;
    font-variant-numeric: tabular-nums;
    font-size: 15px;
}
.region-crops-table th {
    padding: 15px 24px;
}
.region-crops-table tbody tr:hover {
    background: #f8fbf9;
}
.region-crops-table tfoot td,
.region-crops-table tfoot th {
    background: #f0f5f1;
    color: #2b5b3e;
    font-weight: 700;
    font-size: 14px;
    padding: 18px 24px;
}
.table-crop-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 10px;
}
[hidden] {
    display: none !important;
}
.progress-chart-frame { position: relative; height: 270px; width: 100%; }
.chart-tooltip {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    max-width: min(320px, calc(100vw - 16px));
    padding: 10px 12px;
    border-radius: 8px;
    background: #21342d;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
    font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.chart-tooltip strong { display: block; margin-bottom: 3px; }
.donut { position: relative; background: transparent; }
.donut > canvas { position: absolute; inset: 0; }
.donut > .donut-center { position: relative; pointer-events: none; background: transparent; }
.chart-grid {
    grid-template-columns: 1fr 1fr;
}
#crops {
    display: flex;
    flex-direction: column;
}
.crop-chart {
    flex: 1;
    justify-content: center;
    gap: 32px;
    padding: 24px;
    min-width: 0;
}
.donut {
    width: clamp(220px, 16vw, 280px);
    height: auto;
    aspect-ratio: 1;
}
.donut > div {
    width: 75%;
    height: 75%;
    gap: 8px;
}
.donut small,
.donut span {
    font-size: 14px;
}
.donut strong {
    font-size: 32px;
}
.legend {
    flex: 1;
    max-width: none;
    min-width: 0;
}
.legend-row {
    grid-template-columns: 12px 1fr auto;
    gap: 10px;
    margin: 0;
    padding: 16px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--line);
}
.legend-row:last-child {
    border-bottom: 0;
}
.legend-row > span:last-child {
    text-align: right;
    font-size: 17px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.legend-row small {
    font-size: 13px;
    font-weight: 400;
    margin-top: 6px;
}
.legend-dot {
    width: 10px;
    height: 10px;
}
.mini-progress i {
    height: 7px;
    width: 80px;
}
@media (max-width: 1250px) {
    .region-grid {
        grid-template-columns: 1fr;
        grid-template-areas: "map" "caption" "detail-heading" "table" "status";
        grid-template-rows: 356px 36px 44px 312px 36px;
        row-gap: 12px;
    }
    .chart-grid {
        grid-template-columns: 1fr;
    }
    .crop-chart {
        gap: 40px;
        padding: 24px 32px;
    }
    .donut {
        width: 240px;
    }
    .legend {
        max-width: 380px;
    }
}
@media (max-width: 800px) {
    .crop-chart {
        gap: 24px;
        padding: 24px;
    }
}
@media (max-width: 520px) {
    .region-grid {
        padding: 16px;
    }
    .nationwide-heading > div:first-child {
        display: block;
    }
    .nationwide-heading p {
        margin-top: 4px;
    }
    .region-header-actions {
        gap: 8px;
        flex-direction: column;
        align-items: flex-end;
    }
    .map-layout {
        grid-template-columns: 1fr;
        padding: 0;
    }
    .province-map svg {
        height: 356px;
    }
    .province-map {
        height: 356px;
    }
    .map-caption {
        padding: 0;
    }
    .region-summary strong {
        font-size: 20px;
    }
    .region-crops-table th,
    .region-crops-table td {
        padding: 16px;
    }
    .crop-chart {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }
    .donut {
        width: 220px;
    }
    .legend {
        width: 100%;
        max-width: none;
    }
}
