:root {
    --bg: #07101d;
    --bg-soft: #0f1929;
    --panel: rgba(15, 27, 46, 0.88);
    --panel-strong: #16253d;
    --border: rgba(118, 145, 185, 0.16);
    --text: #edf3ff;
    --muted: #90a2c2;
    --accent: #40d2b3;
    --accent-2: #5aa7ff;
    --danger: #ff6a86;
    --warning: #ffb454;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(90, 167, 255, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(64, 210, 179, 0.16), transparent 24%),
        linear-gradient(160deg, #06101c 0%, #0d1728 46%, #07101d 100%);
}
button, input, select, textarea, a { font: inherit; color: inherit; }
a { text-decoration: none; }

.shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}
.sidebar {
    padding: 28px 22px;
    background: rgba(8, 15, 28, 0.84);
    border-right: 1px solid var(--border);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.brand {
    display: block;
    margin-bottom: 18px;
    text-align: center;
}
.brand h1, .brand p, .eyebrow, .topbar h2, .panel h3 { margin: 0; }
.brand-logo {
    display: block;
    width: 170px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}
.brand-title-single {
    margin-top: 70px;
    white-space: nowrap;
    font-size: 1.04rem;
    font-weight: 900;
    color: #f7fbff;
    letter-spacing: 0;
    line-height: 5.1;
    text-shadow: 0 0 18px rgba(90, 167, 255, 0.12);
}
.eyebrow, .muted, .helper, .brand p { color: var(--muted); }
.nav {
    display: grid;
    gap: 10px;
    margin-top: -8px;
}
.nav-group { display: grid; gap: 8px; }
.nav-item, .segment, .ghost-button, .primary-button, .danger-button {
    border: 0;
    cursor: pointer;
    border-radius: 14px;
    transition: 160ms ease;
}
.nav-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    color: var(--muted);
    background: transparent;
}
.nav-item span { width: 18px; text-align: center; }
.nav-item i { font-size: 0.95rem; }
.nav-item.active, .nav-item:hover, .segment.active {
    color: var(--text);
    background: linear-gradient(135deg, rgba(90, 167, 255, 0.24), rgba(64, 210, 179, 0.14));
    box-shadow: inset 0 0 0 1px rgba(115, 170, 255, 0.14);
}
.subnav {
    display: grid;
    gap: 6px;
    margin-left: 18px;
    padding-left: 12px;
    border-left: 0;
}
.subnav-item {
    border: 0;
    background: transparent;
    color: var(--muted);
    text-align: left;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: 160ms ease;
}
.subnav-item.active,
.subnav-item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}
.nav-group:not(.active-group) .subnav-item.active {
    color: var(--muted);
    background: transparent;
}
.sidebar-card, .panel, .stat-card, .server-card, .job-card, .compact-card, .log-card, .login-card, .modal-card {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.sidebar-card {
    border-radius: 20px;
    padding: 18px;
    display: grid;
    gap: 8px;
}
.sidebar-logout { margin-top: auto; }
.main { padding: 28px; }
.topbar, .panel-head, .job-card-head, .compact-head, .topbar-actions, .inline-controls, .actions, .segmented {
    display: flex;
    gap: 12px;
    align-items: center;
}
.topbar, .panel-head, .job-card-head, .compact-head { justify-content: space-between; align-items: flex-start; }
.panel-head {
    margin-bottom: 16px;
}
.panel h3 {
    white-space: nowrap;
    line-height: 1.15;
}
.section-title-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.section-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.ubuntu-icon {
    color: #ff8a3d;
    background: linear-gradient(180deg, rgba(255, 138, 61, 0.16), rgba(255, 255, 255, 0.03));
    border-color: rgba(255, 138, 61, 0.22);
}
.server-section-head {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
}
.server-section-head h4 {
    margin: 0;
    font-size: 1rem;
}
.server-section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}
.server-list-head {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.topbar {
    margin-bottom: 28px;
    padding-bottom: 6px;
}
.topbar .eyebrow {
    display: block;
    margin-bottom: 10px;
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.topbar h2 {
    line-height: 1.15;
}
.topbar-profile {
    gap: 14px;
}
.profile-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}
.profile-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #07101d;
    font-weight: 700;
}
.profile-meta {
    display: grid;
    gap: 2px;
}
.profile-meta strong {
    font-size: 0.96rem;
}
.profile-meta span {
    color: var(--muted);
    font-size: 0.84rem;
}
.logout-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.chip, .status {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    border: 0;
    box-shadow: none;
    filter: none;
    text-shadow: none;
}
.primary-button, .ghost-button, .danger-button, .login-link { padding: 12px 16px; }
.primary-button {
    color: #07101d;
    background: linear-gradient(135deg, var(--accent), #86f2da);
}
.ghost-button {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}
.danger-button {
    color: white;
    background: linear-gradient(135deg, #ff6884, #d94762);
}
.actions-right {
    justify-content: flex-end;
}
.actions-right .primary-button,
.actions-right .ghost-button,
.actions-right .login-link {
    width: auto;
}
.btn-compact {
    padding: 10px 14px;
    min-height: 42px;
}
.view { display: none; gap: 20px; }
.view.active, .server-pane.active, .mode-pane.active, .log-pane.active { display: grid; }
#dashboard-view {
    position: relative;
}
#dashboard-view::before {
    content: '';
    position: absolute;
    inset: -12px -8px auto;
    height: 220px;
    border-radius: 28px;
    background:
        linear-gradient(90deg, rgba(64, 210, 179, 0.08) 1px, transparent 1px),
        linear-gradient(rgba(90, 167, 255, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 12% 18%, rgba(64, 210, 179, 0.18), transparent 22%),
        radial-gradient(circle at 84% 24%, rgba(90, 167, 255, 0.18), transparent 24%),
        linear-gradient(180deg, rgba(13, 27, 46, 0.65), rgba(7, 16, 29, 0));
    background-size: 24px 24px, 24px 24px, auto, auto, auto;
    border: 1px solid rgba(118, 145, 185, 0.08);
    opacity: 0.85;
    pointer-events: none;
    z-index: 0;
}
#dashboard-view > * {
    position: relative;
    z-index: 1;
}
.server-pane, .mode-pane { display: none; gap: 18px; }
.log-pane { display: none; gap: 18px; }
.stats-grid, .panel-grid {
    display: grid;
    gap: 18px;
}
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-secondary {
    margin-top: 2px;
}
.dashboard-secondary .panel {
    min-height: 100%;
}
.dashboard-panel-wide {
    min-height: 100%;
    grid-column: 1 / -1;
}
.dashboard-filter-row {
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
}
.dashboard-filter-row input {
    min-width: 280px;
}
.dashboard-filter-row select {
    width: 160px;
    min-width: 160px;
}
.dashboard-filter-row .danger-button {
    white-space: nowrap;
}
.panel, .stat-card, .login-card, .modal-card { border-radius: 24px; padding: 22px; }
.stat-card strong { display: block; font-size: 2.1rem; margin-top: 12px; }
.chart-list, .job-list, .server-list, .log-list, .modal-log-list { display: grid; gap: 14px; }
.mini-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.job-status-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.mini-stat-card,
.health-card {
    border-radius: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.stat-tone-total {
    background: linear-gradient(180deg, rgba(90, 167, 255, 0.12), rgba(255, 255, 255, 0.03));
}
.stat-tone-active {
    background: linear-gradient(180deg, rgba(63, 154, 255, 0.18), rgba(255, 255, 255, 0.03));
}
.stat-tone-completed {
    background: linear-gradient(180deg, rgba(35, 184, 107, 0.18), rgba(255, 255, 255, 0.03));
}
.stat-tone-failed {
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.18), rgba(255, 255, 255, 0.03));
}
.mini-stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1.6rem;
}
.status-overview-chart {
    display: grid;
    gap: 14px;
}
.status-chart-row {
    display: grid;
    gap: 8px;
}
.status-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-transform: capitalize;
}
.status-chart-head span {
    color: var(--muted);
}
.status-chart-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}
.status-chart-bar {
    display: block;
    height: 100%;
    border-radius: inherit;
}
.status-chart-queued { background: linear-gradient(90deg, #315f9c, #5a8ae0); }
.status-chart-running { background: linear-gradient(90deg, #1f6fb2, #58b5ff); }
.status-chart-completed { background: linear-gradient(90deg, #168645, #28c76f); }
.status-chart-failed { background: linear-gradient(90deg, #b31e1e, #ef4444); }
.status-chart-cancelled { background: linear-gradient(90deg, #445066, #7c8aa4); }
.latest-events-list {
    display: grid;
    gap: 10px;
}
.event-card {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.event-line {
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 0 6px rgba(90, 167, 255, 0.12);
}
.event-audit .event-line {
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(64, 210, 179, 0.12);
}
.event-content strong {
    display: block;
    line-height: 1.35;
}
.event-content span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.88rem;
}
.event-card time {
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}
.diagnostics-grid {
    display: grid;
    gap: 12px;
}
.diagnostic-card {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.diagnostic-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.diagnostic-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.diagnostic-metrics span {
    display: grid;
    gap: 4px;
}
.diagnostic-metrics label {
    color: var(--muted);
    font-size: 0.8rem;
}
.diagnostic-metrics strong {
    font-size: 0.9rem;
    line-height: 1.35;
}
.server-health-list {
    display: grid;
    gap: 12px;
}
.health-card {
    min-height: 96px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
        rgba(255, 255, 255, 0.02);
}
.health-card .compact-head > div {
    min-width: 0;
}
.health-card .compact-head strong {
    font-size: 1rem;
}
.health-card .compact-head span:not(.status) {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.86rem;
}
.compact { max-height: 420px; overflow: auto; }
.job-card, .server-card, .log-card, .compact-card { border-radius: 18px; padding: 18px; }
.server-list {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}
.server-card {
    padding: 12px 13px;
    border-radius: 14px;
    background:
        radial-gradient(circle at top right, rgba(255, 138, 61, 0.10), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
        var(--panel);
}
.server-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.server-card-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.server-platform {
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 0.92rem;
    color: #8fc2ff;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.server-card-brand strong {
    font-size: 0.9rem;
    line-height: 1.2;
}
.server-card-brand span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.8rem;
}
.server-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
}
.server-metric {
    display: grid;
    gap: 3px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.server-metric label {
    color: var(--muted);
    font-size: 0.7rem;
}
.server-metric strong {
    font-size: 0.8rem;
    line-height: 1.35;
    word-break: break-word;
}
.server-notes {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    color: #b9c9df;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    line-height: 1.4;
    font-size: 0.82rem;
}
.server-actions {
    margin-top: 8px;
    justify-content: flex-end;
    gap: 6px;
}
.server-actions .ghost-button,
.server-actions .danger-button {
    padding: 7px 10px;
    min-height: 32px;
    border-radius: 10px;
    font-size: 0.8rem;
}
.log-card {
    box-shadow: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(118, 145, 185, 0.22);
}
#migration-log-list .log-card {
    padding: 14px 16px;
    border-radius: 14px;
}
#migration-log-list .compact-head {
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}
#migration-log-list .compact-head strong {
    font-size: 0.95rem;
    line-height: 1.2;
}
#migration-log-list .log-card > span {
    display: block;
    margin-bottom: 10px;
    line-height: 1.3;
    font-size: 0.92rem;
}
#migration-log-list .job-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    margin-bottom: 10px;
    font-size: 0.86rem;
}
#migration-log-list .actions {
    justify-content: flex-start;
    margin-top: 0;
}
#migration-log-list .ghost-button {
    padding: 8px 12px;
    min-height: 36px;
    border-radius: 12px;
}
#audit-log-list .log-card {
    padding: 14px;
    border-radius: 16px;
}
#audit-log-list .log-card p {
    margin: 8px 0 0;
}
#audit-log-list .job-meta {
    gap: 6px;
    font-size: 0.88rem;
}
#audit-log-list pre {
    margin-top: 10px;
    padding: 10px;
    font-size: 0.78rem;
}
.job-card strong, .server-card strong, .log-card strong, .compact-card strong { display: block; }
.job-card span:not(.status),
.server-card span:not(.status),
.compact-card span:not(.status),
.log-card span:not(.status) { color: var(--muted); }
.job-meta, .server-grid, .chart-row {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    font-size: 0.92rem;
}
.progress {
    position: relative;
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0;
}
.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
}
.job-card-running {
    position: relative;
}
.job-card-running .progress {
    box-shadow: inset 0 0 0 1px rgba(64, 210, 179, 0.08);
}
.progress-running span {
    position: relative;
    overflow: hidden;
}
.progress-running span::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 42px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
    animation: progressShimmer 1.25s linear infinite;
}
@keyframes progressShimmer {
    from { left: -42px; }
    to { left: calc(100% + 42px); }
}
.job-history-scroll {
    max-height: 520px;
    overflow: auto;
    padding-right: 4px;
}
.job-history-panel {
    overflow: hidden;
}
.job-history-panel .job-card {
    padding: 14px 16px;
    border-radius: 16px;
}
.job-history-panel .job-card-head {
    gap: 10px;
}
.job-history-panel .job-card-head strong {
    font-size: 0.98rem;
}
.job-history-panel .job-card-head span {
    font-size: 0.88rem;
}
.job-history-panel .job-meta {
    gap: 6px 10px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    font-size: 0.84rem;
}
.job-history-panel .progress {
    margin: 10px 0;
    height: 7px;
}
.job-history-panel .actions {
    gap: 8px;
}
.job-history-panel .ghost-button,
.job-history-panel .danger-button {
    padding: 8px 12px;
    min-height: 36px;
    border-radius: 12px;
}
.job-history-scroll::-webkit-scrollbar {
    width: 10px;
}
.job-history-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}
.job-history-scroll::-webkit-scrollbar-thumb {
    background: rgba(90, 167, 255, 0.3);
    border-radius: 999px;
}
.job-history-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(90, 167, 255, 0.46);
}
.status-queued,
.status-tls {
    background: #315f9c;
    color: #eef5ff;
}
.status-running {
    background: #1f6fb2;
    color: #eefcff;
}
.status-healthy,
.status-completed {
    background: #16a34a;
    color: #ffffff;
    box-shadow: none;
    filter: none;
    text-shadow: none;
}
.status-failed,
.status-error,
.status-plain {
    background: #dc2626;
    color: #ffffff;
    box-shadow: none;
    filter: none;
    text-shadow: none;
}
.status-cancelled,
.status-unknown {
    background: #445066;
    color: #eef3ff;
}
.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.compact-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.split-panel {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}
.split-head {
    margin-bottom: 14px;
}
.split-head h4 {
    margin: 4px 0 0;
}
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}
.pagination span {
    color: var(--muted);
    font-size: 0.9rem;
}
label { display: grid; gap: 8px; }
label span, .inline-label span { font-size: 0.92rem; color: var(--muted); }
.inline-controls .inline-label {
    min-width: 120px;
}
.inline-controls .ghost-button {
    min-height: 44px;
}
.retention-controls {
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}
.retention-inline-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: auto;
    margin: 0;
}
.retention-inline-label span {
    white-space: nowrap;
}
.retention-inline-label input {
    width: 96px;
    min-width: 96px;
    text-align: center;
}
.audit-log-controls .danger-button,
.retention-controls .ghost-button {
    min-height: 44px;
}
input, select, textarea {
    width: 100%;
    padding: 13px 14px;
    color: var(--text);
    background: rgba(4, 10, 18, 0.55);
    border: 1px solid rgba(120, 146, 190, 0.18);
    border-radius: 14px;
    outline: none;
}
textarea { resize: vertical; min-height: 120px; }
.full-width { grid-column: 1 / -1; }
pre {
    margin: 12px 0 0;
    padding: 12px;
    overflow: auto;
    border-radius: 14px;
    background: rgba(2, 8, 15, 0.72);
    color: #cce2ff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
}
.empty, .error-text { margin: 0; }
.error-text { color: #ff9fb0; }
.modal {
    position: fixed;
    inset: 0;
    padding: 40px;
    background: rgba(3, 7, 14, 0.72);
    display: grid;
    place-items: center;
    z-index: 20;
}
.modal.hidden { display: none; }
.modal-card {
    width: min(900px, 100%);
    max-height: 80vh;
    overflow: auto;
}
.modal-drawer {
    width: min(980px, 100%);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(18, 31, 53, 0.98), rgba(13, 22, 39, 0.98));
}
.log-stream {
    display: grid;
    gap: 0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}
.log-line {
    display: grid;
    grid-template-columns: 88px 180px 1fr;
    gap: 12px;
    align-items: start;
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0;
}
.log-line:last-child {
    border-bottom: 0;
}
.log-level {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.log-level-info {
    color: #cfe1ff;
}
.log-level-warning {
    color: #ffd27a;
}
.log-level-error {
    color: #ff9aac;
}
.log-time {
    color: var(--muted);
    font-size: 0.84rem;
    white-space: nowrap;
}
.log-body {
    min-width: 0;
    overflow-wrap: anywhere;
}
.log-message {
    line-height: 1.4;
}
.log-body pre {
    margin-top: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}
.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(17, 29, 49, 0.96);
    border: 1px solid var(--border);
    transform: translateY(16px);
    opacity: 0;
    transition: 180ms ease;
    z-index: 40;
}
.toast.show { opacity: 1; transform: translateY(0); }
.login-body {
    display: grid;
    place-items: center;
}
.login-shell {
    width: 100%;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.login-card {
    width: min(460px, 100%);
}
.login-card h1 {
    text-align: center;
}
.login-form { display: grid; gap: 16px; margin-top: 18px; }
.login-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
}
.login-divider {
    margin: 18px 0;
    text-align: center;
    color: var(--muted);
    position: relative;
}
.login-divider span {
    background: var(--panel-strong);
    padding: 0 10px;
    position: relative;
}
.login-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--border);
}

@media (max-width: 1180px) {
    .stats-grid, .panel-grid { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .compact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mini-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .job-status-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .diagnostic-metrics { grid-template-columns: 1fr; }
}

@media (max-width: 920px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--border); }
    .topbar, .panel-head, .job-card-head, .compact-head, .topbar-actions, .inline-controls, .actions {
        flex-direction: column;
        align-items: stretch;
    }
    .stats-grid, .panel-grid, .form-grid, .compact-form, .split-grid, .mini-stats-grid { grid-template-columns: 1fr; }
    .modal { padding: 16px; }
    .job-status-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    #migration-log-list .job-meta { grid-template-columns: 1fr; }
    .log-line { grid-template-columns: 1fr; }
    .dashboard-filter-row {
        flex-wrap: nowrap;
    }
    .dashboard-filter-row input {
        min-width: 0;
        flex: 1 1 auto;
    }
    .dashboard-filter-row select {
        width: 140px;
        min-width: 140px;
    }
    .server-metrics {
        grid-template-columns: 1fr;
    }
    .event-card { grid-template-columns: 16px 1fr; }
    .event-card time { grid-column: 2; }
    .retention-inline-label {
        width: 100%;
        justify-content: space-between;
    }
    .retention-inline-label input {
        width: 100%;
        min-width: 0;
        text-align: left;
    }
}
