/* ===== Guilds Dashboard ===== */
.subheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 18px 0;
}

.subheader h1 {
    font-size: 22px;
    margin: 0;
}

.dash-card {
    padding: 16px;
}

.dash-head {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 10px;
}

.badge {
    display: inline-block;
    font-weight: 600;
    font-size: 0.85rem;
    color: #cbd6ee;
    background: #0f1526;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 10px;
}
/* Input */
.input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(180deg, #10182c, #0d1526);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 10px;
    width: min(420px, 100%);
}

.input-wrap svg {
    color: #9fb1d3;
}

.input {
    all: unset;
    color: var(--text);
    width: 100%;
}

.input::placeholder {
    color: #8fa0c2;
}

/* Table */
.table-wrap {
    width: 100%;
    overflow: auto;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.table thead th {
    text-align: left;
    font-weight: 700;
    color: #cbd6ee;
    font-size: 0.95rem;
    position: sticky;
    top: 0;
    background: transparent;
    padding: 0 12px 6px;
    cursor: default;
    user-select: none;
}

.table thead th[data-sort] {
    cursor: pointer;
}

.table thead th[data-sort]::after {
    content: "";
    margin-left: 6px;
    border: 4px solid transparent;
    display: inline-block;
    transform: translateY(-2px);
}

.table thead th.sorted-asc::after {
    border-bottom-color: #cbd6ee;
}

.table thead th.sorted-desc::after {
    border-top-color: #cbd6ee;
}

.table tbody tr {
    background: #0c1020;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.table tbody tr td {
    padding: 12px;
    vertical-align: middle;
}

.table .actions-col {
    width: 220px;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #0e1423;
    flex: 0 0 auto;
    background-image: var(--img);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
}

.avatar--placeholder {
    background: radial-gradient(100% 100% at 25% 20%, #1b2745 0%, #0f172d 60%);
    color: #cbd6ee;
    font-weight: 800;
    letter-spacing: 0.4px;
}

/* Actions */
.table .actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.table .btn {
    padding: 7px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.table .actions .btn {
    padding: 7px 10px;
}

/* Responsiveness */
@media (max-width: 720px) {
    .hide-sm {
        display: none;
    }

    .table thead th.actions-col {
        width: auto;
    }

    .table .actions {
        justify-content: flex-start;
    }
}

/* Server cell */
.cell-server {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.server-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.server-name {
    font-weight: 700;
}

.server-sub {
    color: #97a3c3;
    font-size: 0.9rem;
}
