/* 관리자 페이지 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #7DD3FC;
    --primary-dark: #38BDF8;
    --secondary-color: #0EA5E9;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* 로그인 화면 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.login-header p {
    color: var(--text-light);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(125, 211, 252, 0.15);
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(125, 211, 252, 0.4);
}

.login-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #FEF3C7;
    border-radius: 8px;
    text-align: center;
}

.login-info i {
    color: var(--warning);
    margin-right: 0.5rem;
}

.login-info p {
    font-size: 0.875rem;
    color: #92400E;
}

/* 관리자 대시보드 레이아웃 */
.admin-dashboard {
    display: grid;
    grid-template-areas: 
        "header header"
        "sidebar main";
    grid-template-columns: 250px 1fr;
    grid-template-rows: 70px 1fr;
    min-height: 100vh;
}

/* 헤더 */
.admin-header {
    grid-area: header;
    background: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 100%;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.admin-logo i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-user span {
    font-weight: 600;
    color: var(--text-dark);
}

.btn-logout {
    padding: 0.5rem 1rem;
    background-color: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.btn-logout:hover {
    background-color: #DC2626;
}

/* 사이드바 */
.admin-sidebar {
    grid-area: sidebar;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
}

.admin-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.nav-item.active {
    background-color: rgba(125, 211, 252, 0.15);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

/* 메인 콘텐츠 */
.admin-main {
    grid-area: main;
    padding: 2rem;
    overflow-y: auto;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.section-header p {
    color: var(--text-light);
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.stat-info p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* 대시보드 콘텐츠 */
.dashboard-content {
    display: grid;
    gap: 1.5rem;
}

.recent-reviews {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.recent-reviews h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recent-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
}

.recent-item:hover {
    background-color: var(--bg-light);
}

.recent-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.recent-item-header strong {
    color: var(--text-dark);
}

.recent-item-rating {
    color: #F59E0B;
}

.recent-item-content {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* 필터 바 */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-bar input,
.filter-bar select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.filter-bar input {
    flex: 1;
}

.filter-bar select {
    min-width: 200px;
}

/* 테이블 */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background-color: var(--bg-light);
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

.admin-table tbody tr:hover {
    background-color: var(--bg-light);
}

.rating-stars {
    color: #F59E0B;
}

.review-preview {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-delete {
    padding: 0.5rem 1rem;
    background-color: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

.btn-delete:hover {
    background-color: #DC2626;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-dark);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
    background-color: var(--primary-color);
    color: white;
}

.pagination button.active {
    background-color: var(--primary-color);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 정보 박스 */
.info-box {
    background: #DBEAFE;
    border: 1px solid #3B82F6;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-box i {
    color: #3B82F6;
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

.info-box p {
    color: #1E40AF;
    line-height: 1.6;
}

/* 설정 카드 */
.settings-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.settings-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    font-weight: 600;
    color: var(--text-light);
}

.setting-item p {
    color: var(--text-dark);
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.btn-link:hover {
    background-color: var(--primary-dark);
}

.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

/* 반응형 */
@media (max-width: 768px) {
    .admin-dashboard {
        grid-template-areas: 
            "header"
            "main";
        grid-template-columns: 1fr;
        grid-template-rows: 70px 1fr;
    }

    .admin-sidebar {
        display: none;
    }

    .admin-header-content {
        padding: 0 1rem;
    }

    .admin-main {
        padding: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
    }

    .table-container {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 600px;
    }
}
