/* 관리자 페이지 전용 스타일 */

/* 관리자 대시보드 */
.admin-dashboard {
    padding: 120px 0 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-header h2 {
    font-size: 36px;
    color: white;
    margin-bottom: 30px;
    font-weight: 700;
}

/* 통계 카드 */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 8px;
    font-weight: 700;
}

.stat-card p {
    color: #4a5568;
    font-weight: 600;
}

/* 필터 섹션 */
.filter-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.filter-section select,
.filter-section input {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 150px;
}

.filter-section select:focus,
.filter-section input:focus {
    outline: none;
    border-color: #667eea;
}

/* 관리자 테이블 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.admin-table th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.admin-table th:hover {
    background: linear-gradient(135deg, #5a6fd8, #6b46a3);
}

.admin-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.admin-table tr:hover {
    background: #f8f9ff;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

/* 상태 배지 */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-approved {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 액션 버튼들 */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

.btn-approve {
    background: #28a745;
    color: white;
}

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

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-delete {
    background: #dc3545;
    color: white;
}

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

.btn-call {
    background: #17a2b8;
    color: white;
}

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

.btn-download {
    background: #6f42c1;
    color: white;
}

.btn-download:hover {
    background: #5a2d91;
    transform: translateY(-1px);
}

/* 모달 액션 버튼 */
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 20px 30px;
    background: #f8f9ff;
    border-top: 1px solid #e2e8f0;
}

.modal-actions .btn {
    min-width: 100px;
}

/* 폼 스타일 (모달 내부) */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.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;
}

/* 정렬 아이콘 */
.sort-indicator {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

/* 로딩 상태 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 인쇄 스타일 */
@media print {
    .filter-section,
    .action-buttons,
    .btn-small,
    .modal {
        display: none !important;
    }
    
    .admin-table {
        box-shadow: none;
    }
    
    .admin-table th {
        background: #f8f9fa !important;
        color: #333 !important;
        border: 1px solid #ddd;
    }
    
    .admin-table td {
        border: 1px solid #ddd;
    }
    
    body {
        background: white !important;
    }
    
    .admin-dashboard {
        background: white !important;
        padding: 20px 0 !important;
    }
    
    .dashboard-header h2 {
        color: #333 !important;
    }
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .admin-dashboard {
        padding: 100px 0 20px;
    }
    
    .dashboard-header h2 {
        font-size: 24px;
    }
    
    .stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-card h3 {
        font-size: 24px;
    }
    
    .filter-section {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .filter-section select,
    .filter-section input {
        min-width: auto;
        width: 100%;
    }
    
    .admin-table {
        font-size: 12px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px 5px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 3px;
    }
    
    .btn-small {
        font-size: 11px;
        padding: 4px 8px;
        min-width: 50px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* 태블릿 반응형 */
@media (max-width: 1024px) and (min-width: 769px) {
    .stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .admin-table {
        font-size: 13px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
    }
}

/* 다크 모드 대응 (추후 확장용) */
@media (prefers-color-scheme: dark) {
    /* 다크 모드 스타일을 여기에 추가할 수 있습니다 */
}

/* 접근성 개선 */
.admin-table th:focus,
.btn-small:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 고대비 모드 대응 */
@media (prefers-contrast: high) {
    .admin-table th {
        border: 2px solid #000;
    }
    
    .admin-table td {
        border: 1px solid #000;
    }
    
    .status-badge {
        border-width: 2px;
    }
}

/* 애니메이션 비활성화 옵션 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
