/*
 * eSuite Roadmap — Forgejo Institutional Theme
 * Target: Forgejo 15.0.10
 * Identity: eSuite.one white branding
 * Reference: eMercado/eSuite Executive Roadmap
 *
 * External stylesheet loaded by custom/header.tmpl.
 * Does not modify Forgejo application source.
 */

:root {
  color-scheme: dark;

  --es-bg: #070d19;
  --es-surface: #0d1628;
  --es-elevated: #111e35;
  --es-blue: #4186e9;
  --es-gold: #ffa710;
  --es-text: #eaf0ff;
  --es-muted: #a7b9d5;
  --es-line: rgba(112, 158, 231, 0.19);

  --color-body: #070d19 !important;
  --color-box-header: #111e35 !important;
  --color-box-body: #0d1628 !important;
  --color-box-body-highlight: #172642 !important;
  --color-menu: #0d1628 !important;
  --color-card: #111e35 !important;

  --color-primary: #4186e9 !important;
  --color-primary-dark-1: #3075d8 !important;
  --color-primary-light-1: #61a0f5 !important;

  --color-text: #eaf0ff !important;
  --color-text-light: #b7c8e1 !important;
  --color-text-light-2: #91a5c2 !important;
  --color-text-light-3: #7c91b0 !important;

  --color-link: #86bbff !important;
  --color-hover: #182943 !important;
  --color-active: #203b60 !important;

  --color-border: rgba(112, 158, 231, 0.24) !important;
  --color-secondary-bg: #111e35 !important;
  --color-input-background: #0c172a !important;
}

html {
  background: var(--es-bg);
}

body,
.full.height {
  background-color: var(--es-bg) !important;
  color: var(--es-text);
}

body {
  background-image:
    radial-gradient(
      ellipse at 12% 0%,
      rgba(65, 134, 233, 0.12),
      transparent 40%
    ),
    radial-gradient(
      ellipse at 90% 13%,
      rgba(255, 167, 16, 0.045),
      transparent 32%
    ) !important;
  background-attachment: fixed !important;
}

a {
  transition: color .18s ease;
}

a:hover {
  color: #a6d1ff;
}

.ui.menu,
.ui.segment,
.ui.segments,
.ui.card,
.ui.cards > .card,
.ui.modal,
.ui.dropdown .menu,
.ui.popup {
  background-color: var(--es-surface) !important;
  color: var(--es-text);
  border-color: var(--es-line) !important;
}

.ui.segment,
.ui.card,
.ui.modal {
  border-radius: 12px !important;
}

.ui.segment,
.ui.card,
.ui.popup {
  box-shadow:
    0 12px 36px rgba(1, 7, 18, .15) !important;
}

.ui.menu .item,
.ui.menu .header.item,
.ui.dropdown .menu > .item {
  color: var(--es-text) !important;
}

.ui.menu .active.item,
.ui.menu .item:hover,
.ui.dropdown .menu > .item:hover {
  background: rgba(65, 134, 233, .12) !important;
}

.ui.primary.button,
.ui.blue.button,
.ui.button.primary {
  background: linear-gradient(
    135deg, #4186e9, #2866c7
  ) !important;
  color: #fff !important;
  border-radius: 9px !important;
  box-shadow: 0 7px 22px rgba(48, 117, 216, .20);
}

.ui.primary.button:hover,
.ui.blue.button:hover {
  background: linear-gradient(
    135deg, #5397f6, #3377de
  ) !important;
}

.ui.button:not(.primary):not(.blue):not(.red) {
  border-radius: 9px;
}

.ui.form input:not([type="checkbox"]):not([type="radio"]),
.ui.form textarea,
.ui.form select {
  background: #0b172a !important;
  color: var(--es-text) !important;
  border: 1px solid var(--es-line) !important;
  border-radius: 9px !important;
}

.ui.form input:focus,
.ui.form textarea:focus {
  border-color: rgba(65, 134, 233, .75) !important;
  box-shadow: 0 0 0 3px rgba(65, 134, 233, .12) !important;
}

.ui.form input::placeholder,
.ui.form textarea::placeholder {
  color: #8298b7;
}

.ui.table {
  background: rgba(13, 22, 40, .70) !important;
  color: var(--es-text) !important;
  border-color: var(--es-line) !important;
}

.ui.table th {
  background: #14213a !important;
}

.ui.table td,
.ui.table th {
  border-color: var(--es-line) !important;
}

.ui.label:not(.red):not(.green):not(.orange) {
  border-color: var(--es-line);
}

.ui.tabular.menu .active.item {
  border-color: var(--es-blue) !important;
}

.ui.message,
.flash-message {
  border-radius: 10px;
}

/* Navigation: keep the original structure and behavior. */
#navbar,
.navbar {
  background:
    linear-gradient(
      110deg,
      rgba(13, 22, 40, .98),
      rgba(17, 30, 53, .96)
    ) !important;
  border-bottom: 1px solid var(--es-line) !important;
  box-shadow: 0 6px 26px rgba(2, 8, 20, .18);
}

#navbar .item,
.navbar .item {
  color: var(--es-text);
}

/* Authentication: institutional visual treatment. */
.page-content.user.signin {
  position: relative;
  min-height: min(78vh, 900px);
}

.page-content.user.signin::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 8%;
  width: min(600px, 90vw);
  height: 440px;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(
    ellipse,
    rgba(65, 134, 233, .12),
    transparent 67%
  );
}

.page-content.user.signin .ui.segment,
.page-content.user.signin .ui.form {
  border-radius: 16px;
}

.page-content.user.signin .ui.segment {
  background:
    linear-gradient(
      150deg,
      rgba(17, 30, 53, .97),
      rgba(10, 20, 37, .97)
    ) !important;
  border: 1px solid var(--es-line) !important;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, .25) !important;
}

.page-content.user.signin .ui.header {
  color: var(--es-text);
}

/* Home and repository interfaces. */
.page-content.home .ui.header,
.page-content.repository .ui.header {
  color: var(--es-text);
}

.page-content.home .hero {
  background: transparent;
}

.repo-header,
.repository .ui.secondary.menu {
  border-color: var(--es-line);
}

/* The official white logo will be mapped to the
   verified navigation markup in the next stage.
   Never distort or reconstruct the brand assets. */

:focus-visible {
  outline-color: var(--es-blue);
}

@media (max-width: 767px) {
  .ui.segment,
  .ui.card {
    border-radius: 10px !important;
  }

  .page-content.user.signin::before {
    width: 95vw;
    height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}


/* === eSuite Roadmap Navbar A2.8 === */

/* Identidade vetorial branca, preservada integralmente. */
#navbar #navbar-logo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 208px !important;
  min-width: 208px !important;
  padding: 4px 12px !important;
  box-sizing: border-box;
}

#navbar #navbar-logo > img {
  display: none !important;
}

#navbar #navbar-logo::before {
  content: "";
  display: block;
  width: 184px;
  height: 44px;
  flex: 0 0 auto;
  background-image:
    url("/assets/img/esuite-horizontal-white.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

/* Em telas pequenas, utilizar apenas o ícone oficial. */
@media (max-width: 767px) {
  #navbar #navbar-logo {
    width: 52px !important;
    min-width: 52px !important;
    padding: 6px !important;
  }

  #navbar #navbar-logo::before {
    width: 34px;
    height: 34px;
    background-image: url("/assets/img/logo.svg");
  }
}

/* === Fim eSuite Roadmap Navbar A2.8 === */


/* === eSuite Roadmap Navbar FIX A2.9.4 === */

/* Remover dependência do pseudoelemento. */
#navbar #navbar-logo::before {
  content: none !important;
  display: none !important;
}

/* Desktop: logomarca horizontal vetorial branca. */
#navbar #navbar-logo {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 208px !important;
  min-width: 208px !important;
  min-height: 52px !important;

  padding: 4px 12px !important;
  box-sizing: border-box !important;

  background-image:
    url("/assets/img/esuite-horizontal-white.svg") !important;

  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 184px 44px !important;
}

/* Mobile: ícone vetorial branco original. */
@media (max-width: 767px) {
  #navbar #navbar-logo {
    width: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;

    padding: 6px !important;

    background-image:
      url("/assets/img/logo.svg") !important;

    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 34px 34px !important;
  }
}

/* === Fim Navbar FIX A2.9.4 === */


/* ====================================================
   eSuite Roadmap Login A3.2
   Forgejo 15.0.10 — autenticação institucional
   Apresentação apenas: sem alterações funcionais
   ==================================================== */

/* Área de autenticação com iluminação tecnológica. */
.page-content.user.signin {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;

  position: relative;
  isolation: isolate;

  width: 100% !important;
  min-height: calc(100vh - 100px) !important;
  min-height: calc(100dvh - 100px) !important;

  padding: clamp(22px, 5vh, 72px) 20px !important;
  box-sizing: border-box !important;

  background:
    radial-gradient(
      ellipse 53% 45% at 50% 37%,
      rgba(65, 134, 233, .14),
      transparent 78%
    ),
    radial-gradient(
      ellipse 35% 40% at 78% 78%,
      rgba(255, 167, 16, .035),
      transparent 78%
    ),
    linear-gradient(
      180deg,
      #070d19 0%,
      #091224 52%,
      #070d19 100%
    ) !important;
}

/* Retirar decoração anterior que poderia disputar
   a posição com os elementos reais do formulário. */
.page-content.user.signin::before {
  content: none !important;
  display: none !important;
}

/* Grid original: mantido, porém centralizado. */
.page-content.user.signin > .ui.grid {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 100% !important;
  max-width: 1100px !important;
  min-height: 0 !important;

  margin: 0 auto !important;
  padding: 0 !important;
}

/* Coluna real identificada na auditoria A3.1.
   Painel único com profundidade institucional. */
.page-content.user.signin > .ui.grid > .column {
  display: flex !important;
  flex-direction: column !important;

  flex: 0 1 540px !important;
  width: 100% !important;
  max-width: 540px !important;
  min-width: 0 !important;

  margin: 0 auto !important;
  padding: clamp(20px, 3vw, 34px) !important;
  gap: 16px !important;

  box-sizing: border-box !important;
  border: 1px solid rgba(112, 158, 231, .27) !important;
  border-top: 2px solid rgba(255, 167, 16, .70) !important;
  border-radius: 20px !important;

  background:
    linear-gradient(
      145deg,
      rgba(21, 37, 65, .97),
      rgba(11, 22, 41, .97) 65%,
      rgba(13, 25, 45, .98)
    ) !important;

  box-shadow:
    0 30px 85px rgba(0, 0, 0, .34),
    0 0 70px rgba(65, 134, 233, .065),
    inset 0 1px 0 rgba(255, 255, 255, .045) !important;
}

/* Respeitar o layout interno original. */
.page-content.user.signin .ui.container.fluid {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
}

/* Uniformizar os segmentos do login. */
.page-content.user.signin .ui.segment {
  border-color: rgba(112, 158, 231, .20) !important;
  box-shadow: none !important;
}

.page-content.user.signin .ui.attached.segment {
  background: rgba(7, 16, 30, .40) !important;
  padding: clamp(16px, 2.2vw, 22px) !important;
}

/* Cabeçalhos nativos, sem substituir textos. */
.page-content.user.signin .ui.header {
  color: #eaf0ff !important;
  font-weight: 600 !important;
  letter-spacing: .01em;
}

.page-content.user.signin .ui.top.attached.header {
  background:
    linear-gradient(
      115deg,
      rgba(30, 52, 88, .92),
      rgba(18, 34, 60, .98)
    ) !important;

  border-color: rgba(112, 158, 231, .27) !important;
  border-radius: 11px 11px 0 0 !important;
}

/* Formulário mantido integralmente. */
.page-content.user.signin form.ui.form {
  width: 100% !important;
  max-width: 100% !important;
}

.page-content.user.signin .ui.form .field > label {
  color: #cbd8ec !important;
  font-weight: 500;
  margin-bottom: 8px !important;
}

.page-content.user.signin .ui.form
input:not([type="checkbox"]):not([type="radio"]) {
  background-color: #0a1629 !important;
  color: #eaf0ff !important;
  border: 1px solid rgba(112, 158, 231, .26) !important;
  border-radius: 10px !important;
  min-height: 42px;
  transition:
    border-color .18s ease,
    box-shadow .18s ease;
}

.page-content.user.signin .ui.form
input:focus {
  border-color: #4186e9 !important;
  box-shadow:
    0 0 0 3px rgba(65, 134, 233, .16) !important;
}

/* Botão principal com destaque tecnológico. */
.page-content.user.signin .ui.primary.button {
  min-height: 44px;
  background:
    linear-gradient(
      110deg,
      #4186e9 0%,
      #2d68c7 100%
    ) !important;

  border: 1px solid rgba(130, 183, 255, .20) !important;
  border-radius: 10px !important;

  color: #fff !important;
  font-weight: 600 !important;
  letter-spacing: .015em;

  box-shadow:
    0 9px 25px rgba(35, 100, 199, .22) !important;
}

.page-content.user.signin .ui.primary.button:hover {
  background:
    linear-gradient(
      110deg,
      #5298f6,
      #3678de
    ) !important;
}

/* Links: contraste sem excesso de cor. */
.page-content.user.signin a {
  color: #86bbff;
}

.page-content.user.signin a:hover {
  color: #b5d7ff;
}

/* Não cortar o formulário em janelas baixas. */
@media (max-height: 620px) {
  .page-content.user.signin {
    justify-content: flex-start !important;
    min-height: calc(100dvh - 90px) !important;
    padding-top: 16px !important;
    padding-bottom: 20px !important;
  }
}

/* Dispositivos móveis. */
@media (max-width: 767px) {
  .page-content.user.signin {
    padding: 20px 14px !important;
  }

  .page-content.user.signin > .ui.grid {
    width: 100% !important;
  }

  .page-content.user.signin > .ui.grid > .column {
    padding: 18px 14px !important;
    border-radius: 16px !important;
    gap: 14px !important;
    box-shadow:
      0 18px 45px rgba(0, 0, 0, .25) !important;
  }

  .page-content.user.signin .ui.attached.segment {
    padding: 16px 14px !important;
  }
}

/* Acessibilidade: respeitar movimento reduzido. */
@media (prefers-reduced-motion: reduce) {
  .page-content.user.signin *,
  .page-content.user.signin *::before,
  .page-content.user.signin *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* === Fim eSuite Roadmap Login A3.2 === */


/* ===================================================
   eSuite Roadmap Rounded Components A3.3.2
   Acabamento institucional aprovado visualmente
   =================================================== */

/* Arredondamento uniforme nos três componentes. */
.page-content.user.signin .ui.top.attached.header.center,
.page-content.user.signin
.ui.container.fluid > .ui.attached.segment,
.page-content.user.signin
.ui.attached.segment.header.top {
  border-radius: 12px !important;
}

/* Cabeçalho superior do formulário. */
.page-content.user.signin
.ui.top.attached.header.center {
  margin-bottom: 8px !important;
  overflow: hidden !important;
}

/* Formulário original: preservar conteúdos interativos. */
.page-content.user.signin
.ui.container.fluid > .ui.attached.segment {
  margin-top: 0 !important;
  overflow: visible !important;
}

/* Recuperação de senha. */
.page-content.user.signin
.ui.attached.segment.header.top {
  overflow: hidden !important;
}

/* === Fim Rounded Components A3.3.2 === */

/* =====================================================
   eSuite Roadmap — Homepage institucional A3.4.1
   Escopo exclusivo: .page-content.home.esuite-home
   ===================================================== */

.page-content.home.esuite-home {
  --home-border: rgba(112, 158, 231, .23);
  --home-muted: #a7b9d5;

  color: #eaf0ff !important;
  background:
    radial-gradient(
      ellipse at 50% 10%,
      rgba(65, 134, 233, .12),
      transparent 52%
    ),
    #070d19 !important;
}

.esuite-home .es-home-container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 76px;
}

.esuite-home .es-home-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(26px, 5vw, 70px) 12px 72px;
}

.esuite-home .es-home-light {
  position: absolute;
  z-index: -1;
  inset: -30px 10% 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at center,
      rgba(65,134,233,.18),
      transparent 65%
    );
}

.esuite-home .es-home-brand img {
  display: block;
  width: min(300px, 80vw);
  height: auto;
  object-fit: contain;
}

.esuite-home .es-home-eyebrow {
  color: #ffa710;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .19em;
  line-height: 1.7;
}

.esuite-home .es-home-hero .es-home-eyebrow {
  margin-top: 30px;
}

.esuite-home .es-home-hero h1 {
  max-width: 890px;
  margin: 18px 0 16px;
  color: #eaf0ff;
  font-size: clamp(34px, 5.2vw, 66px);
  font-weight: 750;
  line-height: 1.09;
  letter-spacing: -.035em;
}

.esuite-home .es-home-hero h1 span {
  color: #86bbff;
}

.esuite-home .es-home-lead {
  max-width: 660px;
  color: var(--home-muted);
  font-size: clamp(15px, 1.65vw, 19px);
  line-height: 1.75;
}

.esuite-home .es-home-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}

.esuite-home .es-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 11px;
  font-weight: 650;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.esuite-home .es-home-primary {
  background: linear-gradient(110deg,#4186e9,#2866c7);
  color: #fff !important;
  box-shadow: 0 12px 34px rgba(41,101,202,.24);
}

.esuite-home .es-home-primary:hover {
  background: linear-gradient(110deg,#5397f6,#3377de);
  transform: translateY(-2px);
}

.esuite-home .es-home-secondary {
  border: 1px solid var(--home-border);
  background: #172844;
  color: #eaf0ff !important;
}

.esuite-home .es-home-access {
  margin-top: 16px;
  color: #8da3c1;
  font-size: 12px;
}

.esuite-home .es-home-projects {
  position: relative;
  padding: 16px 0 40px;
}

.esuite-home .es-home-section-head {
  max-width: 640px;
  margin-bottom: 34px;
}

.esuite-home .es-home-section-head h2 {
  margin: 10px 0;
  color: #eaf0ff;
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -.025em;
}

.esuite-home .es-home-section-head > p:last-child {
  color: var(--home-muted);
  line-height: 1.7;
}

.esuite-home .es-home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.esuite-home .es-home-card {
  min-width: 0;
  padding: 25px;
  border: 1px solid var(--home-border);
  border-radius: 17px;
  background:
    linear-gradient(
      145deg,
      rgba(21,37,65,.92),
      rgba(10,20,36,.96)
    );
  box-shadow: 0 15px 38px rgba(0,0,0,.12);
}

.esuite-home .es-home-featured {
  border-top: 2px solid #ffa710;
}

.esuite-home .es-home-card-kicker {
  color: #ffa710;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
}

.esuite-home .es-home-card h3 {
  margin: 15px 0 10px;
  color: #eaf0ff;
  font-size: 21px;
}

.esuite-home .es-home-card p {
  color: var(--home-muted);
  font-size: 14px;
  line-height: 1.7;
}

.esuite-home .es-home-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.esuite-home .es-home-chips span {
  padding: 5px 10px;
  border: 1px solid var(--home-border);
  border-radius: 7px;
  background: rgba(65,134,233,.09);
  color: #c7dcf8;
  font-size: 11px;
}

.esuite-home .es-home-closing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  padding: 28px 0;
  border-top: 1px solid var(--home-border);
}

.esuite-home .es-home-closing h2 {
  color: #eaf0ff;
  font-size: 22px;
}

.esuite-home .es-home-closing p {
  color: var(--home-muted);
}

@media (max-width: 900px) {
  .esuite-home .es-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .esuite-home .es-home-container {
    width: min(100% - 28px, 480px);
    padding: 22px 0 40px;
  }

  .esuite-home .es-home-hero {
    padding: 26px 0 44px;
  }

  .esuite-home .es-home-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
  }

  .esuite-home .es-home-card {
    padding: 21px;
  }

  .esuite-home .es-home-closing {
    flex-direction: column;
    align-items: flex-start;
  }

  .esuite-home .es-home-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .esuite-home .es-home-button {
    transition: none;
  }
}

/* === Fim Homepage A3.4.1 === */
