/* 회원관리 페이지 스타일 - 20년차 UI 웹퍼블리셔급 어드민 디자인 */

/* 메인 컨테이너 */
.main-container {
    margin-left: 0;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
}

body.sidebar-open .member-management .main-container {
    margin-left: 300px;
    margin-right: auto;
}

@media (max-width: 768px) {
body.sidebar-open .member-management .main-container {
    margin-left: 0;
}
}

/* 네비게이션 토글 버튼 */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 24px;
    z-index: 1003;
    width: 40px;
    height: 40px;
    background: #333;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.menu-toggle:hover {
    background: #444;
    transform: scale(1.05);
}

.menu-toggle.logged-in {
    display: flex;
}

body.sidebar-open .menu-toggle {
    left: 324px;
    right: auto;
    z-index: 1004;
}

@media (max-width: 768px) {
    .menu-toggle {
        left: auto;
        right: 16px;
        top: 20px;
    }
    
    body.sidebar-open .menu-toggle {
        left: auto;
        right: 16px;
    }
}

/* 기본 레이아웃 */
.member-management .main-container {
    padding: 40px 24px;
    margin: 0 auto;
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - 80px);
    max-width: 1200px;
    margin-top: 100px;
}

body.sidebar-open .member-management .main-container {
    margin-left: 300px;
    margin-right: auto;
}

@media (max-width: 768px) {
    .member-management .main-container {
        padding: 20px;
    }
    
body.sidebar-open .member-management .main-container {
    margin-left: 0;
}
}

/* 페이지 헤더 - 프리미엄 어드민 스타일 */
.page-header {
    margin-bottom: 48px;
    padding: 40px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8eaed;
    position: relative;
    overflow: hidden;
    text-align: left;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: #1a202c;
    border-radius: 20px 20px 0 0;
}

.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
    border-radius: 20px 20px 0 0;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 12px 0;
    letter-spacing: -0.8px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.page-title::before {
    content: '👥';
    font-size: 28px;
    opacity: 0.9;
    background: #f8fafc;
    padding: 12px;
    border-radius: 16px;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-left: 0;
}

.page-subtitle {
    font-size: 18px;
    color: #64748b;
    margin: 0;
    font-weight: 500;
    line-height: 1.6;
    padding-left: 4px;
}

/* 검색 섹션 - 프리미엄 어드민 스타일 */
.search-section {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8eaed;
    position: relative;
    overflow: hidden;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #667eea;
    border-radius: 20px 20px 0 0;
}

.search-controls {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-group {
    display: flex;
    flex: 1;
    min-width: 320px;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px 0 0 8px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
    background: #fafbfc;
    color: #1a202c;
}

.search-input:focus {
    border-color: #1a202c;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(26, 32, 44, 0.08);
}

.search-input::placeholder {
    color: #94a3b8;
}

.search-btn {
    padding: 14px 20px;
    background: #1a202c;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    min-width: 60px;
}

.search-btn:hover {
    background: #2d3748;
    transform: translateY(-1px);
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    background: #fafbfc;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1a202c;
    min-width: 140px;
}

.filter-select:focus {
    border-color: #1a202c;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(26, 32, 44, 0.08);
}

/* 테이블 컨테이너 - 프리미엄 어드민 테이블 */
.table-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8eaed;
    overflow: hidden;
    margin-bottom: 40px;
    position: relative;
}

.table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #1a202c;
    z-index: 1;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 40px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
    z-index: 2;
}

.table-info {
    font-size: 15px;
    color: #475569;
    font-weight: 500;
}

.member-count {
    font-weight: 700;
    color: #1a202c;
    font-size: 16px;
}

.table-actions {
    display: flex;
    gap: 12px;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #1a202c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-btn:hover {
    background: #2d3748;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 32, 44, 0.2);
}

/* 테이블 - 고급 어드민 테이블 스타일 */
.table-wrapper {
    overflow-x: auto;
    background: #ffffff;
}

.members-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #ffffff;
}

.members-table th {
    background: #f8fafc;
    color: #374151;
    font-weight: 600;
    padding: 16px 12px;
    text-align: center;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.members-table td {
    padding: 16px 12px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    color: #374151;
    font-size: 14px;
}

.members-table tr:hover {
    background: #f8fafc;
    transition: background-color 0.15s ease;
}

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

/* 컬럼 너비 */
.col-id { 
    width: 60px; 
    text-align: center;
}
.col-user-id { 
    width: 120px; 
    text-align: center;
}
.col-name { 
    width: 100px; 
    text-align: center;
}
.col-email { 
    width: 200px; 
    text-align: center;
}
.col-type { 
    width: 100px; 
    text-align: center;
}
.col-admin { 
    width: 100px; 
    text-align: center;
}
.col-actions { 
    width: 120px; 
    text-align: center;
    padding-left: 20px;
}

/* 상태 배지 - 프리미엄 스타일 */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.status-active {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.status-inactive {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

/* 관리자 배지 - 프리미엄 스타일 */
.admin-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

/* 승인여부 색상: O=초록, X=빨강, ?=남색 톤 */
.approve-ok { /* 1 */
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}
.approve-reject { /* 2 */
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}
.approve-pending { /* 0 */
    background: #eef2ff;
    color: #3730a3;
    border-color: #c7d2fe;
}

/* 액션 버튼 - 프리미엄 어드민 스타일 */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 4px;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.view-btn {
    background: #f0f9ff;
    color: #0369a1;
    border-color: #bae6fd;
}

.view-btn:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(3, 105, 161, 0.15);
}

.edit-btn {
    background: #fefce8;
    color: #a16207;
    border-color: #fde047;
    box-shadow: 0 2px 8px rgba(161, 98, 7, 0.1);
}

.edit-btn:hover {
    background: #fef3c7;
    border-color: #facc15;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 16px rgba(161, 98, 7, 0.2);
}

.delete-btn {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.delete-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.2);
}

/* 데이터 없음 */
.no-data {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 40px;
}

/* 페이지네이션 - 프리미엄 어드민 스타일 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 48px;
    padding: 40px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8eaed;
    position: relative;
    overflow: hidden;
}

.pagination-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #667eea;
    border-radius: 20px 20px 0 0;
}

.pagination-info {
    font-size: 15px;
    color: #64748b;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #1a202c;
    color: #1a202c;
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8fafc;
}

.page-numbers {
    display: flex;
    gap: 8px;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.page-number:hover {
    background: #f8fafc;
    border-color: #1a202c;
    color: #1a202c;
    transform: translateY(-1px);
}

.page-number.active {
    background: #1a202c;
    color: white;
    border-color: #1a202c;
    box-shadow: 0 4px 8px rgba(26, 32, 44, 0.2);
}

/* 모달 - 프리미엄 어드민 모달 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow-y: auto;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: #ffffff;
    margin: 60px auto;
    max-width: 900px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid #e8eaed;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    border-bottom: 2px solid #f1f5f9;
    background: #fafbfc;
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1a202c;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.modal-close:hover {
    background: #f8fafc;
    border-color: #1a202c;
    color: #1a202c;
    transform: translateY(-1px);
}

.modal-body {
    padding: 32px;
}

/* 회원 상세 정보 - 프리미엄 어드민 스타일 */
.member-detail {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.detail-section {
    border: 2px solid #f1f5f9;
    border-radius: 12px;
    padding: 28px;
    background: #fafbfc;
    position: relative;
    overflow: hidden;
}

.detail-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #1a202c;
}

.detail-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #1a202c;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e8eaed;
}

.detail-item label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.detail-item span {
    font-size: 15px;
    color: #1a202c;
    word-break: break-word;
    font-weight: 500;
}

/* 반응형 디자인 - 프리미엄 어드민 반응형 */
@media (max-width: 1200px) {
    .members-table {
        font-size: 13px;
    }
    
    .members-table th,
    .members-table td {
        padding: 14px 10px;
    }
    
    .page-header {
        padding: 24px;
    }
    
    .search-section {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .member-management .main-container {
        padding: 24px 16px;
    }
    
    .page-header {
        padding: 24px 20px;
        margin-bottom: 32px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .search-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .search-input-group {
        min-width: auto;
    }
    
    .filter-group {
        justify-content: stretch;
        gap: 8px;
    }
    
    .filter-select {
        flex: 1;
        min-width: 120px;
    }
    
    .table-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        padding: 20px;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        padding: 20px;
    }
    
    .pagination-controls {
        justify-content: center;
    }
    
    .modal-content {
        margin: 20px;
        max-width: none;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .detail-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .member-management .main-container {
        padding: 20px 12px;
    }
    
    .page-header {
        padding: 20px 16px;
        margin-bottom: 24px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .page-subtitle {
        font-size: 13px;
    }
    
    .search-section {
        padding: 16px;
    }
    
    .table-header {
        padding: 16px;
    }
    
    .members-table {
        font-size: 12px;
    }
    
    .members-table th,
    .members-table td {
        padding: 12px 8px;
    }
    
    .action-btn {
        width: 32px;
        height: 32px;
        margin: 0 2px;
    }
    
    .pagination-container {
        padding: 16px;
    }
    
    .pagination-btn,
    .page-number {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .modal-content {
        margin: 16px;
    }
    
    .modal-header {
        padding: 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .detail-section {
        padding: 16px;
    }
    
    .detail-item {
        padding: 12px;
    }
}
