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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    opacity: 0.9;
    font-size: 1.1em;
}

.status-panel {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 15px;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.status-label {
    font-size: 0.85em;
    color: #6c757d;
    font-weight: 500;
}

.status-value {
    font-size: 0.95em;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    background: #e9ecef;
}

.status-value.success {
    background: #d4edda;
    color: #155724;
}

.status-value.error {
    background: #f8d7da;
    color: #721c24;
}

.status-value.warning {
    background: #fff3cd;
    color: #856404;
}

.upload-section {
    padding: 40px;
}

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

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

.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input[type="number"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.85em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    background: #f8f9ff;
    cursor: pointer;
    transition: all 0.3s;
    margin: 30px 0;
}

.upload-area:hover {
    background: #f0f2ff;
    border-color: #764ba2;
    transform: translateY(-2px);
}

.upload-area.dragover {
    background: #e8ebff;
    border-color: #764ba2;
    transform: scale(1.02);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: #667eea;
    stroke-width: 2;
}

.upload-area h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #495057;
}

.upload-area p {
    color: #6c757d;
    margin: 5px 0;
}

.file-types {
    font-size: 0.9em;
    color: #667eea;
    font-weight: 500;
    margin-top: 10px;
}

.upload-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 20px;
    font-size: 0.95em;
}

.btn-secondary:hover {
    background: #f8f9ff;
    transform: translateY(-1px);
}

.file-list {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.file-list h4 {
    margin-bottom: 15px;
    color: #495057;
}

.file-list ul {
    list-style: none;
}

.file-list li {
    padding: 10px;
    background: white;
    margin-bottom: 8px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #667eea;
}

.file-list li .file-name {
    font-weight: 500;
    color: #495057;
}

.file-list li .file-size {
    color: #6c757d;
    font-size: 0.9em;
}

.btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1em;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.results-section {
    margin-top: 30px;
    padding: 40px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.results-section h2 {
    margin-bottom: 20px;
    color: #495057;
}

.result-item {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.result-item.success {
    border-left-color: #28a745;
}

.result-item.error {
    border-left-color: #dc3545;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.result-filename {
    font-weight: 600;
    color: #495057;
}

.result-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.result-status.success {
    background: #d4edda;
    color: #155724;
}

.result-status.error {
    background: #f8d7da;
    color: #721c24;
}

.result-details {
    color: #6c757d;
    font-size: 0.9em;
}

.result-message {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    color: #495057;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
}

.summary {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    text-align: center;
}

.summary h3 {
    margin-bottom: 10px;
}

.summary .total {
    font-size: 2em;
    font-weight: 700;
    margin: 10px 0;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .upload-section {
        padding: 20px;
    }
}

/* Navigation styles */
.nav-link {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.3);
}

