Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
126 changes: 126 additions & 0 deletions av_tools/av_tools/page/salary_calculator/salary_calculator.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
/* ── Page Layout ───────────────────────────────────────────────────── */

.salary-calculator-page { padding: 0 !important; background: var(--bg-color); }

.sc-container {
display: grid;
grid-template-columns: 440px 1fr;
gap: 20px;
padding: 20px;
max-width: 1400px;
margin: 0 auto;
min-height: calc(100vh - 120px);
}
@media (max-width: 1024px) { .sc-container { grid-template-columns: 1fr; } }

/* ── Cards ─────────────────────────────────────────────────────────── */

.sc-card {
background: var(--card-bg);
border: 1px solid var(--border-color);
border-radius: var(--border-radius-lg);
margin-bottom: 16px;
overflow: hidden;
}
.sc-card-header {
display: flex; align-items: center; justify-content: space-between;
padding: 14px 18px;
border-bottom: 1px solid var(--border-color);
background: var(--subtle-fg);
}
.sc-card-title { font-size: var(--text-base); font-weight: 600; margin: 0; color: var(--heading-color); }
.sc-card-body { padding: 18px; }
.sc-preview-card { position: sticky; top: 80px; }

/* ── Fields ────────────────────────────────────────────────────────── */

.sc-field-wrap { margin-bottom: 12px; }
.sc-field-wrap:last-child { margin-bottom: 0; }
.sc-field-wrap .frappe-control { margin-bottom: 0; }
.sc-amount-row { display: flex; gap: 12px; }
.sc-field-half { flex: 1; }
.sc-field-disabled .control-input-wrapper input {
background: var(--subtle-fg) !important; color: var(--text-muted) !important; cursor: not-allowed;
}

/* ── Component List ────────────────────────────────────────────────── */

.sc-header-right { display: flex; align-items: center; gap: 8px; }
.sc-badge {
display: inline-flex; align-items: center; padding: 2px 10px;
border-radius: 20px; font-size: var(--text-xs); font-weight: 500;
background: var(--bg-blue); color: var(--text-color);
}
.sc-section { margin-bottom: 14px; }
.sc-section:last-child { margin-bottom: 0; }
.sc-section-label {
display: flex; align-items: center; gap: 6px;
font-size: var(--text-xs); font-weight: 600; color: var(--text-muted);
text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px;
}
.sc-dot { width: 8px; height: 8px; border-radius: 50%; }
.sc-dot-green { background: var(--green-500, #22c55e); }
.sc-dot-red { background: var(--red-500, #ef4444); }

.sc-list { display: flex; flex-direction: column; gap: 4px; }

.sc-comp-row {
display: flex; align-items: center; justify-content: space-between;
padding: 7px 10px; border: 1px solid var(--border-color);
border-radius: var(--border-radius-md); background: var(--card-bg);
transition: background .12s; gap: 8px;
}
.sc-comp-row:hover { background: var(--subtle-fg); }
.sc-comp-info { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.sc-comp-name { font-size: var(--text-sm); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-comp-hint { font-size: var(--text-xs); color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.sc-tag {
font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px;
background: var(--bg-purple); color: var(--purple-600, #9333ea);
text-transform: uppercase; letter-spacing: .3px; flex-shrink: 0;
}
.sc-remove-btn {
flex-shrink: 0; width: 24px; height: 24px; padding: 0; line-height: 24px; text-align: center;
border-radius: var(--border-radius-sm); color: var(--text-muted);
border: none; background: transparent; font-size: 16px; transition: all .12s;
}
.sc-remove-btn:hover { background: var(--bg-red); color: var(--red-600, #dc2626); }
.sc-empty-msg { font-size: var(--text-xs); padding: 6px 10px; font-style: italic; }

/* ── Editable Earning Amount ───────────────────────────────────────── */

.sc-comp-amount {
flex-shrink: 0; width: 110px;
}
.sc-comp-amount .frappe-control { margin-bottom: 0; }
.sc-comp-amount .control-input-wrapper input {
font-size: var(--text-xs); height: 28px; padding: 2px 8px; text-align: right;
}

/* ── Preview ───────────────────────────────────────────────────────── */

.sc-placeholder { display: flex; flex-direction: column; align-items: center; padding: 60px 20px; text-align: center; }
.sc-placeholder p { color: var(--text-muted); font-size: var(--text-sm); max-width: 220px; margin-top: 12px; line-height: 1.5; }

/* Salary Slip Preview */
.salary-slip-preview-content { font-size: var(--text-sm); }
.slip-header { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid var(--border-color); }
.slip-title { font-size: var(--text-lg); font-weight: 700; margin-bottom: 10px; }
.slip-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.meta-row { display: flex; gap: 6px; }
.meta-label { font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.slip-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 768px) { .slip-columns { grid-template-columns: 1fr; } }
.column-title { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 2px solid var(--border-color); }
.earnings-title { color: var(--green-600, #16a34a); border-color: var(--green-200, #bbf7d0); }
.deductions-title { color: var(--red-600, #dc2626); border-color: var(--red-200, #fecaca); }
.slip-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.slip-table th { font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); padding: 5px 0; border-bottom: 1px solid var(--border-color); }
.slip-table td { padding: 5px 0; border-bottom: 1px solid var(--subtle-fg); }
.slip-table .total-row td { border-top: 2px solid var(--border-color); border-bottom: none; padding-top: 6px; }
.slip-footer { background: var(--subtle-fg); border-radius: var(--border-radius-md); padding: 14px; }
.net-pay-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.net-pay-label { font-size: var(--text-lg); font-weight: 700; }
.net-pay-value { font-size: var(--text-xl); font-weight: 700; color: var(--blue-600, #2563eb); }
.gross-pay-row { font-size: var(--text-xs); color: var(--text-muted); display: flex; justify-content: center; gap: 8px; }
.gross-pay-row .separator { color: var(--gray-400); }
Loading
Loading