/* Modern Clean Receipt Manager Styles */
.vet-ngo-receipt-manager {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.vet-ngo-receipt-manager h2 {
    font-size: 32px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.receipt-form-container,
.receipt-list-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.receipt-form-container:hover,
.receipt-list-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.receipt-form-container h3,
.receipt-list-container h3 {
    margin-top: 0;
    margin-bottom: 24px;
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.receipt-form-container h3::before {
    content: "🧾";
    font-size: 22px;
}

.receipt-list-container h3::before {
    content: "📋";
    font-size: 22px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #1f2937;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-group small {
    display: block;
    color: #6b7280;
    font-size: 12px;
    margin-top: 6px;
    font-weight: 400;
}

.preview-section {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e9d5ff;
}

.preview-section p {
    margin: 0 0 6px 0;
    color: #6b21a8;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#receipt-preview {
    color: #7c3aed;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Table wrapper for horizontal scroll on mobile */
.receipt-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 15px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.receipt-table {
    width: 100%;
    min-width: 800px; /* Ensures table stays wide enough on mobile */
    border-collapse: separate;
    border-spacing: 0;
}

.receipt-table th,
.receipt-table td {
    padding: 14px 16px;
    text-align: left;
}

.receipt-table th {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    font-weight: 500;
    color: #ffffff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #6d28d9;
}

.receipt-table tbody tr {
    background: #ffffff;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.15s ease;
}

.receipt-table tbody tr:hover {
    background: #f9fafb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.receipt-table tbody tr:last-child {
    border-bottom: none;
}

.receipt-table td {
    color: #374151;
    font-size: 14px;
}

.receipt-table .loading,
.receipt-table .no-data {
    text-align: center;
    color: #6b7280;
    padding: 32px 20px;
    font-size: 15px;
}

.range-badge {
    display: inline-block;
    padding: 5px 12px;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    color: #6d28d9;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
    border: 1px solid #c4b5fd;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-available {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border: 1px solid #86efac;
}

.status-available::before {
    background: #10b981;
}

.status-partial {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.status-partial::before {
    background: #f59e0b;
}

.status-used {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.status-used::before {
    background: #ef4444;
}

/* Button Styles */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-edit,
.btn-delete,
.btn-view {
    padding: 11px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    letter-spacing: -0.1px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #6b7280;
    color: white;
    padding: 9px 16px;
    font-size: 13px;
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-view {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.btn-view:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.btn-view::before {
    content: "👁️";
    font-size: 12px;
}

.btn-edit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-edit:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
}

.btn-edit::before {
    content: "✏️";
    font-size: 12px;
}

.btn-danger,
.btn-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover,
.btn-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}

.btn-delete::before {
    content: "🗑️";
    font-size: 12px;
}

/* Message Styles */
.message {
    padding: 14px 18px;
    border-radius: 8px;
    margin: 16px 0;
    font-weight: 400;
    font-size: 14px;
    border: 1px solid;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message.success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border-color: #a7f3d0;
}

.message.success::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 12px;
}

.message.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border-color: #fca5a5;
}

.message.error::before {
    content: "✕";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vet-ngo-receipt-manager {
        padding: 16px;
        margin: 16px auto;
    }

    .vet-ngo-receipt-manager h2 {
        font-size: 26px;
    }

    .receipt-form-container,
    .receipt-list-container {
        padding: 20px;
        border-radius: 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Table stays scrollable horizontally */
    .receipt-table-wrapper {
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* Smooth scrollbar for webkit browsers */
.receipt-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.receipt-table-wrapper::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.receipt-table-wrapper::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.receipt-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Filter/Search Styles */
.filter-container {
    margin-bottom: 20px;
}

.filter-container input[type="text"] {
    width: 100%;
    max-width: 400px;
    padding: 11px 14px 11px 38px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #ffffff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.35-4.35"></path></svg>') no-repeat 12px center;
}

.filter-container input[type="text"]:focus {
    outline: none;
    border-color: #8b5cf6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}