
/*********************************************
 * /www/shop/style/admin/admin.css
 *********************************************/

/* 로그인 페이지 */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

.login-info {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #666;
    line-height: 1.8;
}

/* 관리자 레이아웃 */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 160px;
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar h1 {
    padding: 0 20px 20px;
    font-size: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.sidebar nav {
    padding: 0 10px;
}

.sidebar nav a {
    display: block;
    padding: 12px 15px;
    color: rgba(255,255,255,0.8);
    border-radius: 4px;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-info {
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.content {
    flex: 1;
    margin-left: 160px;
    padding: 30px;
    background: #f5f6fa;
    min-height: 100vh;
}

/* 페이지 헤더 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e1e4e8;
}

.page-header h1 {
    font-size: 24px;
    color: #2c3e50;
}

/* 통계 박스 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-box h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

/* 버튼 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #e1e4e8;
    color: #333;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #d1d5da;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* 폼 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 5px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

.product-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 800px;
}

/* 테이블 */
.data-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e1e4e8;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e1e4e8;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table .thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

/* 이미지 미리보기 */
.preview-image {
    max-width: 200px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 알림 */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #060;
    border: 1px solid #cfc;
}

/* 반응형 */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .content {
        margin-left: 200px;
        padding: 20px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   🔥 스크롤 버튼 (전역) - 모든 페이지
   ========================================== */
.scroll-buttons {
    position: fixed;
    right: 10px;
    bottom: 10px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.scroll-btn {
    width: 30px;
    height: 30px;
/*    border-radius: 5em;*/
    background: #4a5568;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    /* 🔥 항상 보이게 수정 */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* 🔥 .visible 클래스 제거 (더 이상 필요 없음) */
.scroll-btn:hover {
    background: #2d3748;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}
.scroll-btn:active {
    transform: scale(0.95);
}