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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: #ffffff;
    color: #333;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.nav-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo {
    height: 105px;
    width: auto;
}

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

.nav-links a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover {
    color: #3498db;
}

.nav-user {
    color: #666;
    font-size: 0.9rem;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
}

/* Flash messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h2 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

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

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #219a52;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Upload area */
.upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #3498db;
    background: #f8f9fa;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-area p {
    margin: 0.5rem 0;
    color: #7f8c8d;
}

.upload-area .upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Job list */
.job-list {
    list-style: none;
}

.job-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.job-item:last-child {
    border-bottom: none;
}

.job-info {
    flex: 1;
}

.job-filename {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.job-meta {
    font-size: 0.875rem;
    color: #7f8c8d;
}

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

.status-pending {
    background: #ffeaa7;
    color: #d68910;
}

.status-running {
    background: #74b9ff;
    color: #0a3d62;
}

.status-completed {
    background: #55efc4;
    color: #00695c;
}

.status-failed {
    background: #fab1a0;
    color: #c0392b;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background: #f8f9fa;
    font-weight: 600;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #95a5a6;
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
}

/* Auth pages */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    max-width: 600px;
    width: 100%;
    height: auto;
}

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

.auth-footer {
    text-align: center;
    margin-top: 1rem;
    color: #7f8c8d;
}

.auth-footer a {
    color: #3498db;
}

/* Utility */
.text-muted {
    color: #7f8c8d;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* Limit notice */
.limit-notice {
    background: #fff3cd;
    color: #856404;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Job detail */
.job-detail {
    margin-bottom: 1rem;
}

.job-detail dt {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.job-detail dd {
    margin-bottom: 1rem;
}

/* Landing page */
.landing-container {
    text-align: center;
    padding: 2rem 0;
}

.landing-logo {
    margin-bottom: 1.5rem;
}

.landing-logo img {
    max-width: 500px;
    width: 100%;
    height: auto;
}

.landing-title {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 2.5rem;
    font-weight: 600;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.tool-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.tool-card h2 {
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.tool-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}
