:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-muted: #f8f8f9;
  --surface-strong: #eceef0;
  --border: #dfe2e6;
  --border-strong: #c8cdd2;
  --text: #202326;
  --text-muted: #61676d;
  --text-soft: #8a9096;
  --dark: #24272a;
  --dark-hover: #17191b;
  --dark-soft: #363a3e;
  --success: #18794e;
  --success-bg: #e8f5ee;
  --warning: #9a6700;
  --warning-bg: #fff6d8;
  --danger: #b42318;
  --danger-bg: #feeceb;
  --info: #365f7d;
  --info-bg: #eaf1f6;
  --purple: #66558a;
  --purple-bg: #f0edf7;
  --radius: 6px;
  --radius-lg: 6px;
  --shadow: 0 1px 2px rgba(20, 24, 28, 0.05), 0 4px 14px rgba(20, 24, 28, 0.04);
  --sidebar: 250px;
  --font: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  font-family: var(--font);
  font-synthesis: none;
}
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:focus-visible {
  outline: 3px solid rgba(54, 95, 125, 0.25);
  outline-offset: 2px;
}
h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.app-shell {
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  width: var(--sidebar);
  flex-direction: column;
  background: #eef0f2;
  color: #4f555b;
  border-right: 1px solid var(--border);
  transition: transform 0.2s ease;
}
.brand {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  border-bottom: 1px solid #d9dde1;
  color: var(--text);
}
.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid #cfd4d9;
  border-radius: 6px;
  background: #fff;
  color: #34383c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.brand__text {
  min-width: 0;
}
.brand__text strong,
.brand__text small {
  display: block;
}
.brand__text strong {
  font-size: 14px;
}
.brand__text small {
  margin-top: 1px;
  color: #7b8289;
  font-size: 11px;
}
.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 3px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #555c63;
  transition: 0.15s ease;
}
.sidebar__link svg {
  width: 18px;
  height: 18px;
}
.sidebar__link:hover {
  background: #dfe3e6;
  color: #202326;
}
.sidebar__link.is-active {
  background: #fff;
  color: #222529;
  font-weight: 650;
  box-shadow: inset 0 0 0 1px #d8dce0;
}
.sidebar__footer {
  padding: 13px 16px;
  border-top: 1px solid #d9dde1;
  color: #737a81;
}
.sidebar__footer small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
}
.system-state {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}
.system-state i {
  width: 7px;
  height: 7px;
  border-radius: 6px;
  background: #51b982;
  box-shadow: 0 0 0 3px rgba(81, 185, 130, 0.12);
}
.sidebar-backdrop {
  display: none;
}

.app-content {
  min-height: 100vh;
  margin-left: var(--sidebar);
  transition: margin-left 0.2s ease;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}
.topbar__menu {
  display: inline-grid;
}

body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}
body.sidebar-collapsed .app-content {
  margin-left: 0;
}
.topbar__title {
  min-width: 160px;
}
.topbar__title h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.topbar__title p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}
.topbar__actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.topbar__actions form {
  margin: 0;
}
.user-chip {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-left: 1px solid var(--border);
}
.user-chip span,
.user-chip strong,
.user-chip small {
  display: block;
}
.user-chip strong {
  max-width: 180px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-chip small {
  color: var(--text-soft);
  font-size: 10px;
}
.page-content {
  padding: 20px 22px 36px;
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  line-height: 1.2;
  transition: 0.15s ease;
}
.button:hover {
  border-color: #9da3a9;
  background: var(--surface-muted);
}
.button svg {
  width: 16px;
  height: 16px;
}
.button--primary {
  border-color: var(--dark);
  background: var(--dark);
  color: #fff;
}
.button--primary:hover {
  border-color: var(--dark-hover);
  background: var(--dark-hover);
}
.button--danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}
.button--danger:hover {
  background: #8f1a12;
}
.button--ghost {
  border-color: transparent;
  background: transparent;
}
.button--small {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}
.button--block {
  width: 100%;
}
.button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}
.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}
.actions--start {
  justify-content: flex-start;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.panel + .panel {
  margin-top: 16px;
}
.panel__header {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border-bottom: 1px solid var(--border);
}
.panel__header h2,
.panel__header h3 {
  margin: 0;
  font-size: 14px;
}
.panel__header > :first-child {
  flex: 1;
}
.panel__body {
  padding: 16px;
}
.panel__body--flush {
  padding: 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.kpi {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.kpi__label {
  display: block;
  min-height: 34px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}
.kpi__value {
  display: block;
  overflow: hidden;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kpi__meta {
  display: block;
  min-height: 18px;
  margin-top: 2px;
  color: var(--text-soft);
  font-size: 11px;
}
.kpi--success {
  background: var(--success-bg);
}
.kpi--warning {
  background: var(--warning-bg);
}
.kpi--danger {
  background: var(--danger-bg);
}
.kpi--info {
  background: var(--info-bg);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.chart {
  min-height: 330px;
  padding: 8px;
}
.chart--wide {
  grid-column: 1 / -1;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.toolbar__grow {
  flex: 1 1 240px;
}
.view-switch {
  display: inline-flex;
  gap: 0;
}
.view-switch .button {
  border-radius: 6px;
  margin-left: -1px;
}
.view-switch .button:first-child {
  border-radius: 6px;
  margin-left: 0;
}
.view-switch .button:last-child {
  border-radius: 6px;
}
.view-switch .is-active {
  z-index: 1;
  border-color: var(--dark);
  background: var(--dark);
  color: #fff;
}

.field {
  display: block;
  min-width: 0;
}
.field > span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}
.field small {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 11px;
}
input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}
textarea {
  min-height: 96px;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #7b858e;
  outline: none;
  box-shadow: 0 0 0 3px rgba(54, 95, 125, 0.1);
}
input:disabled,
select:disabled,
textarea:disabled,
input[readonly] {
  background: var(--surface-muted);
  color: var(--text-muted);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.form-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.field--full {
  grid-column: 1 / -1;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}
fieldset {
  margin: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
fieldset + fieldset {
  margin-top: 14px;
}
legend {
  padding: 0 8px;
  font-weight: 700;
}
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
}
.checkbox input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}
.stack > * + * {
  margin-top: 14px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: 6px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
}
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid #eceef0;
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table tbody tr:hover {
  background: #fafafa;
}
.table a.link {
  color: var(--dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: #c2c6ca;
  text-underline-offset: 3px;
}
.table .number {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.table .muted {
  color: var(--text-muted);
  font-size: 11px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #eef0f2;
  color: #555c63;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 6px;
  background: currentColor;
}
.badge--success {
  background: var(--success-bg);
  color: var(--success);
}
.badge--warning {
  background: var(--warning-bg);
  color: var(--warning);
}
.badge--danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.badge--info {
  background: var(--info-bg);
  color: var(--info);
}
.badge--purple {
  background: var(--purple-bg);
  color: var(--purple);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 13px;
}
.card {
  position: relative;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8f9fa;
  box-shadow: var(--shadow);
}
.card:hover {
  border-color: var(--border-strong);
}
.card__eyebrow {
  color: var(--text-soft);
  font:
    700 11px ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
}
.card h3 {
  margin: 5px 0 10px;
  font-size: 14px;
}
.card__meta {
  display: grid;
  gap: 5px;
  color: var(--text-muted);
  font-size: 12px;
}
.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}
.progress {
  height: 6px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface-strong);
}
.progress > span {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--dark-soft);
}

.kanban {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 14px;
}
.kanban__column {
  display: flex;
  width: 280px;
  max-height: calc(100vh - 200px);
  flex: 0 0 280px;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #eceef0;
}
.kanban__column.is-over {
  outline: 2px solid #7c858d;
  outline-offset: 2px;
}
.kanban__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 11px;
  border-bottom: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 750;
}
.kanban__count {
  min-width: 23px;
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--surface);
  text-align: center;
}
.kanban__list {
  min-height: 68px;
  overflow-y: auto;
  padding: 8px;
}
.kanban-card {
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: grab;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.kanban-card.is-dragging {
  opacity: 0.45;
}
.kanban-card h4 {
  margin: 4px 0 7px;
  font-size: 12px;
}
.kanban-card small {
  color: var(--text-soft);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.definition-list {
  display: grid;
  grid-template-columns: minmax(110px, 0.45fr) 1fr;
  gap: 8px 12px;
  margin: 0;
}
.definition-list dt {
  color: var(--text-muted);
  font-size: 12px;
}
.definition-list dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.timeline {
  position: relative;
  margin: 0;
  padding: 0 0 0 22px;
  list-style: none;
}
.timeline::before {
  position: absolute;
  top: 5px;
  bottom: 8px;
  left: 6px;
  width: 1px;
  background: var(--border-strong);
  content: "";
}
.timeline__item {
  position: relative;
  padding: 0 0 20px;
}
.timeline__item::before {
  position: absolute;
  top: 5px;
  left: -20px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 6px;
  background: var(--dark-soft);
  box-shadow: 0 0 0 1px var(--border-strong);
  content: "";
}
.timeline__item h4 {
  margin: 0 0 3px;
  font-size: 13px;
}
.timeline__item p {
  margin: 5px 0 0;
  color: var(--text-muted);
}
.timeline__meta {
  color: var(--text-soft);
  font-size: 11px;
}

.attachment-list {
  display: grid;
  gap: 8px;
}
.attachment {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.attachment__type {
  display: grid;
  width: 40px;
  height: 36px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
}
.attachment__info {
  min-width: 0;
  flex: 1;
}
.attachment__info strong,
.attachment__info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment__info small {
  color: var(--text-soft);
}

.gantt {
  overflow: auto;
}
.gantt__table {
  min-width: 920px;
}
.gantt-bar {
  display: block;
  min-width: 5px;
  height: 18px;
  border-radius: 6px;
  background: var(--dark-soft);
}
.permission-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) repeat(5, 90px);
  align-items: center;
  border: 1px solid var(--border);
  border-bottom: 0;
}
.permission-grid > * {
  min-height: 42px;
  padding: 10px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.permission-grid > :nth-child(6n) {
  border-right: 0;
}
.permission-grid__head {
  background: var(--surface-muted);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.alert {
  margin-bottom: 15px;
  padding: 11px 13px;
  border: 1px solid #cfd5da;
  border-radius: 6px;
  background: #f5f6f7;
  color: #454b50;
}
.alert strong {
  margin-right: 5px;
}
.alert--success {
  border-color: #b7ddc9;
  background: var(--success-bg);
  color: var(--success);
}
.alert--warning {
  border-color: #ead68b;
  background: var(--warning-bg);
  color: var(--warning);
}
.alert--danger {
  border-color: #efc0bc;
  background: var(--danger-bg);
  color: var(--danger);
}
.alert--info {
  border-color: #c8d9e5;
  background: var(--info-bg);
  color: var(--info);
}
.empty-state {
  padding: 48px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  text-align: center;
}
.empty-state h1,
.empty-state h2 {
  margin-bottom: 6px;
}
.empty-state p {
  color: var(--text-muted);
}
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
}
.pagination__link {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}
.pagination__link.is-active {
  border-color: var(--dark);
  background: var(--dark);
  color: #fff;
}
.text-muted {
  color: var(--text-muted);
}
.text-danger {
  color: var(--danger);
}
.text-success {
  color: var(--success);
}
.nowrap {
  white-space: nowrap;
}
.mt-16 {
  margin-top: 16px;
}
.mb-16 {
  margin-bottom: 16px;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #e9ebed;
}
.login-card,
.install-card {
  width: min(100%, 470px);
  padding: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 55px rgba(20, 24, 28, 0.12);
}
.install-card {
  width: min(100%, 760px);
}
.brand--dark {
  margin: -24px -24px 24px;
  border-radius: 6px;
  background: var(--dark);
  color: #fff;
}
.brand--dark .brand__text small,
.brand--dark small {
  color: #c4c8cc;
}
.brand--dark .brand__mark {
  border-color: #5c6268;
  background: #34383c;
  color: #fff;
}
.login-card .brand--dark {
  min-height: auto;
  padding: 18px 24px;
}
.login-card h1 {
  margin-bottom: 6px;
  font-size: 20px;
}
.login-card > p {
  margin-bottom: 18px;
  color: var(--text-muted);
}

.auth-page--login {
  display: block;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
  background: #fff;
}
.login-layout {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  grid-template-columns: minmax(0, 2.42fr) minmax(460px, 1fr);
}
.login-presentation {
  position: relative;
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  padding: clamp(46px, 6.6vh, 68px) clamp(54px, 7vw, 104px) clamp(48px, 7vh, 76px);
  background: linear-gradient(135deg, #062744 0%, #0d3d68 100%);
  color: #fff;
  isolation: isolate;
}
.login-presentation::before {
    position: absolute;
    z-index: -1;
    right: -435px;
    bottom: -455px;
    width: 760px;
    height: 760px;
    background: radial-gradient(circle at center, rgba(29, 91, 139, 0.42) 0 34%, transparent 34% 44%, rgba(89, 162, 218, 0.13) 44% 57%, transparent 57%);
    content: "";
    pointer-events: none;
}
.login-product strong,
.login-product span {
  display: block;
}
.login-product strong {
  font-size: clamp(17px, 1.25vw, 22px);
  line-height: 1.2;
}
.login-product span {
  margin-top: 3px;
  color: #b9d9f0;
  font-size: 14px;
}
.login-presentation__content {
  width: min(760px, 90%);
  margin: auto 0;
  padding: 72px 0 48px;
}
.login-eyebrow {
  display: block;
  margin-bottom: 22px;
  color: #79c7fb;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.11em;
}
.login-presentation h1 {
    max-width: 790px;
    margin-bottom: 20px;
    font-size: 37px;
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: 1px;
}
.login-presentation__content p {
    max-width: 440px;
    margin: 0;
    color: #e4eef6;
    font-size: 17px;
    line-height: 1.65;
}
.login-presentation__footer {
  color: #85c8f2;
  font-size: 13px;
}
.login-access {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 42px clamp(34px, 5vw, 84px);
  background: #fff;
}
.login-access__content {
  width: min(100%, 390px);
}
.institution-brand {
  display: grid;
  justify-items: center;
  margin-bottom: 32px;
  color: #173b8f;
  line-height: 1;
}
.institution-brand__symbol {
  width: 96px;
  height: 70px;
  margin-bottom: -2px;
}
.institution-brand__symbol path {
  stroke: none;
}
.institution-brand__blue {
  fill: #15379b;
}
.institution-brand__green {
  fill: #009540;
}
.institution-brand__red {
  fill: #ec0029;
}
.institution-brand strong {
  padding-bottom: 4px;
  border-bottom: 2px solid #173b8f;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.institution-brand small {
  margin-top: 5px;
  font-size: 7px;
  font-weight: 800;
}
.login-heading {
  margin-bottom: 28px;
}
.login-heading h2 {
  margin-bottom: 8px;
  color: #071b2e;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.login-heading p {
  margin: 0;
  color: #61748a;
  font-size: 16px;
}
.login-alert {
  margin-bottom: 20px;
}
.login-form {
  display: grid;
  gap: 18px;
}
.login-field {
  display: grid;
  gap: 7px;
}
.login-field span {
  color: #31465a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.login-field input {
    height: 50px;
    padding: 0 16px;
    border-color: #c4d1dd;
    background: #fff;
    color: #0d2235;
    font-size: 14px;
}
.login-field input::placeholder {
  color: #7b8792;
  opacity: 1;
}
.login-field input:focus {
  border-color: #0f5f9f;
  box-shadow: 0 0 0 4px rgba(15, 95, 159, 0.11);
}
.login-submit {
    display: inline-flex;
    height: 50px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    background: #0b3b68;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s ease, transform 0.15s ease;
}
.login-submit:hover {
  background: #062c50;
}
.login-submit:active {
  transform: translateY(1px);
}
.login-submit svg {
  width: 19px;
  height: 19px;
}
.login-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 25px;
  color: #101820;
  font-size: 13px;
}
.login-help {
  position: relative;
  color: #07548f;
  font-weight: 700;
}
.login-help summary {
  cursor: pointer;
  list-style: none;
}
.login-help summary::-webkit-details-marker {
  display: none;
}
.login-help p {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 2;
  width: 245px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d7e0e8;
  border-radius: 6px;
  background: #f4f7f9;
  color: #415467;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  box-shadow: var(--shadow);
}

@media (max-width: 1100px) {
  .login-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(420px, 1fr);
  }
  .login-presentation {
    padding-inline: 48px;
  }
  .login-presentation h1 {
    font-size: clamp(42px, 5vw, 60px);
  }
}

@media (max-width: 820px) {
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-presentation {
    min-height: 320px;
    padding: 34px 36px 30px;
  }
  .login-presentation__content {
    width: 100%;
    margin-top: 48px;
    padding: 0;
  }
  .login-presentation h1 {
    max-width: 620px;
    margin-bottom: 14px;
    font-size: clamp(36px, 7.5vw, 52px);
  }
  .login-presentation__content p {
    max-width: 640px;
    font-size: 16px;
    line-height: 1.5;
  }
  .login-eyebrow {
    margin-bottom: 12px;
    font-size: 12px;
  }
  .login-presentation__footer {
    display: none;
  }
  .login-access {
    padding-block: 48px 64px;
  }
}

@media (max-width: 520px) {
  .login-presentation {
    min-height: 245px;
    padding: 26px 22px;
  }
  .login-product strong {
    font-size: 16px;
  }
  .login-product span {
    font-size: 12px;
  }
  .login-presentation__content {
    margin-top: 34px;
  }
  .login-eyebrow,
  .login-presentation__content p {
    display: none;
  }
  .login-presentation h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.05;
  }
  .login-access {
    place-items: start center;
    padding: 34px 22px 52px;
  }
  .institution-brand {
    margin-bottom: 26px;
  }
  .login-heading h2 {
    font-size: 27px;
  }
  .login-heading p {
    font-size: 14px;
  }
  .login-meta {
    font-size: 12px;
  }
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  display: grid;
  width: min(360px, calc(100vw - 36px));
  gap: 8px;
}
.toast {
  padding: 11px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--dark);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  animation: toast-in 0.2s ease;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* Memorandos: seleção múltipla acessível e comparativo de custos */
[data-single-unit][hidden],
[data-multiple-units][hidden],
.multi-select__dropdown[hidden],
.multi-select__option[hidden] {
  display: none;
}
.multi-select {
  position: relative;
  min-width: 0;
}
.multi-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.multi-select__trigger:hover,
.multi-select.is-open .multi-select__trigger {
  border-color: #7b858e;
}
.multi-select__trigger:focus-visible {
  outline: 2px solid #71869a;
  outline-offset: 2px;
}
.multi-select__chevron {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.multi-select.is-open .multi-select__chevron {
  transform: rotate(225deg) translateY(-2px);
}
.multi-select__dropdown {
  position: absolute;
  z-index: 40;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  min-width: min(360px, 90vw);
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(30, 43, 55, 0.15);
}
.multi-select__search {
  margin-bottom: 6px;
}
.multi-select__search input {
  min-height: 36px;
}
.multi-select__actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 3px 9px;
  border-bottom: 1px solid var(--border);
}
.multi-select__actions button {
  padding: 4px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.multi-select__actions button:hover {
  color: var(--text);
  text-decoration: underline;
}
.multi-select__options {
  max-height: 252px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-top: 5px;
}
.multi-select__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.multi-select__option:hover {
  background: var(--surface-muted);
}
.multi-select__option input {
  flex-shrink: 0;
  width: 16px;
  min-height: 16px;
  margin: 0;
}
.multi-select__option span {
  font-size: 13px;
  line-height: 1.4;
}
.cost-cell {
  min-width: 125px;
  white-space: nowrap;
  font-weight: 650;
}
.cost-cell.cost-over,
.cost-value.cost-over {
  background: #fce8e8;
  color: #9f2727;
}
.cost-cell.cost-within,
.cost-value.cost-within {
  background: #e7f5eb;
  color: #176c3e;
}
.cost-value {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  font-weight: 700;
}
.chart-empty {
  display: grid;
  place-items: center;
  min-height: 290px;
  padding: 25px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

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

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  body.sidebar-open .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    background: rgba(0, 0, 0, 0.35);
  }
  body.sidebar-open {
    overflow: hidden;
  }
  .app-content {
    margin-left: 0;
  }
  body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  .page-content {
    padding: 16px;
  }
  .chart-grid,
  .details-grid {
    grid-template-columns: 1fr;
  }
  .chart--wide {
    grid-column: auto;
  }
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .permission-grid {
    grid-template-columns: minmax(160px, 1fr) repeat(5, 70px);
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: 60px;
    padding: 8px 12px;
  }
  .topbar__title p,
  .user-chip,
  .topbar__actions > .button {
    display: none;
  }
  .topbar__title h1 {
    font-size: 16px;
  }
  .page-content {
    padding: 12px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .kpi {
    padding: 12px;
  }
  .kpi__value {
    font-size: 21px;
  }
  .chart {
    min-height: 280px;
  }
  .toolbar {
    align-items: stretch;
  }
  .toolbar > *,
  .toolbar .button,
  .toolbar .field {
    width: 100%;
  }
  .view-switch {
    display: flex;
  }
  .view-switch .button {
    width: auto;
    flex: 1;
  }
  .form-grid,
  .form-grid--2 {
    grid-template-columns: 1fr;
  }
  .field--full {
    grid-column: auto;
  }
  .form-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 18px -16px -16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -5px 14px rgba(0, 0, 0, 0.06);
  }
  .form-actions .button {
    flex: 1;
  }
  .table th,
  .table td {
    padding: 9px 10px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .definition-list {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .definition-list dd {
    margin-bottom: 9px;
  }
  .permission-grid {
    grid-template-columns: minmax(150px, 1fr) repeat(5, 62px);
    width: 520px;
  }
  .permission-scroll {
    overflow-x: auto;
  }
}

@media print {
  .sidebar,
  .topbar,
  .button,
  .actions,
  .toolbar,
  .pagination,
  .no-print {
    display: none !important;
  }
  .app-content {
    margin: 0;
  }
  .page-content {
    padding: 0;
  }
  body {
    background: #fff;
  }
  .panel,
  .kpi {
    box-shadow: none;
    break-inside: avoid;
  }
}
