393 lines
6.8 KiB
CSS
393 lines
6.8 KiB
CSS
/* Modal Styles */
|
|
.modal-overlay {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
padding: 1rem;
|
|
animation: fadeIn 0.2s ease-in-out;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.modal-content {
|
|
background: var(--card-bg);
|
|
border-radius: 12px;
|
|
max-width: 900px;
|
|
width: 100%;
|
|
max-height: 90vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
animation: slideUp 0.3s ease-out;
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from {
|
|
transform: translateY(20px);
|
|
opacity: 0;
|
|
}
|
|
|
|
to {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.modal-header {
|
|
padding: 1.5rem 2rem;
|
|
border-bottom: 1px solid var(--border-color);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.modal-title {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.modal-title h2 {
|
|
margin: 0;
|
|
font-size: 1.5rem;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.btn-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 2rem;
|
|
line-height: 1;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
padding: 0;
|
|
width: 32px;
|
|
height: 32px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 4px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.btn-close:hover {
|
|
background-color: #f1f5f9;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.modal-body {
|
|
padding: 2rem;
|
|
overflow-y: auto;
|
|
flex: 1;
|
|
}
|
|
|
|
.modal-footer {
|
|
padding: 1.5rem 2rem;
|
|
border-top: 1px solid var(--border-color);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
flex-shrink: 0;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.footer-actions-left,
|
|
.footer-actions-right {
|
|
display: flex;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
/* Form Styles in Modal */
|
|
.form-section {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.form-section:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.form-section h3 {
|
|
margin: 0 0 1rem 0;
|
|
font-size: 1.125rem;
|
|
color: var(--text-primary);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.form-row {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 1rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.form-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.form-group.full-width {
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
.form-group label {
|
|
font-size: 0.875rem;
|
|
font-weight: 500;
|
|
color: var(--text-secondary);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.form-group input,
|
|
.form-group textarea,
|
|
.form-group select {
|
|
padding: 0.625rem 0.75rem;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 6px;
|
|
font-size: 0.9375rem;
|
|
transition: all 0.2s;
|
|
font-family: inherit;
|
|
background-color: #ffffff;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.form-group input:focus,
|
|
.form-group textarea:focus,
|
|
.form-group select:focus {
|
|
outline: none;
|
|
border-color: var(--primary);
|
|
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
|
|
}
|
|
|
|
.form-group input:disabled,
|
|
.form-group textarea:disabled,
|
|
.form-group select:disabled {
|
|
background-color: #f8fafc;
|
|
color: var(--text-secondary);
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.form-group input[readonly] {
|
|
background-color: #f8fafc;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* Add Line Form */
|
|
.add-line-form {
|
|
background-color: #f8fafc;
|
|
padding: 1.5rem;
|
|
border-radius: 8px;
|
|
margin-bottom: 1rem;
|
|
border: 2px dashed var(--border-color);
|
|
}
|
|
|
|
.form-group textarea {
|
|
resize: vertical;
|
|
min-height: 80px;
|
|
}
|
|
|
|
/* Invoice Lines Table */
|
|
.invoice-lines {
|
|
margin: 1rem 0;
|
|
}
|
|
|
|
.lines-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.lines-table thead {
|
|
background-color: #f8fafc;
|
|
}
|
|
|
|
.lines-table th {
|
|
padding: 0.75rem;
|
|
text-align: left;
|
|
font-weight: 600;
|
|
color: var(--text-secondary);
|
|
border-bottom: 2px solid var(--border-color);
|
|
}
|
|
|
|
.lines-table td {
|
|
padding: 0.75rem;
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.lines-table tbody tr:hover {
|
|
background-color: #f8fafc;
|
|
}
|
|
|
|
.no-lines {
|
|
text-align: center;
|
|
color: var(--text-secondary);
|
|
font-style: italic;
|
|
}
|
|
|
|
/* Invoice Totals */
|
|
.invoice-totals {
|
|
margin-top: 1.5rem;
|
|
padding: 1rem;
|
|
background-color: #f8fafc;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.75rem;
|
|
max-width: 300px;
|
|
margin-left: auto;
|
|
}
|
|
|
|
.total-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
font-size: 0.9375rem;
|
|
}
|
|
|
|
.total-row.pending {
|
|
font-size: 1.125rem;
|
|
color: var(--primary);
|
|
padding-top: 0.75rem;
|
|
border-top: 2px solid var(--border-color);
|
|
}
|
|
|
|
/* Button Styles */
|
|
.btn-small {
|
|
padding: 0.5rem 1rem;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.btn-primary {
|
|
background-color: var(--primary);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background-color: var(--primary-hover);
|
|
}
|
|
|
|
.btn-success {
|
|
background-color: var(--success);
|
|
color: white;
|
|
}
|
|
|
|
.btn-success:hover {
|
|
background-color: var(--success-hover);
|
|
}
|
|
|
|
.btn-cancel {
|
|
background-color: transparent;
|
|
color: var(--text-secondary);
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.btn-cancel:hover {
|
|
background-color: #f8fafc;
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
/* Invoice Actions Buttons */
|
|
.invoice-actions {
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.btn-action {
|
|
background: none;
|
|
border: none;
|
|
font-size: 1.25rem;
|
|
cursor: pointer;
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 4px;
|
|
transition: all 0.2s;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.btn-action:hover {
|
|
background-color: #f1f5f9;
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
.btn-delete:hover {
|
|
background-color: #fee2e2;
|
|
}
|
|
|
|
/* Loading and Error States */
|
|
.loading {
|
|
text-align: center;
|
|
padding: 2rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.error {
|
|
text-align: center;
|
|
padding: 2rem;
|
|
color: var(--danger);
|
|
}
|
|
|
|
/* Responsive Modal */
|
|
@media (max-width: 768px) {
|
|
.modal-overlay {
|
|
padding: 0;
|
|
}
|
|
|
|
.modal-content {
|
|
max-width: 100%;
|
|
max-height: 100vh;
|
|
border-radius: 0;
|
|
}
|
|
|
|
.modal-header,
|
|
.modal-body,
|
|
.modal-footer {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.form-row {
|
|
grid-template-columns: 1fr;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.invoice-totals {
|
|
max-width: 100%;
|
|
}
|
|
|
|
.modal-footer {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.footer-actions-left,
|
|
.footer-actions-right {
|
|
width: 100%;
|
|
}
|
|
|
|
.footer-actions-left button,
|
|
.footer-actions-right button {
|
|
flex: 1;
|
|
}
|
|
} |