/* ==================== inventory.css ==================== */
/* 물품관리 화면 전용 스타일 */

/* 화면 전체 레이아웃 */
#inventoryScreen {
    width: 100%;
    height: 100vh;
}

#inventoryScreen.active {
    display: flex;
}

/* ========== 좌측 사이드바 ========== */
#inventoryScreen .sidebar {
    width: 260px;
    background: var(--menu-bg);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100vh;
    transition: background-color 0.3s ease;
}

#inventoryScreen .sidebar-header {
    padding: 18px;
    background: var(--primary);
    color: white;
    transition: background-color 0.3s ease;
}

#inventoryScreen .sidebar-header h2 {
    font-size: 18px;
    margin: 0;
}

#inventoryScreen .sidebar-content {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#inventoryScreen .sidebar-footer {
    padding: 18px;
    border-top: 2px solid var(--border);
    flex-shrink: 0;
}

/* ========== 물품 카테고리 목록 ========== */
.inventory-category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inventory-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface-muted);
    color: var(--text);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    margin-top: 8px;
    margin-bottom: 4px;
}

.inventory-group-header:first-child {
    margin-top: 0;
}

.group-icon {
    font-size: 18px;
}

.group-label {
    font-size: 14px;
    font-weight: 700;
}

.inventory-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.inventory-category-item:hover {
    border-color: var(--primary);
    background: var(--surface-muted);
}

.inventory-category-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.category-icon {
    font-size: 20px;
}

.category-label {
    font-size: 14px;
    font-weight: 600;
}

/* ========== 메인 영역 ========== */
#inventoryScreen .main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    gap: 16px;
    max-height: 100vh;
}

#inventoryScreen .calendar-section {
    flex: 1;
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* ========== 우측 통계 패널 ========== */
#inventoryScreen .items-section {
    width: 260px;
    background: var(--white);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
}

#inventoryScreen .items-header {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

#inventoryScreen .items-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

#inventoryStatsContent {
    flex: 1;
    overflow-y: auto;
}

.inventory-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ========== 상태 카드 ========== */
.inventory-status-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.status-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.status-card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.status-card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 120px;
}

.status-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.status-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.status-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--white);
    color: var(--text);
    transition: all 0.2s;
}

.status-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(155, 136, 219, 0.1);
}

.status-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.progress-bar {
    flex: 1;
    height: 24px;
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 50%, #FFC107 80%, #FF5722 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
}

.progress-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    min-width: 50px;
    text-align: right;
}

/* ========== 테이블 섹션 ========== */
.inventory-table-section {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.table-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
}

.inventory-table thead {
    background: var(--surface);
}

.inventory-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
}

.inventory-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.inventory-table tbody tr:hover {
    background: var(--surface-muted);
}

.inventory-table tbody tr:last-child td {
    border-bottom: none;
}

/* 반응형 */
@media (max-width: 768px) {
    #inventoryScreen .main-content {
        padding: 12px;
    }
    
    .status-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .status-label {
        min-width: auto;
    }
    
    .status-input-group {
        width: 100%;
    }
}

