.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }

.stat-card {
    border: 1px solid var(--bs-border-color);
    border-radius: .65rem;
    padding: .65rem .9rem;
    height: 100%;
}
.stat-card .k {
    font-size: .72rem;
    color: var(--bs-secondary-color);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.stat-card .v {
    font-family: ui-monospace, monospace;
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.2;
    margin-top: .15rem;
}

.cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}
.cat-pill {
    cursor: pointer;
    user-select: none;
    font-size: .78rem;
    padding: .3rem .7rem;
    border-radius: 999px;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    transition: all .15s ease;
    white-space: nowrap;
}
.cat-pill:hover { border-color: var(--bs-primary); color: var(--bs-primary); }
.cat-pill.active {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}
.cat-pill .cnt {
    font-family: ui-monospace, monospace;
    font-size: .7rem;
    opacity: .75;
    margin-left: .25rem;
}

.port-table-wrap {
    max-height: 720px;
    overflow: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
}
.port-table {
    margin-bottom: 0;
    font-size: .86rem;
}
.port-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bs-tertiary-bg);
    border-bottom: 2px solid var(--bs-border-color);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--bs-secondary-color);
    white-space: nowrap;
}
.port-table tbody tr { cursor: pointer; }
.port-table tbody tr:hover { background: var(--bs-tertiary-bg); }
.port-table td { vertical-align: middle; }

.port-num {
    font-family: ui-monospace, monospace;
    font-weight: 700;
    font-size: .95rem;
    white-space: nowrap;
}
.port-num.high { color: var(--bs-danger); }

.proto-badge {
    font-family: ui-monospace, monospace;
    font-size: .72rem;
    padding: .18rem .48rem;
    border-radius: .3rem;
    white-space: nowrap;
}
.proto-TCP     { background: #dbeafe; color: #1e40af; }
.proto-UDP     { background: #fef3c7; color: #92400e; }
.proto-TCPUDP  { background: #e0e7ff; color: #4338ca; }

.svc-name {
    font-family: ui-monospace, monospace;
    font-weight: 600;
    font-size: .86rem;
    word-break: break-all;
}
.cat-tag {
    font-size: .7rem;
    padding: .16rem .5rem;
    border-radius: 999px;
    white-space: nowrap;
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
}
.st-badge {
    font-size: .68rem;
    padding: .16rem .5rem;
    border-radius: 999px;
    white-space: nowrap;
}
.st-official   { background: #d1fae5; color: #065f46; }
.st-unofficial { background: #e5e7eb; color: #374151; }
.st-deprecated { background: #fef3c7; color: #92400e; }
.st-high-risk  { background: #fee2e2; color: #991b1b; }
.st-malware    { background: #1f2937; color: #f9fafb; }

.desc-cell {
    color: var(--bs-secondary-color);
    font-size: .82rem;
    line-height: 1.5;
    word-break: break-word;
}
.desc-cell .hl {
    background: #fef08a;
    color: #713f12;
    padding: 0 .15rem;
    border-radius: .15rem;
}

.row-hide { display: none !important; }

.copy-btn {
    opacity: 0;
    transition: opacity .15s ease;
}
.port-table tbody tr:hover .copy-btn { opacity: 1; }

.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--bs-secondary-color);
}
.empty-state .icon { font-size: 2.5rem; opacity: .5; }

.status-filter .form-check-label { font-size: .82rem; }

@media (max-width: 575.98px) {
    .port-table { font-size: .8rem; }
    .desc-cell { font-size: .76rem; }
}