/*
 * TheTrueStone.com — component layer.
 *
 * Loaded last, after tokens.css / main.css / style.css. Everything here is a
 * named component so pages can stop carrying long inline `style="..."` strings.
 */

/* ==========================================================================
   Accessibility
   ========================================================================== */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    background: var(--primary);
    color: #fff;
    padding: 12px 20px;
    border-radius: 0 0 var(--radius-sm) 0;
    font-weight: 700;
}

.skip-link:focus {
    left: 0;
    color: #fff;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Banners
   ========================================================================== */
.verify-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--warning-bg);
    border-bottom: 1px solid #FDE68A;
    color: var(--warning-fg);
    padding: 12px 24px;
    font-size: 0.9rem;
}

.verify-banner a {
    color: var(--warning-fg);
    font-weight: 700;
    text-decoration: underline;
}

.preview-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--slate-900);
    color: #fff;
    padding: 12px 24px;
    font-size: 0.9rem;
    margin-top: var(--header-height);
}

.preview-bar em {
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.6;
    border: 1px solid transparent;
}

.alert > i {
    margin-top: 3px;
    flex-shrink: 0;
}

.alert-success { background: var(--success-bg); color: var(--success-fg); border-color: #A7F3D0; }
.alert-danger  { background: var(--danger-bg);  color: var(--danger-fg);  border-color: #FECACA; }
.alert-warning { background: var(--warning-bg); color: var(--warning-fg); border-color: #FDE68A; }
.alert-info    { background: var(--info-bg);    color: var(--info-fg);    border-color: #BFDBFE; }

/* ==========================================================================
   Sidebar (dashboard + admin)
   ========================================================================== */
.sidebar-identity {
    text-align: center;
    padding-bottom: 28px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-identity h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
    word-break: break-word;
}

.sidebar-identity p {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
}

.sidebar-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 auto 14px;
}

.sidebar-avatar-admin {
    background: var(--slate-900);
    color: #fff;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--slate-600);
    font-size: 0.9rem;
    font-weight: 600;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-menu li a > i {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.8;
}

.sidebar-menu li a > span {
    flex: 1;
    min-width: 0;
}

.sidebar-menu li a:hover {
    background: var(--slate-50);
    color: var(--slate-900);
}

.sidebar-menu li a.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.sidebar-menu li a.active > i {
    opacity: 1;
}

.sidebar-badge {
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    line-height: 1.5;
}

.sidebar-menu-spacer {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-signout {
    color: var(--danger) !important;
}

.sidebar-signout:hover {
    background: var(--danger-bg) !important;
}

/* ==========================================================================
   Dashboard page chrome
   ========================================================================== */
.dash-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.dash-page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.dash-page-header p {
    color: var(--text-muted);
    margin: 0;
}

.panel {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.panel-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 22px;
}

.panel-footnote {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 16px;
}

.stack-sm > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 20px; }

.inline-form { display: inline; }

.field-hint {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-left: 6px;
}

/* ==========================================================================
   Empty states
   ========================================================================== */
.empty-state {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 64px 40px;
    text-align: center;
}

.empty-state-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--slate-50);
    color: var(--slate-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.92rem;
    max-width: 46ch;
    margin: 0 auto;
    line-height: 1.7;
}

/* ==========================================================================
   Filters, pills and tables
   ========================================================================== */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.filter-tab {
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--slate-600);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.filter-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.status-pill {
    display: inline-block;
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--slate-100);
    color: var(--slate-600);
}

.status-new      { background: #FEF3C7; color: #92400E; }
.status-read     { background: var(--slate-100); color: var(--slate-600); }
.status-replied  { background: var(--success-bg); color: var(--success-fg); }
.status-archived { background: var(--slate-100); color: var(--slate-400); }

.table-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Wide tables scroll inside their own container rather than the page body. */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.data-table thead th {
    background: var(--slate-50);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 18px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--slate-100);
    vertical-align: top;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--slate-50); }

.cell-strong { font-weight: 700; }
.cell-muted  { color: var(--text-muted); font-size: 0.82rem; }
.cell-wrap   { max-width: 40ch; word-break: break-word; }
.nowrap      { white-space: nowrap; }

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
}

.pagination-link {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--slate-600);
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination-link:hover { border-color: var(--primary); color: var(--primary); }

.pagination-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ==========================================================================
   Messages
   ========================================================================== */
.message-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.message-card-unread { border-left: 4px solid var(--primary); }

.message-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.message-sender { display: flex; align-items: center; gap: 14px; }

.avatar-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.message-sender-name  { font-weight: 700; font-size: 0.95rem; }
.message-sender-email { font-size: 0.82rem; color: var(--text-muted); word-break: break-all; }

.message-meta {
    text-align: right;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.message-subject { font-weight: 600; margin-bottom: 8px; }

.message-body {
    color: var(--slate-600);
    line-height: 1.7;
    font-size: 0.92rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--slate-100);
}

.btn-sm { padding: 8px 14px; font-size: 0.82rem; border-radius: var(--radius-sm); }

.btn-danger-outline {
    color: var(--danger) !important;
    border-color: #FCA5A5 !important;
}

.btn-danger-outline:hover { background: var(--danger-bg) !important; }

.btn-block { width: 100%; }

/* ==========================================================================
   Settings / configuration screen
   ========================================================================== */
.settings-section { margin-bottom: 36px; }

.settings-heading {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.settings-grid {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.settings-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 2fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--slate-100);
}

.settings-row:last-child { border-bottom: none; }

.settings-row-label { font-weight: 600; font-size: 0.9rem; }

.settings-row-detail {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    overflow-wrap: anywhere;
}

.settings-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.settings-help {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    font-size: 0.9rem;
    color: var(--slate-600);
}

.settings-code {
    background: var(--slate-900);
    color: #E2E8F0;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    line-height: 1.7;
    overflow-x: auto;
    margin: 12px 0 18px;
}

/* ==========================================================================
   Analytics
   ========================================================================== */
.analytics-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    margin-bottom: 36px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 220px;
    padding-top: 20px;
}

.bar-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    min-width: 0;
}

.bar-chart-value {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
    min-height: 1em;
}

.bar-chart-bar {
    width: 100%;
    max-width: 34px;
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    border-radius: var(--radius-xs) var(--radius-xs) 0 0;
    transition: opacity var(--transition-fast);
}

.bar-chart-col:hover .bar-chart-bar { opacity: 0.78; }

.bar-chart-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.meter-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 7px;
    font-size: 0.88rem;
}

.meter-value { font-weight: 700; white-space: nowrap; }
.meter-count { font-weight: 400; color: var(--text-muted); }

.meter-track {
    height: 8px;
    background: var(--slate-100);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width var(--transition-slow);
}

/* ==========================================================================
   Listing detail
   ========================================================================== */
.listing-meta-row {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
    opacity: 0.92;
    font-size: 1.02rem;
}

.listing-rating { display: inline-flex; align-items: center; gap: 8px; }

.review-owner-reply {
    margin-top: 16px;
    padding: 16px 18px;
    background: var(--primary-soft);
    border-left: 3px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.review-owner-reply-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.review-owner-reply p { color: var(--slate-600); font-size: 0.92rem; line-height: 1.65; margin: 0; }

/* ==========================================================================
   Auth screens
   ========================================================================== */
.auth-container-narrow { max-width: 460px; }

.auth-icon {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 18px;
}

.auth-icon-success { background: var(--success-bg); color: var(--success); }

.auth-fineprint {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 18px;
    line-height: 1.7;
}

/* Password reveal control */
.password-field { position: relative; }

.password-field input { padding-right: 46px !important; }

.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: var(--radius-xs);
    line-height: 1;
}

.password-toggle:hover { color: var(--primary); }

/* ==========================================================================
   Responsive dashboard shell
   ==========================================================================
   .dashboard-container was a plain flex row with a fixed 280px sidebar and no
   media query anywhere, so on a phone the sidebar simply pushed the content
   ~550px off-screen and the whole dashboard/admin area was unusable. Below
   1024px the rail becomes a horizontally scrolling tab bar under the header.
   ========================================================================== */
@media (max-width: 1024px) {
    .analytics-grid { grid-template-columns: 1fr; }

    .dashboard-container {
        display: block;
        min-height: 0;
    }

    .sidebar {
        width: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 12px 16px;
        position: sticky;
        top: var(--header-height);
        z-index: 60;
        background: #fff;
    }

    /* The avatar block is dead weight on a small screen. */
    .sidebar-identity { display: none; }

    .sidebar-menu {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    .sidebar-menu::-webkit-scrollbar { display: none; }

    .sidebar-menu li { flex: 0 0 auto; }

    .sidebar-menu li a {
        white-space: nowrap;
        padding: 9px 14px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-pill);
        font-size: 0.83rem;
    }

    .sidebar-menu li a.active {
        border-color: var(--primary);
    }

    .sidebar-menu-spacer {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }

    .dash-content { padding: 24px 16px; }
}

/*
 * Rigid `repeat(3|4, 1fr)` stat grids are declared inline on the dashboard and
 * admin pages, which overflows a phone. Reflow them rather than editing dozens
 * of inline styles.
 */
@media (max-width: 900px) {
    .dash-content [style*="repeat(4, 1fr)"],
    .dash-content [style*="repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .dash-content [style*="grid-template-columns: 2fr 1fr"],
    .dash-content [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media (max-width: 560px) {
    .dash-content [style*="repeat(4, 1fr)"],
    .dash-content [style*="repeat(3, 1fr)"],
    .dash-content [style*="repeat(2, 1fr)"] {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Long words / URLs must never widen the page. */
.dash-content,
.message-body,
.cell-wrap {
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .settings-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .settings-pill { justify-self: start; }
}

@media (max-width: 768px) {
    .dash-page-header { flex-direction: column; align-items: stretch; }
    .message-card-head { flex-direction: column; }
    .message-meta { text-align: left; align-items: flex-start; }
    .empty-state { padding: 44px 24px; }
    .panel { padding: 22px; }
    .bar-chart { height: 170px; }
}

/* ==========================================================================
   Admin command center
   ========================================================================== */
.queue-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.queue-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    color: inherit;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.queue-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-light); color: inherit; }

.queue-card-active { border-color: var(--primary); background: linear-gradient(180deg, var(--primary-soft), #fff); }

.queue-card-icon {
    width: 52px; height: 52px; flex-shrink: 0;
    border-radius: var(--radius-md);
    background: var(--primary-soft); color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}

.queue-card-active .queue-card-icon { background: var(--primary); color: #fff; }

.queue-card-body { flex: 1; min-width: 0; }
.queue-card-count { font-size: 2rem; font-weight: 800; line-height: 1; }
.queue-card-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.queue-card-cta { font-size: 0.78rem; font-weight: 700; color: var(--primary); white-space: nowrap; }
.queue-card:not(.queue-card-active) .queue-card-cta { color: var(--slate-400); }

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.metric-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 10px; }
.metric-value { font-size: 1.9rem; font-weight: 800; line-height: 1; }
.metric-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }

.metric-spark { display: flex; align-items: flex-end; gap: 3px; height: 44px; margin: 6px 0 4px; }
.metric-spark-bar { flex: 1; background: linear-gradient(180deg, var(--primary-light), var(--primary)); border-radius: 2px 2px 0 0; min-height: 3px; }

.admin-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-link { font-size: 0.82rem; font-weight: 700; color: var(--primary); }

.lean-list { list-style: none; margin: 0; padding: 0; }
.lean-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--slate-100); }
.lean-list li:last-child { border-bottom: none; }

.activity-feed { list-style: none; margin: 0; padding: 0; }
.activity-feed li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--slate-100); }
.activity-feed li:last-child { border-bottom: none; }
.activity-text { font-size: 0.88rem; }
.activity-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; background: var(--slate-300); }
.activity-approve, .activity-restore { background: var(--success); }
.activity-reject, .activity-delete, .activity-banned { background: var(--danger); }
.activity-suspend { background: var(--warning); }
.activity-edit, .activity-create { background: var(--info); }

/* ==========================================================================
   List toolbar (search) + status / role / plan pills
   ========================================================================== */
.list-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }

.list-search {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--border-color);
    border-radius: var(--radius-pill); padding: 0 16px; flex: 1; min-width: 220px;
}
.list-search i { color: var(--slate-400); }
.list-search input { border: none; outline: none; background: none; padding: 11px 0; width: 100%; font-size: 0.9rem; }

.role-pill { display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.03em; }
.role-admin          { background: #FEF2F2; color: #B91C1C; }
.role-business_owner { background: var(--primary-soft); color: var(--primary); }
.role-customer       { background: var(--slate-100); color: var(--slate-600); }

.account-active    { background: var(--success-bg); color: var(--success-fg); }
.account-suspended { background: var(--warning-bg); color: var(--warning-fg); }
.account-banned    { background: #FEF2F2; color: #B91C1C; }
.account-deleted   { background: var(--slate-100); color: var(--slate-400); }

.verify-verified { background: var(--success-bg); color: var(--success-fg); }
.verify-pending  { background: var(--warning-bg); color: var(--warning-fg); }
.verify-rejected { background: #FEF2F2; color: #B91C1C; }

.plan-premium { background: #FDF4FF; color: #86198F; }
.plan-basic   { background: var(--slate-100); color: var(--slate-600); }

.tag-you { background: var(--info-bg); color: var(--info-fg); font-size: 0.62rem; font-weight: 800; text-transform: uppercase; padding: 1px 6px; border-radius: var(--radius-pill); margin-left: 6px; vertical-align: middle; }

.user-cell { display: flex; align-items: flex-start; gap: 12px; }
.col-actions { text-align: right; white-space: nowrap; }

/* ==========================================================================
   Row action menu (details / summary dropdown)
   ========================================================================== */
.row-menu { position: relative; display: inline-block; }
.row-menu > summary { list-style: none; cursor: pointer; }
.row-menu > summary::-webkit-details-marker { display: none; }

.row-menu-panel {
    position: absolute; right: 0; z-index: 40; margin-top: 6px;
    min-width: 260px; max-width: 320px;
    background: #fff; border: 1px solid var(--border-color);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    padding: 8px; text-align: left;
}

.review-card .row-menu-panel { left: 0; right: auto; }

.menu-form { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: var(--radius-sm); }
.menu-form + .menu-form { border-top: 1px solid var(--slate-100); }
.menu-form-danger { background: #FEF2F2; }

.menu-item {
    display: flex; align-items: center; gap: 9px;
    width: 100%; text-align: left; background: none; border: none;
    padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer;
    font-size: 0.85rem; font-weight: 600; color: var(--slate-700);
}
.menu-item:hover { background: var(--slate-50); }
.menu-item i { width: 16px; text-align: center; color: var(--slate-400); }
.menu-item-good { color: var(--success-fg); }
.menu-item-good i { color: var(--success); }
.menu-item-warn { color: var(--warning-fg); }
.menu-item-warn i { color: var(--warning); }
.menu-item-bad { color: #B91C1C; }
.menu-item-bad i { color: var(--danger); }

.menu-input {
    width: 100%; padding: 8px 10px; font-size: 0.82rem;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm); outline: none;
}
.menu-input:focus { border-color: var(--primary); }

.review-card {
    background: #fff; border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm);
}
.review-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.review-card-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 4px; }
.review-card-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.review-card-body { color: var(--slate-600); line-height: 1.6; font-size: 0.92rem; margin-bottom: 10px; }

.pagination-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.pagination-summary { font-size: 0.82rem; color: var(--text-muted); margin: 0; }
.pagination-gap { padding: 0 6px; color: var(--slate-400); align-self: center; }

@media (max-width: 1024px) {
    .queue-grid { grid-template-columns: 1fr; }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-split { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .metric-grid { grid-template-columns: 1fr; }
    .row-menu-panel { position: fixed; left: 12px; right: 12px; min-width: 0; max-width: none; }
}
