*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
background: #f3f4f6;
color: #111827;
}
body {
display: flex;
justify-content: center;
padding: 2rem 1rem;
}
.page {
width: 100%;
max-width: 960px;
background: #ffffff;
padding: 2rem;
box-shadow: 0 10px 25px rgba(15,23,42,0.1);
border-radius: 0.75rem;
}
.page-header {
text-align: center;
margin-bottom: 1.5rem;
}
.page-header h1 {
font-size: 1.75rem;
margin: 0;
}
.card {
border: 1px solid #e5e7eb;
border-radius: 0.5rem;
margin-bottom: 1.5rem;
overflow: hidden;
}
.card-header {
display: flex;
flex-wrap: wrap;
gap: 1rem;
background: #f9fafb;
padding: 1rem 1.25rem;
border-bottom: 1px solid #e5e7eb;
}
.card-body {
padding: 1.25rem;
}
.card-body h2 {
margin: 0 0 0.75rem;
font-size: 1.1rem;
}
.hint {
margin: 0.35rem 0 0;
font-size: 0.8rem;
color: #6b7280;
}
.card-body > .hint {
margin-bottom: 1.5rem;
}
.grid {
display: grid;
grid-template-columns: repeat(5, minmax(0, 1fr));
gap: 0.75rem 1.25rem;
align-items: end;
}
.grid-current {
grid-template-columns: 1fr 1fr;
align-items: start;
}
.grid-cola {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.field-block {
display: flex;
flex-direction: column;
gap: 0.25rem;
}
.field-block label {
font-size: 0.9rem;
font-weight: 500;
color: #374151;
}
input[type="text"],
input[type="number"],
input[type="date"] {
width: 100%;
padding: 0.45rem 0.5rem;
font-size: 0.95rem;
border: 1px solid #d1d5db;
border-radius: 0.375rem;
outline: none;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus {
border-color: #2563eb;
box-shadow: 0 0 0 1px rgba(37,99,235,0.3);
}
.currency-input,
.percent-input {
position: relative;
display: flex;
align-items: center;
}
.currency-prefix {
position: absolute;
left: 0.5rem;
color: #6b7280;
pointer-events: none;
}
.currency-input input {
padding-left: 1.25rem;
}
.percent-suffix {
position: absolute;
right: 0.5rem;
color: #6b7280;
pointer-events: none;
}
.percent-input input {
padding-right: 1.5rem;
}
.total-row {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 1rem;
font-weight: 600;
font-size: 1.1rem;
margin-top: 0.5rem;
}
.total-row input {
font-weight: 700;
color: #166534;
background: #f0fdf4;
border-color: #bbf7d0;
width: 150px;
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.5rem 1rem;
font-size: 0.95rem;
font-weight: 500;
border-radius: 0.375rem;
cursor: pointer;
border: none;
transition: background-color 0.15s;
}
.btn.primary {
background-color: #2563eb;
color: #ffffff;
}
.btn.primary:hover {
background-color: #1d4ed8;
}
.btn.outline {
background-color: transparent;
border: 1px solid #d1d5db;
color: #374151;
}
.btn.outline:hover {
background-color: #f3f4f6;
}
.actions {
display: flex;
gap: 1rem;
margin-top: 2rem;
justify-content: flex-end;
}
/* Header specific field sizing */
.header-name {
flex: 2;
min-width: 300px;
}
.header-apt {
flex: 1;
min-width: 150px;
}
.header-date {
flex: 1;
min-width: 180px;
}

@media print {
  .no-print, .no-pdf {
    display: none !important;
  }
  body {
    background: white !important;
    padding: 0 !important;
  }
  .page {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .card {
    break-inside: avoid;
    border: 1px solid #ccc !important;
    margin-bottom: 0.5rem !important;
  }
  .card-body {
    padding: 0.75rem !important;
  }
  .card-header {
    padding: 0.75rem !important;
  }
  .grid {
    gap: 0.5rem 1rem !important;
  }
  .breakdown-info {
    margin-bottom: 0.75rem !important;
    padding: 0.5rem !important;
  }
}
@media (max-width: 640px) {
.page {
padding: 1rem;
}
.grid, .grid-cola, .grid-current {
grid-template-columns: 1fr;
}
.card-header {
flex-direction: column;
align-items: stretch;
gap: 0.75rem;
}
/* Reset min-widths for mobile so they don't overflow */
.header-name,
.header-apt,
.header-date {
min-width: 0;
flex: auto;
}
.total-row {
flex-direction: column;
align-items: stretch;
}
.total-row input {
width: 100%;
}
.actions {
justify-content: center;
}
.btn {
width: 100%;
flex: 1;
}
}
.breakdown-info {
margin-bottom: 1.5rem;
padding: 1rem;
background-color: #f1f5f9;
border: 1px solid #e2e8f0;
border-radius: 0.5rem;
font-size: 0.95rem;
color: #334155;
}
.breakdown-info:empty {
display: none;
}
.breakdown-item {
display: flex;
justify-content: space-between;
margin-bottom: 0.5rem;
}
.breakdown-item:last-child {
margin-bottom: 0;
font-weight: 600;
border-top: 1px solid #cbd5e1;
padding-top: 0.5rem;
margin-top: 0.5rem;
color: #0f172a;
}
