/* EBZ Recanto das Emas - tokens de identidade visual. */
:root {
  --color-brand-primary: #17628A;
  --color-brand-primary-dark: #104764;
  --color-brand-primary-light: #DCECF4;
  --color-brand-secondary: #D92732;
  --color-brand-secondary-dark: #A91D27;
  --color-brand-secondary-light: #F9E1E3;

  --color-neutral-950: #12171B;
  --color-neutral-900: #1D252B;
  --color-neutral-700: #46545E;
  --color-neutral-500: #73818A;
  --color-neutral-300: #CBD3D8;
  --color-neutral-200: #E2E7EA;
  --color-neutral-100: #F1F4F6;
  --color-neutral-50: #F8FAFB;

  --color-success: #237A4B;
  --color-warning: #A86400;
  --color-error: #B42318;
  --color-info: #17628A;
  --color-focus-ring: #2E86B7;

  --bs-primary: #17628A;
  --bs-primary-rgb: 23, 98, 138;
  --bs-danger: #B42318;
  --bs-success: #237A4B;
  --bs-body-color: #1D252B;
  --bs-body-bg: #F8FAFB;
  --bs-border-color: #E2E7EA;

  --font-heading: "Montserrat", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-size-base: 15px;

  --header-height: 64px;
  --sidebar-width: 260px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgb(18 23 27 / 8%);
  --shadow-md: 0 18px 50px rgb(18 23 27 / 16%);
  --transition-default: 240ms ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--color-neutral-950);
  font-family: var(--font-body);
  background: var(--color-neutral-50);
}

.skip-to-content {
  position: absolute;
  left: -9999px;
}

.skip-to-content:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  color: #fff;
  background: var(--color-brand-primary);
}

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background: #050607;
}

.auth-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.auth-panel {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 50%) minmax(0, 1fr);
  overflow: hidden;
  background: var(--color-neutral-100);
  border-radius: 0;
}

.auth-card {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 3.1rem;
  background: var(--color-neutral-100);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-neutral-950);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 700;
}

.auth-brand-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: #1f73c9;
  border-radius: 10px;
}

.auth-brand-icon i {
  font-size: 1.15rem;
}

.auth-form-wrap {
  width: min(100%, 384px);
  margin: auto;
}

.auth-title {
  margin: 0 0 0.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.38rem;
  line-height: 1.2;
  text-align: left;
}

.auth-subtitle {
  margin: 0 0 2rem;
  color: var(--color-neutral-700);
  font-size: 0.91rem;
  line-height: 1.5;
  text-align: left;
}

.auth-field {
  margin-bottom: 1.15rem;
}

.auth-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--color-neutral-900);
  font-size: 0.88rem;
  font-weight: 600;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-label-row a {
  color: #005fcc;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-label-row a:hover {
  text-decoration: underline;
}

.auth-input {
  width: 100%;
  min-height: 32px;
  padding: 0.4rem 0.7rem;
  color: var(--color-neutral-950);
  font: inherit;
  font-size: 0.9rem;
  background: #f5f8fb;
  border: 1px solid #d3dce5;
  border-radius: 11px;
}

.auth-input:focus {
  outline: 3px solid rgb(31 115 201 / 18%);
  border-color: #1f73c9;
  background: #fff;
}

.auth-password {
  position: relative;
}

.auth-password .auth-input {
  padding-right: 2.35rem;
}

.auth-password-icon {
  position: absolute;
  top: 50%;
  right: 0.72rem;
  transform: translateY(-50%);
  color: var(--color-neutral-500);
  pointer-events: none;
}

.auth-error,
.auth-alert {
  margin-top: 0.45rem;
  color: var(--color-error);
  font-size: 0.88rem;
}

.auth-alert {
  margin: 0 0 1rem;
  padding: 0.75rem;
  background: #fff5f5;
  border: 1px solid #f0b4b0;
  border-radius: 8px;
}

.auth-button {
  width: 100%;
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  background: #1f73c9;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  transition: background var(--transition-default), transform var(--transition-default);
}

.auth-button:hover {
  background: #155da8;
  transform: translateY(-1px);
}

.auth-button i {
  font-size: 1rem;
}

.auth-note {
  margin-top: 1.55rem;
  padding: 0.8rem 0.72rem;
  color: var(--color-neutral-700);
  font-size: 0.78rem;
  line-height: 1.35;
  background: #f2f6fa;
  border: 1px solid #d5dde5;
  border-radius: 11px;
}

.auth-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgb(6 15 22 / 8%) 0%, rgb(13 72 122 / 58%) 72%, rgb(11 87 151 / 82%) 100%),
    linear-gradient(90deg, rgb(255 255 255 / 32%) 0%, transparent 40%);
}

.auth-hero img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.auth-hero-content {
  position: absolute;
  right: clamp(2rem, 5vw, 4rem);
  bottom: 2.55rem;
  left: clamp(2rem, 5vw, 4rem);
  z-index: 2;
  text-shadow: 0 2px 16px rgb(0 0 0 / 32%);
}

.auth-hero-content h2 {
  max-width: 560px;
  margin: 0 0 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1.16;
}

.auth-hero-content p {
  max-width: 590px;
  margin: 0;
  color: rgb(255 255 255 / 88%);
  font-size: 0.95rem;
  line-height: 1.45;
}

.auth-footer {
  margin: 2rem 0 0;
  color: var(--color-neutral-700);
  font-size: 0.78rem;
  text-align: center;
}

@media (max-width: 900px) {
  .auth-panel {
    grid-template-columns: 1fr;
  }

  .auth-card {
    min-height: auto;
    padding: 2rem 1.5rem;
  }

  .auth-form-wrap {
    margin: 3rem auto 0;
  }

  .auth-hero {
    min-height: 320px;
  }
}

@media (max-width: 560px) {
  .auth-body,
  .auth-shell,
  .auth-panel {
    min-height: 100vh;
  }

  .auth-panel {
    border-radius: 0;
  }

  .auth-card {
    padding: 1.5rem 1.1rem 2rem;
  }

  .auth-form-wrap {
    margin-top: 2.35rem;
  }

  .auth-title {
    font-size: 1.28rem;
  }

  .auth-hero {
    display: none;
  }
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 20;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  color: #fff;
  background: var(--color-brand-primary);
  box-shadow: var(--shadow-sm);
}

.topbar-brand,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-logo {
  width: 150px;
  height: auto;
}

.topbar-church-name {
  padding-left: 1rem;
  font-weight: 700;
  border-left: 1px solid rgb(255 255 255 / 28%);
}

.topbar-action {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.topbar-action:hover {
  color: #fff;
  text-decoration: underline;
}

.topbar-logout-form {
  margin: 0;
}

.btn-topbar-logout,
.btn-ebz-primary {
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  color: #fff;
  font: inherit;
  font-weight: 700;
  background: var(--color-brand-secondary);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}

.btn-topbar-logout:hover,
.btn-ebz-primary:hover {
  color: #fff;
  background: var(--color-brand-secondary-dark);
}

.sidenav {
  position: fixed;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  width: var(--sidebar-width);
  padding: 1rem 0.75rem;
  overflow-y: auto;
  background: var(--color-brand-primary-dark);
}

.sidenav-list {
  display: grid;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidenav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.65rem 0.8rem;
  color: rgb(255 255 255 / 84%);
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
}

.sidenav-link:hover,
.sidenav-link.active {
  color: #fff;
  background: rgb(255 255 255 / 12%);
}

.sidenav-icon {
  width: 2rem;
  color: rgb(255 255 255 / 72%);
  font-size: 0.8rem;
  text-align: center;
}

.main-content {
  min-height: calc(100vh - var(--header-height));
  padding: calc(var(--header-height) + 2rem) 2rem 5rem calc(var(--sidebar-width) + 2rem);
}

.page-header {
  margin-bottom: 1.5rem;
}

.breadcrumb {
  min-height: 1.25rem;
  margin: 0 0 0.35rem;
}

.page-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.7rem;
  line-height: 1.2;
  color: var(--color-neutral-950);
}

.messages-container {
  margin-bottom: 1.25rem;
}

.footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: var(--sidebar-width);
  padding: 0.75rem 2rem;
  color: var(--color-neutral-700);
  background: #fff;
  border-top: 1px solid var(--color-neutral-200);
}

.footer-text {
  margin: 0;
  font-size: 0.86rem;
}

.error-page h2 {
  margin-bottom: 0.75rem;
  color: var(--color-error);
  font-family: var(--font-heading);
}

.server-error-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  text-align: center;
}

.server-error-card {
  max-width: 560px;
}

.server-error-card img {
  height: auto;
  margin-bottom: 2rem;
}

.server-error-card h1 {
  font-family: var(--font-heading);
}

@media (max-width: 820px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-brand,
  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .topbar-church-name {
    padding-left: 0;
    border-left: 0;
  }

  .sidenav {
    position: static;
    width: 100%;
  }

  .sidenav-list {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  }

  .main-content {
    min-height: auto;
    padding: 1.5rem 1rem 5rem;
  }

  .footer {
    left: 0;
  }
}

.wrapper .footer {
  position: static;
  right: auto;
  bottom: auto;
  left: auto;
  padding: 1rem 0;
  background: transparent;
}

.wrapper > .page-content > .page-container {
  padding-top: 1.25rem;
}

.btn i[class^="ti"],
.btn i[class*=" ti-"],
a i[class^="ti"],
a i[class*=" ti-"] {
  padding-right: 5px;
}

.app-topbar .logo img,
.sidenav-menu .logo img {
  max-height: 42px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
}

.sidenav-menu .logo .logo-sm {
  width: 28px;
  height: var(--osen-logo-sm-height);
}

.sidenav-menu .logo .logo-sm img {
  height: var(--osen-logo-sm-height);
  max-height: var(--osen-logo-sm-height);
  max-width: none;
  width: auto;
  object-fit: contain;
}

.topbar-search {
  min-height: 40px;
}

.badge-global-admin {
  color: #7A1E24;
  background: #F9E1E3;
  border: 1px solid rgb(217 39 50 / 24%);
}

.topbar-actions-wrap {
  min-width: 0;
}

.visao-ativa-control {
  width: clamp(240px, 28vw, 350px);
  max-width: 350px;
  min-width: 0;
  display: flex;
  align-items: center;
}

.visao-ativa-form {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-neutral-200);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgb(18 23 27 / 5%);
}

.visao-ativa-icon {
  width: 42px;
  align-self: stretch;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--color-brand-primary);
  background: rgb(23 98 138 / 10%);
  border-right: 1px solid var(--color-neutral-200);
}

.visao-ativa-icon i {
  font-size: 1.1rem;
}

.visao-ativa-select {
  width: 100%;
  min-width: 180px;
  height: 40px;
  padding-left: 0.85rem;
  overflow: hidden;
  color: var(--color-neutral-900);
  font-weight: 600;
  text-overflow: ellipsis;
  background-color: transparent;
  border: 0;
  box-shadow: none;
}

.visao-ativa-select:focus {
  background-color: transparent;
  box-shadow: inset 0 0 0 2px rgb(46 134 183 / 22%);
}

.visao-ativa-select:disabled {
  color: var(--color-neutral-700);
  background-color: #fff;
  opacity: 1;
}

.visao-padrao-button {
  width: 42px;
  align-self: stretch;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  color: var(--color-neutral-500);
  background: #fff;
  border: 0;
  border-left: 1px solid var(--color-neutral-200);
  cursor: pointer;
}

.visao-padrao-button:hover,
.visao-padrao-button:focus {
  color: var(--color-warning);
  background: #fff8eb;
  outline: 0;
}

.visao-padrao-button.is-active {
  color: var(--color-warning);
  background: #fff8eb;
}

.visao-padrao-button i {
  font-size: 1.08rem;
}

@media (max-width: 1199.98px) {
  .visao-ativa-control {
    width: min(40vw, 350px);
  }
}

@media (max-width: 575.98px) {
  .visao-ativa-control {
    width: min(58vw, 260px);
  }

  .visao-ativa-select {
    min-width: 0;
    padding-left: 0.65rem;
  }

  .visao-ativa-icon,
  .visao-padrao-button {
    width: 36px;
  }
}
