/**
 * 입점관리자 스타일
 * /maket/css/style.css
 */

:root {
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --primary-color: #6f42c1;
    --primary-hover: #5a32a3;
    --sidebar-bg: #2c2c54;
    --sidebar-text: #a5a5ba;
    --sidebar-active: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: #f8f9fc;
    min-height: 100vh;
}

/* 레이아웃 */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* 사이드바 */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0,0,0,0.1);
}

.sidebar-brand {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.vendor-info {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.vendor-info .company-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.vendor-info .vendor-email {
    color: var(--sidebar-text);
    font-size: 0.8rem;
}

.sidebar-nav {
    list-style: none;
    padding: 15px 0;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

.sidebar-nav .nav-header {
    color: var(--sidebar-text);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 15px 20px 8px;
}

.sidebar-nav .nav-item {
    margin: 2px 10px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar-nav .nav-link.active {
    background: var(--primary-color);
    color: #fff;
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* 메인 컨텐츠 */
#content {
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* 탑바 */
.topbar {
    height: var(--topbar-height);
    background: #fff;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58,59,69,.15);
    padding: 0 24px;
}

.topbar .nav-link {
    color: #6c757d;
    padding: 8px 15px;
}

.topbar .nav-link:hover {
    color: var(--primary-color);
}

/* 컨테이너 */
.container-fluid {
    padding: 0 24px 24px;
}

/* 카드 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58,59,69,.1);
    margin-bottom: 24px;
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e3e6f0;
    padding: 16px 20px;
    font-weight: 600;
    border-radius: 12px 12px 0 0 !important;
}

.card-body {
    padding: 20px;
}

/* 통계 카드 */
.stat-card {
    border-left: 4px solid;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card.primary { border-left-color: var(--primary-color); }
.stat-card.success { border-left-color: #1cc88a; }
.stat-card.info { border-left-color: #36b9cc; }
.stat-card.warning { border-left-color: #f6c23e; }

.stat-card .stat-icon {
    font-size: 2rem;
    color: #dddfeb;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #5a5c69;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #858796;
    text-transform: uppercase;
    font-weight: 600;
}

/* 테이블 */
.table {
    margin-bottom: 0;
}

.table th {
    background: #f8f9fc;
    font-weight: 600;
    font-size: 0.85rem;
    color: #5a5c69;
    border-bottom: 2px solid #e3e6f0;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(111, 66, 193, 0.05);
}

/* 버튼 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

/* 폼 */
.form-label {
    font-weight: 500;
    color: #5a5c69;
    margin-bottom: 6px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
}

/* 상품 이미지 */
.product-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    background: #f8f9fc;
}

.product-thumb-lg {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    background: #f8f9fc;
}

/* 배지 */
.badge {
    font-weight: 500;
    padding: 0.4em 0.6em;
}

/* 로그인 페이지 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c2c54 0%, var(--primary-color) 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 40px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo i {
    font-size: 3rem;
    color: var(--primary-color);
}

.login-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 10px;
    color: #2c2c54;
}

/* 페이지 제목 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c2c54;
    margin: 0;
}

/* 필터 영역 */
.filter-bar {
    background: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58,59,69,.1);
}

/* 반응형 */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    #content {
        width: 100%;
        margin-left: 0;
    }
    
    .page-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .table-responsive {
        font-size: 0.85rem;
    }
}

/* 유틸리티 */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

/* 이미지 업로드 프리뷰 */
.image-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.image-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(111, 66, 193, 0.05);
}

.image-upload-area i {
    font-size: 3rem;
    color: #dee2e6;
}

.image-preview {
    position: relative;
    display: inline-block;
    margin: 10px;
}

.image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.image-preview .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
}

/* 에디터 */
.note-editor {
    border-radius: 8px !important;
}

.note-toolbar {
    border-radius: 8px 8px 0 0 !important;
}

/* 차트 */
.chart-container {
    position: relative;
    height: 300px;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #858796;
}

.empty-state i {
    font-size: 4rem;
    color: #dddfeb;
    margin-bottom: 20px;
}

.empty-state h5 {
    color: #5a5c69;
    margin-bottom: 10px;
}
