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

/* 회원관리 추가 스타일 */
.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
    background: white;
}

.assignment-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.assignment-status.assigned {
    background: #e6f3ff;
    color: #0066cc;
}

.assignment-status.unassigned {
    background: #f5f5f5;
    color: #666;
}

.dummy-member {
    background-color: #fff8e1 !important;
}

.member-actions {
    white-space: nowrap;
}

.btn-delete {
    padding: 4px 8px;
    margin-left: 5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-delete:hover {
    background: #c82333;
}

.btn-toggle {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.btn-toggle.inactive {
    background: #6c757d;
    color: white;
}

.btn-toggle.active:hover {
    background: #218838;
}

.btn-toggle.inactive:hover {
    background: #5a6268;
}

.member-status {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.member-status.active {
    background: #d4edda;
    color: #155724;
}

.member-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

/* 폼 힌트 텍스트 */
.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #718096;
    line-height: 1.4;
}

/* 관리자 로그인 페이지 */
.admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    padding: 20px;
    font-family: 'Noto Sans KR', sans-serif;
}

.admin-login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.6s ease-out;
}

.admin-header {
    text-align: center;
    margin-bottom: 30px;
}

.admin-title {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.admin-subtitle {
    font-size: 14px;
    color: #718096;
}

.admin-form {
    margin-bottom: 20px;
}

.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2d3748;
}

.admin-form .form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.admin-form .form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn-admin-login {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    border: none;
    color: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.btn-admin-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 55, 72, 0.4);
}

.btn-admin-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.back-link {
    display: block;
    text-align: center;
    color: #718096;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #2d3748;
}

/* 버튼 스타일 개선 */
.btn, .btn-primary, .btn-secondary, .btn-success, .btn-danger {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: auto;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #545b62 0%, #383d41 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 관리자 대시보드 추가 스타일 */

/* 관리자 대시보드 body */
.admin-body {
    background-color: #f7fafc;
    font-family: 'Noto Sans KR', sans-serif;
}

/* 상단 네비게이션 */
.admin-navbar {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.navbar-brand, .navbar-user {
    display: flex;
    align-items: center;
}

.navbar-brand {
    flex: 1;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.admin-email {
    color: rgba(255, 255, 255, 0.8);
    margin-right: 1rem;
    font-size: 0.9rem;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* 메인 컨테이너 */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* 관리 섹션 */
.management-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.section-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.section-actions .btn {
    white-space: nowrap;
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
}

/* 탭 네비게이션 */
.tab-navigation {
    display: flex;
    gap: 5px;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: #718096;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #2d3748;
    border-bottom-color: #2d3748;
}

.tab-btn:hover {
    color: #2d3748;
    background: #f8f9fa;
}

/* 교육 목록 */
.education-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.education-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    background: #fafafa;
    transition: all 0.3s ease;
}

.education-card:hover {
    border-color: #2d3748;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.education-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    flex: 1;
}

.education-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.education-status.active {
    background: #d4edda;
    color: #155724;
}

.education-status.finished {
    background: #f8d7da;
    color: #721c24;
}

.education-info {
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.info-label {
    font-weight: 500;
    color: #4a5568;
    margin-right: 0.5rem;
    min-width: 60px;
}

.info-value {
    color: #718096;
}

.education-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.85rem;
}

.education-link:hover {
    text-decoration: underline;
}

.education-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(45, 55, 72, 0.05);
    border-radius: 8px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #718096;
    margin-top: 0.25rem;
}

.education-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 교육 상세 관리 */
.education-detail-container {
    display: flex;
    gap: 2rem;
    min-height: 60vh;
}

.waiting-area {
    flex: 0 0 220px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 1.5rem;
}

.area-title {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
    text-align: center;
}

.user-list {
    min-height: 200px;
}

.user-item, .member-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: move;
    transition: all 0.3s ease;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-item:hover, .member-item:hover {
    background: #e3f2fd;
    border-color: #007bff;
    transform: translateY(-1px);
}

.user-item.dragging, .member-item.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
}

.user-avatar, .member-avatar {
    font-size: 1.2rem;
}

.user-info, .member-info {
    flex: 1;
}

.user-name, .member-name {
    font-weight: 500;
    color: #2d3748;
    font-size: 0.9rem;
}

.user-date, .member-date {
    font-size: 0.75rem;
    color: #718096;
    margin-top: 0.25rem;
}

.empty-users, .empty-members {
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
    padding: 2rem 1rem;
    font-style: italic;
}

.error-members {
    text-align: center;
    color: #dc3545;
    font-size: 0.9rem;
    padding: 2rem 1rem;
}

/* 팀 관리 영역 */
.team-management-area {
    flex: 1;
}

.team-actions {
    margin-bottom: 1.5rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.team-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 250px;
    transition: all 0.3s ease;
}

.team-card:hover {
    border-color: #cbd5e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.team-card.drag-over {
    border-color: #007bff;
    background: #f0f8ff;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.2);
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.team-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.team-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    flex: 1;
}

.team-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1rem;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #f1f5f9;
    transform: scale(1.1);
}

.team-members {
    min-height: 150px;
    padding: 0.5rem 0;
}

.team-members.drag-over {
    background: rgba(0, 123, 255, 0.05);
    border-radius: 8px;
}

/* 알림 메시지 */
.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 1001;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert.hidden {
    display: none;
}

/* 빈 상태 메시지 개선 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #718096;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #4a5568;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #2d3748;
    background: #f1f5f9;
}

.modal-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 아이콘 선택기 */
.icon-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 1rem;
}

.icon-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.icon-option:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.icon-option.selected {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 1rem;
}

.form-actions .btn {
    min-width: 80px;
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
}

/* 로딩 오버레이 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-left: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 메인 탭 네비게이션 */
.main-tab-navigation {
    display: flex;
    gap: 5px;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.main-tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: #718096;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.main-tab-btn.active {
    color: #2d3748;
    border-bottom-color: #2d3748;
}

.main-tab-btn:hover {
    color: #2d3748;
    background: #f8f9fa;
}

/* 탭 컨텐츠 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 회원 관리 테이블 */
.member-table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.member-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.member-table th,
.member-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.member-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

.member-table tbody tr:hover {
    background: #f8f9fa;
}

.member-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.member-status.active {
    background: #d4edda;
    color: #155724;
}

.member-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.member-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-toggle {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.btn-toggle:hover {
    opacity: 0.8;
}

/* 반응형 디자인 */
@media (max-width: 1024px) {
    .admin-container {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .education-list {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-container {
        padding: 1rem 0.5rem;
    }
    
    .management-section {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .education-detail-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .waiting-area {
        flex: none;
    }
    
    .education-list {
        grid-template-columns: 1fr;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .education-actions {
        justify-content: center;
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .modal-header,
    .modal-form {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .brand-title {
        font-size: 1.2rem;
    }
    
    .admin-email {
        display: none;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .icon-selector {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    }
    
    .icon-option {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}