body {
    font-family: Arial, "맑은 고딕", sans-serif;
    margin: 0;
    background-color: #f5f6fa;
    color: #222;
}

header {
    background-color: #1f2937;
    color: white;
    padding: 20px 30px;
}

header h1 {
    margin: 0;
    font-size: 24px;
}

main {
    padding: 24px;
}

a {
    color: #2563eb;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

.card {
    background-color: white;
    border-radius: 10px;
    padding: 24px;
    max-width: 1200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 표(목록)를 품은 카드는 폭 제한을 풀어 화면을 꽉 쓴다.
   본문/폼 위주 카드는 그대로 1200px 유지(가독성). */
.card:has(.table-wrap),
.card:has(.wide-table-wrap) {
    max-width: none;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.description {
    color: #555;
    margin-top: 0;
    margin-bottom: 20px;
}

.menu-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 12px;
    padding-left: 0;
    list-style: none;
}

.menu-list li {
    background-color: #eef2ff;
    border-radius: 8px;
}

.menu-list li a,
.menu-list li span {
    display: block;
    padding: 14px 16px;
}

.menu-list li a {
    color: #1d4ed8;
}

.menu-list li span {
    color: #6b7280;
}

.menu-list strong {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
}

.menu-list small {
    display: block;
    font-size: 13px;
    font-weight: normal;
    color: #6b7280;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.search-box input {
    width: 320px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: Arial, "맑은 고딕", sans-serif;
}

.search-box input:focus {
    outline: none;
    border-color: #2563eb;
}

.table-wrap {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background-color: #f3f4f6;
    color: #111827;
    text-align: left;
    padding: 9px 10px;
    border-bottom: 2px solid #d1d5db;
    white-space: nowrap;
}

.data-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background-color: #f9fafb;
}

.data-table td.note-cell {
    max-width: 220px;
    white-space: normal;
    line-height: 1.4;
}

.empty-row {
    text-align: center;
    color: #777;
    padding: 24px;
}

.status-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background-color: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: bold;
}

.archived-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background-color: #e5e7eb;
    color: #374151;
    font-size: 12px;
    font-weight: bold;
}

.form-box {
    max-width: 700px;
}

.form-row {
    margin-bottom: 16px;
}

.form-row label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

.form-row input,
.form-row textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: Arial, "맑은 고딕", sans-serif;
}

.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.button-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.danger-button {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    font-family: Arial, "맑은 고딕", sans-serif;
}

.data-table .primary-button,
.data-table .secondary-button,
.data-table .danger-button {
    padding: 7px 12px;
    font-size: 13px;
}

.primary-button {
    background-color: #2563eb;
    color: white;
}

.secondary-button {
    background-color: #e5e7eb;
    color: #111827;
}

.danger-button {
    background-color: #dc2626;
    color: white;
}

.detail-table {
    width: 100%;
    max-width: 800px;
    border-collapse: collapse;
    font-size: 14px;
}

.detail-table th {
    width: 160px;
    background-color: #f3f4f6;
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
}

.detail-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.form-row select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: Arial, "맑은 고딕", sans-serif;
    background-color: white;
}

.wide-form h3 {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/* B069-3 attendance menu/layout */
.wide-card {
    max-width: none;
}
.wrap-search {
    flex-wrap: wrap;
    align-items: flex-end;
}
.wrap-search label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #374151;
    font-weight: 700;
}
.search-box select,
.wrap-search select {
    min-width: 160px;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: Arial, "맑은 고딕", sans-serif;
    background: #fff;
}
.attendance-table-wrap {
    max-height: 75vh;
}
.attendance-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
}
.attendance-grid td.att-cell {
    text-align: center;
    font-weight: 700;
}
.attendance-grid .att-b,
.attendance-grid .att-h,
.attendance-grid .att-v {
    color: #6b7280;
}
.attendance-grid .att-x {
    color: #b91c1c;
}

/* B069_7_ATTENDANCE_LAYOUT_PRINT_SORT_START */
.compact-help {
    margin-top: -6px;
    color: #6b7280;
}
.compact-attendance-wrap {
    max-height: 75vh;
    overflow: auto;
}
.compact-attendance-grid {
    table-layout: fixed;
    width: max-content;
    min-width: 1280px;
    font-size: 12px;
}
.compact-attendance-grid th,
.compact-attendance-grid td {
    padding: 6px 5px;
    line-height: 1.15;
    text-align: center;
}
.compact-attendance-grid th:nth-child(1),
.compact-attendance-grid td:nth-child(1) { width: 58px; }
.compact-attendance-grid th:nth-child(2),
.compact-attendance-grid td:nth-child(2) { width: 58px; }
.compact-attendance-grid th:nth-child(3),
.compact-attendance-grid td:nth-child(3) { width: 90px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; }
.compact-attendance-grid th:nth-child(4),
.compact-attendance-grid td:nth-child(4) { width: 84px; max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
.compact-attendance-grid th:nth-child(5),
.compact-attendance-grid td:nth-child(5) { width: 56px; max-width: 56px; overflow: hidden; text-overflow: ellipsis; }
.compact-attendance-grid th:nth-child(6),
.compact-attendance-grid td:nth-child(6),
.compact-attendance-grid th:nth-child(7),
.compact-attendance-grid td:nth-child(7) { width: 78px; max-width: 78px; overflow: hidden; text-overflow: ellipsis; }
.compact-attendance-grid th:nth-child(8),
.compact-attendance-grid td:nth-child(8) {
    width: 168px;
    max-width: 168px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.compact-attendance-grid .day-head,
.compact-attendance-grid .att-cell {
    width: 26px;
    min-width: 26px;
    max-width: 26px;
    padding-left: 2px;
    padding-right: 2px;
}
.compact-attendance-grid th:nth-last-child(5),
.compact-attendance-grid td:nth-last-child(5),
.compact-attendance-grid th:nth-last-child(4),
.compact-attendance-grid td:nth-last-child(4),
.compact-attendance-grid th:nth-last-child(3),
.compact-attendance-grid td:nth-last-child(3) { width: 36px; }
.compact-attendance-grid th:nth-last-child(2),
.compact-attendance-grid td:nth-last-child(2) { width: 52px; }
.compact-attendance-grid th:nth-last-child(1),
.compact-attendance-grid td:nth-last-child(1) { width: 58px; }
.compact-attendance-grid .sortable-th {
    cursor: pointer;
    user-select: none;
}
.compact-attendance-grid .sortable-th:hover {
    background: #e5e7eb;
}
.compact-attendance-grid .sort-asc::after {
    content: " ▲";
    font-size: 10px;
}
.compact-attendance-grid .sort-desc::after {
    content: " ▼";
    font-size: 10px;
}
@media print {
    @page {
        size: A4 landscape;
        margin: 8mm;
    }
    body {
        background: #fff !important;
    }
    header,
    nav,
    .navbar,
    .sidebar,
    .no-print,
    .button-row,
    .search-box {
        display: none !important;
    }
    .card,
    .wide-card,
    .attendance-print-area {
        box-shadow: none !important;
        border: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: none !important;
    }
    .table-wrap,
    .attendance-table-wrap,
    .compact-attendance-wrap {
        overflow: visible !important;
        max-height: none !important;
        width: 100% !important;
    }
    .compact-attendance-grid {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 8px !important;
        table-layout: fixed !important;
    }
    .compact-attendance-grid th,
    .compact-attendance-grid td {
        padding: 2px 1px !important;
        line-height: 1.05 !important;
        white-space: nowrap !important;
    }
    .compact-attendance-grid th:nth-child(8),
    .compact-attendance-grid td:nth-child(8) {
        max-width: 55px !important;
    }
    .attendance-grid th {
        position: static !important;
    }
    h2 {
        margin: 0 0 6px 0 !important;
        font-size: 14px !important;
    }
    .attendance-print-summary {
        margin: 0 0 6px 0 !important;
        font-size: 9px !important;
    }
}
/* B069_7_ATTENDANCE_LAYOUT_PRINT_SORT_END */

/* B071_2 schedule alert cleanup */
.schedule-guide-card { border-left: 4px solid #2563eb; }
.schedule-step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.schedule-step-grid > div { background: #f8fafc; border: 1px solid #dbe4f0; border-radius: 10px; padding: 10px; }
.schedule-result-actions { gap: 8px; flex-wrap: wrap; }
@media print {
    body { background: white !important; }
    .sidebar, .topbar, .alert-toolbar, .schedule-guide-card, .alert-actions, form#scheduleNoticeForm { display: none !important; }
    .main, .content { margin: 0 !important; padding: 0 !important; }
    .alert-card, .wide-table-wrap { box-shadow: none !important; border: 0 !important; }
    table.wide-table { font-size: 10px !important; }
}
/* B096 counseling/admin common layout helpers */
.summary-grid {
    display: grid;
    gap: 12px;
}
.summary-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}
.summary-label {
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}
.summary-value {
    color: #111827;
    font-size: 24px;
    font-weight: 800;
    margin-top: 4px;
}
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px 12px;
}
.compact-table th,
.compact-table td {
    padding: 8px 10px;
    vertical-align: top;
}
.note-cell {
    white-space: pre-wrap;
    max-width: 460px;
}
.button-cell {
    white-space: nowrap;
}
.inline-form {
    display: inline-block;
    margin: 0 0 0 4px;
}
.small-button {
    padding: 5px 9px !important;
    font-size: 12px !important;
    border-radius: 7px !important;
}

/* B173 old-member DB management */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 14px 0;
}
.card, .panel, .info-box, .success-box, .error-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.big-number {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin-top: 6px;
}
.big-number.small { font-size: 18px; }
.info-box { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.success-box { background: #ecfdf5; border-color: #bbf7d0; color: #065f46; }
.error-box { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 999px; padding: 5px 8px; font-size: 12px; font-weight: 700; color: #334155; }
.danger { background: #dc2626 !important; color: #ffffff !important; border-color: #dc2626 !important; }
.muted { color: #6b7280; }

/* B300_GLOBAL_CRITICAL_UI_STATIC_MARKER: 핵심 UI CSS는 base.html에도 내장되어 서버 정적파일 캐시/설정 이슈에도 화면이 유지된다. */
