/* static/css/style.css - Professional UI/UX Enhancement */

/* --- CSS Variables for Consistent Theming --- */
:root {
    /* Professional Corporate Theme */
    --primary-color: #1a365d;
    --secondary-color: #2b77ad;
    --accent-color: #0891b2;
    --success-color: #059669;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --light-bg: #f8fafc;
    --dark-bg: #0f172a;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --gradient-bg: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);

    /* Brand colors - Enhanced */
    --vodafone: #e60000;
    --etisalat: #00a651;
    --orange-brand: #ff7900;
    --we: #5a2a82;
    --electricity: #eab308;
    --water: #0ea5e9;
    --gas: #ea580c;
    --internet: #8b5cf6;
    --banking: #dc2626;
    --government: #059669;
}

/* Utilities migrated from inline <style> in layout.html */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.gradient-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.gradient-secondary { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }

.shadow-professional-hover { box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15); }

/* Brand logo sizing to fill navbar height */
.brand-logo { height: 64px; width: auto; object-fit: contain; display: block; }
.navbar .navbar-brand { padding-top: .25rem; padding-bottom: .25rem; }

/* Ensure collapsed navbar sits above content */
.navbar-collapse { position: relative; z-index: 100000; }

/* Mobile-specific improvements for collapsed menu */
@media (max-width: 991.98px) {
  /* Turn collapsed menu into a fixed dropdown panel under the navbar */
  .navbar-collapse.collapse {
    position: fixed !important;
    top: 80px; /* match body padding-top and navbar height */
    left: 0;
    right: 0;
    width: 100% !important;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    display: none; /* hidden until .show */
    background: #1a365d !important;
    background-image: none !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 100001 !important;
  }
  .navbar-collapse.collapse.show {
    display: block !important;
    padding: 0.75rem 1rem;
    overflow: auto !important; /* override bootstrap collapse hidden overflow */
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important; /* ensure content isn't clipped */
  }
  /* During Bootstrap transition state, keep it visible and fixed */
  .navbar-collapse.collapsing {
    position: fixed !important;
    top: 80px;
    left: 0;
    right: 0;
    width: 100% !important;
    max-height: calc(100vh - 80px);
    overflow-y: auto !important;
    background: #1a365d !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 100001 !important;
    height: auto !important; /* prevent zero-height during animation */
  }
  /* Make nav items readable and vertical inside mobile panel */
  .navbar-dark .navbar-nav .nav-link { color: #fff !important; }
  .navbar .navbar-nav { flex-direction: column; gap: .25rem; }
  .navbar .dropdown-menu { background-color: #123055 !important; color: #fff; }
  .navbar .dropdown-item { color: #fff; }
  .navbar .dropdown-item:hover { background-color: rgba(255,255,255,.1); }
  /* Make dropdowns flow within collapsed panel */
  .navbar .dropdown-menu {
    position: static !important;
    float: none !important;
    transform: none !important;
    box-shadow: none !important;
    margin: 0.25rem 0 0 0 !important;
  }
  /* Keep search results below nav */
  #search-results-container { position: absolute; z-index: 9000; }
}

/* --- Enhanced Typography --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

body {
    background: var(--gradient-bg);
    min-height: 100vh;
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    direction: rtl;
    text-align: right;
}

/* Account for fixed navbar height - reduced for compact layout */
body { padding-top: 70px; }

/* Compact spacing utilities for mobile-first design */
.compact-container {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

/* Reduce default margins on mobile */
@media (max-width: 768px) {
    .mb-4 { margin-bottom: 0.75rem !important; }
    .mb-3 { margin-bottom: 0.5rem !important; }
    .mt-4 { margin-top: 0.75rem !important; }
    .mt-3 { margin-top: 0.5rem !important; }
    .py-4 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
    .py-3 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
    
    /* Compact card headers */
    .card-header { padding: 0.75rem 1rem; }
    .card-body { padding: 1rem; }
    
    /* Compact payment steps */
    .payment-steps { margin-bottom: 0.75rem !important; }
    .step-circle { width: 32px; height: 32px; }
    .step-title { font-size: 0.7rem; margin-top: 2px; }
}

/* --- Arabic Text Support --- */
.arabic-text {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Amiri', 'Noto Sans Arabic', sans-serif;
    font-weight: 500;
}

.arabic-input {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Amiri', 'Noto Sans Arabic', sans-serif;
}

.english-text {
    direction: ltr;
    text-align: left;
}

/* Fix Bootstrap RTL issues */
.input-group .input-group-text {
    border-left: 1px solid #ced4da;
    border-right: none;
}

.input-group .form-control {
    border-right: 1px solid #ced4da;
    border-left: none;
}

.input-group .form-control:first-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group .input-group-text:last-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* --- Professional Container Styling --- */
.main-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin: 20px auto;
    padding: 30px;
}

/* Fix navbar background - completely solid, non-transparent, always on top */
.navbar {
    background-color: #1a365d !important;
    background: #1a365d !important;
    background-image: none !important;
    z-index: 99999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
    filter: none !important;
    overflow: visible !important; /* ensure children like collapsed panel are not clipped */
}
.navbar .container-fluid { overflow: visible !important; }

.navbar-brand {
    font-weight: 700;
    font-size: 1.75rem;
    color: white !important;
    letter-spacing: -0.05em;
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    transition: var(--transition);
    padding: 12px 20px !important;
    border-radius: var(--border-radius-sm);
    margin: 0 4px;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: #f8fafc !important;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: var(--card-shadow);
}

/* --- Navbar Dropdown: Solid, Readable, Scrollable --- */
.dropdown-menu { z-index: 10000 !important; }

.navbar .dropdown-menu {
    background: #1a365d !important; /* solid, no transparency */
    background-image: none !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25) !important;
    max-height: 60vh;               /* scroll when tall */
    overflow-y: auto;
}

.navbar .dropdown-item {
    color: #fff !important;
}

.navbar .dropdown-item:hover,
.navbar .dropdown-item:focus {
    color: #1a365d !important;
    background: #ffffff !important;
}

.navbar .dropdown-divider {
    border-top: 1px solid rgba(255,255,255,0.15) !important;
}

/* Mobile collapse: solid and scrollable */
@media (max-width: 991.98px) {
    .navbar-collapse {
      max-height: calc(100vh - 100px);
      overflow-y: auto;
    }
}

/* --- Professional Card Design --- */
.category-card-link, .service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card, .service-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: var(--card-bg);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    position: relative;
    backdrop-filter: blur(10px);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover, .service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent-color);
}

.category-card .card-body {
    padding: 2.5rem 2rem;
    text-align: center;
}

.category-card .card-body i {
    color: var(--secondary-color);
    transition: var(--transition);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Category icon circular background for a polished look --- */
.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.category-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-secondary);
    box-shadow: 0 8px 32px rgba(14, 165, 233, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.category-icon-circle i {
    -webkit-text-fill-color: initial;
    background: none;
    color: white;
    font-size: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- Modern Category Card Design (matching internal services style) --- */
.category-card-modern {
    background: linear-gradient(135deg, #FF9A76 0%, #FF7E5F 100%);
    border-radius: 24px;
    padding: 48px 24px 32px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(255, 126, 95, 0.2);
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(255, 126, 95, 0.35);
}

.category-card-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    transition: transform 0.6s ease;
    transform: scale(0);
}

.category-card-modern:hover::before {
    transform: scale(1);
}

.category-icon-modern {
    width: 72px;
    height: 72px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.category-icon-modern i {
    font-size: 32px;
    color: #FF7E5F;
    transition: transform 0.3s ease;
}

.category-card-modern:hover .category-icon-modern i {
    transform: scale(1.1) rotate(5deg);
}

.category-image-icon {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

.category-title-modern {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.category-card-link:hover .category-title-modern {
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .category-card-modern {
        padding: 20px 12px 16px;
        min-height: 120px;
        border-radius: 16px;
    }
    
    .category-icon-modern {
        width: 48px;
        height: 48px;
        margin: 0 auto 12px;
    }
    
    .category-icon-modern i {
        font-size: 20px;
    }
    
    .category-title-modern {
        font-size: 13px;
        line-height: 1.3;
    }
    
    .category-image-icon {
        width: 28px;
        height: 28px;
    }
}

.category-card:hover .card-body i {
    transform: scale(1.1) rotate(5deg);
}

.category-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.service-count {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* --- Enhanced Buttons --- */
.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    padding: 14px 28px;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.025em;
    box-shadow: var(--card-shadow);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    background: var(--gradient-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #047857);
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #b91c1c);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #c2410c);
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
    color: white;
}

/* --- Enhanced Forms --- */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    transition: var(--transition);
    background: #fff;
}

.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

/* --- Enhanced Search Bar --- */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 2rem;
}

/* Navbar search wrapper (replaces inline style) */
.nav-search-wrap { max-width: 400px; }

.search-input {
    border-radius: 50px;
    padding: 18px 60px 18px 24px;
    border: 2px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    font-size: 1.1rem;
    background: var(--card-bg);
    color: var(--text-primary);
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.15), var(--card-shadow-hover);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 1.1rem;
}

.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    margin-top: 8px;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.search-result-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* --- Professional Tables --- */
.table {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 16px;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--light-bg);
    transform: scale(1.01);
}

.table td {
    padding: 16px;
    border-color: #f8f9fa;
    vertical-align: middle;
}

/* --- Enhanced Alerts --- */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-left-color: var(--success-color);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-left-color: var(--accent-color);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    border-left-color: var(--secondary-color);
    color: #0c5460;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-left-color: var(--warning-color);
    color: #856404;
}

/* --- Service Detail Page Enhancement --- */
.service-detail-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.service-header {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.service-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* --- Dashboard Enhancements --- */
.dashboard-header {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.dashboard-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    margin-bottom: 1rem;
    font-size: 2.75rem;
    letter-spacing: -0.05em;
    line-height: 1.2;
}

.dashboard-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Stats Cards --- */
.stats-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--accent-color);
}

.stats-card.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
}

.stats-card.success::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, var(--success-color), #047857);
}

.stats-card.warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, var(--warning-color), #c2410c);
}

.stats-card.danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, var(--danger-color), #b91c1c);
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-label {
    color: #6c757d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Loading States --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Services preview dots (brand-accurate) --- */
.service-item {
    padding: 8px 0;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.service-item:hover {
    background: var(--light-bg);
    padding-left: 8px;
    margin-left: -8px;
}

.service-item .service-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-inline-end: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.service-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.provider-vodafone { background-color: var(--vodafone); }
.provider-etisalat { background-color: var(--etisalat); }
.provider-orange { background-color: var(--orange-brand); }
.provider-we { background-color: var(--we); }
.provider-electricity { background-color: var(--electricity); }
.provider-water { background-color: var(--water); }
.provider-gas { background-color: var(--gas); }
.provider-muted { background-color: #b0b8c1; }

/* --- Fix missing text utility colors used in templates --- */
.text-purple { color: #6f42c1 !important; }
.text-orange { color: var(--orange-brand) !important; }
.text-blue { color: #1d9bf0 !important; }
.text-danger { color: var(--accent-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-info { color: var(--secondary-color) !important; }

/* --- Enhanced Pagination --- */
.pagination {
    justify-content: center;
    margin-top: 2rem;
}

.page-link {
    border: none;
    border-radius: 8px;
    margin: 0 4px;
    padding: 12px 16px;
    color: var(--primary-color);
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.page-link:hover {
    background: var(--secondary-color);
    color: #fff;
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* --- Service Result Page Enhancement --- */
.result-container {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.result-header {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.result-body {
    padding: 2rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: var(--primary-color);
}

.result-value {
    font-weight: 500;
    color: #495057;
}

.user-select-all {
    user-select: all;
    background: var(--light-bg);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
}

/* --- Login Page Enhancement --- */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow-hover);
    overflow: hidden;
    max-width: 400px;
    width: 100%;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
}

/* --- Admin Dashboard Enhancement --- */
.admin-header {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: #fff;
    padding: 2rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin-bottom: 0;
}

.admin-stats {
    background: #fff;
    padding: 2rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    box-shadow: var(--card-shadow);
}

/* --- Responsive Design Enhancements --- */
@media (max-width: 768px) {
    .main-container {
        margin: 10px;
        padding: 20px;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .category-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .dashboard-title {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* --- Animation Enhancements --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* --- Print Styles --- */
@media print {
    body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    /* Hide non-essential UI in print */
    nav, .loading-overlay, .btn, .d-print-none { display: none !important; }
    /* Use full width for main content when printing */
    main.container { margin: 0 !important; padding: 0 !important; width: 100% !important; }
}

/* --- Accessibility Enhancements --- */
.btn:focus, .form-control:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Professional Footer Styles */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    margin-top: auto;
}

.footer-title {
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-link:hover {
    color: var(--accent-color);
    text-decoration: none;
    transform: translateX(-5px);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 0;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

/* Enhanced Dropdown Styling */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    margin-top: 8px;
}

.dropdown-item {
    padding: 10px 16px;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin: 2px 8px;
}

.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateX(-3px);
}

.dropdown-item-text {
    padding: 10px 16px;
    margin: 2px 8px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

/* Enhanced Shadow System */
.shadow-professional {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Mobile-First Hamburger Navigation */
.hamburger-menu {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Fix navbar toggler visibility */
.navbar-toggler {
    border: none !important;
    padding: 0.25rem 0.5rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    border-radius: 0.375rem;
}

.navbar-toggler:focus {
    text-decoration: none;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

/* Ensure mobile menu is visible */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #1a365d !important;
        background-image: none !important;
        backdrop-filter: none !important;
        border-radius: 0.5rem;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
        opacity: 1 !important;
    }
    
    .navbar-nav .nav-link {
        color: white !important;
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Additional color classes for service icons */
.text-purple { color: #6f42c1 !important; }
.text-orange { color: var(--orange-brand) !important; }
.text-blue { color: #0d6efd !important; }
.text-teal { color: #20c997 !important; }
.text-pink { color: #d63384 !important; }

/* Enhanced category card styling */
.category-card {
border: none;
border-radius: 15px;
background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
backdrop-filter: blur(10px);
transition: all 0.3s ease;
overflow: hidden;
}

.category-card:hover {
transform: translateY(-5px);
box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.category-card-link {
text-decoration: none;
color: inherit;
}

.category-card-link:hover {
color: inherit;
text-decoration: none;
}

.category-icon {
transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
transform: scale(1.1);
}

.category-title {
font-weight: 600;
color: #2c3e50;
}

.service-count {
font-size: 0.9rem;
}

.services-preview {
background: rgba(248,249,250,0.8);
border-radius: 0 0 15px 15px;
}

.service-item {
padding: 0.25rem 0;
font-size: 0.85rem;
}

.service-dot {
font-size: 0.6rem;
}

.service-name {
font-weight: 500;
color: #495057;
}

/* --- Horizontal Scroller for Topup Services --- */
.horizontal-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.horizontal-scroll::-webkit-scrollbar {
  height: 8px;
}
.horizontal-scroll::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
}
.horizontal-scroll::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
}

.hs-item {
  flex: 0 0 auto;
  width: 260px; /* Card width */
  scroll-snap-align: start;
}

@media (max-width: 576px) {
  .hs-item { width: 80%; }
}

/* Stack topup items vertically on tablets and mobiles */
@media (max-width: 991.98px) {
  .horizontal-scroll {
    display: block;
    overflow-x: visible;
    scroll-snap-type: none;
    gap: 0;
    padding-bottom: 0;
  }
  .hs-item {
    width: 100%;
    margin-bottom: 1rem;
  }
  .hs-item:last-child { margin-bottom: 0; }
}

.more-services {
margin-top: 0.5rem;
padding-top: 0.5rem;
border-top: 1px solid rgba(0,0,0,0.1);
}

/* Card footer styling */
.card-footer .btn {
border-radius: 20px;
font-weight: 500;
transition: all 0.3s ease;
}

.card-footer .btn:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

/* Mobile-Responsive Category Cards */
.category-card {
background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 16px;
padding: 1.5rem;
transition: all 0.3s ease;
cursor: pointer;
min-height: 200px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 200px;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.category-header {
    text-align: center;
    margin-bottom: 1rem;
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.stats-number {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.stats-label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.services-preview {
    margin: 1rem 0;
}

.service-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.service-item:last-child {
    border-bottom: none;
}

.service-dot {
    font-size: 0.8rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.service-name {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.3;
}

.category-link {
    display: inline-flex;
    align-items: center;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

.category-link:hover {
    color: var(--primary-color);
    transform: translateX(-3px);
}

/* Mobile-Responsive Stats Cards */
.stats-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stats-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stats-label {
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Body Layout Enhancement */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* Mobile-First Responsive Design */
@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .dashboard-subtitle {
        font-size: 0.9rem;
    }
    
    .category-card {
        padding: 1rem;
        min-height: 160px;
    }
    
    .category-icon {
        font-size: 2rem;
    }
    
    .category-title {
        font-size: 1rem;
    }
    
    .stats-number {
        font-size: 1.25rem;
    }
    
    .stats-label {
        font-size: 0.75rem;
    }
    
    .navbar-brand span {
        font-size: 0.9rem;
    }
    
    .search-input {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        margin: 0.5rem 0;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .social-links {
        justify-content: flex-start;
        margin-top: 1rem;
    }
}

/* Touch-Friendly Interactive Elements */
@media (hover: none) and (pointer: coarse) {
    .category-card:hover,
    .stats-card:hover {
        transform: none;
    }
    
    .category-card:active {
        transform: scale(0.98);
    }
    
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Enhanced Search Input Styling */
.search-input {
    padding-right: 40px !important;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Accessibility Enhancements */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* --- POS / Mobile Optimizations --- */
/* Designed for handhelds and portable POS devices */
@media (max-width: 768px) {
  /* Larger tap targets and readable text */
  html { font-size: 16px; }
  body { line-height: 1.8; }

  .btn {
    min-height: 52px;
    padding: 14px 18px;
    font-size: 1rem;
    border-radius: 12px;
  }

  .form-control,
  .form-select {
    min-height: 50px;
    font-size: 16px; /* Prevent iOS zoom */
    padding: 14px 14px;
    border-radius: 10px;
  }

  /* Option cards in 2 columns for faster selection */
  .row.g-3 .col-md-3,
  .row.g-4 .col-md-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .category-card .card-body,
  .service-card .card-body,
  .stats-card {
    padding: 1.25rem 1rem;
  }

  /* Make headers compact, nav easy */
  .navbar { padding: .5rem 0; }
  .brand-logo { height: 56px; }
}

/* Extra-small screens (older handheld POS) */
@media (max-width: 420px) {
  .row.g-3 .col-md-3,
  .row.g-4 .col-md-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .dashboard-title { font-size: 1.4rem; }
}

/* Touch: remove hover lifts, keep active feedback */
@media (hover: none) and (pointer: coarse) {
  .category-card:hover,
  .service-card:hover,
  .stats-card:hover,
  .table tbody tr:hover { transform: none; box-shadow: var(--card-shadow); }

  .category-card:active,
  .service-card:active,
  .btn:active { transform: scale(0.98); }
}

/* Tables: improve mobile usability */
@media (max-width: 768px) {
  .table { font-size: 0.95rem; }
  .table td, .table th { padding: 14px 10px; }
  /* Ensure scroll instead of squashing */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Sticky action bar for primary actions on POS pages (optional) */
.pos-action-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-color);
  padding: .75rem;
  z-index: 1040;
}

.pos-action-bar .btn {
  width: 100%;
  font-size: 1.05rem;
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}

/* ============================================= */
/* ✅ Enhanced Mobile-First Responsive Design    */
/* ============================================= */

/* Base Mobile Optimizations */
@media (max-width: 768px) {
    /* Ensure proper viewport handling */
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* Better container spacing for mobile */
    .container, .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    /* Larger tap targets for touch */
    .btn {
        min-height: 48px;
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .btn-sm {
        min-height: 40px;
        padding: 8px 14px;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        min-height: 56px;
        padding: 16px 24px;
        font-size: 1.1rem;
    }
    
    /* Form inputs - larger for touch */
    .form-control, .form-select {
        min-height: 48px;
        font-size: 16px !important; /* Prevent iOS zoom */
        padding: 12px 16px;
    }
    
    /* Cards - full width on mobile */
    .card {
        margin-left: -12px;
        margin-right: -12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .card-body {
        padding: 16px;
    }
    
    /* Tables - horizontal scroll */
    .table-responsive {
        margin: 0 -12px;
        padding: 0 12px;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th, .table td {
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    /* Typography adjustments */
    h1, .h1 { font-size: 1.75rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.25rem; }
    h4, .h4 { font-size: 1.1rem; }
    h5, .h5 { font-size: 1rem; }
    
    /* Alert messages */
    .alert {
        padding: 12px 16px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    /* Modals - full screen on mobile */
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }
    
    .modal-content {
        border-radius: 0;
        min-height: 100vh;
    }
    
    /* Badge sizing */
    .badge {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    /* List groups */
    .list-group-item {
        padding: 14px 16px;
    }
    
    /* Hide non-essential elements on mobile */
    .d-mobile-none {
        display: none !important;
    }
}

/* Extra Small Devices (phones < 576px) */
@media (max-width: 575.98px) {
    /* Even more compact for small phones */
    .container, .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    /* Stack buttons vertically */
    .btn-group-mobile-stack {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-group-mobile-stack .btn {
        width: 100%;
    }
    
    /* Full width action buttons */
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    /* Smaller text for very small screens */
    body {
        font-size: 0.9rem;
    }
    
    /* Receipt/report adjustments */
    #receipt-summary {
        font-size: 1rem !important;
    }
    
    #receipt-summary li {
        padding: 4px 0;
    }
}

/* Medium devices (tablets) */
@media (min-width: 576px) and (max-width: 991.98px) {
    .card {
        margin-left: 0;
        margin-right: 0;
        border-radius: var(--border-radius);
        border: 1px solid var(--border-color);
    }
    
    /* 2-column grid for tablets */
    .row.mobile-2-cols > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Navigation improvements for mobile */
@media (max-width: 768px) {
    /* Fixed bottom navigation bar (optional) */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        padding: 8px 16px;
        z-index: 1050;
        display: flex;
        justify-content: space-around;
    }
    
    .mobile-bottom-nav .nav-item {
        flex: 1;
        text-align: center;
    }
    
    .mobile-bottom-nav .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: var(--text-secondary);
        font-size: 0.7rem;
        padding: 4px;
    }
    
    .mobile-bottom-nav .nav-link i {
        font-size: 1.25rem;
        margin-bottom: 2px;
    }
    
    .mobile-bottom-nav .nav-link.active {
        color: var(--primary-color);
    }
    
    /* Main content padding when bottom nav is present */
    body.has-bottom-nav main {
        padding-bottom: 70px;
    }
}

/* Payment steps - mobile friendly */
@media (max-width: 768px) {
    .payment-steps {
        margin-bottom: 1.5rem;
    }
    
    .step-circle {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    
    .step-title {
        font-size: 0.75rem;
        margin-top: 4px;
    }
    
    /* Info cards - stack on mobile */
    .info-section .row.g-3 > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .info-card {
        padding: 12px;
    }
    
    .info-label {
        font-size: 0.8rem;
    }
    
    .info-value {
        font-size: 1rem;
    }
}

/* Transaction report - mobile optimized */
@media (max-width: 576px) {
    #receipt-card {
        margin: 0 -12px;
        border-radius: 0;
    }
    
    #receipt-card .card-body {
        padding: 16px;
    }
    
    /* Improve touch targets for print button */
    #receipt-card .btn {
        padding: 14px 20px;
    }
}

/* Dashboard mobile improvements */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 1rem 0;
    }
    
    .dashboard-title {
        font-size: 1.4rem;
    }
    
    .dashboard-subtitle {
        font-size: 0.85rem;
    }
    
    /* Category cards - 2 per row */
    .category-grid .col-md-4,
    .category-grid .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .category-card {
        min-height: 140px;
        padding: 12px;
    }
    
    .category-icon-modern {
        width: 48px;
        height: 48px;
    }
    
    .category-icon-modern i {
        font-size: 1.25rem;
    }
    
    .category-title-modern {
        font-size: 0.85rem;
    }
}

/* Services list mobile */
@media (max-width: 768px) {
    .service-card {
        padding: 12px;
    }
    
    .service-card .card-title {
        font-size: 1rem;
    }
    
    .service-card .card-text {
        font-size: 0.85rem;
    }
}

/* Login page - mobile centered */
@media (max-width: 576px) {
    .login-container {
        padding: 16px;
    }
    
    .login-card {
        max-width: 100%;
        margin: 0;
    }
    
    .login-header {
        padding: 1.5rem;
    }
    
    .login-body {
        padding: 1.5rem;
    }
}

/* Admin tables - horizontal scroll */
@media (max-width: 768px) {
    .admin-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding: 0 12px;
    }
    
    .admin-table-wrapper table {
        min-width: 600px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects */
    .category-card:hover,
    .service-card:hover,
    .btn:hover {
        transform: none;
    }
    
    /* Active state feedback */
    .category-card:active,
    .service-card:active,
    .btn:active {
        transform: scale(0.97);
        opacity: 0.9;
    }
    
    /* Larger touch targets */
    .btn {
        min-height: 48px;
    }
    
    /* Remove hover shadows */
    .category-card:hover,
    .service-card:hover {
        box-shadow: var(--card-shadow);
    }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
    
    body.has-bottom-nav main {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

/* Landscape mode adjustments */
@media (max-width: 896px) and (orientation: landscape) {
    .navbar {
        padding: 8px 16px;
    }
    
    .new-navbar {
        padding: 8px 12px;
    }
    
    body {
        padding-top: 60px;
    }
    
    main.container {
        margin-top: 70px !important;
    }
}

/* RTL specific mobile fixes */
@media (max-width: 768px) {
    [dir="rtl"] .btn-group > .btn:first-child {
        border-radius: 0 8px 8px 0;
    }
    
    [dir="rtl"] .btn-group > .btn:last-child {
        border-radius: 8px 0 0 8px;
    }
    
    [dir="rtl"] .input-group .form-control:first-child {
        border-radius: 0 8px 8px 0;
    }
    
    [dir="rtl"] .input-group .input-group-text:last-child {
        border-radius: 8px 0 0 8px;
    }
}

/* Search dropdown mobile */
@media (max-width: 768px) {
    .search-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        max-height: 60vh;
        overflow-y: auto;
        z-index: 1060;
    }
    
    .search-item {
        padding: 12px 16px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .search-item:active {
        background: #f5f5f5;
    }
}

