/* ============================================
   EB IT Support Mobile App with Customer Portal
   Enhanced stylesheet with login and portal views
   ============================================ */

/* Import original base styles */
@import url('app_updated.css');

/* ============================================
   PORTAL-SPECIFIC ADDITIONS
   ============================================ */

/* Login View */
.login-section {
    padding: 2rem 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}



.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.login-help {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.login-help p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-help a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Portal Header */
.portal-header {
    padding: 1rem;
}

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

.app-logo-small {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.portal-header-text {
    flex: 1;
    min-width: 0;
}

.portal-header-text h1 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.portal-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
    margin: 0;
}

.logout-btn,
.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.logout-btn:active,
.back-btn:active {
    background: rgba(255, 255, 255, 0.3);
}

/* Portal Navigation */
.portal-nav {
    background: white;
    display: flex;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 99;
}

.portal-nav-item {
    flex: 1;
    padding: 1rem 0.5rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}

.portal-nav-item i {
    font-size: 1.3rem;
}

.portal-nav-item.active {
    color: var(--primary-color);
}

.portal-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.portal-nav-item .badge {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-weight: 600;
    display: none;
}

/* Portal Content */
.portal-content {
    padding: 1rem;
    min-height: calc(100vh - 250px);
}

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

.content-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

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

.btn-primary:active {
    background: var(--primary-dark);
    transform: scale(0.98);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-tab {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Items List */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Item Cards */
.item-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.item-card:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.item-title {
    flex: 1;
    min-width: 0;
}

.item-id {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: inline-block;
    margin-bottom: 0.25rem;
}

.item-title h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.item-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.item-preview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Appointment Specific */
.appointment-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.appointment-date,
.appointment-time,
.appointment-staff,
.appointment-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.appointment-date i,
.appointment-time i,
.appointment-staff i,
.appointment-location i {
    color: var(--primary-color);
    font-size: 1rem;
}

.appointment-location {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Status Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

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

.bg-success {
    background: var(--secondary-color);
    color: white;
}

.bg-warning {
    background: var(--warning-color);
    color: #78350f;
}

.bg-danger {
    background: var(--danger-color);
    color: white;
}

.bg-secondary {
    background: #6b7280;
    color: white;
}

/* Loading & Empty States */
.loading-spinner,
.empty-state,
.error-state {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-spinner .spinner,
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(37, 99, 235, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.8s linear infinite;
}

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

.loading-spinner p,
.empty-state p,
.error-state p {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.empty-state i,
.error-state i {
    font-size: 3rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

.error-state i {
    color: var(--danger-color);
}

/* Button Loading State */
.primary-btn .btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.primary-btn .btn-spinner .spinner {
    width: 16px;
    height: 16px;
    border-width: 2px;
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: white;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .portal-content {
        max-width: 800px;
        margin: 0 auto;
    }

    .login-section {
        padding: 3rem 1rem;
    }

    .item-card {
        padding: 1.5rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .login-card,
    .item-card {
        background: var(--bg-primary);
        border-color: var(--border-color);
    }

    .form-control {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }

    .portal-nav {
        background: var(--bg-primary);
        border-color: var(--border-color);
    }

    .alert-danger {
        background: #450a0a;
        color: #fca5a5;
        border-color: #7f1d1d;
    }

    .alert-success {
        background: #022c22;
        color: #6ee7b7;
        border-color: #065f46;
    }
}

/* PWA Safe Areas */
@supports (padding: max(0px)) {
    .portal-header {
        padding-top: max(1rem, env(safe-area-inset-top));
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .portal-content {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
}
/* ============================================
   DETAIL MODALS - FIXED VERSION WITH PROPER COLORS
   Add to app_portal.css
   ============================================ */

/* Detail Modals */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
    padding: 1rem;
}

.detail-modal-content {
    background: white;
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.detail-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #3b82f6;
    border-radius: 12px 12px 0 0;
}

.detail-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.detail-modal-header .close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.detail-modal-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.detail-modal-body {
    padding: 1.5rem;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

/* Ticket/Appointment Content */
.ticket-content, .appointment-content {
    margin-bottom: 2rem;
}

.ticket-content h3, .appointment-content h3 {
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1rem 0;
}

.ticket-meta, .appointment-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.meta-item i {
    color: #3b82f6;
}

.ticket-body {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0 2rem 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

/* Style HTML content in ticket body */
.ticket-body h1, .ticket-body h2, .ticket-body h3, .ticket-body h4, .ticket-body h5, .ticket-body h6 {
    color: #1f2937;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ticket-body h4 {
    font-size: 1.1rem;
}

.ticket-body dl {
    margin: 0.5rem 0;
}

.ticket-body dt {
    font-weight: 600;
    color: #374151;
}

.ticket-body dd {
    color: #4b5563;
    margin-bottom: 0.25rem;
}

.ticket-body hr {
    border: none;
    border-top: 1px solid #d1d5db;
    margin: 1rem 0;
}

.ticket-body p {
    margin: 0.5rem 0;
}

.ticket-body ul, .ticket-body ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.ticket-body strong {
    color: #374151;
    font-weight: 600;
}

.ticket-body a {
    color: #3b82f6;
    text-decoration: none;
}

.ticket-body a:hover {
    text-decoration: underline;
}

/* Replies */
.replies-section {
    margin-top: 2rem;
}

.replies-section h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    color: #1f2937;
    font-weight: 600;
}

.reply-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.reply-item.staff-reply {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
}

.reply-item.customer-reply {
    background: #f0fdf4;
    border-left: 3px solid #10b981;
}

.reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.reply-author {
    font-weight: 600;
    color: #1f2937;
}

.reply-time {
    color: #6b7280;
}

.reply-body {
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #374151;
    line-height: 1.6;
}

/* Style HTML content in replies */
.reply-body h1, .reply-body h2, .reply-body h3, .reply-body h4, .reply-body h5, .reply-body h6 {
    color: #1f2937;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 1rem;
}

.reply-body p {
    margin: 0.25rem 0;
}

.reply-body ul, .reply-body ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.reply-body strong {
    font-weight: 600;
}

.reply-body a {
    color: #3b82f6;
    text-decoration: none;
}

.reply-body a:hover {
    text-decoration: underline;
}

.empty-state-text {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 2rem;
}

/* Reply Form */
.reply-form {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}

.reply-form h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.reply-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    resize: vertical;
    line-height: 1.5;
    color: #1f2937;
    background: white;
}

.reply-form textarea::placeholder {
    color: #9ca3af;
}

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

.reply-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-submit-reply {
    background: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.875rem;
}

.btn-submit-reply:hover {
    background: #2563eb;
}

.btn-submit-reply:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading/Error States */
.loading-spinner {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-spinner p {
    color: #6b7280;
    margin-top: 1rem;
}

.error-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #ef4444;
}

.error-state p {
    color: #ef4444;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .detail-modal {
        padding: 0;
    }
    
    .detail-modal-content {
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        max-width: 100%;
    }
    
    .detail-modal-header {
        border-radius: 0;
    }
    
    .detail-modal-body {
        max-height: none;
    }
    
    .ticket-meta, .appointment-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .reply-form textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Print Styles */
@media print {
    .detail-modal-header button,
    .reply-form {
        display: none;
    }
    
    .detail-modal {
        position: static;
        background: white;
        padding: 0;
    }
    
    .detail-modal-content {
        box-shadow: none;
        margin: 0;
    }
    
    .detail-modal-header {
        background: white;
        color: black;
    }
    
    .detail-modal-header h2 {
        color: black;
    }
}

/* ============================================
   INVOICES STYLING
   ============================================ */

/* Invoice Card Specific Styles */
.invoice-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.invoice-card .item-title h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #059669;
}

.invoice-balance {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #92400e;
}

.invoice-balance i {
    color: #f59e0b;
}

.invoice-balance.overdue {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.invoice-balance.overdue i {
    color: #ef4444;
}

.overdue-text {
    color: #dc2626;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Invoice Detail Modal Content */
.invoice-content {
    padding: 0;
}

.invoice-header-section {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.invoice-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.invoice-meta .meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.meta-value {
    font-size: 1rem;
    color: #1f2937;
    font-weight: 600;
}

.invoice-balance-alert {
    padding: 1rem;
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.invoice-balance-alert i {
    font-size: 1.5rem;
    color: #f59e0b;
}

.invoice-balance-alert.overdue {
    background: #fee2e2;
    border-color: #ef4444;
}

.invoice-balance-alert.overdue i {
    color: #ef4444;
}

.invoice-balance-alert strong {
    font-size: 1.125rem;
    color: #1f2937;
}

.invoice-paid-alert {
    padding: 1rem;
    background: #d1fae5;
    border: 2px solid #059669;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #065f46;
    font-weight: 600;
}

.invoice-paid-alert i {
    font-size: 1.5rem;
    color: #059669;
}

/* Invoice Items Section */
.invoice-items-section {
    margin-bottom: 2rem;
}

.invoice-items-section h3 {
    font-size: 1.125rem;
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 600;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.invoice-items-table thead {
    background: #f9fafb;
}

.invoice-items-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    border-bottom: 2px solid #e5e7eb;
}

.invoice-items-table td {
    padding: 0.875rem 1rem;
    color: #1f2937;
    border-bottom: 1px solid #f3f4f6;
}

.invoice-items-table tbody tr:last-child td {
    border-bottom: none;
}

.invoice-items-table tbody tr:hover {
    background: #f9fafb;
}

.text-center {
    text-align: center;
}

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

/* Invoice Totals */
.invoice-totals {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: #374151;
}

.total-row.discount {
    color: #059669;
}

.total-row.grand-total {
    border-top: 2px solid #d1d5db;
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.125rem;
}

.total-row.paid {
    color: #059669;
}

.total-row.balance-due {
    background: #fef3c7;
    margin: 0.5rem -1.5rem -1.5rem -1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 0 0 8px 8px;
    font-size: 1.125rem;
    color: #92400e;
}

/* Invoice Payments Section */
.invoice-payments-section {
    margin-bottom: 2rem;
}

.invoice-payments-section h3 {
    font-size: 1.125rem;
    color: #1f2937;
    margin-bottom: 1rem;
    font-weight: 600;
}

.payments-list {
    display: grid;
    gap: 0.75rem;
}

.payment-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    padding: 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    align-items: center;
}

.payment-date {
    color: #065f46;
    font-weight: 500;
    font-size: 0.875rem;
}

.payment-amount {
    color: #059669;
    font-weight: 600;
    font-size: 1.125rem;
}

.payment-method {
    color: #047857;
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    background: white;
    border-radius: 4px;
    border: 1px solid #bbf7d0;
}

/* Invoice Notes Section */
.invoice-notes-section {
    margin-bottom: 2rem;
}

.invoice-notes-section h3 {
    font-size: 1.125rem;
    color: #1f2937;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.invoice-notes-section p {
    color: #4b5563;
    line-height: 1.6;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

/* Invoice Actions */
.invoice-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.invoice-actions .btn-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.invoice-actions .btn-primary:hover {
    background: #2563eb;
}

.invoice-actions .btn-primary i {
    font-size: 1.125rem;
}

/* Badge Colors for Invoice Status */
.badge-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #059669;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #3b82f6;
}

.badge-secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .invoice-meta {
        grid-template-columns: 1fr;
    }
    
    .invoice-items-table {
        font-size: 0.875rem;
    }
    
    .invoice-items-table th,
    .invoice-items-table td {
        padding: 0.5rem;
    }
    
    .payment-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .invoice-actions {
        flex-direction: column;
    }
}
