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

/* =====================================================
   CONTROLE CENTRAL: mude os valores aqui
   (todas as classes e variáveis usam o prefixo tb-)
   ===================================================== */
:root {
  /* Fontes */
  --tb-font-title: Sora, 'Segoe UI', sans-serif;
  --tb-font-text: Inter, 'Segoe UI', sans-serif;

  /* Tamanhos */
  --tb-size-title: 14px;      /* "Acesso Restrito" */
  --tb-size-label: 10px;      /* rótulos */
  --tb-size-muted: 10px;      /* "Versão" */
  --tb-size-btn: 10px;        /* botões */
  --tb-field-size: 10px;      /* campos (ComboBox e Edit) */

  /* Campos */
  --tb-field-weight: 400;
  --tb-field-color: #0b2545;
  --tb-field-placeholder: #9aa8ba;
  --tb-field-bg: #f7fafc;
  --tb-field-border: #d3dce7;
  --tb-field-focus: #1aa7c9;
  --tb-field-radius: 8px;

  /* Cores gerais */
  --tb-navy: #0b2545;
  --tb-navy2: #0a3a6b;
  --tb-cyan: #1aa7c9;
  --tb-muted: #6b7a90;
}

/* =====================================================
   FUNDO E CARTÃO
   ===================================================== */
.tb-bg { background: #eef3f8 !important; }

.tb-card {
  background: #fff !important;
  border: 1px solid var(--tb-field-border) !important;
  border-radius: 14px;
  box-shadow: 0 20px 50px -20px rgba(6, 40, 77, .35);
}

.tb-captcha { background: var(--tb-field-bg); border-radius: 8px; }

/* =====================================================
   TÍTULOS E RÓTULOS (sobrescrevem o Font do Delphi)
   ===================================================== */
.tb-title {
  font-family: var(--tb-font-title) !important;
  font-size: var(--tb-size-title) !important;
  font-weight: 700 !important;
  color: var(--tb-navy) !important;
  text-decoration: none !important;
}
.tb-label {
  font-family: var(--tb-font-text) !important;
  font-size: var(--tb-size-label) !important;
  font-weight: 600 !important;
  color: var(--tb-navy) !important;
  text-decoration: none !important;
}
.tb-muted {
  font-family: var(--tb-font-text) !important;
  font-size: var(--tb-size-muted) !important;
  font-weight: 400 !important;
  color: var(--tb-muted) !important;
}

/* =====================================================
   CAMPOS: ComboBox e Edit (Cls = tb-field)
   ===================================================== */
.tb-field,
.tb-field .x-form-text-wrap,
.tb-field .x-form-text,
.tb-field .x-form-field,
.tb-field input {
  font-family: var(--tb-font-text) !important;
  font-size: var(--tb-field-size) !important;
  font-weight: var(--tb-field-weight) !important;
  color: var(--tb-field-color) !important;
}

/* Fundo (tira o amarelo) */
.tb-field .x-form-text-wrap,
.tb-field .x-form-trigger-wrap,
.tb-field .x-form-text,
.tb-field input,
.tb-field .x-form-trigger {
  background: var(--tb-field-bg) !important;
}

/* Borda: Edit comum (senha) */
.tb-field .x-form-text-wrap {
  border: 1px solid var(--tb-field-border) !important;
  border-radius: var(--tb-field-radius) !important;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}

/* Borda: ComboBox (campo + seta num bloco só, arredondado) */
.tb-field .x-form-trigger-wrap {
  border: 1px solid var(--tb-field-border) !important;
  border-radius: var(--tb-field-radius) !important;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.tb-field .x-form-trigger-wrap .x-form-text-wrap {
  border: 0 !important;
  box-shadow: none !important;
}
.tb-field .x-form-trigger { border: 0 !important; }

/* Foco */
.tb-field:focus-within .x-form-text-wrap,
.tb-field:focus-within .x-form-trigger-wrap {
  border-color: var(--tb-field-focus) !important;
  box-shadow: 0 0 0 3px rgba(26, 167, 201, .25) !important;
}
.tb-field:focus-within .x-form-trigger-wrap .x-form-text-wrap {
  border: 0 !important;
  box-shadow: none !important;
}

.tb-field input::placeholder {
  color: var(--tb-field-placeholder) !important;
  font-size: var(--tb-field-size) !important;
}
.tb-field.x-item-disabled { opacity: .6; }

/* Lista que abre no ComboBox */
.x-boundlist-item {
  font-family: var(--tb-font-text) !important;
  font-size: var(--tb-field-size) !important;
  font-weight: var(--tb-field-weight) !important;
  color: var(--tb-field-color) !important;
}

/* Tamanho por campo: Cls = 'tb-field tb-s12' */
.tb-s8  { --tb-field-size: 8px; }
.tb-s10 { --tb-field-size: 10px; }
.tb-s12 { --tb-field-size: 12px; }
.tb-s14 { --tb-field-size: 14px; }

/* =====================================================
   BOTÕES
   ===================================================== */
.tb-btn.x-btn {
  border-radius: 8px !important;
  background: transparent !important;
  background-image: none !important;
  border: 1px solid var(--tb-field-border) !important;
  box-shadow: none !important;
}
.tb-btn .x-btn-inner {
  font-family: var(--tb-font-text) !important;
  font-size: var(--tb-size-btn) !important;
  font-weight: 600 !important;
  color: var(--tb-navy) !important;
}

/* Botão principal (Conectar) */
.tb-btn-primary.x-btn {
  background: linear-gradient(135deg, var(--tb-navy2), var(--tb-cyan)) !important;
  border: 0 !important;
}
.tb-btn-primary .x-btn-inner { color: #fff !important; }

/* "Mudar Usuário": só texto */
.tb-btn-link.x-btn {
  border: 0 !important;
  background: transparent !important;
}
.tb-btn-link .x-btn-inner {
  color: var(--tb-navy2) !important;
  font-size: var(--tb-size-btn) !important;
}

/* =====================================================
   REFORÇO DO COMBOBOX ARREDONDADO
   ===================================================== */
html body .tb-field .x-form-trigger-wrap,
html body .tb-field .x-form-trigger-wrap-default,
html body .tb-field .x-form-trigger-wrap-focus,
html body .tb-field .x-form-trigger-wrap-invalid {
  border: 1px solid var(--tb-field-border) !important;
  border-radius: var(--tb-field-radius) !important;
  overflow: hidden !important;
}
html body .tb-field .x-form-trigger-wrap .x-form-text-wrap,
html body .tb-field .x-form-text,
html body .tb-field input {
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
}
html body .tb-field .x-form-trigger { border: 0 !important; background-color: var(--tb-field-bg) !important; }
