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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #121212;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #1a1a1a;
    color: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #333;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: #aaa;
    text-decoration: none;
}

.nav-links a:hover {
    color: white;
}

.user-email {
    color: #666;
    font-size: 0.875rem;
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    width: 100%;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.875rem;
    border-top: 1px solid #333;
    margin-top: 2rem;
}

/* Auth pages */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    background: #1e1e1e;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.auth-container h1 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #fff;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #ccc;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 1rem;
    background: #2a2a2a;
    color: #e0e0e0;
}

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

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #888;
    font-size: 0.8rem;
}

button[type="submit"] {
    width: 100%;
    padding: 0.75rem;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

button[type="submit"]:hover {
    background: #45a049;
}

button[type="submit"]:disabled {
    background: #444;
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: #888;
}

.error {
    background: #3d1a1a;
    color: #ff6b6b;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #5d2a2a;
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
}

.upload-section, .jobs-section {
    background: #1e1e1e;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

h2 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #333;
    color: #fff;
}

/* Progress */
#progress-container {
    margin: 1rem 0;
}

.hidden {
    display: none;
}

.progress-bar {
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: #4CAF50;
    width: 0%;
    transition: width 0.3s;
}

#status-text {
    font-size: 0.875rem;
    color: #888;
    margin-top: 0.5rem;
}

/* Jobs list */
.job-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #333;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    background: #252525;
}

.job-card:hover {
    border-color: #444;
}

.job-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.job-info strong {
    font-size: 0.95rem;
    color: #e0e0e0;
}

.job-email, .job-date {
    font-size: 0.8rem;
    color: #888;
}

.job-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge.pending {
    background: #3d3520;
    color: #f0c040;
}

.status-badge.processing {
    background: #1a2d3d;
    color: #6bb3ff;
}

.status-badge.completed {
    background: #1a3d2a;
    color: #6bff9b;
}

.status-badge.failed {
    background: #3d1a1a;
    color: #ff6b6b;
}

.download-btn {
    padding: 0.5rem 1rem;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.875rem;
}

.download-btn:hover {
    background: #45a049;
}

.delete-btn {
    padding: 0.5rem 1rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
}

.delete-btn:hover {
    background: #c82333;
}

.clear-all-btn {
    padding: 0.25rem 0.75rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    float: right;
}

.clear-all-btn:hover {
    background: #c82333;
}

.error-msg {
    font-size: 0.8rem;
    color: #ff6b6b;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.loading, .empty {
    text-align: center;
    color: #666;
    padding: 2rem;
}

.job-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.job-progress .progress-bar {
    flex: 1;
    height: 6px;
    background: #333;
    border-radius: 3px;
    overflow: hidden;
}

.job-progress .progress-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s;
}

.job-progress .progress-text {
    font-size: 0.75rem;
    color: #888;
    min-width: 35px;
    text-align: right;
}
