/* Modern add / edit / view forms — GRN / Class Fee pattern */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

.sform-page,
section.page[data-page-type="add"],
section.page[data-page-type="edit"],
section.page[data-page-type="view"] {
	font-family: "DM Sans", sans-serif;
	color: #0f172a;
	--sform-teal: #0f766e;
	--sform-cyan: #0e7490;
	--sform-soft: #f0fdfa;
	--sform-line: #99f6e4;
	--sform-muted: #64748b;
	--sform-ink: #0f172a;
}

.sform-page .container,
.sform-page .container-fluid,
section.page[data-page-type="add"] .container,
section.page[data-page-type="edit"] .container,
section.page[data-page-type="view"] .container,
section.page[data-page-type="add"] .container-fluid,
section.page[data-page-type="edit"] .container-fluid,
section.page[data-page-type="view"] .container-fluid {
	max-width: 980px;
}

/* Wide forms (GRN, assets, line-item pages) */
.sform-page.sform-wide .container,
.sform-page.sform-wide .container-fluid {
	max-width: 1320px !important;
}
.sform-page.sform-wide .sform-card {
	padding: .75rem 1rem !important;
	max-width: none !important;
}
.sform-page.sform-wide .comp-grid,
.sform-page.sform-wide .comp-grid.mx-auto {
	max-width: none !important;
	flex: 0 0 100%;
	width: 100%;
}
.sform-page.sform-wide .form-group {
	margin-bottom: .55rem;
}
.sform-page.sform-wide .sform-hero {
	/* 1320 container - 30px Bootstrap gutters → align with card */
	max-width: 1290px !important;
	width: calc(100% - 30px);
	margin-left: auto;
	margin-right: auto;
	margin-bottom: .65rem;
	padding: .7rem 1rem;
}
/* Hero inside same container-fluid as the card → full content width */
.sform-page .container-fluid > .sform-hero,
.sform-page.sform-wide .container-fluid > .sform-hero {
	max-width: none !important;
	width: 100%;
	margin-left: 0;
	margin-right: 0;
}
.sform-hero .container,
.sform-hero .container-fluid {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

/* Hero — same horizontal track as .container / .container-fluid content */
.sform-hero {
	background: linear-gradient(125deg, #0f766e 0%, #0e7490 100%);
	color: #fff;
	border-radius: 16px;
	padding: .95rem 1.15rem;
	margin: .75rem auto 1rem;
	/* 980 container - 30px gutters */
	max-width: 950px;
	width: calc(100% - 30px);
	box-sizing: border-box;
	box-shadow: 0 12px 28px rgba(15, 118, 110, .22);
}
.sform-hero .container {
	max-width: none;
	padding: 0;
}
.sform-hero-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	flex-wrap: wrap;
}
.sform-hero h1,
.sform-hero .record-title,
.sform-hero h4.record-title {
	font-family: "Fraunces", Georgia, serif !important;
	font-size: 1.35rem !important;
	font-weight: 700 !important;
	margin: 0 !important;
	color: #fff !important;
	line-height: 1.25;
}
.sform-hero .btn-sform-close,
.sform-hero a.btn-danger,
.sform-hero a.btn-sm.btn-danger {
	background: rgba(255,255,255,.16) !important;
	border: 1px solid rgba(255,255,255,.4) !important;
	color: #fff !important;
	border-radius: 999px !important;
	font-weight: 700 !important;
	font-size: .78rem !important;
	padding: .35rem .85rem !important;
	float: none !important;
	box-shadow: none !important;
}
.sform-hero .btn-sform-close:hover,
.sform-hero a.btn-danger:hover {
	background: rgba(255,255,255,.28) !important;
	color: #fff !important;
}

/* Content card */
.sform-card,
.sform-page .page-content,
section.page[data-page-type="add"] .page-content,
section.page[data-page-type="edit"] .page-content,
section.page[data-page-type="view"] .page-content {
	background: #fff !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 14px !important;
	padding: 1.15rem 1.2rem !important;
	box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
	color: #0f172a !important;
}

.sform-page .comp-grid,
section.page[data-page-type="add"] .comp-grid,
section.page[data-page-type="edit"] .comp-grid,
section.page[data-page-type="view"] .comp-grid {
	margin-bottom: 1.5rem;
}

/* Labels & controls */
.sform-page label,
.sform-page .control-label,
section.page[data-page-type="add"] label,
section.page[data-page-type="add"] .control-label,
section.page[data-page-type="edit"] label,
section.page[data-page-type="edit"] .control-label,
section.page[data-page-type="view"] label,
section.page[data-page-type="view"] .control-label {
	font-size: .72rem !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #64748b !important;
}

.sform-page .form-control,
section.page[data-page-type="add"] .form-control,
section.page[data-page-type="edit"] .form-control,
section.page[data-page-type="view"] .form-control {
	border-radius: 10px !important;
	border-color: #cbd5e1 !important;
	min-height: 38px;
	font-size: .92rem;
}
.sform-page .form-control:focus,
section.page[data-page-type="add"] .form-control:focus,
section.page[data-page-type="edit"] .form-control:focus {
	border-color: #0f766e !important;
	box-shadow: 0 0 0 3px rgba(15, 118, 110, .15) !important;
}

.sform-page .input-group-text,
section.page[data-page-type="add"] .input-group-text,
section.page[data-page-type="edit"] .input-group-text {
	border-radius: 0 10px 10px 0 !important;
	background: #ecfeff !important;
	border-color: #cbd5e1 !important;
	color: #0f766e !important;
}

/* Buttons */
.sform-page .btn-primary,
.sform-page .btn-success,
section.page[data-page-type="add"] .btn-primary,
section.page[data-page-type="edit"] .btn-primary,
section.page[data-page-type="view"] .btn-primary {
	background: linear-gradient(135deg, #0f766e, #0e7490) !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-weight: 700 !important;
	padding: .45rem 1.1rem !important;
	box-shadow: 0 6px 14px rgba(15, 118, 110, .25);
}
.sform-page .btn-secondary,
.sform-page .btn-default,
section.page[data-page-type="add"] .btn-secondary,
section.page[data-page-type="edit"] .btn-secondary {
	border-radius: 999px !important;
	font-weight: 700 !important;
}
.sform-page .btn-danger:not(.btn-sform-close),
section.page[data-page-type="view"] .btn-danger:not(.float-right) {
	border-radius: 999px !important;
	font-weight: 700 !important;
}

/* View tables */
.sform-page .table,
section.page[data-page-type="view"] .table {
	margin-bottom: 0;
}
.sform-page .table td,
.sform-page .table th,
section.page[data-page-type="view"] .table td,
section.page[data-page-type="view"] .table th {
	border-top-color: #f1f5f9 !important;
	padding: .65rem .5rem !important;
	vertical-align: middle;
}
.sform-page .table .title,
section.page[data-page-type="view"] .table .title {
	color: #0f172a;
}
.sform-page .table strong,
section.page[data-page-type="view"] .table strong {
	color: #0f766e;
	font-weight: 700;
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .03em;
}

/* Account / profile blocks */
.sform-page .bg-primary,
section.page[data-page-type="view"] .bg-primary {
	background: linear-gradient(125deg, #0f766e, #0e7490) !important;
	border-radius: 12px;
}

/* Line-item / GRN style tables inside forms */
.sform-page table.table thead th,
section.page[data-page-type="add"] table.table thead th,
section.page[data-page-type="edit"] table.table thead th {
	background: #ecfeff !important;
	color: #0f766e !important;
	font-size: .68rem !important;
	text-transform: uppercase;
	letter-spacing: .04em;
	border-bottom: 1px solid #99f6e4 !important;
}

/* Align bankaccount legacy ba-* with shared look */
.ba-page { font-family: "DM Sans", sans-serif; color: #0f172a; }
.ba-page .ba-hero {
	background: linear-gradient(125deg, #0f766e, #0e7490);
	color: #fff;
	border-radius: 16px;
	padding: 1rem 1.2rem;
	margin-bottom: .85rem;
}
.ba-page .ba-hero h1 {
	font-family: "Fraunces", Georgia, serif;
	font-size: 1.35rem;
	margin: 0;
}
.ba-page .ba-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	padding: 1.1rem;
	max-width: 720px;
	box-shadow: 0 6px 18px rgba(15,23,42,.05);
}
.ba-page label {
	font-size: .72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #64748b;
}
.ba-page .btn-pill { border-radius: 999px !important; font-weight: 700 !important; }

/* Fallback: any remaining light panels inside modern pages */
.sform-page .bg-light {
	background: #fff !important;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

/* Customer register / edit — 2-col grid, labels above fields */
.scus-form-page .sform-card {
	padding: 1.25rem 1.35rem !important;
}
.scus-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .85rem 1.1rem;
	align-items: start;
}
.scus-form-grid .scus-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.scus-form-grid .scus-field > label {
	margin: 0 0 .3rem !important;
	line-height: 1.2;
}
.scus-form-grid .scus-span-2 {
	grid-column: 1 / -1;
}
.scus-form-grid .scus-radios {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .35rem 1rem;
	min-height: 38px;
	padding-top: .15rem;
}
.scus-form-grid .form-control,
.scus-form-grid .custom-file {
	width: 100%;
}
.scus-form-grid .input-group .form-control {
	border-top-right-radius: 0 !important;
	border-bottom-right-radius: 0 !important;
}
.scus-form-grid .input-group-append .input-group-text {
	min-height: 38px;
}
.scus-form-grid small.text-muted {
	margin-top: .2rem;
	font-size: .72rem;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 500;
}
.scus-form-actions {
	display: flex;
	justify-content: flex-end;
	gap: .5rem;
	margin-top: 1.1rem;
	padding-top: .85rem;
	border-top: 1px solid #e2e8f0;
}
@media (max-width: 767.98px) {
	.scus-form-grid {
		grid-template-columns: 1fr;
		gap: .75rem;
	}
	.scus-form-grid .scus-span-2 {
		grid-column: auto;
	}
}

@media (max-width: 576px) {
	.sform-hero,
	.sform-page.sform-wide .sform-hero {
		width: calc(100% - 1rem);
		max-width: none !important;
		margin-left: auto;
		margin-right: auto;
		border-radius: 12px;
	}
	.sform-hero h1,
	.sform-hero .record-title { font-size: 1.1rem !important; }
}
