/* Admin Dashboard Styles */

.admin-dashboard {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    background: #f9fafb;
}

.admin-dashboard h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2rem;
}

.admin-dashboard h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.stat-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.stat-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

.text-success {
    color: #059669;
    font-weight: 600;
}

/* Section */
.section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Tier Stats */
.tier-stats {
    display: flex;
    gap: 3rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.tier-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tier-name {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tier-count {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
}

.conversion-rate {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.metric-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.metric-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

/* Table Container */
.table-container {
    overflow-x: auto;
    overflow-y: visible;
    margin-top: 1rem;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

/* Admin dashboard table container - ensure full scroll width */
.admin-dashboard .table-container {
    display: block;
    overflow-x: auto;
    overflow-y: visible;
}

/* Sticky First Column for Users Table */
.admin-dashboard .users-table th:first-child,
.admin-dashboard .users-table td:first-child {
    position: sticky;
    left: 0;
    background: white;
    z-index: 2;
    box-shadow: 2px 0 4px -2px rgba(0, 0, 0, 0.1);
}

.users-table thead th:first-child {
    background: #f9fafb;
    z-index: 2;
}

.users-table tr.suspended-row td:first-child {
    background: #fef2f2;
}

.users-table tr:hover td:first-child {
    background: #f3f4f6;
}

.users-table tr.suspended-row:hover td:first-child {
    background: #fee2e2;
}

/* Top Links Table */
.top-links-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.top-links-table th,
.top-links-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.top-links-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.top-links-table tbody tr:hover {
    background: #f9fafb;
}

.url-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6b7280;
}

.link-code {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-family: monospace;
}

.link-code:hover {
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.no-data {
    text-align: center;
    color: #9ca3af;
    padding: 2rem;
    font-style: italic;
}

.phase-2-note {
    color: #6b7280;
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* User Management Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.user-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.tier-filter,
.status-filter {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

.tier-filter:focus,
.status-filter:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.user-stats-summary {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Users Table */
.admin-dashboard .users-table {
    width: 100%;
    min-width: 1400px;
    max-width: none !important;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
    table-layout: auto;
}

.users-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    text-align: center;
    border-bottom: 2px solid #e5e7eb;
    white-space: nowrap;
}

.users-table td {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    white-space: nowrap;
}

.users-table tbody tr {
    transition: background-color 0.15s;
}

.users-table tbody tr:hover {
    background: #f9fafb;
}

.users-table .user-email {
    text-align: left;
    font-weight: 500;
    color: #111827;
}

.users-table th:last-child,
.users-table td:last-child {
    min-width: 220px;
}

.badge-free {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-pro {
    background: #fef3c7;
    color: #92400e;
}

.badge-premium {
    background: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.text-muted {
    color: #9ca3af;
}

/* Suspended Row */
.suspended-row {
    background: #fef2f2 !important;
}

.suspended-row:hover {
    background: #fee2e2 !important;
}

/* Paused Row */
.paused-row {
    background: #fffbeb !important;
}

.paused-row:hover {
    background: #fef3c7 !important;
}

/* Actions Cell */
.actions-cell {
    white-space: nowrap;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
}

.actions-cell button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #059669;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

/* Danger Modal Header */
.modal-header-danger {
    background: #fef2f2;
    border-bottom-color: #fecaca;
}

.modal-header-danger h3 {
    color: #991b1b;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.page-info {
    font-size: 0.875rem;
    color: #6b7280;
    min-width: 120px;
    text-align: center;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2563eb;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 480px;
    width: 100%;
}

.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.close-button {
    background: none;
    border: none;
    font-size: 2rem;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.close-button:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 1rem 1.25rem;
}

.modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

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

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: #f9fafb;
}

.checkbox-label input[type="checkbox"] {
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.checkbox-suspended {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.suspended-note {
    display: block;
    font-size: 0.75rem;
    color: #dc2626;
    margin-top: 0.25rem;
    margin-left: 2rem;
}

.success-message {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* Link Management */
.link-info-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.link-info-box strong {
    display: block;
    color: #111827;
    font-family: monospace;
    margin-bottom: 0.5rem;
}

.link-info-box small {
    display: block;
    color: #6b7280;
    word-break: break-all;
}

.delete-warning {
    color: #dc2626;
    font-weight: 500;
    margin-top: 1rem;
}

/* Modal Close Button */
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-md {
    max-width: 500px;
}

/* Form Elements */
.form-group textarea,
.form-group input[type="text"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group textarea:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.required {
    color: #dc2626;
}

/* Warning Box */
.warning-box {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.warning-box i {
    color: #d97706;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.warning-box p {
    margin: 0;
    color: #92400e;
    font-size: 0.875rem;
}


/* Small Spinner */
.spinner-sm {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.375rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    animation: slideIn 0.3s ease-out;
}

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

.toast-success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.toast-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.user-email-small {
    font-size: 0.8125rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
}

.btn-outline-danger:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
}

.btn-outline-success {
    background: transparent;
    border: 1px solid #10b981;
    color: #10b981;
}

.btn-outline-success:hover:not(:disabled) {
    background: #d1fae5;
    border-color: #059669;
    color: #059669;
}

.btn-outline-warning {
    background: transparent;
    border: 1px solid #f59e0b;
    color: #f59e0b;
}

.btn-outline-warning:hover:not(:disabled) {
    background: #fef3c7;
    border-color: #d97706;
    color: #d97706;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid #3b82f6;
    color: #3b82f6;
}

.btn-outline-primary:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

.btn-outline-secondary {
    background: transparent;
    border: 1px solid #6b7280;
    color: #6b7280;
}

.btn-outline-secondary:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #4b5563;
    color: #4b5563;
}

/* User Filter Banner */
.user-filter-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    margin-bottom: 1rem;
    color: #1e40af;
}

.user-filter-banner i {
    color: #3b82f6;
}

.user-filter-banner span {
    flex: 1;
}

.user-filter-banner strong {
    color: #1e3a8a;
}

/* Abuse Logs Section */
.abuse-log-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.abuse-log-filters .search-input {
    flex: 1;
    min-width: 200px;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    min-width: 130px;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-input {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    min-width: 140px;
}

.date-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Abuse Log Table */
.abuse-logs-table th:first-child,
.abuse-logs-table td:first-child {
    white-space: nowrap;
}

.abuse-logs-table .date-cell {
    font-size: 0.8125rem;
    color: #6b7280;
    white-space: nowrap;
}

.abuse-logs-table .target-cell {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.abuse-logs-table .reason-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.abuse-logs-table .admin-cell {
    font-size: 0.8125rem;
    color: #6b7280;
}

/* Entity Type Badges */
.badge-user {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-link {
    background: #fef3c7;
    color: #92400e;
}

/* Action Badges */
.badge-action-suspended {
    background: #fee2e2;
    color: #991b1b;
}

.badge-action-unsuspended {
    background: #d1fae5;
    color: #065f46;
}

.badge-action-deleted {
    background: #fce7f3;
    color: #9d174d;
}

/* Deleted Row */
.deleted-row {
    background: #fdf2f8 !important;
}

.deleted-row:hover {
    background: #fce7f3 !important;
}

/* Abuse Log Detail Modal */
.modal-lg {
    max-width: 640px;
}

.abuse-log-detail-grid {
    display: grid;
    gap: 1rem;
}

.detail-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    align-items: start;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.detail-row.full-width {
    grid-template-columns: 1fr;
}

.detail-row.full-width .detail-label {
    margin-bottom: 0.5rem;
}

.detail-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.detail-value {
    font-size: 0.875rem;
    color: #111827;
    word-break: break-word;
}

.reason-full,
.evidence-full {
    background: #f9fafb;
    padding: 0.75rem;
    border-radius: 6px;
    font-family: inherit;
    white-space: pre-wrap;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* Enhanced Pagination Container */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    gap: 1rem;
}

.pagination-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-right {
    display: flex;
    align-items: center;
}

.pagination-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.page-size-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    min-width: 70px;
}

.page-size-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pagination-total {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

/* Compact Pagination */
.pagination-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.pagination-summary {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

.pagination-compact-inline {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    margin-bottom: 1rem;
}

/* URL Cell with Copy Button */
.links-table .url-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.links-table .url-cell span {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #6b7280;
}

/* Copy Button Inline Style Override for Admin */
.links-table .copy-button {
    padding: 0.25rem 0.5rem;
    flex-shrink: 0;
}

.links-table .copy-button i {
    font-size: 0.75rem;
}

/* User Email Link */
.user-email-link {
    color: #3b82f6;
    text-decoration: none;
}

.user-email-link:hover {
    text-decoration: underline;
}

/* User Detail Page */
.user-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-detail-header h1 {
    margin: 0;
    flex: 1;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.user-info-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.user-info-card-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.user-info-main {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #bfdbfe;
}

.user-avatar i {
    font-size: 2.5rem;
    color: #3b82f6;
}

.user-info-details h2 {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.user-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge-admin {
    background: #e9d5ff;
    color: #5b21b6;
}

.badge-verified {
    background: #d1fae5;
    color: #065f46;
}

.badge-verified i {
    margin-right: 0.25rem;
}

.user-info-stats {
    display: flex;
    gap: 0;
}

.user-info-stats .stat-item {
    text-align: center;
    padding: 1rem 2rem;
    border-left: 1px solid #e5e7eb;
    min-width: 100px;
}

.user-info-stats .stat-item:first-child {
    border-left: none;
}

.user-info-stats .stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.user-info-stats .stat-value.text-danger {
    color: #dc2626;
}

.user-info-stats .stat-label {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

/* Tabs */
.user-detail-tabs {
    display: flex;
    gap: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.tab-button:hover {
    color: #3b82f6;
    background: #f9fafb;
}

.tab-button.active {
    color: white;
    background: #3b82f6;
}

.tab-content {
    min-height: 300px;
}

.tab-content .section {
    margin-bottom: 0;
}

.tab-content .section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1.5rem 0;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    padding: 1rem 1.25rem;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
}

.info-label {
    display: block;
    font-size: 0.6875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.375rem;
    font-weight: 500;
}

.info-value {
    font-size: 0.9375rem;
    color: #111827;
    font-weight: 600;
}

.info-value .text-success {
    color: #059669;
}

.info-value .text-warning {
    color: #d97706;
}

.info-value .text-danger {
    color: #dc2626;
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 0.5rem;
}

.entity-id {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-dashboard {
        padding: 1rem;
        min-height: auto; /* Allow proper scrolling on mobile */
        padding-bottom: 100px; /* Extra space for Crisp chat */
    }

    .admin-dashboard h1 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .tier-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        overflow-x: scroll;
    }

    .top-links-table {
        font-size: 0.75rem;
    }

    .top-links-table th,
    .top-links-table td {
        padding: 0.5rem;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .user-filters {
        flex-direction: column;
    }

    .user-stats-summary {
        flex-direction: column;
        gap: 0.5rem;
    }

    .users-table {
        font-size: 0.75rem;
    }

    .users-table th,
    .users-table td {
        padding: 0.5rem;
    }

    .pagination {
        flex-direction: column;
        gap: 0.75rem;
    }

    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .pagination-left,
    .pagination-center,
    .pagination-right {
        justify-content: center;
    }

    .pagination-compact {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }

    .links-table .url-cell {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .links-table .url-cell span {
        max-width: 150px;
    }

    .abuse-log-filters {
        flex-direction: column;
    }

    .abuse-log-filters .search-input,
    .filter-select,
    .date-input {
        width: 100%;
        min-width: unset;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .modal-lg {
        max-width: 100%;
    }

    /* User Detail Page Mobile */
    .user-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-info-card-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .user-info-main {
        flex-direction: column;
        text-align: center;
    }

    .user-badges {
        justify-content: center;
    }

    .user-info-stats {
        justify-content: center;
        border-top: 1px solid #e5e7eb;
        padding-top: 1rem;
        margin-top: 0.5rem;
    }

    .user-info-stats .stat-item {
        border-left: none;
        padding: 0.75rem 1rem;
    }

    .user-info-stats .stat-item:not(:last-child) {
        border-right: 1px solid #e5e7eb;
    }

    .user-detail-tabs {
        overflow-x: auto;
    }

    .tab-button {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
        white-space: nowrap;
    }

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

    .action-buttons {
        flex-direction: column;
    }

    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .pagination-left,
    .pagination-center,
    .pagination-right {
        justify-content: center;
    }

    .abuse-log-filters {
        flex-direction: column;
    }

    .abuse-log-filters .search-input,
    .filter-select,
    .date-input {
        width: 100%;
        min-width: unset;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .modal-lg {
        max-width: 100%;
    }
}
