* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #101114;
    color: #ececec;
}

.admin-body {
    min-height: 100vh;
}

.brand {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.login-shell {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
}

.login-card {
    width: min(100%, 420px);

    padding: 34px;

    border: 1px solid #303238;
    border-radius: 12px;

    background: #181a1f;
}

.login-card h1 {
    margin:
        12px
        0
        6px;

    font-size: 28px;
}

.login-intro,
.muted {
    color: #9fa3ad;
}

.login-card form {
    display: grid;
    gap: 10px;

    margin-top: 28px;
}

.login-card label {
    margin-top: 8px;

    font-size: 13px;
    color: #c3c6cd;
}

.login-card input {
    width: 100%;

    padding: 12px 13px;

    border: 1px solid #3a3d45;
    border-radius: 7px;

    background: #111216;
    color: #fff;

    font-size: 15px;
}

.login-card button {
    margin-top: 16px;

    padding: 12px 16px;

    border: 0;
    border-radius: 7px;

    background: #ececec;
    color: #101114;

    font-weight: 700;
    cursor: pointer;
}

.error-box {
    margin-top: 20px;
    padding: 11px 12px;

    border: 1px solid #653f3f;
    border-radius: 7px;

    background: #291919;
    color: #f1b7b7;

    font-size: 14px;
}

.topbar {
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 24px;

    border-bottom: 1px solid #2c2e34;

    background: #15161a;
}

.section-title {
    margin-left: 16px;
    color: #888d97;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 14px;

    font-size: 13px;
    color: #b7bac1;
}

.logout-form {
    display: inline;
    margin: 0;
}

.logout-button {
    padding: 6px 10px;

    border: 1px solid #373a42;
    border-radius: 6px;

    background: transparent;
    color: #ddd;

    cursor: pointer;
}

.admin-layout {
    min-height: calc(100vh - 64px);

    display: grid;
    grid-template-columns: 210px 1fr;
}

.sidebar {
    padding: 24px 14px;

    border-right: 1px solid #2c2e34;

    background: #141519;

    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar a,
.sidebar span {
    padding: 9px 11px;

    border-radius: 6px;

    color: #9fa3ad;
    text-decoration: none;

    font-size: 14px;
}

.sidebar .active {
    background: #23252b;
    color: #fff;
}

.nav-separator {
    height: 1px;

    margin: 12px 8px;

    background: #2c2e34;
}

.admin-content {
    padding: 34px;

    max-width: 1200px;
}

.admin-content h1 {
    margin: 0;
}

.stats-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(130px, 1fr));

    gap: 14px;

    margin-top: 28px;
}

.stat-card,
.panel {
    border: 1px solid #2f3239;
    border-radius: 9px;

    background: #181a1f;
}

.stat-card {
    padding: 20px;
}

.stat-card span {
    display: block;

    color: #969aa4;
    font-size: 13px;
}

.stat-card strong {
    display: block;

    margin-top: 7px;

    font-size: 30px;
}

.panel {
    margin-top: 24px;
    padding: 22px;
}

.panel h2 {
    margin-top: 0;
    font-size: 18px;
}

.admin-info {
    display: grid;

    grid-template-columns:
        120px
        1fr;

    gap: 9px 18px;
}

.admin-info dt {
    color: #8e929b;
}

.admin-info dd {
    margin: 0;
}

@media (max-width: 760px) {

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .stats-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .admin-content {
        padding: 22px;
    }

}


/* PERCEPIBILE_FORUM_ADMIN_TOPICS_CSS_V1 */

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.page-count {
    padding-top: 8px;

    color: #8f949e;
    font-size: 13px;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;

    border-collapse: collapse;

    font-size: 14px;
}

.admin-table th {
    padding: 11px 12px;

    border-bottom: 1px solid #373a42;

    text-align: left;

    color: #9499a3;
    font-size: 12px;
    font-weight: 600;
}

.admin-table td {
    padding: 13px 12px;

    border-bottom: 1px solid #292c32;

    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.topic-title-cell {
    min-width: 260px;
}

.admin-link {
    color: #f0f0f0;
    text-decoration: none;
}

.admin-link:hover {
    text-decoration: underline;
}

.status-badge,
.initial-badge {
    display: inline-block;

    padding: 3px 7px;

    border: 1px solid #3b3f47;
    border-radius: 999px;

    background: #202228;

    color: #c8cbd1;

    font-size: 11px;
}

.initial-badge {
    margin-left: 8px;
}

.back-link {
    display: inline-block;

    margin-bottom: 22px;

    color: #aeb2bb;
    text-decoration: none;

    font-size: 13px;
}

.back-link:hover {
    color: #fff;
}

.topic-admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.topic-admin-header h1 {
    margin-bottom: 7px;
}

.topic-admin-meta {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(150px, 1fr));

    gap: 12px;

    margin-top: 24px;
}

.topic-admin-meta > div {
    padding: 15px 17px;

    border: 1px solid #2f3239;
    border-radius: 8px;

    background: #181a1f;
}

.topic-admin-meta span {
    display: block;

    color: #8f949e;
    font-size: 12px;
}

.topic-admin-meta strong {
    display: block;

    margin-top: 5px;

    font-size: 15px;
}

.posts-admin-list {
    display: grid;
    gap: 15px;

    margin-top: 24px;
}

.admin-post {
    border: 1px solid #2f3239;
    border-radius: 9px;

    background: #181a1f;
}

.admin-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 13px 16px;

    border-bottom: 1px solid #2f3239;
}

.post-meta {
    color: #8f949e;
    font-size: 12px;
}

.admin-post-body {
    padding: 18px 16px;

    white-space: pre-wrap;
    overflow-wrap: anywhere;

    line-height: 1.55;
}

.admin-attachments {
    margin: 0 16px 16px;

    border: 1px solid #30333a;
    border-radius: 7px;

    overflow: hidden;
}

.attachments-heading {
    padding: 9px 12px;

    border-bottom: 1px solid #30333a;

    color: #9196a0;
    font-size: 12px;
    font-weight: 600;
}

.attachment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 10px 12px;

    border-bottom: 1px solid #292c32;
}

.attachment-row:last-child {
    border-bottom: 0;
}

.attachment-meta,
.attachment-id {
    color: #868b95;
    font-size: 11px;
}

.attachment-id {
    font-family: monospace;
}

@media (max-width: 760px) {

    .page-heading,
    .topic-admin-header,
    .admin-post-header,
    .attachment-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .topic-admin-meta {
        grid-template-columns: 1fr;
    }

}


/* PERCEPIBILE_FORUM_LOG_CSS_V1 */

.log-page {
    max-width: none;
}

.log-filters {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;

    margin-top: 24px;
}

.log-filters label,
.system-form label {
    display: grid;
    gap: 6px;

    color: #a5a9b2;
    font-size: 12px;
}

.log-filters select,
.log-filters input,
.system-form select,
.system-form input {
    min-height: 38px;

    padding: 8px 10px;

    border: 1px solid #393c44;
    border-radius: 6px;

    background: #111216;
    color: #ececec;
}

.log-event-filter {
    min-width: 260px;
}

.log-filters button,
.system-form button {
    min-height: 38px;

    padding: 8px 14px;

    border: 0;
    border-radius: 6px;

    background: #e7e7e7;
    color: #111216;

    font-weight: 700;
    cursor: pointer;
}

.filter-reset,
.refresh-link {
    color: #aeb2bb;
    text-decoration: none;

    font-size: 13px;
}

.log-panel {
    padding: 0;
}

.log-scroll {
    max-height: 68vh;

    overflow: auto;
}

.log-table {
    min-width: 1250px;
}

.log-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;

    background: #181a1f;
}

.log-date {
    white-space: nowrap;
}

.log-event-name {
    font-family: monospace;
}

.log-message {
    min-width: 220px;
    max-width: 420px;
}

.log-level {
    display: inline-block;

    padding: 3px 6px;

    border: 1px solid #3a3d45;
    border-radius: 5px;

    font-family: monospace;
    font-size: 11px;
}

.log-level-error {
    border-color: #704242;
}

.log-level-warn {
    border-color: #6e603a;
}

.log-level-debug,
.log-level-trace {
    border-color: #40546c;
}

.log-json {
    max-width: 480px;
    max-height: 260px;

    overflow: auto;

    white-space: pre-wrap;
    overflow-wrap: anywhere;

    color: #bfc3ca;
    font-size: 11px;
}

.log-limit-note {
    margin-top: 10px;

    font-size: 11px;
}

.system-form {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(220px, 1fr));

    gap: 18px;

    max-width: 800px;
}

.system-form button {
    width: max-content;
}

.form-help {
    color: #727781;
    font-size: 11px;
}

.success-box,
.debug-warning {
    margin-top: 20px;
    padding: 11px 12px;

    border: 1px solid #365844;
    border-radius: 7px;

    background: #17251c;
    color: #b9dfc3;
}

.debug-warning {
    margin-bottom: 20px;

    border-color: #665c36;

    background: #272315;
    color: #e4d69d;

    font-weight: 700;
}

@media (max-width: 760px) {

    .system-form {
        grid-template-columns: 1fr;
    }

}
