.n4-audit {
    padding: 1.25rem 1.5rem 2rem;
}

.n4-audit-denied {
    max-width: 40rem;
    margin: 2rem auto;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.n4-audit-denied h1 {
    margin: 0 0 0.5rem;
    font-size: 1.4rem;
}

.n4-audit__head h1 {
    margin: 0;
    font-size: 1.45rem;
}

.n4-audit__head p,
.n4-audit-denied p {
    margin: 0.35rem 0 0;
    color: #64748b;
}

.n4-audit__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.n4-audit__metric {
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.n4-audit__metric span {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.n4-audit__metric strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.35rem;
}

.n4-audit__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: end;
    margin-bottom: 0.85rem;
}

.n4-audit__filters label {
    display: grid;
    gap: 0.25rem;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 700;
}

.n4-audit__filters input,
.n4-audit__filters select {
    min-height: 2.2rem;
    padding: 0 0.6rem;
    border: 1px solid #d5dde6;
    border-radius: 8px;
    color: #111;
    font-weight: 600;
}

.n4-audit__apply {
    min-height: 2.2rem;
    padding: 0 0.95rem;
    border: 0;
    border-radius: 8px;
    background: #0f172a;
    color: #f8fafc;
    font-weight: 700;
    cursor: pointer;
}

.n4-audit__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.n4-audit__tabs button {
    padding: 0.45rem 0.8rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #475569;
    font-weight: 600;
    cursor: pointer;
}

.n4-audit__tabs button.is-active {
    background: #fff;
    border-color: #e2e8f0;
    color: #0f172a;
}

.n4-audit__tabs button.has-error {
    color: #9a3412;
}

.n4-audit__status {
    min-height: 1.2rem;
    margin: 0 0 0.45rem;
    color: #9a3412;
    font-size: 0.86rem;
}

.n4-audit__table-wrap {
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.n4-audit table {
    width: 100%;
    border-collapse: collapse;
}

.n4-audit th,
.n4-audit td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid #eef2f6;
    text-align: left;
    vertical-align: top;
    font-size: 0.86rem;
}

.n4-audit th {
    color: #64748b;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.n4-audit tbody tr {
    cursor: pointer;
}

.n4-audit__msg,
.n4-audit__empty {
    color: #475569;
}

.n4-audit-drawer {
    display: none;
}

.n4-audit-drawer.is-open {
    display: block;
}

.n4-audit-drawer__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 1200;
}

.n4-audit-drawer__panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1201;
    width: min(36rem, 100%);
    height: 100%;
    overflow: auto;
    padding: 1.25rem;
    background: #fff;
}

.n4-audit-drawer__close {
    border: 0;
    background: transparent;
    font-size: 1.5rem;
    cursor: pointer;
}

.n4-audit-drawer pre {
    white-space: pre-wrap;
    word-break: break-word;
    padding: 0.75rem;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 8px;
}

@media (max-width: 800px) {
    .n4-audit__metrics {
        grid-template-columns: 1fr;
    }
}
