
.civcity-register-card {
    margin: 0;
}

.civcity-register-card .civcity-panel__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.civcity-table-wrap {
    overflow: auto;
    max-height: min(64vh, 760px);
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
}

.civcity-register-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}

.civcity-register-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
}

.civcity-register-table th,
.civcity-register-table td {
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    text-align: left;
    vertical-align: top;
}

.civcity-register-table tbody tr:hover {
    background: rgba(239, 246, 255, 0.55);
}

.civcity-register-card.is-compact .civcity-register-table th,
.civcity-register-card.is-compact .civcity-register-table td {
    padding: 0.55rem 0.65rem;
    font-size: 0.88rem;
}

.civcity-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    color: inherit;
}

.civcity-sort-button[aria-sort="ascending"]::after {
    content: '↑';
}

.civcity-sort-button[aria-sort="descending"]::after {
    content: '↓';
}

.civcity-relations-group + .civcity-relations-group {
    margin-top: 1rem;
}

@media (max-width: 782px) {
    .civcity-register-card .civcity-panel__toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .civcity-table-wrap {
        max-height: none;
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .civcity-register-table thead {
        display: none;
    }

    .civcity-register-table,
    .civcity-register-table tbody,
    .civcity-register-table tr,
    .civcity-register-table td {
        display: block;
        width: 100%;
    }

    .civcity-register-table tr {
        margin-bottom: 0.85rem;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
        overflow: hidden;
    }

    .civcity-register-table td {
        border-bottom: 1px solid rgba(15, 23, 42, 0.06);
        padding: 0.75rem 0.9rem;
    }

    .civcity-register-table td:last-child {
        border-bottom: 0;
    }

    .civcity-register-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #64748b;
    }
}


.civcity-dashboard-frame .civcity-register-card {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    height: 100%;
}

.civcity-dashboard-frame .civcity-table-wrap {
    max-height: 100%;
    height: 100%;
}


/* v0.4.4 explorer panes */
.civcity-register-card .civcity-panel__toolbar {
    margin-bottom: 0;
}

.civcity-table-wrap {
    border-radius: 0;
    border: 0;
    background: #ffffff;
}

.civcity-register-table {
    font-size: 11px;
}

.civcity-register-table thead th {
    background: #f8fafc;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.civcity-register-table th,
.civcity-register-table td {
    padding: 0.42rem 0.5rem;
}

.civcity-register-card.is-compact .civcity-register-table th,
.civcity-register-card.is-compact .civcity-register-table td {
    padding: 0.32rem 0.4rem;
    font-size: 10px;
}

.civcity-relations-group + .civcity-relations-group {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

@media (max-width: 782px) {
    .civcity-register-table tr {
        margin-bottom: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    }

    .civcity-register-table td {
        padding: 0.4rem 0.45rem;
    }
}


/* v0.4.8 register pane cleanup */
body.civcity-theme-bridge-no-theme-chrome .civcity-table-wrap {
    border: 0;
    border-radius: 0;
    background: transparent;
}

body.civcity-theme-bridge-no-theme-chrome .civcity-register-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #ffffff;
}
