/* =====================================================
   Buddhism Plus - Mobile-First Responsive Stylesheet
   ===================================================== */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #0ea5e9;
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --success: #22c55e;
    --glass: rgba(255, 255, 255, 0.8);
    --sidebar-width: 260px;
    --mobile-header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    -webkit-text-size-adjust: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* =====================================================
   CONTAINER
   ===================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-fluid {
    width: 100%;
    padding: 0;
}

/* =====================================================
   NAVBAR (Public pages)
   ===================================================== */
.navbar {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1rem;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--text-main);
}

.logout-btn {
    background: var(--danger);
    color: #fff !important;
    padding: 0.45rem 1rem;
    border-radius: 0.5rem;
}

/* =====================================================
   AUTH CARDS
   ===================================================== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.auth-card h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-card p {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
}

/* =====================================================
   FORMS
   ===================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
    text-decoration: none;
    white-space: nowrap;
    min-height: 44px; /* Touch-friendly minimum */
}

.btn:hover {
    background: var(--primary-hover);
}

.btn:active {
    transform: scale(0.98);
}

.btn-sm {
    width: auto;
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
    min-height: 36px;
}

.btn-danger {
    background: var(--danger);
}
.btn-danger:hover { background: #dc2626; }

.btn-success {
    background: #16a34a;
}
.btn-success:hover { background: #15803d; }

.btn-secondary {
    background: var(--secondary);
}
.btn-secondary:hover { background: #0284c7; }

/* =====================================================
   AUTH FOOTER
   ===================================================== */
.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* =====================================================
   DASHBOARD - STAT CARDS
   ===================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.stat-card h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    word-break: break-all;
}

/* =====================================================
   PROFILE / INFO GRID
   ===================================================== */
.profile-section {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    margin-top: 1.5rem;
}

.profile-info,
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.info-item label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
    font-weight: 500;
}

.info-item span {
    font-weight: 600;
    font-size: 0.9rem;
    word-break: break-all;
}

/* =====================================================
   RANK BADGE
   ===================================================== */
.rank-badge-large {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
}

.modal {
    background: var(--bg-card);
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.modal h2 {
    color: var(--secondary);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.modal p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.info-box {
    background: var(--bg-dark);
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    text-align: left;
}

.info-box div {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.info-box strong {
    color: var(--primary);
}

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error { background: var(--danger); color: #fff; }
.alert-success { background: #16a34a; color: #fff; }

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    padding: 3rem 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* =====================================================
   BADGES
   ===================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #e0f2fe; color: #075985; }

/* =====================================================
   ADMIN LAYOUT - SIDEBAR
   ===================================================== */
.admin-body {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: #1e293b;
    color: #fff;
    padding: 1.5rem 0;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease, width 0.3s ease;
    z-index: 1000;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}
.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}

.admin-sidebar .logo,
.mobile-header .logo {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    display: block;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.admin-sidebar .logo span,
.mobile-header .logo span {
    color: #3b82f6 !important;
}

.mobile-header .logo {
    padding: 0;
    margin-bottom: 0;
    font-size: 1.2rem;
}

/* Sidebar Menu */
.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.9rem;
    gap: 0.75rem;
    min-height: 48px;
}

.sidebar-menu li a i {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    margin-right: 0 !important; /* override inline styles */
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
    border-left: 3px solid #3b82f6;
    padding-left: calc(1.5rem - 3px);
}

/* =====================================================
   MAIN CONTENT AREA
   ===================================================== */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-width: 0; /* prevent flex overflow */
    width: calc(100% - var(--sidebar-width));
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* =====================================================
   ADMIN CARDS & HEADERS
   ===================================================== */
.admin-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
    border-top: 4px solid var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* =====================================================
   TABLES - FULLY RESPONSIVE
   ===================================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
}

.admin-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background: #fff;
}

.admin-table th {
    background: #f8fafc;
    padding: 0.9rem 1rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: var(--text-main);
    vertical-align: middle;
}

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

.admin-table tbody tr:hover {
    background: #f8fafc;
}

/* =====================================================
   MOBILE HEADER (hamburger bar)
   ===================================================== */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    height: var(--mobile-header-height);
    background: #1e293b;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.menu-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 0.45rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.2);
}

/* =====================================================
   SIDEBAR OVERLAY (mobile)
   ===================================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999;
    animation: fadeIn 0.2s ease;
}

.sidebar-overlay.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =====================================================
   LARGE SCREEN (≥1024px) - Collapsed sidebar icon-only
   ===================================================== */
@media (max-width: 1100px) and (min-width: 769px) {
    :root { --sidebar-width: 70px; }

    .admin-sidebar .logo {
        padding: 0;
        text-align: center;
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .admin-sidebar .sidebar-text,
    .admin-sidebar .logo span[style] {
        display: none;
    }

    /* Show only icon text */
    .sidebar-menu li a span.sidebar-text {
        display: none;
    }

    .sidebar-menu li a {
        justify-content: center;
        padding: 0.85rem;
    }

    .sidebar-menu li a:hover,
    .sidebar-menu li.active a {
        padding-left: 0.85rem;
    }

    .sidebar-menu li a i {
        margin-right: 0;
        font-size: 1.1rem;
    }

    /* User profile block in sidebar */
    .admin-sidebar > div[style] {
        display: none;
    }
}

/* =====================================================
   TABLET & MOBILE (≤768px)
   ===================================================== */
@media (max-width: 768px) {
    /* Stack elements vertically for mobile */
    .admin-body {
        flex-direction: column;
    }

    /* Show mobile header */
    .mobile-header {
        display: flex;
        width: 100%;
    }

    /* Sidebar becomes off-canvas */
    .admin-sidebar {
        left: auto !important;
        right: 0 !important;
        transform: translateX(100%);
        width: 280px !important;
        top: 0;
        padding-top: 1rem;
        z-index: 1002;
    }

    .admin-sidebar.show {
        transform: translateX(0);
        box-shadow: -5px 0 20px rgba(0,0,0,0.25);
    }

    /* Show all text when sidebar is open */
    .admin-sidebar.show .sidebar-text {
        display: inline !important;
    }

    .admin-sidebar.show .sidebar-menu li a {
        justify-content: flex-start;
        padding: 0.85rem 1.5rem;
    }

    .admin-sidebar.show .sidebar-menu li a:hover,
    .admin-sidebar.show .sidebar-menu li.active a {
        padding-left: calc(1.5rem - 3px);
    }

    /* Main content fills full width */
    .admin-main {
        margin-left: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 1rem 0.5rem !important; /* Reduce padding to stop overflow */
        overflow-x: hidden;
    }
    
    body {
        overflow-x: hidden; /* Prevent horizontal scroll on mobile entirely */
    }

    /* Navbar */
    .navbar .container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-links a {
        margin-left: 0.5rem;
        margin-right: 0.5rem;
        font-size: 0.85rem;
    }

    /* Auth card */
    .auth-card {
        padding: 1.75rem 1.25rem;
        margin: 1rem;
        border-radius: 0.75rem;
    }

    /* Form spacing */
    .form-group {
        margin-bottom: 1rem;
    }

    /* Grid adjustments */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .info-grid, .profile-info {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    /* Admin header stack */
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .admin-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .admin-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 0.85rem;
    }

    /* Admin card optimization */
    .admin-card {
        padding: 1.25rem 1rem;
        margin-bottom: 1rem;
        border-radius: 0.75rem;
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
    }

    /* Table visual fixes */
    .table-responsive {
        margin: 0 -0.5rem; 
        padding: 0 0.5rem;
        border: none;
        border-radius: 0;
    }

    /* Form improvements */
    .form-group input, .form-group select, .form-control {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 0.8rem 1rem;
    }
}

@media (max-width: 480px) {
    h1, .admin-header h1 {
        font-size: 1.2rem !important;
    }
    
    .admin-card {
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }

    .info-grid, .profile-info {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =====================================================
   SMALL MOBILE (≤480px)
   ===================================================== */
@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

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

    .admin-main {
        padding: 0.75rem 0.75rem 5rem; /* Space at bottom for safe area */
    }

    .badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }

    /* Visual refinements for small screens */
    h1, .admin-header h1 {
        font-size: 1.2rem !important;
    }

    p {
        font-size: 0.85rem;
    }
}

/* Fix for horizontal scroll issues on overall layouts */
.admin-body, .container-fluid, .admin-main {
    max-width: 100%;
    overflow-x: hidden;
}

/* =====================================================
   INVESTMENT CARDS (RD/FD)
   ===================================================== */
.investment-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.investment-card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.investment-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .investment-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-muted); }
.font-bold   { font-weight: 700; }
.mt-1  { margin-top: 0.25rem; }
.mt-2  { margin-top: 0.5rem; }
.mt-4  { margin-top: 1rem; }
.mt-8  { margin-top: 2rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-8  { margin-bottom: 2rem; }
.gap-2 { gap: 0.5rem; }
.flex  { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* Touch-friendly interactive elements */
a, button, [role="button"] {
    min-height: auto;
}

button, input[type="submit"], input[type="button"] {
    touch-action: manipulation;
}

/* Prevent text overflow */
td, th, .info-item span, .stat-card .value {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Smooth transition for sidebar text */
.sidebar-text {
    transition: opacity 0.2s;
    white-space: nowrap;
}

/* Progress animation for rank bar */
@keyframes progress-animation {
    from { background-position: 0 0; }
    to   { background-position: 20px 0; }
}

/* Scrollbar styling for main content on desktop */
@media (min-width: 769px) {
    .admin-main {
        scrollbar-width: thin;
        scrollbar-color: var(--border) transparent;
    }
}

/* =====================================================
   MISSING CLASSES (used in views)
   ===================================================== */

/* Additional badge variants */
.badge-primary   { background: rgba(37,99,235,0.1); color: #1d4ed8; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* Button variants */
.btn-primary  { background: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }

/* Form control (used in filter forms) */
.form-control {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    padding: 0.7rem 1rem;
    border-radius: 0.5rem;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
    -webkit-appearance: none;
    appearance: none;
    min-height: 44px;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Filter form full-width on mobile */
@media (max-width: 600px) {
    .admin-card form[style*="flex"] {
        flex-direction: column !important;
    }
    .admin-card form > div[style*="width: 180px"],
    .admin-card form > div[style*="width: 150px"],
    .admin-card form > div[style*="min-width: 250px"] {
        width: 100% !important;
        min-width: unset !important;
    }
    .admin-card form > div[style*="display: flex; gap"] {
        flex-direction: column;
        width: 100%;
    }
}

/* Status page empty state centering fix */
.admin-card [style*="text-align:center"] > i.fas {
    display: block;
    margin-bottom: 1rem;
}

/* Prevent avatar circles from shrinking */
.user-avatar-circle {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
}

/* Extra-wide tables (users, wallets) */
.admin-table.users-table { min-width: 700px; }
.admin-table.wide-table  { min-width: 750px; }

/* Referral link input override */
.ref-link-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--primary);
    font-family: monospace;
    font-size: 0.75rem;
    min-width: 0; /* allow shrinking */
}

/* Dashboard grid special - 2-col on mobile */
@media (max-width: 768px) {
    .dashboard-grid.force-2col {
        grid-template-columns: 1fr 1fr !important;
    }
}
