* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
    height: 100%; /* Ensure html and body take full height */
}

:root {
    --primary-color: #4A90E2;
    --secondary-color: #6C5CE7;
    --accent-color: #00B894;
    --light-gray: #F5F5F5;
    --medium-gray: #E0E0E0;
    --dark-gray: #757575;
    --text-color: #333333;
    --card-radius: 12px;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Dark theme variables */
.dark {
    --primary-color: #4A90E2;
    --secondary-color: #6C5CE7;
    --accent-color: #00B894;
    --light-gray: #1F2937;
    --medium-gray: #374151;
    --dark-gray: #9CA3AF;
    --text-color: #E5E7EB;
    background-color: #0b1220;
}

body {
    background-color: #F8F9FA;
    color: var(--text-color);
}

.app-container {
    /* Default to full width on desktop */
    width: 100%;
    background-color: var(--light-gray); /* Use variable for theme consistency */
    height: 100vh;
    position: relative;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Apply mobile-specific styling for screens up to 768px */
@media (max-width: 768px) {
    .app-container {
        max-width: 500px; /* Constrain width for mobile devices */
        margin: 0 auto; /* Center on mobile devices */
    }
}

.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: white;
    font-size: 14px;
    align-items: center;
}

.status-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

header {
    padding: 20px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-size: 24px;
    font-weight: 700;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar {
    margin: 0 15px 20px;
    background-color: var(--light-gray);
    border-radius: 20px;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-bar input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 16px;
}

.categories {
    display: flex;
    overflow-x: auto;
    padding: 0 15px 15px;
    gap: 20px;
    scrollbar-width: none; /* Firefox */
}

.categories::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.category {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--dark-gray);
    min-width: 60px;
}

.category.active {
    color: var(--primary-color);
}

.category i {
    font-size: 20px;
    background-color: var(--light-gray);
    padding: 12px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category.active i {
    background-color: var(--primary-color);
    color: white;
}

.category span {
    font-size: 12px;
    font-weight: 500;
}

.content-section {
    padding: 15px;
    flex: 1;
}

h2 {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 600;
}

.cards-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    scrollbar-width: none;
}

.cards-container::-webkit-scrollbar {
    display: none;
}

.card {
    min-width: 160px;
    background: white;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.card-image {
    height: 100px;
    width: 100%;
}

.blue {
    background-color: var(--primary-color);
}

.purple {
    background-color: var(--secondary-color);
}

.green {
    background-color: var(--accent-color);
}

.card-content {
    padding: 12px;
}

.card-content h3 {
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 600;
}

.card-content p {
    font-size: 12px;
    color: var(--dark-gray);
}

/* New/Updated styles for "Son əməliyyatlar" (Recent Activities) */
.list-container {
    background: white;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Enhanced shadow */
}

.list-item {
    display: flex; /* Ensure flex layout */
    align-items: center; /* Vertically align items */
    padding: 16px; /* Good touch target and spacing */
    gap: 12px; /* Space between elements */
    cursor: pointer;
    transition: background-color .2s ease, transform .1s ease;
    border-bottom: 1px solid #e5e7eb; /* Separator */
}

.list-item:last-child {
    border-bottom: none; /* No border for the last item */
}

.list-item:hover {
    background: #f8fafc;
    transform: translateY(-1px); /* Slight lift on hover */
}

.list-icon {
    width: 44px; /* Increased size for touch targets */
    height: 44px; /* Increased size for touch targets */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; /* Make it round */
    font-size: 18px; /* Icon size */
    flex-shrink: 0; /* Prevent icon from shrinking */
    color: white; /* Default icon color */
}
/* Specific icon background colors for better context */
.list-icon.blue-bg { background-color: #3b82f6; } /* Tailwind blue-500 */
.list-icon.green-bg { background-color: #10b981; } /* Tailwind green-500 */
.list-icon.red-bg { background-color: #ef4444; } /* Tailwind red-500 */
.list-icon.purple-bg { background-color: #8b5cf6; } /* Tailwind purple-500 */
.list-icon.orange-bg { background-color: #f97316; } /* Tailwind orange-500 */
.list-icon.yellow-bg { background-color: #eab308; } /* Tailwind yellow-500 */

.list-content {
    flex-grow: 1; /* Take up available space */
    overflow: hidden; /* Hide overflow for truncate */
}

.list-content h3 {
    font-size: 15px; /* Slightly larger title */
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    line-height: 1.2;
    white-space: nowrap; /* Prevent title from wrapping */
    overflow: hidden;
    text-overflow: ellipsis; /* Truncate long titles */
}

.list-content p {
    color: #6b7280;
    font-size: 13px; /* Slightly larger message text */
    line-height: 1.4;
}

.list-content .text-xs.text-gray-400 {
    font-size: 11px; /* Keep date slightly smaller */
    color: #9ca3af;
    margin-top: 4px;
}

.list-item .fas.fa-chevron-right {
    font-size: 14px;
    color: #9ca3af;
    flex-shrink: 0;
    margin-left: 8px; /* Ensure space from text */
}

/* Modern bottom navigation */
.bottom-nav {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr 1fr 1fr;
    background-color: white;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    padding: 8px 0;
    margin-top: auto;
    border-radius: 20px 20px 0 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--dark-gray);
    font-size: 10px;
    gap: 4px;
    padding: 8px 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item.active {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.nav-item i {
    font-size: 18px;
    padding: 8px;
    border-radius: 12px;
    background: rgba(74, 144, 226, 0.05);
    transition: all 0.3s ease;
}

.nav-item.active i {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* Center menu button - larger and more prominent */
.nav-menu-center {
    position: relative;
}

.nav-menu-center i {
    font-size: 24px;
    padding: 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.nav-menu-center.active i {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.nav-menu-center span {
    font-weight: 600;
    font-size: 11px;
}

/* Hover effects for better interactivity */
.nav-item:hover:not(.active) {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.nav-item:hover:not(.active) i {
    background: rgba(74, 144, 226, 0.1);
    transform: scale(1.05);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 0 15px 15px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: white;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow);
    padding: 15px;
    height: 110px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.menu-item:active {
    transform: scale(0.95);
}

.menu-item i {
    font-size: 24px;
    color: var(--primary-color);
    background-color: rgba(74, 144, 226, 0.1);
    padding: 15px;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-item span {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: var(--text-color);
}

/* small icon button */
.icon-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    color: var(--dark-gray);
    cursor: pointer;
    position: relative;
    transition: background-color 0.15s, transform 0.08s;
}
.icon-button:hover { background: rgba(0,0,0,0.04); transform: translateY(-1px); }

/* badge for notifications */
.icon-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 999px;
    min-width: 16px;
    text-align: center;
}

/* New/Updated styles for Toast notifications */
.toast-wrapper {
    position: fixed;
    right: 1rem;
    bottom: 6.5rem; /* Adjusted for better clearance above bottom nav on mobile */
    left: 1rem; /* For full width on mobile */
    max-width: calc(100% - 2rem); /* Limit width on larger screens */
    display: flex;
    flex-direction: column;
    gap: 10px; /* Slightly increased gap */
    z-index: 80;
    pointer-events: none;
    align-items: flex-end; /* Align toasts to the right */
}

@media (min-width: 768px) {
    .toast-wrapper {
        left: auto; /* Revert left position on larger screens */
        max-width: 380px; /* Max width for desktop toasts */
    }
}

.toast {
    pointer-events: auto;
    width: 100%; /* Full width within wrapper on mobile */
    background: rgba(255,255,255,0.98);
    color: var(--text-color);
    border-radius: 12px; /* Slightly more rounded */
    box-shadow: 0 8px 20px rgba(0,0,0,0.15); /* More prominent shadow */
    padding: 12px 16px; /* Increased padding */
    display: flex;
    gap: 12px; /* Slightly increased gap */
    align-items: flex-start; /* Align icon and text to start */
    transform: translateY(10px); /* Adjusted initial transform */
    opacity: 0;
    transition: transform 250ms cubic-bezier(.2,.9,.3,1), opacity 200ms;
    backdrop-filter: blur(5px); /* Add a subtle blur effect */
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Specific border and icon background colors */
.toast.success { border-left: 5px solid #10b981; } /* Green */
.toast.error   { border-left: 5px solid #ef4444; } /* Red */
.toast.info    { border-left: 5px solid #3b82f6; } /* Blue */

.toast .t-icon {
    width: 32px; /* Slightly larger icon */
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px; /* Slightly more rounded icon background */
    font-size: 16px; /* Icon size */
    color: white; /* Icon color */
}
.toast.success .t-icon { background: #10b981; }
.toast.error .t-icon   { background: #ef4444; }
.toast.info .t-icon    { background: #3b82f6; }

.toast .t-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.toast .t-title {
    font-weight: 700; /* Bolder title */
    font-size: 14px; /* Slightly larger title font */
    color: #1f2937;
    margin-bottom: 4px; /* Space from message */
}

.toast .t-msg {
    font-size: 12px;
    color: #4b5563; /* Slightly darker gray for message */
    line-height: 1.4;
}

.toast .t-msg.text-xs { /* For details */
    font-size: 11px;
    color: #6b7280;
}

/* Dark mode adjustments for toasts */
.dark .toast {
    background: rgba(31, 41, 55, 0.98); /* Darker background */
    color: var(--text-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.dark .toast .t-title { color: #e5e7eb; }
.dark .toast .t-msg { color: #9ca3af; }
.dark .toast .t-msg.text-xs { color: #d1d5db; }

/* sync icon states */
.sync-syncing { animation: spin 1s linear infinite; color: #f59e0b; }
.sync-ok { color: #10b981; }
.sync-error { color: #ef4444; }

/* simple spinner animation */
@keyframes spin { from { transform: rotate(0deg);} to { transform: rotate(360deg);} }

/* dark-mode specific adjustments */
.dark .status-bar { background: transparent; }
.dark .icon-button { color: var(--text-color); }
.dark header { color: var(--text-color); }

/* Enhanced professional styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Professional button styles */
.btn {
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.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%;
}

/* Enhanced card animations */
.feature-card,
.process-step,
.menu-item {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }

/* Enhanced hover effects */
.feature-card:hover,
.process-step:hover,
.menu-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
}

/* Professional gradient overlays */
.gradient-overlay {
    background: linear-gradient(135deg, 
        rgba(102, 126, 234, 0.9) 0%,
        rgba(118, 75, 162, 0.9) 100%
    );
}

/* Enhanced typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

p {
    line-height: 1.6;
    color: #64748b;
}

/* Modern glassmorphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Professional loading animation */
@keyframes modernSpin {
    0% { 
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
    50% { 
        transform: rotate(180deg) scale(1.1);
        opacity: 0.8;
    }
    100% { 
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}

.loading-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.loading-screen i {
    animation: modernSpin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

/* Enhanced mobile-first responsive design */
@media (max-width: 480px) {
    /* Base mobile optimizations */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    body {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Status bar mobile optimization */
    .status-bar {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Header mobile optimization */
    header {
        padding: 16px 12px;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    .avatar {
        width: 36px;
        height: 36px;
    }
    
    /* Search bar mobile optimization */
    .search-bar {
        margin: 0 12px 16px;
        padding: 12px 16px;
    }
    
    /* Categories mobile optimization */
    .categories {
        padding: 0 12px 12px;
        gap: 16px;
    }
    
    .category i {
        width: 40px;
        height: 40px;
        padding: 10px;
        font-size: 18px;
    }
    
    .category span {
        font-size: 11px;
    }
    
    /* Content section mobile optimization */
    .content-section {
        padding: 12px;
    }
    
    /* Menu grid mobile optimization */
    .menu-grid {
        gap: 12px;
        padding: 0 12px 12px;
    }
    
    .menu-item {
        height: 100px;
        padding: 12px 8px;
        min-height: 44px; /* iOS touch target minimum */
    }
    
    .menu-item i {
        font-size: 20px;
        padding: 12px;
        width: 48px;
        height: 48px;
    }
    
    .menu-item span {
        font-size: 12px;
        line-height: 1.2;
        margin-top: 8px;
    }
    
    /* Cards mobile optimization */
    .cards-container {
        gap: 12px;
        padding: 0 12px;
    }
    
    .card {
        min-width: 140px;
    }
    
    .card-image {
        height: 80px;
    }
    
    .card-content {
        padding: 10px;
    }
    
    .card-content h3 {
        font-size: 14px;
    }
    
    .card-content p {
        font-size: 11px;
    }
    
    /* List container mobile optimization */
    .list-container {
        margin: 0 -12px;
        border-radius: 0;
    }
    
    .list-item {
        padding: 16px;
        border-left: none;
        border-right: none;
    }
    
    .list-icon {
        width: 36px;
        height: 36px;
        margin-right: 12px;
    }
    
    .list-content h3 {
        font-size: 15px;
        margin-bottom: 4px;
    }
    
    .list-content p {
        font-size: 13px;
    }
    
    /* Bottom navigation mobile optimization */
    .bottom-nav {
        padding: 6px 0 8px;
        grid-template-columns: 1fr 1fr 1.3fr 1fr 1fr;
    }
    
    .nav-item {
        font-size: 9px;
        gap: 3px;
        padding: 6px 2px;
        min-height: 44px;
    }
    
    .nav-item i {
        font-size: 16px;
        padding: 6px;
    }
    
    .nav-menu-center i {
        font-size: 20px;
        padding: 12px;
    }
    
    .nav-menu-center span {
        font-size: 10px;
    }
    
    /* Form elements mobile optimization */
    input, select, textarea {
        font-size: 16px !important; /* Prevent zoom on iOS */
        padding: 12px 16px;
        min-height: 44px;
        border-radius: 8px;
    }
    
    button {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    /* Table mobile optimization - convert to cards */
    .list-container table {
        display: none;
    }
    
    .mobile-card-list {
        display: block;
    }
    
    .mobile-card-item {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding-bottom: 8px;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .mobile-card-title {
        font-weight: 600;
        font-size: 16px;
        color: #1f2937;
    }
    
    .mobile-card-status {
        font-size: 12px;
        padding: 4px 8px;
        border-radius: 12px;
    }
    
    .mobile-card-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        font-size: 14px;
    }
    
    .mobile-card-field {
        display: flex;
        flex-direction: column;
    }
    
    .mobile-card-label {
        font-size: 12px;
        color: #6b7280;
        margin-bottom: 2px;
    }
    
    .mobile-card-value {
        font-weight: 500;
        color: #1f2937;
    }
    
    /* Modal mobile optimization */
    .fixed.inset-0 {
        padding: 8px;
    }
    
    .modal-content {
        max-height: 95vh;
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .modal-header {
        padding: 16px;
        border-bottom: 1px solid #e5e7eb;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }
    
    .modal-body {
        padding: 16px;
        overflow-y: auto;
        max-height: calc(95vh - 140px);
    }
    
    .modal-footer {
        padding: 16px;
        border-top: 1px solid #e5e7eb;
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 10;
    }
    
    /* Grid mobile optimization */
    .grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .grid-cols-4 {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .grid-cols-5 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .sm\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    /* Form grid mobile optimization */
    .form-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Dashboard cards mobile optimization */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* Invoice/document mobile optimization */
    .invoice-items-grid {
        display: none;
    }
    
    .invoice-items-mobile {
        display: block;
    }
    
    .invoice-item-mobile {
        background: #f9fafb;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 8px;
    }
    
    /* Spacing adjustments */
    .space-x-2 > * + * {
        margin-left: 8px;
    }
    
    .space-y-2 > * + * {
        margin-top: 8px;
    }
    
    .space-y-4 > * + * {
        margin-top: 16px;
    }
    
    /* Text size adjustments */
    .text-xs {
        font-size: 11px;
    }
    
    .text-sm {
        font-size: 13px;
    }
    
    .text-base {
        font-size: 16px;
    }
    
    .text-lg {
        font-size: 18px;
    }
    
    .text-xl {
        font-size: 20px;
    }
    
    .text-2xl {
        font-size: 24px;
    }
    
    /* Touch optimization */
    .touch-item {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Scroll optimization */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .overflow-x-auto::-webkit-scrollbar {
        display: none;
    }
    
    /* Landing page mobile optimization */
    .landing {
        padding: 0;
    }
    
    .navigation {
        padding: 12px 16px;
    }
    
    .hero-section {
        padding: 40px 16px;
    }
    
    .hero-section h1 {
        font-size: 28px;
        line-height: 1.3;
    }
    
    .hero-section p {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .hero-image {
        margin: 24px auto;
        border-radius: 12px;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .btn {
        padding: 16px 24px;
        font-size: 16px;
        width: 100%;
        text-align: center;
    }
    
    .features-section {
        padding: 40px 16px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .feature-card {
        padding: 24px 16px;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    /* Toast mobile optimization */
    .toast-wrapper {
        right: 8px;
        left: 8px;
        bottom: 90px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
        font-size: 14px;
    }
}

/* Medium mobile screens (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-grid.sm\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large mobile screens and small tablets (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .app-container {
        max-width: 100vw;
    }
    
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .menu-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Show table view on larger screens */
    .list-container table {
        display: table;
    }
    
    .mobile-card-list {
        display: none;
    }
}

/* Additional mobile-specific utilities */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 769px) {
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
}

/* Improved form layouts for mobile */
.mobile-form-section {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-form-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-form-field {
    margin-bottom: 16px;
}

.mobile-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.mobile-form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

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

.mobile-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.mobile-form-actions button {
    flex: 1;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
}

/* Enhanced Table Styling with Borders and Numbering */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.modern-table thead {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.modern-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.modern-table th:last-child {
    border-right: none;
}

.modern-table tbody tr {
    position: relative;
    transition: all 0.2s ease;
    border-bottom: 1px solid #e5e7eb;
}

.modern-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.modern-table tbody tr:hover {
    background-color: #e0f2fe !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.modern-table td {
    padding: 14px 12px;
    border-right: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
    font-size: 14px;
    position: relative;
}

.modern-table td:last-child {
    border-right: none;
}

.modern-table tbody tr:last-child {
    border-bottom: none;
}

/* Enhanced Row numbering */
.modern-table .row-number {
    width: 70px;
    text-align: center;
    font-weight: 700;
    color: #6b7280;
    background-color: #f8fafc;
    position: relative;
    border-right: 2px solid #3b82f6 !important;
    font-size: 13px;
}

.modern-table .row-number::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #3b82f6, #1d4ed8);
}

/* Enhanced status badges in tables */
.table-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.status-active { 
    background: #d1fae5; 
    color: #065f46; 
    border-color: #10b981;
}
.status-pending { 
    background: #fef3c7; 
    color: #92400e; 
    border-color: #f59e0b;
}
.status-inactive { 
    background: #fee2e2; 
    color: #991b1b; 
    border-color: #ef4444;
}
.status-draft { 
    background: #e0e7ff; 
    color: #3730a3; 
    border-color: #6366f1;
}
.status-confirmed { 
    background: #dbeafe; 
    color: #1e40af; 
    border-color: #3b82f6;
}
.status-paid { 
    background: #d1fae5; 
    color: #065f46; 
    border-color: #10b981;
}
.status-cancelled { 
    background: #fecaca; 
    color: #dc2626; 
    border-color: #ef4444;
}

/* Enhanced action buttons in tables */
.table-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.table-action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}

.table-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.table-action-btn:hover::before {
    left: 100%;
}

.table-action-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.btn-view { 
    background: #e0f2fe; 
    color: #0369a1; 
    border-color: #0ea5e9;
}
.btn-view:hover { 
    background: #0369a1; 
    color: white; 
    border-color: #0369a1;
}

.btn-edit { 
    background: #ecfccb; 
    color: #365314; 
    border-color: #65a30d;
}
.btn-edit:hover { 
    background: #365314; 
    color: white; 
    border-color: #365314;
}

.btn-delete { 
    background: #fee2e2; 
    color: #dc2626; 
    border-color: #ef4444;
}
.btn-delete:hover { 
    background: #dc2626; 
    color: white; 
    border-color: #dc2626;
}

.btn-print { 
    background: #f3e8ff; 
    color: #7c3aed; 
    border-color: #a855f7;
}
.btn-print:hover { 
    background: #7c3aed; 
    color: white; 
    border-color: #7c3aed;
}

/* Numeric columns alignment */
.modern-table .numeric {
    text-align: right;
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* Enhanced table search container */
.table-search-container {
    position: relative;
    margin-bottom: 20px;
}

.table-search {
    width: 100%;
    padding: 14px 18px 14px 48px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

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

.table-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
}

/* Table pagination */
.table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 16px;
}

.pagination-info {
    color: #6b7280;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    gap: 4px;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #6b7280;
}

.pagination-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.pagination-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Enhanced mobile table cards */
.mobile-table-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 16px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    cursor: pointer;
}

.mobile-table-card:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    transform: translateY(-3px);
    border-color: #3b82f6;
}

.mobile-table-card::before {
    content: attr(data-row);
    position: absolute;
    top: -10px;
    left: 18px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f3f4f6;
}

.mobile-card-title {
    font-weight: 700;
    font-size: 18px;
    color: #1f2937;
    line-height: 1.3;
}

.mobile-card-status {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 16px;
    font-weight: 600;
}

.mobile-card-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    font-size: 14px;
}

.mobile-card-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-card-field.col-span-2 {
    grid-column: span 2;
}

.mobile-card-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-card-value {
    font-weight: 600;
    color: #1f2937;
    word-break: break-word;
}

/* Sortable columns enhancement */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 28px !important;
    transition: all 0.2s ease;
}

.sortable:hover {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.05);
}

.sortable::after {
    content: '⇅';
    position: absolute;
    right: 10px;
    color: #9ca3af;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sortable.sort-asc::after {
    content: '↑';
    color: #3b82f6;
    transform: scale(1.2);
}

.sortable.sort-desc::after {
    content: '↓';
    color: #3b82f6;
    transform: scale(1.2);
}

/* Table loading and empty states */
.table-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    color: #6b7280;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.table-loading i {
    animation: spin 1s linear infinite;
    margin-right: 12px;
    font-size: 24px;
    color: #3b82f6;
}

.table-empty {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
    background: white;
}

.table-empty i {
    font-size: 64px;
    margin-bottom: 20px;
    color: #d1d5db;
    opacity: 0.6;
}

.table-empty p {
    font-size: 16px;
    font-weight: 500;
    margin-top: 12px;
}

/* Responsive table container */
.desktop-only {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Enhanced export buttons */
.table-export-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.export-excel {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.export-excel:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.export-pdf {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.export-pdf:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Ensure colors are printed */
@media print {
   * {
    -webkit-print-color-adjust: exact !important; /* Chrome, Safari */
    color-adjust: exact !important; /* Firefox */
   }

   /* A4 printable container */
   .a4-printable, #a4-printable {
    visibility: visible !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 210mm !important;
    height: 297mm !important;
    padding: 15mm !important;
    margin: 0 !important;
    background: white !important;
    box-shadow: none !important;
    font-family: 'Noto Sans', Arial, sans-serif !important;
    color: black !important;
    -webkit-print-color-adjust: exact !important;
    color-adjust: exact !important;
    overflow: visible !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  @page {
    size: A4;
    margin: 10mm;
  }

  /* Ensure smaller adjustments inside A4 area */
  .a4-printable h2, .a4-printable h3, .a4-printable h4 {
    color: black !important;
  }

  .a4-printable table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  .a4-printable th, .a4-printable td {
    padding: 4px 6px !important;
    border-bottom: 1px solid #e2e2e2 !important;
    vertical-align: top !important;
  }

  /* Right-align numeric columns in A4 */
  .a4-printable td.num, .a4-printable th.num { text-align: right !important; }
}