/* Homa Item Register — styles
   Palette drawn from turmeric, kumkum and sandal — the materials this
   form is actually tracking — rather than a generic app blue. */

.hir-app {
	--hir-bg: #fbf3e7;
	--hir-surface: #fffdf9;
	--hir-ink: #3c2a21;
	--hir-ink-soft: #6b5a4e;
	--hir-kumkum: #a6243b;
	--hir-kumkum-dark: #841d30;
	--hir-turmeric: #d9a02a;
	--hir-turmeric-soft: #f1ddb1;
	--hir-line: rgba(60, 42, 33, 0.12);
	--hir-shadow: rgba(60, 42, 33, 0.18);

	font-family: 'Catamaran', -apple-system, 'Noto Sans Tamil', sans-serif;
	color: var(--hir-ink);
	background: var(--hir-bg);
	padding: 18px 0 40px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.hir-app * {
	box-sizing: border-box;
}

.hir-shell {
	width: 100%;
	max-width: 460px;
	background: var(--hir-surface);
	border-radius: 26px;
	border: 1px solid var(--hir-line);
	box-shadow: 0 24px 60px var(--hir-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	max-height: 88vh;
	position: relative;
}

@media (max-width: 480px) {
	.hir-app {
		padding: 0;
	}
	.hir-shell {
		max-width: 100%;
		border-radius: 0;
		box-shadow: none;
		border: none;
		max-height: none;
		min-height: 100vh;
	}
}

/* Top bar */

.hir-topbar {
	padding: 18px 20px 10px;
	text-align: center;
}

.hir-topbar h1 {
	font-family: 'Hind Madurai', 'Catamaran', sans-serif;
	font-weight: 700;
	font-size: 19px;
	margin: 0;
	color: var(--hir-kumkum-dark);
	letter-spacing: 0.2px;
}

.hir-kolam {
	padding: 0 18px;
	line-height: 0;
}

.hir-kolam svg {
	width: 100%;
	height: 14px;
	display: block;
}

/* Scroll area */

.hir-scroll {
	flex: 1;
	overflow-y: auto;
	padding: 14px 16px 10px;
	-webkit-overflow-scrolling: touch;
}

/* Client / date fields */

.hir-field-card {
	background: var(--hir-turmeric-soft);
	border-radius: 16px;
	padding: 10px 14px;
	margin-bottom: 10px;
}

.hir-field-card label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--hir-ink-soft);
	margin-bottom: 4px;
}

.hir-field-card input {
	width: 100%;
	border: none;
	background: transparent;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	color: var(--hir-ink);
	padding: 4px 0;
}

.hir-field-card input:focus {
	outline: none;
}

/* Category accordion */

.hir-category {
	background: var(--hir-surface);
	border: 1px solid var(--hir-line);
	border-radius: 16px;
	margin-bottom: 10px;
	overflow: hidden;
}

.hir-category-head {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	background: none;
	border: none;
	padding: 14px 14px;
	font-family: inherit;
	cursor: pointer;
	text-align: left;
}

.hir-category-name {
	flex: 1;
	font-weight: 700;
	font-size: 15px;
	color: var(--hir-kumkum-dark);
}

.hir-category-count {
	font-size: 12px;
	font-weight: 700;
	color: var(--hir-turmeric);
	background: var(--hir-turmeric-soft);
	border-radius: 999px;
	padding: 2px 9px;
}

.hir-chevron {
	font-size: 16px;
	color: var(--hir-ink-soft);
	transition: transform 0.18s ease;
}

.hir-category[data-open="true"] .hir-chevron {
	transform: rotate(180deg);
}

.hir-category-body {
	display: none;
	border-top: 1px solid var(--hir-line);
	padding: 4px 14px 6px;
}

.hir-category[data-open="true"] .hir-category-body {
	display: block;
}

.hir-item-row {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px 0;
	border-bottom: 1px solid var(--hir-line);
}

.hir-item-row:last-child {
	border-bottom: none;
}

.hir-item-label {
	font-size: 14.5px;
	font-weight: 500;
}

.hir-item-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.hir-stepper {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}

.hir-step {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: none;
	background: var(--hir-turmeric-soft);
	color: var(--hir-kumkum-dark);
	font-size: 17px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hir-step:active {
	background: var(--hir-turmeric);
	color: #fff;
}

.hir-qty {
	width: 42px;
	text-align: center;
	border: 1px solid var(--hir-line);
	border-radius: 8px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	color: var(--hir-ink);
	padding: 5px 0;
	background: var(--hir-surface);
	-moz-appearance: textfield;
}

.hir-qty::-webkit-outer-spin-button,
.hir-qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.hir-qty:focus {
	outline: 2px solid var(--hir-turmeric);
}

.hir-price-field {
	display: flex;
	align-items: center;
	gap: 4px;
	background: var(--hir-bg);
	border: 1px solid var(--hir-line);
	border-radius: 10px;
	padding: 5px 8px;
	flex-shrink: 0;
}

.hir-rupee {
	font-size: 13px;
	font-weight: 700;
	color: var(--hir-kumkum);
}

.hir-price {
	width: 60px;
	border: none;
	background: transparent;
	text-align: right;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	color: var(--hir-ink);
	-moz-appearance: textfield;
}

.hir-price::-webkit-outer-spin-button,
.hir-price::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.hir-price:focus {
	outline: none;
}

/* Running total */

.hir-total-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 18px;
	background: var(--hir-turmeric-soft);
	border-top: 1px solid var(--hir-line);
}

.hir-total-label {
	font-size: 13px;
	font-weight: 700;
	color: var(--hir-ink-soft);
}

.hir-total-value {
	font-size: 18px;
	font-weight: 700;
	color: var(--hir-kumkum-dark);
}

/* History */

.hir-history {
	background: var(--hir-surface);
	border: 1px solid var(--hir-line);
	border-radius: 16px;
	margin-bottom: 6px;
	overflow: hidden;
}

.hir-history-toggle {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: none;
	border: none;
	padding: 13px 14px;
	font-family: inherit;
	font-weight: 700;
	font-size: 14.5px;
	color: var(--hir-kumkum-dark);
	cursor: pointer;
}

.hir-history-body {
	border-top: 1px solid var(--hir-line);
	padding: 6px 14px 10px;
}

.hir-history-empty,
.hir-history-loading {
	font-size: 13.5px;
	color: var(--hir-ink-soft);
	padding: 8px 0;
}

.hir-history-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--hir-line);
}

.hir-history-row:last-child {
	border-bottom: none;
}

.hir-history-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.hir-history-client {
	font-weight: 700;
	font-size: 14px;
}

.hir-history-date {
	font-size: 12px;
	color: var(--hir-ink-soft);
}

.hir-history-pdf {
	border: none;
	background: var(--hir-kumkum);
	color: #fff;
	font-family: inherit;
	font-weight: 700;
	font-size: 12.5px;
	padding: 8px 14px;
	border-radius: 999px;
	cursor: pointer;
	flex-shrink: 0;
}

/* Sticky action bar */

.hir-actionbar {
	display: flex;
	gap: 10px;
	padding: 12px 16px;
	border-top: 1px solid var(--hir-line);
	background: var(--hir-surface);
}

.hir-btn {
	flex: 1;
	border: none;
	border-radius: 14px;
	padding: 13px 10px;
	font-family: inherit;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	transition: opacity 0.15s ease, transform 0.05s ease;
}

.hir-btn:active {
	transform: scale(0.98);
}

.hir-btn-primary {
	background: var(--hir-kumkum);
	color: #fff;
}

.hir-btn-accent {
	background: var(--hir-turmeric);
	color: #3c2a21;
}

.hir-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Toast */

.hir-toast {
	position: absolute;
	left: 50%;
	bottom: 86px;
	transform: translateX(-50%);
	background: var(--hir-ink);
	color: #fff;
	font-size: 13.5px;
	font-weight: 600;
	padding: 10px 18px;
	border-radius: 999px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
	z-index: 30;
	white-space: nowrap;
	max-width: 90%;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hir-toast.hir-toast-error {
	background: var(--hir-kumkum-dark);
}

/* Login gate */

.hir-login-gate {
	max-width: 400px;
	margin: 30px auto;
	background: var(--hir-surface);
	border: 1px solid var(--hir-line);
	border-radius: 18px;
	padding: 28px 22px;
	text-align: center;
	font-family: 'Catamaran', sans-serif;
	color: var(--hir-ink);
}

.hir-login-gate p {
	margin: 0 0 16px;
	font-size: 15px;
}

.hir-login-gate .hir-btn {
	display: inline-block;
	text-decoration: none;
	padding: 12px 26px;
}

/* Off-screen receipt used for PDF capture (must stay rendered, not display:none) */

.hir-receipt {
	position: fixed;
	top: 0;
	left: -99999px;
	width: 640px;
	background: #ffffff;
	color: #2a1d16;
	font-family: 'Catamaran', sans-serif;
	padding: 32px;
}

.hir-receipt-header {
	text-align: center;
	border-bottom: 3px solid #a6243b;
	padding-bottom: 14px;
	margin-bottom: 16px;
}

.hir-receipt-header h2 {
	font-family: 'Hind Madurai', sans-serif;
	margin: 0 0 6px;
	color: #a6243b;
	font-size: 22px;
}

.hir-receipt-meta {
	margin: 0;
	font-size: 14px;
	color: #6b5a4e;
}

.hir-receipt-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.hir-receipt-table th {
	text-align: left;
	background: #f1ddb1;
	padding: 8px 10px;
	border-bottom: 2px solid #d9a02a;
}

.hir-receipt-table td {
	padding: 7px 10px;
	border-bottom: 1px solid #e6dccf;
}

.hir-receipt-table td:last-child,
.hir-receipt-table th:last-child {
	text-align: right;
	width: 90px;
}

.hir-receipt-total-row td {
	font-weight: 700;
	border-top: 2px solid #a6243b;
	border-bottom: none;
	background: #f1ddb1;
}
/* Hide total from entry screen */
.hir-total-bar{
    display:none !important;
}

/* Hide total from PDF */
.hir-receipt-total-row{
    display:none !important;
}

.hir-history{
	display:none;
}