/* Unified Button Styles */
.button,
button.button,
a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    text-align: center;
    line-height: 1.5;
}

.button:hover,
button.button:hover,
a.button:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    color: #475569;
}

.button-primary,
button.button-primary,
a.button-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border-color: #1d4ed8;
    box-shadow: 0 2px 4px -1px rgba(37, 99, 235, 0.3);
}

.button-primary:hover,
button.button-primary:hover,
a.button-primary:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    border-color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px -2px rgba(30, 64, 175, 0.4);
    color: #fff;
}

.button-small,
button.button-small,
a.button-small {
    padding: 8px 16px;
    font-size: 0.85em;
}

.button-large,
button.button-large,
a.button-large {
    padding: 18px 36px;
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Frontend Dashboard Styles */
.brb-dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 30px;
    min-height: 100vh;
}

.brb-dashboard-header {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e8eaed;
}

.brb-dashboard-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brb-welcome-message {
    font-size: 1.2em;
    color: #64748b;
    margin-bottom: 20px;
    font-weight: 500;
}

.brb-dashboard-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #e2e8f0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.brb-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    color: #475569;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.brb-nav-link svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.brb-nav-link:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.brb-nav-link.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border-color: #1d4ed8;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

/* Customer Cards Grid */
/* Customers Table */
.brb-customers-table-wrapper {
    margin-top: 30px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.brb-customers-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.brb-customers-table thead {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.brb-customers-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 0.9em;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: none;
}

.brb-customers-table td {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.brb-customers-table tbody tr:hover {
    background: #f8fafc;
}

.brb-customers-table tbody tr:last-child td {
    border-bottom: none;
}

.brb-customer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 250px;
    overflow: hidden;
}

.brb-customers-table td:nth-child(2) {
    max-width: 250px;
    overflow: hidden;
}

.brb-customer-email-badge,
.brb-customer-phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    padding: 6px 12px;
    background: #eff6ff;
    border-radius: 8px;
    transition: all 0.3s;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.brb-customer-email-badge svg,
.brb-customer-phone-badge svg {
    flex-shrink: 0;
}

.brb-customer-email-badge span,
.brb-customer-phone-badge span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
}

.brb-customer-email-badge:hover,
.brb-customer-phone-badge:hover {
    background: #dbeafe;
    color: #2563eb;
    transform: translateY(-1px);
}

.brb-customer-email-badge svg,
.brb-customer-phone-badge svg {
    flex-shrink: 0;
}

.brb-customer-actions-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.brb-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
}

.brb-action-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brb-action-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.brb-action-view {
    color: #3b82f6;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.brb-action-view:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #2563eb;
}

.brb-action-edit {
    color: #10b981;
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.brb-action-edit:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #059669;
}

.brb-action-bill {
    color: #8b5cf6;
    border-color: #c4b5fd;
    background: #f5f3ff;
}

.brb-action-bill:hover {
    background: #ede9fe;
    border-color: #a78bfa;
    color: #7c3aed;
}

/* Icon Buttons for Add/Remove Items */
.brb-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    margin: 0 auto;
}

/* Center icon buttons in table cells */
td .brb-icon-btn,
th .brb-icon-btn {
    display: flex;
    margin: 0 auto;
}

.brb-icon-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brb-icon-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.brb-icon-btn-add {
    color: #10b981;
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.brb-icon-btn-add:hover {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #059669;
}

.brb-icon-btn-remove {
    color: #ef4444;
    border-color: #fecaca;
    background: #fef2f2;
}

.brb-icon-btn-remove:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.brb-customer-stats {
    margin: 25px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 10px;
}

.brb-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.brb-stat-label {
    color: #64748b;
    font-size: 0.9em;
    font-weight: 500;
}

.brb-stat-value {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.05em;
}

.brb-stat-value.brb-paid {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brb-stat-value.brb-pending {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Customer Actions - Used in customer detail pages */
.brb-customer-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.brb-customer-actions .button {
    flex: 1;
}

/* Customer Detail Frontend */
.brb-customer-detail-frontend {
    margin-top: 30px;
}

.brb-customer-info-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.brb-customer-info-box h2 {
    font-size: 1.5em;
    margin: 0 0 25px 0;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.brb-customer-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.brb-info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.brb-info-item a:hover {
    color: #2563eb !important;
    text-decoration: underline;
}

.brb-info-label {
    font-size: 0.85em;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brb-info-value {
    font-size: 1.05em;
    color: #0f172a;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.brb-info-value a {
    color: #3b82f6;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.brb-info-value a:hover {
    color: #2563eb;
}

.brb-info-value svg {
    flex-shrink: 0;
    color: #64748b;
}

/* Settings Form */
.brb-settings-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.brb-settings-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.brb-settings-form .brb-form-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.brb-settings-form .brb-form-section h2 {
    margin: 0;
    font-size: 1.8em;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.3px;
    display: inline-block;
    width: 100%;
}

.brb-settings-form .brb-form-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brb-settings-form .brb-form-row label {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.95em;
}

.brb-settings-form .brb-form-row input,
.brb-settings-form .brb-form-row select {
    width: 100%;
    max-width: 400px;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s;
    background: #fff;
}

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

.brb-settings-form .description {
    margin-top: 8px;
    color: #64748b;
    font-size: 0.9em;
    font-style: italic;
}

.brb-form-actions {
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

/* Success Message */
.brb-settings-section .notice {
    padding: 18px 24px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 2px solid #10b981;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

/* Summary Cards */
.brb-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.brb-summary-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.brb-summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.12), 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.brb-summary-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    transition: all 0.3s;
}

.brb-summary-card:hover .brb-summary-card-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
}

.brb-summary-card-icon.brb-icon-paid {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #10b981;
}

.brb-summary-card:hover .brb-summary-card-icon.brb-icon-paid {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.brb-summary-card-icon.brb-icon-pending {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #ef4444;
}

.brb-summary-card:hover .brb-summary-card-icon.brb-icon-pending {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.brb-summary-card h3 {
    font-size: 0.75em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 20px 0;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.brb-summary-card .brb-amount {
    font-size: 2.2em;
    font-weight: 800;
    margin: 0;
    color: #0f172a;
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.brb-summary-card .brb-amount.brb-paid {
    color: #10b981;
}

.brb-summary-card .brb-amount.brb-pending {
    color: #ef4444;
}

/* Bills Section */
.brb-bills-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.brb-bills-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 15px;
}

.brb-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.brb-form-content {
    padding: 0 30px;
}

.brb-bills-section h2 {
    margin: 0;
    font-size: 1.75em;
    color: #111827;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* .brb-create-bill-btn uses base .button-primary styles */

/* Search and Filter */
.brb-search-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid #e2e8f0;
}

.brb-search-input {
    flex: 1;
    min-width: 200px;
    padding: 14px 20px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 1em !important;
    transition: all 0.3s !important;
    background: #fff !important;
    height: auto !important;
}

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

.brb-filter-select {
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1em;
    min-width: 180px;
    background: #fff;
    transition: all 0.3s;
    cursor: pointer;
    height: auto;
}

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

#brb-reset-filters {
    padding: 14px 24px;
    background: #64748b;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

#brb-reset-filters:hover {
    background: #475569;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .brb-search-filter {
        flex-direction: column;
    }
    
    .brb-search-input,
    .brb-filter-select {
        width: 100%;
    }

    .brb-bills-section {
        padding: 15px;
        overflow: hidden;
    }

    .brb-customers-table td {
        padding: 10px;
    }
}

.brb-no-bills {
    text-align: center;
    padding: 80px 40px;
    color: #64748b;
    font-size: 1.2em;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
    position: relative;
    overflow: hidden;
}

.brb-no-bills::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 50%;
    z-index: 0;
}

.brb-no-bills > * {
    position: relative;
    z-index: 1;
}

.brb-no-bills svg {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    opacity: 0.3;
    color: #94a3b8;
}

/* Bills Table */
.brb-bills-table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    margin-top: 20px;
    width: 100%;
}

.brb-bills-table {
    width: 100%;
    min-width: 800px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.brb-bills-table thead {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.brb-bills-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    color: #ffffff;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: none;
}

.brb-bills-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    font-size: 0.95em;
    font-weight: 700;
}

.brb-bills-table td strong {
    font-weight: 700;
}

.brb-bills-table td:last-child {
    text-align: center;
}

.brb-bills-table td:last-child .brb-action-btn {
    margin: 0 auto;
}

.brb-bills-table tbody tr {
    transition: all 0.2s;
}

.brb-bills-table tbody tr {
    transition: all 0.2s ease;
}

.brb-bills-table tbody tr:hover {
    background-color: #f8fafc;
    transform: translateX(4px);
    box-shadow: -4px 0 0 0 #3b82f6;
}

.brb-bills-table tbody tr:last-child td {
    border-bottom: none;
}

.brb-bills-table .brb-pending-amount.has-pending {
    color: #ef4444;
    font-weight: 700;
    font-size: 1.05em;
}

.brb-bills-table .brb-pending-amount.paid-full {
    color: #10b981;
    font-weight: 700;
    font-size: 1.05em;
}

.brb-status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brb-status-draft {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    border: 1px solid #cbd5e1;
}

.brb-status-sent {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
}

.brb-status-paid {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.brb-status-overdue {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.brb-status-cancelled {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: #fff;
}

/* .brb-view-bill uses base .button-primary styles */

/* Customer Search Field */
.brb-customer-search-wrapper {
    position: relative;
}

.brb-customer-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
    display: none;
}

.brb-customer-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.brb-customer-dropdown li {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s;
}

.brb-customer-dropdown li:last-child {
    border-bottom: none;
}

.brb-customer-dropdown li:hover,
.brb-customer-dropdown li.brb-selected {
    background-color: #f8fafc;
}

.brb-customer-dropdown li strong {
    display: block;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.brb-customer-dropdown li .brb-customer-email {
    display: block;
    font-size: 0.85em;
    color: #64748b;
    margin-bottom: 2px;
}

.brb-customer-dropdown li .brb-customer-phone {
    display: block;
    font-size: 0.85em;
    color: #64748b;
}

.brb-customer-dropdown li.brb-no-results {
    color: #94a3b8;
    font-style: italic;
    cursor: default;
}

.brb-customer-dropdown li.brb-no-results:hover {
    background-color: transparent;
}

/* Bill View Page */
.brb-bill-view-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 60px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 100vh;
}

.brb-bill-header {
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
}

.brb-bill-header-links {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.brb-back-link {
    display: inline-block;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    font-size: 0.95em;
}

.brb-back-link:hover {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.2);
    transform: translateX(-4px);
}

.brb-bill-header h1 {
    font-size: 2.5em;
    margin: 0;
    color: #0f172a;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.brb-bill-document {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.brb-bill-header-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 3px solid #f1f5f9;
}

.brb-bill-company h2 {
    margin: 0 0 15px 0;
    font-size: 2.2em;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brb-bill-company p {
    margin: 0;
    color: #64748b;
    font-size: 1.05em;
}

.brb-bill-meta p {
    margin: 12px 0;
    text-align: right;
    color: #475569;
    font-size: 1em;
}

.brb-bill-meta strong {
    color: #0f172a;
    font-weight: 700;
}

.brb-bill-customer {
    margin-bottom: 50px;
    padding: 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.brb-bill-customer h3 {
    margin: 0 0 20px 0;
    font-size: 1.2em;
    color: #0f172a;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brb-bill-customer p {
    margin: 8px 0;
    color: #475569;
    font-size: 1.05em;
    font-weight: 500;
}

.brb-bill-items {
    margin-bottom: 40px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.brb-items-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.brb-items-table th {
    padding: 18px 20px;
    text-align: left;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    font-weight: 700;
    color: #ffffff;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: none;
}

.brb-items-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: #475569;
    background: #fff;
}

.brb-items-table tbody tr:hover {
    background: #f8fafc;
}

.brb-items-table tfoot {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.brb-items-table tfoot .brb-total-row td {
    border-top: 3px solid #e2e8f0;
    padding-top: 20px;
    font-size: 1.2em;
    font-weight: 800;
    color: #0f172a;
}

.brb-items-table tfoot .brb-pending-row td {
    font-size: 1.2em;
    font-weight: 800;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
}

.brb-bill-notes {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.brb-bill-notes h3 {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    color: #1a1a1a;
}

.brb-notes-content {
    color: #666;
    line-height: 1.6;
}

/* Create Bill Form */
.brb-create-bill-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 40px 20px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.brb-page-header {
    margin-bottom: 30px;
}

.brb-page-header h1 {
    font-size: 2.5em;
    margin: 0 0 15px 0;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brb-bill-form {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 40px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.brb-form-section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.brb-form-section h2 {
    font-size: 2em;
    margin: 0;
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.4px;
    display: inline-block;
    width: 100%;
}

.brb-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.brb-form-grid .brb-form-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brb-form-grid .brb-form-row input[type="text"],
.brb-form-grid .brb-form-row input[type="date"],
.brb-form-grid .brb-form-row input[type="number"],
.brb-form-grid .brb-form-row select {
    max-width: 100%;
}

.brb-form-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brb-form-row-full {
    grid-column: 1 / -1;
}

.brb-form-row label {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.95em;
}

.brb-form-row .required {
    color: #ef4444;
    font-weight: 800;
}

.brb-form-row input[type="text"],
.brb-form-row input[type="date"],
.brb-form-row input[type="number"],
.brb-form-row input[type="email"],
.brb-form-row input[type="tel"],
.brb-form-row select,
.brb-form-row textarea:not(.brb-form-textarea-full),
.brb-form-input,
.brb-form-select {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 16px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    box-sizing: border-box;
    transition: all 0.3s !important;
    background: #ffffff;
    color: #1e293b !important;
    height: auto !important;
}

.brb-form-select {
    cursor: pointer;
}

.brb-form-row input[type="text"]:focus,
.brb-form-row input[type="date"]:focus,
.brb-form-row input[type="number"]:focus,
.brb-form-row select:focus,
.brb-form-row textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: #f8fafc;
    font-weight: 600;
}

.brb-form-row textarea:not(.brb-form-textarea-full),
.brb-form-textarea:not(.brb-form-textarea-full) {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    width: 100%;
    max-width: 500px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s;
}

.brb-form-row-full .brb-form-textarea,
.brb-form-textarea-full {
    max-width: 100% !important;
}

input#brb_bill_number {
    background: #f1fdf1;
    border-color: #bef0ce;
    color: #274f32;
}

/* Comprehensive Form Styles - Replacing Inline Styles */
.brb-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #475569;
}

.brb-form-label .required {
    color: #ef4444;
}

/* Form Input Base Styles - Matching Inline Styles */
.brb-form-input-base {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

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

/* Form Grid - Matching Inline Styles */
.brb-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.brb-form-grid.brb-form-grid-top {
    margin-top: 30px;
}

.brb-form-grid.brb-form-grid-top-small {
    margin-top: 20px;
}

/* Form Row Full - Matching Inline Styles */
.brb-form-row-full-base {
    margin-top: 20px;
    margin-bottom: 30px;
}

/* Form Actions - Matching Inline Styles */
.brb-form-actions-base {
    padding-top: 25px;
    border-top: 2px solid #f1f5f9;
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

.brb-form-actions-base.brb-form-actions-top {
    margin-top: 30px;
}

/* Override padding when specified inline */
.brb-form-actions-base[style*="padding"] {
    border-top: 2px solid #f1f5f9;
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

/* Form Button - Matching Inline Styles */
.brb-form-button-base {
    padding: 14px 32px;
    font-weight: 600;
    font-size: 15px;
}

/* Customer Search Wrapper */
.brb-customer-search-wrapper-base {
    position: relative;
}

/* Section Headers - Matching Inline Styles */
.brb-section-header-base {
    margin: 0;
    padding: 0 0 15px 0;
    color: #1e293b;
    font-size: 1.3em;
    font-weight: 700;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #f1f5f9;
}

/* Form Section - Matching Inline Styles */
.brb-form-section-base {
    background: transparent;
    border-radius: 0;
    padding: 0 30px;
    box-shadow: none;
    border: none;
    margin-bottom: 0;
}

/* Gradient Header - Matching Inline Styles */
.brb-gradient-header-base {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    padding: 24px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brb-gradient-header-base h2 {
    margin: 0;
    color: #fff;
    font-size: 1.5em;
    font-weight: 700;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brb-gradient-header-base h2 svg {
    opacity: 0.9;
}

/* Reports Filters */
.brb-reports-container {
    padding: 20px;
}

.brb-reports-filters {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.brb-reports-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.brb-reports-field {
    flex: 0 0 auto;
    min-width: 220px;
}

.brb-reports-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brb-label-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    color: #64748b;
}

.brb-reports-select,
.brb-reports-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    color: #1e293b;
    height: auto;
    min-height: 44px;
    box-sizing: border-box;
}

.brb-reports-select:focus,
.brb-reports-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: #f8fafc;
}

.brb-reports-select:focus {
    background: #fff;
}

.brb-reports-input:focus {
    background: #f8fafc;
}

.brb-reports-input:not(:focus) {
    background: #fff;
}

.brb-custom-dates {
    display: flex;
    gap: 15px;
    flex: 1;
    min-width: 400px;
    align-items: flex-end;
    animation: slideDown 0.3s ease-out;
}

.brb-custom-date-field {
    flex: 1;
    min-width: 180px;
}

.brb-date-separator {
    flex: 0 0 auto;
    padding-bottom: 28px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 18px;
}

.brb-reports-submit {
    flex: 0 0 auto;
}

.brb-reports-button {
    padding: 12px 28px;
    height: auto;
    min-height: 44px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brb-button-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

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

.brb-items-table-frontend-wrapper {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.brb-items-table-frontend {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}


.brb-items-table-frontend th,
.brb-items-table-frontend td {
    padding: 15px 18px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.brb-items-table-frontend th {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    padding: 18px 20px;
}

/* Return items table in edit form - red gradient */
#brb-return-items-frontend-container .brb-items-table-frontend thead,
#brb-returns-table-frontend thead {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

#brb-return-items-frontend-container .brb-items-table-frontend th,
#brb-returns-table-frontend th {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
}

.brb-items-table-frontend tfoot {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-weight: 800;
}

.brb-items-table-frontend tfoot td {
    border-top: 3px solid #e2e8f0;
    padding: 18px;
    font-size: 1.1em;
}

/* Product search dropdown */
.brb-product-search-wrapper {
    position: relative;
}

/* Inventory filters */
.brb-inventory-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.brb-inventory-filters .brb-form-input {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.brb-inventory-filters .brb-form-select {
    min-width: 200px;
    max-width: 250px;
}

.brb-item-row-frontend input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
    color: #1e293b;
    background: #ffffff;
}

.brb-item-row-frontend input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background: #f8fafc;
    font-weight: 600;
}

.brb-form-actions {
    border-top: 2px solid #f1f5f9;
    display: flex;
    gap: 15px;
}

.brb-form-actions .button {
    box-shadow: 0 6px 12px -2px rgba(59, 130, 246, 0.4);
}

.brb-form-actions .button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -4px rgba(59, 130, 246, 0.5);
}

.brb-form-actions .button:not(.button-primary) {
    background: #6b7280;
    color: #fff;
    border-color: #6b7280;
}

.brb-form-actions .button:not(.button-primary):hover {
    background: #4b5563;
    border-color: #4b5563;
    color: #fff;
}

.brb-form-messages {
    margin-top: 30px;
}

.brb-success-message {
    padding: 18px 24px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 2px solid #10b981;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
    animation: slideInDown 0.4s ease-out;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brb-success-message::before {
    content: '✓';
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.brb-error-message {
    padding: 18px 24px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 2px solid #ef4444;
    border-radius: 12px;
    font-weight: 600;
    animation: slideInDown 0.4s ease-out;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brb-error-message::before {
    content: '✕';
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

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

/* Print Button */
/* Return Items Section */
.brb-return-items-section {
    margin-top: 40px;
    margin-bottom: 0;
}

.brb-return-items-section h3 {
    font-size: 1.2em;
    color: #0f172a;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 20px 0;
}

.brb-return-items-section .brb-items-table {
    background: #fff;
    border: none;
}

.brb-return-items-section .brb-items-table thead {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

.brb-return-items-section .brb-items-table th {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    padding: 18px 20px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brb-return-items-section .brb-items-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.brb-return-items-section .brb-items-table tbody tr:hover {
    background: #f8fafc;
}

.brb-return-items-section .brb-items-table tfoot {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 3px solid #e2e8f0;
}

.brb-return-items-section .brb-items-table tfoot td {
    color: #ef4444;
    font-weight: 800;
    font-size: 1.2em;
}

/* Manage Returns Section (Frontend) */
.brb-manage-returns-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 3px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 30px;
    margin-left: -30px;
    margin-right: -30px;
}

.brb-manage-returns-section h3 {
    font-size: 1.6em;
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: -0.3px;
}

.brb-manage-returns-section .brb-items-table-frontend {
    background: #fff;
    border: 1px solid #e2e8f0;
}

.brb-manage-returns-section .brb-items-table-frontend thead {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

.brb-manage-returns-section .brb-items-table-frontend th {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    padding: 18px 20px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brb-return-row-frontend input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #fee2e2;
    border-radius: 8px;
    transition: all 0.3s;
}

.brb-return-row-frontend input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.brb-return-total-frontend {
    font-weight: 700;
    color: #dc2626;
    font-size: 1.05em;
}

#brb-return-grand-total-frontend {
    font-size: 1.2em;
    font-weight: 800;
    color: #dc2626;
}

.brb-return-actions {
    margin-top: 20px;
    text-align: right;
}

.brb-return-actions .brb-save-returns {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1em;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3);
    transition: all 0.3s;
    cursor: pointer;
}

.brb-return-actions .brb-save-returns:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(220, 38, 38, 0.4);
}

.brb-return-actions .brb-save-returns:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#brb-return-messages {
    margin-top: 15px;
}

.brb-bill-actions {
    margin-top: 40px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 30px;
    border-top: 2px solid #f1f5f9;
}

.brb-edit-bill {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95em;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    transition: all 0.3s;
    border: none;
}

.brb-edit-bill:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(30, 64, 175, 0.4);
}

.brb-payment-summary {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.brb-payment-summary p {
    margin: 12px 0;
    font-size: 1.05em;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.brb-payment-summary strong {
    color: #0f172a;
    font-weight: 700;
}

.brb-download-pdf {
    display: inline-block;
    padding: 14px 28px;
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.95em;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    border: none;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.brb-download-pdf:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px -2px rgba(30, 64, 175, 0.4);
}

@media print {
    .brb-back-link,
    .brb-bill-header-links,
    .brb-form-actions,
    .brb-view-bill,
    .brb-bill-actions {
        display: none;
    }
    
    .brb-bill-document {
        box-shadow: none;
        border: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .brb-dashboard-nav {
        flex-direction: column;
    }
    
    .brb-nav-link {
        width: 100%;
        text-align: center;
    }
    
    .brb-summary-cards {
        grid-template-columns: 1fr;
    }
    
    .brb-bills-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .brb-bills-header h2 {
        font-size: 1.5em;
        margin-bottom: 10px;
    }
    
    .brb-header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .brb-header-actions .button,
    .brb-header-actions .brb-create-bill-btn {
        width: 100%;
        justify-content: center;
    }
    
    .brb-bills-table {
        font-size: 0.9em;
    }
    
    .brb-bills-table th,
    .brb-bills-table td {
        padding: 10px 8px;
    }
    
    .brb-bill-header-info {
        flex-direction: column;
    }
    
    .brb-bill-meta p {
        text-align: left;
    }
    
    .brb-bill-document {
        padding: 20px;
    }
    
    .brb-form-content {
        padding: 0;
    }
    
    .brb-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 0 !important;
    }
    
    .brb-form-row-full {
        grid-column: 1;
    }
    
    .brb-form-row-full-base {
        margin-bottom: 0 !important;
    }
    
    /* Items Table - Mobile Responsive */
    .brb-items-table {
        overflow: auto;
        display: block;
    }
    
    /* Reports Filters - Mobile Responsive */
    .brb-reports-container {
        padding: 15px;
    }
    
    .brb-reports-filters {
        padding: 20px;
    }
    
    .brb-reports-form {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .brb-reports-field {
        width: 100%;
        min-width: 100%;
    }
    
    .brb-custom-dates {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        min-width: 100%;
        gap: 15px;
    }
    
    .brb-custom-date-field {
        width: 100%;
        min-width: 100%;
    }
    
    .brb-date-separator {
        display: none;
    }
    
    .brb-reports-submit {
        width: 100%;
    }
    
    .brb-reports-button {
        width: 100%;
        justify-content: center;
    }
    
    .brb-customer-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    
    .brb-customer-info-grid {
        grid-template-columns: 1fr;
    }
    
    .brb-customers-table-wrapper {
        overflow-x: scroll;
    }
    
    .brb-customers-table {
        min-width: 800px;
    }
    
    .brb-customer-actions-inline {
        justify-content: center;
        gap: 6px;
    }
    
    .brb-action-btn {
        width: 32px;
        height: 32px;
    }
    
    .brb-action-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .brb-customer-actions-inline {
        justify-content: center;
        gap: 6px;
    }
    
    .brb-action-btn {
        width: 32px;
        height: 32px;
    }
    
    .brb-action-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .brb-company-info-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Dashboard Container */
    .brb-dashboard-container {
        padding: 30px 15px;
    }
    
    .brb-create-bill-container {
        padding: 30px 15px;
    }
    
    /* Headers */
    .brb-dashboard-header h1,
    .brb-page-header h1,
    .brb-bill-header h1 {
        font-size: 1.8em !important;
    }
    
    .brb-dashboard-header {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    /* Tables - Make scrollable on mobile */
    .brb-inventory-table-wrapper,
    .brb-bills-table-wrapper {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        -ms-overflow-style: -ms-autohiding-scrollbar;
    }
    
    .brb-inventory-table,
    .brb-bills-table {
        display: block;
        overflow: auto;
        min-width: 100%;
    }
    
    .brb-inventory-table th,
    .brb-inventory-table td,
    .brb-bills-table th,
    .brb-bills-table td {
        padding: 10px 8px;
    }
    
    /* Reports Summary Cards */
    .brb-reports-summary {
        grid-template-columns: 1fr !important;
    }
    
    /* Reports Filters */
    .brb-reports-filters form {
        flex-direction: column;
        gap: 15px;
    }
    
    .brb-reports-filters input,
    .brb-reports-filters select {
        width: 100% !important;
    }
    
    /* Form Sections */
    .brb-form-section {
        padding: 20px 15px !important;
    }
    
    /* Invoice Items Table */
    .brb-invoice-items-table-wrapper {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .brb-invoice-items-table {
        min-width: 500px;
        font-size: 0.85em;
    }
    
    /* Customer Info Cards */
    .brb-customer-info-box {
        margin-bottom: 20px;
    }
    
    /* Buttons */
    .brb-form-actions,
    .brb-bill-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .brb-form-actions button,
    .brb-form-actions a.button,
    .brb-bill-actions button,
    .brb-bill-actions a.button {
        width: 100%;
    }
    
    /* Page Headers with Actions */
    .brb-page-header > div {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }
    
    /* Inventory Filters */
    .brb-inventory-filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .brb-inventory-filters > * {
        width: 100%;
    }
    
    /* Modal */
    .brb-modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 20px auto;
        padding: 20px 15px;
    }
    
    /* Card Padding */
    [style*="padding: 30px"],
    [style*="padding: 24px 30px"] {
        padding: 20px 15px !important;
    }
    
    /* Grid Layouts */
    [style*="grid-template-columns: repeat(auto-fit, minmax(280px"] {
        grid-template-columns: 1fr !important;
    }
    
    [style*="grid-template-columns: repeat(auto-fit, minmax(320px"] {
        grid-template-columns: 1fr !important;
    }
    
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Flex Layouts */
    [style*="display: flex"][style*="justify-content: space-between"] {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Welcome Message */
    .brb-welcome-message {
        font-size: 1em;
    }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .brb-dashboard-container,
    .brb-create-bill-container {
        padding: 40px 20px;
    }
    
    .brb-dashboard-header h1,
    .brb-page-header h1,
    .brb-bill-header h1 {
        font-size: 2em;
    }
    
    .brb-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .brb-reports-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .brb-dashboard-container,
    .brb-create-bill-container {
        padding: 20px 10px;
    }
    
    .brb-reports-container {
        padding: 10px;
    }
    
    .brb-reports-filters {
        padding: 15px;
    }
    
    .brb-dashboard-header h1,
    .brb-page-header h1,
    .brb-bill-header h1 {
        font-size: 1.5em !important;
        line-height: 1.3;
    }
    
    .brb-nav-link {
        padding: 10px 16px;
        font-size: 0.9em;
    }
    
    .brb-summary-card {
        padding: 20px 15px;
    }
    
    .brb-summary-card h3 {
        font-size: 0.9em;
    }
    
    .brb-amount {
        font-size: 1.5em;
    }
    
    /* Tables - Even smaller on tiny screens */
    .brb-inventory-table,
    .brb-bills-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .brb-bills-header h2 {
        font-size: 1.3em;
    }
    
    .brb-header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .brb-header-actions .button,
    .brb-header-actions .brb-create-bill-btn {
        width: 100%;
        justify-content: center;
    }
    
    .brb-header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .brb-header-actions .button,
    .brb-header-actions .brb-create-bill-btn {
        width: 100%;
        justify-content: center;
    }
    
    .brb-bills-table-wrapper {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    
    .brb-bills-table,
    .brb-invoice-items-table {
        font-size: 0.75em;
        min-width: 500px;
    }
    
    .brb-inventory-table th,
    .brb-inventory-table td,
    .brb-bills-table th,
    .brb-bills-table td {
        padding: 8px 5px;
    }
}

/* General Overflow Rules for Tables, Forms, and Containers */
.brb-inventory-table-wrapper,
.brb-bills-table-wrapper,
.brb-items-table-frontend-wrapper,
.brb-invoice-items-table-wrapper,
.brb-return-items-table-wrapper {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* Ensure forms and containers can scroll if content overflows */
.brb-form-section,
.brb-form-grid,
.brb-reports-container,
.brb-inventory-container {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* General Overflow Rules for Tables, Forms, and Containers */
.brb-inventory-table-wrapper,
.brb-bills-table-wrapper,
.brb-items-table-frontend-wrapper,
.brb-invoice-items-table-wrapper,
.brb-return-items-table-wrapper {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* Ensure forms can scroll if content overflows */
.brb-form-section,
.brb-form-grid,
.brb-reports-container,
.brb-inventory-container {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
