/* County Challan System - frontend styles
   Designed to visually match the school's original bank-issued challan PDF. */

.ccs-wrapper {
	max-width: 1150px;
	margin: 0 auto;
	font-family: "Times New Roman", Times, Georgia, serif;
	color: #000;
}

.ccs-lookup-form {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	background: #f5f6f8;
	border: 1px solid #ddd;
	padding: 16px;
	border-radius: 6px;
	margin-bottom: 24px;
	flex-wrap: wrap;
	font-family: Arial, Helvetica, sans-serif;
}
.ccs-lookup-form label {
	font-weight: 600;
	display: block;
	margin-bottom: 4px;
}
.ccs-lookup-form input[type="text"] {
	padding: 8px 10px;
	border: 1px solid #bbb;
	border-radius: 4px;
	min-width: 220px;
	font-size: 15px;
	font-family: Arial, Helvetica, sans-serif;
}
.ccs-lookup-form button {
	background: #1d4ed8;
	color: #fff;
	border: none;
	padding: 9px 18px;
	border-radius: 4px;
	font-size: 15px;
	cursor: pointer;
	font-family: Arial, Helvetica, sans-serif;
}
.ccs-lookup-form button:hover { background: #1741ad; }

.ccs-not-found {
	background: #fff4f4;
	border: 1px solid #f3b8b8;
	color: #a30000;
	padding: 12px 16px;
	border-radius: 6px;
	font-family: Arial, Helvetica, sans-serif;
}

.ccs-print-actions {
	margin-bottom: 14px;
	display: flex;
	align-items: center;
	gap: 14px;
	font-family: Arial, Helvetica, sans-serif;
}
.ccs-print-actions button {
	background: #16803c;
	color: #fff;
	border: none;
	padding: 10px 18px;
	border-radius: 4px;
	font-size: 15px;
	cursor: pointer;
}
.ccs-print-actions button:hover { background: #116430; }

.ccs-status-badge {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 4px;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.5px;
}
.ccs-badge-paid { background: #d4edda; color: #155724; }
.ccs-badge-unpaid { background: #f8d7da; color: #721c24; }
.ccs-badge-exempt { background: #cfe2ff; color: #084298; }
.ccs-badge-partial { background: #fff3cd; color: #664d03; }

/* ---------- The 3-copy sheet ---------- */
.ccs-challan-sheet {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	background: #fff;
}

.ccs-copy {
	position: relative;
	padding: 14px 16px 10px 16px;
	font-size: 11.5px;
	line-height: 1.55;
}

.ccs-stamp {
	position: absolute;
	top: 90px;
	left: 50%;
	transform: translateX(-50%) rotate(-18deg);
	font-size: 36px;
	font-weight: 900;
	border-radius: 8px;
	padding: 2px 18px;
	letter-spacing: 3px;
	pointer-events: none;
	z-index: 5;
	font-family: Arial, Helvetica, sans-serif;
	white-space: nowrap;
}
.ccs-stamp-paid { color: rgba(22, 128, 60, 0.35); border: 5px solid rgba(22, 128, 60, 0.35); }
.ccs-stamp-exempt { color: rgba(8, 66, 152, 0.35); border: 5px solid rgba(8, 66, 152, 0.35); }
.ccs-stamp-partial { color: rgba(102, 77, 3, 0.35); border: 5px solid rgba(102, 77, 3, 0.35); font-size: 28px; }

.ccs-header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 2px;
	text-align: center;
}
.ccs-logo, .ccs-logo-placeholder {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 1px solid #999;
}
.ccs-logo-placeholder { background: #e5e7eb; }
.ccs-school-name {
	font-weight: 700;
	font-size: 19px;
	line-height: 1.15;
}

.ccs-copy-label-row {
	text-align: right;
	margin: 6px 0 2px 0;
}
.ccs-copy-label {
	background: #111;
	color: #fff;
	font-weight: 700;
	font-size: 11px;
	padding: 2px 8px;
	display: inline-block;
}

.ccs-line { margin: 1px 0; }
.ccs-bold { font-weight: 700; }
.ccs-align-right { text-align: right; font-size: 11px; }
.ccs-red { color: #c1121f; }

.ccs-hr {
	border-top: 1px solid #000;
	margin: 3px 0 5px 0;
}

.ccs-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 8px;
	margin: 4px 0;
}

.ccs-fee-table, .ccs-history-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 8px;
}
.ccs-fee-table {
	border-top: 2px solid #000;
	border-bottom: 1px solid #000;
}
.ccs-fee-table th {
	border-bottom: 1px solid #000;
	font-weight: 700;
	text-align: left;
	padding: 3px 2px;
	font-size: 11.5px;
}
.ccs-fee-table th:last-child { text-align: right; }
.ccs-fee-table td {
	padding: 3px 2px;
	font-size: 11.5px;
}
.ccs-fee-table td:last-child { text-align: right; }

.ccs-history-table th, .ccs-history-table td {
	border: 1px solid #333;
	padding: 2px 4px;
	font-size: 10px;
	text-align: left;
}
.ccs-history-table th:not(:first-child), .ccs-history-table td:not(:first-child) {
	text-align: right;
}

.ccs-totals-row {
	display: flex;
	justify-content: space-between;
	padding: 2px 2px;
	border-bottom: 1px solid #000;
}
.ccs-highlight-row {
	background: #e4e4e4;
}

.ccs-history-title {
	font-weight: 700;
	text-align: center;
	margin-top: 12px;
	font-size: 11px;
}
.ccs-terms-title {
	font-weight: 700;
	margin-top: 14px;
	font-size: 12px;
}

.ccs-terms-list {
	font-size: 10.5px;
	margin: 4px 0 0 14px;
	padding: 0;
	list-style: none;
}
.ccs-terms-list li {
	margin-bottom: 3px;
	position: relative;
	padding-left: 12px;
}
.ccs-terms-list li:before {
	content: "*";
	position: absolute;
	left: 0;
}

.ccs-signature {
	text-align: center;
	border-top: 1px solid #000;
	margin-top: 26px;
	padding-top: 6px;
	font-size: 11.5px;
	font-weight: 700;
}
.ccs-barcode {
	display: block;
	margin: 4px auto 0 auto;
	max-width: 170px;
	height: auto;
}
.ccs-printed-on {
	font-size: 9px;
	color: #333;
	margin-top: 4px;
	font-family: Arial, Helvetica, sans-serif;
}

/* ---------- Print rules ---------- */
@media print {
	body * { visibility: hidden; }
	.ccs-challan-sheet, .ccs-challan-sheet * { visibility: visible; }
	.ccs-challan-sheet {
		position: absolute;
		left: 0; top: 0; width: 100%;
	}
	.ccs-print-actions, .ccs-lookup-form { display: none !important; }
}

@media (max-width: 782px) {
	.ccs-challan-sheet { grid-template-columns: 1fr; }
	.ccs-copy { border-bottom: 1px dashed #999; padding-bottom: 16px; margin-bottom: 10px; }
}
