@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* Global responsive design rules to prevent horizontal scrolling */
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}

/* RTL Language Support - Persian/Arabic */
[dir="rtl"] body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;
}

[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] * {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;
}

/* Ensure all containers respect viewport width */
.container,
.container-fluid,
.row,
.col,
[class*="col-"] {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Prevent tables from causing horizontal scroll */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Ensure images and media are responsive */
img,
video,
object,
embed {
    max-width: 100%;
    height: auto;
}

/* Prevent pre and code blocks from causing overflow */
pre,
code {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

/* Enhanced Button Styles */
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-success {
    color: #fff;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-success:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.6);
}

.btn-warning {
    color: #fff;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 147, 251, 0.6);
}

.btn-danger {
    color: #fff;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(250, 112, 154, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #fee140 0%, #fa709a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(250, 112, 154, 0.6);
}

.btn-secondary {
    color: #fff;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(168, 237, 234, 0.4);
    color: #333;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #fed6e3 0%, #a8edea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 237, 234, 0.6);
    color: #333;
}

/* Enhanced Form Styles */
.form-control {
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

.form-control:focus {
    border-color: #667eea;
    background-color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.form-control:hover {
    border-color: #b8c6db;
}

.form-select {
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

.form-select:focus {
    border-color: #667eea;
    background-color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

/* Enhanced Input Group Styles */
.input-group-text {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    font-weight: 600;
    border-radius: 8px 0 0 8px;
}

/* Enhanced Card Styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 20px;
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

/* Special styling for accounts management card */
.accounts-management-card .card-body {
    padding: 0;
    overflow-x: hidden;
}

/* Enhanced Modal Styles */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 20px 25px;
}

.modal-footer {
    border-top: none;
    padding: 20px 25px;
    background-color: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* Enhanced Table Styles */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    border: none;
    padding: 15px;
}

.table td {
    padding: 12px 15px;
    border-color: #e9ecef;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Enhanced responsive table styles */
.table-responsive-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}

.table-responsive-x-auto::-webkit-scrollbar {
    height: 8px;
}

.table-responsive-x-auto::-webkit-scrollbar-track {
    background-color: #f1f3f4;
    border-radius: 4px;
}

.table-responsive-x-auto::-webkit-scrollbar-thumb {
    background-color: #007bff;
    border-radius: 4px;
}

.table-responsive-x-auto::-webkit-scrollbar-thumb:hover {
    background-color: #0056b3;
}

.accounts-table-container {
    min-width: 1100px;
    width: max-content;
}

@media (max-width: 1200px) {
    .accounts-table-container {
        min-width: 1000px;
    }
}

@media (max-width: 992px) {
    .accounts-table-container {
        min-width: 900px;
    }
}

@media (max-width: 768px) {
    .accounts-table-container {
        min-width: 800px;
    }
}

/* Compact table view for better screen utilization */
.table.table-sm th,
.table.table-sm td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
}

/* Text truncation for long content */
.text-truncate {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

/* Column-specific width constraints */
.col-username {
    width: 120px;
    min-width: 120px;
}

.col-email {
    width: 150px;
    min-width: 150px;
}

.col-phone {
    width: 100px;
    min-width: 100px;
}

.col-gender {
    width: 80px;
    min-width: 80px;
}

.col-ixbrowser {
    width: 90px;
    min-width: 90px;
}

.col-created {
    width: 90px;
    min-width: 90px;
}

.col-followers,
.col-following {
    width: 80px;
    min-width: 80px;
}

.col-status {
    width: 100px;
    min-width: 100px;
}

.col-actions {
    width: 110px;
    min-width: 110px;
}

/* Action buttons */
.btn-group-sm .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Badges */
.badge {
    font-size: 0.75rem;
}

/* Avatar image sizing */
.avatar-img {
    width: 24px;
    height: 24px;
}

/* Checkbox column */
.col-checkbox {
    width: 30px;
    min-width: 30px;
    text-align: center;
}

/* Enhanced Badge Styles */
.badge {
    border-radius: 20px;
    padding: 6px 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important;
}

/* Form Group Enhancements */
.form-group {
    margin-bottom: 20px;
}

.form-check-input:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

/* Pagination Enhancement */
.pagination .page-link {
    border: none;
    border-radius: 8px;
    margin: 0 2px;
    color: #667eea;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pagination .page-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2NyA1Mi43OTg3IDI2Ny41MzkgNTMuNjI4MyAyOTAuMTg1IDkyLjE4MzEgMjkwLjU0NSA5Mi43OTUgMjkwLjY1NiA5Mi45OTZDMjkwLjg3NyA5My41MTMgMjkxAjk0LjA4MTUgMjkxAjk0LjY3ODIgMjkxAjk3LjA2NTEgMjg5LjAzOCA5OSAyODYuNjE3Ajk5TDI0MC4zODMgOTlDQzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Account Management Styles */
.account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.status-badges {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.status-badges .badge {
    font-size: 0.7rem;
}

.table-responsive {
    border-radius: 0.375rem;
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.pagination .page-link {
    color: #0d6efd;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom styles for the application */
.sidebar {
    min-height: 100vh;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, .75);
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}

.sidebar .nav-link:hover {
    color: rgba(255, 255, 255, .85);
    background-color: rgba(255, 255, 255, .1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, .2);
}

/* Sidebar states */
.sidebar-expanded {
    width: 280px;
    transition: width 0.3s ease;
}

.sidebar-collapsed {
    width: 80px;
    transition: width 0.3s ease;
}

.sidebar-collapsed .nav-link {
    justify-content: center;
    text-align: center;
    padding: 0.75rem 0.5rem;
}

.sidebar-collapsed .nav-link i {
    margin-right: 0 !important;
    font-size: 1.25rem;
}

.sidebar-collapsed .sidebar-header h5,
.sidebar-collapsed .sidebar-header small {
    display: none;
}

.sidebar-collapsed .btn {
    justify-content: center;
    padding: 0.5rem;
}

.sidebar-collapsed .btn i {
    margin-right: 0 !important;
}

/* Enhanced sidebar button visibility with user-friendly colors */
.sidebar .btn-outline-light {
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15)) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.sidebar .btn-outline-light:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 0.9)) !important;
    border-color: rgba(59, 130, 246, 0.8) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.sidebar .btn-outline-light:focus {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 0.9)) !important;
    border-color: rgba(59, 130, 246, 0.8) !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.4), 0 4px 12px rgba(59, 130, 246, 0.3) !important;
    outline: none !important;
}

.sidebar .btn-outline-light:active {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(29, 78, 216, 1)) !important;
    border-color: rgba(37, 99, 235, 0.9) !important;
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4) !important;
}

/* Ensure button icons are visible with proper styling */
.sidebar .btn-outline-light i {
    color: inherit !important;
    opacity: 1 !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)) !important;
}

/* Theme-specific overrides for better contrast */
[data-theme="dark"] .sidebar .btn-outline-light {
    color: #f1f5f9 !important;
    border-color: rgba(148, 163, 184, 0.7) !important;
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.9), rgba(30, 41, 59, 0.95)) !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(148, 163, 184, 0.4) !important;
}

[data-theme="dark"] .sidebar .btn-outline-light:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.8), rgba(5, 150, 105, 0.9)) !important;
    border-color: rgba(16, 185, 129, 0.8) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

[data-theme="light"] .sidebar .btn-outline-light {
    color: #1e293b !important;
    border-color: rgba(30, 41, 59, 0.6) !important;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.9)) !important;
    box-shadow: 0 3px 12px rgba(30, 41, 59, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

[data-theme="light"] .sidebar .btn-outline-light:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(79, 70, 229, 0.9)) !important;
    border-color: rgba(99, 102, 241, 0.8) !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}

/* Additional specificity for theme overrides */
.theme-dark .sidebar .btn-outline-light,
.theme-light .sidebar .btn-outline-light {
    color: #f8f9fa !important;
    border-color: #f8f9fa !important;
    background-color: transparent !important;
}

.theme-dark .sidebar .btn-outline-light:hover,
.theme-light .sidebar .btn-outline-light:hover {
    color: #212529 !important;
    background-color: #f8f9fa !important;
    border-color: #f8f9fa !important;
}

/* Responsive sidebar adjustments */
@media (max-width: 1200px) {
    .sidebar-expanded {
        width: 250px;
    }
}

@media (max-width: 992px) {
    .sidebar-expanded {
        width: 220px;
    }
    
    .sidebar-collapsed {
        width: 70px;
    }
}

.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border-radius: 0.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

.table th {
    border-top: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

.badge {
    font-size: 0.75em;
    font-weight: 500;
}

.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.form-control, .form-select {
    border-radius: 0.375rem;
}

.modal-content {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.75rem 0.75rem 0 0;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Login page specific styles */
.vh-100 {
    min-height: 100vh;
}

.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.login-page .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.login-page .card-header {
    border-radius: 15px 15px 0 0 !important;
    background: linear-gradient(135deg, #1b6ec2 0%, #0056b3 100%) !important;
}

/* Animation for loading states */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Tweet Content Manager Styles */
.tweet-content-box {
    transition: all 0.3s ease;
}

.tweet-content-box:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.preview-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.preview-container:hover {
    transform: scale(1.02);
}

.preview-container img,
.preview-container video {
    transition: opacity 0.2s ease;
}

.preview-container:hover img,
.preview-container:hover video {
    opacity: 0.9;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Mobile modal improvements */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
        width: calc(100% - 1rem);
    }

    .modal-xl {
        max-width: calc(100% - 1rem);
        width: calc(100% - 1rem);
    }

    .modal-body {
        padding: 1rem 0.75rem;
        max-height: calc(100vh - 200px);
        overflow-y: auto;
    }

    /* Mobile upload button improvements */
    .btn-outline-secondary {
        min-height: 44px;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        touch-action: manipulation;
    }

    /* Mobile form control improvements */
    .form-control,
    .form-select,
    input[type="file"] {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
        touch-action: manipulation;
    }

    /* Mobile textarea improvements */
    textarea.form-control {
        min-height: 88px;
        resize: vertical;
    }

    /* Mobile tweet content improvements */
    .tweet-content-box {
        margin-bottom: 1rem;
        border-radius: 8px;
    }

    .col-lg-6 {
        width: 100%;
        margin-bottom: 1rem;
    }

    /* Mobile preview improvements */
    .preview-container {
        width: 100% !important;
        max-width: 200px;
        height: 200px !important;
        margin: 0 auto;
    }

    .preview-container img,
    .preview-container video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Mobile upload section improvements */
    .mt-3.p-3.border.rounded {
        padding: 0.75rem !important;
        margin-top: 0.75rem !important;
    }

    .mt-3.p-2.border.rounded {
        padding: 0.5rem !important;
        margin-top: 0.75rem !important;
    }

    /* Mobile button group improvements */
    .d-flex.justify-content-between.align-items-center .btn {
        margin: 0.25rem;
        min-width: auto;
    }

    /* Mobile table improvements */
    .table-responsive {
        font-size: 0.875rem;
        border-radius: 0.375rem;
    }

    .table td, .table th {
        padding: 0.5rem 0.25rem;
        vertical-align: middle;
    }

    /* Mobile card improvements */
    .card {
        margin-bottom: 1rem;
        border-radius: 0.5rem;
    }

    .card-body {
        padding: 1rem 0.75rem;
    }

    /* Mobile sidebar improvements */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.show {
        left: 0;
    }

    /* Mobile offcanvas improvements */
    .offcanvas-body .nav-link {
        padding: 0.75rem 1rem;
        margin-bottom: 0.25rem;
        border-radius: 0.375rem;
        display: flex;
        align-items: center;
        min-height: 48px;
        touch-action: manipulation;
    }

    .offcanvas-body .nav-link i {
        min-width: 20px;
        text-align: center;
    }

    /* Touch-friendly improvements */
    .btn {
        min-height: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .btn-sm {
        min-height: 36px;
        padding: 0.375rem 0.75rem;
    }

    /* File input improvements for mobile */
    input[type="file"] {
        padding: 0.5rem;
        background-color: #fff;
        border: 2px solid #dee2e6;
        border-radius: 0.375rem;
        cursor: pointer;
    }

    input[type="file"]:focus {
        border-color: #80bdff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

    /* Mobile-specific preview modal improvements */
    .modal.fade.show {
        padding-right: 0 !important;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }

    .preview-container:hover {
        transform: none;
    }

    .preview-container:active {
        transform: scale(0.98);
    }

    .btn:active {
        transform: scale(0.98);
    }

    /* Improve tap targets */
    .nav-link,
    .btn,
    .form-control,
    .form-select,
    input[type="file"],
    input[type="checkbox"],
    input[type="radio"] {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

/* Mobile file input specific styles */
.mobile-file-input {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.mobile-file-input::-webkit-file-upload-button {
    -webkit-appearance: none;
    appearance: none;
    background: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    margin-right: 0.5rem;
}

.mobile-file-input::-webkit-file-upload-button:hover {
    background: #0056b3;
}

.mobile-preview {
    cursor: pointer;
    position: relative;
}

.mobile-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.2s ease;
    pointer-events: none;
}

.mobile-preview:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

.mobile-preview:active::after {
    background: rgba(0, 0, 0, 0.2);
}

/* Comment content box styles */
.comment-content-box {
    transition: all 0.3s ease;
}

.comment-content-box:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

/* High DPI display improvements */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .preview-container img,
    .preview-container video {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== ACCOUNTS TABLE: SCROLLABLE CONTAINER ===== */
.table-responsive-x-auto {
    max-height: 600px !important;
    overflow: auto !important;
    position: relative !important;
}

/* Sticky table header */
.table-responsive-x-auto thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
    background-color: #f8f9fa !important;
}

/* ===== ACCOUNTS TABLE: STICKY ACTIONS COLUMN ===== */
.col-actions {
    position: sticky !important;
    right: 0 !important;
    z-index: 10 !important;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1) !important;
}

th.col-actions {
    background-color: #f8f9fa !important;
    z-index: 30 !important; /* Higher z-index for sticky header + sticky column */
}

td.col-actions {
    background-color: #ffffff !important;
}

.table-hover tbody tr:hover td.col-actions {
    background-color: rgba(0, 123, 255, 0.05) !important;
}

.table-active td.col-actions {
    background-color: rgba(0, 123, 255, 0.1) !important;
}

/* ===== ACCOUNTS TABLE: PROBLEM ACCOUNTS ROW HIGHLIGHTING ===== */
/* Accounts that need attention: not logged in, not active, or IxBrowser ID = 0 */
.row-needs-attention {
    background-color: #fee2e2 !important;
    border-left: 4px solid #dc2626 !important;
}

.row-needs-attention:hover {
    background-color: #fecaca !important;
}

.row-needs-attention td {
    background-color: #fee2e2 !important;
}

.row-needs-attention:hover td {
    background-color: #fecaca !important;
}

.row-needs-attention td.col-actions {
    background-color: #fee2e2 !important;
}

.row-needs-attention:hover td.col-actions {
    background-color: #fecaca !important;
}

/* Dark theme support for sticky header */
body.theme-dark .table-responsive-x-auto thead th,
.theme-dark .table-responsive-x-auto thead th,
[data-theme="black"] .table-responsive-x-auto thead th,
[data-theme-class="theme-dark"] .table-responsive-x-auto thead th {
    background-color: #374151 !important;
}

/* Dark theme support for sticky actions column */
body.theme-dark th.col-actions,
.theme-dark th.col-actions,
[data-theme="black"] th.col-actions,
[data-theme-class="theme-dark"] th.col-actions {
    background-color: #374151 !important;
}

body.theme-dark td.col-actions,
.theme-dark td.col-actions,
[data-theme="black"] td.col-actions,
[data-theme-class="theme-dark"] td.col-actions {
    background-color: #1e293b !important;
}

body.theme-dark .col-actions,
.theme-dark .col-actions,
[data-theme="black"] .col-actions,
[data-theme-class="theme-dark"] .col-actions {
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3) !important;
}

/* Dark theme support for problem accounts */
body.theme-dark .row-needs-attention,
.theme-dark .row-needs-attention,
[data-theme="black"] .row-needs-attention,
[data-theme-class="theme-dark"] .row-needs-attention {
    background-color: #7f1d1d !important;
    border-left: 4px solid #ef4444 !important;
}

body.theme-dark .row-needs-attention:hover,
.theme-dark .row-needs-attention:hover,
[data-theme="black"] .row-needs-attention:hover,
[data-theme-class="theme-dark"] .row-needs-attention:hover {
    background-color: #991b1b !important;
}

body.theme-dark .row-needs-attention td,
.theme-dark .row-needs-attention td,
[data-theme="black"] .row-needs-attention td,
[data-theme-class="theme-dark"] .row-needs-attention td {
    background-color: #7f1d1d !important;
}

body.theme-dark .row-needs-attention:hover td,
.theme-dark .row-needs-attention:hover td,
[data-theme="black"] .row-needs-attention:hover td,
[data-theme-class="theme-dark"] .row-needs-attention:hover td {
    background-color: #991b1b !important;
}

body.theme-dark .row-needs-attention td.col-actions,
.theme-dark .row-needs-attention td.col-actions,
[data-theme="black"] .row-needs-attention td.col-actions,
[data-theme-class="theme-dark"] .row-needs-attention td.col-actions {
    background-color: #7f1d1d !important;
}

body.theme-dark .row-needs-attention:hover td.col-actions,
.theme-dark .row-needs-attention:hover td.col-actions,
[data-theme="black"] .row-needs-attention:hover td.col-actions,
[data-theme-class="theme-dark"] .row-needs-attention:hover td.col-actions {
    background-color: #991b1b !important;
}
