/* static/css/admin.css */

/* ================================
   Admin shell & shared styles
   ================================ */

   .admin-shell {
    margin-top: 1.5rem;
}

.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.admin-header-subtitle {
    margin-top: 0.25rem;
    font-size: 0.9rem;
    color: #9ca3af;
}

.admin-header-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-secondary {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #374151;
    background: #111827;
    color: #e5e7eb;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
}
.btn-secondary:hover {
    background: #1f2937;
}

/* badges */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(22, 163, 74, 0.16);
    border: 1px solid rgba(22, 163, 74, 0.7);
    color: #4ade80;
}

.badge-muted {
    background: rgba(75, 85, 99, 0.16);
    border: 1px solid rgba(75, 85, 99, 0.7);
    color: #9ca3af;
}

.badge-admin {
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(59, 130, 246, 0.7);
    color: #93c5fd;
}

/* pill buttons (small) */

.btn-pill {
    border-radius: 999px;
    border: none;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-pill-add {
    background: rgba(34, 197, 94, 0.2);
    color: #bbf7d0;
}
.btn-pill-add:hover {
    background: rgba(34, 197, 94, 0.35);
}

.btn-pill-subtract {
    background: rgba(248, 113, 113, 0.2);
    color: #fecaca;
}
.btn-pill-subtract:hover {
    background: rgba(248, 113, 113, 0.35);
}

/* inputs */

.admin-input {
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #3a4152;
    background: #151a23;
    color: #f5f5f5;
    font-size: 0.85rem;
}
.admin-input:focus {
    outline: none;
    border-color: #4f46e5;
}

/* ================================
   Admin players / balances
   ================================ */

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.admin-summary-card {
    padding: 0.9rem 1rem;
    border-radius: 10px;
    background: radial-gradient(circle at 0% 0%, #111827, #020617);
    border: 1px solid #1f2937;
}

.summary-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #9ca3af;
}

.summary-value {
    margin-top: 0.3rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.summary-foot {
    margin-top: 0.2rem;
    font-size: 0.8rem;
    color: #6b7280;
}

.admin-card {
    margin-top: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    background: #161b24;
    border: 1px solid #262c3a;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.admin-card-subtitle {
    margin-top: 0.2rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

.admin-card-tools {
    display: flex;
    align-items: center;
}

.admin-table-wrapper {
    margin-top: 0.25rem;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
    padding: 0.55rem 0.5rem;
    border-bottom: 1px solid #252a3b;
    text-align: left;
}

.admin-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
}

.admin-table tbody tr:hover {
    background: #191f2b;
}

.admin-table-actions {
    text-align: right;
}

.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.admin-user-name {
    font-weight: 500;
}

.admin-email {
    font-size: 0.85rem;
    color: #e5e7eb;
}

.admin-email-empty {
    color: #6b7280;
    font-style: italic;
}

.admin-balance {
    font-variant-numeric: tabular-nums;
}

.admin-balance-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.admin-input-amount {
    width: 110px;
}

.admin-balance-buttons {
    display: inline-flex;
    gap: 0.25rem;
}

/* ================================
   Admin support dashboard
   ================================ */

.admin-support-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.admin-support-column {
    background: #161b24;
    border-radius: 12px;
    border: 1px solid #262c3a;
    padding: 0.8rem 0.8rem 1rem 0.8rem;
}

.admin-support-section + .admin-support-section {
    margin-top: 0.75rem;
}

.admin-support-section h3 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.admin-support-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.admin-support-list li {
    border-radius: 8px;
    margin-bottom: 0.25rem;
}

.admin-support-list li a {
    display: block;
    padding: 0.4rem 0.5rem;
    font-size: 0.8rem;
    color: #e5e7eb;
}

.admin-support-list li a:hover {
    background: #1f2937;
}

.admin-support-list li.is-active a {
    background: #111827;
    border-left: 3px solid #facc15;
}

.support-list-main {
    display: flex;
    justify-content: space-between;
    gap: 0.4rem;
}

.support-list-id {
    font-weight: 500;
}

.support-list-user {
    color: #9ca3af;
}

.support-list-meta {
    margin-top: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    color: #6b7280;
}

.support-list-time {
    white-space: nowrap;
}

.support-list-rating {
    font-size: 0.9rem;
}

.support-list-empty {
    font-size: 0.8rem;
    color: #9ca3af;
    padding: 0.15rem 0.5rem 0.35rem 0.5rem;
}

.admin-support-chat {
    background: #161b24;
    border-radius: 12px;
    border: 1px solid #262c3a;
    padding: 0.9rem 1rem;
    min-height: 420px;
}

.admin-support-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.admin-support-title {
    font-weight: 600;
}

.admin-support-subtitle {
    margin-top: 0.1rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.admin-support-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.admin-reassign-form {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.admin-chat-messages {
    border-radius: 8px;
    border: 1px solid #1f2937;
    background: #020617;
    padding: 0.5rem 0.55rem;
    height: 320px;
    overflow-y: auto;
    font-size: 0.8rem;
}

.admin-chat-line {
    margin-bottom: 0.2rem;
}

.admin-chat-line.admin-chat-system {
    color: #9ca3af;
}

.admin-chat-line.admin-chat-user {
    color: #e5e7eb;
}

.admin-chat-line.admin-chat-admin {
    color: #93c5fd;
}

.admin-chat-input-row {
    margin-top: 0.6rem;
    display: flex;
    gap: 0.4rem;
}

.admin-chat-rating-summary {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #e5e7eb;
}

.admin-chat-rating-summary .rating-comment {
    margin-top: 0.25rem;
    color: #9ca3af;
}

.admin-support-empty-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 0.9rem;
    color: #9ca3af;
}

/* Responsive */

@media (max-width: 900px) {
    .admin-summary-grid {
        grid-template-columns: 1fr;
    }
    .admin-support-layout {
        grid-template-columns: 1fr;
    }
}
