/* OneLink Syslog (on-premise) — same look as the OneLink panel's Syslog page */
:root { --ol-green: #16a34a; --ol-green-d: #0f7a3a; --ol-ink: #0f172a; --ol-muted: #64748b; --ol-line: #e2e8f0; --ol-soft: #f8fafc; --ol-bg: #f1f5f9; }
body { background: var(--ol-bg); font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--ol-ink); min-height: 100vh; }
a { color: var(--ol-green-d); }

.ol-top { background: linear-gradient(135deg, #0f9e58, #0b7a44); color: #fff; }
.ol-top .container-fluid { min-height: 60px; }
.ol-brand { font-weight: 800; font-size: 1.15rem; color: #fff; text-decoration: none; display: flex; align-items: center; gap: .55rem; }
.ol-brand small { font-weight: 600; font-size: .72rem; opacity: .85; display: block; line-height: 1.1; }
.ol-nav a { color: rgba(255,255,255,.88); text-decoration: none; font-weight: 600; font-size: .88rem; padding: .45rem .8rem; border-radius: .6rem; display: inline-flex; align-items: center; gap: .4rem; }
.ol-nav a.active, .ol-nav a:hover { background: rgba(255,255,255,.16); color: #fff; }
.ol-lic { font-size: .72rem; background: rgba(255,255,255,.16); border-radius: 2rem; padding: .2rem .6rem; white-space: nowrap; }

.ol-main { padding: 1.25rem 0 2rem; }
.ol-card { background: #fff; border: 1px solid var(--ol-line); border-radius: 1rem; overflow: hidden; }
.ol-card-h { padding: .9rem 1rem; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ol-card-b { padding: 1rem; }
.ol-ic { width: 38px; height: 38px; border-radius: .7rem; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: color-mix(in srgb, var(--ol-green) 14%, transparent); color: var(--ol-green); }
.btn-brand { background: var(--ol-green); border-color: var(--ol-green); color: #fff; font-weight: 600; }
.btn-brand:hover, .btn-brand:focus { background: var(--ol-green-d); border-color: var(--ol-green-d); color: #fff; }

.sl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 991.98px) { .sl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sl-stat { background: #fff; border: 1px solid var(--ol-line); border-radius: .9rem; padding: .8rem 1rem; min-width: 0; }
.sl-stat span { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ol-muted); }
.sl-stat b { display: block; font-size: 1.2rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-stat small { color: var(--ol-muted); font-size: .72rem; }
.sl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }

.sl-filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .85rem 1rem; border-bottom: 1px solid #f1f5f9; }
.sl-filters .form-control, .sl-filters .form-select { width: auto; }
@media (max-width: 575.98px) { .sl-filters .form-control, .sl-filters .form-select { width: 100%; } }
.sl-table { font-size: .78rem; margin: 0; }
.sl-table thead th { font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ol-muted); white-space: nowrap; background: var(--ol-soft); position: sticky; top: 0; z-index: 1; }
.sl-table td { vertical-align: top; white-space: nowrap; }
.sl-table td.sl-msg { white-space: normal; min-width: 280px; max-width: 460px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; color: #475569; }
.sl-proto { font-size: .65rem; font-weight: 700; padding: .15rem .45rem; border-radius: .35rem; }
.sl-proto-TCP { background: color-mix(in srgb, #16a34a 15%, transparent); color: #16a34a; }
.sl-proto-UDP { background: color-mix(in srgb, #2563eb 15%, transparent); color: #2563eb; }
.sl-proto-ICMP { background: color-mix(in srgb, #ea580c 15%, transparent); color: #ea580c; }
.sl-nat { color: #7c3aed; font-weight: 600; }
.sl-table td.sl-app { white-space: normal; min-width: 170px; max-width: 260px; word-break: break-word; }
.sl-table td.sl-app b { font-weight: 600; }
.sl-scroll { max-height: 70vh; overflow: auto; }

.ol-pill { font-size: .68rem; font-weight: 800; letter-spacing: .03em; padding: .2rem .55rem; border-radius: 2rem; }
.ol-pill.on { background: color-mix(in srgb, #16a34a 16%, transparent); color: #15803d; }
.ol-pill.error { background: color-mix(in srgb, #dc2626 14%, transparent); color: #b91c1c; }
.ol-pill.off { background: #f1f5f9; color: var(--ol-muted); }

.ol-steps { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.ol-step { flex: 1 1 0; min-width: 140px; display: flex; align-items: center; gap: .55rem; padding: .6rem .8rem; border-radius: .8rem; background: #fff; border: 1px solid var(--ol-line); font-size: .82rem; font-weight: 600; color: var(--ol-muted); }
.ol-step i { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #f1f5f9; font-style: normal; font-size: .8rem; }
.ol-step.on { border-color: var(--ol-green); color: var(--ol-ink); }
.ol-step.on i, .ol-step.done i { background: var(--ol-green); color: #fff; }
.ol-code { background: #0f172a; color: #e2e8f0; border-radius: .7rem; padding: 2.6rem 1rem .9rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .76rem; white-space: pre-wrap; word-break: normal; overflow-wrap: anywhere; position: relative; margin: 0; line-height: 1.55; }
.ol-copy { position: absolute; top: .45rem; right: .45rem; }
.ol-auth { max-width: 440px; margin: 7vh auto 0; }
.ol-meter { height: .55rem; border-radius: 1rem; background: #eef2f7; overflow: hidden; }
.ol-meter > div { height: 100%; background: var(--ol-green); border-radius: 1rem; }
.ol-meter.warn > div { background: #d97706; }
.ol-meter.full > div { background: #dc2626; }

/* Mikrotik list */
.ol-mk { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; border-top: 1px solid #eef2f7; }
.ol-mk:first-child { border-top: 0; }
.ol-mk-ic { width: 38px; height: 38px; border-radius: .7rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #ecfdf3; color: #16a34a; }
.ol-mk-main { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.ol-mk-seen { min-width: 110px; }
.ol-mk-act { display: flex; gap: .4rem; flex-shrink: 0; }
@media (max-width: 575.98px) {
    .ol-mk { flex-wrap: wrap; align-items: flex-start; }
    .ol-mk-main { flex: 1 1 0; }
    .ol-mk-seen, .ol-mk-act { flex: 0 0 100%; padding-left: 52px; }
    .ol-mk-seen span { display: inline !important; margin-right: .3rem; }
}
@media (max-width: 575.98px) {
    .ol-steps { flex-wrap: nowrap; gap: .35rem; }
    .ol-step { min-width: 0; flex-direction: column; gap: .3rem; padding: .5rem .3rem; font-size: .7rem; text-align: center; line-height: 1.15; }
}

/* Storage chooser */
.ol-disk { display: flex; align-items: center; gap: .75rem; padding: .8rem .9rem; border: 1.5px solid var(--ol-line); border-radius: .85rem; margin-bottom: .55rem; cursor: pointer; background: #fff; }
.ol-disk:has(input:checked) { border-color: var(--ol-green); background: #f0fdf4; }
.ol-disk.off { opacity: .55; cursor: not-allowed; }
.ol-disk .form-check-input { margin: 0; flex-shrink: 0; }
.ol-disk-ic { width: 38px; height: 38px; border-radius: .7rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #f1f5f9; color: #475569; }
.ol-disk:has(input:checked) .ol-disk-ic { background: var(--ol-green); color: #fff; }
.ol-confirm { padding: .75rem .9rem; border-radius: .8rem; background: #fef2f2; border: 1px solid #fecaca; margin-top: .25rem; }
.ol-job { display: flex; gap: .8rem; align-items: flex-start; padding: .85rem 1rem; border-radius: .85rem; margin-bottom: .9rem; border: 1px solid var(--ol-line); background: #f8fafc; }
.ol-job.done { background: #f0fdf4; border-color: #bbf7d0; }
.ol-job.error { background: #fef2f2; border-color: #fecaca; }
.ol-job-ic { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #e2e8f0; color: #334155; }
.ol-job.done .ol-job-ic { background: var(--ol-green); color: #fff; }
.ol-job.error .ol-job-ic { background: #dc2626; color: #fff; }
/* Mikrotik picker above the logs */
.ol-picker { display: flex; gap: .4rem; overflow-x: auto; padding: .75rem 1rem 0; }
.ol-picker a { flex-shrink: 0; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 2rem; font-size: .8rem; font-weight: 600;
    text-decoration: none; color: #475569; background: #f8fafc; border: 1px solid var(--ol-line); white-space: nowrap; }
.ol-picker a:hover { border-color: var(--ol-green); color: #15803d; }
.ol-picker a.active { background: var(--ol-green); border-color: var(--ol-green); color: #fff; }

/* ── Server Health ─────────────────────────────────────────────── */
.ol-nav a { position: relative; }
.ol-nav-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-left: .1rem; box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.ol-nav-dot.warning { background: #f59e0b; }
.ol-nav-dot.critical { background: #ef4444; animation: hl-pulse 1.8s infinite; }
@keyframes hl-pulse { 0% { box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 0 2px rgba(239,68,68,.7); } 70% { box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 0 8px rgba(239,68,68,0); } 100% { box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 0 2px rgba(239,68,68,0); } }
.sl-stat-link { color: inherit; text-decoration: none; display: block; transition: border-color .15s, box-shadow .15s; }
.sl-stat-link:hover { border-color: var(--ol-green); box-shadow: 0 2px 10px rgba(15,23,42,.06); color: inherit; }

.hl-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.hl-head-ic { width: 46px; height: 46px; border-radius: .9rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.2rem;
    background: color-mix(in srgb, #e11d48 12%, transparent); color: #e11d48; }
.hl-level { font-size: .7rem; font-weight: 800; letter-spacing: .02em; padding: .25rem .6rem; border-radius: 2rem; }
.hl-level.ok { background: color-mix(in srgb, #16a34a 15%, transparent); color: #15803d; }
.hl-level.warn { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; }
.hl-level.bad { background: color-mix(in srgb, #dc2626 14%, transparent); color: #b91c1c; }
.hl-live { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 600; color: var(--ol-muted); background: #fff; border: 1px solid var(--ol-line);
    border-radius: 2rem; padding: .3rem .75rem; }
.hl-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: hl-beat 2s infinite; }
.hl-live.off .dot { background: #94a3b8; animation: none; }
@keyframes hl-beat { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

.hl-alert { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem .9rem; border-radius: .85rem; border: 1px solid var(--ol-line); border-left-width: 4px; background: #fff; margin-bottom: .5rem; }
.hl-alert > i { font-size: 1.05rem; margin-top: .1rem; width: 1.2rem; text-align: center; flex-shrink: 0; }
.hl-alert b { display: block; font-size: .88rem; }
.hl-alert span { display: block; font-size: .8rem; color: #475569; }
.hl-alert.critical { border-color: #fecaca; border-left-color: #dc2626; background: #fef2f2; }
.hl-alert.critical > i { color: #dc2626; }
.hl-alert.warning { border-color: #fde68a; border-left-color: #f59e0b; background: #fffbeb; }
.hl-alert.warning > i { color: #d97706; }
.hl-alert.ok { border-left-color: #16a34a; }
.hl-alert.ok > i { color: #16a34a; }
.min-w-0 { min-width: 0 !important; }
.hl-card .ol-card-h { flex-wrap: nowrap; }
.hl-dash { display: flex; align-items: center; gap: 1rem; padding: .75rem .9rem; border-radius: .9rem; border: 1px solid #fde68a; border-left: 4px solid #f59e0b; background: #fffbeb; }
.hl-dash.critical { border-color: #fecaca; border-left-color: #dc2626; background: #fef2f2; }
.hl-dash-list { flex: 1 1 auto; min-width: 0; }
.hl-dash-row { display: flex; gap: .65rem; align-items: flex-start; padding: .35rem 0; }
.hl-dash-row + .hl-dash-row { border-top: 1px dashed color-mix(in srgb, #94a3b8 40%, transparent); }
.hl-dash-row > i { width: 1.1rem; text-align: center; margin-top: .2rem; flex-shrink: 0; color: #d97706; }
.hl-dash-row.critical > i { color: #dc2626; }
.hl-dash-row b { display: block; font-size: .86rem; }
.hl-dash-row span { display: block; font-size: .78rem; color: #475569; }
@media (max-width: 575.98px) {
    .hl-dash { flex-direction: column; align-items: stretch; gap: .5rem; }
    .hl-dash-row span { display: none; }      /* titles only on phones — details on Server Health */
}

.hl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
@media (max-width: 1199.98px) { .hl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hl-grid > :last-child { grid-column: 1 / -1; } }
@media (max-width: 767.98px) { .hl-grid { grid-template-columns: minmax(0, 1fr); } }
.hl-card .ol-card-b { display: flex; flex-direction: column; }
.hl-main { display: flex; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.hl-ring { position: relative; width: 104px; height: 104px; flex-shrink: 0; --tone: #16a34a; }
.hl-ring.warn { --tone: #f59e0b; }
.hl-ring.bad { --tone: #dc2626; }
.hl-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hl-ring circle { fill: none; stroke-width: 10; }
.hl-ring .bg { stroke: #eef2f7; }
.hl-ring .fg { stroke: var(--tone); stroke-linecap: round; transition: stroke-dashoffset .6s ease, stroke .3s; }
.hl-ring-v { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 34px; color: var(--ol-ink); }
.hl-ring-v b { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.hl-ring-v small { font-size: .85rem; font-weight: 700; color: var(--ol-muted); margin-left: 1px; }
.hl-kv { display: flex; flex-direction: column; gap: .55rem; min-width: 0; flex: 1 1 auto; }
.hl-kv > div > span { display: block; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ol-muted); }
.hl-kv b { display: block; font-size: .98rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-kv small { display: block; font-size: .7rem; color: var(--ol-muted); }
.hl-spark { width: 100%; height: 56px; display: block; margin-top: .2rem; background: linear-gradient(#f8fafc, #fff); border: 1px solid #eef2f7; border-radius: .55rem; }
.hl-spark .lim { stroke: #dc2626; stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; opacity: .45; }
.hl-spark .line { fill: none; stroke: #16a34a; stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.hl-spark .area { fill: color-mix(in srgb, #16a34a 12%, transparent); }
.hl-spark.ram .line { stroke: #2563eb; }
.hl-spark.ram .area { fill: color-mix(in srgb, #2563eb 12%, transparent); }
.hl-spark-cap { display: flex; justify-content: space-between; gap: .5rem; font-size: .68rem; color: var(--ol-muted); margin: .15rem 0 .5rem; }
.hl-cores-wrap { margin-top: auto; padding-top: .45rem; border-top: 1px dashed var(--ol-line); display: flex; align-items: flex-end; gap: .6rem; }
.hl-cores-wrap > span { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ol-muted); white-space: nowrap; padding-bottom: .1rem; }
.hl-cores { display: flex; gap: 3px; align-items: flex-end; height: 30px; flex: 1 1 auto; min-width: 0; background: repeating-linear-gradient(0deg, transparent 0 9px, #f1f5f9 9px 10px); border-radius: 3px; }
.hl-cores i { flex: 1 1 0; min-width: 3px; max-width: 14px; height: var(--h); background: #16a34a; border-radius: 3px 3px 0 0; transition: height .5s ease; opacity: .85; }
.hl-cores i.warn { background: #f59e0b; }
.hl-cores i.bad { background: #dc2626; }
.hl-swap { margin-top: auto; padding-top: .5rem; border-top: 1px dashed var(--ol-line); }
.hl-disk { padding: .5rem 0; border-top: 1px dashed var(--ol-line); }
.hl-disk:first-child { border-top: 0; }
.ol-meter > div { transition: width .6s ease; }

.hl-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-size: .78rem; color: #475569; margin-bottom: .4rem; }
.hl-legend i, .hl-tip i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: .35rem; }
.hl-legend i.cpu, .hl-tip i.cpu { background: #16a34a; }
.hl-legend i.ram, .hl-tip i.ram { background: #2563eb; }
.hl-legend i.lim { background: repeating-linear-gradient(90deg, #dc2626 0 4px, transparent 4px 7px); }
.hl-legend b { font-weight: 700; color: var(--ol-ink); margin-left: .2rem; }
.hl-chart { position: relative; }
.hl-chart svg { display: block; overflow: visible; }
.hl-chart .grid { stroke: #eef2f7; stroke-width: 1; }
.hl-chart .lim { stroke: #dc2626; stroke-width: 1; stroke-dasharray: 4 3; opacity: .7; }
.hl-chart .ax { font-size: 10px; fill: #94a3b8; }
.hl-chart path { fill: none; stroke-width: 1.6; stroke-linejoin: round; }
.hl-chart path.cpu { stroke: #16a34a; }
.hl-chart path.ram { stroke: #2563eb; opacity: .85; }
.hl-chart .cur { stroke: #94a3b8; stroke-dasharray: 3 3; }
.hl-chart .pc { fill: #16a34a; stroke: #fff; stroke-width: 1.5; }
.hl-chart .pr { fill: #2563eb; stroke: #fff; stroke-width: 1.5; }
.hl-chart .hit { fill: transparent; cursor: crosshair; }
.hl-tip { position: absolute; top: 0; pointer-events: none; background: #0f172a; color: #e2e8f0; font-size: .72rem; border-radius: .5rem; padding: .4rem .55rem; white-space: nowrap; z-index: 2; box-shadow: 0 4px 14px rgba(15,23,42,.2); }
.hl-tip b { display: block; color: #fff; margin-bottom: .1rem; }
.hl-tip span { display: block; }
.hl-range .btn.active { background: var(--ol-green); border-color: var(--ol-green) !important; color: #fff; }
.hl-svc { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-top: 1px solid #f1f5f9; font-size: .86rem; }
.hl-svc:first-child { border-top: 0; }
.hl-dot { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; flex-shrink: 0; }
.hl-dot.ok { background: #22c55e; box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 20%, transparent); }
.hl-dot.bad { background: #dc2626; box-shadow: 0 0 0 3px color-mix(in srgb, #dc2626 20%, transparent); }
@media (max-width: 575.98px) {
    .hl-ring { width: 92px; height: 92px; }
    .hl-ring-v { padding-top: 29px; }
    .hl-ring-v b { font-size: 1.5rem; }
    .hl-live { order: 3; }
}
