/* ═══════════════════════════════════════════════════════════════════════════
   GYM MANAGEMENT SYSTEM - COMPREHENSIVE RESPONSIVE STYLES
   Mobile-First Design: 280px → 4K Ultra-Wide
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── CSS Custom Properties for Responsive Design ─── */
:root {
    --sidebar-width: 280px;
    --sidebar-collapsed: 70px;
    --topbar-height: 64px;
    --mobile-topbar-height: 56px;
    --touch-target-min: 44px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* ─── Fluid Typography using clamp() ─── */
html {
    font-size: clamp(14px, 2vw + 10px, 18px);
}

h1 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 3vw, 2rem); }
h3 { font-size: clamp(1rem, 2.5vw, 1.5rem); }
h4 { font-size: clamp(0.9rem, 2vw, 1.25rem); }

/* ─── Base Responsive Resets ─── */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

img, video, canvas, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   EXTRA SMALL DEVICES (280px - 359px) - Smallest Mobile Screens
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 359px) {
    html { font-size: 13px; }
    
    /* Sidebar - Off-canvas */
    .sidebar {
        width: 100%;
        max-width: 280px;
        transform: translateX(100%);
    }
    [dir="ltr"] .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    
    .main-content {
        margin-right: 0 !important;
        margin-left: 0 !important;
        width: 100%;
    }
    
    /* Topbar */
    .topbar {
        padding: 8px 10px;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .topbar-right h2 {
        font-size: 0.85rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .topbar-right h2 i { display: none; }
    
    .toggle-sidebar-btn,
    .theme-toggle,
    .notif-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    
    .lang-switch {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    .lang-switch span { display: none; }
    
    /* Page Content */
    .page-content {
        padding: 10px;
    }
    
    /* Cards Grid - Single Column */
    .cards-grid,
    .stats-grid,
    .stats-row,
    .finance-row {
        grid-template-columns: 1fr !important;
        gap: 10px;
    }
    
    /* Stat Cards */
    .stat-card,
    .stat-card-new,
    .stat-box,
    .finance-card {
        padding: 12px;
    }
    
    .stat-card-value,
    .stat-value,
    .stat-box-value {
        font-size: 1.3rem;
    }
    
    .stat-icon,
    .stat-card-icon,
    .stat-box-icon,
    .finance-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* Hero Section */
    .admin-hero,
    .hero-section {
        min-height: 180px;
    }
    
    .hero-inner,
    .hero-content {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        min-height: 180px;
    }
    
    .hero-text h1,
    .hero-welcome h1 {
        font-size: 1.2rem;
    }
    
    .hero-quick-stats,
    .hero-stats {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .quick-stat,
    .hero-stat {
        padding: 12px 16px;
        width: 100%;
        justify-content: center;
    }
    
    .quick-stat strong,
    .hero-stat-value {
        font-size: 1.3rem;
    }
    
    /* Quick Actions */
    .actions-wrapper,
    .actions-grid,
    .quick-actions {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
    
    .action-btn,
    .action-item {
        padding: 12px 8px;
        font-size: 0.7rem;
    }
    
    .action-btn i,
    .action-item i {
        font-size: 18px;
    }
    
    /* Dashboard Grid */
    .dashboard-grid-3,
    .dashboard-main {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    /* Tables */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
    }
    
    .table-wrapper table {
        min-width: 500px;
        font-size: 0.75rem;
    }
    
    .table-wrapper th,
    .table-wrapper td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    /* Forms */
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn {
        padding: 10px 14px;
        font-size: 0.8rem;
        min-height: var(--touch-target-min);
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* Filters */
    .filters-bar {
        flex-direction: column;
        gap: 8px;
    }
    
    .filters-bar .form-control {
        width: 100% !important;
        max-width: none !important;
    }
    
    /* Notifications Dropdown */
    .notif-dropdown,
    .notif-dropdown.enhanced {
        width: calc(100vw - 20px) !important;
        max-width: 300px;
        right: 10px !important;
        left: auto !important;
    }
    
    [dir="ltr"] .notif-dropdown {
        left: 10px !important;
        right: auto !important;
    }
    
    /* Pagination */
    .pagination {
        gap: 4px;
    }
    
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    /* Content Cards */
    .content-card-header {
        padding: 12px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .content-card-body {
        padding: 12px;
    }
    
    /* List Items */
    .list-row,
    .list-item,
    .attendance-item {
        padding: 10px;
        gap: 8px;
    }
    
    .list-avatar,
    .attendance-avatar {
        width: 32px;
        height: 32px;
    }
    
    /* Badges */
    .badge {
        padding: 3px 8px;
        font-size: 0.65rem;
    }
    
    /* Admin Badge */
    .admin-badge,
    .welcome-badge {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SMALL MOBILE DEVICES (360px - 424px) - Standard Small Phones
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (min-width: 360px) and (max-width: 424px) {
    html { font-size: 14px; }
    
    /* Sidebar */
    .sidebar {
        width: 280px;
        transform: translateX(100%);
    }
    [dir="ltr"] .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    
    .main-content {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
    
    /* Topbar */
    .topbar {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .topbar-right h2 {
        font-size: 0.9rem;
        max-width: 140px;
    }
    
    /* Page Content */
    .page-content {
        padding: 12px;
    }
    
    /* Cards */
    .cards-grid,
    .stats-grid,
    .stats-row,
    .finance-row {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    .stat-card,
    .stat-card-new,
    .stat-box {
        padding: 14px;
    }
    
    .stat-card-value,
    .stat-value,
    .stat-box-value {
        font-size: 1.4rem;
    }
    
    /* Hero */
    .admin-hero,
    .hero-section {
        min-height: 200px;
    }
    
    .hero-inner,
    .hero-content {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text h1,
    .hero-welcome h1 {
        font-size: 1.3rem;
    }
    
    .hero-quick-stats,
    .hero-stats {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    /* Quick Actions */
    .actions-wrapper,
    .actions-grid,
    .quick-actions {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
    
    .action-btn,
    .action-item {
        padding: 14px 10px;
        font-size: 0.75rem;
    }
    
    /* Dashboard Grid */
    .dashboard-grid-3,
    .dashboard-main {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }
    
    /* Tables */
    .table-wrapper table {
        min-width: 550px;
        font-size: 0.8rem;
    }
    
    /* Forms */
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    /* Notifications */
    .notif-dropdown {
        width: calc(100vw - 24px) !important;
        max-width: 320px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   STANDARD MOBILE DEVICES (425px - 575px) - Regular Phones
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (min-width: 425px) and (max-width: 575px) {
    html { font-size: 15px; }
    
    /* Sidebar */
    .sidebar {
        width: 280px;
        transform: translateX(100%);
    }
    [dir="ltr"] .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    
    .main-content {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
    
    /* Topbar */
    .topbar {
        padding: 12px 16px;
    }
    
    .topbar-right h2 {
        font-size: 1rem;
        max-width: 180px;
    }
    
    /* Page Content */
    .page-content {
        padding: 14px;
    }
    
    /* Cards */
    .cards-grid,
    .stats-grid,
    .stats-row {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }
    
    .finance-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    
    .stat-card-value,
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* Hero */
    .admin-hero,
    .hero-section {
        min-height: 220px;
    }
    
    .hero-inner,
    .hero-content {
        padding: 24px;
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text h1,
    .hero-welcome h1 {
        font-size: 1.4rem;
    }
    
    .hero-quick-stats,
    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    .quick-stat,
    .hero-stat {
        flex: 1 1 45%;
        min-width: 140px;
    }
    
    /* Quick Actions */
    .actions-wrapper,
    .actions-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Dashboard Grid */
    .dashboard-grid-3,
    .dashboard-main {
        grid-template-columns: 1fr !important;
    }
    
    /* Tables */
    .table-wrapper table {
        min-width: 600px;
    }
    
    /* Forms */
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        flex: 1 1 auto;
        min-width: 120px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LARGE MOBILE / SMALL TABLETS (576px - 767px) - Phablets
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (min-width: 576px) and (max-width: 767px) {
    html { font-size: 15px; }
    
    /* Sidebar - Still off-canvas */
    .sidebar {
        width: 280px;
        transform: translateX(100%);
    }
    [dir="ltr"] .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    
    .main-content {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
    
    /* Topbar */
    .topbar {
        padding: 12px 20px;
    }
    
    .topbar-right h2 {
        font-size: 1.05rem;
    }
    
    /* Page Content */
    .page-content {
        padding: 16px;
    }
    
    /* Cards */
    .cards-grid,
    .stats-grid,
    .stats-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px;
    }
    
    .finance-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Hero */
    .admin-hero,
    .hero-section {
        min-height: 240px;
    }
    
    .hero-inner,
    .hero-content {
        padding: 28px;
        flex-direction: column;
        text-align: center;
    }
    
    .hero-text h1,
    .hero-welcome h1 {
        font-size: 1.6rem;
    }
    
    .hero-quick-stats,
    .hero-stats {
        flex-direction: row;
        gap: 16px;
    }
    
    /* Quick Actions */
    .actions-wrapper {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .actions-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .quick-actions {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    /* Dashboard Grid */
    .dashboard-grid-3 {
        grid-template-columns: 1fr !important;
    }
    
    .dashboard-main {
        grid-template-columns: 1fr !important;
    }
    
    /* Tables */
    .table-wrapper table {
        min-width: 650px;
    }
    
    /* Forms */
    .form-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLETS PORTRAIT (768px - 991px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (min-width: 768px) and (max-width: 991px) {
    html { font-size: 15px; }
    
    /* Sidebar - Minimized/Icon-based */
    .sidebar {
        width: var(--sidebar-collapsed);
        transform: translateX(0);
    }
    
    .sidebar .sidebar-text,
    .sidebar .admin-info p,
    .sidebar .admin-info small,
    .sidebar .gym-logo h1 {
        display: none;
    }
    
    .sidebar .gym-logo { justify-content: center; }
    .sidebar .admin-avatar { margin: 0 auto; }
    .sidebar .sidebar-nav a { justify-content: center; padding: 14px; }
    .sidebar .sidebar-nav a i { margin: 0; font-size: 20px; }
    .sidebar .sidebar-footer a { justify-content: center; }
    .sidebar .sidebar-accordion { justify-content: center; padding: 12px; }
    .sidebar .accordion-label span { display: none; }
    .sidebar .accordion-caret { display: none; }
    
    .sidebar.open {
        width: var(--sidebar-width);
    }
    
    .sidebar.open .sidebar-text,
    .sidebar.open .admin-info p,
    .sidebar.open .admin-info small,
    .sidebar.open .gym-logo h1 {
        display: block;
    }
    
    .sidebar.open .sidebar-nav a { justify-content: flex-start; }
    .sidebar.open .sidebar-accordion { justify-content: space-between; }
    .sidebar.open .accordion-label span { display: inline; }
    .sidebar.open .accordion-caret { display: block; }
    
    .main-content {
        margin-right: var(--sidebar-collapsed) !important;
        margin-left: 0 !important;
    }
    
    [dir="ltr"] .main-content {
        margin-left: var(--sidebar-collapsed) !important;
        margin-right: 0 !important;
    }
    
    /* Topbar */
    .topbar {
        padding: 12px 20px;
    }
    
    /* Page Content */
    .page-content {
        padding: 20px;
    }
    
    /* Cards */
    .cards-grid,
    .stats-grid,
    .stats-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px;
    }
    
    .finance-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Hero */
    .admin-hero,
    .hero-section {
        min-height: 260px;
    }
    
    .hero-inner,
    .hero-content {
        padding: 32px;
        flex-direction: row;
        text-align: right;
    }
    
    [dir="ltr"] .hero-inner,
    [dir="ltr"] .hero-content {
        text-align: left;
    }
    
    .hero-text h1,
    .hero-welcome h1 {
        font-size: 1.8rem;
    }
    
    /* Quick Actions */
    .actions-wrapper {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .actions-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .quick-actions {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    /* Dashboard Grid */
    .dashboard-grid-3 {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .dashboard-grid-3 .chart-card {
        grid-column: 1 / -1;
    }
    
    .dashboard-main {
        grid-template-columns: 1fr 1fr !important;
    }
    
    /* Tables */
    .table-wrapper table {
        min-width: auto;
    }
    
    /* Forms */
    .form-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLETS LANDSCAPE / SMALL LAPTOPS (992px - 1199px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (min-width: 992px) and (max-width: 1199px) {
    html { font-size: 16px; }
    
    /* Sidebar - Full visible but can collapse */
    .sidebar {
        width: var(--sidebar-width);
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        width: var(--sidebar-collapsed);
    }
    
    .main-content {
        margin-right: var(--sidebar-width);
    }
    
    [dir="ltr"] .main-content {
        margin-left: var(--sidebar-width);
        margin-right: 0;
    }
    
    .sidebar.collapsed ~ .main-content,
    .main-content.expanded {
        margin-right: var(--sidebar-collapsed);
    }
    
    [dir="ltr"] .sidebar.collapsed ~ .main-content,
    [dir="ltr"] .main-content.expanded {
        margin-left: var(--sidebar-collapsed);
        margin-right: 0;
    }
    
    /* Page Content */
    .page-content {
        padding: 22px;
    }
    
    /* Cards */
    .cards-grid,
    .stats-grid,
    .stats-row {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .finance-row {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    /* Hero */
    .hero-inner,
    .hero-content {
        padding: 36px;
    }
    
    .hero-text h1,
    .hero-welcome h1 {
        font-size: 2rem;
    }
    
    /* Quick Actions */
    .actions-wrapper {
        grid-template-columns: repeat(6, 1fr) !important;
    }
    
    .quick-actions {
        grid-template-columns: repeat(5, 1fr) !important;
    }
    
    /* Dashboard Grid */
    .dashboard-grid-3 {
        grid-template-columns: 1fr 1fr 1fr !important;
    }
    
    .dashboard-main {
        grid-template-columns: 1.2fr 0.8fr !important;
    }
    
    /* Forms */
    .form-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LAPTOPS / DESKTOPS (1200px - 1365px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (min-width: 1200px) and (max-width: 1365px) {
    html { font-size: 16px; }
    
    /* Sidebar - Full */
    .sidebar {
        width: var(--sidebar-width);
    }
    
    .main-content {
        margin-right: var(--sidebar-width);
    }
    
    [dir="ltr"] .main-content {
        margin-left: var(--sidebar-width);
        margin-right: 0;
    }
    
    /* Page Content */
    .page-content {
        padding: 24px;
    }
    
    /* Cards */
    .cards-grid,
    .stats-grid,
    .stats-row {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .finance-row {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    /* Quick Actions */
    .actions-wrapper {
        grid-template-columns: repeat(8, 1fr) !important;
    }
    
    .quick-actions {
        grid-template-columns: repeat(5, 1fr) !important;
    }
    
    /* Dashboard Grid */
    .dashboard-grid-3 {
        grid-template-columns: 1.2fr 0.9fr 0.9fr !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LARGE DESKTOPS (1366px - 1439px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (min-width: 1366px) and (max-width: 1439px) {
    html { font-size: 16px; }
    
    .page-content {
        padding: 24px;
        max-width: 1400px;
        margin: 0 auto;
    }
    
    /* Cards */
    .cards-grid,
    .stats-grid,
    .stats-row {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    /* Quick Actions */
    .actions-wrapper {
        grid-template-columns: repeat(8, 1fr) !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FULL HD DESKTOPS (1440px - 1919px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (min-width: 1440px) and (max-width: 1919px) {
    html { font-size: 16px; }
    
    .page-content {
        padding: 28px;
        max-width: 1600px;
        margin: 0 auto;
    }
    
    /* Cards */
    .cards-grid,
    .stats-grid,
    .stats-row {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 20px;
    }
    
    /* Hero */
    .hero-inner,
    .hero-content {
        padding: 40px;
    }
    
    .hero-text h1,
    .hero-welcome h1 {
        font-size: 2.2rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FULL HD+ DESKTOPS (1920px - 2559px)
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (min-width: 1920px) and (max-width: 2559px) {
    html { font-size: 17px; }
    
    .page-content {
        padding: 32px;
        max-width: 1800px;
        margin: 0 auto;
    }
    
    /* Cards */
    .cards-grid,
    .stats-grid,
    .stats-row {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 24px;
    }
    
    .stat-card,
    .stat-card-new,
    .stat-box {
        padding: 28px;
    }
    
    .stat-card-value,
    .stat-value,
    .stat-box-value {
        font-size: 2.2rem;
    }
    
    /* Hero */
    .admin-hero,
    .hero-section {
        min-height: 280px;
    }
    
    .hero-inner,
    .hero-content {
        padding: 48px;
    }
    
    .hero-text h1,
    .hero-welcome h1 {
        font-size: 2.4rem;
    }
    
    /* Quick Actions */
    .actions-wrapper {
        grid-template-columns: repeat(8, 1fr) !important;
        gap: 16px;
    }
    
    .action-btn,
    .action-item {
        padding: 24px 16px;
    }
    
    /* Dashboard Grid */
    .dashboard-grid-3 {
        gap: 24px;
    }
    
    /* Tables */
    .table-wrapper th,
    .table-wrapper td {
        padding: 16px 20px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   4K / ULTRA-WIDE SCREENS (2560px+)
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (min-width: 2560px) {
    html { font-size: 18px; }
    
    :root {
        --sidebar-width: 320px;
    }
    
    .page-content {
        padding: 40px;
        max-width: 2200px;
        margin: 0 auto;
    }
    
    /* Cards */
    .cards-grid,
    .stats-grid,
    .stats-row {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 28px;
    }
    
    .stat-card,
    .stat-card-new,
    .stat-box {
        padding: 32px;
        border-radius: 16px;
    }
    
    .stat-card-value,
    .stat-value,
    .stat-box-value {
        font-size: 2.5rem;
    }
    
    .stat-icon,
    .stat-card-icon,
    .stat-box-icon {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
    
    /* Hero */
    .admin-hero,
    .hero-section {
        min-height: 320px;
        border-radius: 20px;
    }
    
    .hero-inner,
    .hero-content {
        padding: 56px;
        min-height: 320px;
    }
    
    .hero-text h1,
    .hero-welcome h1 {
        font-size: 2.8rem;
    }
    
    .quick-stat,
    .hero-stat {
        padding: 24px 36px;
    }
    
    .quick-stat strong,
    .hero-stat-value {
        font-size: 2rem;
    }
    
    /* Quick Actions */
    .actions-wrapper {
        grid-template-columns: repeat(8, 1fr) !important;
        gap: 20px;
    }
    
    .action-btn,
    .action-item {
        padding: 28px 20px;
        border-radius: 14px;
    }
    
    .action-btn i,
    .action-item i {
        font-size: 28px;
    }
    
    /* Dashboard Grid */
    .dashboard-grid-3 {
        gap: 28px;
    }
    
    .dashboard-card,
    .dash-card,
    .content-card {
        border-radius: 16px;
    }
    
    /* Tables */
    .table-wrapper {
        border-radius: 16px;
    }
    
    .table-wrapper th,
    .table-wrapper td {
        padding: 18px 24px;
        font-size: 1rem;
    }
    
    /* Forms */
    .form-control {
        padding: 16px 20px;
        border-radius: 12px;
    }
    
    .btn {
        padding: 14px 24px;
        border-radius: 12px;
    }
    
    /* Sidebar */
    .sidebar {
        border-radius: 0 20px 20px 0;
    }
    
    [dir="ltr"] .sidebar {
        border-radius: 20px 0 0 20px;
    }
    
    .sidebar-nav a {
        padding: 14px 20px;
        border-radius: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOUCH DEVICE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn,
    .toggle-sidebar-btn,
    .theme-toggle,
    .notif-btn,
    .lang-switch,
    .sidebar-nav a,
    .action-btn,
    .action-item,
    .pagination a {
        min-height: var(--touch-target-min);
        min-width: var(--touch-target-min);
    }
    
    /* Remove hover effects on touch devices */
    .stat-card:hover,
    .stat-card-new:hover,
    .stat-box:hover,
    .action-btn:hover,
    .action-item:hover,
    .btn:hover {
        transform: none;
    }
    
    /* Add active states instead */
    .btn:active,
    .action-btn:active,
    .action-item:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    /* Larger form controls */
    .form-control {
        min-height: 48px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    select.form-control {
        min-height: 48px;
    }
    
    /* Better scrolling */
    .table-wrapper,
    .sidebar-nav,
    .card-list,
    .notifications-list {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Disable text selection on interactive elements */
    .btn,
    .sidebar-nav a,
    .action-btn {
        -webkit-user-select: none;
        user-select: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR RESPONSIVE BEHAVIOR
   ═══════════════════════════════════════════════════════════════════════════ */

/* Mobile: Off-canvas sidebar */
@media screen and (max-width: 767px) {
    .sidebar {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        transform: translateX(100%);
        z-index: 1100;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    [dir="ltr"] .sidebar {
        right: auto;
        left: 0;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .main-content {
        margin-right: 0 !important;
        margin-left: 0 !important;
        width: 100%;
    }
    
    .toggle-sidebar-btn {
        display: flex !important;
    }
}

/* Tablet: Minimized sidebar */
@media screen and (min-width: 768px) and (max-width: 991px) {
    .sidebar-overlay {
        display: none;
    }
    
    .toggle-sidebar-btn {
        display: flex !important;
    }
}

/* Desktop: Full sidebar */
@media screen and (min-width: 992px) {
    .sidebar-overlay {
        display: none;
    }
    
    .toggle-sidebar-btn {
        display: flex;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLE RESPONSIVE PATTERNS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Scrollable tables on small screens */
@media screen and (max-width: 767px) {
    .table-wrapper {
        position: relative;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding: 0 12px;
    }
    
    .table-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, transparent, var(--bg-card));
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .table-wrapper.scrollable::after {
        opacity: 1;
    }
    
    .table-wrapper table {
        min-width: 600px;
    }
    
    /* Compact table cells */
    .table-wrapper th,
    .table-wrapper td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    /* Hide less important columns on mobile */
    .table-wrapper .hide-mobile {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORM RESPONSIVE PATTERNS
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    .form-group.full-width {
        grid-column: 1;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-group .btn {
        width: 100%;
        justify-content: center;
    }
    
    .filters-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .filters-bar .form-control,
    .filters-bar select {
        width: 100% !important;
        max-width: none !important;
    }
}

@media screen and (min-width: 576px) and (max-width: 991px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 992px) {
    .form-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODAL & DROPDOWN RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .notif-dropdown,
    .notif-dropdown.enhanced {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        max-height: 70vh !important;
        border-radius: 20px 20px 0 0 !important;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    
    .notif-dropdown.open {
        transform: translateY(0);
    }
    
    .notif-header {
        padding: 20px;
        border-radius: 20px 20px 0 0;
    }
    
    .notif-body {
        max-height: calc(70vh - 140px);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHART RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
.chart-container,
.chart-card .chart-container {
    position: relative;
    width: 100%;
    min-height: 200px;
}

@media screen and (max-width: 575px) {
    .chart-container,
    .chart-card .chart-container {
        height: 200px !important;
        min-height: 200px;
    }
}

@media screen and (min-width: 576px) and (max-width: 991px) {
    .chart-container,
    .chart-card .chart-container {
        height: 250px !important;
    }
}

@media screen and (min-width: 992px) {
    .chart-container,
    .chart-card .chart-container {
        height: 280px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINATION RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }
    
    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 0.8rem;
        min-width: 36px;
        text-align: center;
    }
    
    /* Hide page numbers, show only prev/next on very small screens */
    .pagination a:not(:first-child):not(:last-child):not(.active) {
        display: none;
    }
}

@media screen and (min-width: 576px) {
    .pagination a,
    .pagination span {
        padding: 10px 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ALERT RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .alert {
        padding: 12px 14px;
        font-size: 0.85rem;
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }
    
    .alert i {
        flex-shrink: 0;
        margin-top: 2px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EMPTY STATE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .empty-state {
        padding: 40px 16px;
    }
    
    .empty-state i {
        font-size: 48px;
    }
    
    .empty-state h4 {
        font-size: 1rem;
    }
    
    .empty-mini {
        padding: 24px 12px;
        font-size: 0.85rem;
    }
    
    .empty-mini i {
        font-size: 32px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENT CARD RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .content-card {
        border-radius: 12px;
    }
    
    .content-card-header {
        padding: 14px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .content-card-header h3 {
        font-size: 0.95rem;
        width: 100%;
    }
    
    .content-card-body {
        padding: 16px;
    }
    
    .card-head {
        padding: 14px 16px;
    }
    
    .card-head h3 {
        font-size: 0.95rem;
    }
    
    .card-body {
        padding: 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIST ITEMS RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .list-row,
    .list-item,
    .attendance-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .list-info,
    .attendance-info {
        flex: 1 1 calc(100% - 60px);
        min-width: 0;
    }
    
    .list-info strong,
    .attendance-info strong {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .list-action,
    .list-time,
    .attendance-time {
        font-size: 0.75rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAYMENTS TABLE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 767px) {
    .payments-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .payments-table table {
        min-width: 500px;
    }
    
    .pay-type {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RECEIPT PAGE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .receipt-container {
        padding: 16px;
        margin: 10px;
    }
    
    .receipt-header h1 {
        font-size: 1.3rem;
    }
    
    .receipt-details {
        font-size: 0.85rem;
    }
    
    .receipt-table th,
    .receipt-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MEMBER PROFILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 767px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .profile-avatar {
        margin: 0 auto;
    }
    
    .profile-info {
        text-align: center;
    }
    
    .profile-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .profile-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE RESPONSIVE ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 359px) {
    .login-container {
        padding: 10px;
    }
    
    .login-box {
        padding: 20px 16px;
        border-radius: 16px;
    }
    
    .logo i {
        font-size: 2.5rem;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .login-header p {
        font-size: 0.8rem;
    }
    
    .form-group input {
        padding: 12px 14px;
    }
    
    .login-btn {
        padding: 14px;
        font-size: 1rem;
    }
    
    .top-actions {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .brand {
        font-size: 1.1rem;
    }
    
    .brand i {
        font-size: 1.3rem;
    }
}

@media screen and (min-width: 360px) and (max-width: 479px) {
    .login-container {
        padding: 15px;
    }
    
    .login-box {
        padding: 25px 20px;
    }
    
    .top-actions {
        flex-direction: column;
        gap: 15px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATION TOASTS RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .notification-toasts {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        padding: 12px;
        border-radius: 12px;
    }
    
    .toast-icon {
        width: 28px;
        height: 28px;
    }
    
    .toast-title {
        font-size: 0.85rem;
    }
    
    .toast-body {
        font-size: 0.8rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT STYLES - RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media print {
    /* Hide non-essential elements */
    .sidebar,
    .sidebar-overlay,
    .topbar,
    .toggle-sidebar-btn,
    .theme-toggle,
    .lang-switch,
    .notif-btn,
    .notifications,
    .btn,
    .btn-group,
    .quick-actions,
    .actions-wrapper,
    .filters-bar,
    .pagination {
        display: none !important;
    }
    
    /* Reset layout */
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .page-content {
        padding: 0 !important;
        max-width: none !important;
    }
    
    /* Ensure tables print properly */
    .table-wrapper {
        overflow: visible !important;
    }
    
    .table-wrapper table {
        min-width: auto !important;
        width: 100% !important;
    }
    
    /* Cards print styling */
    .stat-card,
    .content-card,
    .dash-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    /* Force colors for print */
    * {
        color: #000 !important;
        background: #fff !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LANDSCAPE ORIENTATION FIXES
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero-section,
    .admin-hero {
        min-height: 150px;
    }
    
    .hero-inner,
    .hero-content {
        min-height: 150px;
        padding: 16px 24px;
    }
    
    .hero-text h1,
    .hero-welcome h1 {
        font-size: 1.3rem;
        margin: 8px 0;
    }
    
    .hero-quick-stats,
    .hero-stats {
        gap: 12px;
    }
    
    .quick-stat,
    .hero-stat {
        padding: 10px 16px;
    }
    
    .quick-stat strong,
    .hero-stat-value {
        font-size: 1.2rem;
    }
    
    .sidebar {
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .notif-dropdown {
        max-height: 80vh;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HIGH CONTRAST / ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-contrast: high) {
    :root {
        --border-color: #555;
        --text-muted: #999;
    }
    
    .btn,
    .form-control,
    .sidebar-nav a,
    .stat-card,
    .content-card {
        border-width: 2px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .sidebar,
    .notif-dropdown,
    .sidebar-overlay {
        transition: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES FOR RESPONSIVE VISIBILITY
   ═══════════════════════════════════════════════════════════════════════════ */
.hide-xs { display: none !important; }
.hide-sm { display: none !important; }
.hide-md { display: none !important; }
.hide-lg { display: none !important; }
.hide-xl { display: none !important; }

@media screen and (min-width: 360px) { .hide-xs { display: initial !important; } .show-xs { display: none !important; } }
@media screen and (min-width: 576px) { .hide-sm { display: initial !important; } .show-sm { display: none !important; } }
@media screen and (min-width: 768px) { .hide-md { display: initial !important; } .show-md { display: none !important; } }
@media screen and (min-width: 992px) { .hide-lg { display: initial !important; } .show-lg { display: none !important; } }
@media screen and (min-width: 1200px) { .hide-xl { display: initial !important; } .show-xl { display: none !important; } }

/* Mobile only */
@media screen and (max-width: 767px) { .hide-mobile { display: none !important; } }
@media screen and (min-width: 768px) { .show-mobile { display: none !important; } }

/* Desktop only */
@media screen and (max-width: 991px) { .hide-tablet { display: none !important; } }
@media screen and (min-width: 992px) { .show-tablet { display: none !important; } }

/* Text alignment responsive */
@media screen and (max-width: 575px) {
    .text-center-xs { text-align: center !important; }
}

@media screen and (max-width: 767px) {
    .text-center-mobile { text-align: center !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MEMBER PROFILE PAGE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 767px) {
    /* Profile header */
    .content-card-body > div[style*="display: flex"][style*="gap: 24px"] {
        flex-direction: column !important;
        text-align: center;
        gap: 16px !important;
    }
    
    .content-card-body > div[style*="display: flex"] > div[style*="width: 100px"] {
        margin: 0 auto;
    }
    
    .content-card-body > div[style*="display: flex"] > div[style*="flex: 1"] {
        text-align: center;
    }
    
    .content-card-body > div[style*="display: flex"] > div[style*="flex: 1"] > div[style*="display: flex"] {
        justify-content: center;
    }
    
    /* Tab buttons */
    .content-card-header .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .content-card-header .btn-group .btn,
    .content-card-header .btn-group .tab-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH RESULTS RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .search-results {
        max-height: 250px;
    }
    
    .search-result-item {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RECEIPT PAGE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .receipt-container {
        padding: 16px !important;
        margin: 10px !important;
    }
    
    .receipt-header h1 {
        font-size: 1.3rem !important;
    }
    
    .receipt-details {
        font-size: 0.85rem !important;
    }
    
    .receipt-table th,
    .receipt-table td {
        padding: 8px 6px !important;
        font-size: 0.8rem !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEND REMINDERS PAGE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 767px) {
    .reminder-card,
    .whatsapp-card {
        padding: 16px;
    }
    
    .reminder-stats {
        flex-direction: column;
        gap: 12px;
    }
    
    .reminder-stat {
        width: 100%;
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATIONS PAGE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .notifications-list .list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .list-item-action {
        width: 100%;
    }
    
    .list-item-action .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   EDIT MEMBER / ADD MEMBER FORM RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .form-grid {
        gap: 14px;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .form-control {
        padding: 12px 14px;
    }
    
    /* Ensure date inputs are properly sized */
    input[type="date"].form-control {
        min-height: 48px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MANAGE EMPLOYEES PAGE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 767px) {
    .employee-card {
        flex-direction: column;
        text-align: center;
    }
    
    .employee-avatar {
        margin: 0 auto 12px;
    }
    
    .employee-info {
        text-align: center;
    }
    
    .employee-actions {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SYSTEM CHANGES / AUDIT LOGS RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 767px) {
    .log-entry {
        flex-direction: column;
        gap: 8px;
    }
    
    .log-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .log-details {
        font-size: 0.8rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHANGE PASSWORD PAGE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .password-form {
        max-width: 100%;
    }
    
    .password-requirements {
        font-size: 0.8rem;
    }
    
    .password-requirements li {
        padding: 4px 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   STAFF CHECK-IN PAGE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 575px) {
    .staff-checkin-card {
        padding: 16px;
    }
    
    .staff-status {
        flex-direction: column;
        gap: 12px;
    }
    
    .staff-status-item {
        width: 100%;
        text-align: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SUGGEST ABSENCES PAGE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 767px) {
    .absence-card {
        flex-direction: column;
    }
    
    .absence-info {
        text-align: center;
    }
    
    .absence-actions {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FIX INLINE STYLES THAT BREAK RESPONSIVENESS
   ═══════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 767px) {
    /* Override any inline flex styles that might break on mobile */
    [style*="display: flex"][style*="gap"] {
        flex-wrap: wrap !important;
    }
    
    /* Ensure inline width styles don't break layout */
    [style*="width: 100px"],
    [style*="width: 80px"],
    [style*="width: 60px"] {
        flex-shrink: 0;
    }
    
    /* Fix inline max-width styles */
    [style*="max-width: 200px"],
    [style*="max-width: 250px"],
    [style*="max-width: 300px"] {
        max-width: 100% !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ENSURE NO HORIZONTAL SCROLL
   ═══════════════════════════════════════════════════════════════════════════ */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

.app-layout {
    overflow-x: hidden;
    max-width: 100vw;
}

.main-content {
    overflow-x: hidden;
    max-width: 100%;
}

.page-content {
    overflow-x: hidden;
    max-width: 100%;
}

/* Ensure images don't cause overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure tables are contained */
.table-wrapper {
    max-width: 100%;
}

/* Ensure cards don't overflow */
.content-card,
.stat-card,
.dash-card {
    max-width: 100%;
    overflow: hidden;
}


/* ═══════════════════════════════════════════════════════════════════════════
   BI-DIRECTIONAL (RTL/LTR) SUPPORT
   Complete LTR Layout Fixes for English Mode
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── LTR Base Direction ─── */
[dir="ltr"] body {
    direction: ltr;
    text-align: left;
}

/* ─── LTR Sidebar Positioning ─── */
[dir="ltr"] .sidebar {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--border-color);
}

[dir="ltr"] .sidebar.collapsed .sidebar-nav a i {
    margin: 0;
}

/* ─── LTR Main Content Margin ─── */
[dir="ltr"] .main-content {
    margin-right: 0;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
    overflow-x: hidden;
    box-sizing: border-box;
}

[dir="ltr"] .sidebar.collapsed ~ .main-content,
[dir="ltr"] .main-content.expanded {
    margin-right: 0;
    margin-left: var(--sidebar-collapsed);
    width: calc(100% - var(--sidebar-collapsed));
    max-width: calc(100% - var(--sidebar-collapsed));
}

/* ─── LTR Sidebar Mobile Transform ─── */
@media screen and (max-width: 767px) {
    [dir="ltr"] .sidebar {
        transform: translateX(-100%);
    }
    
    [dir="ltr"] .sidebar.open {
        transform: translateX(0);
    }
    
    [dir="ltr"] .main-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ─── LTR Tablet Sidebar ─── */
@media screen and (min-width: 768px) and (max-width: 991px) {
    [dir="ltr"] .main-content {
        margin-left: var(--sidebar-collapsed) !important;
        margin-right: 0 !important;
        width: calc(100% - var(--sidebar-collapsed)) !important;
        max-width: calc(100% - var(--sidebar-collapsed)) !important;
    }
    
    [dir="ltr"] .sidebar.open ~ .main-content {
        margin-left: var(--sidebar-width) !important;
        width: calc(100% - var(--sidebar-width)) !important;
        max-width: calc(100% - var(--sidebar-width)) !important;
    }
}

/* ─── LTR Desktop Sidebar ─── */
@media screen and (min-width: 992px) {
    [dir="ltr"] .main-content {
        margin-left: var(--sidebar-width);
        margin-right: 0;
        width: calc(100% - var(--sidebar-width));
        max-width: calc(100% - var(--sidebar-width));
    }
    
    [dir="ltr"] .sidebar.collapsed ~ .main-content,
    [dir="ltr"] .main-content.expanded {
        margin-left: var(--sidebar-collapsed);
        margin-right: 0;
        width: calc(100% - var(--sidebar-collapsed));
        max-width: calc(100% - var(--sidebar-collapsed));
    }
}

/* ─── LTR Topbar ─── */
[dir="ltr"] .topbar {
    flex-direction: row;
}

[dir="ltr"] .topbar-right {
    flex-direction: row;
}

[dir="ltr"] .topbar-left {
    flex-direction: row;
}

/* ─── LTR Notification Badge ─── */
[dir="ltr"] .notif-badge {
    left: auto;
    right: -4px;
}

/* ─── LTR Notification Dropdown ─── */
[dir="ltr"] .notif-dropdown {
    left: 0;
    right: auto;
}

[dir="ltr"] .notif-dropdown.enhanced {
    left: 0;
    right: auto;
}

[dir="ltr"] .notifications-inline .notif-dropdown {
    left: 0;
    right: auto;
}

/* ─── LTR Unread Notification Border ─── */
[dir="ltr"] .notif-item.unread {
    border-right: none;
    border-left: 3px solid var(--accent);
}

/* ─── LTR Stat Card Accent Border ─── */
[dir="ltr"] .stat-card::before {
    right: auto;
    left: 0;
}

[dir="ltr"] .stat-card-new::before {
    right: auto;
    left: 0;
}

/* ─── LTR Sidebar Submenu Padding ─── */
[dir="ltr"] .sidebar-submenu a {
    padding-left: 32px;
    padding-right: 16px;
}

/* ─── LTR Table Text Alignment ─── */
[dir="ltr"] .table-wrapper th,
[dir="ltr"] .table-wrapper td {
    text-align: left;
}

/* ─── LTR Form Select Arrow ─── */
[dir="ltr"] select.form-control {
    background-position: right 14px center;
    padding-right: 36px;
    padding-left: 14px;
}

/* ─── LTR Stat Card Link Arrow ─── */
[dir="ltr"] .stat-card-link i {
    transform: rotate(180deg);
}

/* ─── LTR Sidebar Active Item Border ─── */
[dir="ltr"] .sidebar-nav li.active a::after {
    right: auto;
    left: 0;
    border-radius: 3px 0 0 3px;
}

/* ─── LTR Toast Notifications ─── */
[dir="ltr"] .notification-toasts {
    right: auto;
    left: 20px;
}

[dir="ltr"] .toast::before {
    right: auto;
    left: 0;
}

@media screen and (max-width: 575px) {
    [dir="ltr"] .notification-toasts {
        left: 10px;
        right: 10px;
    }
}

/* ─── LTR Sidebar Notification Item ─── */
[dir="ltr"] .sidebar-notification-item.unread {
    border-right: none;
    border-left: 3px solid var(--accent);
}

/* ─── LTR Inline Notifications Margin ─── */
[dir="ltr"] .notifications-inline {
    margin-left: 0;
    margin-right: 16px;
}

@media screen and (max-width: 768px) {
    [dir="ltr"] .notifications-inline {
        margin-right: 8px;
    }
}

@media screen and (max-width: 480px) {
    [dir="ltr"] .notifications-inline {
        margin-right: 4px;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   LTR DASHBOARD & PAGE SPECIFIC STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── LTR Hero Section ─── */
[dir="ltr"] .hero-inner,
[dir="ltr"] .hero-content {
    text-align: left;
}

[dir="ltr"] .hero-text {
    text-align: left;
}

/* ─── LTR Stat Breakdown Icons ─── */
[dir="ltr"] .stat-breakdown i {
    margin-left: 0;
    margin-right: 4px;
}

/* ─── LTR Card Headers ─── */
[dir="ltr"] .card-head,
[dir="ltr"] .content-card-header {
    flex-direction: row;
}

/* ─── LTR List Items ─── */
[dir="ltr"] .list-row,
[dir="ltr"] .list-item,
[dir="ltr"] .attendance-item {
    flex-direction: row;
}

/* ─── LTR Finance Card ─── */
[dir="ltr"] .finance-card {
    flex-direction: row;
}

/* ─── LTR Action Buttons ─── */
[dir="ltr"] .action-btn,
[dir="ltr"] .action-item {
    flex-direction: column;
}

/* ─── LTR Quick Stat ─── */
[dir="ltr"] .quick-stat {
    flex-direction: row;
}

/* ─── LTR Sidebar Footer ─── */
[dir="ltr"] .sidebar-footer a {
    flex-direction: row;
}

/* ─── LTR Alert Icons ─── */
[dir="ltr"] .alert {
    flex-direction: row;
}

/* ─── LTR Badge Positioning ─── */
[dir="ltr"] .sidebar-badge {
    right: auto;
    left: -4px;
}

/* ─── LTR Back Button Arrow ─── */
[dir="ltr"] .btn i.fa-arrow-right {
    transform: rotate(180deg);
}

[dir="ltr"] .btn i.fa-arrow-left {
    transform: rotate(0deg);
}

/* ─── LTR View All Button Arrow ─── */
[dir="ltr"] .view-all-btn i.fa-arrow-left {
    transform: rotate(180deg);
}

/* ─── LTR Pagination ─── */
[dir="ltr"] .pagination {
    flex-direction: row;
}

/* ─── LTR Form Groups ─── */
[dir="ltr"] .form-group {
    text-align: left;
}

[dir="ltr"] .form-group label {
    text-align: left;
}

/* ─── LTR Button Groups ─── */
[dir="ltr"] .btn-group {
    flex-direction: row;
}

/* ─── LTR Filters Bar ─── */
[dir="ltr"] .filters-bar {
    flex-direction: row;
}

@media screen and (max-width: 767px) {
    [dir="ltr"] .filters-bar {
        flex-direction: column;
    }
    
    [dir="ltr"] .btn-group {
        flex-direction: column;
    }
}

/* ─── LTR Empty State ─── */
[dir="ltr"] .empty-state {
    text-align: center;
}

/* ─── LTR Profile Header ─── */
[dir="ltr"] .content-card-body > div[style*="display: flex"] {
    flex-direction: row;
}

@media screen and (max-width: 767px) {
    [dir="ltr"] .content-card-body > div[style*="display: flex"][style*="gap: 24px"] {
        flex-direction: column !important;
        text-align: center;
    }
}

/* ─── LTR Search Results ─── */
[dir="ltr"] .search-result-item {
    text-align: left;
}

/* ─── LTR Accordion ─── */
[dir="ltr"] .sidebar-accordion {
    flex-direction: row;
}

[dir="ltr"] .accordion-label {
    flex-direction: row;
}

/* ─── LTR Admin Info ─── */
[dir="ltr"] .admin-info {
    text-align: center;
}

/* ─── LTR Gym Logo ─── */
[dir="ltr"] .gym-logo {
    flex-direction: row;
}


/* ═══════════════════════════════════════════════════════════════════════════
   LTR RESPONSIVE BREAKPOINTS - Mobile First
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── LTR Extra Small (280px - 359px) ─── */
@media screen and (max-width: 359px) {
    [dir="ltr"] .sidebar {
        right: auto;
        left: 0;
        transform: translateX(-100%);
    }
    
    [dir="ltr"] .sidebar.open {
        transform: translateX(0);
    }
    
    [dir="ltr"] .main-content {
        margin-left: 0 !important;
    }
    
    [dir="ltr"] .notif-dropdown {
        left: 10px !important;
        right: auto !important;
    }
    
    [dir="ltr"] .hero-inner,
    [dir="ltr"] .hero-content {
        text-align: center;
    }
}

/* ─── LTR Small Mobile (360px - 424px) ─── */
@media screen and (min-width: 360px) and (max-width: 424px) {
    [dir="ltr"] .sidebar {
        transform: translateX(-100%);
    }
    
    [dir="ltr"] .sidebar.open {
        transform: translateX(0);
    }
    
    [dir="ltr"] .main-content {
        margin-left: 0 !important;
    }
    
    [dir="ltr"] .notif-dropdown {
        left: 12px !important;
        right: auto !important;
    }
}

/* ─── LTR Standard Mobile (425px - 575px) ─── */
@media screen and (min-width: 425px) and (max-width: 575px) {
    [dir="ltr"] .sidebar {
        transform: translateX(-100%);
    }
    
    [dir="ltr"] .sidebar.open {
        transform: translateX(0);
    }
    
    [dir="ltr"] .main-content {
        margin-left: 0 !important;
    }
    
    [dir="ltr"] .hero-inner,
    [dir="ltr"] .hero-content {
        text-align: center;
    }
}

/* ─── LTR Large Mobile / Phablet (576px - 767px) ─── */
@media screen and (min-width: 576px) and (max-width: 767px) {
    [dir="ltr"] .sidebar {
        transform: translateX(-100%);
    }
    
    [dir="ltr"] .sidebar.open {
        transform: translateX(0);
    }
    
    [dir="ltr"] .main-content {
        margin-left: 0 !important;
    }
    
    [dir="ltr"] .hero-inner,
    [dir="ltr"] .hero-content {
        text-align: center;
    }
}

/* ─── LTR Tablet Portrait (768px - 991px) ─── */
@media screen and (min-width: 768px) and (max-width: 991px) {
    [dir="ltr"] .sidebar {
        right: auto;
        left: 0;
        width: var(--sidebar-collapsed);
        transform: translateX(0);
    }
    
    [dir="ltr"] .sidebar .sidebar-text,
    [dir="ltr"] .sidebar .admin-info p,
    [dir="ltr"] .sidebar .admin-info small,
    [dir="ltr"] .sidebar .gym-logo h1 {
        display: none;
    }
    
    [dir="ltr"] .sidebar .gym-logo { justify-content: center; }
    [dir="ltr"] .sidebar .admin-avatar { margin: 0 auto; }
    [dir="ltr"] .sidebar .sidebar-nav a { justify-content: center; padding: 14px; }
    [dir="ltr"] .sidebar .sidebar-nav a i { margin: 0; font-size: 20px; }
    [dir="ltr"] .sidebar .sidebar-footer a { justify-content: center; }
    [dir="ltr"] .sidebar .sidebar-accordion { justify-content: center; padding: 12px; }
    [dir="ltr"] .sidebar .accordion-label span { display: none; }
    [dir="ltr"] .sidebar .accordion-caret { display: none; }
    
    [dir="ltr"] .sidebar.open {
        width: var(--sidebar-width);
    }
    
    [dir="ltr"] .sidebar.open .sidebar-text,
    [dir="ltr"] .sidebar.open .admin-info p,
    [dir="ltr"] .sidebar.open .admin-info small,
    [dir="ltr"] .sidebar.open .gym-logo h1 {
        display: block;
    }
    
    [dir="ltr"] .sidebar.open .sidebar-nav a { justify-content: flex-start; }
    [dir="ltr"] .sidebar.open .sidebar-accordion { justify-content: space-between; }
    [dir="ltr"] .sidebar.open .accordion-label span { display: inline; }
    [dir="ltr"] .sidebar.open .accordion-caret { display: block; }
    
    [dir="ltr"] .main-content {
        margin-left: var(--sidebar-collapsed) !important;
        margin-right: 0 !important;
    }
    
    [dir="ltr"] .hero-inner,
    [dir="ltr"] .hero-content {
        text-align: left;
    }
}

/* ─── LTR Tablet Landscape / Small Laptop (992px - 1199px) ─── */
@media screen and (min-width: 992px) and (max-width: 1199px) {
    [dir="ltr"] .sidebar {
        right: auto;
        left: 0;
        width: var(--sidebar-width);
        transform: translateX(0);
    }
    
    [dir="ltr"] .sidebar.collapsed {
        width: var(--sidebar-collapsed);
    }
    
    [dir="ltr"] .main-content {
        margin-left: var(--sidebar-width);
        margin-right: 0;
    }
    
    [dir="ltr"] .sidebar.collapsed ~ .main-content,
    [dir="ltr"] .main-content.expanded {
        margin-left: var(--sidebar-collapsed);
        margin-right: 0;
    }
}

/* ─── LTR Laptop / Desktop (1200px+) ─── */
@media screen and (min-width: 1200px) {
    [dir="ltr"] .sidebar {
        right: auto;
        left: 0;
        width: var(--sidebar-width);
    }
    
    [dir="ltr"] .sidebar.collapsed {
        width: var(--sidebar-collapsed);
    }
    
    [dir="ltr"] .main-content {
        margin-left: var(--sidebar-width);
        margin-right: 0;
    }
    
    [dir="ltr"] .sidebar.collapsed ~ .main-content,
    [dir="ltr"] .main-content.expanded {
        margin-left: var(--sidebar-collapsed);
        margin-right: 0;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   LTR COMPONENT-SPECIFIC FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── LTR Dashboard Hero ─── */
[dir="ltr"] .admin-hero .hero-inner {
    flex-direction: row;
}

[dir="ltr"] .admin-hero .hero-text {
    text-align: left;
}

[dir="ltr"] .admin-badge {
    text-align: center;
}

/* ─── LTR Stats Grid ─── */
[dir="ltr"] .stats-grid,
[dir="ltr"] .stats-row,
[dir="ltr"] .cards-grid,
[dir="ltr"] .finance-row {
    direction: ltr;
}

/* ─── LTR Dashboard Grid ─── */
[dir="ltr"] .dashboard-grid-3,
[dir="ltr"] .dashboard-main {
    direction: ltr;
}

/* ─── LTR Quick Actions ─── */
[dir="ltr"] .actions-wrapper,
[dir="ltr"] .actions-grid,
[dir="ltr"] .quick-actions {
    direction: ltr;
}

/* ─── LTR Card List ─── */
[dir="ltr"] .card-list {
    direction: ltr;
}

[dir="ltr"] .list-row {
    text-align: left;
}

/* ─── LTR Attendance List ─── */
[dir="ltr"] .attendance-list {
    direction: ltr;
}

[dir="ltr"] .attendance-item {
    text-align: left;
}

/* ─── LTR Payments Table ─── */
[dir="ltr"] .payments-table {
    direction: ltr;
}

[dir="ltr"] .payments-table table {
    text-align: left;
}

/* ─── LTR Chart Container ─── */
[dir="ltr"] .chart-container {
    direction: ltr;
}

/* ─── LTR Stat Card Content ─── */
[dir="ltr"] .stat-card {
    text-align: left;
}

[dir="ltr"] .stat-card-new {
    text-align: left;
}

[dir="ltr"] .stat-box {
    text-align: left;
}

[dir="ltr"] .stat-content {
    text-align: left;
}

[dir="ltr"] .stat-box-info {
    text-align: left;
}

[dir="ltr"] .finance-info {
    text-align: left;
}

/* ─── LTR Sidebar Nav Items ─── */
[dir="ltr"] .sidebar-nav a {
    text-align: left;
    flex-direction: row;
}

[dir="ltr"] .sidebar-nav a i {
    margin-right: 12px;
    margin-left: 0;
}

/* ─── LTR Sidebar Footer ─── */
[dir="ltr"] .sidebar-footer a i {
    margin-right: 10px;
    margin-left: 0;
}

/* ─── LTR Content Card ─── */
[dir="ltr"] .content-card {
    text-align: left;
}

[dir="ltr"] .content-card-header h3 {
    text-align: left;
}

[dir="ltr"] .content-card-header h3 i {
    margin-right: 8px;
    margin-left: 0;
}

[dir="ltr"] .content-card-body {
    text-align: left;
}

/* ─── LTR Dash Card ─── */
[dir="ltr"] .dash-card {
    text-align: left;
}

[dir="ltr"] .card-head h3 {
    text-align: left;
}

[dir="ltr"] .card-head h3 i {
    margin-right: 8px;
    margin-left: 0;
}

/* ─── LTR Topbar Title ─── */
[dir="ltr"] .topbar-right h2 {
    text-align: left;
}

[dir="ltr"] .topbar-right h2 i {
    margin-right: 8px;
    margin-left: 0;
}

/* ─── LTR Alert ─── */
[dir="ltr"] .alert i {
    margin-right: 12px;
    margin-left: 0;
}

/* ─── LTR Button Icons ─── */
[dir="ltr"] .btn i {
    margin-right: 8px;
    margin-left: 0;
}

[dir="ltr"] .btn i:only-child {
    margin: 0;
}

/* ─── LTR Badge ─── */
[dir="ltr"] .badge i {
    margin-right: 4px;
    margin-left: 0;
}

/* ─── LTR Form Label Icons ─── */
[dir="ltr"] .form-group label i {
    margin-right: 6px;
    margin-left: 0;
}

/* ─── LTR Notification Item ─── */
[dir="ltr"] .notif-item {
    text-align: left;
}

[dir="ltr"] .notif-content {
    text-align: left;
}

[dir="ltr"] .notif-icon {
    margin-right: 12px;
    margin-left: 0;
}

/* ─── LTR List Item ─── */
[dir="ltr"] .list-item {
    text-align: left;
}

[dir="ltr"] .list-item-body {
    text-align: left;
}

/* ─── LTR Hero Stats ─── */
[dir="ltr"] .hero-quick-stats,
[dir="ltr"] .hero-stats {
    flex-direction: row;
}

[dir="ltr"] .quick-stat,
[dir="ltr"] .hero-stat {
    text-align: center;
}

/* ─── LTR Stat Link Arrow ─── */
[dir="ltr"] .stat-link i.fa-arrow-left {
    transform: rotate(180deg);
}

/* ─── LTR Card Link Arrow ─── */
[dir="ltr"] .card-link i.fa-arrow-left {
    transform: rotate(180deg);
}

/* ─── LTR View All Arrow ─── */
[dir="ltr"] a[href] i.fa-arrow-left:last-child {
    transform: rotate(180deg);
}

/* ─── LTR Empty State ─── */
[dir="ltr"] .empty-state {
    text-align: center;
}

[dir="ltr"] .empty-mini {
    text-align: center;
}

/* ─── LTR Pagination ─── */
[dir="ltr"] .pagination {
    direction: ltr;
}

/* ─── LTR Login Page ─── */
[dir="ltr"] .login-page {
    direction: ltr;
}

[dir="ltr"] .login-box {
    text-align: left;
}

[dir="ltr"] .login-header {
    text-align: center;
}

[dir="ltr"] .login-form {
    text-align: left;
}

[dir="ltr"] .form-group label {
    text-align: left;
}

[dir="ltr"] .show-password {
    left: 15px;
    right: auto;
}

[dir="ltr"] .login-footer {
    text-align: center;
}

/* ─── LTR Top Actions ─── */
[dir="ltr"] .top-actions {
    flex-direction: row;
}

/* ─── LTR Brand ─── */
[dir="ltr"] .brand {
    flex-direction: row;
}

[dir="ltr"] .brand i {
    margin-right: 12px;
    margin-left: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   LTR MOBILE RESPONSIVE FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

@media screen and (max-width: 767px) {
    /* LTR Mobile Hero */
    [dir="ltr"] .admin-hero .hero-inner,
    [dir="ltr"] .hero-section .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    [dir="ltr"] .hero-text {
        text-align: center;
    }
    
    /* LTR Mobile Stats */
    [dir="ltr"] .stat-card,
    [dir="ltr"] .stat-card-new,
    [dir="ltr"] .stat-box {
        text-align: center;
    }
    
    [dir="ltr"] .stat-content,
    [dir="ltr"] .stat-box-info {
        text-align: center;
    }
    
    /* LTR Mobile Notification Dropdown */
    [dir="ltr"] .notif-dropdown {
        left: 10px !important;
        right: 10px !important;
    }
    
    /* LTR Mobile Profile Header */
    [dir="ltr"] .content-card-body > div[style*="display: flex"][style*="gap: 24px"] {
        text-align: center;
    }
    
    /* LTR Mobile Filters */
    [dir="ltr"] .filters-bar {
        flex-direction: column;
    }
    
    /* LTR Mobile Button Group */
    [dir="ltr"] .btn-group {
        flex-direction: column;
    }
    
    [dir="ltr"] .btn-group .btn {
        width: 100%;
        justify-content: center;
    }
}

@media screen and (max-width: 575px) {
    /* LTR Extra Small Notification Dropdown - Bottom Sheet Style */
    [dir="ltr"] .notif-dropdown,
    [dir="ltr"] .notif-dropdown.enhanced {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: none !important;
        border-radius: 20px 20px 0 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LTR TABLET RESPONSIVE FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

@media screen and (min-width: 768px) and (max-width: 991px) {
    /* LTR Tablet Hero */
    [dir="ltr"] .admin-hero .hero-inner,
    [dir="ltr"] .hero-section .hero-content {
        flex-direction: row;
        text-align: left;
    }
    
    [dir="ltr"] .hero-text {
        text-align: left;
    }
    
    /* LTR Tablet Stats */
    [dir="ltr"] .stat-card,
    [dir="ltr"] .stat-card-new,
    [dir="ltr"] .stat-box {
        text-align: left;
    }
    
    /* LTR Tablet Sidebar Collapsed Nav */
    [dir="ltr"] .sidebar .sidebar-nav a {
        justify-content: center;
        text-align: center;
    }
    
    [dir="ltr"] .sidebar .sidebar-nav a i {
        margin: 0;
    }
    
    [dir="ltr"] .sidebar.open .sidebar-nav a {
        justify-content: flex-start;
        text-align: left;
    }
    
    [dir="ltr"] .sidebar.open .sidebar-nav a i {
        margin-right: 12px;
        margin-left: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LTR DESKTOP RESPONSIVE FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

@media screen and (min-width: 992px) {
    /* LTR Desktop Hero */
    [dir="ltr"] .admin-hero .hero-inner,
    [dir="ltr"] .hero-section .hero-content {
        flex-direction: row;
        text-align: left;
    }
    
    [dir="ltr"] .hero-text {
        text-align: left;
    }
    
    /* LTR Desktop Stats */
    [dir="ltr"] .stat-card,
    [dir="ltr"] .stat-card-new,
    [dir="ltr"] .stat-box {
        text-align: left;
    }
    
    [dir="ltr"] .stat-content,
    [dir="ltr"] .stat-box-info {
        text-align: left;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ENSURE BOTH DIRECTIONS WORK - FALLBACK STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Use logical properties where possible for automatic RTL/LTR handling */
.sidebar-nav a {
    padding-inline-start: 16px;
    padding-inline-end: 16px;
}

.content-card-header h3 i,
.card-head h3 i,
.topbar-right h2 i,
.alert i,
.btn i:not(:only-child) {
    margin-inline-end: 8px;
    margin-inline-start: 0;
}

.sidebar-nav a i {
    margin-inline-end: 12px;
    margin-inline-start: 0;
}

.sidebar-footer a i {
    margin-inline-end: 10px;
    margin-inline-start: 0;
}

/* Logical properties for borders */
.notif-item.unread {
    border-inline-start: 3px solid var(--accent);
    border-inline-end: none;
}

.stat-card::before,
.stat-card-new::before {
    inset-inline-start: 0;
    inset-inline-end: auto;
}

/* Logical properties for positioning */
.notif-badge {
    inset-inline-start: auto;
    inset-inline-end: -4px;
}

/* Fix for select dropdown arrow */
select.form-control {
    background-position: left 14px center;
    padding-inline-start: 36px;
    padding-inline-end: 14px;
}

[dir="ltr"] select.form-control {
    background-position: right 14px center;
    padding-inline-start: 14px;
    padding-inline-end: 36px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   LTR DASHBOARD PAGE INLINE STYLE OVERRIDES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── LTR Dashboard Hero Inner ─── */
[dir="ltr"] .admin-dashboard .hero-inner {
    flex-direction: row;
}

[dir="ltr"] .admin-dashboard .hero-text {
    text-align: left;
}

/* ─── LTR Stats Grid Direction ─── */
[dir="ltr"] .admin-dashboard .stats-grid {
    direction: ltr;
}

/* ─── LTR Finance Row Direction ─── */
[dir="ltr"] .admin-dashboard .finance-row {
    direction: ltr;
}

/* ─── LTR Dashboard Grid ─── */
[dir="ltr"] .admin-dashboard .dashboard-grid-3 {
    direction: ltr;
}

/* ─── LTR Stat Card New ─── */
[dir="ltr"] .stat-card-new::before {
    right: auto;
    left: 0;
}

[dir="ltr"] .stat-card-new {
    text-align: left;
}

[dir="ltr"] .stat-card-new .stat-content {
    text-align: left;
}

/* ─── LTR Stat Link ─── */
[dir="ltr"] .stat-link {
    margin-left: auto;
    margin-right: 0;
}

/* ─── LTR Finance Card ─── */
[dir="ltr"] .finance-card {
    text-align: left;
}

[dir="ltr"] .finance-info {
    text-align: left;
}

/* ─── LTR Actions Wrapper ─── */
[dir="ltr"] .admin-actions-card .actions-wrapper {
    direction: ltr;
}

/* ─── LTR List Row ─── */
[dir="ltr"] .list-row {
    flex-direction: row;
}

[dir="ltr"] .list-info {
    text-align: left;
}

/* ─── LTR List Avatar Gender Icons ─── */
[dir="ltr"] .list-avatar {
    margin-right: 12px;
    margin-left: 0;
}

/* ─── LTR Payments Table ─── */
[dir="ltr"] .admin-dashboard .payments-table {
    direction: ltr;
}

[dir="ltr"] .admin-dashboard .payments-table table {
    text-align: left;
}

[dir="ltr"] .admin-dashboard .payments-table th,
[dir="ltr"] .admin-dashboard .payments-table td {
    text-align: left;
}

/* ─── LTR Pay Type Badge ─── */
[dir="ltr"] .pay-type {
    text-align: center;
}

/* ─── LTR Chart Card ─── */
[dir="ltr"] .chart-card {
    direction: ltr;
}

/* ─── LTR Card List ─── */
[dir="ltr"] .dash-card .card-list {
    direction: ltr;
}

/* ─── LTR Empty Mini ─── */
[dir="ltr"] .empty-mini {
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LTR EMPLOYEE DASHBOARD SPECIFIC FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── LTR Hero Section ─── */
[dir="ltr"] .hero-section .hero-content {
    flex-direction: row;
}

[dir="ltr"] .hero-section .hero-welcome {
    text-align: left;
}

/* ─── LTR Stats Row ─── */
[dir="ltr"] .stats-row {
    direction: ltr;
}

[dir="ltr"] .stat-box {
    text-align: left;
    flex-direction: row;
}

[dir="ltr"] .stat-box-icon {
    margin-right: 16px;
    margin-left: 0;
}

[dir="ltr"] .stat-box-info {
    text-align: left;
}

/* ─── LTR Dashboard Main ─── */
[dir="ltr"] .dashboard-main {
    direction: ltr;
}

/* ─── LTR Dashboard Card ─── */
[dir="ltr"] .dashboard-card {
    text-align: left;
}

[dir="ltr"] .dashboard-card .card-header {
    flex-direction: row;
}

[dir="ltr"] .dashboard-card .card-header h3 {
    text-align: left;
}

/* ─── LTR Actions Grid ─── */
[dir="ltr"] .actions-grid {
    direction: ltr;
}

[dir="ltr"] .action-item {
    text-align: center;
}

/* ─── LTR Attendance List ─── */
[dir="ltr"] .attendance-list {
    direction: ltr;
}

[dir="ltr"] .attendance-item {
    flex-direction: row;
    text-align: left;
}

[dir="ltr"] .attendance-avatar {
    margin-right: 12px;
    margin-left: 0;
}

[dir="ltr"] .attendance-info {
    text-align: left;
}

[dir="ltr"] .attendance-time {
    margin-left: auto;
    margin-right: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LTR MOBILE DASHBOARD FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

@media screen and (max-width: 767px) {
    [dir="ltr"] .admin-dashboard .hero-inner,
    [dir="ltr"] .hero-section .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    [dir="ltr"] .admin-dashboard .hero-text,
    [dir="ltr"] .hero-section .hero-welcome {
        text-align: center;
    }
    
    [dir="ltr"] .stat-card-new,
    [dir="ltr"] .stat-box {
        text-align: center;
    }
    
    [dir="ltr"] .stat-card-new .stat-content,
    [dir="ltr"] .stat-box-info {
        text-align: center;
    }
    
    [dir="ltr"] .stat-box {
        flex-direction: column;
    }
    
    [dir="ltr"] .stat-box-icon {
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    [dir="ltr"] .list-row,
    [dir="ltr"] .attendance-item {
        text-align: center;
    }
}

@media screen and (min-width: 768px) {
    [dir="ltr"] .admin-dashboard .hero-inner,
    [dir="ltr"] .hero-section .hero-content {
        flex-direction: row;
        text-align: left;
    }
    
    [dir="ltr"] .admin-dashboard .hero-text,
    [dir="ltr"] .hero-section .hero-welcome {
        text-align: left;
    }
}

