.modcp-wrapper {
    display: flex;
    gap: 0;
    align-items: flex-start;
    min-height: calc(100vh - 60px);
}

.modcp-sidebar {
    width: 220px;
    flex-shrink: 0;
    background-color: var(--bg2);
    border: 1px solid var(--border);
    position: sticky;
    top: 0;
    align-self: flex-start;
    margin-right: 15px;
}

.modcp-sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    background-color: var(--bg3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.modcp-nav { padding: 8px 0; }

.modcp-nav-group { margin-bottom: 4px; }

.modcp-nav-label {
    display: block;
    padding: 8px 16px 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text2);
}

.modcp-nav-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 16px;
    font-size: 0.88rem;
    color: var(--text);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background-color 0.1s, border-color 0.1s;

    &:hover {
        background-color: var(--bg3);
        text-decoration: none;
    }
    .active {
        background-color: var(--bg3);
        border-left-color: var(--rhpz-orange);
        color: var(--text);
        font-weight: 600;
    }
}

.modcp-nav-badge {
    margin-left: auto;
    background-color: var(--rhpz-orange);
    color: #111;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.modcp-content {
    flex: 1;
    min-width: 0;
    background-color: var(--bg2);
    border: 1px solid var(--border);
    padding: 25px;
}

.modcp-page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.modcp-count {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--text2);
}

.modcp-section-title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text2);
    margin-bottom: 12px;
}

.modcp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.modcp-stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: var(--bg3);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    text-decoration: none;
    transition: border-color 0.15s, background-color 0.15s;
    color: var(--text);

    &:hover {
        background-color: var(--bg4);
        text-decoration: none;
    }
}

.modcp-stat-card--orange { border-left-color: var(--rhpz-orange); }
.modcp-stat-card--danger  { border-left-color: var(--error); }
.modcp-stat-card--muted   { cursor: default; }

.modcp-stat-icon { color: var(--text2); }
.modcp-stat-card--orange .modcp-stat-icon { color: var(--rhpz-orange); }
.modcp-stat-card--danger  .modcp-stat-icon { color: var(--error); }

.modcp-stat-info  { display: flex; flex-direction: column; }
.modcp-stat-value { font-size: 1.4rem; font-weight: 700; color: var(--text); line-height: 1; }
.modcp-stat-label { font-size: 0.75rem; color: var(--text2); margin-top: 3px; }

.modcp-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.modcp-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background-color: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.1s, border-color 0.1s;

    &:hover {
        background-color: var(--bg4);
        border-color: var(--rhpz-orange);
        text-decoration: none;
    }
}

.modcp-list { display: flex; flex-direction: column; }

.modcp-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.1s;
}

.modcp-list-item:last-child { border-bottom: none; }
.modcp-list-item:hover { background-color: var(--bg3); }
.modcp-list-item--deleted { opacity: 0.8; }

.modcp-list-item-cover {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background-color: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--border);
}

.modcp-list-item-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modcp-list-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modcp-list-item-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modcp-list-item-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text2);
}

.modcp-list-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.modcp-list-item-edit {
    display: flex;
    gap: 6px;
    flex: 1;
    align-items: center;
}

.modcp-list-item-edit .form-input {
    flex: 1;
    padding: 5px 10px;
    font-size: 0.88rem;
}

.modcp-list-see-all {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 0.85rem;
    color: var(--rhpz-orange);
    border-top: 1px solid var(--border);
    text-decoration: none;
}

.modcp-add-form {
    background-color: var(--bg3);
    border: 1px solid var(--border);
    padding: 15px;
    margin-bottom: 20px;
}

.modcp-add-form-inner {
    display: flex;
    gap: 8px;
    align-items: center;
}

.modcp-add-form-inner .form-input { flex: 1; }

.modcp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 50px 20px;
    color: var(--text2);
    text-align: center;
}

.mod-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    margin-bottom: 20px;
    font-size: 0.88rem;
    border: 1px solid;
}

.mod-alert--success {
    background-color: rgba(129, 199, 132, 0.08);
    border-color: rgba(129, 199, 132, 0.3);
    color: var(--success);
}

.modcp-list-item-edit--game {
    flex-wrap: wrap;
    gap: 6px;
}

.modcp-list-item-edit--game .form-input  { min-width: 180px; flex: 2; }
.modcp-list-item-edit--game .form-select { flex: 1; min-width: 120px; }

.log-filters {
    margin-bottom: 16px;
    background-color: var(--bg3);
    border: 1px solid var(--border);
}

.log-filters-main {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    flex-wrap: wrap;
}

.log-search-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
    align-items: center;
}

.log-search-wrap i {
    position: absolute;
    left: 10px;
    color: var(--text2);
    pointer-events: none;
}

.log-search-wrap .form-input { padding-left: 30px; }

.log-select { min-width: 130px; }

.log-filter-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--rhpz-orange);
    flex-shrink: 0;
}

.log-filters-extra {
    border-top: 1px solid var(--border);
    padding: 12px 14px;
}

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

.log-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-filter-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text2);
}

.log-transition-enter { transition: all .15s ease; }
.log-transition-leave { transition: all .1s ease; }

.log-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text2);
    margin-bottom: 10px;
    padding: 0 2px;
}

.log-loading { opacity: 0.5; }

.log-item { align-items: flex-start; padding: 11px 14px; }
.log-item--open { background-color: var(--bg3); }

.log-event-dot {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    border: 1px solid var(--border);
    background-color: var(--bg3);
    color: var(--text2);
}

.log-event-dot--created {
    background-color: rgba(129,199,132,.1);
    border-color: rgba(129,199,132,.35);
    color: var(--success);
}

.log-event-dot--updated {
    background-color: rgba(255,115,0,.1);
    border-color: rgba(255,115,0,.35);
    color: var(--rhpz-orange);
}

.log-event-dot--deleted {
    background-color: rgba(229,115,115,.1);
    border-color: rgba(229,115,115,.35);
    color: var(--error);
}

.log-channel-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    background-color: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    color: var(--text2);
}

.log-id { color: var(--text2); font-size: 0.78rem; }
.log-sep { color: var(--border); }

.log-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}

.log-timestamp {
    font-size: 0.75rem;
    color: var(--text2);
    white-space: nowrap;
}

.log-expand-btn { padding: 4px 7px; }

.log-properties {
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 14px 14px 14px 54px;
}

.log-diff-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--text2);
    margin-bottom: 8px;
}

.log-diff {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.log-diff th {
    text-align: left;
    padding: 5px 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text2);
    border-bottom: 1px solid var(--border);
}

.log-diff td {
    padding: 5px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    max-width: 300px;
    overflow-wrap: break-word;
}

.log-diff tr:last-child td { border-bottom: none; }

.log-diff-key {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    width: 160px;
    white-space: nowrap;
}

.log-diff-old-head { color: var(--error) !important; }
.log-diff-new-head { color: var(--success) !important; }

.log-diff-old {
    color: var(--error);
    background-color: rgba(229,115,115,.05);
}

.log-diff-new {
    color: var(--success);
    background-color: rgba(129,199,132,.05);
}

.log-raw {
    font-family: monospace;
    font-size: 0.78rem;
    color: var(--text2);
    background-color: var(--bg2);
    border: 1px solid var(--border);
    padding: 10px 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-pagination {
    padding: 14px 0 4px;
    border-top: 1px solid var(--border);
}

@media (max-width: 1024px) {
    .modcp-wrapper {
        min-height: auto;
    }

    .modcp-sidebar {
        width: 200px;
        margin-right: 10px;
    }

    .modcp-content {
        padding: 20px;
    }

    .modcp-page-title {
        font-size: 1.15rem;
    }
}

@media (max-width: 768px) {
    .modcp-wrapper {
        flex-direction: column;
        gap: 0;
    }

    .modcp-sidebar {
        width: 100%;
        flex-shrink: 1;
        position: relative;
        top: auto;
        align-self: auto;
        margin-right: 0;
        margin-bottom: 15px;
        border: 1px solid var(--border);
        max-height: 300px;
        overflow-y: auto;
    }

    .modcp-sidebar-header {
        padding: 12px 14px;
        font-size: 0.8rem;
    }

    .modcp-nav-label {
        padding: 6px 14px 3px;
        font-size: 0.65rem;
    }

    .modcp-nav-item {
        padding: 6px 14px;
        font-size: 0.8rem;
        gap: 8px;
    }

    .modcp-content {
        padding: 15px;
    }

    .modcp-page-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }

    .modcp-page-actions {
        flex-direction: row;
        gap: 8px;
    }

    .modcp-table {
        font-size: 0.85rem;
    }

    .modcp-table th, .modcp-table td {
        padding: 8px;
    }

    .modcp-table tbody tr {
        height: auto;
    }
}

@media (max-width: 600px) {
    .modcp-sidebar {
        max-height: 200px;
    }

    .modcp-sidebar-header {
        padding: 10px 12px;
        font-size: 0.75rem;
    }

    .modcp-nav-item {
        padding: 5px 12px;
        font-size: 0.75rem;
    }

    .modcp-content {
        padding: 12px;
    }

    .modcp-page-title {
        font-size: 0.95rem;
    }

    .modcp-table {
        font-size: 0.8rem;
        overflow-x: auto;
        display: block;
    }

    .modcp-table th, .modcp-table td {
        padding: 6px;
    }

    .log-diff-key {
        width: auto;
        white-space: normal;
    }

    .log-raw {
        font-size: 0.7rem;
        padding: 8px 10px;
    }
}
