/* ------------------------------------------------------------------ *
 * BMS application styles.
 *
 * An original admin design: navy sidebar, light canvas, soft rounded
 * cards, Inter type, Bootstrap Icons. Bootstrap 5 does the layout work;
 * everything here is theming on top of it.
 * ------------------------------------------------------------------ */

:root {
	--bms-brand: #1f2d3d;          /* navy, carried over from the original app */
	--bms-brand-2: #26384c;
	--bms-primary: #2563eb;
	--bms-primary-soft: #e8efff;
	--bms-success: #12a150;
	--bms-success-soft: #e3f6ec;
	--bms-danger: #dc3545;
	--bms-danger-soft: #fdecee;
	--bms-warning: #f59f00;
	--bms-warning-soft: #fff4dd;
	--bms-info: #0aa2c0;
	--bms-info-soft: #e1f6fa;
	--bms-violet: #7048e8;
	--bms-violet-soft: #efeafe;

	--bms-bg: #f4f6fb;
	--bms-surface: #ffffff;
	--bms-border: #e7eaf0;
	--bms-text: #1d2433;
	--bms-muted: #6b7385;
	--bms-radius: 12px;
	--bms-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 6px rgba(16, 24, 40, 0.05);
	--bms-shadow-lg: 0 10px 30px rgba(16, 24, 40, 0.10);

	--bms-sidebar-width: 256px;
	--bms-sidebar-collapsed: 76px;
	--bms-header-height: 64px;

	--bs-primary: var(--bms-primary);
	--bs-primary-rgb: 37, 99, 235;
	--bs-link-color: var(--bms-primary);
	--bs-link-color-rgb: 37, 99, 235;
	--bs-link-hover-color: #1d4ed8;
	--bs-body-font-family: "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--bs-body-color: var(--bms-text);
	--bs-border-color: var(--bms-border);
}

body {
	background-color: var(--bms-bg);
	font-size: 0.9rem;
	color: var(--bms-text);
	-webkit-font-smoothing: antialiased;
}

/* ---------- Buttons ---------- */

.btn {
	border-radius: 8px;
	font-weight: 500;
}

.btn-sm {
	border-radius: 7px;
}

.btn-primary {
	--bs-btn-bg: var(--bms-primary);
	--bs-btn-border-color: var(--bms-primary);
	--bs-btn-hover-bg: #1d4ed8;
	--bs-btn-hover-border-color: #1d4ed8;
	--bs-btn-active-bg: #1e40af;
	--bs-btn-active-border-color: #1e40af;
	--bs-btn-disabled-bg: var(--bms-primary);
	--bs-btn-disabled-border-color: var(--bms-primary);
	box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.btn-outline-primary {
	--bs-btn-color: var(--bms-primary);
	--bs-btn-border-color: #c9d7fb;
	--bs-btn-hover-bg: var(--bms-primary);
	--bs-btn-hover-border-color: var(--bms-primary);
	--bs-btn-active-bg: var(--bms-primary);
}

.btn-outline-secondary {
	--bs-btn-color: #475069;
	--bs-btn-border-color: var(--bms-border);
	--bs-btn-hover-bg: #f1f3f8;
	--bs-btn-hover-color: var(--bms-text);
	--bs-btn-hover-border-color: #d8dce6;
	--bs-btn-active-bg: #e9ecf3;
	--bs-btn-active-color: var(--bms-text);
	background: #fff;
}

.btn .bi {
	margin-right: 0.3rem;
}

.btn-icon {
	width: 38px;
	height: 38px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
}

.btn-icon .bi {
	margin: 0;
	font-size: 1.1rem;
}

/* ---------- Shell ---------- */

.app-shell {
	min-height: 100vh;
}

.sidebar {
	position: fixed;
	inset: 0 auto 0 0;
	width: var(--bms-sidebar-width);
	background: var(--bms-brand);
	color: #c6cfdb;
	display: flex;
	flex-direction: column;
	z-index: 1040;
	transition: width 0.2s ease, transform 0.2s ease;
}

.sidebar-brand {
	height: var(--bms-header-height);
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0 1.15rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
}

.sidebar-brand:hover {
	color: #fff;
}

.brand-mark {
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: linear-gradient(135deg, #3b82f6, #2563eb);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1rem;
	overflow: hidden;
}

.brand-mark img {
	max-width: 30px;
	max-height: 30px;
	object-fit: contain;
}

.brand-text {
	line-height: 1.15;
	overflow: hidden;
}

.brand-text strong {
	display: block;
	font-size: 0.95rem;
	font-weight: 650;
	text-overflow: ellipsis;
	overflow: hidden;
}

.brand-text small {
	color: #8c9ab0;
	font-size: 0.72rem;
}

.sidebar-nav {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 0.9rem 0.75rem 1rem;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-nav .nav-section {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #7d8ba1;
	font-weight: 600;
	padding: 1rem 0.75rem 0.4rem;
	white-space: nowrap;
}

.sidebar-nav .nav-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: #c6cfdb;
	padding: 0.55rem 0.75rem;
	border-radius: 9px;
	font-size: 0.88rem;
	font-weight: 500;
	white-space: nowrap;
	transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav .nav-link .bi {
	font-size: 1.05rem;
	flex: 0 0 1.25rem;
	text-align: center;
	opacity: 0.9;
}

.sidebar-nav .nav-link:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

.sidebar-nav .nav-link.active {
	background: var(--bms-primary);
	color: #fff;
	box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.sidebar-footer {
	padding: 0.85rem 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.07);
	font-size: 0.75rem;
	color: #8c9ab0;
	white-space: nowrap;
	overflow: hidden;
}

.sidebar-footer code {
	color: #d6deea;
	background: rgba(255, 255, 255, 0.07);
	padding: 0.1rem 0.4rem;
	border-radius: 5px;
}

.main {
	margin-left: var(--bms-sidebar-width);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	transition: margin-left 0.2s ease;
}

/* Collapsed sidebar (desktop): icons only. */
@media (min-width: 992px) {
	.sidebar-collapsed .sidebar {
		width: var(--bms-sidebar-collapsed);
	}

	.sidebar-collapsed .main {
		margin-left: var(--bms-sidebar-collapsed);
	}

	.sidebar-collapsed .brand-text,
	.sidebar-collapsed .nav-section,
	.sidebar-collapsed .nav-link span,
	.sidebar-collapsed .sidebar-footer {
		display: none;
	}

	.sidebar-collapsed .sidebar-nav .nav-link {
		justify-content: center;
		padding: 0.65rem 0;
	}

	.sidebar-collapsed .sidebar-nav .nav-section + li,
	.sidebar-collapsed .sidebar-nav li.nav-divider {
		margin-top: 0.6rem;
	}
}

/* Mobile: the sidebar slides in over the page. */
@media (max-width: 991.98px) {
	.sidebar {
		transform: translateX(-100%);
		box-shadow: var(--bms-shadow-lg);
	}

	.sidebar-open .sidebar {
		transform: none;
	}

	.main {
		margin-left: 0;
	}

	.sidebar-backdrop {
		position: fixed;
		inset: 0;
		background: rgba(15, 23, 42, 0.45);
		z-index: 1035;
		display: none;
	}

	.sidebar-open .sidebar-backdrop {
		display: block;
	}
}

.app-header {
	position: sticky;
	top: 0;
	z-index: 1020;
	height: var(--bms-header-height);
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: saturate(180%) blur(8px);
	border-bottom: 1px solid var(--bms-border);
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0 1.5rem;
}

.app-header .header-title {
	min-width: 0;
}

.app-header .header-title .eyebrow {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--bms-muted);
	font-weight: 600;
}

.app-header .header-title .name {
	font-weight: 600;
	font-size: 0.95rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.header-actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.header-icon {
	color: #475069;
	background: #fff;
	border: 1px solid var(--bms-border);
}

.header-icon:hover {
	background: #f1f3f8;
	color: var(--bms-text);
}

.user-chip {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.25rem 0.5rem 0.25rem 0.25rem;
	border-radius: 999px;
	border: 1px solid var(--bms-border);
	background: #fff;
	color: var(--bms-text);
	text-align: left;
}

.user-chip:hover {
	background: #f7f8fb;
}

.avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--bms-primary-soft);
	color: var(--bms-primary);
	font-weight: 650;
	font-size: 0.8rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 32px;
}

.user-chip .meta {
	line-height: 1.1;
}

.user-chip .meta strong {
	display: block;
	font-size: 0.82rem;
	font-weight: 600;
}

.user-chip .meta small {
	color: var(--bms-muted);
	font-size: 0.72rem;
}

.dropdown-menu {
	border: 1px solid var(--bms-border);
	border-radius: 12px;
	box-shadow: var(--bms-shadow-lg);
	padding: 0.4rem;
	font-size: 0.875rem;
}

.dropdown-item {
	border-radius: 8px;
	padding: 0.45rem 0.7rem;
}

.dropdown-item .bi {
	margin-right: 0.5rem;
	color: var(--bms-muted);
}

.content {
	flex: 1 1 auto;
	padding: 1.75rem;
	min-width: 0;
}

@media (max-width: 991.98px) {
	.content {
		padding: 1rem;
	}

	.app-header {
		padding: 0 1rem;
	}
}

.app-footer {
	padding: 1rem 1.75rem 1.5rem;
	color: var(--bms-muted);
	font-size: 0.78rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem;
}

.trial-banner {
	background: linear-gradient(90deg, #fff7e6, #fffbf2);
	border-bottom: 1px solid #f6e3b4;
	font-size: 0.84rem;
	padding: 0.5rem 1.75rem;
	color: #7a5300;
}

/* ---------- Page headings ---------- */

.page-header {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 1.5rem;
}

.page-header .eyebrow {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: var(--bms-primary);
	font-weight: 600;
	margin-bottom: 0.2rem;
}

.page-header h1 {
	font-size: 1.5rem;
	font-weight: 650;
	letter-spacing: -0.01em;
	margin: 0;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.page-header h1 .badge {
	font-size: 0.7rem;
}

.page-header .subtitle {
	color: var(--bms-muted);
	font-size: 0.87rem;
	margin: 0.3rem 0 0;
}

/* ---------- Cards ---------- */

.card {
	border: 1px solid var(--bms-border);
	border-radius: var(--bms-radius);
	box-shadow: var(--bms-shadow);
	--bs-card-inner-border-radius: calc(var(--bms-radius) - 1px);
}

.card-header {
	background: transparent;
	border-bottom: 1px solid var(--bms-border);
	font-weight: 600;
	font-size: 0.92rem;
	padding: 0.95rem 1.15rem;
}

.card-header .bi {
	color: var(--bms-muted);
	margin-right: 0.35rem;
}

.card-body {
	padding: 1.15rem;
}

.card-footer {
	background: #fbfcfe;
	border-top: 1px solid var(--bms-border);
	padding: 0.75rem 1.15rem;
}

/* ---------- KPI / stat cards ---------- */

.stat-card .card-body {
	display: flex;
	align-items: flex-start;
	gap: 0.9rem;
}

.stat-card .stat-body {
	min-width: 0;
	flex: 1 1 auto;
}

.stat-icon {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	background: var(--bms-primary-soft);
	color: var(--bms-primary);
}

.stat-icon.success { background: var(--bms-success-soft); color: var(--bms-success); }
.stat-icon.danger  { background: var(--bms-danger-soft);  color: var(--bms-danger); }
.stat-icon.warning { background: var(--bms-warning-soft); color: #c27c00; }
.stat-icon.info    { background: var(--bms-info-soft);    color: var(--bms-info); }
.stat-icon.violet  { background: var(--bms-violet-soft);  color: var(--bms-violet); }

.stat-card .stat-label {
	font-size: 0.78rem;
	color: var(--bms-muted);
	font-weight: 500;
}

.stat-card .stat-value {
	font-size: 1.45rem;
	font-weight: 700;
	line-height: 1.25;
	margin-top: 0.15rem;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.stat-card .stat-note {
	font-size: 0.76rem;
	color: var(--bms-muted);
	margin-top: 0.15rem;
}

.stat-note a {
	text-decoration: none;
}

/* ---------- Tables ---------- */

.table {
	font-size: 0.86rem;
	margin-bottom: 0;
	--bs-table-hover-bg: #f7f9fd;
}

.table > thead th {
	background-color: #f8f9fc;
	border-bottom: 1px solid var(--bms-border);
	font-weight: 600;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #6b7385;
	white-space: nowrap;
	padding-top: 0.7rem;
	padding-bottom: 0.7rem;
}

.table > :not(caption) > * > * {
	padding-left: 0.9rem;
	padding-right: 0.9rem;
	border-color: #eef0f5;
}

.card > .table-responsive:last-child .table tr:last-child td,
.card > .table-responsive .table tfoot tr:last-child td {
	border-bottom: 0;
}

.table td,
.table th {
	vertical-align: middle;
}

.table a.fw-semibold {
	color: var(--bms-text);
}

.table a.fw-semibold:hover {
	color: var(--bms-primary);
}

.table .num {
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.table .actions {
	white-space: nowrap;
	text-align: right;
	width: 1%;
}

.table tfoot td {
	background: #fbfcfe;
}

.badge {
	font-weight: 600;
	padding: 0.38em 0.65em;
	border-radius: 999px;
	letter-spacing: 0.01em;
}

/* Status badges: soft tints instead of solid fills. */
.badge.text-bg-success   { background: var(--bms-success-soft) !important; color: #0b7a3b !important; }
.badge.text-bg-danger    { background: var(--bms-danger-soft) !important;  color: #b42318 !important; }
.badge.text-bg-warning   { background: var(--bms-warning-soft) !important; color: #9a6200 !important; }
.badge.text-bg-info      { background: var(--bms-info-soft) !important;    color: #087990 !important; }
.badge.text-bg-primary   { background: var(--bms-primary-soft) !important; color: #1d4ed8 !important; }
.badge.text-bg-secondary { background: #eef0f5 !important; color: #4b5468 !important; }
.badge.text-bg-dark      { background: #e4e7ee !important; color: #1d2433 !important; }
.badge.text-bg-light     { background: #f1f3f8 !important; color: #4b5468 !important; }

.pagination {
	--bs-pagination-border-radius: 8px;
	--bs-pagination-active-bg: var(--bms-primary);
	--bs-pagination-active-border-color: var(--bms-primary);
	gap: 0.25rem;
}

.pagination .page-link {
	border-radius: 8px !important;
}

/* ---------- Filter bars ---------- */

.filter-card .card-body {
	padding: 0.9rem 1.15rem;
}

/* ---------- Dashboard extras ---------- */

.quick-actions {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.65rem;
}

.quick-action {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.75rem;
	border: 1px solid var(--bms-border);
	border-radius: 10px;
	color: var(--bms-text);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.85rem;
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.quick-action:hover {
	border-color: #c9d7fb;
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.10);
	color: var(--bms-primary);
	transform: translateY(-1px);
}

.quick-action .stat-icon {
	flex-basis: 34px;
	width: 34px;
	height: 34px;
	font-size: 1rem;
	border-radius: 9px;
}

.progress-row + .progress-row {
	margin-top: 0.9rem;
}

.progress-row .progress {
	height: 8px;
	border-radius: 999px;
	background: #eef0f5;
}

.renewal-list li {
	display: flex;
	gap: 0.65rem;
	padding: 0.6rem 0;
	border-bottom: 1px dashed #edf0f5;
}

.renewal-list li:last-child {
	border-bottom: 0;
}

.renewal-dot {
	flex: 0 0 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-top: 0.4rem;
}

/* Renewal buckets keep a colour-coded top edge. */
.bucket-overdue { border-top: 3px solid var(--bms-danger); }
.bucket-today   { border-top: 3px solid var(--bms-warning); }
.bucket-week    { border-top: 3px solid var(--bms-info); }
.bucket-month   { border-top: 3px solid #98a2b3; }

.welcome-card {
	background: linear-gradient(120deg, var(--bms-brand) 0%, #2b4a72 60%, #2563eb 130%);
	color: #fff;
	border: 0;
}

.welcome-card .card-body {
	padding: 1.5rem;
}

.welcome-card a {
	color: #fff;
}

.welcome-card .steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 0.6rem;
	margin-top: 1rem;
}

.welcome-card .step {
	background: rgba(255, 255, 255, 0.10);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 10px;
	padding: 0.7rem 0.8rem;
	font-size: 0.83rem;
	text-decoration: none;
	display: flex;
	gap: 0.55rem;
	align-items: flex-start;
}

.welcome-card .step:hover {
	background: rgba(255, 255, 255, 0.18);
}

/* ---------- Forms ---------- */

.form-label {
	font-weight: 550;
	font-size: 0.82rem;
	margin-bottom: 0.3rem;
	color: #344054;
}

.form-control,
.form-select {
	border-color: #dde1ea;
	border-radius: 8px;
	font-size: 0.88rem;
}

.form-control:focus,
.form-select:focus {
	border-color: #93b4f9;
	box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.form-control-sm,
.form-select-sm {
	border-radius: 7px;
}

.input-group-text {
	background: #f6f7fb;
	border-color: #dde1ea;
	font-size: 0.85rem;
	color: var(--bms-muted);
}

.form-text {
	color: #7a8297;
	font-size: 0.78rem;
}

.required-mark {
	color: var(--bms-danger);
}

fieldset legend {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 600;
	color: var(--bms-muted);
	border-bottom: 1px solid var(--bms-border);
	padding-bottom: 0.4rem;
	margin-bottom: 0.9rem;
}

.alert {
	border-radius: 10px;
	font-size: 0.88rem;
}

/* Line-item editor */

.items-table {
	min-width: 860px;
}

.items-table input,
.items-table select,
.items-table textarea {
	font-size: 0.84rem;
}

.items-table td {
	padding: 0.4rem !important;
}

.items-table .drag-handle {
	cursor: grab;
	color: var(--bms-muted);
	user-select: none;
}

.items-table tr.dragging {
	opacity: 0.4;
}

.items-table .item-quantity,
.items-table input[name="items[unit][]"] {
	min-width: 4.5rem;
}

.items-table .item-unit-price,
.items-table .item-discount {
	min-width: 6.5rem;
}

.items-table .item-service {
	min-width: 8.5rem;
}

/* Definition lists on view pages */

.detail-list {
	margin: 0;
}

.detail-list dt {
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--bms-muted);
	font-weight: 600;
}

.detail-list dd {
	margin-bottom: 0.8rem;
}

/* Rendered quotation content */

.rich-content {
	font-size: 0.9rem;
}

.rich-content table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1rem;
}

.rich-content table td,
.rich-content table th {
	border: 1px solid var(--bms-border);
	padding: 0.4rem 0.5rem;
}

.rich-content img {
	max-width: 100%;
}

.ck-editor__editable_inline {
	min-height: 260px;
}

.image-slot {
	border: 1px dashed #d5dae4;
	border-radius: 10px;
	padding: 0.75rem;
	background: #fafbfd;
	min-height: 84px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.image-slot img {
	max-height: 70px;
	max-width: 100%;
}

.image-slot.dark {
	background: var(--bms-brand);
}

.audit-list {
	font-size: 0.82rem;
}

/* ---------- Sign-in pages ---------- */

.auth-page {
	min-height: 100vh;
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	background: var(--bms-surface);
}

.auth-aside {
	background:
		radial-gradient(1200px 500px at -10% -10%, rgba(37, 99, 235, 0.45), transparent 60%),
		radial-gradient(800px 400px at 110% 110%, rgba(112, 72, 232, 0.35), transparent 60%),
		var(--bms-brand);
	color: #fff;
	padding: 3rem;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.auth-aside h2 {
	font-size: 2rem;
	font-weight: 650;
	letter-spacing: -0.02em;
	line-height: 1.2;
	max-width: 30rem;
}

.auth-aside p {
	color: #c6cfdb;
	max-width: 30rem;
}

.auth-feature {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	margin-top: 1rem;
	color: #dbe3ef;
	font-size: 0.9rem;
}

.auth-feature .bi {
	width: 34px;
	height: 34px;
	flex: 0 0 34px;
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.10);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.auth-main {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1.25rem;
	background: var(--bms-bg);
}

.auth-card {
	width: 100%;
	max-width: 420px;
}

.auth-card.wide {
	max-width: 560px;
}

.auth-card .card-body {
	padding: 2rem;
}

.auth-card h1 {
	font-size: 1.4rem;
	font-weight: 650;
	letter-spacing: -0.01em;
}

@media (max-width: 991.98px) {
	.auth-page {
		grid-template-columns: 1fr;
	}

	.auth-aside {
		display: none;
	}
}

/* ---------- Platform console ---------- */

.platform .sidebar {
	background: #111827;
}

.platform .brand-mark {
	background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.platform .sidebar-nav .nav-link.active {
	background: #6d28d9;
	box-shadow: 0 6px 16px rgba(109, 40, 217, 0.35);
}

.credential-box {
	background: #0f172a;
	color: #e2e8f0;
	border-radius: 10px;
	padding: 1rem 1.15rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.85rem;
	line-height: 1.7;
}

.credential-box .k {
	color: #94a3b8;
	display: inline-block;
	min-width: 7.5rem;
}

/* ---------- Revenue chart (single series, one hue) ---------- */

.revenue-chart {
	display: block;
	overflow: visible;
}

.revenue-chart .grid {
	stroke: #eef0f5;
	stroke-width: 1;
}

.revenue-chart .grid.base {
	stroke: #d5dae4;
}

.revenue-chart .axis {
	fill: #8a91a3;
	font-size: 11px;
}

.revenue-chart .axis.strong {
	fill: var(--bms-text);
	font-weight: 600;
}

.revenue-chart .value {
	fill: var(--bms-text);
	font-size: 11px;
	font-weight: 600;
}

.revenue-chart .bar {
	fill: #5b8af0;
	transition: fill 0.15s ease;
}

.revenue-chart .bar.current {
	fill: var(--bms-primary);
}

.revenue-chart .hit {
	fill: transparent;
}

.revenue-chart .bar-group:hover .bar {
	fill: #1d4ed8;
}

.revenue-chart .bar-group:hover .hit {
	fill: rgba(37, 99, 235, 0.05);
}

.min-w-0 {
	min-width: 0;
}

/* ---------- Quotation design (settings) ---------- */

.cover-preview {
	--cover: #0E0E0E;
	--accent: #111111;
	--cover-fg: #ffffff;
	--accent-fg: #ffffff;
	aspect-ratio: 210 / 150;
	background: var(--cover);
	color: var(--cover-fg);
	border-radius: 10px;
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
	transition: background 0.15s ease;
}

.cover-preview .cp-top {
	display: flex;
	justify-content: space-between;
	font-size: 0.7rem;
	opacity: 0.85;
	border-bottom: 1px solid currentColor;
	padding-bottom: 6px;
}

.cover-preview .cp-logo {
	font-weight: 600;
}

.cover-preview .cp-title {
	display: flex;
	flex-direction: column;
	line-height: 1.1;
}

.cover-preview .cp-title small {
	font-size: 0.55rem;
	letter-spacing: 0.15em;
	opacity: 0.6;
	margin-bottom: 4px;
}

.cover-preview .cp-title strong {
	font-weight: 300;
	font-size: 1.15rem;
}

.cover-preview .cp-title span {
	font-weight: 300;
	font-size: 1.15rem;
	opacity: 0.6;
}

.cover-preview .cp-panel {
	background: #fff;
	color: #1d2433;
	border-radius: 4px;
	padding: 6px 8px;
	font-size: 0.65rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.cover-preview .cp-total {
	background: var(--accent);
	color: var(--accent-fg);
	padding: 2px 8px;
	border-radius: 3px;
	font-weight: 600;
}

.swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.swatch {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px var(--bms-border);
	padding: 0;
	cursor: pointer;
}

.swatch.active,
.swatch:focus-visible {
	box-shadow: 0 0 0 2px var(--bms-primary);
	outline: none;
}

.form-control-color {
	max-width: 3rem;
}
