/*
 * BizFlow Invoice Dashboard Styles
 * Complete styling for invoice management system
 */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container Layout */
.container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Sidebar (using existing styles) */
.sidebar {
    width: 220px;
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    padding: 1.5rem 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 100;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    letter-spacing: -1px;
    margin-bottom: 0;
}

.nav-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 1rem;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    text-decoration: none;
    color: #000000;
    width: 100%;
    box-sizing: border-box;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-left-color: #000000;
    transform: translateX(5px);
    text-decoration: none;
}

.nav-item.active .nav-link {
    background-color: rgba(0, 0, 0, 0.15);
    border-left-color: #000000;
    transform: translateX(5px);
}

.nav-icon {
    font-size: 1rem;
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
    color: #000000;
    transition: transform 0.15s ease;
}

.nav-text {
    font-size: 1rem;
    font-weight: 500;
    color: #000000;
    transition: color 0.15s ease;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    background-color: #000000;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Invoice Header */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-title-section h1 {
    font-size: 3rem;
    font-weight: 300;
    color: #ffffff;
    margin-bottom: 0.25rem;
    letter-spacing: -1px;
}

.page-subtitle {
    color: #888888;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.invoice-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #000000;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(241, 196, 15, 0.3);
}

.btn-secondary {
    background: #333333;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #555555;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
}

.btn-icon {
    font-size: 1rem;
}

/* Invoice Statistics */
.invoice-stats-section {
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #1a1a1a, #333333);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #555555;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #f1c40f;
    display: block;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #888888;
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.85rem;
    font-weight: 500;
}

.stat-change.positive {
    color: #2ecc71;
}

.stat-change.negative {
    color: #e74c3c;
}

/* Quick Actions */
.quick-actions-section {
    margin-bottom: 3rem;
}

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

.section-header h3 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-action-card {
    background: #1a1a1a;
    border: 2px solid #333333;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.quick-action-card:hover {
    background: #333333;
    border-color: #f1c40f;
    transform: translateY(-2px);
}

.quick-action-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.quick-action-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
}

.quick-action-desc {
    color: #888888;
    font-size: 0.9rem;
}

/* Invoice Filters */
.invoice-filters-section {
    margin-bottom: 2rem;
}

.filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    background: #333333;
    color: #ffffff;
    border: 2px solid #555555;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    font-size: 1rem;
    transition: border-color 0.15s ease;
}

.search-input:focus {
    outline: none;
    border-color: #f1c40f;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #888888;
    pointer-events: none;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    background: #333333;
    color: #ffffff;
    border: 2px solid #555555;
    border-radius: 8px;
    padding: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #f1c40f;
}

/* Invoice List */
.invoice-list-section {
    margin-bottom: 3rem;
}

.list-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.view-toggle {
    display: flex;
    border: 2px solid #555555;
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    background: #333333;
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 1rem;
}

.view-btn:hover {
    background: #555555;
}

.view-btn.active {
    background: #f1c40f;
    color: #000000;
}

/* Invoice Table */
.invoice-table-container {
    background: #1a1a1a;
    border-radius: 12px;
    border: 1px solid #333333;
    overflow: hidden;
    margin-bottom: 2rem;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-table th {
    background: #333333;
    color: #ffffff;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid #555555;
}

.invoice-table td {
    padding: 1rem;
    border-bottom: 1px solid #333333;
    color: #ffffff;
}

.invoice-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

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

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.draft {
    background-color: rgba(108, 117, 125, 0.2);
    color: #6c757d;
}

.status-badge.sent {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.status-badge.paid {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.status-badge.overdue {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.status-badge.cancelled {
    background-color: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: none;
    border: none;
    color: #888888;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.action-btn:hover {
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.1);
}

/* Invoice Grid View */
.invoice-grid-container {
    margin-bottom: 2rem;
}

.invoice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.invoice-card {
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.invoice-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
    border-color: #f1c40f;
}

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

.invoice-number {
    font-weight: 600;
    color: #f1c40f;
    font-size: 1.1rem;
}

.invoice-card-body {
    margin-bottom: 1rem;
}

.invoice-client {
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.invoice-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f1c40f;
    margin-bottom: 0.5rem;
}

.invoice-dates {
    color: #888888;
    font-size: 0.9rem;
}

.invoice-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #333333;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: #888888;
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn {
    background: #333333;
    color: #ffffff;
    border: 1px solid #555555;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover:not(:disabled) {
    background: #555555;
    border-color: #f1c40f;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
}

.page-number {
    background: #333333;
    color: #ffffff;
    border: 1px solid #555555;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.9rem;
    min-width: 35px;
    text-align: center;
}

.page-number:hover {
    background: #555555;
    border-color: #f1c40f;
}

.page-number.active {
    background: #f1c40f;
    color: #000000;
    border-color: #f1c40f;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #1a1a1a;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    border: 1px solid #555555;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-large {
    max-width: 900px;
}

.modal-extra-large {
    max-width: 1200px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333333;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
}

.modal-header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    color: #888888;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.15s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.close-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Form Styles */
.invoice-form,
.client-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #333333;
}

.form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.section-title {
    color: #f1c40f;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

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

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-label {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
}

.form-input {
    background-color: #333333;
    border: 2px solid #555555;
    border-radius: 8px;
    padding: 0.75rem;
    color: #ffffff;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
    outline: none;
    border-color: #f1c40f;
    box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.1);
}

.form-input::placeholder {
    color: #888888;
}

/* Client Select Container */
.client-select-container {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.client-select-container select {
    flex: 1;
}

/* Client Details */
.client-details {
    background: #333333;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border: 1px solid #555555;
}

.client-info {
    color: #ffffff;
    line-height: 1.5;
}

.client-info strong {
    color: #f1c40f;
}

/* Line Items */
.line-items-container {
    background: #333333;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #555555;
}

.line-items-header {
    display: grid;
    grid-template-columns: 3fr 80px 120px 120px 80px;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #555555;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #f1c40f;
    font-size: 0.9rem;
}

.line-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.line-item {
    display: grid;
    grid-template-columns: 3fr 80px 120px 120px 80px;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem 0;
}

.line-item-input {
    background: #1a1a1a;
    border: 1px solid #555555;
    border-radius: 6px;
    padding: 0.5rem;
    color: #ffffff;
    font-size: 0.9rem;
}

.line-item-input:focus {
    outline: none;
    border-color: #f1c40f;
}

.line-item-amount {
    color: #f1c40f;
    font-weight: 600;
    text-align: right;
}

.remove-item-btn {
    background: #e74c3c;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.8rem;
}

.remove-item-btn:hover {
    background: #c0392b;
}

/* Invoice Totals */
.invoice-totals {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.totals-section {
    background: #333333;
    border-radius: 8px;
    padding: 1.5rem;
    min-width: 300px;
    border: 1px solid #555555;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.total-row:last-child {
    margin-bottom: 0;
}

.total-label {
    color: #ffffff;
    font-weight: 500;
}

.total-value {
    color: #f1c40f;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.total-final {
    border-top: 2px solid #555555;
    margin-top: 1rem;
    padding-top: 1rem;
    font-size: 1.2rem;
}

.tax-input,
.discount-input {
    background: #1a1a1a;
    border: 1px solid #555555;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    color: #ffffff;
    width: 60px;
    text-align: center;
    font-size: 0.9rem;
}

.tax-input:focus,
.discount-input:focus {
    outline: none;
    border-color: #f1c40f;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #333333;
    flex-wrap: wrap;
}

/* Invoice Preview */
.invoice-preview-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 2rem;
    color: #000000;
    max-height: 70vh;
    overflow-y: auto;
}

.invoice-preview {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    padding: 2rem;
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
}

.invoice-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    border-bottom: 2px solid #f1c40f;
    padding-bottom: 1rem;
}

.company-info h2 {
    color: #f1c40f;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.company-info p {
    color: #666666;
    margin: 0;
    font-size: 0.9rem;
}

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

.invoice-title {
    font-size: 1.5rem;
    color: #333333;
    margin-bottom: 0.5rem;
}

.invoice-details {
    color: #666666;
    font-size: 0.9rem;
}

.invoice-preview-body {
    margin-bottom: 2rem;
}

.billing-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 2rem;
}

.bill-to,
.ship-to {
    flex: 1;
}

.bill-to h4,
.ship-to h4 {
    color: #333333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.bill-to p,
.ship-to p {
    color: #666666;
    margin: 0;
    font-size: 0.9rem;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.invoice-items-table th {
    background: #f8f9fa;
    color: #333333;
    padding: 0.75rem;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.invoice-items-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #dee2e6;
    color: #333333;
}

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

.invoice-totals-preview {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.totals-table {
    width: 300px;
}

.totals-table tr {
    border-bottom: 1px solid #dee2e6;
}

.totals-table tr:last-child {
    border-bottom: 2px solid #333333;
    font-weight: 700;
    font-size: 1.1rem;
}

.totals-table td {
    padding: 0.5rem 0;
    color: #333333;
}

.totals-table .total-label {
    text-align: left;
    color: #666666;
}

.totals-table .total-amount {
    text-align: right;
    color: #333333;
    font-weight: 600;
}

.invoice-notes-preview {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.invoice-notes-preview h4 {
    color: #333333;
    margin-bottom: 0.5rem;
}

.invoice-notes-preview p {
    color: #666666;
    margin: 0;
    font-size: 0.9rem;
}

/* Templates */
.templates-container {
    padding: 1rem 0;
}

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

.template-card {
    background: #333333;
    border: 2px solid #555555;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.template-card:hover {
    border-color: #f1c40f;
    transform: translateY(-2px);
}

.template-card.active {
    border-color: #f1c40f;
    background: rgba(241, 196, 15, 0.1);
}

.template-preview {
    background: #ffffff;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.template-header {
    background: #f1c40f;
    color: #000000;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
}

.template-lines {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.template-lines::before,
.template-lines::after {
    content: '';
    height: 2px;
    background: #dee2e6;
    border-radius: 1px;
}

.template-total {
    background: #333333;
    height: 3px;
    border-radius: 2px;
}

.template-name {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
}

.template-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Reports */
.reports-container {
    padding: 1rem 0;
}

.report-filters {
    display: flex;
    gap: 2rem;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-group select {
    background: #333333;
    color: #ffffff;
    border: 2px solid #555555;
    border-radius: 6px;
    padding: 0.5rem;
    min-width: 150px;
}

.report-content {
    background: #333333;
    border-radius: 8px;
    padding: 2rem;
    min-height: 400px;
    border: 1px solid #555555;
}

/* Bulk Actions */
.bulk-actions-content {
    text-align: center;
    padding: 1rem 0;
}

.selected-count {
    color: #f1c40f;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.bulk-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bulk-action-btn {
    background: #333333;
    color: #ffffff;
    border: 2px solid #555555;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
}

.bulk-action-btn:hover {
    background: #555555;
    border-color: #f1c40f;
}

.bulk-action-btn.danger {
    border-color: #e74c3c;
}

.bulk-action-btn.danger:hover {
    background: #e74c3c;
    border-color: #e74c3c;
}

/* Email Form */
.email-attachments {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    accent-color: #f1c40f;
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification {
    background: linear-gradient(135deg, #f1c40f, #f39c12);
    color: #000000;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease-out;
    max-width: 350px;
    position: relative;
}

.notification.success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #ffffff;
}

.notification.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #ffffff;
}

.notification.warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: #ffffff;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.7;
}

.notification-close:hover {
    opacity: 1;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

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

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

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.5rem !important;
}

.mb-2 {
    margin-bottom: 1rem !important;
}

.mb-3 {
    margin-bottom: 1.5rem !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-1 {
    margin-top: 0.5rem !important;
}

.mt-2 {
    margin-top: 1rem !important;
}

.mt-3 {
    margin-top: 1.5rem !important;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #555555;
    border-radius: 50%;
    border-top-color: #f1c40f;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #888888;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .invoice-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        overflow-x: auto;
        padding: 1rem 0;
    }

    .nav-menu {
        display: flex;
        white-space: nowrap;
        padding: 0 1rem;
        gap: 0.25rem;
    }

    .nav-item {
        flex-direction: column;
        padding: 0.5rem;
        min-width: 80px;
        text-align: center;
        border-left: none;
        border-bottom: 4px solid transparent;
    }

    .nav-item:hover,
    .nav-item.active {
        border-left: none;
        border-bottom-color: #000000;
        transform: translateY(-3px);
    }

    .nav-icon {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }

    .nav-text {
        font-size: 0.9rem;
    }

    .main-content {
        padding: 1rem;
    }

    .invoice-header {
        flex-direction: column;
        align-items: stretch;
    }

    .invoice-actions {
        justify-content: stretch;
    }

    .invoice-actions .btn {
        flex: 1;
        justify-content: center;
    }

    .page-title-section h1 {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-controls {
        justify-content: stretch;
    }

    .filter-controls>* {
        flex: 1;
    }

    .invoice-table-container {
        overflow-x: auto;
    }

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

    .invoice-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 95vh;
    }

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

    .line-items-header,
    .line-item {
        grid-template-columns: 2fr 60px 80px 80px 60px;
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .billing-section {
        flex-direction: column;
        gap: 1rem;
    }

    .invoice-totals {
        justify-content: stretch;
    }

    .totals-section {
        min-width: auto;
    }

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

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .pagination-container {
        flex-direction: column;
        text-align: center;
    }

    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .report-filters {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group select {
        min-width: auto;
        width: 100%;
    }

    .bulk-action-buttons {
        gap: 0.5rem;
    }

    .bulk-action-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        padding: 1rem;
    }

    .line-items-header,
    .line-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .line-items-header {
        display: none;
    }

    .line-item {
        background: #1a1a1a;
        border-radius: 8px;
        padding: 1rem;
        border: 1px solid #555555;
    }

    .line-item-input {
        margin-bottom: 0.5rem;
    }

    .templates-grid {
        grid-template-columns: 1fr;
    }

    .pagination-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Print Styles */
@media print {

    .sidebar,
    .invoice-actions,
    .modal-header-actions,
    .form-actions,
    .action-buttons {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .invoice-preview {
        box-shadow: none;
        border: none;
    }

    .modal-content {
        box-shadow: none;
        border: none;
        background: #ffffff;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {

    .invoice-table,
    .stat-card,
    .quick-action-card,
    .invoice-card,
    .modal-content {
        border-width: 2px;
    }

    .btn {
        border: 2px solid transparent;
    }

    .btn:focus {
        border-color: #ffffff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    .stat-card,
    .quick-action-card,
    .invoice-card,
    .template-card,
    .btn,
    .action-btn {
        transition: none;
        animation: none;
    }

    .notification {
        animation: none;
    }

    .loading::after {
        animation: none;
    }
}

/* Custom Scrollbar */
.modal-content::-webkit-scrollbar,
.invoice-preview-container::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track,
.invoice-preview-container::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb,
.invoice-preview-container::-webkit-scrollbar-thumb {
    background: #555555;
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover,
.invoice-preview-container::-webkit-scrollbar-thumb:hover {
    background: #666666;
}

/* Firefox Scrollbar */
.modal-content,
.invoice-preview-container {
    scrollbar-width: thin;
    scrollbar-color: #555555 #1a1a1a;
}