invoice-generator / style.css
anuragshas's picture
fix: indentation
ff5b78c
raw
history blame
5.87 kB
@import "tailwindcss";
/* Enhanced Items Table Styling */
#items-table {
border-collapse: collapse;
margin-bottom: 1rem;
}
#items-table th {
background-color: #f8fafc;
font-weight: 600;
font-size: 0.875rem;
color: #374151;
border: 1px solid #d1d5db;
padding: 0.75rem 0.5rem;
text-align: left;
}
#items-table td {
border: 1px solid #d1d5db;
padding: 0.25rem;
vertical-align: middle;
}
#items-table input {
width: 100%;
padding: 0.5rem;
border: 1px solid #d1d5db;
border-radius: 0.375rem;
font-size: 0.875rem;
transition:
border-color 0.2s,
box-shadow 0.2s;
}
#items-table input:focus {
outline: none;
border-color: #3b82f6;
box-shadow: 0 0 0 3px rgb(59 130 246 / 10%);
}
#items-table input:invalid {
border-color: #ef4444;
}
#items-table .item-slno {
text-align: center;
font-weight: 600;
color: #6b7280;
background-color: #f9fafb;
width: 3rem;
}
#items-table .item-amount {
text-align: right;
font-weight: 600;
color: #059669;
background-color: #f0fdf4;
font-family: "Courier New", monospace;
padding: 0.5rem;
border: 2px solid #d1fae5;
}
#items-table .remove-item {
background-color: #ef4444;
color: white;
border: none;
padding: 0.375rem 0.75rem;
border-radius: 0.375rem;
font-size: 0.75rem;
cursor: pointer;
transition: background-color 0.2s;
display: flex;
align-items: center;
gap: 0.25rem;
}
#items-table .remove-item:hover {
background-color: #dc2626;
}
#items-table .remove-item:focus {
outline: none;
box-shadow: 0 0 0 2px rgb(239 68 68 / 50%);
}
/* Column widths for better UX */
#items-table th:nth-child(1) {
width: 4rem;
}
/* S.No */
#items-table th:nth-child(2) {
width: 30%;
}
/* Description */
#items-table th:nth-child(3) {
width: 8rem;
}
/* HSN Code */
#items-table th:nth-child(4) {
width: 5rem;
}
/* Qty */
#items-table th:nth-child(5) {
width: 8rem;
}
/* Unit Price */
#items-table th:nth-child(6) {
width: 7rem;
}
/* Discount */
#items-table th:nth-child(7) {
width: 8rem;
}
/* Amount */
#items-table th:nth-child(8) {
width: 6rem;
}
/* Action */
/* Add Item Button Enhancement */
#add-item {
display: flex;
align-items: center;
gap: 0.5rem;
margin-top: 0.5rem;
}
#add-item::before {
content: "+";
font-size: 1.25rem;
font-weight: bold;
}
/* Empty state styling */
.items-empty-state {
text-align: center;
color: #6b7280;
font-style: italic;
padding: 2rem;
background-color: #f9fafb;
border: 2px dashed #d1d5db;
margin-bottom: 1rem;
}
/* Row highlighting on hover */
#items-table tbody tr:hover {
background-color: #f8fafc;
}
/* Input error states */
.input-error {
border-color: #ef4444 !important;
background-color: #fef2f2;
}
.input-success {
border-color: #10b981 !important;
}
/* Tooltips */
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 200px;
background-color: #374151;
color: white;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -100px;
opacity: 0;
transition: opacity 0.3s;
font-size: 0.75rem;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
.quotation-print {
max-width: 800px;
margin: auto;
border: 1px solid #000;
padding: 20px;
}
.quotation-print h2 {
text-align: center;
margin-bottom: 20px;
}
.quotation-print .section {
margin-bottom: 15px;
}
.totals table {
float: right;
border: none;
width: 100%;
border-collapse: collapse;
}
.totals td {
border: 1px solid #000;
padding: 8px;
}
.disclaimer {
color: #555;
margin-top: 20px;
font-size: 10px;
text-align: justify;
border-top: 1px solid #000;
padding-top: 10px;
}
.quote-meta {
text-align: right;
}
.header {
display: flex;
justify-content: space-between;
margin-bottom: 20px;
}
.company-details h1 {
margin: 0;
font-size: 24px;
color: #036;
font-family: Arial, Helvetica, sans-serif;
}
.quotation-title h1 {
margin: 0;
font-size: 24px;
color: #036;
text-align: right;
}
.quote-meta table {
border-collapse: collapse;
width: 100%;
}
.quote-meta td {
border: 1px solid #000;
padding: 5px;
}
.customer-info {
border: 1px solid #000;
padding: 10px;
margin-bottom: 20px;
}
.items-table-print {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}
.items-table-print th,
.items-table-print td {
border: 1px solid #000;
padding: 8px;
text-align: left;
}
.items-table-print thead th {
background-color: #e0f2f7;
}
.footer {
margin-top: 20px;
}
.notes-and-total {
display: flex;
justify-content: space-between;
}
.notes {
width: 60%;
font-size: 12px;
}
.totals {
width: 35%;
}
.totals td:first-child {
text-align: right;
}
.thank-you {
text-align: center;
margin-top: 20px;
font-weight: bold;
}
@media print {
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
@page {
size: a4;
margin: 10mm;
}
body {
font-size: 12pt;
}
.quotation-print {
max-width: 100%;
padding: 20px;
margin: auto;
border: 1px solid #000;
}
.items-table-print,
.items-table-print tr,
.items-table-print td {
page-break-inside: avoid !important;
}
.header,
.customer-info,
.footer,
.notes-and-total,
.disclaimer,
.thank-you {
page-break-inside: avoid !important;
}
button {
display: none;
}
}