/* OEH ADMIN PANEL - MODERN PROFESSIONAL DESIGN */

:root {
    --primary-color: #0071bc;
    --primary-dark: #005a94;
    --primary-light: #0088e0;
    --secondary-color: #003d6b;
    --accent-color: #00a3e0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #0071bc;
    --sidebar-width: 280px;
    --header-height: 70px;
    --gradient-primary: linear-gradient(135deg, #0071bc 0%, #005a94 100%);
    --gradient-light: linear-gradient(135deg, #0088e0 0%, #0071bc 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --shadow-sm: 0 2px 8px rgba(0, 113, 188, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 113, 188, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 113, 188, 0.2);
    --border-radius: 16px;
    --border-radius-sm: 12px;
    --border-radius-lg: 20px;
}

html,
body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: var(--gradient-primary);
    color: #fff;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 4px 0 24px rgba(0, 113, 188, 0.15);
    backdrop-filter: blur(10px);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.sidebar-header {
    padding: 28px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.sidebar-header i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.sidebar-header h4 {
    margin: 0;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
    transition: opacity .3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar.collapsed .sidebar-header h4 {
    opacity: 0;
}

/* SIDEBAR NAVIGATION */
.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    margin-bottom: 4px;
    padding: 0 12px;
}

.nav-link {
    color: rgba(255, 255, 255, .9);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: #fff;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .15);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    font-weight: 600;
}

.nav-link.active::before {
    transform: scaleY(1);
}

.nav-link i {
    font-size: 1.3rem;
    margin-right: 15px;
    min-width: 24px;
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.1);
}

.sidebar.collapsed .nav-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* MAIN LAYOUT */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left .4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
}

.sidebar.collapsed+.main-content {
    margin-left: 80px;
}

/* HEADER */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 18px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 113, 188, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark);
}

.breadcrumb-item.active {
    color: #64748b;
    font-weight: 600;
}

.sidebar-toggle {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    font-size: 1.3rem;
    color: #475569;
    padding: 10px 12px;
    border-radius: 12px;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.sidebar-toggle:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 113, 188, 0.3);
    border-color: transparent;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-dropdown .dropdown-toggle {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 50px;
    transition: all 0.3s ease;
    color: #334155;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.user-dropdown .dropdown-toggle:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 113, 188, 0.3);
    border-color: transparent;
}

.user-dropdown .dropdown-toggle i {
    font-size: 1.5rem;
    margin-right: 8px;
}

.content-area {
    padding: 32px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CARDS */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    overflow: hidden;
    margin-bottom: 24px;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--gradient-primary);
    color: #fff;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
    border: none;
    padding: 20px 24px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.card-header h5,
.card-header h6 {
    margin: 0;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* BUTTONS */
.btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 12px 24px;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    letter-spacing: 0.3px;
    font-size: 14px;
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 4px 12px rgba(0, 113, 188, 0.3);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 113, 188, 0.4);
    background: var(--gradient-light);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: var(--gradient-success);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-warning {
    background: var(--gradient-warning);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-danger {
    background: var(--gradient-danger);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    color: #fff;
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    color: #6c757d;
    border: 2px solid #6c757d;
    background: transparent;
}

.btn-outline-secondary:hover {
    color: #fff;
    background: #6c757d;
    transform: translateY(-2px);
}

.btn-outline-warning {
    color: var(--warning-color);
    border: 2px solid var(--warning-color);
    background: transparent;
}

.btn-outline-warning:hover {
    color: #fff;
    background: var(--gradient-warning);
    border-color: transparent;
    transform: translateY(-2px);
}

.btn-outline-danger {
    color: var(--danger-color);
    border: 2px solid var(--danger-color);
    background: transparent;
}

.btn-outline-danger:hover {
    color: #fff;
    background: var(--gradient-danger);
    border-color: transparent;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 10px;
}

/* FORMS */
.form-control,
.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
    font-size: 14px;
    background: white;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 113, 188, 0.1);
    background: white;
}

.form-label {
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-floating label {
    color: #64748b;
}

/* ALERTS */
.alert {
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

/* TABLES */
.table {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0;
}

/* PAGINATION */
.pagination {
    gap: 6px;
}

.page-link {
    border-radius: 10px;
    border: none;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    transition: all 0.3s ease;
    color: #475569;
    background: white;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.page-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 113, 188, 0.3);
}

.page-item.active .page-link {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 113, 188, 0.3);
}

/* LOADING */
.loading {
    text-align: center;
    padding: 60px;
}

.spinner-border {
    color: var(--primary-color);
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* DROPDOWN */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 8px;
    margin-top: 8px;
}

.dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: var(--primary-color);
}

.dropdown-divider {
    margin: 8px 0;
    border-color: #f1f5f9;
}

/* ACCESSIBILITY */
*:focus-visible {
    outline: 3px solid rgba(0, 113, 188, 0.4);
    outline-offset: 2px;
}

/* FLOATING ACTION BUTTON */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: 0 6px 20px rgba(0, 113, 188, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 28px rgba(0, 113, 188, 0.5);
}

.fab:active {
    transform: scale(0.95);
}

@media (min-width: 768px) {
    .fab {
        display: none;
    }
}

/* ANIMATIONS */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-card,
.card {
    animation: slideInUp 0.4s ease forwards;
}

/* USER CARDS */
.user-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 113, 188, 0.1);
}

.user-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f8fafc;
    box-shadow: 0 2px 8px rgba(0, 113, 188, 0.2);
}

/* MOBILE CARDS VIEW */
.mobile-cards {
    display: block;
    padding: 0;
}

@media (min-width: 768px) {
    .mobile-cards {
        display: none !important;
    }

    .desktop-table {
        display: block !important;
    }
}

@media (max-width: 767.98px) {
    .mobile-cards {
        display: block !important;
    }

    .desktop-table {
        display: none !important;
    }
}

/* FILTER COMPACT */
.filter-compact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* TOAST */
.toast {
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-light);
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 113, 188, 0.3);
    }

    .main-content {
        margin-left: 0;
    }

    .content-area {
        padding: 16px;
    }

    .header {
        padding: 12px 16px;
    }

    .card {
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .card-header {
        padding: 16px;
    }

    .card-body {
        padding: 16px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-icon {
        font-size: 2.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    body,
    html {
        overflow-x: hidden;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .btn-sm {
        padding: 6px 12px;
        font-size: 12px;
    }

    .table td {
        padding: 12px 8px;
        font-size: 14px;
    }

    .form-control,
    .form-select {
        padding: 10px 14px;
        font-size: 14px;
    }

    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-link {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .content-area {
        padding: 12px;
    }

    .card {
        margin-bottom: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 12px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .btn-sm {
        padding: 5px 10px;
        font-size: 11px;
    }

    .badge {
        font-size: 10px;
        padding: 4px 8px;
    }

    .form-control,
    .form-select {
        padding: 8px 12px;
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 10px 6px;
        font-size: 13px;
    }

    .modal-header {
        padding: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 12px 16px;
    }

    .header {
        padding: 10px 12px;
    }

    .sidebar-toggle {
        padding: 8px 10px;
        font-size: 1.2rem;
    }

    .user-dropdown .dropdown-toggle {
        padding: 6px 12px;
        font-size: 13px;
    }

    .breadcrumb {
        font-size: 12px;
    }
}

/* TOUCH FRIENDLY */
@media (hover: none) {
    .btn:hover {
        transform: none;
    }

    .card:hover {
        transform: none;
    }

    .nav-link:hover {
        transform: none;
    }
}

/* LANDSCAPE MOBILE */
@media (max-width: 896px) and (orientation: landscape) {
    .sidebar {
        height: 100vh;
    }

    .content-area {
        padding: 16px;
    }
}

/* TABLET */
@media (min-width: 769px) and (max-width: 1024px) {
    .content-area {
        padding: 24px;
    }

    .stat-card {
        padding: 24px;
    }
}

/* LARGE SCREENS */
@media (min-width: 1400px) {
    .content-area {
        padding: 40px;
    }

    .container-fluid {
        max-width: 1400px;
        margin: 0 auto;
    }
}


.table th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: none;
    font-weight: 600;
    color: #475569;
    padding: 16px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.table td {
    border: none;
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 113, 188, 0.1);
}

/* MODALS */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    border-radius: 20px 20px 0 0;
    background: var(--gradient-primary);
    color: white;
    padding: 24px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 20px 24px;
    background: #f8fafc;
}

/* BADGES */
.badge {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge.bg-success {
    background: var(--gradient-success) !important;
}

.badge.bg-warning {
    background: var(--gradient-warning) !important;
}

.badge.bg-danger {
    background: var(--gradient-danger) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #0071bc 0%, #005a94 100%) !important;
}

.badge.bg-primary {
    background: var(--gradient-primary) !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
}

/* STAT CARDS */
.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 28px;
    text-align: center;
    transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;

    background-clip: text;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* PAGINATION */
.pagination {
    gap: 6px;
}

.page-link {
    border-radius: 10px;
    border: none;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    transition: all 0.3s ease;
    color: #475569;
    background: white;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* FIX: Card Header Text Visibility */
.card-header .stat-value,
.card-header .stat-label {
    color: white !important;
    -webkit-text-fill-color: white !important;
    background: none !important;
}

.card-header .text-white {
    color: white !important;
}

.card-header .text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Ensure all text in card headers is visible */
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header p,
.card-header span,
.card-header div,
.card-header small,
.card-header .fs-5 {
    color: white !important;
}

/* Table header text visibility */
.table-light th {
    color: #475569 !important;
}

/* Badge text visibility */
.badge {
    color: white !important;
}

.badge.bg-secondary {
    color: white !important;
}

/* Button text visibility */
.btn-primary,
.btn-success,
.btn-warning,
.btn-danger,
.btn-info {
    color: white !important;
}

/* Dropdown text */
.dropdown-item {
    color: #334155 !important;
}

.dropdown-item:hover {
    color: var(--primary-color) !important;
}

/* Breadcrumb active text */
.breadcrumb-item.active {
    color: #64748b !important;
}

/* Form labels */
.form-label {
    color: #475569 !important;
}

/* Alert text */
.alert-success {
    color: #065f46 !important;
}

.alert-danger {
    color: #991b1b !important;
}

.alert-warning {
    color: #92400e !important;
}

.alert-info {
    color: #1e40af !important;
}

/* Stat cards - remove gradient text fill for better visibility */
.stat-card .stat-value {
    color: var(--primary-color) !important;
    background: none !important;
    -webkit-text-fill-color: var(--primary-color) !important;
}

.stat-card .stat-icon {
    color: var(--primary-color) !important;
    background: none !important;
    -webkit-text-fill-color: var(--primary-color) !important;
}

/* User card text */
.user-card h6,
.user-card .fw-bold {
    color: #1e293b !important;
}

.user-card .text-muted {
    color: #64748b !important;
}

/* Modal text */
.modal-header {
    color: white !important;
}

.modal-header h5,
.modal-header .modal-title {
    color: white !important;
}

.modal-body {
    color: #1e293b !important;
}

/* Pagination text */
.page-link {
    color: #475569 !important;
}

.page-item.active .page-link {
    color: white !important;
}

/* Sidebar text - ensure visibility */
.sidebar-header h4 {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
}

/* Header dropdown text */
.user-dropdown .dropdown-toggle {
    color: #334155 !important;
}

.user-dropdown .dropdown-toggle:hover {
    color: white !important;
}

/* Table text */
.table tbody tr td {
    color: #1e293b !important;
}

.table thead th {
    color: #475569 !important;
}

/* Card body text */
.card-body {
    color: #1e293b !important;
}

/* Fix for gradient text that might be invisible */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: #6c757d !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Ensure input text is visible */
.form-control,
.form-select {
    color: #1e293b !important;
}

.form-control::placeholder {
    color: #94a3b8 !important;
}

/* Fix for any remaining invisible text */
body,
p,
span,
div,
a,
label,
input,
select,
textarea,
button {
    color: inherit;
}

/* Specific fix for stats in card header */
.card-header .row .col-3 .stat-value,
.card-header .row .col-3 .stat-label,
.card-header .row .col-6 .stat-value,
.card-header .row .col-6 .stat-label {
    color: white !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: white !important;
    background-clip: unset !important;
}

/* CRITICAL FIX: Force white text in card headers */
.card-header .text-white,
.card-header .text-white.fs-5,
.card-header .stat-value.text-white,
.card-header div.text-white {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    opacity: 1 !important;
}

.card-header .text-white-50,
.card-header small.text-white-50,
.card-header .stat-label.text-white-50 {
    color: rgba(255, 255, 255, 0.75) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.75) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    opacity: 1 !important;
}

/* Override any conflicting stat-value styles in card headers */
.card-header .stat-value {
    color: #ffffff !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    font-weight: 700;
}

.card-header .stat-label {
    color: rgba(255, 255, 255, 0.75) !important;
    background: none !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.75) !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* Ensure all children of card-header with text-white class are visible */
.card-header * {
    text-shadow: none;
}

.card-header .row .col-3 *,
.card-header .row .col-6 * {
    color: inherit;
}

/* Fix fs-5 font size class in card header */
.card-header .fs-5 {
    font-size: 1.25rem !important;
    font-weight: 700;
}

/* Ensure small tags in card header are visible */
.card-header small {
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 0.75rem;
}

/* Fix for Bootstrap text utilities in card header */
.card-header .text-white {
    color: white !important;
}

.card-header .text-white-50 {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Additional specificity for stats in header */
.card-header.py-3 .row.g-2.text-center .col-3 .stat-value,
.card-header.py-3 .row.g-2.text-center .col-3 .stat-label {
    color: white !important;
}

.card-header.py-3 .row.g-2.text-center .col-3 small {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Override gradient text in headers completely */
.card-header [class*="stat-"] {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
}

/* ULTIMATE FIX: Force all text in card header to be white */
.card-header * {
    color: white !important;
}

.card-header div,
.card-header span,
.card-header small,
.card-header p,
.card-header a {
    color: white !important;
}

/* Force fs-5 class to be white in card header */
.card-header .fs-5,
.card-header div.fs-5 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Force all divs with stat-value class */
.card-header div[class*="stat-value"],
.card-header .stat-value {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
}

/* Force all small tags with stat-label class */
.card-header small[class*="stat-label"],
.card-header .stat-label {
    color: rgba(255, 255, 255, 0.85) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.85) !important;
    background: none !important;
}

/* Nuclear option - force everything in card header row to be white */
.card-header .row * {
    color: white !important;
    -webkit-text-fill-color: white !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
}

.card-header .row small {
    color: rgba(255, 255, 255, 0.85) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.85) !important;
}

/* Specific fix for the stats row */
.card-header .row.g-2.text-center * {
    color: white !important;
}

.card-header .row.g-2.text-center small {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Override any Bootstrap or custom classes */
.card-header [class*="text-"] {
    color: white !important;
}

.card-header .text-white-50 {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Make sure numbers are visible */
.card-header .col-3 div,
.card-header .col-3 small {
    color: white !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Exception for buttons and icons */
.card-header .btn,
.card-header .btn * {
    color: white !important;
}

.card-header i,
.card-header .bi {
    color: white !important;
}

/* Force h6 and headings to be white */
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    color: white !important;
}

/* Remove any text-shadow that might hide text */
.card-header * {
    text-shadow: none !important;
}

/* Ensure visibility */
.card-header .stat-value,
.card-header .stat-label {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}


/* ========================================
   ENHANCED DASHBOARD STYLES
   ======================================== */

/* Enhanced Stat Cards - White Theme (Dashboard Main Cards) */
.row.g-4>.col-xl-3 .stat-card,
.row.g-4>.col-lg-6 .stat-card,
.row.g-4>.col-md-6 .stat-card,
.row.g-4>.col-sm-6 .stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
    min-height: 140px;
}

.row.g-4>.col-xl-3 .stat-card::before,
.row.g-4>.col-lg-6 .stat-card::before,
.row.g-4>.col-md-6 .stat-card::before,
.row.g-4>.col-sm-6 .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transition: height 0.3s ease;
}

.row.g-4>.col-xl-3 .stat-card:hover::before,
.row.g-4>.col-lg-6 .stat-card:hover::before,
.row.g-4>.col-md-6 .stat-card:hover::before,
.row.g-4>.col-sm-6 .stat-card:hover::before {
    height: 6px;
}

.row.g-4>.col-xl-3 .stat-card:hover,
.row.g-4>.col-lg-6 .stat-card:hover,
.row.g-4>.col-md-6 .stat-card:hover,
.row.g-4>.col-sm-6 .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #d1d5db;
}

.row.g-4 .stat-card-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border-radius: 50%;
    margin: 20px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.row.g-4 .stat-card:hover .stat-card-icon {
    transform: scale(1.05);
}

.row.g-4 .stat-card-primary .stat-card-icon {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: var(--primary-color);
}

.row.g-4 .stat-card-success .stat-card-icon {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: var(--success-color);
}

.row.g-4 .stat-card-info .stat-card-icon {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--accent-color);
}

.row.g-4 .stat-card-warning .stat-card-icon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: var(--warning-color);
}

.row.g-4 .stat-card-content {
    flex: 1;
    padding: 20px 20px 20px 0;
}

.row.g-4 .stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1;
}

.row.g-4 .stat-card .stat-label {
    font-size: 14px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.row.g-4 .stat-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #10b981;
    font-weight: 500;
}

.row.g-4 .stat-trend i {
    font-size: 12px;
}

/* Quick Actions - White Theme */
.quick-actions-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.quick-actions-container h5 {
    color: #1e293b;
    font-weight: 700;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: #475569;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    gap: 12px;
}

.quick-action-btn i {
    font-size: 2rem;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.quick-action-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 113, 188, 0.25);
}

.quick-action-btn:hover i {
    transform: scale(1.1);
    color: white;
}

/* Chart Cards - White Theme */
.chart-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    height: 100%;
}

.chart-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.chart-card .card-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 20px 24px;
    border: none;
}

.chart-card .card-body {
    padding: 24px;
    background: white;
}

/* Activity Timeline - White Theme */
.activity-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    height: 100%;
}

.activity-card .card-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 20px 24px;
    border: none;
}

.activity-card .card-body {
    padding: 24px;
    background: white;
}

.activity-timeline {
    position: relative;
}

.timeline-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 23px;
    top: 48px;
    width: 2px;
    height: calc(100% + 8px);
    background: linear-gradient(180deg, #e2e8f0 0%, transparent 100%);
}

.timeline-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.timeline-content {
    flex: 1;
    padding-top: 4px;
}

.timeline-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    font-size: 15px;
}

.timeline-desc {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 6px;
}

.timeline-time {
    color: #94a3b8;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Subscription Card - White Theme */
.subscription-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    height: 100%;
}

.subscription-card .card-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 20px 24px;
    border: none;
}

.subscription-card .card-body {
    padding: 24px;
    background: white;
}

.sub-stat {
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.sub-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.sub-stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.plan-item {
    margin-bottom: 20px;
}

.plan-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.plan-count {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 15px;
}

/* Revenue Card - White Theme */
.revenue-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    height: 100%;
}

.revenue-card .card-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 20px 24px;
    border: none;
}

.revenue-card .card-body {
    padding: 24px;
    background: white;
}

/* System Health Card - White Theme */
.system-health-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.system-health-card .card-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 20px 24px;
    border: none;
}

.system-health-card .card-body {
    padding: 24px;
    background: white;
}

.health-item {
    margin-bottom: 20px;
}

.health-item:last-child {
    margin-bottom: 0;
}

.health-item span {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

/* Status Legend - White Theme */
.status-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.status-item:hover {
    background: #e0f2fe;
    border-color: #bae6fd;
    transform: translateX(4px);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-label {
    flex: 1;
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.status-count {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 15px;
}

/* Responsive Adjustments */
@media (max-width: 1399px) {
    .quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 1199px) {
    .row.g-4 .stat-card {
        min-height: 120px;
    }

    .row.g-4 .stat-card-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
        margin: 16px;
    }

    .row.g-4 .stat-card .stat-value {
        font-size: 1.75rem;
    }

    .card-body .stat-card {
        min-height: 100px;
        padding: 16px;
    }

    .card-body .stat-card .stat-icon {
        font-size: 1.75rem;
        margin-bottom: 10px;
    }

    .card-body .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 991px) {
    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
    }

    .card-body .stat-card {
        min-height: 100px;
        padding: 16px;
    }

    .card-body .stat-card .stat-icon {
        font-size: 1.75rem;
        margin-bottom: 10px;
    }

    .card-body .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {

    /* Mobile App-like Design */
    body {
        background: #f0f4f8;
    }

    .main-content {
        background: #f0f4f8;
    }

    .content-area {
        padding: 16px 12px;
    }

    /* Mobile Stat Cards - App Style */
    .row.g-4 {
        gap: 16px !important;
    }

    .row.g-4>.col-xl-3,
    .row.g-4>.col-lg-6,
    .row.g-4>.col-md-6,
    .row.g-4>.col-sm-6 {
        padding: 0 !important;
    }

    .row.g-4 .stat-card {
        min-height: auto;
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        border-radius: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        border: none;
        background: white;
    }

    .row.g-4 .stat-card::before {
        height: 4px;
        border-radius: 20px 20px 0 0;
    }

    .row.g-4 .stat-card-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
        margin: 0 auto 16px;
    }

    .row.g-4 .stat-card-content {
        padding: 0;
        width: 100%;
    }

    .row.g-4 .stat-card .stat-value {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .row.g-4 .stat-card .stat-label {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .row.g-4 .stat-trend {
        font-size: 13px;
        justify-content: center;
    }

    /* Quick Actions - Mobile App Style */
    .quick-actions-container {
        border-radius: 20px;
        padding: 20px 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        border: none;
    }

    .quick-actions-container h5 {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .quick-action-btn {
        padding: 20px 12px;
        font-size: 12px;
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        border: none;
        background: white;
    }

    .quick-action-btn i {
        font-size: 1.75rem;
    }

    /* Chart Cards - Mobile App Style */
    .chart-card,
    .activity-card,
    .subscription-card,
    .revenue-card,
    .system-health-card {
        border-radius: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        border: none;
        margin-bottom: 16px;
    }

    .chart-card .card-header,
    .activity-card .card-header,
    .subscription-card .card-header,
    .revenue-card .card-header,
    .system-health-card .card-header {
        border-radius: 20px 20px 0 0;
        padding: 16px 20px;
    }

    .chart-card .card-header h5,
    .activity-card .card-header h5,
    .subscription-card .card-header h5,
    .revenue-card .card-header h5,
    .system-health-card .card-header h5 {
        font-size: 16px;
    }

    .chart-card .card-body,
    .activity-card .card-body,
    .subscription-card .card-body,
    .revenue-card .card-body,
    .system-health-card .card-body {
        padding: 20px 16px;
    }

    /* Timeline - Mobile Optimized */
    .timeline-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .timeline-item:not(:last-child)::after {
        left: 21px;
    }

    .timeline-title {
        font-size: 14px;
    }

    .timeline-desc {
        font-size: 13px;
    }

    .timeline-time {
        font-size: 11px;
    }

    /* Subscription Stats - Mobile */
    .sub-stat {
        padding: 16px 12px;
        border-radius: 16px;
    }

    .sub-stat-value {
        font-size: 1.5rem;
    }

    .sub-stat-label {
        font-size: 11px;
    }

    /* Status Items - Mobile */
    .status-item {
        padding: 12px 14px;
        border-radius: 12px;
    }

    .status-label {
        font-size: 13px;
    }

    .status-count {
        font-size: 14px;
    }

    /* Health Items - Mobile */
    .health-item {
        margin-bottom: 16px;
    }

    .health-item span {
        font-size: 13px;
    }

    /* Statistics Page Cards - Mobile */
    .card-body .stat-card {
        min-height: 100px;
        padding: 20px 16px;
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .card-body .stat-card .stat-icon {
        font-size: 1.75rem;
        margin-bottom: 10px;
    }

    .card-body .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .card-body .stat-card .stat-label {
        font-size: 11px;
    }

    /* Header - Mobile App Style */
    .header {
        padding: 12px 16px;
        border-radius: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .breadcrumb {
        font-size: 13px;
    }

    .sidebar-toggle {
        border-radius: 12px;
        padding: 10px 12px;
    }

    /* Alerts - Mobile */
    .alert {
        border-radius: 16px;
        padding: 14px 16px;
        font-size: 14px;
        margin-bottom: 16px;
    }

    /* Buttons - Mobile */
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 12px;
    }

    .btn-sm {
        padding: 8px 14px;
        font-size: 12px;
        border-radius: 10px;
    }

    /* Cards General - Mobile */
    .card {
        border-radius: 20px;
        margin-bottom: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        border: none;
    }

    .card-header {
        border-radius: 20px 20px 0 0;
        padding: 16px 20px;
    }

    .card-body {
        padding: 20px 16px;
    }

    /* Remove extra spacing */
    .row.g-4.mb-4 {
        margin-bottom: 16px !important;
    }

    /* Plan Items */
    .plan-item {
        margin-bottom: 16px;
    }

    .plan-name {
        font-size: 13px;
    }

    .plan-count {
        font-size: 14px;
    }
}

@media (max-width: 575px) {

    /* Extra Small Mobile - App Style */
    .content-area {
        padding: 12px 10px;
    }

    .row.g-4 .stat-card {
        padding: 20px 16px;
        border-radius: 18px;
    }

    .row.g-4 .stat-card-icon {
        width: 65px;
        height: 65px;
        font-size: 1.85rem;
        margin: 0 auto 14px;
    }

    .row.g-4 .stat-card-content {
        padding: 0;
    }

    .row.g-4 .stat-card .stat-value {
        font-size: 1.75rem;
    }

    .row.g-4 .stat-card .stat-label {
        font-size: 12px;
    }

    .row.g-4 .stat-trend {
        justify-content: center;
        font-size: 12px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .quick-action-btn {
        padding: 18px 10px;
        font-size: 11px;
        border-radius: 14px;
    }

    .quick-action-btn i {
        font-size: 1.6rem;
    }

    .sub-stat-value {
        font-size: 1.35rem;
    }

    .sub-stat-label {
        font-size: 10px;
    }

    .card-body .stat-card {
        padding: 18px 14px;
        border-radius: 14px;
    }

    .card-body .stat-card .stat-icon {
        font-size: 1.6rem;
    }

    .card-body .stat-card .stat-value {
        font-size: 1.35rem;
    }

    .card-body .stat-card .stat-label {
        font-size: 10px;
    }

    .chart-card,
    .activity-card,
    .subscription-card,
    .revenue-card,
    .system-health-card {
        border-radius: 18px;
    }

    .chart-card .card-header,
    .activity-card .card-header,
    .subscription-card .card-header,
    .revenue-card .card-header,
    .system-health-card .card-header {
        border-radius: 18px 18px 0 0;
        padding: 14px 16px;
    }

    .chart-card .card-header h5,
    .activity-card .card-header h5,
    .subscription-card .card-header h5,
    .revenue-card .card-header h5,
    .system-health-card .card-header h5 {
        font-size: 15px;
    }

    .chart-card .card-body,
    .activity-card .card-body,
    .subscription-card .card-body,
    .revenue-card .card-body,
    .system-health-card .card-body {
        padding: 16px 14px;
    }

    .timeline-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .timeline-item:not(:last-child)::after {
        left: 19px;
    }

    .timeline-title {
        font-size: 13px;
    }

    .timeline-desc {
        font-size: 12px;
    }

    .status-item {
        padding: 10px 12px;
    }

    .status-label {
        font-size: 12px;
    }

    .status-count {
        font-size: 13px;
    }
}

.sub-stat-value {
    font-size: 1.5rem;
}

.sub-stat-label {
    font-size: 11px;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.stat-card {
    animation: fadeInUp 0.6s ease forwards;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.4s;
}

.timeline-item {
    animation: slideInRight 0.5s ease forwards;
}

.timeline-item:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.3s;
}

.timeline-item:nth-child(4) {
    animation-delay: 0.4s;
}

/* Print Styles */
@media print {

    .sidebar,
    .header,
    .quick-actions-container,
    .fab {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .stat-card,
    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }
}


/* ========================================
   STATISTICS PAGE SPECIFIC STYLES
   ======================================== */

/* Statistics Page Stat Cards - Compact Style */
.card-body .stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

.card-body .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.card-body .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.card-body .stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.card-body .stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1;
}

.card-body .stat-card .stat-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Statistics Card Headers */
.card .card-header h5,
.card .card-header h6 {
    color: white !important;
    font-weight: 600;
}

.card .card-header i {
    color: white !important;
}

/* Statistics Page - Users by Plan / Message Activity Boxes */
.card-body .bg-light {
    background: #f8fafc !important;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.card-body .bg-light:hover {
    background: #e0f2fe !important;
    border-color: #bae6fd;
    transform: translateX(4px);
}

/* Statistics Page - Border Bottom Items */
.card-body .border-bottom {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb !important;
    transition: all 0.2s ease;
}

.card-body .border-bottom:hover {
    background: #f8fafc;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 6px;
}

/* Purple Color Utility */
.text-purple {
    color: #764ba2 !important;
}

.bg-purple {
    background-color: #764ba2 !important;
}

/* Statistics Page Responsive */
@media (max-width: 991px) {
    .card-body .stat-card {
        min-height: 100px;
        padding: 16px;
    }

    .card-body .stat-card .stat-icon {
        font-size: 1.75rem;
        margin-bottom: 10px;
    }

    .card-body .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    .card-body .stat-card {
        min-height: 90px;
        padding: 14px;
    }

    .card-body .stat-card .stat-icon {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .card-body .stat-card .stat-value {
        font-size: 1.25rem;
    }

    .card-body .stat-card .stat-label {
        font-size: 11px;
    }
}


/* ========================================
   MOBILE APP ENHANCEMENTS
   ======================================== */

/* Mobile: Smooth Scrolling */
@media (max-width: 767px) {
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    /* Mobile: Better Touch Targets */
    .btn,
    .quick-action-btn,
    .nav-link,
    .dropdown-toggle {
        min-height: 44px;
        min-width: 44px;
    }

    /* Mobile: Sidebar Full Screen */
    .sidebar.show {
        width: 100%;
        box-shadow: none;
    }

    /* Mobile: Hide Sidebar Collapse State */
    .sidebar.collapsed {
        width: 0;
        transform: translateX(-100%);
    }

    /* Mobile: Better Form Controls */
    .form-control,
    .form-select {
        font-size: 16px;
        /* Prevents zoom on iOS */
        padding: 12px 14px;
        border-radius: 12px;
    }

    /* Mobile: Better Modals */
    .modal-content {
        border-radius: 20px 20px 0 0;
        margin: 0;
    }

    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
        display: flex;
        align-items: flex-end;
    }

    .modal-header {
        border-radius: 20px 20px 0 0;
        padding: 18px 20px;
    }

    .modal-body {
        padding: 20px;
        max-height: 70vh;
        overflow-y: auto;
    }

    .modal-footer {
        padding: 16px 20px;
    }

    /* Mobile: Better Tables */
    .table-responsive {
        border-radius: 16px;
        overflow: hidden;
    }

    /* Mobile: Better Badges */
    .badge {
        font-size: 11px;
        padding: 5px 10px;
        border-radius: 12px;
    }

    /* Mobile: Better Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .page-link {
        min-width: 38px;
        height: 38px;
        font-size: 13px;
        border-radius: 10px;
    }

    /* Mobile: Better Dropdowns */
    .dropdown-menu {
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        padding: 10px;
        margin-top: 10px;
        min-width: 200px;
    }

    .dropdown-item {
        border-radius: 10px;
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Mobile: User Dropdown */
    .user-dropdown .dropdown-toggle {
        padding: 8px 14px;
        border-radius: 12px;
        font-size: 14px;
    }

    /* Mobile: Better Progress Bars */
    .progress {
        height: 8px;
        border-radius: 10px;
        overflow: hidden;
    }

    .progress-bar {
        border-radius: 10px;
    }

    /* Mobile: Floating Action Button */
    .fab {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
        box-shadow: 0 6px 20px rgba(0, 113, 188, 0.4);
    }

    /* Mobile: Better Breadcrumbs */
    .breadcrumb-item {
        font-size: 12px;
    }

    .breadcrumb-item+.breadcrumb-item::before {
        font-size: 12px;
    }

    /* Mobile: Card Spacing */
    .row.g-4 {
        row-gap: 14px !important;
    }

    /* Mobile: Better Alerts */
    .alert i {
        font-size: 16px;
    }

    /* Mobile: Better List Groups */
    .list-group-item {
        border-radius: 12px;
        margin-bottom: 8px;
        border: 1px solid #e5e7eb;
    }

    /* Mobile: Better Input Groups */
    .input-group {
        border-radius: 12px;
        overflow: hidden;
    }

    .input-group .form-control,
    .input-group .btn {
        border-radius: 0;
    }

    .input-group .form-control:first-child {
        border-radius: 12px 0 0 12px;
    }

    .input-group .btn:last-child {
        border-radius: 0 12px 12px 0;
    }

    /* Mobile: Prevent Text Selection on Buttons */
    .btn,
    .quick-action-btn,
    .nav-link {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    /* Mobile: Better Focus States */
    .btn:focus,
    .form-control:focus,
    .form-select:focus {
        box-shadow: 0 0 0 3px rgba(0, 113, 188, 0.15);
    }

    /* Mobile: Smooth Transitions */
    .stat-card,
    .quick-action-btn,
    .card,
    .btn {
        transition: all 0.2s ease;
    }

    /* Mobile: Better Active States */
    .btn:active,
    .quick-action-btn:active {
        transform: scale(0.96);
    }

    /* Mobile: Hide Unnecessary Elements */
    .d-none-mobile {
        display: none !important;
    }

    /* Mobile: Full Width Buttons */
    .btn-block-mobile {
        display: block;
        width: 100%;
    }
}

/* Mobile Landscape Optimization */
@media (max-width: 896px) and (orientation: landscape) {
    .content-area {
        padding: 12px;
    }

    .row.g-4 .stat-card {
        padding: 16px 14px;
    }

    .row.g-4 .stat-card-icon {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
        margin: 0 auto 10px;
    }

    .row.g-4 .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .row.g-4 .stat-card .stat-label {
        font-size: 11px;
    }
}