* ,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f172a;
    color: #e5e7eb;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #020617 0%, #0b1120 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.2);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #38bdf8, #4f46e5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #0b1120;
    font-size: 14px;
}

.brand-text {
    font-weight: 600;
    color: #e5e7eb;
    font-size: 16px;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    margin-bottom: 6px;
}

.sidebar-link {
    display: block;
    padding: 6px 10px;
    border-radius: 8px;
    color: #cbd5f5;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover {
    background: rgba(148, 163, 184, 0.2);
    color: #f9fafb;
}

.sidebar-link-danger {
    color: #fca5a5;
}

.sidebar-link-danger:hover {
    background: rgba(248, 113, 113, 0.12);
    color: #fecaca;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: 64px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 55%);
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #f9fafb;
}

.user-pill {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.25);
    font-size: 12px;
    color: #bbf7d0;
}

.page-content {
    padding: 20px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.9));
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 18px 18px 16px;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.8);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #e5e7eb;
}

.card-subtitle {
    font-size: 12px;
    color: #9ca3af;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(90deg, #6366f1, #0ea5e9);
    color: #f9fafb;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.08s ease;
}

.btn:hover {
    filter: brightness(1.06);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.6);
    color: #e5e7eb;
}

.btn-secondary:hover {
    background: rgba(15, 23, 42, 1);
    border-color: rgba(248, 250, 252, 0.4);
}

.btn-danger {
    background: linear-gradient(90deg, #ef4444, #f97316);
    border-color: transparent;
    color: #fef2f2;
}

.input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 10px;
}

.input-group {
    flex: 1 1 220px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input-label {
    font-size: 12px;
    color: #9ca3af;
}

.input-control,
.select-control,
textarea {
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    font-size: 13px;
    padding: 7px 10px;
    outline: none;
    width: 100%;
}

.input-control:focus,
.select-control:focus,
textarea:focus {
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.5);
}

.helper-text {
    font-size: 11px;
    color: #6b7280;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.chip-success {
    background: rgba(16, 185, 129, 0.16);
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.35);
}

.chip-warning {
    background: rgba(245, 158, 11, 0.16);
    color: #fed7aa;
    border-color: rgba(249, 115, 22, 0.4);
}

.chip-error {
    background: rgba(248, 113, 113, 0.14);
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.5);
}

.chip-info {
    background: rgba(59, 130, 246, 0.16);
    color: #bfdbfe;
    border-color: rgba(59, 130, 246, 0.5);
}

.table-wrapper {
    overflow: auto;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: rgba(15, 23, 42, 0.9);
}

.table th,
.table td {
    padding: 8px 10px;
    white-space: nowrap;
}

.table thead {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.9));
}

.table th {
    text-align: left;
    font-size: 12px;
    color: #9ca3af;
    border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.95);
}

.table tbody tr:hover {
    background: rgba(30, 64, 175, 0.4);
}

.table td {
    border-bottom: 1px solid rgba(30, 41, 59, 0.9);
}

.badge-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
}

.badge-status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fed7aa;
}

.badge-status-running {
    background: rgba(59, 130, 246, 0.2);
    color: #bfdbfe;
}

.badge-status-completed {
    background: rgba(16, 185, 129, 0.2);
    color: #bbf7d0;
}

.badge-status-failed {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.progress-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(30, 64, 175, 0.7);
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e, #a3e635);
    transition: width 0.2s ease;
}

.log-line {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 6px;
    margin-bottom: 4px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(30, 41, 59, 0.9);
}

.log-line-info {
    border-left: 3px solid #38bdf8;
}

.log-line-warning {
    border-left: 3px solid #f97316;
}

.log-line-error {
    border-left: 3px solid #ef4444;
}

.log-meta {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 2px;
}

.log-message {
    color: #e5e7eb;
}
