/**
 * Rapid Rollouts HRMS — Mark 1 brand overlay
 * Source: /Applications/MAMP/htdocs/RR_Brand (do not invent alternate marks)
 * Additive only — does not edit Metronic style.bundle.css
 *
 * Chrome modes (data-rr-chrome):
 * - default: dark sidebar + light content
 * - light: light sidebar + light content
 * - dark: dark sidebar + dark content
 */
:root {
  --brand: #1364E8;
  --brand-2: #071543;
  --rr-azure: #1364E8;
  --rr-azure-highlight: #449AF7;
  --rr-navy: #071543;
  --rr-navy-mid: #284173;
  --ink: #0B1220;
  --muted: #5B6578;
  --line: #E6E8EE;
  --surface: #FFFFFF;
  --bg-sidebar: #F7F8FB;
}

/* Light sidebar chrome */
[data-kt-app-layout="light-sidebar"] .app-sidebar {
  background-color: var(--bg-sidebar) !important;
  border-right: 1px solid var(--line);
}

[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-link {
  color: var(--ink);
}

[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-link .menu-icon,
[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-link .menu-title {
  color: inherit;
}

[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-link:hover,
[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-link.active {
  color: var(--brand) !important;
}

[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-link.active {
  background-color: rgba(19, 100, 232, 0.08);
}

[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-link.active .menu-icon i,
[data-kt-app-layout="light-sidebar"] .app-sidebar .menu-link.active .menu-title {
  color: var(--brand) !important;
}

/* Brand logo block (sidebar) */
.rr-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none !important;
}

.rr-brand-mark-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.rr-brand-mark {
  width: 48px;
  height: 48px;
  display: block;
}

.rr-brand-mark--on-dark {
  display: none;
}

[data-kt-app-layout="dark-sidebar"] .rr-brand-mark--default {
  display: none;
}

[data-kt-app-layout="dark-sidebar"] .rr-brand-mark--on-dark {
  display: block;
}

.rr-brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
  min-width: 0;
}

.rr-brand-title {
  font-family: Outfit, Manrope, Inter, system-ui, sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--brand-2);
  letter-spacing: 0.01em;
}

.rr-brand-title em {
  font-style: normal;
  font-weight: 700;
}

.rr-brand-product {
  font-family: Outfit, Manrope, Inter, system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-top: 4px;
}

[data-kt-app-layout="dark-sidebar"] .rr-brand-title {
  color: #ffffff;
}

[data-kt-app-layout="dark-sidebar"] .rr-brand-product {
  color: #449AF7;
}

/* Auth brand */
.rr-auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(19, 100, 232, 0.08), transparent 42%),
    radial-gradient(circle at 88% 82%, rgba(7, 21, 67, 0.05), transparent 48%),
    linear-gradient(180deg, #ffffff 0%, #F7F8FB 100%);
}

.rr-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 1.15rem;
  text-decoration: none !important;
}

.rr-auth-brand .rr-brand-mark {
  width: 112px;
  height: 112px;
}

.rr-auth-brand .rr-brand-title {
  font-size: 2.35rem;
}

.rr-auth-brand .rr-brand-product {
  font-size: 0.95rem;
  margin-top: 6px;
}

.rr-auth-tagline {
  color: var(--muted, #5B6578);
  font-size: 18px;
  font-weight: 500;
  margin: 0;
  max-width: 480px;
  text-align: center;
}

.rr-auth-panel {
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rr-auth-panel .rr-auth-brand {
  justify-content: center;
  margin-bottom: 1.25rem;
}

.rr-auth-card {
  background: #ffffff;
  border: 1px solid var(--line, #E6E8EE);
  box-shadow: 0 12px 40px rgba(7, 21, 67, 0.08);
  width: 100%;
}

.rr-auth-links {
  font-size: 12px;
  color: var(--muted, #5B6578);
  text-align: center;
  line-height: 1.7;
}

.rr-auth-attribution {
  font-size: 12px;
  color: var(--muted, #5B6578);
  text-align: center;
  margin-top: 14px;
}

.rr-auth-attribution a {
  color: var(--brand, #1364E8);
}

.rr-auth-links a,
a.rr-brand-link {
  color: var(--brand) !important;
}

.rr-auth-links a:hover,
a.rr-brand-link:hover {
  color: var(--brand-2) !important;
}

@media (max-width: 991.98px) {
  .rr-auth-brand .rr-brand-mark {
    width: 72px;
    height: 72px;
  }

  .rr-auth-brand .rr-brand-title {
    font-size: 1.55rem;
  }

  .rr-auth-brand .rr-brand-product {
    font-size: 0.8rem;
    margin-top: 4px;
  }

  .rr-auth-brand {
    gap: 0.85rem;
  }

  .rr-auth-tagline {
    font-size: 15px;
    line-height: 1.4;
    padding: 0 0.5rem;
  }

  .rr-auth-aside {
    min-height: auto !important;
    padding: 2.75rem 1.2rem 1.15rem !important;
    justify-content: center;
  }

  .rr-auth-panel {
    transform: none !important;
  }

  .rr-auth-panel .rr-auth-brand {
    margin-bottom: 0.85rem;
  }

  /* Outer column: balanced side gutter without squeezing fields */
  .rr-auth-form-col {
    padding: 0.35rem 1.2rem 1.35rem !important;
    width: 100%;
    max-width: 100%;
    align-items: stretch !important;
  }

  .rr-auth-card {
    max-width: 100% !important;
    width: 100% !important;
    padding: 1.35rem 1.15rem !important;
    border-radius: 1rem !important;
    box-shadow: 0 8px 24px rgba(7, 21, 67, 0.06);
  }

  .rr-auth-card > .d-flex.flex-column,
  .rr-auth-card .form {
    width: 100%;
    max-width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .rr-auth-card .form-control,
  .rr-auth-card .form-select,
  .rr-auth-card .btn {
    width: 100%;
  }

  .rr-auth-card .form-control,
  .rr-auth-card .form-select {
    min-height: 2.75rem;
    font-size: 16px; /* avoid iOS zoom */
  }

  .rr-auth-card .btn {
    min-height: 2.75rem;
  }

  .rr-auth-attribution {
    padding: 0 0.25rem;
  }
}

/* Primary accents without rebuilding Metronic */
.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-2);
  --bs-btn-hover-border-color: var(--brand-2);
  --bs-btn-active-bg: var(--brand-2);
  --bs-btn-active-border-color: var(--brand-2);
}

.link-primary,
.text-primary {
  color: var(--brand) !important;
}

.form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

/* ---- Dark content readability ---- */
[data-bs-theme="dark"] {
  --ink: #E8ECF4;
  --muted: #A7B0C0;
  --line: #2C3548;
  --surface: #1B2233;
  --bg-sidebar: #151A27;
}

[data-bs-theme="dark"] .app-main,
[data-bs-theme="dark"] .app-content,
[data-bs-theme="dark"] #kt_app_content {
  color: var(--ink);
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .card-flush,
[data-bs-theme="dark"] .bg-body,
[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .menu-sub-dropdown {
  background-color: var(--surface) !important;
  color: var(--ink);
  border-color: var(--line) !important;
}

[data-bs-theme="dark"] .text-gray-800,
[data-bs-theme="dark"] .text-gray-900,
[data-bs-theme="dark"] .text-dark,
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .fw-bold.text-gray-800 {
  color: var(--ink) !important;
}

[data-bs-theme="dark"] .text-gray-500,
[data-bs-theme="dark"] .text-gray-600,
[data-bs-theme="dark"] .text-muted {
  color: var(--muted) !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .form-control.bg-transparent {
  background-color: #121722 !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .table > :not(caption) > * > * {
  color: var(--ink);
  border-color: var(--line);
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--ink);
}

[data-bs-theme="dark"] .btn-light,
[data-bs-theme="dark"] .btn-white,
[data-bs-theme="dark"] .btn-light-primary,
[data-bs-theme="dark"] .btn-bg-light {
  background-color: #243049 !important;
  border-color: #243049 !important;
  color: #E8ECF4 !important;
}

[data-bs-theme="dark"] .btn-light-primary:hover,
[data-bs-theme="dark"] .btn-light:hover {
  background-color: #2e3c5a !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .btn-primary {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

[data-bs-theme="dark"] .separator {
  border-color: var(--line) !important;
}

[data-bs-theme="dark"] .rr-user-initials {
  background: #243049;
  color: #E8ECF4;
  border-color: #33415c;
}

[data-bs-theme="dark"] .rr-platform-menu-btn {
  background: #1B2233;
  border-color: var(--line);
  color: var(--ink);
}

[data-bs-theme="dark"] .badge-light,
[data-bs-theme="dark"] .badge-light-primary,
[data-bs-theme="dark"] .badge-light-success,
[data-bs-theme="dark"] .badge-light-danger,
[data-bs-theme="dark"] .badge-light-warning,
[data-bs-theme="dark"] .badge-light-info {
  filter: none;
  opacity: 1;
}

[data-bs-theme="dark"] .page-title,
[data-bs-theme="dark"] .breadcrumb-item,
[data-bs-theme="dark"] .breadcrumb-item a {
  color: var(--muted) !important;
}

/* Subtle chrome / appearance applied toast */
.rr-chrome-toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 1090;
  max-width: min(90vw, 20rem);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: var(--brand-2, #071543);
  color: #fff;
  font-family: Outfit, Manrope, Inter, system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 8px 24px rgba(7, 21, 67, 0.22);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rr-chrome-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

[data-bs-theme="dark"] .rr-chrome-toast {
  background: #243049;
  color: #E8ECF4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

@media (max-width: 991.98px) {
  .rr-chrome-toast {
    bottom: calc(var(--rr-tabbar-h, 4.85rem) + env(safe-area-inset-bottom, 0px) + 0.65rem);
  }
}
