/**
 * Company Portal dashboard
 * Brand-aligned with Food Safety Adv (cyan / charcoal).
 */

:root {
	--tc-primary: var(--fsa-primary, #03a9f4);
	--tc-primary-ink: #0277a3;
	--tc-ink: var(--fsa-heading, #222222);
	--tc-muted: #6b7280;
	--tc-line: #e6e9ee;
	--tc-soft: #f3f6f9;
	--tc-white: #ffffff;
	--tc-danger: #b42318;
	--tc-warn-bg: #fff1f0;
	--tc-warn-border: #fecaca;
	--tc-warn-text: #7f1d1d;
	--tc-radius: 4px;
	--tc-shadow: 0 10px 28px rgba(34, 34, 34, 0.06);
}

/* —— Page shell (notice + two-column app) —— */
.tc-dashboard-shell {
	margin: 1.75rem 0 4rem;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
}

.tc-dashboard-shell > .tc-profile-complete-notice {
	margin: 0 0 1.25rem;
	border: 1px solid var(--tc-warn-border);
	border-radius: 10px;
	overflow: hidden;
}

.tc-dashboard-shell > .fsa-content,
.tc-dashboard-shell > .fsa-content--dashboard {
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

body.fsa-is-training-dashboard .fsa-main--training-dashboard {
	background:
		linear-gradient(180deg, #eef2f5 0%, #f7f8fa 42%, #f7f8fa 100%);
}

/* —— App: left sidebar + right content —— */
.tc-dashboard-app {
	display: grid;
	grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
	gap: 1.5rem;
	align-items: start;
	color: var(--tc-ink);
	font-family: inherit;
	padding: 0;
}

.tc-dashboard-app *,
.tc-dashboard-app *::before,
.tc-dashboard-app *::after {
	box-sizing: border-box;
}

.tc-dashboard-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.25rem 1rem 1.15rem;
	background: var(--tc-white);
	border: 1px solid var(--tc-line);
	border-radius: 12px;
	box-shadow: var(--tc-shadow);
	position: sticky;
	top: 6.5rem;
}

.tc-dashboard-sidebar__profile {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.15rem 0.35rem 1rem;
	border-bottom: 1px solid var(--tc-line);
}

.tc-dashboard-sidebar__avatar {
	flex: 0 0 auto;
	width: 3rem;
	height: 3rem;
	border-radius: 999px;
	display: grid;
	place-items: center;
	background: #e8eef3;
	color: var(--tc-ink);
	font-size: 1.15rem;
	font-weight: 750;
	letter-spacing: 0.02em;
}

.tc-dashboard-sidebar__meta {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.tc-dashboard-sidebar__name {
	font-size: 0.98rem;
	font-weight: 750;
	line-height: 1.25;
	color: var(--tc-ink);
	word-break: break-word;
}

.tc-dashboard-sidebar__company,
.tc-dashboard-sidebar__email {
	font-size: 0.8rem;
	line-height: 1.35;
	color: var(--tc-muted);
	word-break: break-word;
}

.tc-dashboard-sidebar__logout {
	display: block;
	margin-top: auto;
	padding: 0.7rem 0.9rem;
	border: 1px solid #f1b0b0;
	border-radius: 8px;
	background: #fff;
	color: #c0392b;
	font-size: 0.9rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tc-dashboard-sidebar__logout:hover,
.tc-dashboard-sidebar__logout:focus-visible {
	background: #fff5f5;
	border-color: #e07a7a;
	color: #a1271b;
}

.tc-dashboard-main {
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	background: var(--tc-white);
	border: 1px solid var(--tc-line);
	border-radius: 12px;
	box-shadow: var(--tc-shadow);
	padding: 1.5rem 1.5rem 1.85rem;
}

/* Legacy header helpers (kept for any residual markup) */
.tc-dashboard-app__header,
.tc-dashboard-app__eyebrow {
	display: none;
}

.tc-dashboard-app__title,
.tc-dashboard-app__header h1 {
	margin: 0;
	font-size: clamp(1.65rem, 2.4vw, 2.15rem);
	font-weight: 750;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--tc-ink);
}

/* —— Vertical section nav —— */
.tc-dashboard-nav {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	margin: 0;
	padding: 0.15rem 0;
	overflow: visible;
	border: 0;
	background: transparent;
	border-radius: 0;
}

.tc-dashboard-nav__link,
.tc-dashboard-nav a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.7rem;
	flex: 0 0 auto;
	padding: 0.72rem 0.85rem;
	color: var(--tc-ink);
	font-size: 0.92rem;
	font-weight: 650;
	text-decoration: none;
	white-space: nowrap;
	border: 0;
	background: transparent;
	border-radius: 8px;
	box-shadow: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tc-dashboard-nav__icon {
	display: inline-flex;
	width: 1.15rem;
	height: 1.15rem;
	flex: 0 0 auto;
	opacity: 0.78;
}

.tc-dashboard-nav__icon svg {
	width: 100%;
	height: 100%;
	display: block;
}

.tc-dashboard-nav__label {
	min-width: 0;
}

.tc-dashboard-nav__link:hover,
.tc-dashboard-nav a:hover {
	color: var(--tc-ink);
	background: var(--tc-soft);
	box-shadow: none;
}

.tc-dashboard-nav__link.is-active,
.tc-dashboard-nav a.is-active,
.tc-dashboard-nav a.active {
	color: #fff;
	background: var(--fsa-secondary, #1a2b4a);
	box-shadow: none;
}

.tc-dashboard-nav__link.is-active .tc-dashboard-nav__icon,
.tc-dashboard-nav a.is-active .tc-dashboard-nav__icon,
.tc-dashboard-nav a.active .tc-dashboard-nav__icon {
	opacity: 1;
}

.tc-dashboard-nav__link.is-active::after,
.tc-dashboard-nav a.is-active::after,
.tc-dashboard-nav a.active::after {
	display: none;
}

.tc-dashboard-view {
	min-height: 24rem;
	min-width: 0;
	max-width: 100%;
}

.tc-dashboard-page {
	min-width: 0;
	max-width: 100%;
}

.tc-dashboard-page {
	display: grid;
	gap: 1.5rem;
}

/* —— Headings —— */
.tc-page-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.25rem;
}

.tc-page-heading h2 {
	margin: 0;
	font-size: clamp(1.35rem, 2vw, 1.7rem);
	font-weight: 750;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: var(--tc-ink);
}

.tc-page-heading p,
.tc-panel__heading p {
	margin: 0.4rem 0 0;
	max-width: 40rem;
	color: var(--tc-muted);
	font-size: 0.95rem;
	line-height: 1.5;
}

.tc-kicker {
	display: none;
}

/* —— Metrics —— */
.tc-stat-grid {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0;
	border: 1px solid var(--tc-line);
	border-radius: var(--tc-radius);
	background: var(--tc-soft);
	overflow: hidden;
}

.tc-stat-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 1.1rem;
	min-height: 7.5rem;
	padding: 1.15rem 1.2rem 1.25rem;
	border-right: 1px solid var(--tc-line);
	background: transparent;
	color: var(--tc-ink) !important;
	text-decoration: none !important;
	transition: background 0.15s ease;
}

.tc-stat-card:last-child {
	border-right: 0;
}

.tc-stat-card:hover {
	background: var(--tc-white);
}

.tc-stat-card__label {
	color: var(--tc-muted);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.35;
}

.tc-stat-card__value,
.tc-stat-card strong {
	margin: 0;
	font-size: clamp(1.75rem, 2.5vw, 2.15rem);
	font-weight: 750;
	letter-spacing: -0.03em;
	line-height: 1;
	color: var(--tc-ink);
}

/* —— Panels / actions —— */
.tc-panel {
	background: var(--tc-white);
	border: 1px solid var(--tc-line);
	border-radius: var(--tc-radius);
	padding: 1.25rem 1.35rem;
	box-shadow: none;
}

.tc-panel__heading {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 1.1rem;
}

.tc-panel__heading h3 {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 750;
	color: var(--tc-ink);
}

.tc-panel__heading a,
.tc-panel-footer a {
	color: var(--tc-primary-ink);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
}

.tc-panel__heading a:hover,
.tc-panel-footer a:hover {
	text-decoration: underline;
}

.tc-panel-footer {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--tc-line);
}

.tc-action-grid {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem;
}

.tc-action-card {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: auto;
	max-width: 100%;
	min-height: 2.65rem;
	padding: 0.55rem 1.05rem;
	border: 1px solid transparent;
	border-radius: 8px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
	color: #fff !important;
	font: inherit;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.tc-action-card:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 10px rgba(15, 23, 42, 0.16);
	filter: none;
}

.tc-action-card:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.tc-action-card__icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 0;
	background: transparent;
}

.tc-action-card__icon svg {
	display: block;
	width: 1.15rem;
	height: 1.15rem;
}

.tc-action-card strong {
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.tc-action-card--employees {
	background: #0f766e;
	border-color: #0d9488;
}

.tc-action-card--employees:hover {
	background: #0d5f59;
}

.tc-action-card--assign {
	background: #0369a1;
	border-color: #0284c7;
}

.tc-action-card--assign:hover {
	background: #075985;
}

.tc-action-card--certificates {
	background: #7c3aed;
	border-color: #8b5cf6;
}

.tc-action-card--certificates:hover {
	background: #6d28d9;
}

.tc-employee-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tc-employee-list__item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.85rem;
	padding: 0.85rem 0;
	border-top: 1px solid var(--tc-line);
}

.tc-employee-list__item:first-child {
	border-top: 0;
	padding-top: 0;
}

.tc-employee-list__meta {
	display: grid;
	gap: 0.2rem;
	min-width: 0;
}

.tc-employee-list__meta strong {
	font-size: 0.95rem;
	color: var(--tc-ink);
}

.tc-employee-list__meta small {
	color: var(--tc-muted);
	font-size: 0.8rem;
}

.tc-employee-list__badges {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.35rem;
}

.tc-badge {
	display: inline-flex;
	align-items: center;
	padding: 0.28rem 0.55rem;
	border-radius: var(--tc-radius);
	font-size: 0.72rem;
	font-weight: 750;
	line-height: 1.2;
	white-space: nowrap;
}

.tc-badge--credential {
	background: #e0f2fe;
	color: #0369a1;
}

.tc-badge--certificate {
	background: #ede9fe;
	color: #6d28d9;
}

.tc-badge--muted {
	background: #f1f5f9;
	color: #64748b;
}

.tc-content-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.tc-content-grid--overview {
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	align-items: start;
}

.tc-overview-main {
	display: grid;
	gap: 1rem;
	min-width: 0;
}

.tc-overview-side {
	min-height: 100%;
}

/* —— Buttons —— */
.tc-button {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 2.55rem;
	padding: 0.55rem 1.05rem;
	border: 1px solid var(--tc-primary);
	border-radius: var(--tc-radius);
	background: var(--tc-primary);
	color: #fff !important;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tc-button:hover {
	background: var(--tc-primary-ink);
	border-color: var(--tc-primary-ink);
}

.tc-button--secondary {
	background: #e8f6fc;
	border-color: #b7e2f5;
	color: var(--tc-primary-ink) !important;
}

.tc-button--secondary:hover {
	background: #d7f0fa;
	border-color: var(--tc-primary);
}

.tc-button--ghost {
	background: transparent;
	border-color: var(--tc-line);
	color: var(--tc-ink) !important;
}

.tc-button--ghost:hover {
	border-color: #c5ccd6;
	background: var(--tc-soft);
}

.tc-button--danger {
	background: #fff2f0;
	border-color: #ffd4cf;
	color: var(--tc-danger) !important;
}

.tc-button--alert {
	background: #dc2626;
	border-color: #dc2626;
	color: #fff !important;
}

.tc-button--alert:hover {
	background: #b91c1c;
	border-color: #b91c1c;
}

.tc-button--small {
	min-height: 2.1rem;
	padding: 0.35rem 0.7rem;
	font-size: 0.8rem;
}

.tc-button[disabled] {
	opacity: 0.65;
	cursor: wait;
}

/* —— Lists / timeline —— */
.tc-list__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.9rem;
	padding: 0.85rem 0;
	border-top: 1px solid var(--tc-line);
}

.tc-list__item:first-child {
	border-top: 0;
	padding-top: 0;
}

.tc-list__item div {
	display: grid;
	gap: 0.15rem;
}

.tc-list small,
.tc-timeline small,
.tc-table small {
	display: block;
	color: var(--tc-muted);
	font-size: 0.8rem;
}

.tc-timeline {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tc-timeline li {
	position: relative;
	display: flex;
	gap: 0.75rem;
	padding: 0 0 1rem;
}

.tc-timeline li > span {
	flex: 0 0 0.55rem;
	width: 0.55rem;
	height: 0.55rem;
	margin-top: 0.35rem;
	border-radius: 50%;
	background: var(--tc-primary);
}

.tc-timeline li:not(:last-child)::before {
	content: "";
	position: absolute;
	left: 0.22rem;
	top: 1rem;
	bottom: 0.15rem;
	border-left: 1px solid #d5dde6;
}

.tc-timeline div {
	display: grid;
	gap: 0.15rem;
}

.tc-empty-state {
	padding: 1.5rem 0.5rem;
	text-align: left;
	color: var(--tc-muted);
}

.tc-empty-state--large {
	padding: 2.5rem 0.5rem;
}

.tc-empty-state strong {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--tc-ink);
	font-size: 1rem;
}

.tc-empty-state p {
	margin: 0;
	max-width: 32rem;
	font-size: 0.92rem;
	line-height: 1.5;
}

/* —— Notices —— */
.tc-notice {
	padding: 0.9rem 1.1rem;
	border: 1px solid;
	border-radius: var(--tc-radius);
}

.tc-notice-success {
	background: #ecfdf3;
	border-color: #abefc6;
	color: #067647;
}

.tc-notice-error {
	background: #fef3f2;
	border-color: #fecdca;
	color: #b42318;
}

.tc-notice-warning,
.tc-profile-complete-notice {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	padding: 1.1rem 1.35rem;
	background: var(--tc-warn-bg);
	border: 1px solid var(--tc-warn-border);
	color: var(--tc-warn-text);
}

.tc-dashboard-shell > .tc-profile-complete-notice {
	background: linear-gradient(90deg, #fff1f0 0%, #fff7ed 100%);
}

.tc-profile-complete-notice__body {
	min-width: 0;
	flex: 1 1 auto;
}

.tc-profile-complete-notice strong {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.98rem;
	color: var(--tc-warn-text);
}

.tc-profile-complete-notice p {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.45;
}

.tc-profile-complete-list {
	margin: 0.45rem 0 0;
	padding: 0 0 0 1.1rem;
}

.tc-profile-complete-notice .tc-button {
	flex: 0 0 auto;
	white-space: nowrap;
}

/* —— Forms / tables —— */
.tc-toolbar {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin-bottom: 1.15rem;
}

.tc-search {
	flex: 1;
}

.tc-toolbar input,
.tc-toolbar select,
.tc-field input,
.tc-field textarea,
.tc-assignment-form select {
	width: 100%;
	min-height: 2.55rem;
	padding: 0.55rem 0.75rem;
	border: 1px solid #c7d0d9 !important;
	border-radius: var(--tc-radius) !important;
	background: #fff !important;
	color: var(--tc-ink);
	font: inherit;
	box-shadow: none !important;
}

.tc-toolbar select {
	width: auto;
	min-width: 9.5rem;
}

.tc-toolbar input:focus,
.tc-toolbar select:focus,
.tc-field input:focus,
.tc-field textarea:focus,
.tc-assignment-form select:focus {
	outline: 2px solid rgba(3, 169, 244, 0.25);
	border-color: var(--tc-primary) !important;
}

.tc-employees-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 20rem;
	gap: 1rem;
	align-items: start;
}

.tc-form-card {
	position: sticky;
	top: 6rem;
}

.tc-field {
	display: grid;
	gap: 0.35rem;
	margin-bottom: 0.9rem;
}

.tc-field > span {
	font-size: 0.82rem;
	font-weight: 700;
}

.tc-form-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-top: 0.35rem;
}

.tc-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1rem;
}

.tc-field--wide {
	grid-column: 1 / -1;
}

.tc-profile-form {
	display: grid;
	gap: 1rem;
}

.tc-responsive-table {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.tc-panel--credentials {
	overflow: hidden;
}

.tc-credential-group + .tc-credential-group {
	margin-top: 1.35rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--tc-line);
}

.tc-credential-group__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.tc-credential-group__header strong {
	display: block;
	font-size: 0.98rem;
	font-weight: 750;
	color: var(--tc-ink);
}

.tc-credential-group__meta {
	display: inline-block;
	margin-top: 0.15rem;
	color: var(--tc-muted);
	font-size: 0.82rem;
}

.tc-credential-group__count {
	flex: 0 0 auto;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	background: var(--tc-soft);
	color: var(--tc-muted);
	font-size: 0.75rem;
	font-weight: 700;
}

.tc-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	table-layout: fixed;
}

.tc-table--credentials {
	min-width: 0;
}

.tc-table th,
.tc-table td {
	padding: 0.85rem 0.7rem;
	border-bottom: 1px solid var(--tc-line);
	text-align: left;
	vertical-align: top;
}

.tc-table--credentials th:nth-child(1),
.tc-table--credentials td:nth-child(1) {
	width: 22%;
}

.tc-table--credentials th:nth-child(2),
.tc-table--credentials td:nth-child(2) {
	width: 34%;
}

.tc-table--credentials th:nth-child(3),
.tc-table--credentials td:nth-child(3) {
	width: 14%;
}

.tc-table--credentials th:nth-child(4),
.tc-table--credentials td:nth-child(4) {
	width: 20%;
}

.tc-table--credentials th:nth-child(5),
.tc-table--credentials td:nth-child(5),
.tc-table--credentials .tc-col-actions {
	width: 10%;
	text-align: right;
}

.tc-table th {
	color: var(--tc-muted);
	font-size: 0.72rem;
	font-weight: 750;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tc-table tbody tr:last-child td {
	border-bottom: 0;
}

.tc-table tbody tr:hover {
	background: #f8fafc;
}

.tc-table code {
	padding: 0.2rem 0.4rem;
	border-radius: 3px;
	background: var(--tc-soft);
	color: #1f2937;
	font-size: 0.8rem;
	word-break: break-all;
}

.tc-credential-program {
	display: block;
	font-size: 0.92rem;
	line-height: 1.35;
	word-break: break-word;
}

.tc-credential-stack {
	margin: 0;
	display: grid;
	gap: 0.45rem;
}

.tc-credential-stack > div {
	display: grid;
	grid-template-columns: 6.5rem minmax(0, 1fr);
	gap: 0.45rem;
	align-items: baseline;
}

.tc-credential-stack dt {
	margin: 0;
	color: var(--tc-muted);
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.tc-credential-stack dd {
	margin: 0;
	min-width: 0;
}

.tc-actions-cell {
	min-width: 0;
}

.tc-icon-actions {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.35rem;
	flex-wrap: wrap;
}

.tc-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.15rem;
	height: 2.15rem;
	padding: 0;
	border: 1px solid var(--tc-line);
	border-radius: 8px;
	background: #fff;
	color: var(--tc-ink);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tc-icon-btn svg {
	width: 1.05rem;
	height: 1.05rem;
	display: block;
}

.tc-icon-btn:hover,
.tc-icon-btn:focus-visible {
	background: var(--tc-soft);
	border-color: #cfd6df;
	color: var(--tc-primary-ink);
}

.tc-icon-btn--danger {
	color: #b42318;
}

.tc-icon-btn--danger:hover,
.tc-icon-btn--danger:focus-visible {
	background: #fff5f5;
	border-color: #f1b0b0;
	color: #912018;
}

.tc-icon-btn.is-revealed {
	background: #e8f6fc;
	border-color: #b7e3f5;
	color: var(--tc-primary-ink);
}

.tc-inline-form {
	display: inline-flex;
	margin: 0.15rem 0.25rem 0.15rem 0;
}

.tc-assignment-form {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	flex-wrap: wrap;
	margin: 0;
}

.tc-employee-cell .tc-assignment-form {
	min-width: 0;
	width: 100%;
	flex-direction: column;
	align-items: stretch;
}

.tc-employee-cell .tc-assignment-form select {
	width: 100%;
	flex: 1 1 auto;
	min-width: 0;
	max-width: none;
}

.tc-assignment-form select {
	min-width: 0;
	min-height: 2.15rem;
	padding: 0.3rem 0.5rem;
}

.tc-table--credentials .tc-inline-form {
	display: inline-flex;
	margin: 0;
}

.tc-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.4rem;
	height: 1.4rem;
	border-radius: 999px;
	background: #e8f6fc;
	color: var(--tc-primary-ink);
	font-size: 0.75rem;
	font-weight: 750;
}

.tc-filter-tabs {
	display: flex;
	gap: 0.45rem;
	overflow-x: auto;
	padding-bottom: 0.15rem;
	margin-bottom: 1rem;
}

.tc-filter-tabs a {
	white-space: nowrap;
	padding: 0.45rem 0.8rem;
	border: 1px solid var(--tc-line);
	border-radius: var(--tc-radius);
	background: #fff;
	color: #52625d;
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
}

.tc-filter-tabs a:hover,
.tc-filter-tabs a.active {
	background: var(--tc-primary);
	border-color: var(--tc-primary);
	color: #fff;
}

.tc-status {
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 0.55rem;
	border-radius: var(--tc-radius);
	background: #edf1f0;
	color: #40524d;
	font-size: 0.72rem;
	font-weight: 750;
	text-transform: capitalize;
}

.tc-status-available,
.tc-status-valid,
.tc-status-complete,
.tc-status-completed {
	background: #dcfae6;
	color: #067647;
}

.tc-status-assigned {
	background: #e0f2fe;
	color: #026aa2;
}

.tc-status-activated,
.tc-status-in_progress,
.tc-status-pending {
	background: #fef0c7;
	color: #b54708;
}

.tc-status-expired,
.tc-status-failed,
.tc-status-revoked {
	background: #fee4e2;
	color: #b42318;
}

.tc-status-refunded {
	background: #f2f4f7;
	color: #344054;
}

.tc-pagination {
	display: flex;
	justify-content: center;
	gap: 0.35rem;
	padding-top: 1.15rem;
}

.tc-pagination a {
	display: grid;
	place-items: center;
	width: 2.1rem;
	height: 2.1rem;
	border: 1px solid var(--tc-line);
	border-radius: var(--tc-radius);
	color: var(--tc-ink);
	font-weight: 700;
	text-decoration: none;
}

.tc-pagination a.active,
.tc-pagination a:hover {
	background: var(--tc-primary);
	border-color: var(--tc-primary);
	color: #fff;
}

.tc-certificate-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

.tc-certificate-card {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.2rem;
	border: 1px solid var(--tc-line);
	border-radius: var(--tc-radius);
	background: #fff;
}

.tc-certificate-card__top,
.tc-certificate-card__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.55rem;
}

.tc-certificate-icon {
	display: grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	border-radius: var(--tc-radius);
	background: #e8f6fc;
	color: var(--tc-primary-ink);
	font-size: 1.1rem;
}

.tc-certificate-card h3 {
	margin: 0.25rem 0;
	font-size: 1.05rem;
}

.tc-certificate-card p,
.tc-certificate-card small {
	margin: 0;
	color: var(--tc-muted);
}

.tc-certificate-card dl {
	margin: 0;
	border-top: 1px solid var(--tc-line);
}

.tc-certificate-card dl div {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.55rem 0;
	border-bottom: 1px solid var(--tc-line);
	font-size: 0.78rem;
}

.tc-certificate-card dt {
	color: var(--tc-muted);
}

.tc-certificate-card dd {
	margin: 0;
	font-weight: 700;
	text-align: right;
}

.tc-certificate-card__actions {
	margin-top: auto;
}

.tc-certificate-card__actions .tc-button {
	flex: 1;
}

.tc-is-loading::after {
	content: "";
	width: 0.8rem;
	height: 0.8rem;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: tc-spin 0.65s linear infinite;
}

@keyframes tc-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 1050px) {
	.tc-stat-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.tc-stat-card:nth-child(3) {
		border-right: 0;
	}

	.tc-stat-card:nth-child(n + 4) {
		border-top: 1px solid var(--tc-line);
	}

	.tc-action-grid {
		grid-template-columns: 1fr;
	}

	.tc-certificate-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 980px) {
	.tc-dashboard-app {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.tc-dashboard-sidebar {
		position: static;
		padding: 1rem;
	}

	.tc-dashboard-nav {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.35rem;
	}

	.tc-dashboard-sidebar__logout {
		margin-top: 0.35rem;
	}
}

@media (max-width: 800px) {
	.tc-dashboard-main {
		padding: 1.15rem 1.05rem 1.5rem;
	}

	.tc-content-grid,
	.tc-content-grid--overview,
	.tc-employees-layout {
		grid-template-columns: 1fr;
	}

	.tc-form-card {
		position: static;
	}

	.tc-page-heading {
		align-items: flex-start;
		flex-direction: column;
	}

	.tc-employee-list__item {
		align-items: stretch;
		flex-direction: column;
	}

	.tc-employee-list__badges {
		justify-content: flex-start;
	}

	.tc-toolbar {
		align-items: stretch;
		flex-wrap: wrap;
	}

	.tc-toolbar .tc-search {
		flex-basis: 100%;
	}

	.tc-toolbar select {
		flex: 1;
	}

	.tc-responsive-table {
		overflow: visible;
	}

	.tc-responsive-table .tc-table thead {
		display: none;
	}

	.tc-responsive-table .tc-table,
	.tc-responsive-table .tc-table tbody,
	.tc-responsive-table .tc-table tr,
	.tc-responsive-table .tc-table td {
		display: block;
		width: 100%;
	}

	.tc-responsive-table .tc-table tr {
		padding: 0.65rem 0;
		border-bottom: 1px solid var(--tc-line);
	}

	.tc-responsive-table .tc-table td {
		display: grid;
		grid-template-columns: minmax(6.5rem, 35%) 1fr;
		gap: 0.75rem;
		padding: 0.4rem 0.15rem;
		border: 0;
		text-align: right;
	}

	.tc-responsive-table .tc-table td::before {
		content: attr(data-label);
		color: var(--tc-muted);
		font-size: 0.7rem;
		font-weight: 800;
		text-align: left;
		text-transform: uppercase;
	}

	.tc-responsive-table .tc-actions-cell {
		display: flex !important;
		justify-content: flex-end;
		flex-wrap: wrap;
		min-width: 0;
	}

	.tc-table--credentials,
	.tc-table--credentials th,
	.tc-table--credentials td {
		width: auto !important;
	}

	.tc-credential-stack > div {
		grid-template-columns: 1fr;
		gap: 0.2rem;
	}

	.tc-assignment-form {
		flex-wrap: wrap;
		justify-content: flex-start;
	}

	.tc-responsive-table .tc-employee-cell .tc-assignment-form {
		width: 100%;
	}

	.tc-responsive-table .tc-employee-cell .tc-assignment-form select {
		max-width: none;
	}

	.tc-credential-group__header {
		align-items: flex-start;
		flex-direction: column;
	}

	.tc-form-grid {
		grid-template-columns: 1fr;
	}

	.tc-field--wide {
		grid-column: auto;
	}
}

@media (max-width: 570px) {
	.tc-dashboard-nav {
		grid-template-columns: 1fr;
	}

	.tc-stat-grid {
		grid-template-columns: 1fr 1fr;
	}

	.tc-stat-card {
		min-height: 6.5rem;
	}

	.tc-stat-card:nth-child(odd) {
		border-right: 1px solid var(--tc-line);
	}

	.tc-stat-card:nth-child(even) {
		border-right: 0;
	}

	.tc-stat-card:nth-child(n + 3) {
		border-top: 1px solid var(--tc-line);
	}

	.tc-action-grid,
	.tc-certificate-grid {
		grid-template-columns: 1fr;
	}

	.tc-panel {
		padding: 1rem;
	}

	.tc-certificate-card__actions {
		flex-direction: column;
	}

	.tc-certificate-card__actions .tc-button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tc-button,
	.tc-stat-card,
	.tc-action-card {
		transition: none;
	}

	.tc-is-loading::after {
		animation: none;
	}
}
