/** * INVOICE FORM DESIGN SYSTEM STYLES * Zusätzliche CSS-Utilities und Variablen für das verbesserte Invoice-Formular * * Hinweis: Diese Styles sollten in das bestehende Tailwind CSS System integriert werden */ /* ======================================== CSS Custom Properties (Design Tokens) ======================================== */ :root { /* Spacing System */ --space-section-gap: 2rem; /* 32px - Abstand zwischen Sektionen */ --space-section-padding: 1.5rem; /* 24px - Innen-Padding der Sektionen */ --space-field-gap: 1rem; /* 16px - Abstand zwischen Feldern */ --space-inline-gap: 0.75rem; /* 12px - Abstand zwischen Inline-Feldern */ /* Component Heights */ --height-form-element: 2.75rem; /* 44px - Touch-friendly height */ --height-button: 2.5rem; /* 40px - Standard button height */ --height-button-small: 2rem; /* 32px - Small button height */ /* Typography */ --font-size-dialog-title: 1.5rem; /* 24px */ --font-size-section-title: 1.25rem; /* 20px */ --font-size-subsection: 1rem; /* 16px */ --font-size-body: 0.875rem; /* 14px */ --font-size-small: 0.75rem; /* 12px */ --font-size-large: 1rem; /* 16px */ /* Font Weights */ --font-weight-normal: 400; --font-weight-medium: 500; --font-weight-semibold: 600; --font-weight-bold: 700; /* Border Radius */ --radius-section: 0.75rem; /* 12px */ --radius-card: 0.5rem; /* 8px */ --radius-small: 0.375rem; /* 6px */ --radius-button: 0.375rem; /* 6px */ /* Shadows */ --shadow-section: 0 1px 3px rgba(0, 0, 0, 0.1); --shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.08); --shadow-elevated: 0 4px 12px rgba(0, 0, 0, 0.12); /* Transitions */ --transition-fast: 0.15s ease-in-out; --transition-normal: 0.2s ease; --transition-slow: 0.3s ease; /* Z-Index Scale */ --z-base: 1; --z-dropdown: 1000; --z-sticky: 1020; --z-fixed: 1030; --z-modal-backdrop: 1040; --z-modal: 1050; --z-popover: 1060; --z-tooltip: 1070; } /* Dark Mode Adjustments */ .app-dark { --shadow-section: 0 1px 3px rgba(0, 0, 0, 0.3); --shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.25); --shadow-elevated: 0 4px 12px rgba(0, 0, 0, 0.35); } /* ======================================== Form Section Components ======================================== */ .form-section { background: var(--surface-0); border: 1px solid var(--surface-200); border-radius: var(--radius-section); padding: var(--space-section-padding); box-shadow: var(--shadow-section); transition: box-shadow var(--transition-normal); } .form-section:hover { box-shadow: var(--shadow-hover); } .form-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--surface-200); } .form-section-title { font-size: var(--font-size-section-title); font-weight: var(--font-weight-semibold); color: var(--text-primary); margin: 0; display: flex; align-items: center; gap: 0.5rem; } .form-section-body { /* Container for form fields */ } /* ======================================== Form Layout Utilities ======================================== */ .form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-field-gap); align-items: start; } .form-grid--3-col { grid-template-columns: repeat(3, 1fr); } .form-grid--4-col { grid-template-columns: repeat(4, 1fr); } .form-field-full { grid-column: 1 / -1; } .form-field-span-2 { grid-column: span 2; } /* Responsive Grid */ @media (max-width: 992px) { .form-grid, .form-grid--3-col, .form-grid--4-col { grid-template-columns: 1fr; } .form-field-span-2 { grid-column: span 1; } } /* ======================================== Invoice Item Components ======================================== */ .invoice-items-list { display: flex; flex-direction: column; gap: 0.75rem; } .invoice-item-card { background: var(--surface-50); border: 1px solid var(--surface-200); border-radius: var(--radius-card); padding: 1rem; transition: all var(--transition-normal); } .invoice-item-card:hover { box-shadow: var(--shadow-hover); border-color: var(--primary-color); } .invoice-item-card--new { animation: slideIn var(--transition-slow) ease-out; } @keyframes slideIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } .invoice-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; } .invoice-item-number { font-weight: var(--font-weight-semibold); color: var(--text-secondary); display: flex; align-items: center; gap: 0.5rem; } .invoice-item-fields { display: grid; grid-template-columns: 1fr 1fr auto; gap: 1rem; align-items: start; } .invoice-item-field--small { max-width: 120px; } @media (max-width: 768px) { .invoice-item-fields { grid-template-columns: 1fr; } .invoice-item-field--small { max-width: 100%; } } .invoice-item-subtotal { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--surface-200); } /* ======================================== Invoice Summary Component ======================================== */ .invoice-summary { background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%); border: 2px solid var(--primary-color); border-radius: var(--radius-section); padding: 1.5rem; margin-top: 1.5rem; } .app-dark .invoice-summary { background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.25) 100%); } .invoice-summary-header { margin-bottom: 1rem; } .invoice-summary-header h4 { margin: 0; font-size: 1rem; font-weight: var(--font-weight-semibold); color: var(--text-primary); } .invoice-summary-body { /* Container for summary rows */ } .invoice-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; font-size: var(--font-size-body); color: var(--text-secondary); } .invoice-summary-total { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0 0; margin-top: 0.75rem; border-top: 2px solid var(--surface-200); font-size: 1.25rem; font-weight: var(--font-weight-bold); color: var(--text-primary); } /* ======================================== Empty State Component ======================================== */ .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1rem; text-align: center; } .empty-state-icon { font-size: 3rem; color: var(--text-muted); margin-bottom: 1rem; opacity: 0.5; } .empty-state-text { font-size: 1rem; color: var(--text-secondary); margin-bottom: 0.5rem; font-weight: var(--font-weight-medium); } .empty-state-description { font-size: var(--font-size-small); color: var(--text-muted); margin-bottom: 1.5rem; } /* ======================================== Form Actions ======================================== */ .form-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.5rem 0; border-top: 1px solid var(--surface-200); margin-top: 1.5rem; } .form-actions-secondary { display: flex; gap: 0.5rem; align-items: center; } @media (max-width: 768px) { .form-actions { flex-direction: column-reverse; align-items: stretch; } .form-actions-secondary { flex-direction: column; width: 100%; } } /* ======================================== Context Card (Payment Form) ======================================== */ .context-card { background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%); border: 1px solid var(--primary-200); border-radius: var(--radius-section); padding: 1.5rem; margin-bottom: 1.5rem; } .app-dark .context-card { background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.2) 100%); border-color: rgba(59, 130, 246, 0.3); } .context-card-header { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--primary-200); } .context-card-header h4 { margin: 0; font-size: 1rem; font-weight: var(--font-weight-semibold); } .context-row { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; } .context-row--highlight { padding: 1rem 0 0; margin-top: 0.5rem; border-top: 1px solid var(--primary-300); } .context-label { color: var(--text-secondary); font-size: var(--font-size-body); } .context-value { text-align: right; font-weight: var(--font-weight-medium); } /* ======================================== Upload Area (PDF Upload) ======================================== */ .upload-area { border: 2px dashed var(--surface-200); border-radius: var(--radius-section); padding: 3rem 2rem; text-align: center; transition: all var(--transition-normal); cursor: pointer; background: var(--surface-0); } .upload-area:hover { border-color: var(--primary-color); background: var(--primary-50); } .upload-area--dragover { border-color: var(--primary-color); background: var(--primary-100); border-width: 3px; transform: scale(1.02); } .upload-placeholder { /* Container for upload placeholder content */ } .upload-icon { font-size: 4rem; color: var(--primary-color); margin-bottom: 1rem; opacity: 0.8; } .upload-hint { font-size: var(--font-size-small); color: var(--text-muted); margin-top: 1rem; } .upload-preview { /* Container for file preview */ } .file-info { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: var(--surface-50); border: 1px solid var(--surface-200); border-radius: var(--radius-card); } .file-icon { font-size: 2.5rem; color: var(--danger-color); flex-shrink: 0; } .file-details { flex: 1; text-align: left; min-width: 0; /* Allow text truncation */ } .file-name { font-weight: var(--font-weight-semibold); margin-bottom: 0.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .file-size { font-size: var(--font-size-body); color: var(--text-secondary); } /* ======================================== Keyboard Hints ======================================== */ .keyboard-hints { text-align: center; padding: 1rem; border-top: 1px solid var(--surface-200); margin-top: 1rem; } kbd { background: var(--surface-100); border: 1px solid var(--surface-300); border-radius: 0.25rem; padding: 0.125rem 0.375rem; font-size: var(--font-size-small); font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); } @media (max-width: 768px) { .keyboard-hints { display: none; } } /* ======================================== Validation & Error States ======================================== */ .p-error { color: var(--danger-color); font-size: var(--font-size-small); margin-top: 0.25rem; display: block; animation: fadeIn 0.2s ease; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } } /* Required field indicator */ abbr[title] { text-decoration: none; color: var(--danger-color); font-weight: var(--font-weight-bold); margin-left: 0.125rem; } /* ======================================== List Transitions ======================================== */ .list-enter-active, .list-leave-active { transition: all 0.3s ease; } .list-enter-from { opacity: 0; transform: translateY(-20px); } .list-leave-to { opacity: 0; transform: translateX(20px); } .list-move { transition: transform 0.3s ease; } /* ======================================== Accessibility Utilities ======================================== */ /* Screen reader only content */ .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; } /* Focus visible styles */ *:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; border-radius: var(--radius-small); } /* Skip to main content link */ .skip-link { position: absolute; top: -40px; left: 0; background: var(--primary-color); color: white; padding: 8px 16px; text-decoration: none; z-index: var(--z-tooltip); border-radius: 0 0 var(--radius-small) 0; font-weight: var(--font-weight-medium); } .skip-link:focus { top: 0; } /* ======================================== Loading States ======================================== */ .skeleton-loader { background: linear-gradient( 90deg, var(--surface-200) 25%, var(--surface-100) 50%, var(--surface-200) 75% ); background-size: 200% 100%; animation: loading 1.5s ease-in-out infinite; border-radius: var(--radius-small); } @keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } /* ======================================== Utility Classes ======================================== */ /* Text utilities */ .text-muted { color: var(--text-muted); } .text-secondary { color: var(--text-secondary); } .text-primary-color { color: var(--primary-color); } /* Spacing utilities */ .gap-section { gap: var(--space-section-gap); } .gap-field { gap: var(--space-field-gap); } .gap-inline { gap: var(--space-inline-gap); } /* Flex utilities */ .flex-between { display: flex; justify-content: space-between; align-items: center; } .flex-center { display: flex; justify-content: center; align-items: center; } /* ======================================== Print Styles ======================================== */ @media print { .form-actions, .keyboard-hints, .invoice-item-actions, .form-section-header button { display: none !important; } .form-section { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; } .invoice-summary { border: 2px solid #333; page-break-inside: avoid; } } /* ======================================== Dark Mode Specific Adjustments ======================================== */ .app-dark .invoice-item-card { background: rgba(255, 255, 255, 0.05); } .app-dark .form-section { border-color: rgba(255, 255, 255, 0.1); } .app-dark kbd { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); } /* ======================================== High Contrast Mode Support ======================================== */ @media (prefers-contrast: high) { .form-section { border-width: 2px; } .invoice-item-card { border-width: 2px; } *:focus-visible { outline-width: 3px; } } /* ======================================== Reduced Motion Support ======================================== */ @media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } }