/* AMSOFT branding — laranja só em botões; layout split só no login */
:root {
  --amsoft-orange: #FA833A;
  --amsoft-orange-hover: #E56F28;
  --amsoft-orange-active: #D45F1C;
  --amsoft-panel-bg: linear-gradient(160deg, #fff7f0 0%, #ffe8d6 45%, #ffd4b8 100%);
}

html, body, #root { min-height: 100%; }

/* NÃO colorir todos os <a> — isso quebrava menu e tabela */
.ant-btn-primary,
button.ant-btn-primary {
  background-color: var(--amsoft-orange) !important;
  border-color: var(--amsoft-orange) !important;
  box-shadow: none !important;
}
.ant-btn-primary:hover,
.ant-btn-primary:focus {
  background-color: var(--amsoft-orange-hover) !important;
  border-color: var(--amsoft-orange-hover) !important;
}
.ant-btn-primary:active {
  background-color: var(--amsoft-orange-active) !important;
  border-color: var(--amsoft-orange-active) !important;
}
.ant-checkbox-checked .ant-checkbox-inner {
  background-color: var(--amsoft-orange) !important;
  border-color: var(--amsoft-orange) !important;
}
.ant-input:focus, .ant-input-focused,
.ant-input-affix-wrapper:focus,
.ant-input-affix-wrapper-focused {
  border-color: var(--amsoft-orange) !important;
  box-shadow: 0 0 0 2px rgba(250, 131, 58, 0.2) !important;
}

/* Links laranja só na tela de login */
body.amsoft-login-page .ant-btn-link,
body.amsoft-login-page .ant-pro-form-login-page a,
body:has(.amsoft-panel-visual) .ant-btn-link,
body:has(.amsoft-panel-visual) a[href*="forgot"],
body:has(.amsoft-panel-visual) a[href*="register"] {
  color: var(--amsoft-orange) !important;
}

/* Layout split — só com chrome de login */
body:has(.amsoft-panel-visual) {
  margin: 0 !important;
  overflow-x: hidden !important;
  background: #fff !important;
}

body:has(.amsoft-panel-visual) [class*="pro-form-login-top"],
body:has(.amsoft-panel-visual) img[src*="logo.svg"],
body:has(.amsoft-panel-visual) a[href*="rustdesk.com"],
body:has(.amsoft-panel-visual) a[href*="github.com/rustdesk"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
}

/* Idioma + tema só na login — esconde + cobre o canto */
body.amsoft-login-page #root div[style*="top: 16px"][style*="right: 16px"],
body.amsoft-login-page #root div[style*="top:16px"][style*="right:16px"],
body.amsoft-login-page #root div[style*="position: absolute"][style*="right: 16px"],
body.amsoft-login-page #root div[style*="position:absolute"][style*="right:16px"],
body:has(.amsoft-panel-visual) #root div[style*="top: 16px"][style*="right: 16px"],
body:has(.amsoft-panel-visual) #root div[style*="top:16px"][style*="right:16px"],
body:has(.amsoft-panel-visual) #root div[style*="position: absolute"][style*="right: 16px"],
body:has(.amsoft-panel-visual) #root div[style*="position:absolute"][style*="right:16px"],
body.amsoft-login-page #root [class*="SelectLang"],
body.amsoft-login-page #root .anticon-translation,
body.amsoft-login-page #root .anticon-global,
body.amsoft-login-page #root .ant-dropdown-trigger,
body.amsoft-login-page .amsoft-hidden-chrome,
body:has(.amsoft-panel-visual) .amsoft-hidden-chrome,
[data-amsoft-chrome-hidden="1"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Cobre o canto superior direito do form (idioma/tema) */
body.amsoft-login-page .amsoft-chrome-cover,
body:has(.amsoft-panel-visual) .amsoft-chrome-cover {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  width: min(220px, 22vw) !important;
  height: 72px !important;
  z-index: 10060 !important;
  background: #fff !important;
  pointer-events: none !important;
}

.amsoft-panel-visual {
  position: fixed !important;
  left: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 48vw !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--amsoft-panel-bg) !important;
  z-index: 1000 !important;
  pointer-events: none !important;
  padding: 32px !important;
  box-sizing: border-box !important;
}
.amsoft-panel-visual::before {
  content: "";
  position: absolute;
  inset: -15%;
  background:
    radial-gradient(circle at 25% 30%, rgba(250,131,58,.2), transparent 42%),
    radial-gradient(circle at 80% 75%, rgba(250,131,58,.12), transparent 40%);
}
.amsoft-lottie {
  width: min(82%, 540px);
  max-width: 540px;
  aspect-ratio: 1 / 1;
  position: relative;
  z-index: 1;
}

.amsoft-login-brand {
  position: fixed !important;
  left: 48vw !important;
  right: 0 !important;
  top: 5vh !important;
  display: flex !important;
  justify-content: center !important;
  z-index: 1001 !important;
  pointer-events: none !important;
  background: transparent !important;
}
.amsoft-login-brand img {
  width: min(68%, 380px);
  max-width: 380px;
  height: auto;
  display: block;
  background: transparent !important;
  box-shadow: none !important;
}
.amsoft-login-brand .amsoft-logo-dark { display: none !important; }
.amsoft-login-brand .amsoft-logo-light { display: block !important; }
.amsoft-login-brand.is-dark .amsoft-logo-light { display: none !important; }
.amsoft-login-brand.is-dark .amsoft-logo-dark { display: block !important; }
html[data-theme="dark"] .amsoft-login-brand .amsoft-logo-light,
body[data-theme="dark"] .amsoft-login-brand .amsoft-logo-light,
html.dark .amsoft-login-brand .amsoft-logo-light,
body.dark .amsoft-login-brand .amsoft-logo-light { display: none !important; }
html[data-theme="dark"] .amsoft-login-brand .amsoft-logo-dark,
body[data-theme="dark"] .amsoft-login-brand .amsoft-logo-dark,
html.dark .amsoft-login-brand .amsoft-logo-dark,
body.dark .amsoft-login-brand .amsoft-logo-dark { display: block !important; }

body:has(.amsoft-panel-visual) #root {
  margin-left: 48vw !important;
  width: 52vw !important;
  min-height: 100vh !important;
  box-sizing: border-box !important;
  padding: 18vh 28px 88px !important;
  background: #fff !important;
  position: relative !important;
  z-index: 1 !important;
}

.amsoft-footer {
  position: fixed !important;
  left: 48vw !important;
  right: 0 !important;
  bottom: 14px !important;
  text-align: center !important;
  font-size: 12px !important;
  color: #888 !important;
  z-index: 1002 !important;
  pointer-events: none !important;
}

@media (max-width: 900px) {
  .amsoft-panel-visual {
    position: relative !important;
    width: 100vw !important;
    min-height: 180px !important;
  }
  .amsoft-login-brand {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    margin: 12px auto !important;
  }
  body:has(.amsoft-panel-visual) #root {
    margin-left: 0 !important;
    width: 100vw !important;
    padding: 8px 16px 72px !important;
  }
  .amsoft-footer { left: 0 !important; }
  .amsoft-lottie { width: min(70%, 240px); }
}

/* Ícone AMSOFT só no logo do header/sider — NÃO no menu */
.ant-pro-sider-logo .amsoft-sider-icon,
.ant-pro-global-header-logo .amsoft-sider-icon,
[class*="sider-logo"] > a > img.amsoft-sider-icon,
[class*="global-header-logo"] img.amsoft-sider-icon {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  object-fit: contain !important;
  background: transparent !important;
}

/* limpa ícones AMSOFT injetados por engano nos itens do menu */
.ant-menu img.amsoft-sider-icon,
.ant-menu img[data-amsoft="1"],
.ant-pro-sider-menu img.amsoft-sider-icon,
li.ant-menu-item img.amsoft-sider-icon,
li.ant-menu-item img[data-amsoft="1"] {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Trava idioma: esconde seletor 文/A em toda a console */
.ant-pro-global-header [class*="SelectLang"],
.ant-layout-header [class*="SelectLang"],
.ant-pro-global-header .anticon-translation,
.ant-layout-header .anticon-translation,
.ant-pro-global-header .anticon-global,
.ant-layout-header .anticon-global {
  display: none !important;
}

/* Barra Como instalar (console logado) */
.amsoft-install-bar {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1050;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: calc(100vw - 36px);
}
.amsoft-install-bar a,
.amsoft-install-bar button {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  color: #fff !important;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.amsoft-install-bar .amsoft-install-link {
  background: #f15a29;
}
.amsoft-install-bar .amsoft-install-dl {
  background: #1b7a3d;
}
.amsoft-install-bar .amsoft-install-guide {
  background: #1a5fb4;
}
body.amsoft-login-page .amsoft-install-bar,
body.amsoft-docs-open .amsoft-install-bar {
  display: none !important;
}

.amsoft-docs-panel {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: #fff;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}
.amsoft-docs-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  background: #fff;
  flex: 0 0 auto;
  font-family: "Segoe UI", sans-serif;
}
.amsoft-docs-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.amsoft-docs-close {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.amsoft-docs-frame {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  border: 0;
  min-height: 0;
  background: #fafafa;
}
.amsoft-guide-dock {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #f0f2f5;
  display: flex;
  flex-direction: column;
}
.amsoft-guide-panel {
  width: min(920px, 100%);
  height: min(860px, 92vh);
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}
.amsoft-guide-panel-page {
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 0;
  box-shadow: none;
}
.amsoft-guide-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
  font-family: "Segoe UI", sans-serif;
  background: #fff;
  flex-shrink: 0;
}
.amsoft-guide-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #666;
}
.amsoft-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  flex-shrink: 0;
}
.amsoft-btn {
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 700;
  color: #fff !important;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
}
.amsoft-btn-orange { background: #f15a29; }
.amsoft-btn-green { background: #1b7a3d; }
.amsoft-btn-blue { background: #1a5fb4; }
.amsoft-guide-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #fff;
  min-height: 0;
}
@media (max-width: 640px) {
  .amsoft-install-bar {
    right: 10px;
    bottom: 10px;
  }
  .amsoft-install-bar a,
  .amsoft-install-bar button {
    font-size: 12px;
    padding: 8px 12px;
  }
}


