:root {
    --bg: #eef7fc;
    --panel: #ffffff;
    --panel-strong: #f3f9fd;
    --line: #bfd6e5;
    --line-dark: #7ea6bd;
    --text: #142733;
    --muted: #55707f;
    --point: #287ca8;
    --point-dark: #145577;
    --steel: #3d6678;
    --forest: #2f6f7f;
    --ok: #2f6b5a;
    --error: #b3483d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        linear-gradient(90deg, rgba(40, 124, 168, 0.055) 0 1px, transparent 1px 44px),
        linear-gradient(180deg, #dff2fb 0%, var(--bg) 42%, #f8fcff 100%);
    color: var(--text);
    font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
    font-size: 18px;
    line-height: 1.5;
}

.page {
    max-width: 760px;
    margin: 0 auto;
    padding: 18px 14px 34px;
}

.hero {
    background:
        linear-gradient(90deg, rgba(40, 124, 168, 0.12) 0 10px, transparent 10px 22px),
        linear-gradient(135deg, #ffffff 0%, #eef8fe 56%, #dceff9 100%);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(25, 72, 96, 0.12);
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 16px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 36%;
    height: 100%;
    background:
        repeating-linear-gradient(135deg, transparent 0 16px, rgba(40, 124, 168, 0.09) 16px 22px),
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26));
    pointer-events: none;
}

.hero-brand,
.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-brand {
    width: 86px;
    height: 86px;
    background: #ffffff;
    border: 1px solid rgba(126, 166, 189, 0.6);
    border-radius: 12px;
    padding: 11px;
    box-shadow: inset 0 0 0 4px #edf8fd, 0 8px 18px rgba(25, 72, 96, 0.12);
}

.hero-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-kicker {
    color: var(--steel);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.hero h1 {
    margin: 0 0 6px;
    font-size: 1.85rem;
    line-height: 1.18;
}

.hero p {
    margin: 0;
    font-size: 1rem;
    color: var(--muted);
}

.tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 16px 0;
}

.tab {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 58px;
    padding: 10px 8px;
    background: #d9edf7;
    color: var(--text);
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid rgba(126, 166, 189, 0.55);
    font-weight: 700;
    box-shadow: 0 3px 0 rgba(20, 85, 119, 0.09);
}

.tab.active {
    background: #fff;
    border-color: var(--point);
    color: var(--point-dark);
    box-shadow: inset 0 0 0 1px var(--point);
}

.card,
.result-card,
.empty-state,
.result-summary,
.pager,
.flash {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(45, 39, 29, 0.08);
}

.card,
.result-card,
.empty-state,
.result-summary,
.pager {
    padding: 16px;
    margin-bottom: 14px;
}

.stack-form {
    display: grid;
    gap: 10px;
}

.inline-fields {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(120px, 1fr);
    gap: 10px;
}

.field-group {
    display: grid;
    gap: 10px;
}

label {
    font-weight: 700;
    font-size: 1.05rem;
}

.done-label {
    color: var(--error);
}

input,
select,
button {
    min-height: 54px;
    border-radius: 10px;
    border: 1px solid var(--line);
    font-size: 1.05rem;
    padding: 10px 14px;
    background: #fffefb;
}

input:focus,
select:focus {
    outline: 3px solid rgba(47, 94, 78, 0.16);
    border-color: var(--forest);
}

button,
.pager-button {
    background: var(--point);
    color: white;
    font-weight: 700;
    border-color: var(--point);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 0 rgba(20, 85, 119, 0.2);
}

.result-list {
    display: grid;
    gap: 14px;
}

.result-row {
    padding: 8px 0;
    border-bottom: 1px solid #e9ddcb;
}

.result-row:last-child {
    border-bottom: 0;
}

.result-label {
    font-weight: 700;
    color: var(--point-dark);
    margin-bottom: 4px;
}

.result-value {
    word-break: break-word;
    font-size: 1.06rem;
}

.detail-toggle {
    margin-top: 12px;
}

.detail-toggle summary {
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 14px;
    background: #fffefb;
    color: var(--point-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
    list-style: none;
}

.detail-toggle summary::-webkit-details-marker {
    display: none;
}

.detail-arrow {
    font-size: 1.45rem;
    line-height: 1;
}

.detail-toggle[open] .detail-arrow {
    transform: rotate(180deg);
}

.detail-field-list {
    margin-top: 10px;
    border-top: 2px solid #d7ebf5;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.flash-list {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.flash {
    padding: 14px 16px;
    font-weight: 700;
}

.flash.success {
    color: var(--ok);
}

.flash.error {
    color: var(--error);
}

.empty-state {
    text-align: center;
    font-weight: 700;
}

.summary-grid {
    display: grid;
    gap: 14px;
}

.summary-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(102, 73, 28, 0.08);
    padding: 16px;
}

.summary-title {
    color: var(--point-dark);
    font-weight: 700;
    margin-bottom: 6px;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.monthly-summary {
    margin-top: 14px;
}

.monthly-list {
    display: grid;
    gap: 14px;
}

.monthly-row {
    display: grid;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid #d7ebf5;
}

.monthly-row:last-child {
    border-bottom: 0;
}

.monthly-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.monthly-head strong {
    color: var(--text);
    font-size: 1.12rem;
}

.monthly-head span {
    color: var(--point-dark);
    font-size: 1.3rem;
    font-weight: 800;
    white-space: nowrap;
}

.monthly-bar {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #d7ebf5;
}

.monthly-bar-fill {
    height: 100%;
    min-width: 8px;
    border-radius: inherit;
    background: var(--point);
}

.monthly-qty {
    color: rgba(44, 36, 24, 0.72);
    font-weight: 700;
    text-align: right;
}

.stats-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.stats-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(102, 73, 28, 0.08);
    padding: 16px;
    margin-bottom: 14px;
}

.section-heading {
    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
}

.section-heading p {
    margin: 0;
    color: rgba(44, 36, 24, 0.72);
    font-size: 0.95rem;
}

.stats-list {
    display: grid;
    gap: 12px;
}

.stats-list.compact {
    gap: 10px;
}

.stats-row-card {
    display: grid;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid #d7ebf5;
}

.stats-row-card:last-child {
    border-bottom: 0;
}

.stats-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.stats-row-head strong {
    font-size: 1.1rem;
}

.stats-row-head span {
    color: var(--point-dark);
    font-size: 1.25rem;
    font-weight: 800;
    white-space: nowrap;
}

.stats-bar {
    height: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: #d7ebf5;
}

.stats-bar-fill {
    height: 100%;
    min-width: 8px;
    border-radius: inherit;
    background: var(--point);
}

.process-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.process-chip {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 5px 10px;
    background: #fffefb;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
}

.process-chip.bottom {
    border-color: #287ca8;
}

.process-chip.side {
    border-color: #3a8f9d;
}

.process-chip.frame {
    border-color: #6c91c2;
}

.day-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.total-card {
    background: #eff8fd;
}

.site-footer {
    margin-top: 22px;
    padding: 14px;
    color: rgba(44, 36, 24, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(191, 214, 229, 0.9);
    border-radius: 12px;
}

.footer-full-mark {
    display: block;
    width: min(360px, 100%);
    max-height: 58px;
    object-fit: contain;
    background: #fff;
    border: 1px solid rgba(191, 214, 229, 0.95);
    border-radius: 8px;
    padding: 8px;
}

@media (max-width: 480px) {
    body {
        font-size: 19px;
    }

    .page {
        padding: 12px 10px 28px;
    }

    .hero h1 {
        font-size: 1.55rem;
    }

    .hero {
        grid-template-columns: 72px 1fr;
        gap: 12px;
        padding: 16px;
    }

    .hero-brand {
        width: 72px;
        height: 72px;
    }

    .hero-logo {
        max-height: none;
    }

    .inline-fields {
        grid-template-columns: 1fr;
    }

    .tabs {
        grid-template-columns: repeat(2, 1fr);
    }

    .tab {
        padding: 12px 8px;
    }

    .stats-filter-grid,
    .day-stats-grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        text-align: center;
    }
}
