/* =========================
   공통 페이지 구조
========================= */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.page-head-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-body {
    width: 100%;
}

.page-section {
    margin-top: 20px;
}

.page-section:first-child {
    margin-top: 0;
}

/* =========================
   검색 영역
========================= */
.search-panel {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid #d9e0e7;
    border-radius: 12px;
    background: #f8fafc;
    box-sizing: border-box;
}

.search-form-table {
    width: 100%;
    table-layout: fixed;
}

.search-form-table th,
.search-form-table td {
    padding: 6px 8px;
    vertical-align: middle;
    text-align: left;
}

.search-form-table th {
    width: 100px;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
}

.search-form-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* =========================
   폼 테이블
========================= */
.form-table-box {
    border: 1px solid #d9e0e7;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.form-table {
    width: 100%;
    table-layout: fixed;
}

.form-table th,
.form-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
    text-align: left;
    box-sizing: border-box;
}

.form-table tr:last-child th,
.form-table tr:last-child td {
    border-bottom: 0;
}

.form-table th {
    width: 160px;
    background: #f7f9fb;
    color: #374151;
    font-size: 12px;
    font-weight: 700;
}

.form-table td {
    background: #ffffff;
    color: #111827;
}

.form-text {
    color: #374151;
    font-size: 12px;
    line-height: 1.6;
}

.form-help {
    margin-top: 6px;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.5;
}

.form-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

/* =========================
   리스트 상단 정보
========================= */
.list-util {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.list-total {
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
}

.list-total strong {
    color: #111827;
}

/* =========================
   리스트 테이블
========================= */
.table-box {
    border: 1px solid #d9e0e7;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.table-scroll {
    overflow-x: auto;
}

.table-list {
    width: 100%;
    min-width: 900px;
}

.table-list th,
.table-list td {
    padding: 8px 10px;
    border-bottom: 1px solid #edf2f7;
    border-right: 1px solid #f1f5f9;
    vertical-align: middle;
    text-align: center;
    font-size: 12px;
    box-sizing: border-box;
}

.table-list th:last-child,
.table-list td:last-child {
    border-right: 0;
}

.table-list th {
    background: #f7f9fb;
    color: #374151;
    font-weight: 700;
}

.table-list td {
    background: #ffffff;
    color: #1f2937;
}

.table-list tbody tr:hover td {
    background: #f9fbfd;
}

.table-list .ta-left {
    text-align: left;
}

.table-list .ta-right {
    text-align: right;
}

.table-empty {
    padding: 24px 12px !important;
    color: #6b7280;
    text-align: center;
}

/* =========================
   상태 배지
========================= */
.status-badge {
    display: inline-block;
    min-width: 64px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    box-sizing: border-box;
}

.status-badge.use {
    background: #e8f7ee;
    color: #15803d;
}

.status-badge.stop {
    background: #fef3c7;
    color: #b45309;
}

.status-badge.delete {
    background: #fee2e2;
    color: #b91c1c;
}

.status-badge.wait {
    background: #e0ecff;
    color: #1d4ed8;
}

/* =========================
   페이지네이션
========================= */
.pagination-wrap {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #d6dee8;
    border-radius: 8px;
    background: #ffffff;
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
}

.page-btn:hover {
    background: #f8fafc;
}

.page-btn.active {
    border-color: #2f8eea;
    background: #2f8eea;
    color: #ffffff;
}

.page-btn.disabled {
    opacity: .45;
    cursor: default;
}

/* =========================
   버튼 정렬
========================= */
.btn-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-group.block {
    display: flex;
}

.btn.btn-line {
    border-color: #d1d5db;
    background: #ffffff;
    color: #374151;
}

.btn.btn-line:hover {
    background: #f8fafc;
}

/* =========================
   반응형
========================= */
@media all and (max-width: 900px) {
    .page-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-head-right {
        width: 100%;
    }

    .search-form-table,
    .search-form-table tbody,
    .search-form-table tr,
    .search-form-table th,
    .search-form-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .search-form-table th {
        padding-bottom: 4px;
    }

    .search-form-table td {
        padding-top: 0;
        margin-bottom: 8px;
    }

    .form-table,
    .form-table tbody,
    .form-table tr,
    .form-table th,
    .form-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .form-table th {
        padding-bottom: 6px;
    }

    .form-table td {
        padding-top: 0;
    }

    .form-actions {
        flex-wrap: wrap;
    }
}