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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 5px;
}

nav {
    color: #666;
    font-size: 14px;
}

nav a {
    color: #3498db;
    text-decoration: none;
}

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

h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

textarea {
    font-family: monospace;
    resize: vertical;
}

.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.inline-form input,
.inline-form select {
    flex: 1;
}

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

.form-row input {
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    color: #333;
    background: #e0e0e0;
    transition: background 0.2s;
}

.btn:hover {
    background: #d0d0d0;
}

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

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

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

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

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

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

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

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

th {
    background: #f8f8f8;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: #666;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pending {
    background: #ffeaa7;
    color: #6c5c00;
}

.badge-processing {
    background: #74b9ff;
    color: #003d7a;
}

.badge-completed {
    background: #55efc4;
    color: #006b3d;
}

.badge-failed {
    background: #fab1a0;
    color: #7a0000;
}

/* Alerts */
.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert.error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.muted {
    color: #999;
    font-style: italic;
}

/* Login */
.login-box {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-box h1 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.login-box h2 {
    color: #666;
    font-size: 16px;
    margin-bottom: 25px;
}

.login-box .form-group {
    text-align: left;
}

.login-box .btn {
    width: 100%;
    padding: 10px;
}

/* Card grid */
.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

.card {
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: pointer;
    text-align: center;
    padding: 40px 20px;
}

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

.card h2 {
    margin-bottom: 8px;
}

.card p {
    color: #666;
    font-size: 14px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 28px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 18px;
}

.modal p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 24px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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