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

body {
    font-family: 'Inter', sans-serif;
    background: #f5f5f5;
    -webkit-font-smoothing: antialiased;
}

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 80px;
}

/* Header */
.page-header {
    background: #fff;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.btn-back {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.btn-back svg {
    width: 24px;
    height: 24px;
    color: #333;
}

.header-info {
    flex: 1;
}

.header-info h1 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.btn-refresh {
    background: #1976d2;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-refresh svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

/* Auto-refresh Section */
.auto-refresh-section {
    background: #fff;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #1976d2;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.auto-refresh-label {
    display: flex;
    flex-direction: column;
}

.label-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.countdown-text {
    font-size: 12px;
    color: #666;
}

/* Upload Section */
.upload-section {
    background: #fff;
    padding: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.btn-upload {
    width: 100%;
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
    transition: transform 0.2s;
}

.btn-upload:active {
    transform: scale(0.98);
}

/* Tabs */
.tabs-section {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    background: #f5f5f5;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    background: #1976d2;
    color: #fff;
}

.tab-badge {
    background: rgba(0,0,0,0.15);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
}

/* Content */
.content {
    flex: 1;
    padding: 16px;
}

.lists-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* List Card */
.list-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.list-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.list-id {
    font-size: 20px;
    font-weight: 800;
    color: #1976d2;
}

.list-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.list-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.list-warehouse,
.list-customer,
.list-date {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.list-warehouse {
    font-weight: 600;
    color: #333;
}

.list-progress {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
}

.progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-numbers {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.progress-picked {
    font-size: 24px;
    font-weight: 800;
    color: #1976d2;
}

.progress-separator {
    font-size: 18px;
    font-weight: 600;
    color: #999;
}

.progress-total {
    font-size: 18px;
    font-weight: 600;
    color: #666;
}

.progress-percentage {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.check-icon {
    width: 24px;
    height: 24px;
    color: #22c55e;
}

.progress-bar-container {
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* Loading */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #e0e0e0;
    border-top-color: #1976d2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container p {
    color: #666;
    font-size: 16px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    color: #ccc;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.empty-state p {
    color: #666;
    font-size: 14px;
}

/* Alert */
.alert {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    font-size: 16px;
    font-weight: 600;
    max-width: 90%;
}

.alert.success {
    background: #22c55e;
}

.alert.error {
    background: #ef4444;
}

/* Auto-refresh Banner */
.auto-refresh-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.refresh-icon {
    width: 20px;
    height: 20px;
    color: #065f46;
    animation: spin 2s linear infinite;
}

.auto-refresh-banner span {
    font-size: 13px;
    font-weight: 600;
    color: #065f46;
    flex: 1;
}

/* Dialog */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.dialog {
    background: #fff;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.dialog-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dialog-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.btn-dialog-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog-content {
    padding: 24px;
}

.dialog-actions {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: #1976d2;
}

.btn-secondary {
    padding: 12px 24px;
    background: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
