* {
    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: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

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

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card h2 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.5em;
}

/* Upload Area */
.upload-area {
    margin-top: 15px;
}

.upload-box {
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9ff;
}

.upload-box:hover {
    background: #f0f2ff;
    border-color: #764ba2;
}

.upload-box svg {
    color: #667eea;
    margin-bottom: 15px;
}

.file-name {
    margin-top: 10px;
    color: #666;
    font-size: 0.9em;
}

/* Form Groups */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 0.5rem;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.help-text {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    min-width: 150px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

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

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.status-item {
    text-align: center;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 8px;
}

.status-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.status-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
}

/* Progress Bar */
.progress-bar-container {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    width: 0%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9em;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #667eea;
}

.current-company {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9ff;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    color: #667eea;
}

/* Company List */
.company-list {
    max-height: 400px;
    overflow-y: auto;
}

.company-item {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.company-item.processing {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.company-item.completed {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.company-item.failed {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.company-name {
    font-weight: 500;
}

.company-status {
    font-size: 0.9em;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.company-status.processing {
    background: #ffc107;
    color: #000;
}

.company-status.completed {
    background: #28a745;
    color: white;
}

.company-status.failed {
    background: #dc3545;
    color: white;
}

.empty-message {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

/* Error Card */
.error-card {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.error-card h2 {
    color: #dc3545;
}

#errorMessage {
    color: #721c24;
    font-weight: 500;
}

/* Scrollbar */
.company-list::-webkit-scrollbar {
    width: 8px;
}

.company-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.company-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.company-list::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

