/* =========================================================
   monitor.css - monitor 화면 전체
   ---------------------------------------------------------
   바탕 #f3f4f6, 머리줄 #15171c, 흰 상자(테두리 #e3e5ea, 각진 모서리)
   글꼴 IBM Plex Sans KR, IP·숫자는 IBM Plex Mono (assets/fonts/fonts.css)
   내용 폭 최대 1200px 가운데, 제목은 왼쪽
   글자 명암비: 회색 #5b616e 흰 바탕 6.2 / 바탕 5.7, 머리줄 회색 #a3a8b3 7.5,
               빨강 #c0262d 5.9, 초록 #1e7a3c 5.4 (모두 4.5 이상)
   사이트 색은 assets/colors.php, 막대 높이·폭은 맨 아래 .h0~.h100 / .w0~.w100
   ========================================================= */
* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: #f3f4f6;
    color: #1b1e24;
    font-family: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

a { color: inherit; }

.num, .ip, code {
    font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

/* ---------- 머리줄 ---------- */
.top {
    background: #15171c;
    color: #fff;
}

.top-in {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 24px;
    max-width: 1200px;
    min-height: 56px;
    margin: 0 auto;
    padding: 8px 20px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
    text-decoration: none;
}

.brand b {
    font-family: "IBM Plex Mono", monospace;
    font-size: 17px;
    font-weight: 500;
    letter-spacing: 2px;
}

.brand span {
    color: #a3a8b3;
    font-size: 13px;
}

.menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.menu a,
.logout button {
    padding: 6px 10px;
    color: #c9cdd4;
    font-size: 14px;
    text-decoration: none;
}

.menu a:hover { color: #fff; }

.menu a.on {
    color: #fff;
    box-shadow: inset 0 -2px 0 #fff;
}

.logout { margin: 0 0 0 8px; }

.logout button {
    border: 1px solid #3a3e47;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.logout button:hover { border-color: #8d939e; color: #fff; }

/* ---------- 내용 틀 ---------- */
.wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 48px;
}

.titlebar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}

h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

h2 {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
}

h2 small {
    margin-left: 6px;
    color: #5b616e;
    font-size: 13px;
    font-weight: 400;
}

.box {
    min-width: 0;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e3e5ea;
}

.box-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
}

.note,
.empty {
    margin: 12px 0 0;
    color: #5b616e;
    font-size: 13px;
}

.empty { margin: 0; }

/* [사람 | 로봇 | 전체], 기간 탭 */
.kind,
.tabs {
    display: flex;
    background: #fff;
    border: 1px solid #e3e5ea;
}

.kind a,
.tabs a {
    padding: 7px 14px;
    color: #4a4f5a;
    text-decoration: none;
    white-space: nowrap;
}

.kind a + a,
.tabs a + a { border-left: 1px solid #e3e5ea; }

.kind a.on,
.tabs a.on {
    background: #15171c;
    color: #fff;
}

.tabs {
    align-self: flex-start;
    max-width: 100%;
    overflow-x: auto;
}

/* 표 */
.scroll {
    max-width: 100%;
    overflow-x: auto;
}

.grid {
    width: 100%;
    border-collapse: collapse;
}

.grid th,
.grid td {
    padding: 9px 10px;
    border-bottom: 1px solid #eef0f3;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.grid thead th {
    color: #5b616e;
    font-size: 12px;
    font-weight: 500;
    border-bottom-color: #e3e5ea;
}

.grid tfoot th,
.grid tfoot td {
    border-top: 2px solid #e3e5ea;
    border-bottom: 0;
    font-weight: 700;
}

.grid .r { text-align: right; }

.grid tbody tr:hover { background: #f8f9fa; }

.nowrap { white-space: nowrap; }

.warn {
    color: #c0262d;
    font-weight: 700;
}

/* 사이트 이름 앞 색 점 */
.site-name {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.dot {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* 표시 */
.tag {
    display: inline-block;
    padding: 0 6px;
    font-size: 11.5px;
    line-height: 18px;
    white-space: nowrap;
    vertical-align: 1px;
}

.tag-admin { background: #fff3d6; color: #7a4c00; }
.tag-bot   { background: #eef0f3; color: #4a4f5a; }

.ip {
    text-decoration: none;
    border-bottom: 1px solid #c9cdd4;
}

.ip:hover { border-bottom-color: #1b1e24; }

/* ---------- 현황: 지금 접속 중 + 사이트 카드 ---------- */
.now {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));   /* 한 줄에 5칸 (2026-10-31, 전에는 4칸) */
    gap: 12px;
}

.site-cards { display: contents; }

.now-big {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 18px 20px;
    background: #15171c;
    color: #fff;
}

.now-big span { color: #c9cdd4; font-size: 13px; }

.now-big strong {
    font-family: "IBM Plex Mono", monospace;
    font-size: 44px;
    font-weight: 500;
    line-height: 1.1;
}

.now-big strong b { font-weight: inherit; }

.now-big strong em {
    margin-left: 6px;
    font-size: 16px;
    font-style: normal;
    color: #c9cdd4;
}

.now-big small { color: #a3a8b3; font-size: 12px; }

.site-card { padding: 14px 16px; }

.site-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 700;
}

.site-card-head .num { font-size: 18px; font-weight: 500; }

.online-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.online-list li {
    padding: 6px 0;
    border-top: 1px solid #eef0f3;
    font-size: 13px;
}

.online-list .sub {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #5b616e;
    font-size: 12px;
}

.online-list .path {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.online-list .ago { flex: none; }

.online-list .more { color: #5b616e; font-size: 12px; }

/* ---------- 쌓은 막대 차트 ---------- */
.chart {
    display: flex;
    align-items: stretch;
    gap: 3px;
    height: 220px;
}

.chart.hours { min-width: 640px; }
.chart.days  { min-width: 780px; }

.col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.val {
    height: 18px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    color: #4a4f5a;
}

.track {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-bottom: 1px solid #c9cdd4;
}

.stack {
    display: flex;
    flex-direction: column-reverse;
    width: 72%;
    max-width: 30px;
    overflow: hidden;
}

.stack i { display: block; flex: none; width: 100%; }

.lbl {
    margin-top: 5px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    color: #5b616e;
    white-space: nowrap;
}

.lbl.em { color: #1b1e24; font-weight: 500; }

/* 버튼 줄 + 그 아래 상자들 묶음 (현황 차트 #charts, IP 순위 #ranking) */
.charts {
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-margin-top: 12px;              /* 자바스크립트 없이 #charts 로 내려올 때 */
}

/* 받아오는 동안 살짝 흐리게 (assets/monitor.js) */
.box.loading,
body.loading .wrap > section,
body.loading .charts .box {
    opacity: .5;
    transition: opacity .15s;
}

/* 사이트별 보기 버튼 줄 (현황 차트, IP 순위): [전체] + 색 네모와 이름. 고른 버튼은 검은 바탕 */
.site-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.site-filter a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid #e3e5ea;
    color: #1b1e24;
    text-decoration: none;
    white-space: nowrap;
}

.site-filter a:hover { border-color: #15171c; }

.site-filter a.on {
    background: #15171c;
    border-color: #15171c;
    color: #fff;
}

.site-filter i {
    flex: none;
    width: 12px;
    height: 12px;
}

.site-filter a.on i { box-shadow: 0 0 0 1px #fff; }

/* IP 순위: 사이트별 비율 막대 */
.ratio {
    display: flex;
    width: 180px;
    height: 10px;
    margin-top: 5px;
    background: #eef0f3;
}

.ratio i { display: block; height: 100%; }

/* ---------- IP 상세 ---------- */
.ip-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: -6px; }
.ip-title { margin: 0; }

.ip.big {
    border: 0;
    font-size: 20px;
    font-weight: 500;
    word-break: break-all;
}

.summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.summary .box > span {
    display: block;
    margin-bottom: 4px;
    color: #5b616e;
    font-size: 12px;
}

.summary b.num { font-size: 26px; font-weight: 500; }

.summary .times { margin: 0; font-size: 13px; line-height: 1.7; }

.site-counts {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
}

.site-counts li { display: flex; justify-content: space-between; gap: 8px; }

.site-counts b.num { font-size: 13px; font-weight: 500; }

.ua-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ua-list li {
    padding: 8px 0;
    border-top: 1px solid #eef0f3;
}

.ua-list li:first-child { border-top: 0; padding-top: 0; }

.ua-list code {
    display: block;
    font-size: 12.5px;
    word-break: break-all;
}

.ua-list .sub { color: #5b616e; font-size: 12px; }

.filter { display: flex; align-items: center; gap: 8px; font-size: 13px; }

.filter label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }

.js .js-hide { display: none; }

.log-table td.path-cell {
    min-width: 260px;
    max-width: 640px;
    white-space: normal;
    word-break: break-all;
    font-family: "IBM Plex Mono", monospace;
    font-size: 12.5px;
}

.st { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; }
.st-ok    { color: #1e7a3c; }
.st-block { color: #5b616e; }
.st-nf    { color: #c0262d; font-weight: 500; }

.more-row { margin: 14px 0 0; text-align: center; }

.btn-small {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #c9cdd4;
    background: #fff;
    color: #1b1e24;
    font: inherit;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
}

.btn-small:hover { border-color: #1b1e24; }

/* ---------- 로그인 · 비밀번호 변경 ---------- */
.login-box {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 420px;
    padding: 24px;
}

.login-box label {
    margin: 12px 0 6px;
    font-size: 13px;
    color: #4a4f5a;
}

.login-box label:first-of-type { margin-top: 0; }

.login-box input {
    height: 46px;
    padding: 0 12px;
    border: 1px solid #c9cdd4;
    background: #fff;
    font: inherit;
    font-size: 16px;
}

.login-box input:focus { outline: 2px solid #15171c; outline-offset: -1px; }

.btn-dark {
    height: 48px;
    margin-top: 18px;
    border: 0;
    background: #15171c;
    color: #fff;
    font: inherit;
    font-size: 15px;
    cursor: pointer;
}

.btn-dark:hover { background: #2a2e36; }

.login-box .note { margin-top: 12px; }

.msg {
    margin: 14px 0 0;
    padding: 10px 12px;
    font-size: 13px;
}

.msg-error { background: #fdecec; color: #c0262d; }
.msg-ok    { margin: 0 0 14px; background: #e8f5ec; color: #1e7a3c; }

/* ---------- 사이트 관리 (sites.php) ---------- */
.sites-msg { margin: 0 0 14px; }
.sites-box { margin-bottom: 16px; }
.sites-box h2 { margin: 0; font-size: 15px; font-weight: 500; }
.badge {
    display: inline-block;
    min-width: 20px;
    padding: 0 6px;
    background: #15171c;
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
    vertical-align: 1px;
}
.sites-box form { margin: 0; }
.sites-box form.inline { display: inline-flex; align-items: center; gap: 6px; }
.sites-box input:not([type=hidden]):not([type=color]),
.sites-box select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid #c9cdd4;
    background: #fff;
    color: #1b1e24;
    font: inherit;
    font-size: 13px;
}
.sites-box input[type=color] { width: 44px; height: 32px; padding: 2px; border: 1px solid #c9cdd4; background: #fff; cursor: pointer; }
.sites-box code { font-size: 13.5px; }
.new-dirs, .dir-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.new-dirs li, .dir-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.new-dirs code, .dir-list code { min-width: 110px; font-weight: 500; }
.btn-small.btn-on { background: #15171c; border-color: #15171c; color: #fff; }
.btn-small.btn-del { color: #c0262d; }
.btn-small.btn-del:hover { border-color: #c0262d; }
.btn-small.btn-arrow { padding: 6px 10px; }
.btn-small:disabled { opacity: .35; cursor: default; }
.btn-small:disabled:hover { border-color: #c9cdd4; }
.add-dir { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px !important; padding-top: 14px; border-top: 1px solid #eef0f3; font-size: 13px; }
.add-dir label { display: inline-flex; flex: 1 1 280px; align-items: center; gap: 8px; white-space: nowrap; }
.add-dir label input { flex: 1; min-width: 0; }
.sites-table td { vertical-align: middle; }
.sites-table input[name=label] { width: 140px; }
.note-inline { color: #5b616e; font-size: 12.5px; }

/* ---------- 좁은 화면 ---------- */
@media (max-width: 1000px) {
    .now { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .top-in { padding: 8px 14px; }
    .menu { width: 100%; overflow-x: auto; margin: 0 -10px; }
    .menu a, .logout button { white-space: nowrap; }
    .logout { margin-left: auto; }
    .wrap { padding: 18px 14px 40px; }
    .box { padding: 16px 14px; }
    .now { grid-template-columns: minmax(0, 1fr); }
    .summary { grid-template-columns: minmax(0, 1fr); }
    h1 { font-size: 21px; }
}

/* ---------- 막대 높이·폭 (CSP 가 인라인 style 을 막아서 클래스로) ---------- */
.h0{height:0%}.h1{height:1%}.h2{height:2%}.h3{height:3%}.h4{height:4%}.h5{height:5%}.h6{height:6%}.h7{height:7%}.h8{height:8%}.h9{height:9%}
.h10{height:10%}.h11{height:11%}.h12{height:12%}.h13{height:13%}.h14{height:14%}.h15{height:15%}.h16{height:16%}.h17{height:17%}.h18{height:18%}.h19{height:19%}
.h20{height:20%}.h21{height:21%}.h22{height:22%}.h23{height:23%}.h24{height:24%}.h25{height:25%}.h26{height:26%}.h27{height:27%}.h28{height:28%}.h29{height:29%}
.h30{height:30%}.h31{height:31%}.h32{height:32%}.h33{height:33%}.h34{height:34%}.h35{height:35%}.h36{height:36%}.h37{height:37%}.h38{height:38%}.h39{height:39%}
.h40{height:40%}.h41{height:41%}.h42{height:42%}.h43{height:43%}.h44{height:44%}.h45{height:45%}.h46{height:46%}.h47{height:47%}.h48{height:48%}.h49{height:49%}
.h50{height:50%}.h51{height:51%}.h52{height:52%}.h53{height:53%}.h54{height:54%}.h55{height:55%}.h56{height:56%}.h57{height:57%}.h58{height:58%}.h59{height:59%}
.h60{height:60%}.h61{height:61%}.h62{height:62%}.h63{height:63%}.h64{height:64%}.h65{height:65%}.h66{height:66%}.h67{height:67%}.h68{height:68%}.h69{height:69%}
.h70{height:70%}.h71{height:71%}.h72{height:72%}.h73{height:73%}.h74{height:74%}.h75{height:75%}.h76{height:76%}.h77{height:77%}.h78{height:78%}.h79{height:79%}
.h80{height:80%}.h81{height:81%}.h82{height:82%}.h83{height:83%}.h84{height:84%}.h85{height:85%}.h86{height:86%}.h87{height:87%}.h88{height:88%}.h89{height:89%}
.h90{height:90%}.h91{height:91%}.h92{height:92%}.h93{height:93%}.h94{height:94%}.h95{height:95%}.h96{height:96%}.h97{height:97%}.h98{height:98%}.h99{height:99%}
.h100{height:100%}
.w0{width:0%}.w1{width:1%}.w2{width:2%}.w3{width:3%}.w4{width:4%}.w5{width:5%}.w6{width:6%}.w7{width:7%}.w8{width:8%}.w9{width:9%}
.w10{width:10%}.w11{width:11%}.w12{width:12%}.w13{width:13%}.w14{width:14%}.w15{width:15%}.w16{width:16%}.w17{width:17%}.w18{width:18%}.w19{width:19%}
.w20{width:20%}.w21{width:21%}.w22{width:22%}.w23{width:23%}.w24{width:24%}.w25{width:25%}.w26{width:26%}.w27{width:27%}.w28{width:28%}.w29{width:29%}
.w30{width:30%}.w31{width:31%}.w32{width:32%}.w33{width:33%}.w34{width:34%}.w35{width:35%}.w36{width:36%}.w37{width:37%}.w38{width:38%}.w39{width:39%}
.w40{width:40%}.w41{width:41%}.w42{width:42%}.w43{width:43%}.w44{width:44%}.w45{width:45%}.w46{width:46%}.w47{width:47%}.w48{width:48%}.w49{width:49%}
.w50{width:50%}.w51{width:51%}.w52{width:52%}.w53{width:53%}.w54{width:54%}.w55{width:55%}.w56{width:56%}.w57{width:57%}.w58{width:58%}.w59{width:59%}
.w60{width:60%}.w61{width:61%}.w62{width:62%}.w63{width:63%}.w64{width:64%}.w65{width:65%}.w66{width:66%}.w67{width:67%}.w68{width:68%}.w69{width:69%}
.w70{width:70%}.w71{width:71%}.w72{width:72%}.w73{width:73%}.w74{width:74%}.w75{width:75%}.w76{width:76%}.w77{width:77%}.w78{width:78%}.w79{width:79%}
.w80{width:80%}.w81{width:81%}.w82{width:82%}.w83{width:83%}.w84{width:84%}.w85{width:85%}.w86{width:86%}.w87{width:87%}.w88{width:88%}.w89{width:89%}
.w90{width:90%}.w91{width:91%}.w92{width:92%}.w93{width:93%}.w94{width:94%}.w95{width:95%}.w96{width:96%}.w97{width:97%}.w98{width:98%}.w99{width:99%}
.w100{width:100%}

/* IP 정보: IP 순위에서 펼친 줄, IP 상세 맨 위 */
.ip-table tr.ip-detail > td { background: #f6f7f9; white-space: normal; }
/* 표가 옆으로 밀려도 내용은 화면 안에 그대로 */
.ip-table tr.ip-detail .ip-info { position: sticky; left: 12px; width: min(100%, calc(100vw - 90px)); }
.ip-info-msg { margin: 0; color: #5f6673; font-size: 14px; }
.ip-info-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 20px; margin: 0; }
.ip-info-list dt { color: #5f6673; font-size: 12px; }
.ip-info-list dd { margin: 2px 0 0; font-size: 14px; word-break: break-word; }
.ip-info-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 10px 0 0; color: #5f6673; font-size: 12px; }
.ip-info-msg + .ip-info-list { margin-top: 8px; }

/* ---------- 서버 성능 (system.php, assets/perf.js) 2026-11-05 ----------
   색: CPU #1f6fd1, 메모리 #8a3ffc, 보냄(업로드) #d9480f, 받음(다운로드) #1e7a3c, 디스크·읽기 #0b7285, 쓰기 #b5179e */
.perf {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.perf [hidden] { display: none !important; }        /* display:grid 등이 hidden 을 덮지 않게 */
.perf-side { display: flex; flex-direction: column; gap: 8px; }

.perf-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e3e5ea;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.perf-tab:hover { border-color: #b9bfca; }
.perf-tab.on { border-color: #15171c; box-shadow: inset 3px 0 0 #15171c; background: #f8f9fb; }
.perf-tab .spark { flex: 0 0 76px; width: 76px; height: 46px; background: #fff; }
.pt-text { display: flex; flex-direction: column; min-width: 0; }
.pt-name { font-weight: 700; font-size: 15px; }
.pt-val { font-size: 14px; }
.pt-sub { color: #5b616e; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.perf-main { min-width: 0; }
.pm-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 10px; }
.pm-head h2 { margin: 0; font-size: 22px; }
.pm-model { color: #5b616e; font-size: 13px; }
.pm-cap { display: flex; justify-content: space-between; gap: 8px; color: #5b616e; font-size: 12px; margin-bottom: 4px; }
.pm-chart { position: relative; }
.pm-chart canvas { display: block; width: 100%; height: 300px; background: #fff; touch-action: pan-y; }
.pm-chart-small canvas { height: 130px; }
.pm-axis { display: flex; justify-content: space-between; color: #5b616e; font-size: 12px; margin-top: 4px; }
.pm-tip {
    position: absolute;
    top: 8px;
    left: 0;
    padding: 6px 9px;
    background: rgba(21, 23, 28, .92);
    color: #fff;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
    pointer-events: none;
}
.pm-second { margin-top: 16px; }

.pm-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13px; color: #3a3f49; }
.pm-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.pm-legend i { display: inline-block; width: 14px; height: 3px; }
.lg-tx { background: #d9480f; }
.lg-rx { background: #1e7a3c; }
.lg-read { background: #0b7285; }
.lg-write { background: #b5179e; }
.lg-mem { background: #8a3ffc; }
.lg-cache { background: #d4bdfb; }
.lg-free { background: #fff; outline: 1px solid #c9ccd3; }
.pm-legend i.lg-mem, .pm-legend i.lg-cache, .pm-legend i.lg-free { height: 10px; width: 10px; }

.pm-threads { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.pm-threads .th canvas { display: block; width: 100%; height: 60px; }
.pm-threads .th span { display: block; margin-top: 3px; color: #5b616e; font-size: 12px; }

.pm-membar { margin-top: 16px; }
.mb-cap { color: #5b616e; font-size: 12px; margin-bottom: 4px; }
.mb-bar { display: flex; height: 30px; border: 1px solid #c9a8f5; background: #fff; }
.mb-bar i { display: block; height: 100%; }
.mb-used { background: #8a3ffc; }
.mb-cache { background: #d4bdfb; }

.pm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px 20px;
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid #e3e5ea;
}
.pm-stats .st { min-width: 0; }
.pm-stats dt { color: #5b616e; font-size: 12px; }
.pm-stats dd { margin: 2px 0 0; font-size: 17px; overflow-wrap: anywhere; }
.pm-stats .st.tx dd { color: #b23c0c; }
.pm-stats .st.rx dd { color: #1e7a3c; }
.pm-stats .st.read dd { color: #0b6672; }
.pm-stats .st.write dd { color: #9c1488; }
.pm-stats .st.warn dd { color: #9a5b00; }
.pm-stats .st.bad dd { color: #c0262d; font-weight: 700; }

/* 현황 맨 위 서버 요약 한 줄 */
.sys-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 22px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e3e5ea;
    text-decoration: none;
    font-size: 13.5px;
    color: #3a3f49;
}
.sys-line:hover { border-color: #b9bfca; }
.sys-line b { color: #1b1e24; }
.sys-line em { font-style: normal; color: #1b1e24; font-weight: 500; }
.sys-line i { margin-left: auto; font-style: normal; color: #5b616e; }

@media (max-width: 1000px) {
    .perf { grid-template-columns: minmax(0, 1fr); }
    .perf-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .perf-tab { flex-direction: column; align-items: stretch; gap: 6px; padding: 8px; }
    .perf-tab .spark { flex: none; width: 100%; height: 36px; }
    .pm-chart canvas { height: 220px; }
    .pm-chart-small canvas { height: 110px; }
    .pm-head h2 { font-size: 19px; }
    .pm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
    .pm-stats dd { font-size: 15px; }
    .sys-line { gap: 2px 14px; }
    .sys-line i { margin-left: 0; width: 100%; }
}

/* ---------- 서버 성능 > 인터넷: 회선 속도 측정 (2026-11-14, system.php · speed.js) ----------
   인터넷 칸(.perf-on-net)에서만 보임. 아래쪽의 기존 "실제 주고받는 양" 그래프와 구분선으로 나눔 */
.speed { display: none; margin-bottom: 18px; }
.perf-on-net .speed { display: block; }
.sp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sp-head h3, .sp-sub { margin: 0; font-size: 16px; }
.sp-run { min-height: 40px; padding: 8px 18px; }
.sp-run:disabled { opacity: .55; cursor: default; }
.sp-now { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sp-card { border: 1px solid #e3e5ea; padding: 12px 14px; display: flex; flex-direction: column; min-width: 0; }
.sp-label { color: #5b616e; font-size: 12.5px; }
.sp-label small { font-size: 11.5px; margin-left: 4px; }
.sp-card b { font-size: 34px; font-weight: 500; line-height: 1.2; margin-top: 4px; overflow-wrap: anywhere; }
.sp-unit { color: #5b616e; font-size: 12.5px; }
.sp-down b { color: #1e7a3c; }
.sp-up b { color: #b23c0c; }
.sp-status { margin: 10px 0 14px; color: #5b616e; font-size: 13px; }
.sp-status.sp-busy { color: #1b1e24; font-weight: 500; }
.sp-status.sp-err { color: #c0262d; }
.sp-chart canvas { height: 200px; }
.sp-list { margin-top: 14px; }
.sp-list summary { cursor: pointer; font-size: 13.5px; padding: 6px 0; }
.sp-list .scroll { margin-top: 6px; }
.sp-list td.sp-fail { color: #c0262d; }
.speed .note { margin: 12px 0 0; }
.sp-sub { margin-top: 22px; padding-top: 16px; border-top: 1px solid #e3e5ea; }

@media (max-width: 640px) {
    .sp-now { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sp-ping { grid-column: 1 / -1; }
    .sp-card b { font-size: 28px; }
    .sp-chart canvas { height: 160px; }
}
/* 현황 요약 줄: 인터넷 = 회선 속도 측정 결과 + 측정 시각 (2026-11-14) */
.sys-line small { margin-left: 6px; color: #5b616e; font-size: 12px; }
/* 현황 요약 줄: 항목마다 서버 성능 화면과 같은 색 (2026-11-14). 숫자 글자는 흰 바탕 명암비 4.5 이상
   CPU #1f6fd1 4.9 · 메모리 #8a3ffc 5.0 · 인터넷 #b23c0c 5.9(그래프 주황 #d9480f 는 4.3 이라 글자는 진한 주황) · 디스크 #0b7285 5.6 */
.sys-line span[class^="sl-"]::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 6px; vertical-align: 0; }
.sl-cpu::before { background: #1f6fd1; }
.sl-mem::before { background: #8a3ffc; }
.sl-net::before { background: #d9480f; }
.sl-disk::before { background: #0b7285; }
.sys-line .sl-cpu em { color: #1f6fd1; }
.sys-line .sl-mem em { color: #8a3ffc; }
.sys-line .sl-net em { color: #b23c0c; }
.sys-line .sl-disk em { color: #0b7285; }
