/* HAIRGATOR 어드민 스타일 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* 헤더 */
.header {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    text-align: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #FF1493;
}

/* 카드 */
.card {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

/* 계층 구조 그리드 */
.hierarchy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.hierarchy-column {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    min-height: 400px;
}

.hierarchy-title {
    font-weight: bold;
    color: #FF1493;
    margin-bottom: 15px;
    text-align: center;
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
}

/* 선택 가능한 아이템 */
.selectable-item {
    background-color: #fff;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selectable-item:hover {
    background-color: #fff0f5;
    border-color: #FF69B4;
}

.selectable-item.selected {
    background-color: #FF1493;
    color: white;
    border-color: #FF1493;
}

.item-text {
    flex: 1;
}

.item-actions {
    display: none;
    gap: 5px;
}

.selectable-item:hover .item-actions {
    display: flex;
}

.selectable-item.selected .item-actions {
    display: flex;
}

.action-btn {
    background: rgba(255,255,255,0.8);
    border: none;
    color: #FF1493;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}

.selectable-item.selected .action-btn {
    background: rgba(255,255,255,0.9);
    color: #FF1493;
}

.action-btn:hover {
    background: rgba(255,255,255,1);
}

/* 버튼 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    margin: 5px;
}

.btn-primary {
    background-color: #FF1493;
    color: white;
}

.btn-primary:hover {
    background-color: #FF69B4;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-warning {
    background-color: #ffc107;
    color: #000;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* 폼 스타일 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #FF1493;
    box-shadow: 0 0 0 2px rgba(255, 20, 147, 0.2);
}

/* 모달 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #333;
}

/* 알림 */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 경로 표시 */
.breadcrumb {
    background-color: #e9ecef;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb-item {
    display: inline;
    color: #6c757d;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: " → ";
    color: #6c757d;
}

.breadcrumb-item.active {
    color: #FF1493;
    font-weight: bold;
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

/* 동기화 상태 */
.sync-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1000;
}

.sync-indicator.connected {
    background-color: #28a745;
    color: white;
}

.sync-indicator.disconnected {
    background-color: #dc3545;
    color: white;
}

/* 고객 데이터 관리 스타일 */
.customer-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #FF1493, #FF69B4);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.customer-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.customer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.customer-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.customer-designer {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.customer-details {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.customer-styles {
    margin: 10px 0;
}

.style-tag {
    display: inline-block;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin: 2px;
    color: #495057;
}

.style-tag.liked {
    background: #FF1493;
    color: white;
}

/* 스타일 관리 */
.style-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.style-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.style-info {
    flex: 1;
}

.style-code {
    font-weight: bold;
    color: #FF1493;
    font-size: 16px;
}

.style-name {
    color: #666;
    margin: 5px 0;
}

.style-actions {
    display: flex;
    gap: 10px;
}

.image-preview {
    text-align: center;
    margin: 15px 0;
}

.preview-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 5px;
    border: 2px solid #ddd;
}

/* 진행 상황 표시 */
.progress-container {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
    font-family: monospace;
    font-size: 14px;
    max-height: 200px;
    overflow-y: auto;
}

.progress-line {
    margin: 5px 0;
    padding: 2px 0;
}

.progress-line.success {
    color: #28a745;
}

.progress-line.error {
    color: #dc3545;
}

.progress-line.info {
    color: #007bff;
}

/* 반응형 디자인 */
@media screen and (max-width: 1200px) {
    .hierarchy-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
}

@media screen and (max-width: 768px) {
    .hierarchy-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
}