:root {
    --bg: #0f1419;
    --surface: #1a2332;
    --surface2: #243044;
    --text: #e7ecf3;
    --muted: #9aa8bc;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius: 10px;
    --font: "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

.topbar {
    background: var(--surface);
    border-bottom: 1px solid #2d3a4f;
    padding: 0.75rem 0;
    margin-bottom: 1.5rem;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}

nav a {
    margin-inline-start: 1rem;
    color: var(--muted);
}

nav a.active, nav a:hover { color: var(--text); }

.main { padding-bottom: 3rem; min-height: 70vh; }

.footer {
    border-top: 1px solid #2d3a4f;
    padding: 1.25rem 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.card {
    background: var(--surface);
    border: 1px solid #2d3a4f;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.card h1, .card h2 { margin-top: 0; }

.grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #3a4d66;
    background: var(--surface2);
    color: var(--text);
    font: inherit;
}

textarea { min-height: 120px; resize: vertical; }
textarea.code { font-family: Consolas, monospace; font-size: 0.85rem; direction: ltr; text-align: left; min-height: 280px; }

.btn {
    display: inline-block;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font: inherit;
}

.btn:hover { background: var(--accent-hover); }
.btn-secondary { background: #475569; }
.btn-danger { background: var(--danger); }
.btn-success { background: var(--success); }

.btn + .btn { margin-inline-start: 0.5rem; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th, td {
    padding: 0.65rem;
    border-bottom: 1px solid #2d3a4f;
    text-align: right;
}

th { color: var(--muted); font-weight: 600; }

.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success { background: #14532d; color: #bbf7d0; }
.alert-error { background: #7f1d1d; color: #fecaca; }
.alert-warning { background: #78350f; color: #fde68a; }
.alert-info { background: #1e3a5f; color: #bfdbfe; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
}

.badge-done { background: #14532d; color: #86efac; }
.badge-pending { background: #422006; color: #fcd34d; }
.badge-processing { background: #1e3a5f; color: #93c5fd; }
.badge-failed { background: #7f1d1d; color: #fca5a5; }

.muted { color: var(--muted); font-size: 0.9rem; }

.progress-wrap {
    background: var(--surface2);
    border-radius: 8px;
    overflow: hidden;
    height: 8px;
    margin: 0.5rem 0;
}

.progress-bar {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s;
}

.disclaimer {
    border-inline-start: 4px solid var(--warning);
    padding: 0.75rem 1rem;
    background: #42200633;
    margin-bottom: 1rem;
    border-radius: 0 8px 8px 0;
}
