/* 최소한의 스타일 - API 데모용 */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
    background: #fafafa;
}

h1 { margin-bottom: 16px; }
h2 { margin-bottom: 12px; color: #222; }
h3 { margin-bottom: 8px; color: #444; }

/* 탭 */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid #ddd;
}
.tab {
    padding: 10px 20px;
    border: none;
    background: #eee;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    font-size: 14px;
}
.tab.active {
    background: #333;
    color: white;
}

/* 탭 콘텐츠 */
.tab-content { display: block; }
.tab-content.hidden { display: none; }

/* 단계별 섹션 */
.step {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}
.step-desc {
    color: #666;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.6;
}
.step-desc code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

/* 폼 */
form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
}
label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
}
input[type="text"], select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
input[type="file"] { font-size: 13px; }
button {
    padding: 8px 16px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
button:hover { background: #e8e8e8; }
button:disabled { opacity: 0.5; cursor: not-allowed; }

/* 결과 박스 */
.result {
    margin-top: 8px;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    white-space: pre-wrap;
}
.result:empty { display: none; }
.result.loading { background: #fff8e1; }
.result.success { background: #e8f5e9; }
.result.error { background: #ffebee; color: #c62828; }

.results-area { margin-top: 16px; }
.results-area.hidden { display: none; }

/* 필터 행 */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin-bottom: 16px;
}

/* 사용자 카드 그리드 */
.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.user-card {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    text-align: center;
}
.user-card:hover { border-color: #999; }
.user-card .name { font-weight: 600; }
.user-card .count { font-size: 12px; color: #888; margin-top: 4px; }

/* 의류 카드 그리드 */
.garment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.garment-card {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
}
.garment-card:hover { border-color: #999; }
.garment-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.garment-card .info { padding: 10px; }
.garment-card .category { font-weight: 600; font-size: 13px; }
.garment-card .desc { font-size: 12px; color: #666; margin-top: 4px; }
.garment-card .tags { margin-top: 6px; }
.tag {
    display: inline-block;
    background: #e3e8f0;
    color: #555;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin: 2px;
}
.garment-card .owner { font-size: 11px; color: #999; margin-top: 4px; }

/* 고스트 마네킹 버튼 */
.ghost-btn {
    margin-top: 8px;
    background: #e3f2fd;
    border-color: #90caf9;
    font-size: 12px;
}
.ghost-btn:hover { background: #bbdefb; }

/* 의류 상세 */
.detail-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    font-size: 13px;
}
.detail-grid dt { font-weight: 600; color: #555; }
.detail-grid dd { color: #333; }
.detail-images {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}
.detail-images img {
    max-width: 300px;
    max-height: 300px;
    border-radius: 6px;
    border: 1px solid #ddd;
}
.detail-images .img-label {
    text-align: center;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    font-size: 13px;
}
.pagination.hidden { display: none; }

/* 얼굴 상태 뱃지 */
.face-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.face-badge.identified { background: #c8e6c9; color: #2e7d32; }
.face-badge.unregistered { background: #fff9c4; color: #f57f17; }
.face-badge.not_detected { background: #ffcdd2; color: #c62828; }
.face-badge.skipped { background: #e0e0e0; color: #616161; }
