#admin-wrapper {
    padding: 20px;
}

/* ── Page header ─────────────────────────── */
.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
}

.admin-page-title {
    margin: 0 0 4px 0;
    font-size: 1em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: white;
}

.admin-page-sub {
    margin: 0;
    font-size: 0.72em;
    color: #5a7a9a;
    letter-spacing: 1px;
}

/* ── Search ──────────────────────────────── */
.admin-search-wrap {
    position: relative;
}

.admin-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #3a4a5a;
    font-size: 0.78em;
    pointer-events: none;
}

.admin-search {
    background-color: #0e1720;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 6px;
    color: #e8e3ec;
    padding: 8px 12px 8px 32px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.82em;
    outline: none;
    width: 220px;
    transition: border-color 0.3s;
}

.admin-search:focus {
    border-color: #d5ad32;
}

.admin-search::placeholder {
    color: #3a4a5a;
}

/* ── Table ───────────────────────────────── */
.admin-table-wrap {
    background-color: #152535;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 0 rgba(0,0,0,.2);
}

.admin-table-header {
    background-color: #0e1720;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.6em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #4a5a6a;
}

.admin-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-top: 1px solid rgba(0,0,0,.18);
    transition: background-color 0.2s;
}

.admin-user-row:hover {
    background-color: rgba(255,255,255,.018);
}

/* Columns */
.acol-player { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.acol-rank   { min-width: 130px; display: flex; align-items: center; gap: 7px; }
.acol-set    { min-width: 200px; }
.acol-action { min-width: 70px; display: flex; justify-content: flex-end; }

/* Player cell */
.admin-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    flex-shrink: 0;
    image-rendering: pixelated;
}

.admin-username {
    font-size: 0.85em;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-username:hover {
    opacity: 0.75;
    text-decoration: none;
}

/* Current rank cell */
.rank-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rank-label {
    font-size: 0.72em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Rank selector */
.rank-update-form {
    display: contents;
}

.rank-select-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-select {
    background-color: #0e1720;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 6px;
    color: #e8e3ec;
    padding: 6px 10px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.78em;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s;
    appearance: none;
    -webkit-appearance: none;
    width: 140px;
}

.rank-select:focus {
    border-color: #d5ad32;
}

.rank-select option {
    background-color: #0e1720;
    color: #e8e3ec;
}

.rank-select option:disabled {
    color: #3a4a5a;
    cursor: not-allowed;
}

.select-color-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.25s;
}

/* Save button */
.btn-rank-save {
    background-color: #d5ad32;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.65em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.19), inset 0 0 0 2px rgba(255,255,255,.19);
    white-space: nowrap;
}

.btn-rank-save:hover:not(:disabled) {
    background-color: #cba62f;
}

.btn-rank-save:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Empty search result */
.admin-no-results {
    padding: 30px;
    text-align: center;
    font-size: 0.78em;
    color: #3a4a5a;
    letter-spacing: 1px;
}

@media (max-width: 680px) {
    .acol-rank  { display: none; }
    .admin-table-header .acol-rank { display: none; }
    .acol-set   { min-width: 150px; }
    .rank-select { width: 110px; }
    .admin-search { width: 160px; }
}
