@charset "utf-8";

/* ============================================
   감옥(블랙리스트) 시스템 스타일
   그누보드5 + 나리야빌더 호환
   ============================================ */

/* --- 컨테이너 --- */
.jail-container {
    max-width: 960px;
    margin: 20px auto;
    padding: 0 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- 탭 메뉴 --- */
.jail-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e8eb;
    margin-bottom: 20px;
}

.jail-tab {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #8b95a1;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.jail-tab:hover {
    color: #4e5968;
    text-decoration: none;
}

.jail-tab-active {
    color: #191f28;
    border-bottom-color: #191f28;
}

/* --- 안내 박스 --- */
.jail-notice {
    background: #fff5f5;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.jail-notice strong {
    display: block;
    color: #dc2626;
    font-size: 14px;
    margin-bottom: 6px;
}

.jail-notice p {
    color: #7f1d1d;
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
}

/* --- 검색 폼 --- */
.jail-search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.jail-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    color: #374151;
    cursor: pointer;
}

.jail-input {
    flex: 1;
    min-width: 160px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    background: #fff;
}

.jail-input:focus,
.jail-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

/* --- 버튼 공용 --- */
.jail-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.jail-btn:hover {
    opacity: 0.85;
    text-decoration: none;
}

.jail-btn-search {
    background: #374151;
    color: #fff;
}

.jail-btn-danger {
    background: #dc2626;
    color: #fff;
    padding: 10px 24px;
    font-size: 14px;
}

.jail-btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.jail-btn-release {
    background: #059669;
    color: #fff;
}

.jail-btn-permanent {
    background: #dc2626;
    color: #fff;
}

/* --- 필터 탭 --- */
.jail-filters {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.jail-filter {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #4e5968;
    background: #f3f4f6;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.jail-filter:hover {
    background: #e5e7eb;
    color: #374151;
    text-decoration: none;
}

.jail-filter-active {
    background: #191f28;
    color: #fff;
}

.jail-filter-active:hover {
    background: #374151;
    color: #fff;
}

/* --- 테이블 --- */
.jail-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
}

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

.jail-table thead th {
    background: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    font-size: 12px;
    text-align: center;
    padding: 10px 12px;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.jail-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
    background: #fff;
}

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

.jail-row-active {
    background: #fef2f2 !important;
}

.jail-row-active td {
    background: transparent !important;
}

.jail-td-no {
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
    width: 50px;
}

.jail-td-name {
    white-space: nowrap;
}

.jail-nick {
    font-weight: 600;
    color: #191f28;
}

.jail-id {
    color: #9ca3af;
    font-size: 11px;
    margin-left: 4px;
}

.jail-td-offense {
    text-align: center;
    width: 60px;
}

.jail-offense-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: #dc2626;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
}

.jail-td-reason {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jail-td-date,
.jail-td-release {
    white-space: nowrap;
    font-size: 12px;
    text-align: center;
}

.jail-permanent {
    color: #dc2626;
    font-weight: 700;
}

.jail-released {
    color: #059669;
    font-weight: 600;
}

.jail-remaining {
    color: #dc2626;
    font-size: 11px;
    font-weight: 600;
}

.jail-td-bail {
    text-align: center;
    white-space: nowrap;
}

.jail-td-actions {
    text-align: center;
    white-space: nowrap;
}

.jail-td-actions form {
    display: inline;
    margin: 0 2px;
}

/* --- 보석 버튼/뱃지 --- */
.jail-btn-bail {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.jail-btn-bail:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.jail-bail-disabled {
    display: inline-flex;
    padding: 5px 14px;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.jail-bail-pending {
    color: #d97706;
    font-weight: 600;
    font-size: 12px;
}

.jail-bail-approved {
    color: #059669;
    font-weight: 600;
    font-size: 12px;
}

.jail-bail-rejected {
    color: #dc2626;
    font-weight: 600;
    font-size: 12px;
}

.jail-empty {
    text-align: center;
    padding: 40px 20px !important;
    color: #9ca3af;
    font-size: 14px;
}

/* --- 페이지네이션 --- */
.jail-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 16px 0;
}

.jail-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 13px;
    color: #4e5968;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.jail-page-link:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #3b82f6;
    text-decoration: none;
}

.jail-page-active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.jail-page-active:hover {
    background: #2563eb;
    color: #fff;
}

/* --- MY 수감기록 요약 --- */
.jail-my-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.jail-summary-card {
    flex: 1;
    min-width: 140px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    text-align: center;
}

.jail-summary-label {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 600;
    margin-bottom: 6px;
}

.jail-summary-value {
    font-size: 20px;
    font-weight: 700;
    color: #191f28;
}

.jail-status-active {
    color: #dc2626;
}

.jail-status-free {
    color: #059669;
}

.jail-badge-active {
    display: inline-flex;
    padding: 3px 10px;
    background: #fef2f2;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
}

.jail-badge-released {
    display: inline-flex;
    padding: 3px 10px;
    background: #ecfdf5;
    color: #059669;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
}

/* --- 규정 페이지 --- */
.jail-rule-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 30px;
}

.jail-rule-title {
    font-size: 20px;
    font-weight: 700;
    color: #191f28;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.jail-rule-section {
    margin-bottom: 24px;
}

.jail-rule-section h3 {
    font-size: 15px;
    font-weight: 700;
    color: #374151;
    margin: 0 0 10px 0;
}

.jail-rule-section p {
    font-size: 14px;
    color: #4e5968;
    line-height: 1.7;
    margin: 0;
}

.jail-rule-section ul {
    margin: 0;
    padding-left: 20px;
}

.jail-rule-section li {
    font-size: 14px;
    color: #4e5968;
    line-height: 1.8;
}

.jail-rule-table {
    margin-top: 10px;
}

/* --- 관리자 --- */
.jail-admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.jail-admin-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #4e5968;
    background: #f3f4f6;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s;
}

.jail-admin-tab:hover {
    background: #e5e7eb;
    text-decoration: none;
}

.jail-admin-tab.active {
    background: #191f28;
    color: #fff;
}

.jail-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #dc2626;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
}

.jail-admin-form-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
}

.jail-admin-subtitle {
    font-size: 16px;
    font-weight: 700;
    color: #191f28;
    margin: 0 0 20px 0;
}

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

.jail-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.jail-form-label .required {
    color: #dc2626;
}

.jail-form-input {
    width: 100%;
    max-width: 400px;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background: #fff;
    box-sizing: border-box;
}

.jail-form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.jail-form-textarea {
    width: 100%;
    max-width: 400px;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background: #fff;
    resize: vertical;
    box-sizing: border-box;
}

.jail-form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.jail-form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #9ca3af;
}

.jail-form-actions {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

/* --- 반응형 (모바일) --- */
@media (max-width: 768px) {
    .jail-container {
        padding: 0 10px;
    }

    .jail-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .jail-tab {
        padding: 10px 14px;
        font-size: 13px;
    }

    .jail-search-form {
        flex-direction: column;
    }

    .jail-select,
    .jail-input {
        width: 100%;
    }

    .jail-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .jail-table {
        font-size: 12px;
    }

    .jail-table thead th {
        font-size: 11px;
        padding: 8px 6px;
    }

    .jail-table tbody td {
        padding: 10px 6px;
    }

    .jail-td-reason {
        max-width: 120px;
    }

    .jail-my-summary {
        flex-direction: column;
    }

    .jail-summary-card {
        min-width: 0;
    }

    .jail-rule-box {
        padding: 20px 16px;
    }

    .jail-admin-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .jail-admin-form-box {
        padding: 16px;
    }

    .jail-form-input,
    .jail-form-textarea {
        max-width: 100%;
    }
}
