:root {
  --temta-primary: #1f6f8b;
  --temta-primary-dark: #16516c;
  --temta-accent: #34a0a4;
  --temta-ink: #1f2933;
  --temta-muted: #6b7280;
  --temta-surface: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

.app-header.navbar {
  border-bottom: 1px solid #d8dbe0;
  min-height: 55px;
}

.temta-brand {
  align-items: center;
  display: flex;
  flex: 0 1 auto;
  justify-content: flex-start;
  gap: 0.5rem;
  height: 55px;
  overflow: hidden;
  padding-left: 0.75rem;
  text-decoration: none;
}

.app-header.navbar .navbar-brand.temta-brand .temta-brand-logo {
  display: block;
  height: auto !important;
  max-height: 28px !important;
  max-width: 150px !important;
  object-fit: contain;
  width: 150px !important;
}

.app-header.navbar .navbar-brand.temta-brand .temta-brand-logo-min {
  height: auto !important;
  max-height: 22px !important;
  max-width: 42px !important;
  object-position: left center;
  width: 42px !important;
}

.temta-mark,
.temta-login-mark {
  align-items: center;
  background: var(--temta-primary);
  color: #ffffff;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
}

.temta-mark {
  border-radius: 3px;
  font-size: 0.8rem;
  height: 30px;
  width: 34px;
}

.temta-login-mark {
  border-radius: 4px;
  font-size: 1.8rem;
  height: 56px;
  width: 56px;
}

.sidebar .sidebar-nav {
  /* The sidebar scrolls independently of the page and stays above the funding footer. */
  height: calc(100vh - 55px - 64px);
  max-height: calc(100dvh - 55px - 64px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-bottom: 1rem;
  scrollbar-width: thin;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
  background: var(--temta-primary-dark);
}

.btn-primary,
.badge-primary {
  background-color: var(--temta-primary);
  border-color: var(--temta-primary);
}

.btn-primary:hover {
  background-color: var(--temta-primary-dark);
  border-color: var(--temta-primary-dark);
}

.temta-intro {
  border-top: 3px solid var(--temta-accent);
}

.temta-panel {
  background: #f4f7f9;
  border: 1px solid #d8dbe0;
  border-radius: 4px;
  padding: 1.25rem;
}

.login-page {
  background: #ecf0f5;
}

/* Riot custom elements are direct children of the flex-based auth layout.
   Give them a real width so Bootstrap columns do not shrink to their content. */
.login-page > auth-login,
.login-page > auth-register {
  display: block;
  flex: 0 1 100%;
  width: 100%;
  min-width: 0;
}

.login-page > auth-login > .container,
.login-page > auth-register > .container {
  width: 100%;
}

@media (max-width: 575.98px) {
  .login-page > auth-login > .container,
  .login-page > auth-register > .container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

.disabled {
  cursor: default;
  opacity: 0.72;
}

.temta-language-switch {
  align-items: center;
  color: var(--temta-muted);
  display: flex;
  flex: 0 0 auto;
  font-size: 0.78rem;
  gap: 0.35rem;
  margin-right: 1rem;
  text-transform: uppercase;
}

.temta-language-switch a {
  border: 1px solid #d8dbe0;
  color: var(--temta-ink);
  line-height: 1;
  padding: 0.3rem 0.4rem;
  text-decoration: none;
}

.temta-language-switch a.active,
.temta-language-switch a:hover {
  background: var(--temta-primary);
  border-color: var(--temta-primary);
  color: #ffffff;
}

.temta-hero,
.temta-module-header {
  background: var(--temta-surface);
  border-top: 3px solid var(--temta-accent);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  padding: 1.5rem;
  overflow-wrap: anywhere;
}

.temta-hero h1,
.temta-module-header h1 {
  color: var(--temta-ink);
  font-weight: 700;
}

.temta-main-title {
  font-size: 2.45rem;
  line-height: 1.12;
}

.temta-status-grid {
  border: 1px solid #d8dbe0;
  display: grid;
  gap: 0;
}

.temta-status-grid > div {
  padding: 0.8rem 1rem;
}

.temta-status-grid > div + div {
  border-top: 1px solid #d8dbe0;
}

.temta-status-grid span,
.temta-status-grid strong {
  display: block;
}

.temta-status-grid strong {
  color: var(--temta-ink);
  overflow-wrap: anywhere;
}

.temta-metric-row > [class*="col-"] {
  display: flex;
}

.temta-metric {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
}

.temta-metric .card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 150px;
}

.temta-metric i {
  color: var(--temta-primary);
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.temta-metric span,
.temta-metric strong {
  display: block;
}

.temta-metric span {
  color: var(--temta-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.temta-metric strong {
  color: var(--temta-ink);
  font-size: 0.95rem;
  line-height: 1.35;
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
}

.temta-process-visual {
  background: #ffffff;
  border: 1px solid #d8dbe0;
  border-top: 3px solid var(--temta-accent);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  padding: 1rem;
}

.temta-process-visual img {
  display: block;
  height: auto;
  margin: 0 auto;
  width: 100%;
}

.temta-logo-card .card-body {
  padding-bottom: 0.75rem;
}

.temta-logo-grid {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.temta-logo-item {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e7ea;
  color: inherit;
  display: flex;
  height: 96px;
  justify-content: center;
  margin-bottom: 0.5rem;
  padding: 1rem;
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.temta-logo-item:hover {
  border-color: var(--temta-accent);
  box-shadow: 0 0.25rem 0.75rem rgba(31, 111, 139, 0.12);
  text-decoration: none;
  transform: translateY(-1px);
}

.temta-logo-item img {
  max-height: 64px;
  max-width: 100%;
  object-fit: contain;
}

/* Footer participates in document flow so it never hides forms or buttons. */
.main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 55px);
  padding-bottom: 0;
}
.main > .container-fluid {
  flex: 1 0 auto;
}
.temta-footer {
  align-items: center;
  background: #ffffff;
  border-top: 1px solid #d8dbe0;
  display: flex;
  flex-shrink: 0;
  gap: 1.75rem;
  height: 100px;
  justify-content: center;
  margin-top: auto;
  padding: 0.35rem 1rem;
  position: static;
  width: 100%;
}

.temta-footer img {
  display: block;
  width: auto;
  height: 88px;
  max-height: 88px;
  max-width: min(44vw, 170px);
  object-fit: contain;
}

@media (max-width: 575px) {
  .temta-footer { height: 76px; gap: 0.75rem; padding: 0.25rem 0.5rem; }
  .temta-footer img { height: 65px; max-height: 65px; max-width: 44vw; }
}

/* Footer is not fixed; no artificial bottom spacer is required. */

.temta-timeline {
  display: grid;
  gap: 1rem;
}

.temta-timeline > div {
  border-left: 3px solid var(--temta-accent);
  padding-left: 1rem;
  position: relative;
}

.temta-timeline span {
  align-items: center;
  background: var(--temta-primary);
  color: #ffffff;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  height: 1.6rem;
  justify-content: center;
  margin-bottom: 0.55rem;
  width: 1.6rem;
}

.temta-timeline p {
  color: var(--temta-muted);
  margin-bottom: 0;
}

.temta-check-list {
  list-style: none;
  padding-left: 0;
}

.temta-check-list li {
  line-height: 1.45;
  padding-left: 1.5rem;
  position: relative;
}

.temta-check-list li + li {
  margin-top: 0.65rem;
}

.temta-check-list li::before {
  color: var(--temta-accent);
  content: "\f00c";
  font-family: FontAwesome;
  left: 0;
  position: absolute;
  top: 0.03rem;
}

.temta-option {
  border: 1px solid #d8dbe0;
  color: var(--temta-ink);
  display: block;
  margin-bottom: 1rem;
  min-height: 158px;
  padding: 1rem;
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
  overflow-wrap: anywhere;
}

.temta-option:hover {
  border-color: var(--temta-accent);
  box-shadow: 0 0.25rem 0.75rem rgba(31, 111, 139, 0.12);
  color: var(--temta-ink);
  text-decoration: none;
  transform: translateY(-1px);
}

.temta-option i {
  color: var(--temta-primary);
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.85rem;
}

.temta-option strong,
.temta-option span {
  display: block;
}

.temta-option span {
  color: var(--temta-muted);
  font-size: 0.9rem;
  line-height: 1.35;
  margin-top: 0.45rem;
}

.temta-option em {
  color: var(--temta-primary-dark);
  display: block;
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 700;
  margin-top: 0.85rem;
  text-transform: uppercase;
}

.temta-option em i {
  display: inline;
  font-size: 0.78rem;
  margin-bottom: 0;
  margin-right: 0.25rem;
}

.temta-module-header {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
}

.temta-module-state {
  align-items: center;
  border: 1px solid #d8dbe0;
  color: var(--temta-ink);
  display: flex;
  flex: 0 0 auto;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
}

.temta-module-state i {
  color: var(--temta-primary);
  font-size: 1.5rem;
}

.temta-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.temta-action-row .btn {
  min-width: 150px;
}

@media (max-width: 991.98px) {
  .app-header.navbar {
    padding-right: 0.5rem;
  }

  .app-header.navbar .navbar-brand.temta-brand {
    margin-left: 0;
  }

  .breadcrumb {
    white-space: normal;
  }

  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .temta-hero,
  .temta-module-header {
    padding: 1.25rem;
  }

  .temta-main-title {
    font-size: 2.05rem;
  }

  .lead {
    font-size: 1rem;
  }

  .temta-logo-grid {
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  }

  .temta-process-visual {
    padding: 0.75rem;
  }

  .temta-logo-item {
    height: 88px;
    padding: 0.8rem;
  }

  .temta-logo-item img {
    max-height: 56px;
  }

  .temta-metric-row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 767.98px) {
  .sidebar .sidebar-nav {
    height: calc(100vh - 55px - 56px);
    max-height: calc(100dvh - 55px - 56px);
  }

  .app-header.navbar {
    flex-wrap: wrap;
  }

  .app-header.navbar .navbar-nav {
    align-items: center;
    flex-direction: row;
    min-width: 0;
  }

  .temta-main-title {
    font-size: 1.8rem;
  }

  .app-header.navbar .navbar-brand.temta-brand .temta-brand-logo {
    max-width: 130px !important;
    width: 130px !important;
  }

  .temta-language-switch {
    gap: 0.25rem;
    margin-right: 0.25rem;
  }

  .temta-language-switch a {
    padding: 0.35rem 0.45rem;
  }

  .breadcrumb {
    font-size: 0.82rem;
    margin-bottom: 1rem;
    padding: 0.65rem 1rem;
  }

  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .card-header,
  .card-body {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .temta-hero,
  .temta-module-header {
    padding: 1rem;
  }

  .temta-status-grid > div {
    padding: 0.7rem 0.85rem;
  }

  .temta-metric .card-body {
    min-height: 136px;
  }

  .temta-logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .temta-logo-item {
    height: 82px;
    padding: 0.65rem;
  }

  .temta-logo-item img {
    max-height: 50px;
  }

  .temta-module-header {
    align-items: stretch;
    display: block;
  }

  .temta-module-state {
    margin-top: 1rem;
  }

  .temta-action-row .btn {
    width: 100%;
  }

  .temta-footer {
    height: 56px;
    justify-content: center;
    padding: 0.45rem 1rem;
  }

  .temta-footer img {
    max-height: 38px;
  }
}

@media (max-width: 374.98px) {
  .app-header.navbar .navbar-brand.temta-brand .temta-brand-logo {
    max-width: 112px !important;
    width: 112px !important;
  }

  .temta-main-title {
    font-size: 1.55rem;
  }

  .temta-logo-grid {
    grid-template-columns: 1fr;
  }
}
