/* -------------------------------------------------
   Root variables
------------------------------------------------- */
:root {
  /* Brand colors */
  --bs-primary: #003054;
  --bs-primary-rgb: 0, 48, 84;

  --bs-secondary: #005594;
  --bs-secondary-rgb: 0, 85, 148;

  --bs-link-color: #003054;
  --bs-link-hover-color: #005594;

  /* Typography */
  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bs-body-font-family: var(--bs-font-sans-serif);
  --bs-body-font-size: 0.95rem;
  --bs-body-font-weight: 400;
  --bs-body-line-height: 1.55;

  /* Headings */
  --bs-heading-color: #003054;
}

/* -------------------------------------------------
   Base document and layout
------------------------------------------------- */
html, body {
  height: 100%;
}

body {
  color: #1f2933;
  background-color: #ffffff;
}

body.tm-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tm-content {
  flex: 1 0 auto;
}

/* Footer stays at bottom when content is short */
.tm-footer {
  margin-top: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* -------------------------------------------------
   Buttons
------------------------------------------------- */
.btn-outline-white {
  --bs-btn-color: #ffffff;
  --bs-btn-border-color: #ffffff;

  /* Hover: fade to white background smoothly */
  --bs-btn-hover-color: #002b4e;
  --bs-btn-hover-bg: color-mix(in srgb, #ffffff 85%, transparent);
  --bs-btn-hover-border-color: #ffffff;

  /* Active: slightly darker white */
  --bs-btn-active-color: #002b4e;
  --bs-btn-active-bg: color-mix(in srgb, #ffffff 85%, #e3edf6);
  --bs-btn-active-border-color: #ffffff;

  background-color: transparent;
  color: #ffffff;
  border: 1px solid #ffffff;
  font-weight: 600;

  transition:
    background-color 0.50s ease,
    border-color 0.35s ease,
    box-shadow 0.25s ease,
    transform 0.05s ease;
}

/* Tactile press */
.btn-outline-white:active {
  transform: translateY(1px);
}

.btn-primary {
  --bs-btn-color: #ffffff;
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);

  /* Slightly lighter on hover */
  --bs-btn-hover-color: #ffffff;
  --bs-btn-hover-bg: color-mix(in srgb, var(--bs-primary) 85%, white);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--bs-primary) 92%, white);

  /* Slightly darker when pressed */
  --bs-btn-active-color: #ffffff;
  --bs-btn-active-bg: color-mix(in srgb, var(--bs-primary) 85%, black);
  --bs-btn-active-border-color: color-mix(in srgb, var(--bs-primary) 85%, black);

  --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);

  font-weight: 600;

  transition:
    background-color 0.50s ease,
    border-color 0.35s ease,
    box-shadow 0.25s ease,
    transform 0.05s ease;
}

.btn-primary:active {
  transform: translateY(1px);
}

/* Register button on dark header */
.tm-btn-primary {
  background-color: #ffffff;
  border-color: #ffffff;
  color: #002b4e;
  font-weight: 500;
  border-radius: 0.375rem;
  padding: 0.55rem 1.05rem;
}

.tm-btn-primary:hover,
.tm-btn-primary:focus {
  background-color: #e3edf6;
  border-color: #e3edf6;
  color: #002b4e;
}

/* -------------------------------------------------
   Topbar
------------------------------------------------- */
.tm-topbar {
  height: 34px;
  background-color: #002444;
  display: flex;
  align-items: center;
}

.tm-topbar-inner {
  display: flex;
  justify-content: flex-end;
}

.tm-topbar-text {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
}

.tm-profile-link {
  color: #ffffff;
  margin-right: 0.5rem;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.tm-profile-link:hover {
  color: #cfe3f3;
}

.tm-topbar-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

.tm-topbar-link:hover {
  color: #cfe3f3;
  text-decoration: underline;
}

.tm-topbar-sep {
  color: #cfe3f3;
  margin: 0 0.4rem;
}

/* -------------------------------------------------
   Main header and navbar
------------------------------------------------- */
.tm-navbar {
  background-color: #002b4e;
  border-bottom: none;
}

.tm-navbar .container {
  align-items: center;
}

/* Logo sizing stays the same */
.tm-logo {
  height: 42px;
  width: auto;
}

/* Nav links on dark header */
.tm-nav-link {
  color: #ffffff;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
}

.tm-nav-link:hover,
.tm-nav-link:focus {
  color: #c7d9ea;
}

/* -------------------------------------------------
   Hero
------------------------------------------------- */
.tm-hero {
  background-image: url("/resources/images/tarkett-banner.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  background-attachment: fixed; /* parallax style scroll effect */

  min-height: 620px; /* taller banner */

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.tm-hero .container {
  display: flex;
  justify-content: center;
}

.tm-hero-content {
  max-width: 760px;
  color: #ffffff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.tm-hero-content h1 {
  font-size: 2.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.tm-hero-content p {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
  color: #f1f5f9;
}

/* Mobile and iOS friendliness:
   background-attachment: fixed is unreliable on mobile Safari */
@media (max-width: 991.98px) {
  .tm-hero {
    min-height: 460px;
    background-attachment: scroll;
  }

  .tm-hero-content h1 {
    font-size: 2.1rem;
  }
}

/* -------------------------------------------------
   Footer
------------------------------------------------- */
.tm-footer {
  background-color: #002444;
  padding: 1.5rem 0;
  margin-top: auto;
}

/* Force readable text */
.tm-footer-text {
  color: #ffffff !important;
}

/* Footer links */
.tm-footer-link {
  color: #ffffff !important;
  font-weight: 500;
  text-decoration: none;
}

.tm-footer-link:hover {
  color: #cfe3f3 !important;
  text-decoration: underline;
}

/* Admin stats cards */
.tm-stat {
  border-left: 4px solid transparent;
}

.tm-stat-total {
  border-left-color: var(--bs-primary);
}

.tm-stat-active {
  border-left-color: #198754 important!; /* Bootstrap success */
}

.tm-stat-disabled {
  border-left-color: #6c757d; /* Bootstrap secondary */
}

.tm-stat-role {
  border-left-color: #0dcaf0; /* Bootstrap info */
}

.tm-stat .tm-stat-value {
  font-size: 1.6rem;
  font-weight: 600;
}

.tm-stat .tm-stat-label {
  font-size: 0.85rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
