/* E-Invoicing Section Styles */
#e-invoicing-section {
    padding: 2rem;
    padding-top: 100px;
    max-width: 1200px;
    margin: 0 auto;
    color: #333;
}

.e-invoicing-dashboard {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.e-invoicing-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.e-invoicing-header .subtitle {
    color: #666;
    font-size: 1.1rem;
}

.e-invoicing-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.e-invoicing-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.add-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-btn:hover {
    background: #5a67d8;
}

/* Table Styles */
.e-invoicing-table-container {
    overflow-x: auto;
}

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

.e-invoicing-table th,
.e-invoicing-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.e-invoicing-table th {
    font-weight: 600;
    color: #555;
    background: #f9f9f9;
}

.e-invoicing-table tr:hover {
    background: #fcfcfc;
}

.e-invoicing-table .actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}

.action-btn:hover {
    color: #667eea;
}

.action-btn.delete:hover {
    color: #e53e3e;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

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

.cancel-btn {
    background: #f5f5f5;
    color: #666;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.save-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* ==========================================
   DARK MODE STYLES
   ========================================== */

body.dark-mode #e-invoicing-section {
    background: #0a0a0a;
    color: #e5e5e5;
}

body.dark-mode .e-invoicing-header h2 {
    color: #e5e5e5;
}

body.dark-mode .e-invoicing-header .subtitle {
    color: #a3a3a3;
}

body.dark-mode .e-invoicing-card {
    background: #171717;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

body.dark-mode .e-invoicing-table th,
body.dark-mode .e-invoicing-table td {
    border-bottom-color: #262626;
}

body.dark-mode .e-invoicing-table th {
    color: #a3a3a3;
    background: #121212;
}

body.dark-mode .e-invoicing-table tr:hover {
    background: #1a1a1a;
}

body.dark-mode .e-invoicing-table td {
    color: #e5e5e5;
}

body.dark-mode .action-btn {
    color: #737373;
}

body.dark-mode .action-btn:hover {
    color: #667eea;
}

body.dark-mode .action-btn.delete:hover {
    color: #ef4444;
}

body.dark-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.8);
}

body.dark-mode .modal-content {
    background: #171717;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

body.dark-mode .modal-header h3 {
    color: #e5e5e5;
}

body.dark-mode .close-modal-btn {
    color: #737373;
}

body.dark-mode .close-modal-btn:hover {
    color: #e5e5e5;
}

body.dark-mode .form-group label {
    color: #a3a3a3;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
    background: #121212;
    border-color: #262626;
    color: #e5e5e5;
}

body.dark-mode .form-group input::placeholder,
body.dark-mode .form-group textarea::placeholder {
    color: #525252;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

body.dark-mode .cancel-btn {
    background: #262626;
    color: #a3a3a3;
}

body.dark-mode .cancel-btn:hover {
    background: #333333;
}
