/* Cheque Management System - Main Styles */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #004985;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #06b6d4;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--light-bg);
    font-size: 14px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #004985;
    padding: 1rem;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: linear-gradient(135deg, var(--white) 0%, rgba(248, 250, 252, 0.9) 100%);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3rem;
    text-align: center;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 24px 24px 0 0;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1rem;
}

.login-header h1 {
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.login-header p {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.login-form {
    text-align: left;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--gray-500);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(226, 232, 240, 0.5);
    border-radius: 12px;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: var(--white);
    transform: translateY(-1px);
}

/* Modern Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
    color: var(--gray-700);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.3);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-warning {
    background-color: var(--warning-color);
    color: var(--white);
}

.btn-error {
    background-color: var(--error-color);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
    min-width: 0;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-warning {
    background-color: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.alert-info {
    background-color: #f0f9ff;
    color: #0284c7;
    border: 1px solid #bae6fd;
}

/* Modern Card Styles */
.card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
    margin-top: 30px;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 16px 16px 0 0;
}

.card-header {
    padding: 2rem 2rem 1rem 2rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.8) 100%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    position: relative;
}

.card-header h3 {
    color: var(--gray-800);
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    border-radius: 2px;
}

.card-body {
    padding: 2rem;
    background: var(--white);
}

.card-footer {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.5) 0%, rgba(241, 245, 249, 0.5) 100%);
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}

/* Modern Navigation Styles */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.brand-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.navbar-nav a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--primary-color);
}

/* Mobile Navigation Styles */
.brand-text {
    display: inline;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.welcome-text {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.btn-text {
    display: inline;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

/* Mobile Logout Section */
.mobile-logout-section {
    display: none;
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--gray-700);
    font-weight: 500;
}

.mobile-user-info i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.mobile-logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--danger-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
}

.mobile-logout-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    color: var(--white);
    text-decoration: none;
}

/* Modern Sidebar Styles */
.sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    height: calc(100vh - 56px);
    position: fixed;
    left: 0;
    top: 56px;
    overflow-y: auto;
    z-index: 90;
    transition: transform 0.3s ease;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 85; /* Between sidebar (90) and main content */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allow clicks to pass through when not active */
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto; /* Block clicks when active */
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.2s;
    gap: 0.75rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.sidebar-nav i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    padding-top: 4.5rem;
    min-height: calc(100vh - 56px);
    position: relative;
    z-index: 1; /* Ensure main content is above overlay when overlay is not active */
}

/* Modern Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Dashboard specific - 4 cards per row */
.dashboard-stats {
    grid-template-columns: repeat(4, 1fr);
}

.stat-card {
    background: linear-gradient(135deg, var(--white) 0%, rgba(248, 250, 252, 0.8) 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 20px 20px 0 0;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.stat-card.success::before {
    background: linear-gradient(90deg, var(--success-color), #34d399);
}

.stat-card.warning::before {
    background: linear-gradient(90deg, var(--warning-color), #fbbf24);
}

.stat-card.error::before {
    background: linear-gradient(90deg, var(--error-color), #f87171);
}

.stat-card.info::before {
    background: linear-gradient(90deg, var(--info-color), #22d3ee);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gray-800), var(--gray-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.15;
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--info-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.success .stat-icon {
    background: linear-gradient(135deg, var(--success-color), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.warning .stat-icon {
    background: linear-gradient(135deg, var(--warning-color), #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.error .stat-icon {
    background: linear-gradient(135deg, var(--error-color), #f87171);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.info .stat-icon {
    background: linear-gradient(135deg, var(--info-color), #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern Table Styles */
.table-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background-color: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-received {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-deposited {
    background-color: #dcfce7;
    color: #166534;
}

.status-transferred {
    background-color: #fef3c7;
    color: #92400e;
}

.status-realized {
    background-color: #d1fae5;
    color: #065f46;
}

.status-returned {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-sent {
    background-color: #e0e7ff;
    color: #3730a3;
}

/* Cheque Direction Highlighting */
.status-badge.in {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    border: 2px solid #10b981;
    animation: pulse-in 2s infinite;
}

.status-badge.out {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    border: 2px solid #f59e0b;
    animation: pulse-out 2s infinite;
}

@keyframes pulse-in {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
    }
}

@keyframes pulse-out {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
    }
}

/* Transfer Status Badges */
.status-badge.transferred {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    font-weight: 600;
}

.status-badge.realized {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-weight: 600;
}

.status-badge.returned {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-weight: 600;
}

/* Disabled Button */
.btn-disabled {
    background-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
    border: 1px solid #d1d5db;
}

.btn-disabled:hover {
    background-color: #e5e7eb;
    color: #9ca3af;
    transform: none;
    box-shadow: none;
}

/* Modern Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 99999 !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, var(--white) 0%, rgba(248, 250, 252, 0.9) 100%);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: visible;
    backdrop-filter: blur(20px);
    position: relative;
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 24px 24px 0 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-shrink: 0;
    background: var(--white);
}

/* Modern Chart Container */
.chart-container {
    background: linear-gradient(135deg, var(--white) 0%, rgba(248, 250, 252, 0.8) 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: visible;

    display: flex;
    flex-direction: column;
    width: 100%;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 20px 20px 0 0;
}

.chart-header {
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.chart-subtitle {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.chart-container canvas {
    flex: 1;
    max-height: calc(500px - 6rem);
    overflow: visible;
    width: 100% !important;
    height: auto !important;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .navbar-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Dashboard specific - 2 cards per row on tablet */
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: block;
    }
    
    .brand-text {
        display: inline;
    }
    
    .welcome-text {
        display: none;
    }
    
    .btn-text {
        display: none;
    }
    
    .desktop-logout {
        display: none;
    }
    
    .mobile-logout-section {
        display: flex;
        flex-direction: column;
        margin-top: auto;
        padding-top: 1rem;
    }
    
    .mobile-overlay {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        height: calc(100vh - 56px);
        top: 56px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar-nav {
        padding: 1rem 0 1rem 0;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
        padding-top: 5.5rem;
    }
    
    body.mobile-menu-open {
        overflow: hidden;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Dashboard specific - 1 card per row on mobile */
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .table {
        min-width: 600px;
    }
    
    .modal-content {
        margin: 1rem;
        max-width: none;
        width: calc(100% - 2rem);
    }
    
    /* Enhanced mobile form improvements */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Enhanced mobile button improvements */
    .btn {
        min-height: 44px; /* Touch-friendly */
        padding: 0.75rem 1rem;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    /* Enhanced mobile table improvements */
    .table-container {
        -webkit-overflow-scrolling: touch;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }
    
    /* Enhanced mobile filter improvements */
    .filter-section {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-section .form-group {
        width: 100%;
    }
    
    /* Enhanced mobile bulk actions */
    .bulk-actions-card .flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .bulk-status-dropdown {
        min-width: auto;
        width: 100%;
    }
    
    .bulk-status-dropdown select {
        min-width: auto;
        width: 100%;
    }
    
    /* Mobile horizontal scrolling for bulk actions */
    #bulk-actions-card .card-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #bulk-actions-card .flex.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        min-width: 0;
    }
    
    #bulk-actions-card .flex.items-center.gap-4 {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
    }
    
    #bulk-actions-card .flex.items-center.gap-3 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        width: 100%;
    }
    
    #bulk-actions-card .flex.items-center.gap-2 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        width: 100%;
    }
    
    #bulk-actions-card .flex.gap-2 {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    #bulk-actions-card .flex.gap-2 .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Enhanced mobile pagination */
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Enhanced mobile photo recognition */
    .photo-recognition-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .photo-recognition-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        min-height: 48px; /* Extra touch-friendly */
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    /* Enhanced small mobile improvements */
    .container {
        padding: 0 0.25rem;
    }
    
    .table {
        min-width: 500px;
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 0.375rem 0.25rem;
    }
    
    .modal-content {
        margin: 0.25rem;
        width: calc(100% - 0.5rem);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
    }
    
    .pagination .btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
    
    /* Enhanced mobile responsiveness for page headers on small devices */
    .flex.items-center.justify-between {
        gap: 0.75rem;
    }
    
    .flex.items-center.justify-between h1 {
        font-size: 1.25rem;
    }
    
    .flex.items-center.justify-between p {
        font-size: 0.875rem;
    }
    
    /* Enhanced mobile bulk actions for small devices */
    #bulk-actions-card .card-body {
        padding: 1rem;
    }
    
    #bulk-actions-card .bulk-actions-label {
        font-size: 0.8rem;
    }
    
    #bulk-actions-card .text-sm {
        font-size: 0.8rem;
    }
    
    #bulk-actions-card .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Extra Small Mobile Devices (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 0 0.25rem;
    }
    
    .table {
        min-width: 400px;
        font-size: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .card-header {
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 0.5rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
        padding: 0.75rem;
    }
    
    /* Remove hover effects on touch devices */
    .btn:hover {
        transform: none;
    }
    
    .card:hover {
        transform: none;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

/* Text Color Utilities */
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-800 { color: var(--gray-800); }
.text-blue-600 { color: var(--info-color); }
.text-green-600 { color: var(--success-color); }
.text-red-600 { color: var(--error-color); }
.text-yellow-600 { color: var(--warning-color); }

/* Text Size Utilities */
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

/* Small text styling */
small {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Font Weight Utilities */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Strong text styling */
strong {
    font-weight: 600;
}

/* Checkbox Styling */
.form-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-300);
    border-radius: 4px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-checkbox:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
    position: relative;
}

.form-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.form-checkbox:indeterminate {
    background: var(--primary-color);
    border-color: var(--primary-color);
    position: relative;
}

.form-checkbox:indeterminate::after {
    content: '−';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.form-checkbox:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Bulk Actions Styling */
#bulk-actions-card {
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(37, 99, 235, 0.02) 100%);
}

#bulk-actions-card .card-header {
    background: rgba(37, 99, 235, 0.1);
    border-bottom: 1px solid rgba(37, 99, 235, 0.2);
}

#bulk-actions-card .card-header h3 {
    color: var(--primary-color);
}

/* Table checkbox column */
th:first-child,
td:first-child {
    text-align: center;
    vertical-align: middle;
}

/* Loading state for bulk update button */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Status-based row highlighting for bulk selection */
.table tbody tr[data-status] {
    transition: background-color 0.2s ease;
}

.table tbody tr[data-status]:hover {
    background-color: rgba(37, 99, 235, 0.05);
}

/* Disabled checkbox styling */
.cheque-checkbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--gray-200);
    border-color: var(--gray-300);
}

/* Modern Bulk Actions Dropdown */
.bulk-status-dropdown {
    position: relative;
    min-width: 200px;
}

.bulk-status-dropdown select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    min-width: 200px;
}

.bulk-status-dropdown select:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.bulk-status-dropdown select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

.bulk-status-dropdown select:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

/* Disabled form controls styling */
select:disabled,
input:disabled {
    background-color: #f8f9fa !important;
    border-color: #e9ecef !important;
    color: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.65;
}

select:disabled:focus,
input:disabled:focus {
    border-color: #e9ecef !important;
    box-shadow: none !important;
}

/* General checkbox styling */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    margin: 0;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.checkbox-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.checkbox-label:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.checkbox-label:hover::before {
    left: 100%;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #fff;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.checkbox-label:hover .checkmark {
    border-color: #3b82f6;
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark:after {
    content: '';
    position: absolute;
    left: 6px;
    top: 3px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    animation: checkmark-appear 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked ~ span {
    color: #1e40af;
    font-weight: 600;
}

@keyframes checkmark-appear {
    0% {
        opacity: 0;
        transform: rotate(45deg) scale(0.5);
    }
    50% {
        opacity: 0.5;
        transform: rotate(45deg) scale(1.2);
    }
    100% {
        opacity: 1;
        transform: rotate(45deg) scale(1);
    }
}

.bulk-status-dropdown::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
    transition: color 0.3s ease;
}

.bulk-status-dropdown:hover::after {
    color: #3b82f6;
}

.bulk-status-dropdown select:focus + ::after {
    color: #3b82f6;
}

/* Modern Bulk Actions Card */
#bulk-actions-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.1);
    backdrop-filter: blur(10px);
}

#bulk-actions-card .card-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 16px 16px 0 0;
}

#bulk-actions-card .card-header h3 {
    color: #1e40af;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

#bulk-actions-card .card-header h3 i {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern Bulk Actions Content */
#bulk-actions-card .card-body {
    padding: 24px;
}

#bulk-actions-card .flex {
    align-items: center;
    gap: 16px;
}

#selected-count {
    color: #3b82f6;
    font-weight: 600;
    font-size: 14px;
}

/* Clickable Card Styling */
.clickable-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.clickable-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.clickable-card:active {
    transform: translateY(0);
}

/* Modal Styling */
.modal {
    position: fixed;
    z-index: 99999 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--white);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow: visible;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-header .close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.modal-header .close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

/* User Management Styles */
.status-badge.status-super_admin {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.status-badge.status-admin {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.status-badge.status-user {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.page-title h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-title p {
    margin: 0.5rem 0 0 0;
    color: #6b7280;
    font-size: 1rem;
}

.page-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Responsive Page Header */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-title h1 {
        font-size: 1.5rem;
    }
    
    .page-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Mobile responsiveness for flex header layouts (like cheques.php) */
    .flex.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .flex.items-center.justify-between > div:first-child {
        width: 100%;
    }
    
    .flex.items-center.justify-between > a,
    .flex.items-center.justify-between > button {
        width: 100%;
        justify-content: center;
    }
}

.bulk-actions-label {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bulk-actions-label i {
    color: #3b82f6;
}

/* From Status Display */
.from-status-display {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    color: #475569;
    min-width: 140px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.from-status-display i {
    color: #64748b;
    font-size: 12px;
}

.from-status-display.has-status {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
    color: #1e40af;
}

.from-status-display.has-status i {
    color: #3b82f6;
}

/* Modern Bulk Action Buttons */
#bulk-actions-card .btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#bulk-actions-card .btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
}

#bulk-actions-card .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

#bulk-actions-card .btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    border: none;
    color: white;
}

#bulk-actions-card .btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.3);
}

#bulk-actions-card .btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Info message styling */
#bulk-actions-card .text-gray-600 {
    background: rgba(59, 130, 246, 0.1);
    padding: 12px 16px;
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
    font-size: 13px;
    line-height: 1.5;
}

#bulk-actions-card .text-gray-600 i {
    color: #3b82f6;
    margin-right: 8px;
}

/* Transferred cheque row styling - removed to keep rows active */

/* Status indicator in bulk actions */

#selected-count .status-indicator {
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 8px;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.items-end { align-items: flex-end; }
.flex-1 { flex: 1; }

/* Filter Button Consistency */
.form-group .btn {
    min-width: 80px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Modern Filter Card Styling */
.modern-filter-card {
    background: linear-gradient(135deg, var(--white) 0%, rgba(248, 250, 252, 0.8) 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.modern-filter-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 20px 20px 0 0;
}

.modern-filter-header {
    padding: 1.5rem 1.5rem 0 1.5rem;
    margin-bottom: 1.5rem;
}

.modern-filter-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.modern-filter-subtitle {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
}

.modern-filter-body {
    padding: 1.5rem;
}

.modern-filter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modern-filter-form .form-group {
    margin-bottom: 0;
}

.modern-filter-form .grid {
    display: grid;
    gap: 1rem;
}

.w-full { width: 100%; }
.h-full { height: 100%; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.cursor-pointer { cursor: pointer; }

.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }

.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pagination Styles */
.pagination-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.pagination-container .flex {
    align-items: center;
    gap: 0.5rem;
}

.pagination-container .btn-sm {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination-container .btn-sm i {
    font-size: 0.75rem;
}

/* Enhanced pagination styles */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 0.25rem;
}

.pagination-btn:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    color: var(--primary-700);
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: var(--white);
    font-weight: 600;
}

.pagination-btn.active:hover {
    background: var(--primary-700);
    border-color: var(--primary-700);
    transform: none;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: var(--gray-500);
    font-weight: 500;
}

.pagination-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.pagination-stats {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.pagination-page-info {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Items per page selector */
.items-per-page-select {
    appearance: none;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.items-per-page-select:hover {
    border-color: var(--primary-300);
}

.items-per-page-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.select-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--gray-500);
}

/* Performance Optimizations */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Print Styles */
@media print {
    .navbar,
    .sidebar,
    .btn,
    .modal,
    .pagination-container {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}

/* Modern Date Selector Card */
.modern-date-selector-card {
    background: linear-gradient(135deg, var(--white) 0%, rgba(248, 250, 252, 0.8) 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.modern-date-selector-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--info-color));
    border-radius: 20px 20px 0 0;
}

.date-selector-header {
    margin-bottom: 2rem;
    text-align: center;
}

.date-selector-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date-selector-subtitle {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin: 0;
}

.date-selector-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.date-input-section {
    display: flex;
    justify-content: center;
}

.date-input-section .form-group {
    min-width: 250px;
}

.date-range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.date-range-inputs .form-group {
    min-width: 0;
}

.date-input-section .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    justify-content: center;
}

.date-input-section input[type="date"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    background: var(--white);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.date-input-section input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.date-range-inputs .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    justify-content: center;
}

.date-range-inputs input[type="date"] {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    background: var(--white);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.date-range-inputs input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.date-range-inputs select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    background: var(--white);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.date-range-inputs select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.date-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.date-actions .btn {
    min-width: 140px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.date-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.date-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: var(--white);
}

.date-actions .btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #475569);
    border: none;
    color: var(--white);
}

/* Button Outline Style */
.btn-outline {
    background: transparent;
    border: 2px solid #d1d5db;
    color: #374151;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* Subscription Management Styles */
.subscription-status {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
}

.status-indicator {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    min-height: 120px;
}

.status-indicator.status-active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #10b981;
}

.status-indicator.status-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
}

.status-indicator.status-expired {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #ef4444;
}

.status-icon {
    font-size: 3rem;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.status-indicator.status-active .status-icon {
    color: #10b981;
}

.status-indicator.status-warning .status-icon {
    color: #f59e0b;
}

.status-indicator.status-expired .status-icon {
    color: #ef4444;
}

.status-info {
    flex: 1;
    min-width: 0;
}

.status-info h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.status-info p {
    margin: 0 0 1.5rem 0;
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.5;
}

.subscription-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-item .label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item .value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
}

.extend-form {
    display: flex;
    align-items: end;
    gap: 1rem;
}

.extend-form .form-group {
    margin-bottom: 0;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group input {
    width: 120px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.features-grid .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.features-grid .checkbox-label:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.features-grid .checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #3b82f6;
    border-color: #3b82f6;
}

.features-grid .checkbox-label input[type="checkbox"]:checked + .checkmark:after {
    display: block;
}

/* Subscription Form Styling */
.subscription-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.subscription-form .form-group {
    margin-bottom: 0;
}

.subscription-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.subscription-form .form-group input,
.subscription-form .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.subscription-form .form-group input:focus,
.subscription-form .form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.subscription-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: 500;
}

.subscription-form .checkbox-label:hover {
    background: #f1f5f9;
    border-color: #3b82f6;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-trial {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-monthly {
    background: #dbeafe;
    color: #1e40af;
}

.badge-yearly {
    background: #dcfce7;
    color: #166534;
}


.active-row {
    background: #f0f9ff;
}

/* Subscription form styling */
input[readonly] {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

input[readonly]:focus {
    border-color: #e9ecef;
    box-shadow: none;
}

.text-muted {
    color: #6c757d !important;
    font-weight: normal;
}

.subscription-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.subscription-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.extension-history {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.extension-history h4 {
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info strong {
    color: #1f2937;
}

.user-info small {
    color: #6b7280;
    font-size: 0.75rem;
}

/* Subscription Transaction History */
.subscription-transaction-history {
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.subscription-transaction-history h4 {
    color: #374151;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.type-change {
    color: #7c3aed;
    font-weight: 500;
    font-size: 0.875rem;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-primary {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-secondary {
    background: #f3f4f6;
    color: #374151;
}

.badge-light {
    background: #f9fafb;
    color: #6b7280;
}

/* Subscription responsive design */
@media (max-width: 768px) {
    .subscription-status {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .status-indicator {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .status-icon {
        font-size: 2.5rem;
        margin-top: 0;
    }
    
    .status-info h4 {
        font-size: 1.25rem;
    }
    
    .subscription-details {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .detail-item {
        padding: 0.75rem;
    }
    
    .extend-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group input {
        width: 100%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    
    .features-grid .checkbox-label {
        padding: 0.75rem;
    }
    
    .subscription-form .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .subscription-form .checkbox-label {
        padding: 0.5rem;
    }
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #3b82f6;
    color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    text-decoration: none;
}

.btn-outline:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-outline:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form Actions Styling */
.form-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-start;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.form-actions .btn {
    min-width: 140px;
    justify-content: center;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions .btn {
        width: 100%;
        min-width: auto;
    }
}

.date-actions .btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}

.date-actions .btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Responsive adjustments for date selector */
@media (max-width: 768px) {
    .modern-date-selector-card {
        border-radius: 16px;
    }
    
    .date-selector-title {
        font-size: 1.1rem;
    }
    
    .date-selector-subtitle {
        font-size: 0.875rem;
    }
    
    .date-input-section .form-group {
        min-width: 200px;
    }
    
    .date-range-inputs {
        gap: 1rem;
        max-width: 700px;
    }
    
    .date-range-inputs .form-group {
        min-width: 0;
    }
    
    .date-actions {
        gap: 0.75rem;
    }
    
    .date-actions .btn {
        min-width: 120px;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .date-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .date-actions .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .date-input-section .form-group {
        min-width: 180px;
    }
    
    .date-range-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 300px;
    }
    
    .date-range-inputs .form-group {
        min-width: 0;
    }
}

/* Cheque Details Information Styling */
.info-item {
    margin-bottom: 1rem;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.info-label i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

.info-value {
    font-size: 1rem;
    color: var(--gray-800);
    word-break: break-word;
}

/* Status History Styling */
.history-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--white);
    transition: all 0.3s ease;
}

.history-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.history-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.history-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-400);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--gray-200);
    z-index: 2;
}

.history-dot.current {
    background: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.history-line {
    width: 2px;
    height: 40px;
    background: var(--gray-200);
    margin-top: 0.5rem;
}

.history-content {
    flex: 1;
    min-width: 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.status-change {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.history-time {
    font-size: 0.875rem;
    color: var(--gray-500);
    white-space: nowrap;
    flex-shrink: 0;
}

.history-notes {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.history-user {
    font-size: 0.875rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
}

/* Responsive adjustments for cheque details */
@media (max-width: 768px) {
    .history-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .history-timeline {
        flex-direction: row;
        align-items: center;
    }
    
    .history-line {
        width: 40px;
        height: 2px;
        margin-top: 0;
        margin-left: 0.5rem;
    }
    
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .history-time {
        white-space: normal;
    }
}

/* Seven Days Grid */
.seven-days-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    padding-top: 0.5rem;
    min-width: 0;
}

/* Day Overview Cards */
.day-overview-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
    min-height: 120px;
    min-width: 0;
    flex-shrink: 0;
}

.day-overview-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    text-decoration: none;
    color: inherit;
}

.day-overview-card.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.day-overview-card.active:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.day-overview-card.no-cheques {
    background: var(--gray-50);
    border-color: var(--gray-300);
    opacity: 0.7;
}

.day-overview-card.no-cheques:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.day-header {
    text-align: center;
    margin-bottom: 0.75rem;
}

.day-name {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.day-overview-card.active .day-name {
    color: rgba(255, 255, 255, 0.8);
}

.day-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

.day-overview-card.active .day-number {
    color: var(--white);
}

.day-content {
    text-align: center;
}

.cheque-count,
.cheque-amount,
.no-cheques {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.cheque-count {
    color: var(--info-color);
    font-weight: 600;
}

.day-overview-card.active .cheque-count {
    color: rgba(255, 255, 255, 0.9);
}

.cheque-amount {
    color: var(--success-color);
    font-weight: 700;
}

.day-overview-card.active .cheque-amount {
    color: rgba(255, 255, 255, 0.9);
}

.no-cheques {
    color: var(--gray-400);
    font-style: italic;
}

.day-overview-card.active .no-cheques {
    color: rgba(255, 255, 255, 0.7);
}

.current-day-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--success-color);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.625rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: var(--shadow-sm);
}

.day-overview-card.active .current-day-indicator {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    backdrop-filter: blur(10px);
}

/* Responsive adjustments for day overview */
@media (max-width: 1200px) {
    .seven-days-grid {
        gap: 0.5rem;
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
    
    .day-overview-card {
        min-height: 110px;
        padding: 0.75rem;
        min-width: 0;
    }
    
    .day-number {
        font-size: 1.25rem;
    }
    
    .cheque-count,
    .cheque-amount,
    .no-cheques {
        font-size: 0.625rem;
    }
}

@media (max-width: 768px) {
    .seven-days-grid {
        gap: 0.375rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
    
    .seven-days-grid::-webkit-scrollbar {
        height: 4px;
    }
    
    .seven-days-grid::-webkit-scrollbar-track {
        background: var(--gray-100);
        border-radius: 2px;
    }
    
    .seven-days-grid::-webkit-scrollbar-thumb {
        background: var(--gray-300);
        border-radius: 2px;
    }
    
    .seven-days-grid::-webkit-scrollbar-thumb:hover {
        background: var(--gray-400);
    }
    
    .day-overview-card {
        min-height: 100px;
        padding: 0.5rem;
        min-width: 80px;
    }
    
    .day-number {
        font-size: 1.125rem;
    }
    
    .cheque-count,
    .cheque-amount,
    .no-cheques {
        font-size: 0.5rem;
        gap: 0.25rem;
    }
    
    .current-day-indicator {
        font-size: 0.5rem;
        padding: 0.125rem 0.25rem;
    }
    
    .day-name {
        font-size: 0.625rem;
    }
}

@media (max-width: 480px) {
    .seven-days-grid {
        gap: 0.25rem;
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
    
    .day-overview-card {
        min-height: 90px;
        padding: 0.375rem;
        min-width: 70px;
    }
    
    .day-number {
        font-size: 1rem;
    }
    
    .cheque-count,
    .cheque-amount,
    .no-cheques {
        font-size: 0.45rem;
    }
    
    .current-day-indicator {
        font-size: 0.45rem;
        padding: 0.125rem 0.25rem;
    }
}

/* Profile Styles */
.profile-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-info .info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.profile-info .info-item:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.profile-info .info-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.profile-info .info-label i {
    color: #3b82f6;
    width: 18px;
    text-align: center;
    font-size: 1rem;
}

.profile-info .info-value {
    font-size: 1.125rem;
    font-weight: 500;
    color: #1e293b;
    word-break: break-word;
    line-height: 1.5;
}

.profile-info .info-value.font-mono {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #f1f5f9;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 1rem;
}

/* Role Badge Styling */
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.role-super_admin {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.role-badge.role-admin {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.role-badge.role-user {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Profile responsive design */
@media (max-width: 768px) {
    .profile-info .info-item {
        padding: 0.75rem;
    }
    
    .profile-info .info-label {
        font-size: 0.8rem;
        gap: 0.5rem;
    }
    
    .profile-info .info-value {
        font-size: 1rem;
    }
    
    .role-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}

.role-admin {
    background: var(--red-100);
    color: var(--red-700);
}

.role-user {
    background: var(--blue-100);
    color: var(--blue-700);
}

.help-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.help-item:last-child {
    border-bottom: none;
}

.help-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-item p {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

/* Password Change Styles */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--gray-700);
}

.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    background: var(--error-color);
}

.strength-fill.fair {
    background: var(--warning-color);
}

.strength-fill.good {
    background: var(--info-color);
}

.strength-fill.strong {
    background: var(--success-color);
}

.strength-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
}

.password-match {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.match-text {
    font-weight: 500;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.requirement-item i {
    width: 16px;
    text-align: center;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.tip-item i {
    width: 16px;
    text-align: center;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: var(--gray-600);
}

.info-value {
    color: var(--gray-800);
}

.form-control-static {
    padding: 0.75rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    color: var(--gray-700);
}

/* Quick Actions Styles */
.quick-actions-container {
    width: 100%;
}

.quick-actions-grid {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    text-decoration: none;
    color: inherit;
}

.quick-action-btn:hover::before {
    opacity: 0.05;
}

.quick-action-btn:hover .action-icon {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.quick-action-btn:hover .action-title {
    color: var(--primary-color);
}

.action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: 12px;
    color: var(--gray-600);
    font-size: 1.25rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.action-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    position: relative;
    z-index: 2;
}

.action-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    transition: color 0.3s ease;
}

.action-description {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.4;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0;
    margin-top: 0.5rem;
}

/* Responsive adjustments for quick actions */
@media (max-width: 1024px) {
    .quick-actions-grid {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .quick-actions-grid {
        flex-direction: column;
    }
    
    .quick-action-btn {
        padding: 0.875rem;
        gap: 0.75rem;
    }
    
    .action-icon {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }
    
    .action-title {
        font-size: 0.9375rem;
    }
    
    .action-description {
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .quick-action-btn {
        padding: 0.75rem;
        gap: 0.625rem;
    }
    
    .action-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .action-title {
        font-size: 0.875rem;
    }
    
    .action-description {
        font-size: 0.75rem;
    }
}

/* Form Status Styles */
.form-status {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #dc2626;
}

.status-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #dc2626;
    font-size: 0.875rem;
}

.status-message i {
    color: #dc2626;
    flex-shrink: 0;
}

/* Text color utilities */
.text-red-500 {
    color: #dc2626 !important;
}

.text-green-500 {
    color: #16a34a !important;
}

/* Disabled button styles */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Professional Filter Modal Styles */
#filterModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 99999 !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

#filterModal .modal-content {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--gray-200);
    width: 100%;
    max-width: 350px;
    max-height: 70vh;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.2s ease;
}

#filterModal .modal-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-50);
}

#filterModal .modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

#filterModal .modal-header .close {
    color: var(--gray-500);
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
}

#filterModal .modal-header .close:hover {
    color: var(--gray-700);
}

#filterModal .modal-body {
    padding: 1rem;
}

#filterModal .modal-body .form-group {
    margin-bottom: 0.75rem;
}

#filterModal .modal-body .form-group:last-child {
    margin-bottom: 0;
}

#filterModal .modal-body label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.25rem;
}

#filterModal .modal-body input,
#filterModal .modal-body select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

#filterModal .modal-body input:focus,
#filterModal .modal-body select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

#filterModal .modal-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    background: var(--gray-50);
}

#filterModal .modal-footer .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 4px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--info-color);
    padding: 1rem;
    min-width: 300px;
    max-width: 400px;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left-color: var(--success-color);
}

.notification-error {
    border-left-color: var(--error-color);
}

.notification-warning {
    border-left-color: var(--warning-color);
}

.notification-info {
    border-left-color: var(--info-color);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-content i {
    font-size: 1.25rem;
}

.notification-success .notification-content i {
    color: var(--success-color);
}

.notification-error .notification-content i {
    color: var(--error-color);
}

.notification-warning .notification-content i {
    color: var(--warning-color);
}

.notification-info .notification-content i {
    color: var(--info-color);
}

.notification-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.notification-close:hover {
    color: var(--gray-600);
}

/* Tooltip Styles */
.tooltip {
    position: absolute;
    background: var(--gray-800);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
}

.tooltip.show {
    opacity: 1;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--gray-800);
}

/* Form Error States */
.form-control.error {
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.form-control.error:focus {
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile Responsive for Notifications */
@media (max-width: 768px) {
    .notification {
        right: 1rem;
        left: 1rem;
        min-width: auto;
        max-width: none;
    }
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    cursor: pointer;
    margin-right: 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .toggle-switch .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-switch .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch:hover .toggle-slider {
    box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

input:checked + .toggle-switch .toggle-slider:hover {
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

/* Focus styles for accessibility */
input:focus + .toggle-switch .toggle-slider {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

