@font-face {
    font-family: Inter;
    src: url('/assets/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #292e34;
    --muted: #66727e;
    --accent: #bd4f15;
    --line: #e2e6e9;
    --red: #b33f38;
    --orange: #a65d0b;
    --yellow: #796900;
    --green: #28734b;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: #f4f6f8;
    color: var(--ink);
    font:
        16px/1.55 Inter,
        system-ui,
        sans-serif;
}
button,
input,
textarea,
select {
    font: inherit;
}
button,
a {
    touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid #b96d3b;
    outline-offset: 3px;
    box-shadow: none !important;
}
.form-control:focus,
.form-select:focus {
    border-color: #b96d3b;
    box-shadow: 0 0 0 2px #d65b1820;
}
[hidden] {
    display: none !important;
}
.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
}
.btn-primary:hover {
    background: #9c4113;
    border-color: #9c4113;
}
.btn {
    border-radius: 7px;
    font-weight: 500;
}
.brand-mark {
    display: inline-grid;
    place-items: center;
    background: #d65b18;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 32px;
    font-weight: 800;
}
.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: var(--ink);
    font-size: 27px;
    font-weight: 750;
}
.brand small {
    font-size: 10px;
    display: block;
    letter-spacing: 2px;
    color: var(--muted);
}
#sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 245px;
    padding: 32px 20px;
    background: white;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    z-index: 20;
}
.nav-caption {
    margin: 46px 12px 12px;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--muted);
}
.nav-item {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    text-align: left;
    border: none;
    border-radius: 8px;
    background: none;
    padding: 12px;
    color: var(--muted);
    margin-bottom: 5px;
}
.nav-item.active {
    background: #fbede4;
    color: var(--accent);
    font-weight: 650;
}
.server-card {
    margin-top: auto;
    border: 1px solid var(--line);
    padding: 18px;
    border-radius: 10px;
}
.server-card p,
footer {
    font-size: 13px;
    color: var(--muted);
    margin: 8px 0 14px;
}
footer {
    padding: 18px 8px 0;
}
.tag {
    display: inline-block;
    background: #eef2ef;
    color: #41634c;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 5px;
}
main {
    margin-left: 245px;
}
header {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 76px;
    padding: 0 32px;
    border-bottom: 1px solid var(--line);
    background: white;
    font-size: 14px;
}
.divider {
    color: #acb3bb;
    padding: 0 14px;
}
.header-end {
    margin-left: auto;
    display: flex;
    gap: 16px;
    align-items: center;
    color: var(--muted);
}
.content {
    max-width: 1750px;
    margin: auto;
    padding: 36px 32px;
}
.titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}
.eyebrow {
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 2px;
    color: #9d613c;
    margin-bottom: 8px;
}
h1 {
    font-size: clamp(25px, 2.3vw, 35px);
    font-weight: 750;
    letter-spacing: -1px;
}
h1 span {
    color: #d65b18;
}
.titlebar p:not(.eyebrow) {
    color: var(--muted);
    margin-bottom: 0;
}
.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.actions label {
    margin: 0;
}
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 26px;
}
.stat {
    padding: 20px;
    border: 1px solid var(--line);
    background: white;
    border-radius: 10px;
}
.stat strong {
    display: block;
    font-size: 34px;
    font-weight: 700;
    margin: 6px 0;
}
.stat p,
.stat small {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}
.php-distribution {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.inventory-panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}
.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--line);
}
.panel-heading small {
    color: var(--muted);
}
.tabs {
    display: flex;
    gap: 6px;
}
.tabs button,
.risk-filters button {
    border: 1px solid transparent;
    background: none;
    border-radius: 6px;
    padding: 7px 12px;
}
.tabs .selected {
    background: #fbede4;
    color: var(--accent);
    font-weight: 650;
}
.tabs span {
    font-size: 12px;
    margin-left: 6px;
}
.risk-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px 20px 0;
}
.risk-filters button {
    border-color: var(--line);
    font-size: 14px;
}
.risk-filters .selected {
    box-shadow: inset 0 0 0 2px currentColor;
}
.tools {
    padding: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.tools .search {
    flex: 1;
    min-width: 220px;
}
.table-wrap {
    overflow-x: auto;
}
table.table {
    margin: 0;
    min-width: 900px;
    font-size: 14px;
}
.table th {
    padding: 14px 18px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    background: #fafbfc;
    white-space: nowrap;
}
.table td {
    padding: 15px 18px;
    border-color: #edf0f2;
}
.table td:first-child {
    border-left: 4px solid transparent;
}
.table .risk-red td:first-child {
    border-left-color: var(--red);
}
.table .risk-orange td:first-child {
    border-left-color: var(--orange);
}
.table .risk-yellow td:first-child {
    border-left-color: #b5a62b;
}
.table .risk-green td:first-child {
    border-left-color: var(--green);
}
.table .risk-red td {
    background-color: #fff7f5;
}
.table .risk-orange td {
    background-color: #fffbf4;
}
.table .risk-yellow td {
    background-color: #fffef4;
}
.table .risk-green td {
    background-color: #f6fbf8;
}
.table small {
    display: block;
    color: var(--muted);
    margin-top: 5px;
}
.table .subrow td:first-child {
    padding-left: 42px;
}
.link-button {
    border: none;
    padding: 0;
    background: none;
    text-align: left;
    font-weight: 650;
    color: var(--ink);
    overflow-wrap: anywhere;
}
.expand {
    border: 1px solid var(--line);
    border-radius: 4px;
    background: white;
    margin-right: 8px;
    width: 26px;
}
.external {
    color: #796552;
    text-decoration: none;
    margin-left: 8px;
}
.badge-php {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 650;
    margin-right: 3px;
}
.red {
    background: #fce8e4 !important;
    color: var(--red);
}
.orange {
    background: #fff0dc !important;
    color: var(--orange);
}
.yellow {
    background: #f8f2c8 !important;
    color: var(--yellow);
}
.green {
    background: #e7f3eb !important;
    color: var(--green);
}
.unknown {
    background: #edf0f3;
    color: #606b77;
}
.review-button {
    background: white;
    border: 1px solid #d9dfe4;
    border-radius: 6px;
    padding: 5px 8px;
    font-size: 13px;
    white-space: nowrap;
}
.panel-footer,
.bottom-note {
    font-size: 13px;
    color: var(--muted);
    padding: 16px 20px;
}
.panel-footer {
    border-top: 1px solid var(--line);
}
.bottom-note {
    padding-left: 0;
}
.notice {
    border: 1px solid #d9e1e9;
    background: #edf3f7;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 14px;
}
.notice small {
    display: block;
    margin: 10px 0;
}
.empty {
    padding: 40px;
    text-align: center;
    color: var(--muted);
}
#message:not(:empty),
#login-error:not(:empty) {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 18px;
    background: #fff0dc;
    color: #87460c;
}
dialog {
    border: 1px solid var(--line);
    border-radius: 14px;
    width: min(780px, calc(100% - 28px));
    max-height: 92vh;
    padding: 26px;
    color: var(--ink);
}
dialog::backdrop {
    background: #19263780;
}
.detail-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 16px;
    margin-bottom: 18px;
}
h2 {
    font-size: 23px;
    overflow-wrap: anywhere;
}
#detail-content h3 {
    font-size: 17px;
    margin: 24px 0 12px;
}
#detail-content label {
    display: block;
    margin: 12px 0 5px;
}
#detail-content .btn {
    margin: 12px 6px 0 0;
}
.event {
    padding: 14px 0;
    border-top: 1px solid var(--line);
}
.event p {
    white-space: pre-wrap;
    margin: 6px 0;
    overflow-wrap: anywhere;
}
.event small {
    color: var(--muted);
}
.evidence {
    background: #f6f7f9;
    padding: 14px;
    border-radius: 8px;
    margin: 10px 0;
}
.evidence pre {
    max-height: 300px;
    overflow: auto;
    font-size: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}
.login-card {
    background: white;
    border: 1px solid var(--line);
    padding: 38px;
    border-radius: 14px;
    width: min(100%, 470px);
}
.login-card .brand-mark {
    margin-bottom: 24px;
}
.login-card p,
.login-card small {
    color: var(--muted);
}
.login-card label {
    margin: 20px 0 8px;
}
.login-card button {
    margin: 16px 0;
    width: 100%;
}
.login-card small {
    display: block;
    font-size: 12px;
}
body.compact #sidebar {
    width: 84px;
    padding: 28px 14px;
}
body.compact .sidebar-label {
    display: none;
}
body.compact main {
    margin-left: 84px;
}
body.compact .nav-caption {
    margin-top: 40px;
}
body.compact nav {
    margin-top: 36px;
}
.nav-shade {
    position: fixed;
    inset: 0;
    border: none;
    background: #19263780;
    z-index: 19;
}
@media (max-width: 1150px) {
    .titlebar {
        align-items: flex-start;
        flex-direction: column;
    }
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 700px) {
    #sidebar,
    body.compact #sidebar {
        width: 245px;
        transform: translateX(-100%);
        padding: 28px 20px;
    }
    body.nav-open #sidebar {
        transform: translateX(0);
    }
    body.compact .sidebar-label {
        display: initial;
    }
    body.compact nav {
        margin-top: 0;
    }
    main,
    body.compact main {
        margin-left: 0;
    }
    .content {
        padding: 24px 14px;
    }
    header {
        padding: 0 14px;
        gap: 8px;
    }
    .header-end {
        font-size: 0;
        gap: 0;
    }
    .stats {
        gap: 10px;
    }
    .stat {
        padding: 14px;
    }
    .stat strong {
        font-size: 28px;
    }
    .tools {
        display: grid;
        grid-template-columns: 1fr;
    }
    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .tabs button {
        padding: 6px 10px;
    }
    dialog {
        padding: 18px;
    }
}

.platform-header {
    padding: 18px 6vw;
    height: auto;
    min-height: 88px;
}
.platform-content {
    max-width: 1250px;
    padding: 56px 28px;
    margin: auto;
}
.organization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 34px;
}
.organization-card {
    max-width: 420px;
    padding: 28px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.organization-card h2 {
    font-size: 26px;
    font-weight: 750;
}
.organization-avatar {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-bottom: 26px;
    border-radius: 12px;
    background: #fbede4;
    color: var(--accent);
    font-size: 24px;
    font-weight: 750;
}
.organization-card .btn {
    margin-top: 16px;
}
#auth-message:not(:empty) {
    padding: 12px;
    border-radius: 7px;
    background: #fff0dc;
    color: #87460c;
}
.login-card a:not(.brand-mark) {
    color: var(--accent);
    font-size: 14px;
}
@media (max-width: 700px) {
    .platform-header .header-end {
        font-size: 0;
    }
    .platform-content {
        padding: 34px 20px;
    }
    .login-card {
        padding: 26px;
    }
}

.inventory-change {
    padding: 18px 22px;
    border-top: 1px solid var(--line);
}
.inventory-change h3 {
    font-size: 16px;
    margin-bottom: 7px;
    overflow-wrap: anywhere;
}
.inventory-change small {
    display: block;
    color: var(--muted);
}
.inventory-change pre {
    padding: 12px;
    margin-top: 12px;
    background: #f5f6f8;
    max-height: 300px;
    overflow: auto;
    font-size: 12px;
}
