:root {
  --primaryColor: #155e75;
  --primary-color: #155e75;
  --accentColor: #d97706;
  --accent-color: #d97706;
  --textPrimary: #172554;
}

body {
  background: #f8fafc;
  color: #1f2937;
}

body:has(.login),
body:has(#login),
body:has(form input[type="password"]) {
  background:
    radial-gradient(circle at 18% 20%, rgba(217, 119, 6, 0.24), transparent 18rem),
    radial-gradient(circle at 82% 76%, rgba(14, 165, 233, 0.2), transparent 20rem),
    linear-gradient(160deg, rgba(21, 94, 117, 0.96) 0%, rgba(15, 23, 42, 0.92) 58%, rgba(13, 148, 136, 0.82) 100%);
  background-attachment: fixed;
  color: #172554;
}

body:has(.login)::before,
body:has(#login)::before,
body:has(form input[type="password"])::before {
  content: "CNPJ Brazil";
  position: fixed;
  top: 7vh;
  left: 50%;
  z-index: 1;
  transform: translateX(-50%);
  color: #f8fafc;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2.25rem, 6vw, 4.75rem);
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 3px 18px rgba(15, 23, 42, 0.34);
  white-space: nowrap;
}

body:has(.login)::after,
body:has(#login)::after,
body:has(form input[type="password"])::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.16), transparent 36%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent 34%, rgba(255, 255, 255, 0.04));
}

#app,
.shell,
.login,
.login-page {
  min-height: 100vh;
}

form,
.login form,
.login-card {
  border-radius: 8px !important;
}

body:has(.login) form,
body:has(#login) form,
body:has(form input[type="password"]) form,
body:has(.login) .card,
body:has(#login) .card,
body:has(form input[type="password"]) .card,
.login form,
.login-card {
  border: 1px solid rgba(203, 213, 225, 0.85) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28) !important;
}

body:has(.login) form,
body:has(#login) form,
body:has(form input[type="password"]) form {
  position: relative;
  z-index: 2;
}

body:has(.login) form::before,
body:has(#login) form::before,
body:has(form input[type="password"]) form::before {
  content: "CNPJ Brazil";
  display: block;
  margin: 0 0 1.25rem;
  color: #155e75;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

input,
select,
textarea {
  border-radius: 6px !important;
}

body:has(.login) input,
body:has(.login) select,
body:has(.login) textarea,
body:has(#login) input,
body:has(#login) select,
body:has(#login) textarea,
body:has(form input[type="password"]) input,
body:has(form input[type="password"]) select,
body:has(form input[type="password"]) textarea {
  border-color: rgba(21, 94, 117, 0.34) !important;
}

body:has(.login) input:focus,
body:has(.login) select:focus,
body:has(.login) textarea:focus,
body:has(#login) input:focus,
body:has(#login) select:focus,
body:has(#login) textarea:focus,
body:has(form input[type="password"]) input:focus,
body:has(form input[type="password"]) select:focus,
body:has(form input[type="password"]) textarea:focus {
  border-color: #155e75 !important;
  box-shadow: 0 0 0 3px rgba(21, 94, 117, 0.16) !important;
}

button,
.button,
input[type="submit"] {
  border-radius: 6px !important;
}

button[type="submit"],
input[type="submit"],
.button.primary,
.button[aria-current="page"] {
  border-color: #155e75 !important;
  background: #155e75 !important;
  color: #ffffff !important;
}

button[type="submit"]:hover,
input[type="submit"]:hover,
.button.primary:hover {
  border-color: #164e63 !important;
  background: #164e63 !important;
}

a {
  color: #155e75;
}

body:not(:has(.login)):not(:has(#login)):not(:has(form input[type="password"])) {
  background: #f8fafc;
  color: #1f2937;
}

body:not(:has(.login)):not(:has(#login)):not(:has(form input[type="password"])) header,
body:not(:has(.login)):not(:has(#login)):not(:has(form input[type="password"])) nav,
body:not(:has(.login)):not(:has(#login)):not(:has(form input[type="password"])) aside {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
}

body:not(:has(.login)):not(:has(#login)):not(:has(form input[type="password"])) .card,
body:not(:has(.login)):not(:has(#login)):not(:has(form input[type="password"])) table,
body:not(:has(.login)):not(:has(#login)):not(:has(form input[type="password"])) form {
  background: #ffffff !important;
  border-color: #e5e7eb !important;
  box-shadow: none !important;
}

body:not(:has(.login)):not(:has(#login)):not(:has(form input[type="password"])) button,
body:not(:has(.login)):not(:has(#login)):not(:has(form input[type="password"])) .button {
  box-shadow: none !important;
}

body:not(:has(.login)):not(:has(#login)):not(:has(form input[type="password"])) .button[aria-current="page"],
body:not(:has(.login)):not(:has(#login)):not(:has(form input[type="password"])) .router-link-active {
  background: #e0f2fe !important;
  color: #155e75 !important;
}

@media (max-width: 640px) {
  body:has(.login)::before,
  body:has(#login)::before,
  body:has(form input[type="password"])::before {
    top: 4vh;
    font-size: 2.25rem;
  }
}
