/* ===================== CREATE INVOICE PAGE ===================== */ .create-invoice-page { padding: 2rem; max-width: 960px; margin: 0 auto; min-height: 100vh; } .invoice-header-compact { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-shrink: 0; } .invoice-header-compact h1 { margin: 0; font-size: 1.375rem; color: var(--text-primary); font-weight: 600; letter-spacing: -0.02em; } .btn-back { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-color); padding: 0.45rem 0.875rem; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; font-size: 0.8125rem; transition: all 0.15s ease; } .btn-back:hover { background: #f8fafc; color: var(--text-primary); border-color: #cbd5e1; } .invoice-form-compact { background: var(--card-bg); border-radius: var(--radius-md); border: 1px solid var(--border-color); padding: 1.75rem; box-shadow: var(--shadow-xs); } .form-grid-compact { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; flex-shrink: 0; } .notes-grid-compact { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; } .form-field-compact { display: flex; flex-direction: column; } .form-field-compact.full-width { grid-column: 1 / -1; } .form-field-compact label { font-weight: 500; margin-bottom: 0.375rem; color: var(--text-secondary); font-size: 0.8125rem; } .form-field-compact input, .form-field-compact select, .form-field-compact textarea { padding: 0.5rem 0.75rem; border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: 0.875rem; color: var(--text-primary); background: #ffffff; resize: vertical; min-height: 36px; font-family: inherit; transition: border-color 0.15s ease, box-shadow 0.15s ease; } .form-field-compact input:focus, .form-field-compact select:focus, .form-field-compact textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08); } /* Date input wrapper */ .date-input-wrapper { position: relative; display: flex; align-items: stretch; } .date-input-wrapper input[type="date"] { flex: 1; border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: none; } .date-input-wrapper input[type="date"]:focus { z-index: 1; } .date-picker-btn { display: flex; align-items: center; justify-content: center; padding: 0 0.625rem; background: var(--primary); color: white; border: 1px solid var(--primary); border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); cursor: pointer; transition: background 0.15s; } .date-picker-btn:hover { background: var(--primary-hover); } /* Lines section */ .lines-section-compact { flex: 1; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 1.5rem; } .lines-header-compact { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; flex-shrink: 0; } .lines-header-compact h3 { margin: 0; font-size: 0.875rem; color: var(--text-primary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; } .btn-add-compact { background: #f8fafc; color: var(--text-primary); border: 1px solid var(--border-color); padding: 0.4rem 0.875rem; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; font-size: 0.8125rem; transition: all 0.15s; } .btn-add-compact:hover { background: #f1f5f9; border-color: #cbd5e1; } .lines-table-compact { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.375rem; } /* Column headers */ .lines-columns-header { display: grid; grid-template-columns: 4fr 0.8fr 1.2fr 0.8fr 1.2fr 40px; gap: 0.75rem; padding: 0.5rem 0.75rem; font-size: 0.7rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 1px solid var(--border-color); margin-bottom: 0.25rem; } .line-row-compact { display: grid; grid-template-columns: 4fr 0.8fr 1.2fr 0.8fr 1.2fr 40px; gap: 0.75rem; align-items: center; background: #f8fafc; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 0.625rem 0.75rem; transition: border-color 0.15s ease; } .line-row-compact:hover { border-color: #cbd5e1; } .line-label-mobile { display: none; } .line-field { display: flex; flex-direction: column; } .line-desc-compact, .line-qty-compact, .line-price-compact, .line-tax-compact { padding: 0.4rem 0.5rem; border: 1px solid var(--border-color); border-radius: 4px; font-size: 0.8125rem; background: white; color: var(--text-primary); transition: border-color 0.15s ease; } .line-desc-compact { width: 100%; } .line-desc-compact:focus, .line-qty-compact:focus, .line-price-compact:focus, .line-tax-compact:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08); } .line-total-compact { font-weight: 600; color: var(--primary); font-size: 0.875rem; text-align: right; padding: 0.4rem 0.25rem; } .btn-delete-compact { background: transparent; color: var(--text-tertiary); border: 1px solid transparent; width: 32px; height: 32px; border-radius: var(--radius-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; flex-shrink: 0; } .btn-delete-compact:hover { color: #ef4444; background: #fee2e2; } /* Grand total */ .invoice-grand-total { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.75rem; padding: 0.875rem 1rem; background: #f8fafc; border: 1px solid var(--border-color); border-radius: var(--radius-sm); max-width: 280px; margin-left: auto; } .grand-total-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.8125rem; color: var(--text-secondary); } .grand-total-row strong { color: var(--text-primary); font-weight: 600; } .grand-total-final { padding-top: 0.4rem; border-top: 1px solid var(--border-color); font-size: 0.9375rem; } .grand-total-final strong { color: var(--primary); font-size: 1rem; font-weight: 700; } /* Form actions */ .form-actions-compact { display: flex; justify-content: flex-end; gap: 0.625rem; margin-top: 0; padding-top: 1.25rem; border-top: 1px solid var(--border-color); flex-shrink: 0; } .btn-cancel-compact { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-color); padding: 0.5rem 1rem; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; font-size: 0.8125rem; transition: all 0.15s; } .btn-cancel-compact:hover { background: #f8fafc; color: var(--text-primary); } .btn-submit-compact { background: var(--primary); color: white; border: none; padding: 0.5rem 1.25rem; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; font-size: 0.8125rem; transition: background 0.15s; } .btn-submit-compact:hover { background: var(--primary-hover); } .btn-submit-compact:disabled { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; } /* Responsive */ @media (max-width: 768px) { .create-invoice-page { padding: 0.5rem; height: calc(100vh - 1rem); } .form-grid-compact { grid-template-columns: 1fr; gap: 0.5rem; } .form-field-compact.full-width { grid-column: 1; } .lines-columns-header { display: none; } .line-row-compact { grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 0.625rem; } .line-label-mobile { display: block; font-size: 0.65rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.15rem; } .line-field-desc { grid-column: 1 / -1; } .line-field-actions { grid-column: 2; justify-self: end; } .invoice-grand-total { max-width: 100%; } }