/* =========================
   컬러 / 공통 변수
========================= */
:root {
    --main-color: #30415d;
    --main-color-dark: #243349;
    --main-color-light: #eef2f7;

    --topbar-bg: #30415d;
    --topbar-text: #ffffff;

    --sidebar-bg: #f4f5f7;
    --content-bg: #ffffff;
    --card-bg: #ffffff;

    --text-color: #222222;
    --sub-text-color: #666666;
    --border-color: #e3e6ea;
    --hover-bg: #e9edf2;

    --danger-color: #d93025;
    --danger-bg: #fff1f1;
    --danger-border: #f0c9c9;

    --blue-color: #1976d2;
    --blue-light: #eaf4ff;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
}

/* =========================
   기본 리셋
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    background: var(--content-bg);
    color: var(--text-color);
    font-family: "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* =========================
   앱 전체 구조
========================= */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* =========================
   상단바
========================= */
.topbar {
    height: 56px;
    background: var(--topbar-bg);
    color: var(--topbar-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
}

.home-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.home-link:hover {
    opacity: 0.88;
}

.topbar-right {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

/* =========================
   사이드바
========================= */
.sidebar {
    width: 220px;
    flex: 0 0 220px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 16px 14px 20px;
}

.menu a {
    display: block;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: var(--radius-sm);
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.menu a:hover {
    background: var(--hover-bg);
    color: #111111;
}

.menu a.active {
    background: var(--main-color-light);
    color: var(--main-color);
}

/* =========================
   메인 컨텐츠 영역
========================= */
.content {
    flex: 1;
    min-width: 0;
    background: var(--content-bg);
    display: flex;
    flex-direction: column;
}

.page-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 18px 24px;
}

.page-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.4;
}

.page-body {
    flex: 1;
    padding: 24px;
    background: #ffffff;
}

/* =========================
   카드
========================= */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

/* =========================
   상단 버튼 바
========================= */
.top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* =========================
   버튼
========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #d0d5db;
    border-radius: var(--radius-sm);
    background: #f7f8fa;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

.btn:hover {
    background: #eef1f4;
    border-color: #c7ced6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn.active {
    background: var(--main-color);
    border-color: var(--main-color);
    color: #ffffff;
}

.btn.active:hover {
    background: var(--main-color-dark);
    border-color: var(--main-color-dark);
}

.btn-sm {
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
}

.btn-wide {
    letter-spacing: 4px;
}

.btn-danger {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: #b42318;
}

.btn-danger:hover {
    background: #ffe5e5;
    border-color: #ebb2b2;
}

.btn-search {
    background: var(--main-color-light);
    color: var(--main-color);
    border-color: #d4dbe6;
}

.btn-search:hover {
    background: #e3e8f2;
}

.btn-reset {
    background: #f1f3f5;
    color: #555555;
    border-color: #d6dbe1;
}

.btn-reset:hover {
    background: #e6e9ee;
}

button:disabled,
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* =========================
   테이블 공통
========================= */
.table-box {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #ffffff;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background: #f7f8fa;
    color: #333333;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 700;
    padding: 10px;
    text-align: center;
    vertical-align: middle;
}

tbody td {
    border-top: 1px solid #edf0f2;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    vertical-align: middle;
}

tbody tr:nth-child(even) {
    background: #fafbfc;
}

tbody td:first-child {
    font-weight: 600;
}

td .btn {
    margin: 0 2px;
}

td .btn-sm {
    min-width: 52px;
}

.num {
    text-align: right;
    white-space: nowrap;
}

.center {
    text-align: center;
    vertical-align: middle;
}

.empty {
    padding: 24px;
    text-align: center;
    color: var(--sub-text-color);
}

/* =========================
   링크 / 강조
========================= */
.table-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.table-link:hover {
    color: var(--blue-color);
    text-decoration: underline;
}

.red {
    color: var(--danger-color);
    font-weight: 700;
}

.bold {
    font-weight: 600;
}

.base-material {
    color: #1565c0;
    font-weight: 700;
}

/* =========================
   상태 배지
========================= */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.status-on {
    background: var(--main-color-light);
    color: var(--main-color);
    border: 1px solid #d6dde8;
}

.status-off {
    background: var(--danger-bg);
    color: #c62828;
    border: 1px solid var(--danger-border);
}

.inactive-row {
    opacity: 0.72;
}

/* =========================
   플래시 메시지
========================= */
.flash-box {
    background: #fff3f3;
    border: 1px solid var(--danger-border);
    color: #8a2d2d;
    padding: 12px 14px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.5;
}

/* =========================
   폼 공통
========================= */
.form-card {
    margin-bottom: 20px;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(25% - 12px);
    min-width: 160px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    line-height: 1.4;
}

.form-group input,
.form-group select,
.form-group textarea,
#calcDisplay {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfd5db;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-color);
    background: #ffffff;
    line-height: 1.4;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input,
.form-group select {
    height: 42px;
}

.form-group textarea {
    min-height: 88px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
#calcDisplay:focus {
    outline: none;
    border-color: var(--main-color);
    box-shadow: 0 0 0 3px rgba(48, 65, 93, 0.12);
}

.btn-group {
    margin-left: auto;
    width: auto;
    min-width: auto;
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: flex-end;
}

/* =========================
   수정 / 상세 페이지
========================= */
.edit-card {
    max-width: 760px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item label {
    font-size: 14px;
    font-weight: 600;
    color: #333333;
    line-height: 1.4;
}

.info-value,
.input-like {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #f8f9fa;
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.4;
}

.form-actions,
.btn-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.edit-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.edit-row .form-group {
    flex: 1;
    min-width: 140px;
}

.edit-row .form-group:first-child {
    flex: 1.2;
}

.edit-row .form-group:nth-child(2),
.edit-row .form-group:nth-child(3) {
    flex: 0.8;
}

.edit-row input {
    height: 42px;
}

/* =========================
   요약 / 합계
========================= */
.section-title {
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 16px;
}

.section-top {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.total-box {
    font-weight: 700;
    font-size: 16px;
}

.total-warning {
    color: #d32f2f;
}

.total-ok {
    color: var(--blue-color);
}

.summary-card {
    margin-bottom: 20px;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
}

.summary-table td {
    border: 1px solid var(--border-color);
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.6;
    vertical-align: middle;
    text-align: left;
    color: var(--text-color);
}

.summary-table td strong {
    display: inline-block;
    min-width: 78px;
    color: #333333;
    font-weight: 700;
}

/* =========================
   도움말 / 자동완성
========================= */
.help-text,
.bulk-help,
.bulk-help-text {
    font-size: 13px;
    color: #666666;
    line-height: 1.5;
}

.search-group {
    position: relative;
}

.suggest-box {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #d9dee3;
    border-radius: var(--radius-sm);
    margin-top: 4px;
    z-index: 1000;
    max-height: 240px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.suggest-item {
    padding: 10px 12px;
    cursor: pointer;
}

.suggest-item:hover,
.suggest-item.active {
    background: var(--blue-light);
}

/* =========================
   제품 / 생산 관련 공통
========================= */
.product-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 20px;
    margin-bottom: 25px;
    align-items: start;
}

.product-name-group {
    flex: 1;
    width: calc(75% - 12px);
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.product-form-row .form-group {
    width: calc(15% - 13px);
}

.product-form-row .form-group:last-child {
    width: calc(66% - 13px);
}

.production-form .form-group {
    width: calc(20% - 13px);
    min-width: 120px;
}

.production-save-group {
    width: auto !important;
    min-width: auto !important;
    margin-left: auto;
    flex: 0 0 auto;
}

/* =========================
   recipes.html 전용
========================= */
.recipe-top-row .product-select-group {
    flex: 0 0 60% !important;
    max-width: 60% !important;
    min-width: 600px !important;
}

.recipe-single-row .recipe-search-group {
    width: calc(30% - 12px);
    min-width: 220px;
}

.recipe-single-row .recipe-selected-group {
    width: calc(30% - 12px);
    min-width: 220px;
}

.recipe-single-row .recipe-ratio-group {
    width: calc(15% - 12px);
    min-width: 120px;
}

.recipe-single-row .recipe-add-btn-group {
    width: calc(12% - 12px);
    min-width: 110px;
    margin-left: auto;
}

.bulk-inline-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.bulk-guide-box {
    width: 150px;
    flex: 0 0 150px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bulk-text-box {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bulk-btn-box {
    width: 120px;
    flex: 0 0 120px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bulk-help-text {
    margin-bottom: 0;
    min-height: 88px;
    padding: 10px 12px;
    border: 1px solid #cccccc;
    border-radius: var(--radius-sm);
    background: #fafafa;
    box-sizing: border-box;
    white-space: nowrap;
}

.bulk-textarea {
    width: 100%;
    height: 44px;
    min-height: 44px;
    max-height: 120px;
    resize: none;
    transition: height 0.2s ease;
}

.bulk-textarea.expanded {
    height: 120px;
}

.bulk-submit-btn {
    width: 100%;
    height: 88px;
    letter-spacing: 0;
}

.bulk-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
    color: #555555;
}

.bulk-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.recipe-copy-row .recipe-copy-select-group {
    width: calc(40% - 12px);
    min-width: 320px;
}

.recipe-copy-row .recipe-copy-btn-group {
    width: calc(12% - 12px);
    min-width: 120px;
    margin-left: auto;
}

/* =========================
   거래로그 입력폼 보정
========================= */
.form-card .filter-form .form-row:nth-child(1) .form-group {
    width: calc(25% - 12px);
    min-width: 160px;
}

.form-card .filter-form .form-row:nth-child(2) .form-group {
    width: calc(20% - 13px);
    min-width: 140px;
}

.form-card .filter-form .form-row:nth-child(2) .btn-group .btn {
    min-width: 110px;
    letter-spacing: 2px;
}

.form-card .filter-form label {
    margin-bottom: 2px;
}

/* =========================
   거래로그 조회영역 압축형
========================= */
.search-inline-form {
    gap: 0;
}

.search-inline-form .search-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}

.search-inline-form .search-row .form-group,
.search-inline-form .search-row .form-group.small {
    width: 110px !important;
    min-width: 110px !important;
    flex: 0 0 110px !important;
    gap: 4px;
}

.search-inline-form .search-row .form-group.small:nth-child(1),
.search-inline-form .search-row .form-group.small:nth-child(2) {
    width: 135px !important;
    min-width: 135px !important;
    flex: 0 0 135px !important;
}

.search-inline-form .search-row .form-group.small:nth-child(4) {
    width: 150px !important;
    min-width: 150px !important;
    flex: 0 0 150px !important;
}

.search-inline-form .search-row label {
    font-size: 12px;
    margin-bottom: 2px;
    line-height: 1.2;
}

.search-inline-form .search-row input,
.search-inline-form .search-row select {
    width: 100%;
    height: 36px;
    padding: 6px 8px;
    font-size: 13px;
}

.search-inline-form .btn-inline-group {
    margin-left: auto;
    display: flex !important;
    flex-direction: row !important;
    gap: 8px;
    align-items: flex-end;
    justify-content: flex-end;
    flex: 0 0 auto;
    width: auto !important;
    min-width: auto !important;
}

.search-inline-form .btn-inline-group .btn {
    height: 36px;
    padding: 0 14px;
}

/* =========================
   계산기 모달
========================= */
.calc-modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.calc-box {
    background: #ffffff;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 260px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: 700;
}

.calc-header button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

#calcDisplay {
    height: 40px;
    margin-bottom: 10px;
    text-align: right;
    font-size: 18px;
    padding: 5px 10px;
}

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

.calc-grid button {
    height: 40px;
    padding: 0;
    font-size: 14px;
    border: 1px solid #d0d5db;
    border-radius: 8px;
    background: #f7f8fa;
    cursor: pointer;
}

.calc-grid button:hover {
    background: #eef1f4;
}

.equal {
    grid-column: span 4;
    background: var(--main-color) !important;
    color: #ffffff;
    border-color: var(--main-color) !important;
}

.equal:hover {
    background: var(--main-color-dark) !important;
}

/* =========================
   푸터
========================= */
.footer-copy {
    position: fixed;
    bottom: 10px;
    right: 14px;
    font-size: 12px;
    color: #999999;
    opacity: 0.8;
    pointer-events: none;
}

/* =========================
   반응형
========================= */
@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-name-group {
        width: calc(75% - 12px);
    }

    .form-card .filter-form .form-row:nth-child(1) .form-group,
    .form-card .filter-form .form-row:nth-child(2) .form-group {
        width: calc(50% - 8px);
        min-width: 180px;
    }

    .form-card .filter-form .form-row:nth-child(2) .btn-group {
        margin-left: 0;
        width: calc(50% - 8px);
        justify-content: flex-start;
    }
}

@media (max-width: 1000px) {
    .recipe-top-row .product-select-group,
    .recipe-single-row .recipe-search-group,
    .recipe-single-row .recipe-selected-group,
    .recipe-single-row .recipe-ratio-group,
    .recipe-single-row .recipe-add-btn-group,
    .recipe-copy-row .recipe-copy-select-group,
    .recipe-copy-row .recipe-copy-btn-group {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        margin-left: 0;
        flex: 1 1 100% !important;
    }

    .bulk-inline-row {
        flex-direction: column;
    }

    .bulk-guide-box,
    .bulk-text-box,
    .bulk-btn-box {
        width: 100%;
        flex: 1 1 auto;
    }

    .bulk-textarea,
    .bulk-submit-btn,
    .bulk-help-text {
        height: auto;
        min-height: auto;
        max-height: none;
    }
}

@media (max-width: 700px) {
    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        flex: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .topbar {
        padding: 0 14px;
        height: auto;
        min-height: 56px;
        flex-wrap: wrap;
        gap: 6px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .page-header {
        padding: 16px 18px;
    }

    .page-body {
        padding: 18px;
    }

    .form-group,
    .form-card .filter-form .form-row:nth-child(1) .form-group,
    .form-card .filter-form .form-row:nth-child(2) .form-group,
    .form-card .filter-form .form-row:nth-child(2) .btn-group {
        width: 100%;
        min-width: 100%;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .search-inline-form .search-row {
        flex-wrap: wrap;
    }

    .search-inline-form .search-row .form-group,
    .search-inline-form .search-row .form-group.small,
    .search-inline-form .search-row .form-group.small:nth-child(1),
    .search-inline-form .search-row .form-group.small:nth-child(2),
    .search-inline-form .search-row .form-group.small:nth-child(4) {
        width: 100% !important;
        min-width: 100% !important;
        flex: 1 1 100% !important;
    }

    .search-inline-form .btn-inline-group {
        margin-left: 0;
        width: 100% !important;
        justify-content: flex-start;
    }

    .footer-copy {
        position: static;
        padding: 14px 18px;
        text-align: right;
    }
}

/* =========================
   인쇄 대응
========================= */
@media print {
    .no-print,
    .sidebar,
    .topbar,
    .page-header,
    .top-bar,
    .btn,
    button,
    form,
    .footer-copy {
        display: none !important;
    }

    body {
        background: #ffffff !important;
    }

    .app-shell,
    .layout {
        display: block !important;
    }

    .content {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .page-body {
        padding: 0 !important;
    }

    .card,
    .table-box {
        box-shadow: none !important;
        border: 1px solid #cccccc !important;
    }
}

.topbar {
    height: 64px;
    background: #31456a; /* 밝은 네이비 */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 좌측 홈 링크 */
.home-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 6px 10px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

/* 마우스 올렸을 때 */
.home-link:hover {
    background: rgba(255,255,255,0.15);
}

/* 클릭 느낌 */
.home-link:active {
    transform: scale(0.96);
}

/* 우측 시계 */
.topbar-right {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.95;
}

.calendar-wrap {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
}

.calendar-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.calendar-title {
    font-size: 22px;
    font-weight: bold;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-weekdays div {
    text-align: center;
    font-weight: bold;
}

.calendar-days {
    grid-auto-rows: 100px;
}

.calendar-cell {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 6px;
}

.date-num {
    font-weight: bold;
}

.sunday-cell {
    color: red;
}

.saturday-cell {
    color: blue;
}

.today {
    background: #eaf2ff;
    border: 2px solid #31456a;
}

.muted {
    background: #f3f3f3;
}

.page-header {
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 28px;
    margin-bottom: 6px;
}

.page-desc {
    color: #666;
    font-size: 14px;
}

.calendar-wrap {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
}

.calendar-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #1f2a44;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-weekdays {
    margin-bottom: 8px;
}

.calendar-weekdays div {
    text-align: center;
    font-weight: 700;
    padding: 10px 0;
    background: #eef2f7;
    border-radius: 10px;
}

.calendar-weekdays .sun {
    color: #d93c3c;
}

.calendar-weekdays .sat {
    color: #2d63d6;
}

.calendar-row {
    margin-bottom: 8px;
}

.calendar-cell {
    min-height: 110px;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 8px;
    background: #fafbfd;
}

.date-num {
    font-weight: 700;
    margin-bottom: 6px;
}

.holiday-name {
    font-size: 12px;
    color: #c53030;
    font-weight: 700;
    line-height: 1.4;
}

.muted {
    background: #f1f3f6;
    color: #aaa;
}

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

.calendar-toolbar-right {
    display: flex;
    gap: 8px;
}

.today-cell {
    border: 2px solid #31456a;
    background: #eef4ff;
    box-shadow: 0 0 0 2px rgba(49, 69, 106, 0.08);
}

.saturday-cell .date-num {
    color: #2d63d6;
}

.sunday-cell .date-num {
    color: #d93c3c;
}

.holiday-cell .date-num {
    color: #d93c3c;
}

.sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 하단 영역 */
.sidebar-bottom {
    margin-top: 20px;
}

/* 백업 버튼 */
.backup-btn {
    display: block;
    padding: 12px 14px;
    background: #31456a;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    transition: all 0.2s ease;
}

.backup-btn:hover {
    background: #276749;
    transform: translateY(-1px);
}