.stocktake-section {
    background: white;
    padding: 30px;
    margin: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .stocktake-section {
        margin: 10px;
        padding: 20px;
    }
    
    .location-selection {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .location-select {
        width: 100%;
    }
}

.stocktake-section h2 {
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.location-selection {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.location-selection label {
    font-weight: 600;
    color: #555;
}

.location-select {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: #667eea;
    background: #f9f9f9;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.file-icon {
    font-size: 48px;
}

.file-info {
    margin-top: 10px;
    color: #666;
}

.preview-section {
    margin-top: 30px;
}

.preview-section h3 {
    margin-bottom: 15px;
    color: #555;
}

.data-preview {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.data-preview table {
    width: 100%;
    border-collapse: collapse;
}

.data-preview th,
.data-preview td {
    padding: 10px;
    border: 1px solid #e0e0e0;
    text-align: left;
    font-size: 13px;
}

.data-preview th {
    background: #667eea;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-preview tr:nth-child(even) {
    background: #f9f9f9;
}

.difference-positive {
    color: #4caf50;
    font-weight: 600;
}

.difference-negative {
    color: #f44336;
    font-weight: 600;
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.history-container {
    margin-top: 20px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    margin-bottom: 10px;
}

.history-info {
    flex: 1;
}

.history-date {
    font-weight: 600;
    color: #333;
}

.history-details {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.history-actions {
    display: flex;
    gap: 10px;
}

/* ボタンスタイルの統一 */
.btn-sm {
    padding: 4px 8px;
    font-size: 11px;
}

/* 空の状態表示 */
.empty-preview,
.empty-history {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* ファイル情報表示 */
.file-info {
    margin-top: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 0.9em;
}

/* トーストメッセージのスタイル追加 */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 15px 30px;
    background: #333;
    color: white;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 10000;
    font-size: 14px;
}

.toast.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: #4caf50;
}

.toast.error {
    background: #f44336;
}

.toast.info {
    background: #2196f3;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.difference-check-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.difference-summary {
    margin-bottom: 20px;
}

.summary-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-label {
    font-weight: 600;
    color: #666;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.difference-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 4px;
    padding: 10px;
}

.difference-positive {
    color: #28a745;
    font-weight: bold;
}

.difference-negative {
    color: #dc3545;
    font-weight: bold;
}

.change-positive {
    color: #28a745;
}

.change-negative {
    color: #dc3545;
}

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    text-align: right;
}