/**
 * 파일명: admin.css
 * 위치: /home/insamvillage/public_html/admin/assets/css/
 * 기능: 관리자 페이지 스타일
 * 작성일: 2025-01-14
 */

/* === 기본 스타일 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #2E7D32;
    --secondary-green: #66BB6A;
    --dark-green: #1B5E20;
    --light-green: #E8F5E9;
    --sidebar-width: 260px;
    --header-height: 70px;
    --text-dark: #2B2B2B;
    --text-gray: #666;
    --border-color: #e0e0e0;
    --bg-gray: #f5f5f5;
    --white: #ffffff;
    --danger: #d32f2f;
    --warning: #f57c00;
    --success: #388e3c;
    --info: #1976d2;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

/* === 레이아웃 === */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* === 사이드바 === */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-green);
    color: var(--white);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header i {
    font-size: 24px;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-left-color: var(--white);
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border-left-color: var(--white);
    font-weight: 600;
}

.menu-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-site {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-site:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* === 메인 컨텐츠 === */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === 상단 헤더 === */
.top-header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-dark);
    cursor: pointer;
    padding: 8px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    font-size: 14px;
}

.admin-name i {
    font-size: 20px;
    color: var(--primary-green);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--danger);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.3);
}

/* === 컨텐츠 영역 === */
.content-area {
    flex: 1;
    padding: 30px;
}

/* === 대시보드 카드 === */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-card-title {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card-icon.green {
    background: var(--light-green);
    color: var(--primary-green);
}

.stat-card-icon.blue {
    background: #e3f2fd;
    color: var(--info);
}

.stat-card-icon.orange {
    background: #fff3e0;
    color: var(--warning);
}

.stat-card-icon.red {
    background: #ffebee;
    color: var(--danger);
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-gray);
}

/* === 섹션 === */
.content-section {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

/* === 버튼 === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-green);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 125, 50, 0.3);
}

.btn-secondary {
    background: var(--text-gray);
    color: var(--white);
}

.btn-secondary:hover {
    background: #555;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #b71c1c;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* === 반응형 === */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 20px;
    }
    
    .top-header {
        padding: 0 20px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .admin-name {
        display: none;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}