/* ================================================================
   user/common.css — Users page styles (theme-aware)
   ================================================================
   All colors use CSS variables — zero hardcoded values.
   Switching between light/dark is handled entirely by the
   variable definitions in layout.css (or wherever :root / [data-theme]
   tokens are declared).
   ================================================================ */


/* ── Card-grid pagination controls bar ── */
.card-grid-controls {
    padding: 10px 2px 4px;
    color: var(--tx-secondary);
    font-size: 15px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

/* ── Page header ─────────────────────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--tx-primary);
    line-height: 1.2;
    margin: 0;
}

.page-subtitle {
    font-size: 0.8125rem;
    color: var(--tx-secondary);
    margin: 6px 0 0;
}

/* ── Primary action button ───────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-soft);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--bg-active);
    color: var(--accent);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--tx-primary);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--tx-primary);
}

.btn-block {
    width: 100%;
}

/* ── Card surface: the one look of every boxed panel (admin tables, shop panels) ── */
.surface-card,
.table-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* ── Table wrapper card ──────────────────────────────────────── */
.table-card {
    padding: 20px;
    overflow: hidden;
}

/* table-responsive acts as the scroll container alongside scrollX */
.table-responsive {
    background: transparent;
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow-x: auto;
}

/* ── Badge overrides (theme-aware) ───────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Bootstrap bg-success / bg-danger override for theme awareness */
.badge.bg-success {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #22c55e !important;
}

.badge.bg-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
}

/* ── Action buttons ──────────────────────────────────────────── */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--tx-secondary);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    padding: 0;
    line-height: 1;
}

.btn-hover-blue:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--accent);
}

/* delete button gets a red tint on hover */
.btn-hover-red:hover {
    border-color: #f87171;
    color: #f87171;
    background: rgba(239, 68, 68, 0.08);
}

.badge-success {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.badge-warning {
    background: rgba(202, 138, 4, 0.12);
    color: #a16207;
}

.badge-secondary {
    background: rgba(161, 161, 170, 0.15);
    color: #52525b;
}

.badge-danger {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.badge-primary {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.badge-info {
    background: rgba(6, 182, 212, 0.12);
    color: #0e7490;
}

/* ── Tighter label → plaintext gap (view displays) ─────────────── */
.form-label + .form-control-plaintext {
    margin-top: -0.75rem;
}

/* ── View Field (Read-only display) ──────────────────────────────── */
.view-field {
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    height: 100%;
}

.view-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tx-secondary);
    margin-bottom: 6px;
}

.view-value {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--tx-primary);
    word-break: break-word;
}

.view-value-html {
    display: block;
    font-size: 0.9375rem;
    color: var(--tx-primary);
    line-height: 1.6;
}

/* ── Auth navigation row (sign in / register prompts) ──────── */
.login-register-row {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.9375rem;
    color: var(--tx-secondary);
}

.login-register-row a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
    transition: color var(--transition);
}

.login-register-row a:hover {
    color: var(--accent-soft);
    text-decoration: underline;
}

/* ── Copyable phone number ─────────────────────────────────── */
.copy-phone {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.10);
    transition: background 0.15s ease;
    user-select: all;
}

.copy-phone:hover {
    background: rgba(37, 99, 235, 0.20);
}

.copy-phone i {
    font-size: 0.85em;
    opacity: 0.7;
}

/* ── Marked PDF question checkbox (theme-aware) ────────────────── */
.question-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}
.question-checkbox {
    border-color: rgba(255, 255, 255, 0.45) !important;
}
[data-theme="light"] .question-checkbox {
    border-color: rgba(0, 0, 0, 0.3) !important;
}
