/* Chit Updates — theme: saffron / gold / cream. No dark backgrounds anywhere. */

#chitu-app, #chitu-app * {
	box-sizing: border-box;
}

#chitu-app {
	max-width: 720px;
	margin: 24px auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	background: #FFFDF7;
	color: #3a2c1a;
}

.chitu-loading {
	text-align: center;
	padding: 40px 0;
	color: #A6531A;
	font-weight: 700;
}

/* ---------- Top action buttons (Rule 4) ---------- */
.chitu-topbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
	margin-bottom: 18px;
}

.chitu-btn {
	display: inline-block;
	padding: 12px 22px;
	border-radius: 10px;
	border: 2px solid #C97A1E;
	background: linear-gradient(180deg, #FFD98A 0%, #C97A1E 100%);
	color: #3a2c1a;
	font-weight: 700;
	font-size: 15px;
	cursor: pointer;
	text-align: center;
	transition: transform .08s ease, box-shadow .08s ease;
	box-shadow: 0 2px 4px rgba(166, 83, 26, 0.25);
}
.chitu-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 8px rgba(166, 83, 26, 0.3); }
.chitu-btn:active { transform: translateY(0); }

.chitu-btn.chitu-btn-secondary {
	background: #FFF6E8;
	border: 2px solid #C97A1E;
	color: #A6531A;
}

.chitu-btn.chitu-btn-danger {
	background: #FFE3D6;
	border: 2px solid #C0392B;
	color: #7a1f14;
}

.chitu-btn.chitu-btn-small {
	padding: 7px 14px;
	font-size: 13px;
	border-radius: 7px;
}

.chitu-btn:disabled {
	opacity: .5;
	cursor: not-allowed;
	transform: none;
}

/* ---------- Language toggle (Rule 10 / 18) ---------- */
.chitu-lang-toggle {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-bottom: 14px;
}
.chitu-lang-pill {
	padding: 5px 16px;
	border-radius: 999px;
	border: 1.5px solid #C97A1E;
	background: #FFF6E8;
	color: #A6531A;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
}
.chitu-lang-pill.active {
	background: #C97A1E;
	color: #FFFDF7;
}

/* ---------- Card / panel ---------- */
.chitu-card {
	background: #FFF6E8;
	border: 1.5px solid #F0D6A8;
	border-radius: 14px;
	padding: 22px;
	margin-bottom: 16px;
	box-shadow: 0 2px 10px rgba(166, 83, 26, 0.08);
}

.chitu-card h2, .chitu-card h3 {
	color: #A6531A;
	margin-top: 0;
}

.chitu-hint {
	font-size: 12.5px;
	color: #8a6b3f;
	font-weight: 600;
	margin: 2px 0 10px;
}

/* ---------- Form fields (Rule 9: dark bold text; focus highlight) ---------- */
.chitu-field {
	margin-bottom: 14px;
}
.chitu-field label {
	display: block;
	font-weight: 700;
	color: #3a2c1a;
	margin-bottom: 5px;
	font-size: 14px;
}
.chitu-field input[type="text"],
.chitu-field input[type="tel"],
.chitu-field input[type="number"],
.chitu-field select {
	width: 100%;
	padding: 11px 12px;
	border: 2px solid #E4C58A;
	border-radius: 8px;
	background: #FFFDF7;
	color: #3a2c1a;
	font-weight: 700;
	font-size: 15px;
	outline: none;
}
.chitu-field input:focus,
.chitu-field select:focus {
	background: #FFF9C4;
	border-color: #C97A1E;
	color: #2a1f10;
}
.chitu-field input::placeholder {
	color: #b79a6b;
	font-weight: 600;
}

.chitu-inline-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
@media (max-width: 520px) {
	.chitu-inline-2 { grid-template-columns: 1fr; }
}

.chitu-age-badge, .chitu-calc-badge {
	display: inline-block;
	margin-top: 4px;
	font-size: 12.5px;
	font-weight: 700;
	color: #A6531A;
	background: #FFEFD1;
	padding: 3px 9px;
	border-radius: 999px;
}

/* ---------- Aadhaar 4-4-4 boxes (Rule 6 / 15) ---------- */
.chitu-aadhaar-row {
	display: flex;
	gap: 8px;
}
.chitu-aadhaar-row input {
	width: 33%;
	text-align: center;
	letter-spacing: 3px;
	font-size: 17px;
}
.chitu-aadhaar-confirm {
	text-align: center;
	font-size: 22px;
	font-weight: 800;
	letter-spacing: 3px;
	color: #A6531A;
	background: #FFF9C4;
	border: 2px dashed #C97A1E;
	border-radius: 10px;
	padding: 10px;
	margin-top: 8px;
}

/* ---------- Buttons row ---------- */
.chitu-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 18px;
}

.chitu-msg {
	padding: 10px 14px;
	border-radius: 8px;
	font-weight: 700;
	margin-bottom: 14px;
}
.chitu-msg.success { background: #E7F6E0; color: #2c6b1f; border: 1.5px solid #8fce7a; }
.chitu-msg.error   { background: #FDE7E3; color: #a3301c; border: 1.5px solid #ef9a86; }

/* ---------- Records list (customer's own chits) ---------- */
.chitu-record-item {
	background: #FFFDF7;
	border: 1.5px solid #F0D6A8;
	border-radius: 10px;
	padding: 14px;
	margin-bottom: 10px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.chitu-record-item .chitu-record-main { font-weight: 700; color: #3a2c1a; }
.chitu-record-item .chitu-record-sub { font-size: 12.5px; color: #8a6b3f; font-weight: 600; }

.chitu-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .3px;
}
.chitu-badge.pending  { background: #FFF3CD; color: #8a6d1a; }
.chitu-badge.approved { background: #D9F2D0; color: #2c6b1f; }
.chitu-badge.rejected { background: #FBD8D0; color: #a3301c; }

/* ---------- Admin panel ---------- */
.chitu-admin-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 14px;
}

.chitu-stats {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 10px;
	margin-bottom: 16px;
}
@media (max-width: 640px) {
	.chitu-stats { grid-template-columns: repeat(2, 1fr); }
}
.chitu-stat-box {
	background: #FFF6E8;
	border: 1.5px solid #F0D6A8;
	border-radius: 10px;
	padding: 12px 8px;
	text-align: center;
}
.chitu-stat-box .chitu-stat-num { font-size: 22px; font-weight: 800; color: #A6531A; }
.chitu-stat-box .chitu-stat-label { font-size: 11.5px; font-weight: 700; color: #8a6b3f; text-transform: uppercase; }

.chitu-filter-bar {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 12px;
	align-items: center;
}
.chitu-filter-bar select,
.chitu-filter-bar input[type="text"] {
	padding: 8px 10px;
	border: 2px solid #E4C58A;
	border-radius: 8px;
	background: #FFFDF7;
	color: #3a2c1a;
	font-weight: 700;
	font-size: 13.5px;
}

.chitu-table-wrap {
	overflow-x: auto;
	background: #FFFDF7;
	border: 1.5px solid #F0D6A8;
	border-radius: 10px;
}
table.chitu-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	min-width: 980px;
}
table.chitu-table th {
	background: #FFE9C2;
	color: #6b4415;
	text-align: left;
	padding: 9px 8px;
	font-weight: 800;
	white-space: nowrap;
	border-bottom: 2px solid #E4C58A;
}
table.chitu-table td {
	padding: 8px;
	border-bottom: 1px solid #F0E0BE;
	color: #3a2c1a;
	font-weight: 600;
	vertical-align: middle;
}
table.chitu-table tr:hover td { background: #FFFBEE; }

.chitu-row-actions {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

/* ---------- Popup / modal — position:fixed, appended to body ---------- */
.chitu-overlay {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(58, 44, 26, 0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	padding: 16px;
}
.chitu-modal {
	background: #FFFDF7;
	border-radius: 16px;
	max-width: 560px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 24px;
	box-shadow: 0 12px 40px rgba(58, 44, 26, 0.35);
	border: 2px solid #E4C58A;
}
.chitu-modal h2, .chitu-modal h3 { color: #A6531A; margin-top: 0; }
.chitu-modal-close {
	float: right;
	background: none;
	border: none;
	font-size: 20px;
	font-weight: 800;
	color: #A6531A;
	cursor: pointer;
	line-height: 1;
}

/* ---------- Demo walkthrough ---------- */
.chitu-demo-caption {
	background: #FFF9C4;
	border: 2px dashed #C97A1E;
	border-radius: 10px;
	padding: 12px 14px;
	font-weight: 700;
	color: #3a2c1a;
	margin-bottom: 14px;
}
.chitu-demo-progress {
	display: flex;
	gap: 4px;
	margin-bottom: 14px;
}
.chitu-demo-progress span {
	flex: 1;
	height: 5px;
	border-radius: 3px;
	background: #F0D6A8;
}
.chitu-demo-progress span.done { background: #C97A1E; }

.chitu-demo-field-highlight {
	outline: 3px solid #C97A1E !important;
	box-shadow: 0 0 0 4px rgba(201, 122, 30, 0.25) !important;
}

.chitu-checkbox-cell { text-align: center; width: 32px; }

.chitu-select-all-row { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #3a2c1a; }
