/* ============================================
   RECEIPTS PAGE - COMPLETE MOBILE RESPONSIVE
   ============================================ */

/* ============================================
   1. BASE LAYOUT & CONTAINERS
   ============================================ */

.receipts-page {
    padding: 16px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================
   2. STATS CARDS - RESPONSIVE GRID
   ============================================ */

.receipt-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card-receipt {
    background: white;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: 1px solid #f0f2f5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 72px;
}

.stat-card-receipt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 4px 4px 0;
    transition: width 0.3s ease;
}

.stat-card-receipt:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border-color: transparent;
}

.stat-card-receipt:hover::before {
    width: 6px;
}

.stat-card-receipt .stat-info h3 {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.stat-card-receipt .stat-info p {
    font-size: 12px;
    margin: 3px 0 0;
    color: #6b7280;
    font-weight: 500;
}

.stat-card-receipt .stat-info .stat-sub {
    font-size: 10px;
    color: #9ca3af;
    display: block;
    margin-top: 2px;
}

.stat-card-receipt .stat-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.stat-card-receipt:hover .stat-icon-wrap {
    transform: scale(1.1) rotate(-5deg);
}

/* Color variants */
.stat-card-receipt.blue .stat-info h3 { color: #3b82f6; }
.stat-card-receipt.blue::before { background: #3b82f6; }
.stat-card-receipt.blue .stat-icon-wrap { background: #dbeafe; color: #3b82f6; }

.stat-card-receipt.green .stat-info h3 { color: #10b981; }
.stat-card-receipt.green::before { background: #10b981; }
.stat-card-receipt.green .stat-icon-wrap { background: #d1fae5; color: #10b981; }

.stat-card-receipt.amber .stat-info h3 { color: #f59e0b; }
.stat-card-receipt.amber::before { background: #f59e0b; }
.stat-card-receipt.amber .stat-icon-wrap { background: #fef3c7; color: #f59e0b; }

.stat-card-receipt.purple .stat-info h3 { color: #8b5cf6; }
.stat-card-receipt.purple::before { background: #8b5cf6; }
.stat-card-receipt.purple .stat-icon-wrap { background: #ede9fe; color: #8b5cf6; }

.stat-card-receipt.red .stat-info h3 { color: #ef4444; }
.stat-card-receipt.red::before { background: #ef4444; }
.stat-card-receipt.red .stat-icon-wrap { background: #fee2e2; color: #ef4444; }

.stat-card-receipt.teal .stat-info h3 { color: #14b8a6; }
.stat-card-receipt.teal::before { background: #14b8a6; }
.stat-card-receipt.teal .stat-icon-wrap { background: #ccfbf1; color: #14b8a6; }

/* ============================================
   3. WELCOME HEADER
   ============================================ */

.welcome-header-receipt {
    background: linear-gradient(135deg, #0a2c4a 0%, #1a4a6e 100%);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.welcome-header-receipt::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 250px;
    height: 250px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.welcome-header-receipt .welcome-content {
    position: relative;
    z-index: 2;
}

.welcome-header-receipt h2 {
    font-size: 20px;
    margin: 0 0 3px;
}

.welcome-header-receipt p {
    opacity: 0.8;
    margin: 0;
    font-size: 13px;
}

.welcome-header-receipt .welcome-date {
    background: rgba(255,255,255,0.12);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 12px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 2;
    white-space: nowrap;
}

.welcome-header-receipt .welcome-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.welcome-header-receipt .welcome-stats span {
    background: rgba(255,255,255,0.1);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    backdrop-filter: blur(5px);
}

/* ============================================
   4. FILTER BAR
   ============================================ */

.filter-bar-receipt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 0 0 14px 0;
    flex-wrap: wrap;
}

.filter-group-receipt {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.filter-chip-receipt {
    padding: 5px 14px;
    border-radius: 30px;
    border: 1px solid #e8edf4;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

.filter-chip-receipt:hover {
    background: #f8fafc;
    border-color: #589bdd;
    color: #589bdd;
    transform: translateY(-2px);
}

.filter-chip-receipt.active {
    background: #589bdd;
    color: white;
    border-color: #589bdd;
    box-shadow: 0 2px 8px rgba(88,155,221,0.25);
}

.filter-chip-receipt .chip-count {
    background: rgba(255,255,255,0.2);
    padding: 0 5px;
    border-radius: 10px;
    font-size: 9px;
    margin-left: 3px;
}

.filter-chip-receipt.active .chip-count {
    background: rgba(255,255,255,0.2);
}

.filter-actions-receipt {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* ============================================
   5. SEARCH & FILTER INPUTS
   ============================================ */

.receipt-search-area {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.receipt-search-area .search-wrapper {
    flex: 1;
    min-width: 180px;
    position: relative;
}

.receipt-search-area .search-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
}

.receipt-search-area .search-wrapper input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    border-radius: 30px;
    border: 1px solid #e8edf4;
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

.receipt-search-area .search-wrapper input:focus {
    border-color: #589bdd;
    box-shadow: 0 0 0 3px rgba(88,155,221,0.1);
}

.receipt-search-area .search-wrapper input::placeholder {
    color: #9ca3af;
    font-size: 12px;
}

.receipt-search-area select {
    padding: 9px 14px;
    border-radius: 30px;
    border: 1px solid #e8edf4;
    font-size: 13px;
    outline: none;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
    min-width: 120px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.receipt-search-area select:focus {
    border-color: #589bdd;
}

.receipt-search-area .action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.receipt-search-area .action-buttons button {
    padding: 8px 16px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.3s;
    white-space: nowrap;
}

.receipt-search-area .action-buttons button:hover {
    transform: translateY(-2px);
}

.btn-primary-receipt {
    background: #589bdd;
    color: white;
    box-shadow: 0 4px 15px rgba(88,155,221,0.25);
}

.btn-primary-receipt:hover {
    background: #3a7bb5;
    box-shadow: 0 8px 25px rgba(88,155,221,0.35);
}

.btn-secondary-receipt {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-secondary-receipt:hover {
    background: #e5e7eb;
}

.btn-success-receipt {
    background: #10b981;
    color: white;
}

.btn-success-receipt:hover {
    background: #059669;
}

.btn-refresh-receipt {
    background: #e8f0fe;
    color: #589bdd;
}

.btn-refresh-receipt:hover {
    background: #589bdd;
    color: white;
}

.btn-danger-receipt {
    background: #fee2e2;
    color: #dc2626;
}

.btn-danger-receipt:hover {
    background: #dc2626;
    color: white;
}

/* ============================================
   6. TABLE - RESPONSIVE
   ============================================ */

.receipts-table-container {
    background: white;
    border-radius: 16px;
    border: 1px solid #f0f2f5;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.receipts-table-container .table-header {
    padding: 14px 18px;
    border-bottom: 1px solid #f0f2f5;
    background: #fafbfc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.receipts-table-container .table-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: #0a2c4a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.receipts-table-container .table-header h3 i {
    color: #589bdd;
}

.receipts-table-container .table-header .header-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.receipts-table-container .table-header .header-stats span {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.receipts-table-container .table-header .header-stats .total-count {
    background: #e8f0fe;
    color: #589bdd;
}

.receipts-table-container .table-header .header-stats .paid-count {
    background: #d1fae5;
    color: #059669;
}

.receipts-table-container .table-header .header-stats .unpaid-count {
    background: #fee2e2;
    color: #dc2626;
}

.receipts-table-container .table-header .header-stats .proforma-count {
    background: #ede9fe;
    color: #7c3aed;
}

/* Table Wrapper for Horizontal Scroll */
.receipts-table-wrapper {
    overflow-x: auto;
    max-height: 550px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.receipts-table-wrapper::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.receipts-table-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.receipts-table-wrapper::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.receipts-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.receipts-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}

.receipts-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #f0f2f5;
    background: #fafbfc;
    position: sticky;
    top: 0;
    z-index: 10;
}

.receipts-table td {
    padding: 10px 14px;
    font-size: 12px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}

.receipts-table tr:last-child td {
    border-bottom: none;
}

.receipts-table tr:hover td {
    background: #f8fafc;
}

/* Status Badge */
.status-badge-receipt {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 600;
}

/* Type Badge */
.receipt-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 600;
}

/* Payment Method Badge */
.payment-method-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 500;
}

/* Action Buttons */
.action-group {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    justify-content: center;
}

.action-btn-sm {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn-sm:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.action-btn-sm:active {
    transform: scale(0.9);
}

.action-btn-sm.view-btn { background: #e8f0fe; color: #589bdd; }
.action-btn-sm.view-btn:hover { background: #589bdd; color: white; }

.action-btn-sm.edit-btn { background: #fef3c7; color: #d97706; }
.action-btn-sm.edit-btn:hover { background: #d97706; color: white; }

.action-btn-sm.delete-btn { background: #fee2e2; color: #dc2626; }
.action-btn-sm.delete-btn:hover { background: #dc2626; color: white; }

.action-btn-sm.pdf-btn { background: #f3f4f6; color: #6b7280; }
.action-btn-sm.pdf-btn:hover { background: #6b7280; color: white; }

/* Status Select Dropdown */
.status-select-dropdown {
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #e8edf4;
    font-size: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 70px;
}

.status-select-dropdown:hover {
    border-color: #589bdd;
}

.status-select-dropdown:focus {
    outline: none;
    border-color: #589bdd;
    box-shadow: 0 0 0 2px rgba(88,155,221,0.15);
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 3px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 30px;
}

.view-toggle-btn {
    padding: 4px 12px;
    border-radius: 30px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s;
}

.view-toggle-btn:hover {
    transform: translateY(-1px);
}

.view-toggle-btn.active {
    background: white;
    color: #589bdd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* ============================================
   7. MODAL - COMPLETE RESPONSIVE
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-content-receipt {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 920px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 0;
    animation: modalSlideIn 0.3s ease;
    position: relative;
}

.modal-content-receipt .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafbfc;
    border-radius: 20px 20px 0 0;
    position: sticky;
    top: 0;
    z-index: 20;
}

.modal-content-receipt .modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #0a2c4a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-content-receipt .modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.3s;
}

.modal-content-receipt .modal-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

.modal-content-receipt .modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(92vh - 70px);
}

/* Modal - Form Styles */
.modal-content-receipt .form-group {
    margin-bottom: 14px;
}

.modal-content-receipt .form-group label {
    display: block;
    font-weight: 600;
    color: #0a2c4a;
    margin-bottom: 4px;
    font-size: 13px;
}

.modal-content-receipt .form-group input,
.modal-content-receipt .form-group select,
.modal-content-receipt .form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    transition: border-color 0.3s;
    font-family: inherit;
    background: white;
}

.modal-content-receipt .form-group input:focus,
.modal-content-receipt .form-group select:focus,
.modal-content-receipt .form-group textarea:focus {
    outline: none;
    border-color: #589bdd;
    box-shadow: 0 0 0 3px rgba(88,155,221,0.1);
}

.modal-content-receipt .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Rich Text Editor in Modal */
.rich-editor-toolbar {
    background: #f8fafc;
    padding: 6px 8px;
    border-radius: 10px;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
}

.rich-editor-toolbar .toolbar-btn {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    padding: 3px 8px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s;
}

.rich-editor-toolbar .toolbar-btn:hover {
    background: #589bdd;
    color: white;
}

.rich-editor-toolbar select {
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    font-size: 10px;
    background: white;
}

.rich-editor-content {
    min-height: 50px;
    padding: 10px;
    border: 2px solid #e8edf4;
    border-radius: 10px;
    background: white;
    overflow-y: auto;
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s;
}

.rich-editor-content:focus {
    outline: none;
    border-color: #589bdd;
    box-shadow: 0 0 0 3px rgba(88,155,221,0.1);
}

/* Item Cards in Modal */
.item-card {
    background: white;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #e8edf4;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.item-card:hover {
    border-color: #589bdd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.item-card .item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8edf4;
}

.item-card .item-header .item-number {
    background: #e8f0fe;
    color: #589bdd;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.item-card .item-header .remove-item-btn {
    background: #fee2e2;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 3px 10px;
    font-size: 11px;
    color: #dc2626;
    transition: all 0.3s;
}

.item-card .item-header .remove-item-btn:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.05);
}

.item-card .item-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e8edf4;
}

.item-card .item-fields .field-label {
    font-size: 11px;
    font-weight: 600;
    color: #0a2c4a;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.item-card .item-fields .toggle-group {
    display: flex;
    gap: 2px;
    margin-left: auto;
}

.item-card .item-fields .toggle-group button {
    padding: 2px 8px;
    font-size: 9px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s;
}

.item-card .item-fields .toggle-group button.active {
    background: #589bdd;
    color: white;
    border-color: #589bdd;
}

.item-card .item-fields .field-input {
    margin-top: 4px;
}

.item-card .item-fields .field-input input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #e8edf4;
    border-radius: 8px;
    font-size: 13px;
    transition: border-color 0.3s;
}

.item-card .item-fields .field-input input:focus {
    outline: none;
    border-color: #589bdd;
}

.item-card .item-fields .field-total input {
    background: #fffbeb;
    border-color: #fef3c7;
}

/* Payment Summary in Modal */
.payment-summary {
    background: linear-gradient(135deg, #e8f0fe, #dbeafe);
    border-radius: 14px;
    padding: 18px;
    margin: 18px 0;
    border: 1px solid #bfdbfe;
}

.payment-summary .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.payment-summary .summary-row:last-child {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 2px solid #bfdbfe;
}

.payment-summary .summary-label {
    font-size: 14px;
    font-weight: 600;
    color: #0a2c4a;
}

.payment-summary .summary-value {
    font-size: 20px;
    font-weight: 800;
    color: #589bdd;
}

.payment-summary .summary-value.remaining {
    color: #f59e0b;
}

.payment-summary .summary-value.paid {
    color: #10b981;
}

.payment-summary .summary-input {
    width: 120px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 2px solid #bfdbfe;
    font-size: 14px;
    text-align: right;
}

.payment-summary .summary-input:focus {
    outline: none;
    border-color: #589bdd;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e8edf2;
    flex-wrap: wrap;
}

.modal-actions button {
    padding: 9px 20px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s;
}

.modal-actions button:hover {
    transform: translateY(-2px);
}

.modal-actions .btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
}

.modal-actions .btn-cancel:hover {
    background: #e5e7eb;
}

.modal-actions .btn-submit {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}

.modal-actions .btn-submit:hover {
    box-shadow: 0 8px 25px rgba(16,185,129,0.4);
}

.modal-actions .btn-edit {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 15px rgba(245,158,11,0.3);
}

.modal-actions .btn-edit:hover {
    box-shadow: 0 8px 25px rgba(245,158,11,0.4);
}

.modal-actions .btn-pdf {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239,68,68,0.3);
}

.modal-actions .btn-pdf:hover {
    box-shadow: 0 8px 25px rgba(239,68,68,0.4);
}

.modal-actions .btn-danger {
    background: #dc2626;
    color: white;
    box-shadow: 0 4px 15px rgba(220,38,38,0.3);
}

.modal-actions .btn-danger:hover {
    box-shadow: 0 8px 25px rgba(220,38,38,0.4);
}

/* ============================================
   8. TOAST NOTIFICATIONS
   ============================================ */

.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10001;
    max-width: 420px;
    width: 90%;
    animation: slideInRight 0.3s ease;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

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

.toast-content .toast-message {
    flex: 1;
    font-size: 13px;
    color: #1f2937;
    font-weight: 500;
}

.toast-content .toast-close {
    cursor: pointer;
    color: #9ca3af;
    font-size: 14px;
    padding: 4px;
}

.toast-content .toast-close:hover {
    color: #4b5563;
}

.toast-content .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    animation: toastProgress 4s linear forwards;
}

/* ============================================
   9. ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   10. EMPTY STATE
   ============================================ */

.empty-state-receipt {
    text-align: center;
    padding: 50px 20px;
    color: #9ca3af;
}

.empty-state-receipt i {
    font-size: 48px;
    opacity: 0.3;
    color: #589bdd;
    display: block;
    margin-bottom: 14px;
}

.empty-state-receipt h4 {
    color: #6b7280;
    font-size: 17px;
    margin: 0 0 6px;
}

.empty-state-receipt p {
    font-size: 13px;
    margin: 0 0 14px;
}

/* ============================================
   11. RESPONSIVE BREAKPOINTS
   ============================================ */

/* ===== TABLET (1024px and below) ===== */
@media (max-width: 1024px) {
    .receipt-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card-receipt {
        padding: 14px 16px;
        min-height: 64px;
    }

    .stat-card-receipt .stat-info h3 {
        font-size: 22px;
    }

    .stat-card-receipt .stat-icon-wrap {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .welcome-header-receipt {
        flex-direction: column;
        text-align: center;
        padding: 18px 20px;
    }

    .welcome-header-receipt .welcome-date {
        width: 100%;
        text-align: center;
    }

    .welcome-header-receipt .welcome-stats {
        justify-content: center;
    }

    .filter-bar-receipt {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group-receipt {
        justify-content: center;
    }

    .filter-actions-receipt {
        justify-content: center;
    }

    .receipt-search-area {
        flex-direction: column;
    }

    .receipt-search-area .search-wrapper {
        min-width: auto;
    }

    .receipt-search-area select {
        width: 100%;
        min-width: auto;
    }

    .receipt-search-area .action-buttons {
        justify-content: center;
    }

    .modal-content-receipt {
        max-width: 96%;
        margin: 10px;
    }

    .modal-content-receipt .form-row {
        grid-template-columns: 1fr;
    }

    .item-card .item-fields {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .receipts-table {
        min-width: 700px;
    }
}

/* ===== MOBILE LARGE (768px and below) ===== */
@media (max-width: 768px) {
    .receipts-page {
        padding: 10px;
    }

    .receipt-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-bottom: 16px;
    }

    .stat-card-receipt {
        padding: 12px 14px;
        min-height: 56px;
        border-radius: 12px;
    }

    .stat-card-receipt .stat-info h3 {
        font-size: 18px;
    }

    .stat-card-receipt .stat-info p {
        font-size: 10px;
        margin: 2px 0 0;
    }

    .stat-card-receipt .stat-info .stat-sub {
        font-size: 9px;
    }

    .stat-card-receipt .stat-icon-wrap {
        width: 34px;
        height: 34px;
        font-size: 15px;
        border-radius: 10px;
    }

    .welcome-header-receipt {
        padding: 14px 16px;
        border-radius: 12px;
    }

    .welcome-header-receipt h2 {
        font-size: 17px;
    }

    .welcome-header-receipt p {
        font-size: 12px;
    }

    .welcome-header-receipt .welcome-date {
        font-size: 11px;
        padding: 5px 12px;
    }

    .welcome-header-receipt .welcome-stats span {
        font-size: 10px;
        padding: 2px 8px;
    }

    .filter-chip-receipt {
        font-size: 10px;
        padding: 4px 10px;
    }

    .filter-chip-receipt .chip-count {
        font-size: 8px;
    }

    .receipt-search-area .action-buttons button {
        font-size: 11px;
        padding: 6px 12px;
    }

    .receipts-table-container {
        border-radius: 12px;
    }

    .receipts-table-container .table-header {
        padding: 10px 14px;
        flex-direction: column;
        align-items: flex-start;
    }

    .receipts-table-container .table-header .header-stats {
        width: 100%;
        justify-content: flex-start;
    }

    .receipts-table-container .table-header .header-stats span {
        font-size: 10px;
        padding: 1px 8px;
    }

    .receipts-table-wrapper {
        max-height: 400px;
    }

    .receipts-table {
        min-width: 580px;
    }

    .receipts-table th,
    .receipts-table td {
        padding: 7px 10px;
        font-size: 11px;
    }

    .status-badge-receipt {
        font-size: 9px;
        padding: 2px 8px;
    }

    .receipt-type-badge,
    .payment-method-badge {
        font-size: 8px;
        padding: 1px 6px;
    }

    .action-group {
        gap: 2px;
    }

    .action-btn-sm {
        width: 24px;
        height: 24px;
        font-size: 10px;
        border-radius: 5px;
    }

    .status-select-dropdown {
        font-size: 9px;
        padding: 2px 6px;
        min-width: 55px;
    }

    .modal-content-receipt {
        max-width: 100%;
        margin: 0;
        border-radius: 14px;
        max-height: 95vh;
    }

    .modal-content-receipt .modal-header {
        padding: 12px 14px;
    }

    .modal-content-receipt .modal-header h3 {
        font-size: 15px;
    }

    .modal-content-receipt .modal-body {
        padding: 14px;
    }

    .modal-content-receipt .form-group input,
    .modal-content-receipt .form-group select,
    .modal-content-receipt .form-group textarea {
        font-size: 13px;
        padding: 8px 12px;
    }

    .rich-editor-toolbar {
        padding: 4px 6px;
        gap: 2px;
    }

    .rich-editor-toolbar .toolbar-btn {
        font-size: 10px;
        padding: 2px 6px;
    }

    .rich-editor-toolbar select {
        font-size: 9px;
        padding: 1px 4px;
    }

    .rich-editor-content {
        min-height: 40px;
        padding: 8px;
        font-size: 12px;
    }

    .item-card {
        padding: 10px;
    }

    .item-card .item-header .item-number {
        font-size: 10px;
        padding: 1px 10px;
    }

    .item-card .item-fields {
        padding: 10px;
        gap: 8px;
    }

    .item-card .item-fields .field-label {
        font-size: 10px;
    }

    .item-card .item-fields .field-input input {
        padding: 6px 8px;
        font-size: 12px;
    }

    .payment-summary {
        padding: 12px 14px;
    }

    .payment-summary .summary-label {
        font-size: 12px;
    }

    .payment-summary .summary-value {
        font-size: 17px;
    }

    .payment-summary .summary-input {
        width: 100px;
        font-size: 13px;
        padding: 4px 8px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions button {
        width: 100%;
        justify-content: center;
        padding: 8px 16px;
        font-size: 13px;
    }

    .toast-notification {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
        max-width: none;
    }

    .toast-content {
        padding: 10px 14px;
        font-size: 12px;
        border-radius: 12px;
    }

    .toast-content .toast-icon {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .toast-content .toast-message {
        font-size: 12px;
    }
}

/* ===== MOBILE SMALL (480px and below) ===== */
@media (max-width: 480px) {
    .receipts-page {
        padding: 6px;
    }

    .receipt-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin-bottom: 12px;
    }

    .stat-card-receipt {
        padding: 10px 12px;
        min-height: 48px;
        border-radius: 10px;
    }

    .stat-card-receipt .stat-info h3 {
        font-size: 16px;
    }

    .stat-card-receipt .stat-info p {
        font-size: 9px;
    }

    .stat-card-receipt .stat-icon-wrap {
        width: 28px;
        height: 28px;
        font-size: 12px;
        border-radius: 8px;
    }

    .welcome-header-receipt {
        padding: 12px 14px;
        border-radius: 10px;
    }

    .welcome-header-receipt h2 {
        font-size: 15px;
    }

    .welcome-header-receipt p {
        font-size: 11px;
    }

    .welcome-header-receipt .welcome-date {
        font-size: 10px;
        padding: 4px 10px;
    }

    .welcome-header-receipt .welcome-stats span {
        font-size: 9px;
        padding: 2px 6px;
    }

    .filter-chip-receipt {
        font-size: 9px;
        padding: 3px 8px;
    }

    .filter-chip-receipt .chip-count {
        font-size: 7px;
        padding: 0 3px;
    }

    .receipt-search-area .search-wrapper input {
        font-size: 12px;
        padding: 7px 12px 7px 34px;
    }

    .receipt-search-area .search-wrapper i {
        left: 10px;
        font-size: 12px;
    }

    .receipt-search-area select {
        font-size: 12px;
        padding: 7px 12px;
        padding-right: 28px;
    }

    .receipt-search-area .action-buttons button {
        font-size: 10px;
        padding: 5px 10px;
    }

    .receipts-table-container .table-header {
        padding: 8px 10px;
    }

    .receipts-table-container .table-header h3 {
        font-size: 12px;
    }

    .receipts-table-container .table-header .header-stats span {
        font-size: 9px;
        padding: 1px 6px;
    }

    .receipts-table {
        min-width: 480px;
    }

    .receipts-table th,
    .receipts-table td {
        padding: 5px 8px;
        font-size: 10px;
    }

    .receipts-table td .receipt-type-badge {
        font-size: 7px;
        padding: 1px 4px;
    }

    .status-badge-receipt {
        font-size: 8px;
        padding: 1px 6px;
    }

    .action-btn-sm {
        width: 20px;
        height: 20px;
        font-size: 8px;
        border-radius: 4px;
    }

    .status-select-dropdown {
        font-size: 8px;
        padding: 1px 4px;
        min-width: 45px;
    }

    .modal-content-receipt {
        border-radius: 10px;
    }

    .modal-content-receipt .modal-header {
        padding: 10px 12px;
    }

    .modal-content-receipt .modal-header h3 {
        font-size: 14px;
    }

    .modal-content-receipt .modal-close {
        font-size: 18px;
    }

    .modal-content-receipt .modal-body {
        padding: 10px;
    }

    .modal-content-receipt .form-group {
        margin-bottom: 10px;
    }

    .modal-content-receipt .form-group label {
        font-size: 12px;
    }

    .modal-content-receipt .form-group input,
    .modal-content-receipt .form-group select,
    .modal-content-receipt .form-group textarea {
        font-size: 12px;
        padding: 6px 10px;
        border-radius: 8px;
    }

    .payment-summary {
        padding: 10px 12px;
        border-radius: 10px;
    }

    .payment-summary .summary-label {
        font-size: 11px;
    }

    .payment-summary .summary-value {
        font-size: 15px;
    }

    .payment-summary .summary-input {
        width: 80px;
        font-size: 12px;
        padding: 3px 6px;
    }

    .modal-actions button {
        font-size: 12px;
        padding: 6px 14px;
    }

    .toast-content {
        padding: 8px 12px;
        font-size: 11px;
        border-radius: 10px;
    }

    .toast-content .toast-icon {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .toast-content .toast-message {
        font-size: 11px;
    }

    .empty-state-receipt {
        padding: 30px 16px;
    }

    .empty-state-receipt i {
        font-size: 36px;
    }

    .empty-state-receipt h4 {
        font-size: 14px;
    }

    .empty-state-receipt p {
        font-size: 12px;
    }
}

/* ============================================
   12. PRINT STYLES
   ============================================ */

@media print {
    .filter-bar-receipt,
    .receipt-search-area,
    .action-buttons,
    .view-toggle,
    .modal-actions,
    .toast-notification {
        display: none !important;
    }

    .stat-card-receipt {
        break-inside: avoid;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    .receipts-table-container {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    .receipts-table th {
        background: #f0f0f0 !important;
        color: #000 !important;
    }

    .receipts-table td {
        border-color: #ddd !important;
    }

    .receipts-table tr {
        break-inside: avoid;
    }

    .modal-content-receipt {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .welcome-header-receipt {
        background: #0a2c4a !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .welcome-header-receipt .welcome-stats span {
        background: rgba(255,255,255,0.1) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}