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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, 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: 12px;
    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: 30px;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

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

main {
    padding: 30px;
}

.info-banner {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    color: #2e7d32;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.form-section h2 {
    font-size: 1.3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

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

.form-group.port {
    max-width: 120px;
}

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

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

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

.form-group.checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group.checkbox input {
    width: 20px;
    height: 20px;
}

.form-group.checkbox label {
    margin-bottom: 0;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    font-size: 1.1rem;
    padding: 15px;
}

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

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

.btn-secondary {
    background: #f5f5f5;
    color: #555;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.status-message {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.status-message.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-message.error {
    background: #ffebee;
    color: #c62828;
}

.result-section {
    margin-top: 25px;
    padding: 20px;
    border-radius: 8px;
}

.result-section.success {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}

.result-section.error {
    background: #ffebee;
    border: 2px solid #f44336;
}

.progress-section {
    margin-top: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.progress-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin: 15px 0;
}

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

.progress-text {
    text-align: center;
    color: #666;
}

.queue-info {
    margin-top: 15px;
    padding: 10px;
    background: #fff3e0;
    border-radius: 6px;
    text-align: center;
    color: #e65100;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #555;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pending { background: #fff3e0; color: #e65100; }
.status-dry_run { background: #e3f2fd; color: #1565c0; }
.status-queued { background: #fff3e0; color: #ff6f00; }
.status-running { background: #e8f5e9; color: #2e7d32; }
.status-completed { background: #c8e6c9; color: #1b5e20; }
.status-failed { background: #ffcdd2; color: #b71c1c; }
.status-cancelled { background: #f5f5f5; color: #616161; }

.job-detail {
    max-width: 800px;
    margin: 0 auto;
}

.job-info {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.info-row {
    margin-bottom: 10px;
}

.job-accounts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.account-card {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
}

.account-card h3 {
    margin-bottom: 15px;
    color: #667eea;
}

.job-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
}

.stat-label {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85rem;
}

.job-actions {
    margin: 20px 0;
    text-align: center;
}

.job-logs {
    margin-top: 20px;
}

.job-logs h3 {
    margin-bottom: 10px;
}

.job-logs pre {
    background: #263238;
    color: #aed581;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.85rem;
    max-height: 400px;
    overflow-y: auto;
}

.dry-run-result {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.dry-run-result h3 {
    color: #1565c0;
    margin-bottom: 10px;
}

.dry-run-result .btn {
    margin-top: 15px;
    max-width: 250px;
}

footer {
    background: #f5f5f5;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

footer a {
    color: #667eea;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.jobs-list {
    max-width: 1000px;
    margin: 0 auto;
}

.jobs-list .btn {
    margin-bottom: 20px;
    display: inline-block;
    text-decoration: none;
}
