/* Modern Dashboard Styling */

/* Dashboard Header */
.dashboard-header {
    background: linear-gradient(135deg, #1e4d84 0%, #2563eb 100%);
    color: white;
    margin-bottom: 2rem;
}

.dashboard-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: white;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* Modern Stat Cards */
.modern-stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    height: 100%;
}

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

.modern-stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.modern-stat-card.blue .stat-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.modern-stat-card.green .stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.modern-stat-card.orange .stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.modern-stat-card.purple .stat-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Modern Cards */
.modern-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

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

.modern-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    flex: 1;
}

.modern-card-body {
    padding: 1.5rem;
}

/* Statements Grid */
.statements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.statement-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.statement-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.statement-icon {
    font-size: 2rem;
    color: #6b7280;
}

.statement-info {
    flex: 1;
    min-width: 0;
}

.statement-filename {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.statement-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
}

.statement-status {
    margin-top: 0.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

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

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

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

.statement-actions {
    display: flex;
    gap: 0.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Dark Mode Overrides */
[data-theme="dark"] .dashboard-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

[data-theme="dark"] .modern-stat-card,
[data-theme="dark"] .modern-card {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .modern-card-header {
    border-color: #374151;
}

[data-theme="dark"] .modern-card-title,
[data-theme="dark"] .stat-value {
    color: #f9fafb;
}

[data-theme="dark"] .stat-label {
    color: #d1d5db;
}

[data-theme="dark"] .statement-item {
    background: #111827;
    border-color: #374151;
}

[data-theme="dark"] .statement-item:hover {
    background: #1f2937;
    border-color: #4b5563;
}

[data-theme="dark"] .statement-filename {
    color: #f9fafb;
}

[data-theme="dark"] .statement-meta {
    color: #d1d5db;
}

[data-theme="dark"] .empty-icon {
    color: #4b5563;
}

[data-theme="dark"] .empty-title {
    color: #e5e7eb;
}

[data-theme="dark"] .empty-description {
    color: #d1d5db;
}

/* Profile Page Styles */
.profile-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 1rem 0 0.5rem 0;
}

.profile-email {
    color: #6b7280;
    margin-bottom: 1rem;
}

.profile-badge {
    margin-bottom: 1rem;
}

.badge-free {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-since {
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0;
}

/* Stats List */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-name {
    font-weight: 600;
    color: #111827;
    font-size: 0.875rem;
}

.stat-desc {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.125rem;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    color: white;
}

.stat-number.blue {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.stat-number.green {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.stat-number.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* Modern Forms */
.modern-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

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

.form-control:disabled {
    background-color: #f9fafb;
    color: #6b7280;
}

.form-help {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.form-actions {
    margin-top: 1rem;
}

/* Dark Mode Profile Styles */
[data-theme="dark"] .profile-name {
    color: #f9fafb;
}

[data-theme="dark"] .profile-email {
    color: #d1d5db;
}

[data-theme="dark"] .profile-since {
    color: #9ca3af;
}

[data-theme="dark"] .stat-item {
    background: #111827;
    border-color: #374151;
}

[data-theme="dark"] .stat-name {
    color: #f9fafb;
}

[data-theme="dark"] .stat-desc {
    color: #d1d5db;
}

[data-theme="dark"] .form-label {
    color: #e5e7eb;
}

[data-theme="dark"] .form-control {
    background: #111827;
    border-color: #374151;
    color: #f9fafb;
}

[data-theme="dark"] .form-control:disabled {
    background-color: #1f2937;
    color: #9ca3af;
}

[data-theme="dark"] .form-help {
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-title {
        font-size: 1.75rem;
    }
    
    .statements-grid {
        grid-template-columns: 1fr;
    }
    
    .statement-item {
        flex-direction: column;
        text-align: center;
    }
    
    .statement-actions {
        justify-content: center;
    }
    
    .profile-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* Fix dropdown z-index issues */
.dropdown-menu {
    z-index: 1050 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e5e7eb !important;
}

.dropdown-menu.dropdown-menu-end {
    z-index: 1051 !important;
}

/* Ensure table wrapper doesn't clip dropdowns */
.table-responsive {
    overflow: visible !important;
}

/* Alternative approach - increase z-index for table cells with dropdowns */
.table td .dropdown {
    position: static;
}

.table td .dropdown .dropdown-menu {
    position: absolute;
    z-index: 1060 !important;
}

/* DataTables pagination alignment fix */
.dataTables_wrapper {
    margin: 0 !important;
    padding: 0 !important;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin: 0.75rem 0;
    padding: 0;
}

.dataTables_wrapper .dataTables_paginate {
    z-index: 10;
    text-align: right;
    margin-right: 0;
}

.dataTables_wrapper .dataTables_info {
    text-align: left;
    margin-left: 0;
}

/* Fix the row wrapper to properly align elements */
.dataTables_wrapper .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    align-items: center;
}

.dataTables_wrapper .row .col-sm-12.col-md-5 {
    text-align: left;
}

.dataTables_wrapper .row .col-sm-12.col-md-7 {
    text-align: right;
}

/* Ensure consistent spacing */
.dataTables_wrapper .dataTables_length select {
    margin: 0 0.5rem;
    width: auto;
    display: inline-block;
}

.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5rem;
    width: auto;
    display: inline-block;
}

/* Additional container alignment */
.card .card-body .dataTables_wrapper {
    width: 100%;
    overflow: visible;
}

/* Fix pagination button alignment */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    margin-left: 0.125rem;
    margin-right: 0.125rem;
}

/* Ensure proper responsive table behavior */
.dataTables_wrapper .table-responsive {
    padding: 0;
    margin: 0;
}

/* Fix bottom row alignment */
.dataTables_wrapper .row:last-child {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    align-items: center;
}

/* Actions column specific styling */
.statement-actions .dropdown-menu {
    right: 0;
    left: auto;
    z-index: 1070 !important;
    min-width: 200px;
}

/* Bulk actions bar styling */
#bulk-actions {
    z-index: 100;
    position: relative;
}