@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* ===== Tokens de marca (Lumo) ===== */
html {
  --lumo-font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --lumo-primary-color: #0a3d62;
  --lumo-primary-color-50pct: rgba(10, 61, 98, 0.5);
  --lumo-primary-color-10pct: rgba(10, 61, 98, 0.12);
  --lumo-primary-text-color: #0a3d62;
  --lumo-body-text-color: #0f1b2d;
  --lumo-header-text-color: #0f1b2d;
  --lumo-secondary-text-color: #64748b;
  --lumo-border-radius-s: 8px;
  --lumo-border-radius-m: 10px;
  --lumo-border-radius-l: 14px;
}

body {
  background: #f1f5f9;
}

/* ===== Cores da marca como variáveis utilitárias ===== */
html {
  --hds-navy: #0a3d62;
  --hds-navy-dark: #072a42;
  --hds-navy-darker: #062338;
  --hds-blue: #2f7ed1;
  --hds-blue-soft: #7fb3e6;
  --hds-line: #e2e8f0;
}

/* ===== App shell (AppLayout) ===== */
vaadin-app-layout {
  background: #f1f5f9;
}
vaadin-app-layout::part(navbar) {
  background: #ffffff;
  border-bottom: 1px solid var(--hds-line);
  min-height: 64px;
  padding: 0 24px 0 8px;
}
vaadin-app-layout::part(drawer) {
  background: linear-gradient(180deg, #0a3d62 0%, #072a42 100%);
  border-inline-end: none;
  padding: 0;
}

/* ===== Sidebar ===== */
.hds-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 248px;
  padding: 24px 16px;
  color: #cfe0f0;
  box-sizing: border-box;
}
.hds-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 10px 26px;
}
.hds-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--hds-navy);
  letter-spacing: -0.5px;
}
.hds-brand__name {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  color: #fff;
}
.hds-brand__sub {
  font-size: 10.5px;
  color: var(--hds-blue-soft);
  letter-spacing: 0.5px;
}
.hds-menu-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #5b88b3;
  padding: 0 12px 10px;
  text-transform: uppercase;
}
.hds-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hds-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 9px;
  color: #a9c4dd;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.hds-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.hds-nav-item--active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
}
.hds-nav-item vaadin-icon {
  width: 18px;
  height: 18px;
}
.hds-sidebar__user {
  margin-top: auto;
  padding: 14px 12px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 11px;
}
.hds-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--hds-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.hds-sidebar__user-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.hds-sidebar__user-role {
  font-size: 11px;
  color: var(--hds-blue-soft);
}

/* ===== Header ===== */
.hds-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.hds-breadcrumb {
  font-size: 14px;
  color: #64748b;
}
.hds-breadcrumb__sep {
  color: #cbd5e1;
  margin: 0 6px;
}
.hds-breadcrumb__link {
  color: #64748b;
  cursor: pointer;
}
.hds-breadcrumb__link:hover {
  color: #0f1b2d;
  text-decoration: underline;
}
.hds-breadcrumb__current {
  color: #0f1b2d;
  font-weight: 600;
}
.hds-header__right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hds-header__user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hds-header__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--hds-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
}
.hds-header__user-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f1b2d;
}
.hds-header__user-mail {
  font-size: 11.5px;
  color: #94a3b8;
}

/* ===== Página / conteúdo ===== */
.hds-page {
  padding: 28px 32px;
}
.hds-page__title {
  font-size: 24px;
  font-weight: 700;
  color: #0f1b2d;
  margin: 0;
  letter-spacing: -0.4px;
}
.hds-page__subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 6px 0 0;
}
.hds-back {
  font-size: 13px;
}

/* ===== Cartões de estatística ===== */
.hds-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 22px 0;
  width: 100%;
}
.hds-stat-card {
  background: #fff;
  border: 1px solid var(--hds-line);
  border-radius: 14px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.hds-stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--hds-stat-accent, var(--hds-navy));
}
.hds-stat-card__value {
  font-size: 28px;
  font-weight: 700;
  color: #0f1b2d;
  line-height: 1;
}
.hds-stat-card__label {
  font-size: 13px;
  color: #64748b;
  margin-top: 8px;
}

/* ===== Cartão genérico (grid wrapper) ===== */
.hds-card {
  background: #fff;
  border: 1px solid var(--hds-line);
  border-radius: 14px;
  padding: 8px;
}

/* ===== Diálogo de código de autorização ===== */
.hds-code-dialog {
  display: flex;
  flex-direction: column;
  min-width: 320px;
}
.hds-code-field-label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hds-code-field-value {
  font-size: 14px;
  color: #0f1b2d;
  margin: 2px 0 12px;
  word-break: break-all;
}
.hds-code-box {
  margin-top: 4px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}
.hds-code-box__label {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.hds-code-box__value {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: 10px;
  color: #0a3d62;
  font-variant-numeric: tabular-nums;
}

/* ===== Login ===== */
.hds-login {
  display: flex;
  min-height: 100vh;
  background: #f1f5f9;
}
.hds-login__brand {
  flex: 1.15;
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #0a3d62 0%, #062338 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 60px 56px;
  color: #fff;
}
.hds-login__circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.hds-login__circle--1 { width: 460px; height: 460px; top: -160px; right: -120px; }
.hds-login__circle--2 { width: 300px; height: 300px; top: -80px; right: -30px; }
.hds-login__glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 144, 217, 0.18) 0%, rgba(74, 144, 217, 0) 70%);
  bottom: -220px;
  left: -160px;
}
.hds-login__brand-top {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hds-login__logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: var(--hds-navy);
  letter-spacing: -0.5px;
}
.hds-login__brand-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 3px;
}
.hds-login__brand-sub {
  font-size: 12px;
  color: var(--hds-blue-soft);
  letter-spacing: 1px;
}
.hds-login__brand-mid {
  position: relative;
  max-width: 420px;
}
.hds-login__eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--hds-blue-soft);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hds-login__headline {
  font-size: 34px;
  line-height: 1.18;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
}
.hds-login__lead {
  font-size: 15px;
  line-height: 1.6;
  color: #b9d2ec;
  margin: 0;
}
.hds-login__address {
  position: relative;
  font-size: 12.5px;
  line-height: 1.7;
  color: #86a9cc;
}
.hds-login__form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.hds-login__form {
  width: 100%;
  max-width: 368px;
}
.hds-login__form-title {
  font-size: 26px;
  font-weight: 700;
  color: #0f1b2d;
  margin: 0 0 8px;
  letter-spacing: -0.4px;
}
.hds-login__form-subtitle {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 28px;
}
.hds-login__form vaadin-text-field,
.hds-login__form vaadin-password-field {
  width: 100%;
}
.hds-login__form vaadin-text-field::part(input-field),
.hds-login__form vaadin-password-field::part(input-field) {
  background: #fff;
  border: 1px solid #d6dee8;
  border-radius: 10px;
  box-shadow: none;
}
.hds-login__error {
  display: block;
  color: #dc2626;
  font-size: 13px;
  margin-bottom: 12px;
}
.hds-login__submit {
  width: 100%;
  margin-top: 10px;
}

/* ===== Responsivo ===== */
@media (max-width: 840px) {
  .hds-login__brand { display: none; }
}
