/* ═══════════════════════════════════════════════════════════════════════════
   CC KILLER — Admin Panel Dark Theme
   Premium dark UI with glassmorphism, gradients, micro-animations
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────────────────── */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(17, 24, 39, 0.9);
    --bg-sidebar: #0d1321;
    --bg-input: #1a2332;
    --bg-input-focus: #1e293b;
    --border: rgba(56, 189, 248, 0.1);
    --border-hover: rgba(56, 189, 248, 0.3);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.15);
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.1);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.1);
    --purple: #a78bfa;
    --purple-bg: rgba(167, 139, 250, 0.1);
    --gradient-accent: linear-gradient(135deg, #0ea5e9, #38bdf8, #7dd3fc);
    --gradient-card: linear-gradient(135deg, rgba(56, 189, 248, 0.05), rgba(167, 139, 250, 0.05));
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --sidebar-width: 260px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* ─── Layout ────────────────────────────────────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

/* ─── Sidebar ───────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width var(--transition), transform var(--transition);
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.sidebar-brand .brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.92rem;
    transition: all var(--transition);
    margin-bottom: 2px;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--accent-glow);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.nav-item .nav-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* ─── Main Content ──────────────────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1 1 auto;
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    min-width: 0;
    padding: 24px 30px;
    min-height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ─── Page Header ───────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    min-width: 0;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    min-width: 0;
    word-break: break-word;
}

.page-header .subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ─── Filter Bar (Global) ──────────────────────────────────────────────── */
.filter-bar {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.filter-bar .form-select,
.filter-bar .search-bar {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

/* ─── Cards ─────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

/* ─── Stat Cards ────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    min-width: 0;
    max-width: 100%;
}

.stats-grid-5 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    min-width: 0;
    max-width: 100%;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.stat-card.accent::before {
    background: var(--gradient-accent);
}

.stat-card.success::before {
    background: var(--success);
}

.stat-card.warning::before {
    background: var(--warning);
}

.stat-card.danger::before {
    background: var(--danger);
}

.stat-card.purple::before {
    background: var(--purple);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.stat-card.accent .stat-icon {
    background: var(--accent-glow);
    color: var(--accent);
}

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

.stat-card.warning .stat-icon {
    background: var(--warning-bg);
    color: var(--warning);
}

.stat-card.danger .stat-icon {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-card.purple .stat-icon {
    background: var(--purple-bg);
    color: var(--purple);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ─── Tables ────────────────────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: var(--radius);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.4) rgba(15, 23, 42, 0.6);
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}
.table-wrapper::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 4px;
}
.table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.35);
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.15);
}
.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.65);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.80rem;
    min-width: 100%;
}

/* Fluid responsive table floor minimums: guarantees columns fit without collisions while allowing 100% full-width expansion */
#kills-table {
    min-width: clamp(960px, 100%, 1300px);
}

#checks-table {
    min-width: clamp(880px, 100%, 1200px);
}

#global-table {
    min-width: clamp(880px, 100%, 1200px);
}

#users-table {
    min-width: clamp(900px, 100%, 1200px);
}

#live-cards-table {
    min-width: clamp(860px, 100%, 1120px);
}

#alerts-table {
    min-width: clamp(840px, 100%, 1100px);
}

#payments-table {
    min-width: clamp(840px, 100%, 1100px);
}

#referrals-table {
    min-width: clamp(800px, 100%, 1050px);
}

#bin-table {
    min-width: clamp(760px, 100%, 1000px);
}

#vbv-table {
    min-width: clamp(760px, 100%, 980px);
}

thead th {
    background: rgba(56, 189, 248, 0.05);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.5px;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}

tbody td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.05);
    vertical-align: middle;
    font-size: 0.80rem;
}

td .mono,
.mono {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    white-space: nowrap;
}

.actions-cell,
td .flex.gap-8,
td .btn-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

td.text-nowrap,
.text-nowrap {
    white-space: nowrap !important;
}

/* ─── Dynamic Responsive Raw Input & Table Data ──────────────────────────── */
.raw-input-cell,
td code.raw-input,
td .raw-input {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.76rem;
    line-height: 1.4;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 3px 8px;
    border-radius: 6px;
    color: #f1f5f9;
    display: inline-block;
    vertical-align: middle;
    /* Fully responsive fluid width based on window size and zoom */
    max-width: clamp(180px, 22vw, 440px);
    min-width: 120px;
    word-break: break-all;
    white-space: normal;
    cursor: copy;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: all;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.raw-input-cell:hover,
td code.raw-input:hover {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(56, 189, 248, 0.8);
    color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
    transform: translateY(-1px);
}

.raw-input-cell:active,
td code.raw-input:active {
    transform: scale(0.98);
}

.proxy-badge-cell,
td span.proxy-badge-cell {
    max-width: clamp(110px, 14vw, 240px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
    font-size: 0.72rem;
    cursor: help;
}

.result-msg-cell {
    max-width: clamp(120px, 16vw, 300px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 2px;
    cursor: help;
}

.card-details-cell,
td code.card-details {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.76rem;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.user-actions-cell,
td .actions-cell {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.user-actions-cell .btn,
.actions-cell .btn {
    padding: 3px 6px;
    font-size: 0.74rem;
    line-height: 1.2;
}

tbody tr {
    transition: background var(--transition);
}

tbody tr:hover {
    background: rgba(56, 189, 248, 0.03);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ─── Badges ────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

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

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-accent {
    background: var(--accent-glow);
    color: var(--accent);
}

.badge-purple {
    background: var(--purple-bg);
    color: var(--purple);
}

.badge-muted {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
}

/* ─── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg-input);
    color: var(--text-primary);
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--border-hover);
    background: var(--bg-input-focus);
    transform: translateY(-1px);
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: var(--bg-primary);
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.78rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
}

/* ─── Forms ─────────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    transition: all var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-input-group {
    display: flex;
    gap: 10px;
}

.form-input-group .form-input {
    flex: 1;
}

/* ─── Search Bar ────────────────────────────────────────────────────────── */
.search-bar {
    position: relative;
    max-width: 360px;
}

.search-bar .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-bar .form-input {
    padding-left: 40px;
}

/* ─── Modal ─────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    width: 92%;
    max-width: 560px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* ─── Toast ─────────────────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    min-width: 280px;
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

.toast.info {
    border-left: 3px solid var(--accent);
}

/* ─── Login Page ────────────────────────────────────────────────────────── */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(56, 189, 248, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(167, 139, 250, 0.06) 0%, transparent 60%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.login-card .brand {
    text-align: center;
    margin-bottom: 32px;
}

.login-card .brand-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--gradient-accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.3);
}

.login-card .brand h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-card .brand p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.login-error {
    background: var(--danger-bg);
    border: 1px solid rgba(248, 113, 113, 0.2);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

/* ─── Grid Layouts ──────────────────────────────────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

/* ─── Details / Expandable ──────────────────────────────────────────────── */
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(56, 189, 248, 0.05);
}

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

.detail-label {
    color: var(--text-muted);
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

/* ─── Code / Mono ───────────────────────────────────────────────────────── */
.mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.83rem;
}

code {
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
}

/* ─── Filter Bar ────────────────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar .form-select,
.filter-bar .form-input {
    width: auto;
    min-width: 160px;
}

/* ─── Settings Grid ─────────────────────────────────────────────────────── */
.settings-section {
    margin-bottom: 28px;
}

.settings-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ─── Gateway Cards ─────────────────────────────────────────────────────── */
.cc-killer-grid,
.gateway-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.cc-killer-card,
.gateway-card {
    position: relative;
}

.cc-killer-card.active,
.gateway-card.active {
    border-color: var(--success);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.1);
}

.cc-killer-card .active-badge,
.gateway-card .active-badge {
    position: absolute;
    top: 12px;
    right: 12px;
}

/* ─── Empty State ───────────────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.95rem;
}

/* ─── Animations ────────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-in {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-in:nth-child(2) {
    animation-delay: 0.05s;
}

.animate-in:nth-child(3) {
    animation-delay: 0.1s;
}

.animate-in:nth-child(4) {
    animation-delay: 0.15s;
}

.animate-in:nth-child(5) {
    animation-delay: 0.2s;
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ─── Mobile Header (Visible on Tablets & Mobile) ────────────────────────── */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(13, 19, 33, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    z-index: 95;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
}

.hamburger-bar {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

.mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon-mini {
    width: 32px;
    height: 32px;
    background: var(--gradient-accent);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.brand-text-mini {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-header-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
}

.mobile-header-pill.danger {
    background: var(--danger-bg);
    border: 1px solid rgba(248, 113, 113, 0.3);
    color: var(--danger);
}

.mobile-header-pill.warning {
    background: var(--warning-bg);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: var(--warning);
}

.mobile-header-icon {
    font-size: 1.1rem;
    color: var(--text-muted);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    transition: color var(--transition);
}

.mobile-header-icon:hover {
    color: var(--danger);
}

/* ─── Sidebar Overlay Backdrop ───────────────────────────────────────────── */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-close-btn {
    display: none;
    margin-left: auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-xs);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

.sidebar-close-btn:hover {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
    border-color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE ENGINE: Laptops, Desktops, Tablets, Mobile
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 1. Desktop & Laptop Mode (1025px – 1600px / Windows 100% Zoom) ──── */
@media (min-width: 1025px) and (max-width: 1600px) {
    html {
        font-size: 13px;
    }

    :root {
        --sidebar-width: 215px;
    }

    .main-content {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
        max-width: calc(100% - var(--sidebar-width));
        padding: 16px 20px;
        min-width: 0;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
        gap: 12px !important;
    }

    .stats-grid-5 {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
        gap: 10px !important;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .dash-charts-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }

    .dash-charts-grid > div:first-child {
        grid-column: span 2 !important;
    }

    .stat-card {
        padding: 12px 14px !important;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }

    .filter-bar {
        gap: 8px !important;
    }

    thead th {
        padding: 7px 9px !important;
        font-size: 0.67rem !important;
    }

    tbody td {
        padding: 6px 9px !important;
        font-size: 0.78rem !important;
    }
}

/* ─── 1b. Extra Tight Desktop / Docked Window (1025px – 1240px) ────────── */
@media (min-width: 1025px) and (max-width: 1240px) {
    :root {
        --sidebar-width: 205px;
    }

    .main-content {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
        max-width: calc(100% - var(--sidebar-width));
        padding: 14px 16px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .stats-grid-5 {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
        gap: 8px !important;
    }

    .stat-card .stat-value,
    .dash-kpi-card > div:nth-child(2) {
        font-size: 1.35rem !important;
    }
}

/* ─── 2. Tablets & Small Laptops (769px – 1024px) ────────────────────────── */
@media (max-width: 1024px) {
    .mobile-header {
        display: flex;
    }

    .sidebar-backdrop {
        display: block;
    }

    .sidebar {
        width: 280px;
        max-width: 82vw;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.85);
    }

    .sidebar-close-btn {
        display: flex;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 24px 20px;
        padding-top: 80px;
        width: 100%;
        max-width: 100vw;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ─── 3. Mobile Handsets (< 768px) ───────────────────────────────────────── */
@media (max-width: 768px) {
    body.sidebar-open {
        overflow: hidden;
    }

    .mobile-header {
        display: flex;
        height: 58px;
        padding: 0 12px;
    }

    .sidebar-backdrop {
        display: block;
    }

    .sidebar {
        width: 280px;
        max-width: 86vw;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 35px rgba(0, 0, 0, 0.9);
    }

    .sidebar-close-btn {
        display: flex;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 16px 12px;
        padding-top: 72px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Typography & Headers */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .page-header h1 {
        font-size: 1.45rem;
    }

    .header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
        padding: 9px 14px;
        min-height: 40px;
    }

    /* Grids & Cards */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }

    .grid-2,
    .grid-3,
    .content-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .card {
        padding: 16px;
        border-radius: var(--radius-sm);
    }

    .stat-card .stat-value {
        font-size: 1.7rem;
    }

    /* Filter Bars & Inputs */
    .filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
        margin-bottom: 16px !important;
    }

    .filter-bar .search-bar,
    .filter-bar .form-input,
    .filter-bar .form-select {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .filter-bar #filter-match-badge,
    .filter-bar #btn-clear-filter {
        align-self: flex-start !important;
    }

    .form-input,
    .form-select {
        font-size: 16px;
        /* Prevents auto-zoom in iOS Safari */
        min-height: 42px;
    }

    /* Tables & Horizontal Scroll */
    .table-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-xs);
        margin: 0 -2px;
    }

    table {
        min-width: 580px;
        /* Prevents columns from smashing together */
    }

    thead th {
        padding: 10px 12px;
        font-size: 0.68rem;
    }

    tbody td {
        padding: 10px 12px;
        font-size: 0.82rem;
    }

    /* Modals & Dialogs */
    .modal-overlay {
        padding: 12px;
    }

    .modal {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 18px 14px !important;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: var(--radius-sm) !important;
    }

    .modal-footer {
        flex-wrap: wrap;
        gap: 8px;
    }

    .modal-footer .btn {
        flex: 1 1 120px;
        justify-content: center;
    }

    /* Buttons & Touch Targets */
    .btn {
        padding: 8px 14px;
        font-size: 0.88rem;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-height: 32px;
    }

    /* Reset timer banner */
    #reset-timer-container {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    #reset-countdown {
        align-self: flex-start;
        font-size: 1.25rem !important;
        padding: 6px 12px !important;
    }

    /* Modals & Popups Overrides */
    #broadcast-modal,
    #template-studio-modal,
    #history-modal,
    #referralModal {
        padding: 12px 8px !important;
    }

    #broadcast-modal>div,
    #template-studio-modal>div,
    #history-modal>div,
    #referralModal .modal-content {
        padding: 18px 14px !important;
        border-radius: 14px !important;
        max-width: 100% !important;
    }
}

/* ─── Global Inline Grid Overrides for Small Devices ─────────────────────── */
@media (max-width: 900px) {

    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ─── 4. Extra Small Phones (< 480px) ────────────────────────────────────── */
@media (max-width: 480px) {
    .main-content {
        padding: 12px 8px;
        padding-top: 68px;
    }

    .card {
        padding: 14px 10px;
    }

    .page-header h1 {
        font-size: 1.3rem;
    }

    .stat-card .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .header-actions .btn {
        width: 100%;
    }
}

/* ─── Utility ───────────────────────────────────────────────────────────── */
.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--danger);
}

.text-accent {
    color: var(--accent);
}

.text-muted {
    color: var(--text-muted);
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-12 {
    margin-bottom: 12px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-12 {
    margin-top: 12px;
}

.mt-20 {
    margin-top: 20px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.justify-between {
    justify-content: space-between;
}

/* ─── Date Dividers ──────────────────────────────────────────────────────── */
.date-divider-row td {
    padding: 16px 12px 10px 12px !important;
    background: transparent !important;
    border-bottom: none !important;
}

.date-divider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
}

.date-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.25), transparent);
}

.date-divider-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: var(--accent);
    padding: 6px 18px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(56, 189, 248, 0.15);
    backdrop-filter: blur(6px);
    white-space: nowrap;
}

.date-divider-icon {
    font-size: 0.95rem;
}

.date-divider-text {
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    letter-spacing: 0.8px;
}

.date-divider-relative {
    color: var(--text-primary);
    font-weight: 700;
    margin-right: 2px;
}

/* ─── Advanced Export Modal ──────────────────────────────────────────────── */
.adv-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 8, 16, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.adv-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.adv-modal-dialog {
    background: linear-gradient(180deg, #131d2e 0%, #0c121e 100%);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(56, 189, 248, 0.12);
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.adv-modal-overlay.active .adv-modal-dialog {
    transform: translateY(0) scale(1);
}

.adv-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
    margin-bottom: 20px;
}

.adv-modal-title-box {
    display: flex;
    align-items: center;
    gap: 12px;
}

.adv-modal-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.2));
    border: 1px solid rgba(56, 189, 248, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.adv-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.3px;
}

.adv-modal-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.adv-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition);
}

.adv-modal-close:hover {
    background: rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.4);
    color: var(--danger);
}

/* Format selector cards */
.adv-format-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.adv-format-card {
    background: rgba(17, 24, 39, 0.8);
    border: 1.5px solid rgba(56, 189, 248, 0.12);
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
    position: relative;
    overflow: hidden;
}

.adv-format-card:hover {
    border-color: rgba(56, 189, 248, 0.35);
    background: rgba(17, 24, 39, 0.95);
    transform: translateY(-2px);
}

.adv-format-card.active {
    border-color: var(--accent);
    background: rgba(56, 189, 248, 0.12);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.2);
}

.adv-format-badge {
    font-size: 1.05rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    margin-bottom: 4px;
}

.adv-format-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Form Fields */
.adv-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.adv-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.adv-form-group.full-width {
    grid-column: 1 / -1;
}

.adv-form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.adv-form-control {
    background: #0d1422;
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 9px 12px;
    font-size: 0.88rem;
    font-family: inherit;
    transition: all var(--transition);
    width: 100%;
}

.adv-form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
    background: #101a2b;
}

.adv-custom-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(56, 189, 248, 0.2);
    border-radius: 8px;
}

.adv-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid rgba(56, 189, 248, 0.15);
    margin-top: 22px;
}

.adv-btn-export {
    background: var(--gradient-accent);
    color: #041324;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 0.92rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

.adv-btn-export:hover {
    box-shadow: 0 0 28px rgba(56, 189, 248, 0.55);
    transform: translateY(-1px);
}

.adv-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all var(--transition);
}

.adv-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .adv-format-grid {
        grid-template-columns: 1fr;
    }

    .adv-form-row {
        grid-template-columns: 1fr;
    }

    .adv-custom-dates {
        grid-template-columns: 1fr;
    }
}

/* ─── PWA Install Pill ───────────────────────────────────────────────────── */
.pwa-install-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(99, 102, 241, 0.22));
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
    animation: pwa-pulse 2.2s infinite;
}

.pwa-install-pill:hover {
    background: var(--accent);
    color: #041324;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.6);
    transform: translateY(-1px);
}

@keyframes pwa-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
    }

    50% {
        box-shadow: 0 0 20px rgba(56, 189, 248, 0.5);
    }
}

/* ─── Card Recheck System Styles ─────────────────────────────────────────── */
.recheck-cell-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 95px;
}

.btn-recheck {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #c084fc;
    font-size: 0.70rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: inherit;
}

.btn-recheck:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: rgba(168, 85, 247, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(168, 85, 247, 0.25);
}

.btn-recheck.recheck-loading {
    pointer-events: none;
    opacity: 0.85;
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    animation: recheck-pulse 1.5s ease-in-out infinite;
}

.btn-recheck.recheck-live {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.5);
    color: #34d399;
    font-weight: 800;
    pointer-events: none;
}

.btn-recheck.recheck-dead {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
    font-weight: 800;
    pointer-events: none;
}

.btn-recheck.recheck-error {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fbbf24;
    font-weight: 800;
    pointer-events: none;
}

.recheck-status-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    line-height: 1.2;
    padding: 2px 5px;
    border-radius: 5px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.recheck-status-meta:hover {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(148, 163, 184, 0.28);
}

.recheck-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.recheck-dot.dot-live {
    background-color: #10b981;
    box-shadow: 0 0 6px #10b981;
}

.recheck-dot.dot-dead,
.recheck-dot.dot-declined,
.recheck-dot.dot-failed {
    background-color: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
}

.recheck-dot.dot-error,
.recheck-dot.dot-partial {
    background-color: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.7);
}

.recheck-dot.dot-none {
    background-color: rgba(148, 163, 184, 0.35);
}

.recheck-status-text {
    font-weight: 700;
    font-size: 0.66rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.recheck-status-text.status-live {
    color: #34d399;
}

.recheck-status-text.status-dead,
.recheck-status-text.status-declined,
.recheck-status-text.status-failed {
    color: #f87171;
}

.recheck-status-text.status-error,
.recheck-status-text.status-partial {
    color: #fbbf24;
}

.recheck-sep {
    color: rgba(148, 163, 184, 0.35);
    font-size: 0.6rem;
}

.recheck-none-text {
    color: rgba(148, 163, 184, 0.45);
    font-style: italic;
    font-size: 0.66rem;
}

.recheck-time-ago {
    color: #94a3b8;
    font-size: 0.66rem;
    cursor: help;
    border-bottom: 1px dotted rgba(148, 163, 184, 0.3);
}

.recheck-pulse-glow {
    animation: recheck-meta-flash 1.5s ease-out;
}

@keyframes recheck-meta-flash {
    0% {
        transform: scale(1.06);
        border-color: rgba(56, 189, 248, 0.8);
        box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
    }
    100% {
        transform: scale(1);
        border-color: rgba(148, 163, 184, 0.14);
        box-shadow: none;
    }
}

@keyframes recheck-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.recheck-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(56, 189, 248, 0.3);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}