:root {
  --ink: #171044;
  --muted: #667085;
  --line: #e4e7ec;
  --paper: #ffffff;
  --soft: #f4f7fb;
  --blue: #078ed2;
  --company-primary: #078ed2;
  --company-secondary: #d9e8f0;
  --cyan: #16b4d8;
  --green: #23b26d;
  --yellow: #f5bd3d;
  --red: #ef5b5b;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
 
  font-size: 12px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--soft);
  font-family: "Inter", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.is-hidden {
  display: none !important;
}

body:not([data-page="login"]):not(.is-app-ready) .app-shell {
  visibility: hidden;
}

body.is-app-ready .app-shell {
  visibility: visible;
}

.login-brand img,
.sidebar-brand img {
  width: 138px;
  height: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-brand span,
.eyebrow {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 520px;
  color: var(--ink);
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 0.92;
}

.form-feedback {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
}

.form-feedback.is-success {
  color: #027a48;
}

.form-feedback.is-error,
.form-feedback:not(.is-success):not(.is-hidden) {
  color: var(--red);
}

.password-form-card {
  max-width: 520px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 24px;
}

.password-form {
  display: grid;
  gap: 16px;
}

.password-form .primary-button {
  justify-self: start;
}

label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 700;
}

.label-caption {
  display: block;
  white-space: nowrap;
}

.field-required-mark {
  color: var(--red);
  margin-left: 3px;
  font-weight: 800;
  display: inline;
}

.form-section-title .field-required-mark {
  margin-left: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(7, 142, 210, 0.12);
}

.login-form button:not(.password-toggle),
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  padding: 13px 18px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(7, 142, 210, 0.22);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #667085;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: #f2f4f7;
  color: var(--blue);
  outline: none;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle svg.icon-eye-closed {
  stroke-width: 1.6;
}

.password-toggle .icon-eye-closed {
  display: none;
}

.password-toggle.is-visible .icon-eye-open {
  display: none;
}

.password-toggle.is-visible .icon-eye-closed {
  display: block;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.app-shell.is-menu-collapsed {
  grid-template-columns: 84px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: var(--company-secondary, #d9e8f0);
}

.sidebar-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--blue);
  font-size: 1.1rem;
  font-weight: 900;
}

.app-shell.is-menu-collapsed .sidebar {
  align-items: center;
  padding-inline: 12px;
}

.app-shell.is-menu-collapsed .sidebar-brand img {
  width: 46px;
}

.app-shell.is-menu-collapsed .sidebar-brand {
  flex-direction: column;
  justify-content: center;
}

.app-shell.is-menu-collapsed .nav-item,
.app-shell.is-menu-collapsed .nav-group-label {
  justify-content: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  padding: 12px;
  color: transparent;
  font-size: 0;
  gap: 0;
}

.app-shell.is-menu-collapsed .nav-item span,
.app-shell.is-menu-collapsed .nav-group-label span {
  color: var(--blue);
  font-size: 0.88rem;
}

.app-shell.is-menu-collapsed .nav-item.is-active span {
  color: #fff;
}

.app-shell.is-menu-collapsed .nav-group-label::after {
  display: none;
}

.app-shell.is-menu-collapsed .sub-nav,
.app-shell.is-menu-collapsed .sidebar-footer {
  display: none;
}

.main-nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #475467;
  padding: 12px;
  text-align: left;
  font-weight: 800;
}

.nav-item span,
.nav-group-label span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #eef6fb;
  color: var(--blue);
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group-label {
  display: flex;
  align-items: center;
  gap: 11px;
  border-radius: 8px;
  color: #475467;
  padding: 12px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.nav-group-label::after {
  content: "▾";
  margin-left: auto;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav-group.is-open .nav-group-label::after {
  content: "▴";
}

.nav-group.is-active .nav-group-label {
  background: #eef6fb;
  color: var(--blue);
}

.sub-nav {
  display: grid;
  gap: 4px;
  padding-left: 47px;
}

.nav-group:not(.is-open) .sub-nav {
  display: none;
}

.sub-nav-item {
  border-radius: 8px;
  color: #667085;
  padding: 8px 10px;
  font-size: 0.88rem;
  font-weight: 800;
}

.sub-nav-item.is-active {
  background: var(--blue);
  color: #fff;
}

.nav-item.is-active {
  background: var(--blue);
  color: #fff;
}

.nav-item.is-active span {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fbfd;
}

.sidebar-footer span,
.module-header p,
.metric-card span,
.empty-state {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.topbar h2 {
  margin-top: 4px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.workspace-userbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.module-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.profile-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  padding: 10px 14px;
  font-weight: 800;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 8px 12px 8px 8px;
  color: var(--ink);
  font-weight: 800;
}

.user-chip-link {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.user-chip-link:hover,
.user-chip-link:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 127, 252, 0.12);
  outline: none;
}

.user-chip span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #eef6fb;
  color: var(--blue);
  font-size: 0.78rem;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric-card,
.panel,
.class-details,
.calendar-panel,
.attendance-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05);
}

.metric-card {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.metric-card strong {
  font-size: 2.1rem;
}

.metric-card.danger strong {
  color: var(--red);
}

.table-count {
  justify-self: end;
  color: #344054;
  font-weight: 600;
  font-size: 0.9rem;
}

.worker-point {
  stroke: #96dce0;
}

.panel {
  padding: 20px;
}

.wide-panel {
  grid-column: 1 / -1;
}

.panel-heading,
.module-header,
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel h3,
.module-header h3 {
  font-size: 1.15rem;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 20px;
}

.donut {
  width: 168px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 68%, var(--cyan) 68% 83%, var(--yellow) 83% 93%, var(--red) 93% 100%);
  position: relative;
}

.donut::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: var(--paper);
}

.donut-center {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 2px;
}

.donut-center strong {
  font-size: 2rem;
  line-height: 1;
}

.donut-center span {
  color: var(--muted);
  font-weight: 700;
  line-height: 1;
}

.legend,
.expiring-list,
.timeline {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.legend li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #475467;
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  margin-right: 6px;
  display: inline-block;
}

.ok { background: var(--green); }

.info { background: var(--cyan); }

.warn { background: var(--yellow); }

.late { background: var(--red); }

.violet { background: #8b5cf6; }

.navy { background: #171044; }

.expiry-card,
.timeline-item,
.employee-card,
.training-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.expiry-card,
.timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border-left: 4px solid var(--blue);
}

.expiry-card .badge,
.timeline-item .badge {
  justify-content: center;
  flex: 0 0 110px;
  width: 110px;
  height: 34px;
  padding: 0 10px;
  font-size: 0.72rem;
  text-align: center;
}

.expiry-card small,
.timeline-item small,
.employee-card small,
.training-card small {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef2f7;
  color: #475467;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.badge.valido,
.badge.confirmado,
.badge.presente,
.badge.aprovado,
.badge.ativo,
.badge.concluido,
.badge.concluida,
.badge.finalizado {
  background: var(--green);
  color: #fff;
}

.badge.a-vencer,
.badge.em-andamento,
.badge.iniciado,
.badge.andamento,
.badge.pendente {
  background: var(--yellow);
  color: #533d00;
}

.badge.matriculado,
.badge.aberto,
.badge.aberta,
.badge.nao-iniciado {
  background: #e8f3fc;
  color: #2563a8;
}

.badge.turma-pendente {
  background: #f97316;
  color: #fff;
}

.badge.modalidade-presencial {
  background: var(--green);
  color: #fff;
}

.badge.modalidade-online {
  background: var(--yellow);
  color: #533d00;
}

.badge.modalidade-hibrido {
  background: var(--red);
  color: #fff;
}

.badge.categoria-formacao {
  background: #e8f7ee;
  border: 1px solid #c6ead4;
  color: #1f7a45;
  font-weight: 800;
}

.badge.categoria-reciclagem {
  background: #e8f3fc;
  border: 1px solid #c8dff3;
  color: #2563a8;
  font-weight: 800;
}

.badge.vencido,
.badge.ausente,
.badge.reprovado,
.badge.bloqueado,
.badge.cancelado,
.badge.cancelada,
.badge.inativo {
  background: var(--red);
  color: #fff;
}

.module-header {
  margin-bottom: 18px;
  align-items: flex-end;
}

.page-heading {
  width: 100%;
  margin-bottom: 18px;
}

.page-controls {
  width: 100%;
  margin-bottom: 18px;
}

.class-page-heading,
.attendance-page-heading,
.contractor-page-heading,
.role-page-heading,
.user-page-heading {
  width: 100%;
}

.module-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.page-controls .module-actions.toolbar-row-3 {
  grid-template-columns: minmax(0, 1fr) max-content max-content;
}

.page-controls .module-actions.toolbar-row-4 {
  grid-template-columns: minmax(140px, 1fr) minmax(0, 1.5fr) max-content max-content;
}

.page-controls .module-actions.toolbar-row-3 > input,
.page-controls .module-actions.toolbar-row-4 > input {
  width: 100%;
  min-width: 0;
}

.page-controls .module-actions.toolbar-row-3 > select,
.page-controls .module-actions.toolbar-row-4 > select {
  width: auto;
  min-width: 120px;
}

.page-controls .module-actions.toolbar-row-3 > .primary-button,
.page-controls .module-actions.toolbar-row-4 > .primary-button {
  width: auto;
  white-space: nowrap;
  justify-self: end;
}

.view-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.secondary-button.is-active {
  border-color: var(--blue);
  background: rgba(7, 142, 210, 0.1);
  color: var(--blue);
}

.module-header > div:first-child:not(.module-title-row) {
  display: grid;
  gap: 6px;
}

.module-title-row,
.module-header > .module-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: none;
  flex-direction: row;
}

.module-header input {
  max-width: 360px;
}

.filters {
  display: flex;
  gap: 10px;
  min-width: min(520px, 100%);
}

#certificateRows .badge {
  justify-content: center;
  min-width: 92px;
  height: 32px;
  padding: 0 12px;
  text-align: center;
  text-transform: lowercase;
}

.table-action {
  display: inline-flex;
  justify-content: center;
  min-width: 76px;
  border: 1px solid #c9e7f4;
  border-radius: 8px;
  color: var(--blue);
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 900;
}

.linked-preview {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.local-mode-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff7e6;
  border: 1px solid #f5d08a;
  color: #7a4b00;
  font-size: 0.92rem;
}

.local-mode-notice strong {
  font-weight: 800;
}

.rating-stars {
  color: var(--yellow);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.print-certificate-button {
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  padding: 8px 10px;
  font-weight: 900;
  text-decoration: none;
  display: inline-block;
}

.muted-action {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.registration-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.compact-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.compact-form .primary-button {
  margin-top: 4px;
}

.registration-layout .page-controls input {
  max-width: 440px;
}

.employee-grid,
.training-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.employee-card,
.training-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.employee-card header,
.training-card header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.card-link {
  display: inline-flex;
  justify-content: center;
  border: 1px solid #c9e7f4;
  border-radius: 8px;
  color: var(--blue);
  padding: 10px 12px;
  font-weight: 900;
}

.chip {
  border: 1px solid #c9e7f4;
  border-radius: 999px;
  background: #f1fbff;
  color: #126f9d;
  padding: 6px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

.chip.is-expired {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.chip-aso {
  border-color: #bbf7d0;
  background: #ecfdf3;
  color: #027a48;
}

.chip-aso-a-vencer {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.chip-aso-vencido,
.chip-aso-sem-cadastro {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b42318;
}

.ead-course-card .training-card-actions {
  margin-top: auto;
  width: 100%;
}

.ead-course-card .training-card-actions .card-link {
  width: 100%;
  box-sizing: border-box;
}

.detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.detail-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.detail-actions-group .secondary-button {
  padding: 12px 18px;
  line-height: 1.2;
  white-space: nowrap;
}

.danger-button,
.detail-actions .danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: #dc2626;
  color: #fff;
  padding: 13px 18px;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.22);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.danger-button:hover {
  background: #b91c1c;
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.28);
}

.danger-button:active {
  transform: translateY(1px);
}

.danger-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  box-shadow: none;
}

.employee-summary-card,
.mini-stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05);
}

.mini-stat {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
}

.mini-stat span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.mini-stat strong {
  font-size: 2rem;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.tab-button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 12px 10px;
  font-weight: 900;
  white-space: nowrap;
}

.tab-button.is-active {
  border-bottom-color: var(--blue);
  color: var(--ink);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 18px;
}

input.is-loading {
  cursor: wait;
  opacity: 0.7;
}

.form-section-title {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 1rem;
}

.form-section-autor {
  grid-column: 1 / -1;
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-section-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.form-section-help {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.modulos-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 20px;
}

.modulo-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.modulo-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.modulo-checkbox.is-disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.form-row-inline {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.form-row-inline.form-row-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid > .field-hint {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.color-field {
  display: grid;
  gap: 8px;
}

.color-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 8px 12px;
}

.color-picker-native {
  width: 42px;
  height: 30px;
  flex: 0 0 42px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.color-hex-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.color-hex-input:focus {
  outline: none;
}

.readonly-grid {
  background: #f8fafc;
}

.readonly-grid input[readonly],
.readonly-grid select:disabled {
  border-color: #e1e7ef;
  background: #f3f6fa;
  color: #475467;
  cursor: default;
  opacity: 1;
}

.company-preview {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05);
}

.company-preview-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.company-preview-brand h3 {
  margin-top: 4px;
  font-size: 1.2rem;
}

.company-preview-brand p:last-child {
  margin-top: 4px;
  color: var(--muted);
  max-width: 44rem;
}

.company-preview-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.company-preview-meta div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e9edf3;
}

.company-preview-meta span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.company-preview-meta strong {
  color: var(--ink);
  font-size: 0.92rem;
  word-break: break-word;
}

.readonly-grid input[readonly]:focus,
.readonly-grid select:disabled:focus {
  border-color: #e1e7ef;
  box-shadow: none;
}

input[type="file"] {
  padding: 10px;
}

.badge-courses-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.badge-courses-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  overflow: hidden;
}

.badge-courses-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 90px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.badge-courses-row:last-child {
  border-bottom: 0;
}

.badge-courses-head {
  background: #f8fbfd;
  color: #475467;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-courses-name {
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 700;
  word-break: break-word;
}

.badge-courses-date {
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.badge-courses-date.is-expired,
.badge-courses-row.is-expired .badge-courses-name {
  color: #dc2626;
  font-weight: 700;
}

.badge-courses-status {
  justify-self: end;
}

.badge-courses-actions {
  display: flex;
  justify-content: flex-end;
}

.badge-pdf-button {
  width: auto;
  justify-content: center;
}

.no-shadow {
  box-shadow: none;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 13px;
}

.text-preserve-breaks {
  white-space: pre-wrap;
  word-break: break-word;
}

#classStaffFields {
  display: contents;
}

.form-hint {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.file-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  background: #f8fafc;
}

.signature-with-date {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.signature-with-date .signature-date {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.field-help {
  grid-column: 1 / -1;
  margin-top: -8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.file-list-field {
  grid-column: 1 / -1;
}

.file-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px dashed #c7d7e3;
  border-radius: 8px;
  background: #fbfdff;
  color: var(--muted);
}

.signature-preview-card {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.signature-preview-card img {
  max-width: 240px;
  max-height: 110px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.attachment-list {
  margin: 0;
  padding-left: 20px;
  color: var(--ink);
}

.form-actions-row {
  display: flex;
  align-items: end;
  gap: 10px;
}

.form-actions-row .link-button {
  margin: 0;
  display: inline-flex;
}

.video-materials {
  margin-top: 10px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.video-materials > strong {
  display: block;
  margin-bottom: 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.video-materials-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.video-material-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.video-material-link {
  min-width: 0;
  color: var(--blue);
  font-weight: 600;
  word-break: break-word;
}

.video-material-empty {
  margin: 0;
  font-size: 0.92rem;
}

.inline-filter {
  max-width: 360px;
  margin-top: 12px;
}

.curriculum-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.curriculum-list div {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 13px;
}

.curriculum-list span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #eef6fb;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.curriculum-edit-item {
  display: flex !important;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 12px;
}

.curriculum-edit-item span {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
}

.curriculum-edit-item input {
  min-width: 0;
  flex: 1;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px;
  text-align: left;
}

th {
  background: #f8fbfd;
  color: #475467;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday-row {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
}

.day-cell {
  min-height: 138px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 8px;
}

.day-cell.is-muted {
  opacity: 0.45;
}

.day-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 99px;
  font-size: 0.84rem;
  font-weight: 900;
}

.today .day-number {
  background: var(--blue);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

.employee-toggle,
.attendance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fbfcfe;
}

.attendance-signature-cell .signature-link-button {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.employee-picker-hint {
  margin: 2px 0 8px;
  color: var(--muted);
}

.employee-toggle button[data-signature-link] {
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
}

.employee-toggle button {
  width: auto;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.employee-toggle button[data-add-class-student],
.employee-toggle button[data-add-employee],
.employee-toggle button[data-add-training-student],
.employee-toggle button[data-add-enrollment] {
  background: var(--blue);
  color: #fff;
}

.employee-toggle button[data-remove-employee],
.employee-toggle button[data-remove-enrolled],
.employee-toggle button[data-remove-class-student] {
  background: var(--red);
  color: #fff;
}

.employee-toggle button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 38, 0.46);
}

.modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(760px, 88vh);
  overflow: auto;
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
  padding: 22px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
}

.signature-img {
  width: 160px;
  height: 54px;
  object-fit: contain;
  justify-self: center;
}

.signature-pending {
  justify-self: center;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

@media print {
  .sidebar,
  .page-heading,
  .page-controls {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .workspace {
    padding: 0;
  }

  body {
    background: #fff;
  }
}

@media (max-width: 1100px) {
  .login-screen,
  .app-shell,
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .app-shell.is-menu-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .app-shell.is-menu-collapsed .sidebar {
    align-items: stretch;
  }

  .main-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-grid,
  .employee-grid,
  .training-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .company-preview-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .employee-detail-hero,
  .form-grid,
  .form-row-inline,
  .badge-card-layout,
  .training-detail-hero,
  .training-detail-grid,
  .registration-layout {
    grid-template-columns: 1fr;
  }

  .module-actions {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  .page-controls .module-actions.toolbar-row-3 {
    grid-template-columns: minmax(0, 1fr) max-content max-content;
  }

  .page-controls .module-actions.toolbar-row-4 {
    grid-template-columns: minmax(120px, 1fr) minmax(0, 1fr) max-content max-content;
  }
}

@media (max-width: 720px) {
  .workspace,
  .login-panel {
    padding: 20px;
  }

  .main-nav,
  .metric-grid,
  .dashboard-grid,
  .dashboard-report-grid,
  .dashboard-stat-grid,
  .dashboard-list-grid,
  .dashboard-training-hours-grid,
  .training-hours-code-layout,
  .training-hours-mode-layout,
  .employee-grid,
  .training-grid,
  .attendance-summary,
  .import-overview-grid,
  .import-page-grid,
  .filters,
  .donut-wrap,
  .expiration-donut-layout {
    grid-template-columns: 1fr;
  }

  .sub-nav {
    padding-left: 35px;
  }

  .module-header,
  .topbar,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    display: grid;
    width: 100%;
  }

  .module-actions,
  .detail-actions,
  .list-row {
    align-items: stretch;
  }

  .module-actions {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .page-controls .module-actions.toolbar-row-3,
  .page-controls .module-actions.toolbar-row-4 {
    grid-template-columns: 1fr;
  }

  .page-controls .module-actions.toolbar-row-3 > .primary-button,
  .page-controls .module-actions.toolbar-row-4 > .primary-button {
    justify-self: stretch;
  }

  .company-preview-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .company-preview-meta {
    grid-template-columns: 1fr;
  }

  .signature-img {
    justify-self: start;
  }

  .module-title-row {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .module-title-row .topbar-actions {
    margin-left: auto;
  }

  .weekday-row,
  .calendar-grid {
    gap: 4px;
  }

  .day-cell {
    min-height: 92px;
    padding: 5px;
  }
}

.prova-panel .panel-heading {
  align-items: flex-start;
  gap: 16px;
}

.prova-panel .panel-heading .module-actions {
  display: flex;
  width: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.prova-panel .panel-heading .module-actions > button {
  width: auto;
  white-space: nowrap;
}

.prova-questions-list {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.prova-alternativas-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.prova-alternative-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.prova-alternative-item input[type="radio"] {
  width: auto;
}

.prova-question-card .form-grid {
  margin-top: 12px;
}

.page-controls .select2-container,
.filters .select2-container,
.attendance-controls .select2-container {
  width: 100% !important;
  min-width: 0;
}

.page-controls .select2-container--default .select2-selection--single,
.filters .select2-container--default .select2-selection--single,
.attendance-controls .select2-container--default .select2-selection--single {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
}

.page-controls .select2-container--default .select2-selection--single .select2-selection__rendered,
.filters .select2-container--default .select2-selection--single .select2-selection__rendered,
.attendance-controls .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--text);
  line-height: 40px;
  padding-left: 12px;
  padding-right: 28px;
}

.page-controls .select2-container--default .select2-selection--single .select2-selection__arrow,
.filters .select2-container--default .select2-selection--single .select2-selection__arrow,
.attendance-controls .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 40px;
  right: 8px;
}

.page-controls .select2-container--default.select2-container--focus .select2-selection--single,
.filters .select2-container--default.select2-container--focus .select2-selection--single,
.attendance-controls .select2-container--default.select2-container--focus .select2-selection--single,
.page-controls .select2-container--default.select2-container--open .select2-selection--single,
.filters .select2-container--default.select2-container--open .select2-selection--single,
.attendance-controls .select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7, 142, 210, 0.12);
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: var(--blue);
}

.select2-dropdown {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.filters label .select2-container {
  margin-top: 6px;
}

.form-grid input[readonly] {
  border-color: #e1e7ef;
  background: #f3f6fa;
  color: #475467;
  cursor: default;
}

.form-grid input[readonly]:focus {
  border-color: #e1e7ef;
  box-shadow: none;
}

.form-grid .select2-container {
  width: 100% !important;
  min-width: 0;
}

.form-grid .select2-container--default .select2-selection--single {
  height: auto;
  min-height: 45px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  display: flex;
  align-items: center;
}

.form-grid .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--ink);
  line-height: 1.4;
  padding-left: 14px;
  padding-right: 30px;
}

.form-grid .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100%;
  top: 0;
  right: 8px;
}

.form-grid .select2-container--default.select2-container--focus .select2-selection--single,
.form-grid .select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7, 142, 210, 0.12);
}

.app-toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10000;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.app-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 15px 18px;
  border-radius: 12px;
  border: 1px solid #86efac;
  border-left: 4px solid #22c55e;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf3 100%);
  color: #14532d;
  box-shadow: 0 16px 34px rgba(22, 101, 52, 0.18);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
  max-width: min(380px, calc(100vw - 40px));
  animation: app-toast-in 0.24s ease;
  cursor: pointer;
}

.app-toast.is-create {
  border-color: #86efac;
  border-left-color: #22c55e;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf3 100%);
  color: #14532d;
  box-shadow: 0 16px 34px rgba(22, 101, 52, 0.18);
}

.app-toast.is-create .app-toast-icon {
  background: #22c55e;
}

.app-toast.is-edit {
  border-color: #93c5fd;
  border-left-color: #3b82f6;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e3a8a;
  box-shadow: 0 16px 34px rgba(30, 64, 175, 0.16);
}

.app-toast.is-edit .app-toast-icon {
  background: #3b82f6;
}

.app-toast.is-delete {
  border-color: #fca5a5;
  border-left-color: #ef4444;
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  color: #991b1b;
  box-shadow: 0 16px 34px rgba(153, 27, 27, 0.16);
}

.app-toast.is-delete .app-toast-icon {
  background: #ef4444;
}

.app-toast-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.app-toast-text {
  flex: 1 1 auto;
  padding-top: 1px;
}

.app-toast.is-leaving {
  animation: app-toast-out 0.2s ease forwards;
}

@keyframes app-toast-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes app-toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

.certificate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ead-modules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.ead-lesson-row {
  display: block;
  align-items: stretch;
}

.ead-lesson-main {
  width: 100%;
}

.ead-lesson-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.employee-photo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  background: #eef6fb;
}

.employee-photo.large {
  width: 82px;
  height: 82px;
  flex-basis: 82px;
}

.employee-photo.pass-photo {
  width: 82px;
  height: 82px;
  margin: 18px auto 10px;
  border: 2px solid rgba(255, 255, 255, 0.72);
}

.employee-identity {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.employee-identity .employee-photo {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.employee-identity span {
  min-width: 0;
}

.employee-schedule-week {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}

.employee-schedule-day {
  display: grid;
  grid-template-columns: minmax(150px, 180px) minmax(0, 1fr);
  gap: 12px 16px;
  align-items: end;
  padding: 8px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.employee-schedule-day:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.employee-schedule-day-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  min-height: 46px !important;
  margin-bottom: 0;
}

.employee-schedule-day-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
}

.employee-schedule-day .employee-schedule-times.form-row-inline {
  margin: 0;
  grid-column: auto;
}

.employee-schedule-readonly .employee-schedule-day-toggle {
  cursor: default;
}

.employee-picker {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

#enrollmentPickerWrap > .employee-picker:first-child {
  margin-top: 0;
}

.employee-picker-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.employee-picker-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.employee-picker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.employee-picker-actions input[type="search"] {
  min-width: 220px;
}

.employee-toggle-info {
  flex: 1;
  min-width: 0;
}

.employee-toggle-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.employee-toggle-actions .badge {
  flex-shrink: 0;
}

.history-filters {
  display: grid;
  grid-template-columns:
    minmax(150px, 1.1fr)
    minmax(150px, 1.1fr)
    minmax(260px, 2.2fr)
    minmax(130px, 0.95fr)
    minmax(132px, 0.85fr)
    minmax(132px, 0.85fr);
  gap: 10px;
  width: 100%;
  min-width: 0;
  align-items: end;
}

.history-filters label {
  min-width: 0;
}

.history-filters label select,
.history-filters label input {
  width: 100%;
  min-width: 0;
}

.training-point {
  stroke: #7b7ec2;
}

.training-page-heading {
  width: 100%;
}

.training-page-heading + .page-controls:has(.training-filter-actions) {
  width: 100%;
}

.training-page-heading + .page-controls {
  width: min(360px, 100%);
}

.training-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.training-facts div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  padding: 14px;
  align-self: start;
}

.training-facts span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.training-facts strong {
  display: block;
  margin-top: 6px;
  font-size: 1.2rem;
}

.class-form-grid {
  margin-bottom: 18px;
}

.class-pill {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 7px;
  background: #eaf7fc;
  color: #075e86;
  padding: 7px;
  text-align: left;
  font-size: 0.76rem;
  font-weight: 900;
}

@media (max-width: 900px) {
  .employee-schedule-day {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .employee-schedule-day-toggle {
    min-height: auto !important;
  }

  .employee-schedule-times.form-row-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .history-filters {
    grid-template-columns: 1fr;
  }

  .class-pill {
    font-size: 0.68rem;
    padding: 5px;
  }

  .training-facts {
    grid-template-columns: 1fr;
  }
}
