* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    font-weight: 500;
}

.app-container {
    max-width: 414px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
}

/* Responsive Design */
@media (min-width: 768px) {
    .app-container {
        max-width: 768px;
        box-shadow: 0 0 40px rgba(0,0,0,0.2);
    }
}

@media (min-width: 1024px) {
    .app-container {
        max-width: 1024px;
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
}

@media (min-width: 1200px) {
    .app-container {
        max-width: 1200px;
    }
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
    .header {
        padding: 25px 30px;
    }
}

@media (min-width: 1024px) {
    .header {
        padding: 30px 40px;
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-btn {
    position: relative;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    animation: pulse 2s infinite;
}

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

.app-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    animation: slideInRight 0.8s ease-out;
}

.user-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    animation: bounceIn 1s ease-out;
}

.user-avatar:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Pages */
.page {
    display: none;
    animation: slideInRight 0.3s ease-out;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

@media (min-width: 768px) {
    .page-header {
        padding: 25px 30px;
        margin-bottom: 40px;
    }
}

@media (min-width: 1024px) {
    .page-header {
        padding: 30px 40px;
        margin-bottom: 50px;
    }
}

.page-header h2 {
    text-align: right;
    flex: 1;
    margin: 0 15px;
}

.back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #667eea;
}

.back-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

.add-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.add-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Main Content */
.main-content {
    padding: 0 0 120px;
    animation: fadeInUp 0.8s ease-out;
}

/* All pages with bottom nav */
.main-content {
    padding: 0 0 100px;
}

@media (min-width: 768px) {
    .main-content {
        padding: 0 0 100px;
    }
    
    .main-content {
        padding: 0 0 100px;
    }
}

@media (min-width: 1024px) {
    .main-content {
        padding: 0 0 80px;
        flex: 1;
    }
    
    .main-content {
        padding: 0 0 80px;
        flex: 1;
    }
}

.home-page {
    padding: 20px 20px;
}

@media (min-width: 768px) {
    .home-page {
        padding: 30px 40px;
    }
}

@media (min-width: 1024px) {
    .home-page {
        padding: 40px 50px;
    }
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

@media (min-width: 768px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        margin-top: 40px;
    }
}

@media (min-width: 1024px) {
    .menu-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
        margin-top: 50px;
    }
}

@media (min-width: 1200px) {
    .menu-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.menu-item {
    background: white;
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: scaleIn 0.6s ease-out;
    display: block;
    text-decoration: none;
    color: inherit;
}

.menu-item:nth-child(1) { animation-delay: 0.1s; }
.menu-item:nth-child(2) { animation-delay: 0.2s; }
.menu-item:nth-child(3) { animation-delay: 0.3s; }
.menu-item:nth-child(4) { animation-delay: 0.4s; }
.menu-item:nth-child(5) { animation-delay: 0.5s; }
.menu-item:nth-child(6) { animation-delay: 0.6s; }

.menu-item::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;
}

.menu-item:hover::before {
    left: 100%;
}

.menu-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.menu-item:active {
    transform: translateY(-4px) scale(0.98);
}

.menu-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.new-order .menu-icon {
    background: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
    color: white;
}

.expenses .menu-icon {
    background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
    color: white;
}

.receipts .menu-icon {
    background: linear-gradient(135deg, #059669 0%, #7c3aed 100%);
    color: white;
}

.debts-to-us .menu-icon {
    background: linear-gradient(135deg, #16a34a 0%, #ca8a04 100%);
    color: white;
}

.purchases .menu-icon {
    background: linear-gradient(135deg, #ea580c 0%, #dc2626 100%);
    color: white;
}

.orders .menu-icon {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.debts-on-us .menu-icon {
    background: linear-gradient(135deg, #be185d 0%, #9333ea 100%);
    color: white;
}

.archives .menu-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.users-management .menu-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.menu-item h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #2d3748;
    letter-spacing: -0.3px;
}

.menu-item p {
    font-size: 14px;
    color: #718096;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: -0.1px;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 90px;
    left: 0px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

@media (min-width: 768px) {
    .dropdown-menu {
        min-width: 250px;
        top: 100px;
    }
}

@media (min-width: 1024px) {
    .dropdown-menu {
        min-width: 280px;
        top: 110px;
    }
}

.dropdown-menu.show,
.dropdown-menu.active,
.notifications-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2d3748;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.dropdown-item.logout {
    color: #e53e3e;
}

.dropdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 8px 0;
}

/* Notifications Dropdown */
.notifications-dropdown {
    position: absolute;
    top: 90px;
    right: 60px;
    left: auto;
    min-width: 320px;
    max-height: 400px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    background: white;
    border-radius: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #e5e7eb;
}

.dropdown-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8f9fa;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.mark-all-read {
    background: rgba(34, 197, 94, 0.1);
    border: none;
    border-radius: 8px;
    padding: 8px;
    color: #22c55e;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mark-all-read:hover {
    background: rgba(34, 197, 94, 0.2);
    transform: scale(1.05);
}

.notifications-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 0;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 15px 20px;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
    border-right: 3px solid #667eea;
}

.notification-item i {
    margin-left: 12px;
    margin-top: 2px;
    color: #6b7280;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.notification-item.unread i {
    color: #667eea;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content p {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
    word-wrap: break-word;
}

.notification-time {
    font-size: 12px;
    color: #6b7280;
}

.mark-read-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 24px;
    height: 24px;
    background: rgba(34, 197, 94, 0.1);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
}

.notification-item:hover .mark-read-btn {
    opacity: 1;
}

.mark-read-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    transform: scale(1.1);
}

.empty-notifications {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.empty-notifications i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.dropdown-footer {
    padding: 12px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f9fafb;
    text-align: center;
    border-radius: 0 0 15px 15px;
}

.view-all-notifications {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-notifications:hover {
    color: #5a6fd8;
}

/* Custom Scrollbar */
.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Notifications Page */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
}

.notification-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    position: relative;
}

.notification-card.unread {
    border-left: 4px solid #667eea;
    background: rgba(102, 126, 234, 0.02);
}

.notification-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.notification-card .notification-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.notification-card .notification-content {
    flex: 1;
}

.notification-card .notification-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
}

.notification-card .notification-content p {
    font-size: 14px;
    color: #718096;
    margin-bottom: 10px;
    line-height: 1.4;
}

.notification-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-time {
    font-size: 12px;
    color: #a0aec0;
}

.notification-type {
    font-size: 11px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.mark-read-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(34, 197, 94, 0.1);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mark-read-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    transform: scale(1.1);
}

/* Debts On Us Grid */
.debts-on-us-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .debts-on-us-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 30px;
    }
}

@media (min-width: 1024px) {
    .debts-on-us-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        padding: 0 40px;
    }
}

.debt-on-us-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #dc2626;
}

.debt-on-us-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.debt-on-us-card .debt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.debt-on-us-card .debt-number {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.debt-on-us-card .debt-status.debt {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.debt-on-us-card .debt-supplier {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.debt-on-us-card .debt-details {
    font-size: 14px;
    color: #718096;
    margin-bottom: 10px;
    line-height: 1.4;
}

.debt-on-us-card .debt-amount {
    font-size: 18px;
    font-weight: 700;
    color: #dc2626;
    margin-bottom: 8px;
}

.debt-on-us-card .debt-date {
    font-size: 12px;
    color: #a0aec0;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

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

.notification-item.unread {
    background: rgba(102, 126, 234, 0.05);
    border-left: 4px solid #667eea;
}

.notification-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.notification-content h5 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
    color: #2d3748;
}

.notification-content p {
    font-size: 12px;
    color: #718096;
    margin-bottom: 3px;
}

.notification-time {
    font-size: 10px;
    color: #a0aec0;
}

/* Form Styles */
.form-container {
    padding: 0 20px;
}

@media (min-width: 768px) {
    .form-container {
        padding: 0 30px;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .form-container {
        padding: 0 40px;
        max-width: 800px;
    }
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 25px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.section-header i {
    color: #667eea;
    font-size: 18px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (min-width: 768px) {
    .form-row {
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .form-row {
        gap: 25px;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group select:disabled,
.form-group input:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
}

.form-group select {
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
}

/* Auth Styles */
.auth-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo', sans-serif;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

@media (min-width: 768px) {
    .auth-container {
        max-width: 500px;
        padding: 30px;
    }
    
    .auth-card {
        padding: 50px;
    }
}

@media (min-width: 1024px) {
    .auth-container {
        max-width: 600px;
    }
    
    .auth-card {
        padding: 60px;
    }
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    text-align: center;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 32px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.auth-header p {
    color: #6c757d;
    margin-bottom: 30px;
}

.auth-form {
    text-align: right;
}

.auth-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
    margin-top: 20px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.auth-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.alert {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInDown 0.3s ease;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-success::before {
    content: '✓';
    font-weight: bold;
    font-size: 16px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-error::before {
    content: '⚠';
    font-weight: bold;
    font-size: 16px;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-info::before {
    content: 'ℹ';
    font-weight: bold;
    font-size: 16px;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-warning::before {
    content: '⚠';
    font-weight: bold;
    font-size: 16px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #2d3748;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* File Upload Styles */
.file-upload-area {
    position: relative;
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.file-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.file-upload-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.file-upload-text h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.file-upload-text p {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.uploaded-files {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uploaded-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.uploaded-file:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    width: 35px;
    height: 35px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}

.file-details {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.file-size {
    font-size: 12px;
    color: #6c757d;
}

.remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.remove-file:hover {
    background: #c82333;
    transform: scale(1.05);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

/* Audio Recorder */
.audio-recorder {
    margin-bottom: 20px;
}

.record-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    margin-bottom: 15px;
}

.record-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.record-btn.recording {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    animation: pulse 1.5s infinite;
}

.audio-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.audio-item audio {
    flex: 1;
    height: 35px;
}

.delete-audio {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 12px;
}

/* Search Container */
.search-container {
    padding: 0 20px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .search-container {
        padding: 0 30px;
        margin-bottom: 30px;
    }
}

@media (min-width: 1024px) {
    .search-container {
        padding: 0 40px;
        max-width: 600px;
        margin: 0 auto 40px;
    }
}



.search-group {
    position: relative;
    display: flex;
    align-items: center;
}

.search-group input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
}

.search-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-group i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
    z-index: 2;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-group i:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.search-btn {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.search-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.search-btn i {
    font-size: 16px;
}

/* Orders Grid */
.orders-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .orders-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 30px;
    }
}

@media (min-width: 1024px) {
    .orders-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        padding: 0 40px;
    }
}

@media (min-width: 1200px) {
    .orders-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.order-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.order-number {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
}

.order-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.order-status.new {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.order-status.in-progress {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.order-status.ready {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.order-status.delivered {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.order-status.archived {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.order-status.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.order-info h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.order-phone {
    font-size: 13px;
    color: #059669;
    font-weight: 500;
    margin-bottom: 5px;
    direction: ltr;
    text-align: right;
}

.order-type {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 5px;
}

.order-details {
    font-size: 14px;
    color: #718096;
    margin-bottom: 15px;
    line-height: 1.4;
}

.order-footer {
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    margin-bottom: 10px;
}

.order-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #f8f9fa;
}

.order-actions .action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.order-actions .action-btn.details {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.order-actions .action-btn.status {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.order-actions .action-btn.status:hover {
    background: rgba(245, 158, 11, 0.2);
}

.order-actions .action-btn.details:hover {
    background: rgba(59, 130, 246, 0.2);
}

.order-actions .action-btn.edit {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.order-actions .action-btn.edit:hover {
    background: rgba(245, 158, 11, 0.2);
}

.order-actions .action-btn.receipts {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.order-actions .action-btn.receipts:hover {
    background: rgba(34, 197, 94, 0.2);
}

.order-actions .action-btn.print {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.order-actions .action-btn.print:hover {
    background: rgba(99, 102, 241, 0.2);
}

.order-actions .action-btn.archive {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.order-actions .action-btn.archive:hover {
    background: rgba(139, 92, 246, 0.2);
}

.order-actions .action-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.order-actions .action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* View Order Styles */
.view-container {
    padding: 0 20px;
}

@media (min-width: 768px) {
    .view-container {
        padding: 0 30px;
        max-width: 800px;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .view-container {
        padding: 0 40px;
        max-width: 1000px;
    }
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .info-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        margin-bottom: 40px;
    }
}

@media (min-width: 1024px) {
    .info-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
        margin-bottom: 50px;
    }
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-item label {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
}

.info-item span {
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.info-item .status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
}

.info-item .status.new {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.info-item .status.in-progress {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.info-item .status.ready {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.info-item .status.delivered {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.info-item .status.archived {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.info-item .status.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Attachments */
.attachments-list {
    margin-bottom: 20px;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

.attachment-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.attachment-info i {
    color: #667eea;
    font-size: 18px;
}

.delete-attachment {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-attachment:hover {
    background: #c82333;
}

.add-attachment {
    margin-bottom: 30px;
}

/* Receipts Grid */
.receipts-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .receipts-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 30px;
    }
}

@media (min-width: 1024px) {
    .receipts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        padding: 0 40px;
    }
}

@media (min-width: 1200px) {
    .receipts-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.receipt-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.receipt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.receipt-order {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.receipt-link {
    width: 35px;
    height: 35px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
}

.receipt-link:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

.receipt-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.receipt-amount {
    font-size: 20px;
    font-weight: 700;
    color: #059669;
}

.receipt-date {
    font-size: 14px;
    color: #6c757d;
}

.receipt-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #f8f9fa;
}

.receipt-actions .action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.receipt-actions .action-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.receipt-actions .action-btn.edit {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.receipt-actions .action-btn.edit:hover {
    background: rgba(245, 158, 11, 0.2);
}

.receipt-actions .action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Debts Grid */
.debts-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .debts-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 30px;
    }
}

@media (min-width: 1024px) {
    .debts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        padding: 0 40px;
    }
}

.debt-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #f59e0b;
}

.debt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.debt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.debt-order {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.debt-link {
    width: 35px;
    height: 35px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
}

.debt-link:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

.debt-customer {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.debt-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.debt-total {
    font-size: 14px;
    color: #6c757d;
}

.debt-paid {
    font-size: 14px;
    color: #059669;
}

.debt-remaining {
    font-size: 18px;
    font-weight: 700;
    color: #dc2626;
    padding: 8px 12px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 8px;
    text-align: center;
}

/* Purchases Grid */
.purchases-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .purchases-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 30px;
    }
}

@media (min-width: 1024px) {
    .purchases-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        padding: 0 40px;
    }
}

.purchase-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.purchase-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.purchase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.purchase-number {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.purchase-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.purchase-status.cash {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.purchase-status.debt {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.purchase-info {
    margin-bottom: 15px;
}

.purchase-amount {
    font-size: 20px;
    font-weight: 700;
    color: #059669;
    margin-bottom: 8px;
}

.purchase-date {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
}

.purchase-supplier {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.purchase-details {
    font-size: 14px;
    color: #718096;
    line-height: 1.4;
}

.purchase-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.attachment-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    font-size: 14px;
}

.attachment-count i {
    font-size: 16px;
}

.purchase-actions {
    display: flex;
    gap: 8px;
}

.purchase-actions .action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-decoration: none;
}

.purchase-actions .action-btn.edit {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.purchase-actions .action-btn.edit:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: scale(1.05);
}

.purchase-actions .action-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.purchase-actions .action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Very Small Screens */
@media (max-width: 320px) {
    .app-container {
        margin: 0;
    }
    
    .header {
        padding: 15px;
    }
    
    .app-title {
        font-size: 22px;
    }
    
    .page-header {
        padding: 15px;
    }
    
    .form-container,
    .view-container,
    .search-container,
    .orders-grid,
    .receipts-grid,
    .debts-grid,
    .purchases-grid,
    .debts-on-us-grid,
    .summary-cards,
    .stats-cards,
    .stats-grid {
        padding: 0 15px;
    }
    
    .home-page {
        padding: 15px;
    }
    
    .menu-grid {
        gap: 12px;
    }
    
    .menu-item {
        padding: 15px 12px;
    }
}

@media (max-width: 375px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.order-cost {
    font-size: 16px;
    font-weight: 700;
    color: #059669;
}

.order-date {
    font-size: 12px;
    color: #a0aec0;
}

.delivery-time {
    font-size: 14px;
    margin-top: 5px;
    color: #2262b6;
}





.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-secondary {
    flex: 0 0 auto;
    padding: 8px 16px;
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.submit-btn {
    flex: 1;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 15px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 30px;
        margin-bottom: 30px;
    }
}

@media (min-width: 1024px) {
    .summary-cards {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
        padding: 0 40px;
        margin-bottom: 40px;
    }
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.summary-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
}

.summary-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #2d3748;
}

.summary-info p {
    font-size: 12px;
    color: #718096;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 8px;
    padding: 0 20px;
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cairo', sans-serif;
    color: #6c757d;
    white-space: nowrap;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.tab-btn .count {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    transition: all 0.3s ease;
}

.tab-btn.active .count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
    transform: scale(1.02);
}

.tab-btn:hover:not(.active) {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

@media (min-width: 480px) {
    .filter-tabs {
        gap: 10px;
    }
    
    .tab-btn {
        min-width: 90px;
        padding: 12px 14px;
        font-size: 13px;
        border-radius: 22px;
    }
}

@media (min-width: 768px) {
    .filter-tabs {
        gap: 12px;
        padding: 0 30px;
        margin-bottom: 30px;
        justify-content: center;
        overflow-x: visible;
    }
    
    .tab-btn {
        flex: 0 0 auto;
        min-width: 100px;
        padding: 14px 18px;
        font-size: 14px;
        border-radius: 25px;
    }
}

@media (min-width: 1024px) {
    .filter-tabs {
        padding: 0 40px;
        max-width: 600px;
        margin: 0 auto 40px;
        gap: 15px;
    }
    
    .tab-btn {
        min-width: 120px;
        padding: 16px 22px;
        font-size: 15px;
    }
}

@media (max-width: 375px) {
    .filter-tabs {
        gap: 6px;
        padding: 0 15px;
    }
    
    .tab-btn {
        min-width: 70px;
        padding: 8px 10px;
        font-size: 11px;
        border-radius: 18px;
    }
}

/* List Styles */
.list-container {
    padding: 0 20px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.item-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.item-content {
    flex: 1;
}

.item-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2d3748;
}

.item-content p {
    font-size: 14px;
    color: #718096;
    margin-bottom: 5px;
}

.amount {
    font-size: 16px;
    font-weight: 700;
    color: #e53e3e;
}

.amount.positive {
    color: #38a169;
}

.item-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.action-btn.edit {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.action-btn.edit:hover {
    background: rgba(59, 130, 246, 0.2);
}

.action-btn.delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Stats Cards */
.stats-cards,
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 15px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .stats-cards,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 30px;
        margin-bottom: 40px;
    }
}

@media (min-width: 1024px) {
    .stats-cards,
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
        padding: 0 40px;
        margin-bottom: 50px;
    }
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-info h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #2d3748;
}

.stat-info p {
    font-size: 12px;
    color: #718096;
}

/* Settings */
.settings-list {
    padding: 0 20px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.setting-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.setting-icon {
    width: 45px;
    height: 45px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}

.setting-content {
    flex: 1;
}

.setting-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2d3748;
}

.setting-content p {
    font-size: 14px;
    color: #718096;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Simple Bottom Navigation */
.modern-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 20px;
    max-width: 414px;
    margin: 0 auto;
}

.modern-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.3s ease;
    border-radius: 12px;
    min-width: 60px;
}

.modern-nav-item i {
    font-size: 24px;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

/* Active State */
.modern-nav-item.active {
    color: #667eea;
}

.modern-nav-item.active i {
    color: #667eea;
    transform: scale(1.1);
}

.modern-nav-item.active .nav-label {
    color: #667eea;
    font-weight: 700;
}

/* Hover Effects */
.modern-nav-item:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

/* Responsive Design */
@media (min-width: 768px) {
    .nav-container {
        max-width: 768px;
        padding: 16px 40px;
    }
    
    .modern-nav-item {
        padding: 10px 16px;
        min-width: 70px;
    }
    
    .modern-nav-item i {
        font-size: 26px;
    }
    
    .nav-label {
        font-size: 12px;
    }
}

@media (min-width: 1024px) {
    .modern-bottom-nav {
        position: relative;
        bottom: auto;
        margin-top: auto;
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);
    }
    
    .nav-container {
        max-width: 1024px;
        padding: 20px 50px;
    }
    
    .modern-nav-item {
        padding: 12px 20px;
        min-width: 80px;
    }
}

@media (min-width: 1200px) {
    .nav-container {
        max-width: 1200px;
    }
}

/* Mobile First - Small Screens */
@media (max-width: 375px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .menu-grid {
        gap: 15px;
    }
    
    .menu-item {
        padding: 20px 15px;
    }
    
    .menu-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-cards,
    .stats-cards,
    .stats-grid {
        grid-template-columns: 1fr ;
        padding: 0 15px;
        gap: 10px;
    }
    
    .summary-card {
        padding: 15px;
        gap: 12px;
        width: 100%;
        margin: 0;
    }
    
    .summary-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .summary-info h3 {
        font-size: 16px;
    }
    
    .summary-info p {
        font-size: 11px;
    }
}

/* Tablet Portrait */
@media (min-width: 768px) and (max-width: 1023px) {
    .order-card,
    .receipt-card,
    .debt-card,
    .purchase-card {
        min-height: 200px;
    }
}

/* Desktop Specific */
@media (min-width: 1024px) {
    .menu-item {
        padding: 30px 25px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .menu-item:hover {
        transform: translateY(-5px) scale(1.02);
    }
    
    .order-card,
    .receipt-card,
    .debt-card,
    .purchase-card {
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .order-card:hover,
    .receipt-card:hover,
    .debt-card:hover,
    .purchase-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    }
}

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

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease-out 2s forwards;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Additional Responsive Utilities */
.container-fluid {
    width: 100%;
    padding: 0 20px;
}

@media (min-width: 768px) {
    .container-fluid {
        padding: 0 30px;
    }
}

@media (min-width: 1024px) {
    .container-fluid {
        padding: 0 40px;
    }
}

/* Responsive Typography */
@media (min-width: 768px) {
    .app-title {
        font-size: 30px;
    }
    
    .page-header h2 {
        font-size: 24px;
    }
    
    .menu-item h3 {
        font-size: 20px;
    }
}

@media (min-width: 1024px) {
    .app-title {
        font-size: 32px;
    }
    
    .page-header h2 {
        font-size: 26px;
    }
    
    .menu-item h3 {
        font-size: 22px;
    }
}

/* Responsive Spacing */
@media (min-width: 768px) {
    .section-header {
        margin: 35px 0 20px;
    }
    
    .form-group {
        margin-bottom: 25px;
    }
}

@media (min-width: 1024px) {
    .section-header {
        margin: 45px 0 25px;
    }
    
    .form-group {
        margin-bottom: 30px;
    }
}

/* Responsive Buttons */
@media (min-width: 768px) {
    .form-actions {
        gap: 20px;
        margin-top: 40px;
    }
    
    .btn-secondary,
    .submit-btn {
        padding: 18px;
        font-size: 17px;
    }
}

@media (min-width: 1024px) {
    .form-actions {
        gap: 25px;
        margin-top: 50px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Responsive Cards */
@media (min-width: 768px) {
    .order-card,
    .receipt-card,
    .debt-card,
    .purchase-card,
    .debt-on-us-card {
        padding: 25px;
        border-radius: 18px;
    }
}

@media (min-width: 1024px) {
    .order-card,
    .receipt-card,
    .debt-card,
    .purchase-card,
    .debt-on-us-card {
        padding: 30px;
        border-radius: 20px;
    }
}

/* Responsive Empty State */
@media (min-width: 768px) {
    .empty-state {
        padding: 80px 40px;
    }
    
    .empty-state i {
        font-size: 80px;
    }
    
    .empty-state h3 {
        font-size: 28px;
    }
}

@media (min-width: 1024px) {
    .empty-state {
        padding: 100px 60px;
    }
    
    .empty-state i {
        font-size: 96px;
    }
    
    .empty-state h3 {
        font-size: 32px;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .header {
        padding: 15px 20px;
    }
    
    .app-title {
        font-size: 22px;
    }
    
    .page-header {
        padding: 15px 20px;
        margin-bottom: 20px;
    }
    
    .main-content {
        padding-bottom: 80px;
    }
    
    .bottom-nav {
        padding: 10px 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .menu-icon,
    .stat-icon,
    .summary-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .header,
    .bottom-nav,
    .page-header .back-btn,
    .page-header .add-btn,
    .form-actions {
        display: none !important;
    }
    
    .app-container {
        max-width: none;
        box-shadow: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    body {
        background: white !important;
    }
    
    .order-card,
    .receipt-card,
    .debt-card,
    .purchase-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Focus Styles for Accessibility */
.back-btn:focus,
.add-btn:focus,
.nav-item:focus,
.menu-item:focus,
.btn-primary:focus,
.btn-secondary:focus,
.submit-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Touch Targets */
@media (pointer: coarse) {
    .back-btn,
    .add-btn,
    .action-btn,
    .nav-item {
        min-height: 44px;
        min-width: 44px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
    }
}

/* Extra Large Desktop */
@media (min-width: 1400px) {
    .app-container {
        max-width: 1400px;
    }
    
    .form-container {
        max-width: 900px;
    }
    
    .view-container {
        max-width: 1100px;
    }
}

/* Ultra Wide Screens */
@media (min-width: 1600px) {
    .app-container {
        max-width: 1600px;
    }
    
    .menu-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    
    .orders-grid,
    .receipts-grid,
    .debts-grid,
    .purchases-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .stats-cards,
    .stats-grid,
    .summary-cards {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Enhanced Order Cards */
.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.order-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

@media (min-width: 768px) {
    .order-meta {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
}

/* Enhanced Info Grid */
.cost-value {
    font-weight: 700;
    color: #059669;
}

.details-text {
    line-height: 1.6;
    color: #4a5568;
}

/* Enhanced Attachments */
.existing-attachments {
    margin-bottom: 25px;
}

.existing-attachments h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.existing-attachments h4::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #667eea;
    border-radius: 2px;
}

.attachments-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 768px) {
    .attachments-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (min-width: 1024px) {
    .attachments-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.attachment-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.attachment-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.attachment-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.attachment-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-size {
    color: #718096;
    font-size: 12px;
}

.attachment-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-view {
    width: 32px;
    height: 32px;
    background: rgba(59, 130, 246, 0.1);
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.btn-delete {
    width: 32px;
    height: 32px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: scale(1.05);
}

.empty-attachments {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-attachments i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Enhanced Debt Cards */
.debt-actions {
    display: flex;
    gap: 8px;
}

.add-receipt-btn {
    width: 32px;
    height: 32px;
    background: rgba(34, 197, 94, 0.1);
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #22c55e;
    text-decoration: none;
    transition: all 0.3s ease;
}

.add-receipt-btn:hover {
    background: rgba(34, 197, 94, 0.2);
    transform: scale(1.05);
}

.debt-type {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 10px;
}

.debt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.debt-label {
    font-size: 14px;
    color: #6c757d;
}

.remaining-label {
    font-weight: 600;
    color: #dc2626;
}

.remaining-amount {
    font-weight: 700;
    color: #dc2626;
    font-size: 16px;
}

@media (max-width: 375px) {
    .debt-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .debt-remaining {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .attachment-item {
        padding: 12px;
    }
    
    .attachment-details {
        font-size: 14px;
    }
}

/* Enhanced Receipt Cards */
.receipt-body {
    margin: 15px 0;
}

.receipt-customer {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.receipt-notes {
    font-size: 14px;
    color: #718096;
    font-style: italic;
    line-height: 1.4;
}

.receipt-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

/* Order Selection Enhancement */
.selected-order-info {
    margin: 20px 0;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    animation: slideInDown 0.3s ease;
}

.order-summary h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remaining-display {
    font-weight: 700;
    color: #059669;
    font-size: 16px;
}

.form-hint {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

/* Form Validation Styles */
input:invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

input:valid {
    border-color: #28a745;
}

@media (max-width: 375px) {
    .receipt-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .summary-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .selected-order-info {
        padding: 12px;
    }
}

/* Enhanced Purchase Cards */
.purchase-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.purchase-supplier {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.purchase-details {
    font-size: 14px;
    color: #718096;
    line-height: 1.4;
    margin-bottom: 10px;
}

/* Readonly Input Styling */
.readonly-input {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    cursor: not-allowed;
}

/* Enhanced Debt Cards */
.debt-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.debt-attachments {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    color: #667eea;
    font-size: 14px;
}

.debt-attachments i {
    font-size: 16px;
}

@media (max-width: 375px) {
    .purchase-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .purchase-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .debt-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .input-group input {
        padding: 12px 40px 12px 12px;
        font-size: 14px;
    }
    
    .input-icon {
        right: 12px;
        font-size: 16px;
    }
    
    .toggle-password {
        left: 12px;
    }
}

/* Enhanced Auth Forms */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    padding-right: 45px;
    padding-left: 15px;
}

.input-icon {
    position: absolute;
    right: 15px;
    color: #6c757d;
    font-size: 18px;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    left: 15px;
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    background: rgba(108, 117, 125, 0.1);
    color: #495057;
}

.password-hint {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

/* Enhanced Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

/* Loading States */
.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-btn.loading {
    position: relative;
    color: transparent;
}

.auth-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Form Validation Enhancement */
.form-group input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input:invalid:not(:focus) {
    border-color: #dc3545;
}

.form-group input:valid:not(:focus) {
    border-color: #28a745;
}

/* Responsive Auth Improvements */
@media (min-width: 768px) {
    .auth-header h1 {
        font-size: 32px;
    }
    
    .auth-logo {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }
    
    .input-group input {
        padding: 18px 50px 18px 18px;
        font-size: 16px;
    }
    
    .input-icon {
        right: 18px;
        font-size: 20px;
    }
    
    .toggle-password {
        left: 18px;
    }
}

@media (min-width: 1024px) {
    .auth-header h1 {
        font-size: 36px;
    }
    
    .auth-header p {
        font-size: 16px;
    }
}

/* Performance Optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.menu-item,
.order-card,
.receipt-card,
.debt-card,
.purchase-card {
    will-change: transform;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .menu-item,
    .order-card,
    .receipt-card,
    .debt-card,
    .purchase-card {
        will-change: auto;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .menu-item,
    .order-card,
    .receipt-card,
    .debt-card,
    .purchase-card {
        border: 2px solid #000;
    }
    
    .btn-primary,
    .submit-btn,
    .auth-btn {
        border: 2px solid #000;
    }
}

/* Welcome Page Styles */
.welcome-body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.welcome-header {
    animation: slideInDown 0.8s ease-out;
}

.welcome-main {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

@media (max-width: 375px) {
    .welcome-body {
        padding: 15px;
    }
    
    .welcome-header {
        margin-bottom: 20px;
    }
}

@media (min-width: 768px) {
    .welcome-body {
        padding: 30px;
    }
}

@media (min-width: 1024px) {
    .welcome-body {
        padding: 40px;
    }
}

/* Legacy Bottom Nav - Hidden */
.bottom-nav {
    display: none;
}

.nav-item {
    display: none;
}

/* Profile Styles */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.profile-picture-section {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.profile-avatar {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #667eea;
}

.avatar-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #667eea;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid white;
}

.avatar-overlay:hover {
    background: #5a67d8;
    transform: scale(1.1);
}

.profile-picture-section h3 {
    margin: 0 0 5px 0;
    color: #2d3748;
    font-size: 24px;
    font-weight: 600;
}

.profile-picture-section p {
    margin: 0;
    color: #718096;
    font-size: 16px;
}

.password-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.password-section .section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.password-section .section-header i {
    color: #667eea;
    font-size: 20px;
}

.password-section .section-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
}

.input-group {
    position: relative;
}

.input-group input {
    padding-right: 45px;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 16px;
}

@media (max-width: 768px) {
    .profile-container {
        padding: 15px;
    }
    
    .profile-picture-section,
    .password-section {
        padding: 20px;
    }
    
    .profile-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .avatar-overlay {
        width: 35px;
        height: 35px;
    }
}

/* Selected Files Display */
.selected-files {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.files-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.files-header i {
    color: #667eea;
    font-size: 18px;
}

.files-header h5 {
    margin: 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.files-count {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.file-card {
    background: white;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #e9ecef;
}

.file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
}

.file-icon.pdf {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-left-color: #dc3545;
}

.file-icon.word {
    background: linear-gradient(135deg, #2b579a 0%, #1e3f73 100%);
    border-left-color: #2b579a;
}

.file-icon.image {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border-left-color: #28a745;
}

.file-icon.excel {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    border-left-color: #198754;
}

.file-icon.photoshop {
    background: linear-gradient(135deg, #6f42c1 0%, #5a2d91 100%);
    border-left-color: #6f42c1;
}

.file-icon.default {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border-left-color: #6c757d;
}

.file-card.pdf {
    border-left-color: #dc3545;
}

.file-card.word {
    border-left-color: #2b579a;
}

.file-card.image {
    border-left-color: #28a745;
}

.file-card.excel {
    border-left-color: #198754;
}

.file-card.photoshop {
    border-left-color: #6f42c1;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 2px;
    word-break: break-word;
}

.file-size {
    color: #6c757d;
    font-size: 12px;
    font-weight: 400;
}

@media (max-width: 768px) {
    .files-grid {
        grid-template-columns: 1fr;
    }
}

/* Alpine.js and Animation Styles */
[x-cloak] {
    display: none !important;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Audio Recorder Styles */
.audio-recorder {
    margin-top: 20px;
    padding: 20px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    text-align: center;
}

.recording-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ef4444;
    font-weight: 500;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

.recording-preview {
    margin-top: 15px;
}

.recording-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-success {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* File Upload Styles */
.upload-queue {
    margin-top: 20px;
}

.upload-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
}

.upload-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #10b981;
    transition: width 0.3s;
}

.progress-text {
    font-size: 12px;
    color: #6b7280;
    min-width: 35px;
}

/* Order Items Component */
.order-items-section {
    margin-bottom: 30px;
}

.items-list {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.item-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.item-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 8px;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 2px 2px 0;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #cbd5e1;
}

.item-info {
    flex: 1;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.item-name {
    font-weight: 600;
    color: #111827;
    font-size: 16px;
}

.item-total {
    font-weight: 700;
    color: #059669;
    font-size: 16px;
}

.item-details {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
}

.item-qty {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.item-price {
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.item-actions {
    display: flex;
    gap: 8px;
}

.empty-items {
    text-align: center;
    padding: 50px 20px;
    color: #6b7280;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.empty-items i {
    font-size: 36px;
    color: #94a3b8;
}

.empty-items h4 {
    font-size: 18px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.empty-items p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.add-item-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Notifications Dropdown */
.notifications-dropdown {
    position: absolute;
    top: 90px;
    right: 60px;
    left: auto;
    min-width: 320px;
    max-width: 90vw;
    max-height: 400px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 0;
    background: white;
    border-radius: 15px;
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

@media (max-width: 768px) {
    .notifications-dropdown {
        right: 10px;
        min-width: 280px;
        max-width: calc(100vw - 20px);
    }
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.dropdown-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.notifications-count {
    background: #ef4444;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.notifications-list {
    max-height: 280px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
    cursor: pointer;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item.unread {
    background: #fef3f2;
    border-right: 3px solid #ef4444;
}

.notification-item i {
    margin-left: 12px;
    margin-top: 2px;
    color: #6b7280;
    flex-shrink: 0;
}

.notification-item.unread i {
    color: #ef4444;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: #374151;
    line-height: 1.4;
}

.notification-time {
    font-size: 12px;
    color: #6b7280;
}

.dropdown-footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    text-align: center;
}

.view-all-notifications {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.view-all-notifications:hover {
    color: #2563eb;
}

/* Enhanced Empty State */
.empty-state-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.empty-state {
    text-align: center;
    max-width: 400px;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 24px;
    border: 2px dashed #e2e8f0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    animation: fadeInUp 0.6s ease-out;
}

.empty-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    animation: bounceIn 0.8s ease-out 0.2s both;
}

.empty-icon i {
    font-size: 48px;
    color: white;
}

.empty-state h3 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    animation: slideInUp 0.6s ease-out 0.4s both;
}

.empty-state p {
    font-size: 16px;
    color: #718096;
    line-height: 1.6;
    margin-bottom: 30px;
    animation: slideInUp 0.6s ease-out 0.6s both;
}

.empty-state .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    animation: slideInUp 0.6s ease-out 0.8s both;
}

.empty-state .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.empty-state .btn-primary i {
    font-size: 18px;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .empty-state-container {
        min-height: 50vh;
        padding: 20px 15px;
    }
    
    .empty-state {
        padding: 40px 30px;
        border-radius: 20px;
    }
    
    .empty-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 25px;
    }
    
    .empty-icon i {
        font-size: 36px;
    }
    
    .empty-state h3 {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .empty-state p {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    .empty-state .btn-primary {
        padding: 14px 28px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .empty-state {
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .empty-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    
    .empty-icon i {
        font-size: 32px;
    }
    
    .empty-state h3 {
        font-size: 20px;
    }
    
    .empty-state p {
        font-size: 13px;
    }
    
    .empty-state .btn-primary {
        padding: 12px 24px;
        font-size: 14px;
        border-radius: 40px;
    }
}

/* Floating Refresh Button */
.floating-refresh-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    z-index: 999;
    font-size: 20px;
}

.floating-refresh-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

.floating-refresh-btn:active {
    transform: scale(0.95);
}

@media (min-width: 768px) {
    .floating-refresh-btn {
        bottom: 120px;
        right: 30px;
        width: 60px;
        height: 60px;
        font-size: 22px;
    }
}

@media (min-width: 1024px) {
    .floating-refresh-btn {
        bottom: 40px;
        right: 40px;
    }
}