/* 운동 방법 마스터 관리 페이지 스타일 */
/* 기존 관리자 페이지 표준 스타일 준수 */

/* 페이지 헤더 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

/* 페이지 헤더 내 모든 버튼 - 글로벌 UI 표준 (자동 너비, 터치 타겟 44px) */
.page-header .btn {
    width: auto;
    min-height: 40px;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
    flex-shrink: 0;
}

/* 요약 정보 카드 */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.summary-card .card-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.summary-card .card-value {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
}

/* 검색 및 필터 영역 */
.search-filter-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.search-box .btn {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-toggle {
    margin-bottom: 12px;
}

.filter-toggle .btn-link {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 0;
}

.filter-toggle .btn-link:hover {
    text-decoration: underline;
}

.advanced-filter {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-select:disabled {
    background: #f8f9fa;
    cursor: not-allowed;
}

/* 테이블 */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    margin-bottom: 24px;
}

.mobilities-table {
    width: 100%;
    border-collapse: collapse;
}

.mobilities-table thead {
    background: #f8f9fa;
}

.mobilities-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.mobilities-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #666;
}

.mobilities-table tbody tr:hover {
    background: #f8f9fa;
}

.mobilities-table .loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* 상태 배지 */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* 액션 버튼 */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-buttons .btn {
    padding: 4px 8px;
    font-size: 12px;
    width: auto;
}

/* 페이지네이션 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.page-size-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.pagination {
    display: flex;
    gap: 8px;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.pagination button:hover:not(:disabled) {
    background: #f8f9fa;
}

.pagination button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

/* 모달 하단 버튼 - 표준 크기 */
.modal-footer .btn {
    width: auto;
    min-width: 96px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.modal-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 폼 스타일 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-group .required {
    color: #dc3545;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #999;
}

.form-hint.edit-mode-hint {
    color: #ff9800;
}

.input-with-button {
    display: flex;
    gap: 8px;
}

.input-with-button input {
    flex: 1;
}

/* 자동 생성 코드 입력 필드 스타일 */
.input-with-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.input-with-badge input {
    flex: 1;
}

.auto-generated-input {
    background-color: #f5f5f5;
    cursor: not-allowed;
    color: #666;
}

.auto-generated-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-icon {
    font-size: 14px;
}

.btn-small {
    padding: 8px 12px;
    font-size: 12px;
    width: auto;
    flex-shrink: 0;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: white;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 버튼 스타일 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-search {
    background: #28a745;
    color: white;
}

.btn-search:hover {
    background: #218838;
}

/* 토스트 메시지 */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: #333;
    color: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 2000;
    max-width: 400px;
}

.toast.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .pagination-container {
        flex-direction: column;
        gap: 16px;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
}

