/* Fast Route — Logistics Admin Design System */

:root {
  --fr-ink: #07111f;
  --fr-ink-2: #0e1a2e;
  --fr-panel: #122036;
  --fr-line: rgba(148, 183, 214, 0.14);
  --fr-mist: #e8eef5;
  --fr-surface: #f5f8fc;
  --fr-card: #ffffff;
  --fr-text: #0f1c2e;
  --fr-muted: #5a6f86;
  --fr-accent: #0f9d8a;
  --fr-accent-2: #12c4ab;
  --fr-signal: #ff5a3c;
  --fr-sky: #3d8bfd;
  --fr-success: #1a9f6e;
  --fr-warn: #d97706;
  --fr-card-border: var(--fr-card-border);
  --fr-line-soft: var(--fr-line-soft);
  --fr-line-med: var(--fr-line-med);
  --fr-line-strong: var(--fr-line-strong);
  --fr-tint-2: var(--fr-tint-2);
  --fr-field-bg: #f5f8fc;
  --fr-hover: rgba(15, 157, 138, 0.06);
  --fr-radius: 14px;
  --fr-radius-sm: 10px;
  --fr-sidebar-w: 280px;
  --fr-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fr-font: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --fr-display: "Space Grotesk", "Cairo", sans-serif;
  --fr-shadow: 0 18px 40px rgba(7, 17, 31, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

body.fr-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--fr-font);
  color: var(--fr-text);
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(18, 196, 171, 0.12), transparent 55%),
    radial-gradient(700px 420px at -5% 30%, rgba(61, 139, 253, 0.1), transparent 50%),
    linear-gradient(165deg, #dfe8f2 0%, var(--fr-mist) 40%, #f7fafc 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html.fr-nav-lock,
body.fr-nav-lock {
  overflow: hidden;
  touch-action: none;
}

a { color: var(--fr-accent); text-decoration: none; transition: color 0.2s var(--fr-ease); }
a:hover { color: var(--fr-ink); }

/* ——— App shell ——— */
.fr-app {
  display: flex;
  min-height: 100vh;
}

.fr-sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 1040;
  width: var(--fr-sidebar-w);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(18, 196, 171, 0.08) 0%, transparent 28%),
    linear-gradient(165deg, var(--fr-ink) 0%, var(--fr-ink-2) 55%, #0a1628 100%);
  color: #e8f0f8;
  border-inline-end: 1px solid var(--fr-line);
  transform: translate3d(0, 0, 0);
  transition: transform 0.35s var(--fr-ease), visibility 0.35s;
  will-change: transform;
}

.fr-sidebar__brand {
  padding: 1.35rem 1.25rem 1rem;
  border-bottom: 1px solid var(--fr-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.fr-sidebar__close {
  display: none;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(148, 183, 214, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #e8f0f8;
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.fr-sidebar__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.fr-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  flex: 1;
}

.fr-logo:hover { color: #fff; }

.fr-logo__mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--fr-accent-2);
  background: rgba(18, 196, 171, 0.12);
  border: 1px solid rgba(18, 196, 171, 0.35);
  border-radius: 12px;
  animation: frPulseMark 3.5s ease-in-out infinite;
}

.fr-logo__mark svg { width: 26px; height: 26px; }

.fr-logo__text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }

.fr-logo__name {
  font-family: var(--fr-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.fr-logo__tag {
  font-size: 0.72rem;
  color: rgba(200, 220, 240, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fr-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.85rem 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 183, 214, 0.25) transparent;
}

.fr-nav__group { margin-bottom: 1.15rem; }

.fr-nav__label {
  margin: 0 0.65rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(148, 183, 214, 0.55);
}

.fr-nav__link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.75rem;
  margin-bottom: 0.2rem;
  border-radius: var(--fr-radius-sm);
  color: rgba(230, 240, 250, 0.82);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s var(--fr-ease), color 0.2s, border-color 0.2s, transform 0.2s var(--fr-ease);
}

.fr-nav__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.06);
  transform: translateX(-2px);
}

html[dir="ltr"] .fr-nav__link:hover { transform: translateX(2px); }

.fr-nav__link.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(18, 196, 171, 0.22), rgba(18, 196, 171, 0.06));
  border-color: rgba(18, 196, 171, 0.35);
  box-shadow: inset -3px 0 0 var(--fr-accent-2);
}

html[dir="ltr"] .fr-nav__link.is-active {
  box-shadow: inset 3px 0 0 var(--fr-accent-2);
}

.fr-nav__icon {
  width: 1.25rem;
  text-align: center;
  opacity: 0.7;
  font-size: 0.8rem;
}

.fr-sidebar__foot {
  padding: 0.9rem 1rem 1.1rem;
  border-top: 1px solid var(--fr-line);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.fr-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  flex: 1;
}

.fr-user__avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--fr-ink);
  background: linear-gradient(135deg, var(--fr-accent-2), #7ee8d4);
  flex-shrink: 0;
}

.fr-user__meta { min-width: 0; display: flex; flex-direction: column; }

.fr-user__name {
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fr-user__role {
  font-size: 0.7rem;
  color: rgba(180, 205, 225, 0.6);
}

.fr-logout {
  border: 1px solid rgba(255, 90, 60, 0.35);
  background: rgba(255, 90, 60, 0.1);
  color: #ffb4a4;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.fr-logout:hover {
  background: rgba(255, 90, 60, 0.22);
  color: #fff;
}

/* ——— Shell / topbar ——— */
.fr-shell {
  flex: 1;
  min-width: 0;
  margin-inline-start: var(--fr-sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.fr-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  padding-inline-end: max(1.5rem, env(safe-area-inset-right));
  padding-inline-start: max(1.5rem, env(safe-area-inset-left));
  background: var(--fr-topbar-bg, rgba(245, 248, 252, 0.88));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--fr-line-soft);
}

.fr-topbar__title {
  min-width: 0;
  flex: 1;
}

.fr-topbar__title h1 {
  margin: 0;
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fr-topbar__brand-mobile {
  display: none;
  margin-inline-start: auto;
  font-family: var(--fr-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--fr-muted);
}

.fr-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 1px solid var(--fr-line-strong);
  background: var(--fr-card);
  border-radius: 11px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.fr-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--fr-ink);
  border-radius: 2px;
  transition: transform 0.25s var(--fr-ease), opacity 0.2s;
}

.fr-app.is-sidebar-open .fr-menu-btn span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.fr-app.is-sidebar-open .fr-menu-btn span:nth-child(2) {
  opacity: 0;
}
.fr-app.is-sidebar-open .fr-menu-btn span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.fr-content {
  flex: 1;
  width: 100%;
  max-width: 100%;
  padding: 1.5rem 1.75rem 2.5rem;
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  animation: frFadeUp 0.45s var(--fr-ease) both;
  overflow-x: clip;
}

.fr-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1035;
  background: rgba(7, 17, 31, 0.45);
  backdrop-filter: blur(2px);
}

/* ——— Buttons ——— */
.btn-fr,
.fr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--fr-accent) 0%, #0b7f70 100%);
  border: none;
  color: #fff !important;
  font-family: inherit;
  font-weight: 700;
  padding: 0.65rem 1.15rem;
  border-radius: var(--fr-radius-sm);
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(15, 157, 138, 0.28);
  transition: transform 0.2s var(--fr-ease), box-shadow 0.2s, filter 0.2s;
}

.btn-fr:hover,
.fr-btn:hover {
  color: #fff !important;
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(15, 157, 138, 0.35);
}

.btn-fr:active,
.fr-btn:active { transform: translateY(0); }

.btn:focus,
.btn-fr:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(15, 157, 138, 0.25);
  border-color: var(--fr-accent);
  outline: none;
}

/* ——— Cards / surfaces ——— */
.fr-card,
.card {
  background: var(--fr-card);
  border: 1px solid var(--fr-card-border);
  border-radius: var(--fr-radius) !important;
  box-shadow: var(--fr-shadow);
}

.fr-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fr-page-head h1,
.fr-page-head h2 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.fr-page-head p {
  margin: 0.35rem 0 0;
  color: var(--fr-muted);
}

/* ——— Dashboard ——— */
.fr-dash-hero {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--fr-radius) + 4px);
  padding: 1.75rem 1.75rem 1.6rem;
  margin-bottom: 1.5rem;
  color: #eef6ff;
  background:
    radial-gradient(600px 280px at 0% 0%, rgba(18, 196, 171, 0.35), transparent 55%),
    radial-gradient(500px 260px at 100% 100%, rgba(61, 139, 253, 0.28), transparent 50%),
    linear-gradient(135deg, #07111f 0%, #122036 55%, #0a1a30 100%);
  border: 1px solid rgba(148, 183, 214, 0.12);
  animation: frFadeUp 0.5s var(--fr-ease) both;
}

.fr-dash-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(18, 196, 171, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 196, 171, 0.07) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(120deg, rgba(0,0,0,0.55), transparent 70%);
  pointer-events: none;
  animation: frGridDrift 18s linear infinite;
}

.fr-dash-hero__inner { position: relative; z-index: 1; }

.fr-dash-hero__brand {
  font-family: var(--fr-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 0.35rem;
  line-height: 1.1;
}

.fr-dash-hero__brand span {
  color: var(--fr-accent-2);
}

.fr-dash-hero__sub {
  margin: 0;
  max-width: 36rem;
  color: rgba(210, 228, 245, 0.78);
  font-size: 1rem;
  font-weight: 500;
}

.fr-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.fr-kpi {
  position: relative;
  overflow: hidden;
  background: var(--fr-card);
  border: 1px solid var(--fr-card-border);
  border-radius: var(--fr-radius);
  padding: 1.15rem 1.2rem 1.05rem;
  box-shadow: var(--fr-shadow);
  transition: transform 0.25s var(--fr-ease), box-shadow 0.25s;
  animation: frFadeUp 0.55s var(--fr-ease) both;
}

.fr-kpi:nth-child(1) { animation-delay: 0.04s; }
.fr-kpi:nth-child(2) { animation-delay: 0.08s; }
.fr-kpi:nth-child(3) { animation-delay: 0.12s; }
.fr-kpi:nth-child(4) { animation-delay: 0.16s; }
.fr-kpi:nth-child(5) { animation-delay: 0.2s; }
.fr-kpi:nth-child(6) { animation-delay: 0.24s; }
.fr-kpi:nth-child(7) { animation-delay: 0.28s; }
.fr-kpi:nth-child(8) { animation-delay: 0.32s; }

.fr-kpi:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(7, 17, 31, 0.12);
}

.fr-kpi::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--fr-accent);
}

.fr-kpi[data-tone="sky"]::before { background: var(--fr-sky); }
.fr-kpi[data-tone="signal"]::before { background: var(--fr-signal); }
.fr-kpi[data-tone="warn"]::before { background: var(--fr-warn); }
.fr-kpi[data-tone="success"]::before { background: var(--fr-success); }

.fr-kpi__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fr-muted);
  margin-bottom: 0.35rem;
}

.fr-kpi__value,
.kpi .n {
  font-family: var(--fr-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fr-ink);
  line-height: 1.15;
}

/* legacy kpi support */
.kpi {
  background: var(--fr-card);
  border: 1px solid var(--fr-card-border);
  border-radius: var(--fr-radius);
  padding: 1.15rem;
  box-shadow: var(--fr-shadow);
}

.fr-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.85rem;
}

.fr-quick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 1.15rem 1.1rem;
  background: var(--fr-card);
  border: 1px solid var(--fr-card-border);
  border-radius: var(--fr-radius);
  color: var(--fr-text) !important;
  text-decoration: none;
  box-shadow: var(--fr-shadow);
  transition: transform 0.25s var(--fr-ease), border-color 0.2s, box-shadow 0.25s;
  animation: frFadeUp 0.6s var(--fr-ease) both;
}

.fr-quick:hover {
  color: var(--fr-ink) !important;
  transform: translateY(-3px);
  border-color: rgba(15, 157, 138, 0.35);
  box-shadow: 0 22px 44px rgba(7, 17, 31, 0.12);
}

.fr-quick__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(15, 157, 138, 0.12);
  color: var(--fr-accent);
  font-size: 1rem;
  font-weight: 800;
}

.fr-quick__label {
  font-weight: 800;
  font-size: 0.98rem;
}

.fr-section-title {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fr-muted);
}

/* ——— Tables ——— */
.table {
  --bs-table-bg: transparent;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.table > :not(caption) > * > * {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-bottom-color: var(--fr-line-soft);
}

.table thead th {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fr-muted);
  background: rgba(232, 238, 245, 0.7);
  border-bottom: 1px solid var(--fr-line-med);
  white-space: nowrap;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-bg-type: var(--fr-tint-2);
}

.table tbody tr {
  transition: background 0.15s;
}

.table tbody tr:hover > * {
  background: rgba(15, 157, 138, 0.05) !important;
}

/* Wrap bare tables when possible via sibling pattern — enhance common Index layouts */
.fr-content > .d-flex.justify-content-between.mb-3 {
  background: transparent;
  margin-bottom: 1.25rem !important;
  align-items: center;
}

.fr-content > .d-flex.justify-content-between.mb-3 h2 {
  margin: 0;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.fr-table-wrap {
  background: var(--fr-card);
  border: 1px solid var(--fr-card-border);
  border-radius: var(--fr-radius);
  box-shadow: var(--fr-shadow);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  margin-bottom: 0.5rem;
  max-width: 100%;
  position: relative;
}

.fr-table-wrap.is-scrollable {
  box-shadow:
    var(--fr-shadow),
    inset -18px 0 16px -16px rgba(7, 17, 31, 0.18);
}

.fr-table-wrap .table {
  margin-bottom: 0;
  min-width: 560px;
}

/* ——— Forms ——— */
.fr-content > h2 {
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.15rem;
}

.fr-content > form.row,
.fr-content form.row.g-2,
.fr-content form.row.g-3 {
  background: var(--fr-card);
  border: 1px solid var(--fr-card-border);
  border-radius: var(--fr-radius);
  box-shadow: var(--fr-shadow);
  padding: 1.35rem 1.25rem 1.25rem;
  margin-left: 0;
  margin-right: 0;
}

.form-control,
.form-select {
  border-radius: var(--fr-radius-sm) !important;
  border-color: var(--fr-line-strong);
  padding: 0.7rem 0.85rem;
  min-height: 44px;
  font-size: 16px; /* يمنع تكبير iOS التلقائي */
  background: var(--fr-surface);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  width: 100%;
  max-width: 100%;
}

.form-control:hover,
.form-select:hover {
  border-color: rgba(15, 157, 138, 0.35);
}

.form-control:focus,
.form-select:focus {
  background: #fff;
}

.fr-content label,
.fr-content .form-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--fr-muted);
  margin-bottom: 0.35rem;
}

/* ——— Motion ——— */
@keyframes frFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes frPulseMark {
  0%, 100% { box-shadow: 0 0 0 0 rgba(18, 196, 171, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(18, 196, 171, 0); }
}

@keyframes frGridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 36px 36px, 36px 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ——— Responsive ——— */
@media (max-width: 1199.98px) {
  .fr-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fr-content { padding-inline: 1.35rem; }
}

@media (max-width: 991.98px) {
  /* Drawer مخفي افتراضياً — RTL القائمة على اليمين فتُزاح لليمين */
  .fr-sidebar,
  html[dir="rtl"] .fr-sidebar {
    width: min(300px, 78vw);
    max-width: 300px;
    padding-bottom: env(safe-area-inset-bottom);
    transform: translate3d(105%, 0, 0);
    visibility: hidden;
    pointer-events: none;
    box-shadow: -12px 0 40px rgba(7, 17, 31, 0.35);
  }

  html[dir="ltr"] .fr-sidebar {
    transform: translate3d(-105%, 0, 0);
    box-shadow: 12px 0 40px rgba(7, 17, 31, 0.35);
  }

  .fr-app.is-sidebar-open .fr-sidebar,
  html[dir="rtl"] .fr-app.is-sidebar-open .fr-sidebar,
  html[dir="ltr"] .fr-app.is-sidebar-open .fr-sidebar {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
  }

  .fr-sidebar__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .fr-shell { margin-inline-start: 0; }

  .fr-menu-btn { display: inline-flex; }

  .fr-topbar__brand-mobile {
    display: block;
    flex-shrink: 0;
  }

  .fr-sidebar-backdrop {
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--fr-ease);
  }

  .fr-app.is-sidebar-open .fr-sidebar-backdrop {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .fr-sidebar-backdrop[hidden] {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .fr-nav__link {
    min-height: 44px;
    padding-block: 0.75rem;
  }

  .fr-topbar {
    padding-inline: 1rem;
  }

  .fr-content {
    padding: 1.15rem 1rem 2rem;
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
  }

  .fr-page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .fr-page-head h1,
  .fr-page-head h2 {
    font-size: 1.25rem;
  }

  .fr-actions {
    width: 100%;
  }

  .fr-actions .btn,
  .fr-actions .btn-fr,
  .fr-actions a.btn {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
    min-height: 44px;
  }

  .fr-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .fr-toolbar .form-control,
  .fr-toolbar .form-select,
  .fr-toolbar .btn {
    width: 100%;
    min-width: 0;
  }

  .fr-form,
  .fr-form--wide {
    max-width: 100%;
  }

  .fr-panel {
    padding: 1.1rem 1rem;
  }

  .fr-content > form.row,
  .fr-content form.row.g-2,
  .fr-content form.row.g-3 {
    padding: 1.1rem 0.95rem;
  }

  .fr-form-actions {
    flex-direction: column;
  }

  .fr-form-actions .btn,
  .fr-form-actions .btn-fr {
    width: 100%;
    min-height: 46px;
  }

  .fr-meta-row {
    flex-direction: column;
    gap: 0.55rem;
  }

  .fr-list__item {
    flex-direction: column;
    align-items: stretch;
  }

  .fr-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .btn-fr,
  .fr-btn {
    min-height: 44px;
  }

  .table > :not(caption) > * > * {
    padding: 0.7rem 0.75rem;
  }
}

@media (max-width: 767.98px) {
  .fr-detail-grid { grid-template-columns: 1fr; }

  .fr-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .fr-dash-hero {
    padding: 1.35rem 1.15rem;
    border-radius: var(--fr-radius);
  }

  .fr-dash-hero__sub {
    font-size: 0.92rem;
  }

  .fr-table-wrap .table {
    min-width: 520px;
    font-size: 0.9rem;
  }

  .fr-chip-row {
    gap: 0.35rem;
  }

  .fr-badge {
    font-size: 0.72rem;
  }
}

@media (max-width: 575.98px) {
  html { font-size: 15px; }

  .fr-content {
    padding: 0.9rem 0.75rem 1.75rem;
    padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
  }

  .fr-topbar {
    padding-inline: 0.75rem;
    gap: 0.55rem;
  }

  .fr-topbar__brand-mobile {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
  }

  .fr-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .fr-kpi {
    padding: 0.9rem 0.85rem;
  }

  .fr-kpi__value,
  .kpi .n {
    font-size: 1.35rem;
  }

  .fr-kpi__label {
    font-size: 0.72rem;
  }

  .fr-quick-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .fr-quick {
    padding: 0.95rem 0.85rem;
  }

  .fr-quick__label {
    font-size: 0.9rem;
  }

  .fr-sidebar__brand {
    padding: 1rem 1rem 0.85rem;
  }

  .fr-logo__tag {
    max-width: 9.5rem;
  }

  body.fr-body {
    background-attachment: scroll;
  }
}

/* Tablet landscape: keep drawer for consistency under 992 */
@media (min-width: 992px) and (max-width: 1199.98px) {
  :root { --fr-sidebar-w: 250px; }
  .fr-nav__link { font-size: 0.88rem; }
}

/* Large screens: comfortable reading width for forms */
@media (min-width: 1400px) {
  .fr-content {
    padding-inline: 2rem;
  }
}

/* Touch devices: disable hover lift that feels sticky */
@media (hover: none) {
  .fr-kpi:hover,
  .fr-quick:hover,
  .btn-fr:hover,
  .fr-btn:hover {
    transform: none;
  }

  .fr-nav__link:hover {
    transform: none;
  }
}

/* ——— Page chrome ——— */
.fr-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.fr-page-head h1,
.fr-page-head h2 {
  margin: 0;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.fr-page-head__meta {
  margin: 0.3rem 0 0;
  color: var(--fr-muted);
  font-weight: 500;
}

.fr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.fr-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  background: var(--fr-card);
  border: 1px solid var(--fr-card-border);
  border-radius: var(--fr-radius);
  box-shadow: var(--fr-shadow);
}

.fr-toolbar .form-control {
  min-width: min(240px, 100%);
}

.fr-btn-ghost,
.btn-outline-secondary {
  border: 1px solid var(--fr-line-strong) !important;
  background: #fff !important;
  color: var(--fr-text) !important;
  font-weight: 700;
  border-radius: var(--fr-radius-sm) !important;
  padding: 0.55rem 0.95rem;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.fr-btn-ghost:hover,
.btn-outline-secondary:hover {
  border-color: var(--fr-accent) !important;
  color: var(--fr-accent) !important;
  background: rgba(15, 157, 138, 0.06) !important;
}

.btn-outline-primary {
  border-color: rgba(15, 157, 138, 0.45) !important;
  color: var(--fr-accent) !important;
  font-weight: 700;
  border-radius: 8px !important;
}

.btn-outline-primary:hover {
  background: var(--fr-accent) !important;
  border-color: var(--fr-accent) !important;
  color: #fff !important;
}

.btn-outline-danger {
  border-radius: 8px !important;
  font-weight: 700;
}

.fr-link {
  font-weight: 700;
  color: var(--fr-accent);
  text-decoration: none;
}

.fr-link:hover { color: var(--fr-ink); text-decoration: underline; }

.fr-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(15, 157, 138, 0.12);
  color: var(--fr-accent);
}

.fr-badge--muted {
  background: rgba(90, 111, 134, 0.12);
  color: var(--fr-muted);
}

.fr-badge--signal {
  background: rgba(255, 90, 60, 0.12);
  color: var(--fr-signal);
}

.fr-badge--sky {
  background: rgba(61, 139, 253, 0.14);
  color: var(--fr-sky);
}

/* ——— Form panels ——— */
.fr-panel {
  background: var(--fr-card);
  border: 1px solid var(--fr-card-border);
  border-radius: var(--fr-radius);
  box-shadow: var(--fr-shadow);
  padding: 1.35rem 1.35rem 1.25rem;
  margin-bottom: 1.15rem;
  animation: frFadeUp 0.45s var(--fr-ease) both;
}

.fr-panel__title {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fr-muted);
}

.fr-form {
  max-width: 720px;
}

.fr-form--wide { max-width: 1100px; }

.fr-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
  padding-top: 0.35rem;
}

.fr-field {
  margin-bottom: 0.95rem;
}

.fr-field label,
.fr-field .form-label {
  display: block;
}

.fr-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

/* ——— Detail layouts ——— */
.fr-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.fr-info-card {
  background: var(--fr-card);
  border: 1px solid var(--fr-card-border);
  border-radius: var(--fr-radius);
  box-shadow: var(--fr-shadow);
  padding: 1.15rem 1.2rem;
}

.fr-info-card__label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fr-muted);
  margin-bottom: 0.45rem;
}

.fr-info-card__body {
  font-weight: 600;
  line-height: 1.65;
}

.fr-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  padding: 0.95rem 1.1rem;
  background: var(--fr-card);
  border: 1px solid var(--fr-card-border);
  border-radius: var(--fr-radius);
  box-shadow: var(--fr-shadow);
  font-weight: 600;
  color: var(--fr-muted);
}

.fr-meta-row strong { color: var(--fr-text); }

.fr-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fr-timeline__item {
  position: relative;
  padding: 0.95rem 1rem 0.95rem 1.15rem;
  border-bottom: 1px solid var(--fr-line-soft);
  background: var(--fr-card);
}

.fr-timeline__item:first-child {
  border-radius: var(--fr-radius) var(--fr-radius) 0 0;
}

.fr-timeline__item:last-child {
  border-bottom: 0;
  border-radius: 0 0 var(--fr-radius) var(--fr-radius);
}

.fr-timeline__item::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 1.15rem;
  width: 3px;
  height: 1.1rem;
  border-radius: 2px;
  background: var(--fr-accent);
}

.fr-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--fr-card);
  border: 1px solid var(--fr-card-border);
  border-radius: var(--fr-radius);
  box-shadow: var(--fr-shadow);
  overflow: hidden;
}

.fr-list__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--fr-line-soft);
}

.fr-list__item:last-child { border-bottom: 0; }

.fr-list__item.is-unread {
  background: rgba(15, 157, 138, 0.05);
}

.fr-list__item.is-unread .fr-list__title { font-weight: 800; }

.fr-list__title { font-weight: 700; margin-bottom: 0.2rem; }

.fr-list__body { color: var(--fr-muted); font-size: 0.9rem; }

.fr-list__meta { color: var(--fr-muted); font-size: 0.78rem; margin-top: 0.35rem; }

.fr-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.fr-alert {
  border: 0;
  border-radius: var(--fr-radius-sm);
  padding: 0.85rem 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.fr-alert--ok {
  background: rgba(26, 159, 110, 0.12);
  color: var(--fr-success);
}

.card-header {
  background: rgba(232, 238, 245, 0.8) !important;
  border-bottom-color: var(--fr-line-soft) !important;
  font-weight: 800;
}

/* ——— Final responsive overrides (must stay last) ——— */
@media (max-width: 991.98px) {
  .fr-page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .fr-page-head h1,
  .fr-page-head h2 {
    font-size: 1.25rem;
  }

  .fr-actions {
    width: 100%;
  }

  .fr-actions .btn,
  .fr-actions .btn-fr,
  .fr-actions a.btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 44px;
  }

  .fr-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .fr-toolbar .form-control,
  .fr-toolbar .form-select,
  .fr-toolbar .btn {
    width: 100%;
    min-width: 0 !important;
  }

  .fr-form,
  .fr-form--wide {
    max-width: 100%;
  }

  .fr-panel {
    padding: 1.1rem 1rem;
  }

  .fr-form-actions {
    flex-direction: column;
  }

  .fr-form-actions .btn,
  .fr-form-actions .btn-fr {
    width: 100%;
    min-height: 46px;
  }

  .fr-meta-row {
    flex-direction: column;
    gap: 0.55rem;
  }

  .fr-list__item {
    flex-direction: column;
    align-items: stretch;
  }

  .fr-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .fr-page-head h1,
  .fr-page-head h2 {
    font-size: 1.15rem;
  }

  .fr-page-head__meta {
    font-size: 0.88rem;
  }

  .fr-panel {
    padding: 1rem 0.85rem;
  }

  .fr-info-card {
    padding: 1rem;
  }

  .fr-list__item {
    padding: 0.9rem 0.95rem;
  }
}

@media (max-width: 360px) {
  .fr-kpi-grid,
  .fr-quick-grid {
    grid-template-columns: 1fr;
  }
}

/* ——— Form modal (CRM Users style) ——— */
.fr-form-modal {
  border: 0;
  border-radius: var(--fr-radius);
  box-shadow: 0 24px 60px rgba(7, 17, 31, 0.22);
  overflow: hidden;
}

.fr-form-modal__header {
  background: linear-gradient(135deg, var(--fr-ink) 0%, #122036 100%);
  color: #fff;
  border-bottom: 0;
}

.fr-form-modal__header .modal-title {
  font-weight: 800;
  font-size: 1.05rem;
}

.fr-form-modal__body {
  padding: 1.25rem 1.35rem 1.5rem;
  max-height: min(70vh, 720px);
}

.fr-form-modal .fr-form,
.fr-form-modal .fr-form--wide,
.fr-form-modal .fr-panel {
  max-width: none;
  box-shadow: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
}

.fr-form-modal .fr-form-actions {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--fr-line-med);
}

.fr-confirm .modal-content {
  border: 0;
  border-radius: var(--fr-radius);
  box-shadow: var(--fr-shadow);
}

.fr-confirm .modal-header {
  border-bottom-color: var(--fr-line-med);
}

.fr-confirm .modal-title {
  font-weight: 800;
}

/* ——— Design system v2: status tones, empty states, pager, skeleton ——— */

.fr-badge--success {
  background: rgba(26, 159, 110, 0.14);
  color: var(--fr-success);
}

.fr-badge--warn {
  background: rgba(217, 119, 6, 0.14);
  color: var(--fr-warn);
}

.fr-badge--danger,
.fr-badge--signal {
  background: rgba(255, 90, 60, 0.13);
  color: var(--fr-signal);
}

.fr-badge--violet {
  background: rgba(124, 92, 255, 0.13);
  color: #7c5cff;
}

.fr-badge--ink {
  background: rgba(7, 17, 31, 0.07);
  color: var(--fr-text);
}

.fr-badge i,
.fr-badge .fr-badge__dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  margin-inline-end: 0.4rem;
}

.fr-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--fr-muted);
  background: var(--fr-card);
  border: 1px dashed var(--fr-line-strong);
  border-radius: var(--fr-radius);
}

.fr-empty::before {
  content: "◌";
  font-size: 1.8rem;
  line-height: 1;
  opacity: 0.55;
}

.fr-empty--row {
  border: 0;
  background: transparent;
  padding: 1.75rem 1rem;
}

td.fr-empty-cell {
  text-align: center;
  color: var(--fr-muted);
  padding: 1.6rem 1rem !important;
  font-weight: 600;
}

/* ——— Tables ——— */
.fr-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--fr-card);
  border-bottom: 1px solid var(--fr-line-med);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--fr-muted);
  white-space: nowrap;
}

.fr-table-wrap tbody tr {
  transition: background 0.15s;
}

.fr-table-wrap tbody tr:hover {
  background: var(--fr-hover);
}

.fr-table-count {
  margin-inline-start: auto;
  color: var(--fr-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.fr-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 0.5rem 0.25rem;
}

.fr-pager button {
  min-width: 34px;
  height: 34px;
  padding: 0 0.55rem;
  border: 1px solid var(--fr-line-strong);
  border-radius: 8px;
  background: var(--fr-card);
  color: var(--fr-text);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.fr-pager button.is-active {
  background: var(--fr-accent);
  border-color: var(--fr-accent);
  color: #fff;
}

.fr-pager button:disabled {
  opacity: 0.45;
  cursor: default;
}

.fr-pager__info {
  color: var(--fr-muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin-inline: 0.5rem;
}

/* Skeleton shimmer for drawer/ajax loads */
.fr-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--fr-line-soft);
  border-radius: 8px;
  min-height: 1rem;
}

.fr-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: frShimmer 1.4s infinite;
}

@keyframes frShimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* Theme toggle button in topbar */
.fr-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--fr-line-strong);
  border-radius: 10px;
  background: var(--fr-card);
  color: var(--fr-text);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  margin-inline-start: auto;
  flex-shrink: 0;
}

.fr-theme-btn:hover { border-color: var(--fr-accent); color: var(--fr-accent); }
.fr-theme-btn svg { width: 18px; height: 18px; }

/* ——— Dark theme ——— */
html[data-theme="dark"] {
  --fr-mist: #0a1522;
  --fr-surface: #0a1522;
  --fr-card: #101e30;
  --fr-text: #e8eef5;
  --fr-muted: #93a7bd;
  --fr-card-border: rgba(148, 183, 214, 0.14);
  --fr-line-soft: rgba(148, 183, 214, 0.10);
  --fr-line-med: rgba(148, 183, 214, 0.16);
  --fr-line-strong: rgba(148, 183, 214, 0.24);
  --fr-tint-2: rgba(148, 183, 214, 0.05);
  --fr-field-bg: #0c1828;
  --fr-hover: rgba(18, 196, 171, 0.10);
  --fr-topbar-bg: rgba(10, 21, 34, 0.88);
  --fr-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

html[data-theme="dark"] body.fr-body {
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(18, 196, 171, 0.10), transparent 55%),
    radial-gradient(700px 420px at -5% 30%, rgba(61, 139, 253, 0.08), transparent 50%),
    linear-gradient(165deg, #060d17 0%, var(--fr-mist) 45%, #0b1a2c 100%);
}

html[data-theme="dark"] .fr-topbar {
  background: var(--fr-topbar-bg);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="file"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background-color: var(--fr-field-bg);
  border-color: var(--fr-line-strong);
  color: var(--fr-text);
}

html[data-theme="dark"] .form-control::placeholder { color: var(--fr-muted); }
html[data-theme="dark"] .form-control:disabled,
html[data-theme="dark"] .form-control[readonly] { background-color: #0a1322; color: var(--fr-muted); }

html[data-theme="dark"] .table {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(148, 183, 214, 0.04);
  --bs-table-hover-bg: var(--fr-hover);
  --bs-table-color: var(--fr-text);
  --bs-table-border-color: var(--fr-line-soft);
  color: var(--fr-text);
  border-color: var(--fr-line-soft);
}

html[data-theme="dark"] .table > :not(caption) > * > * {
  background-color: transparent;
  border-bottom-color: var(--fr-line-soft);
  color: var(--fr-text);
}

html[data-theme="dark"] .text-muted { color: var(--fr-muted) !important; }
html[data-theme="dark"] .text-dark { color: var(--fr-text) !important; }

html[data-theme="dark"] .fr-btn-ghost,
html[data-theme="dark"] .btn-outline-secondary {
  background: transparent !important;
  color: var(--fr-text) !important;
}

html[data-theme="dark"] .modal-content {
  background: var(--fr-card);
  color: var(--fr-text);
  border: 1px solid var(--fr-card-border);
}

html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer { border-color: var(--fr-line-med); }

html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1); }

html[data-theme="dark"] .dropdown-menu {
  background: var(--fr-card);
  border-color: var(--fr-card-border);
}

html[data-theme="dark"] .dropdown-item { color: var(--fr-text); }
html[data-theme="dark"] .dropdown-item:hover { background: var(--fr-hover); color: var(--fr-text); }

html[data-theme="dark"] .list-group-item {
  background: var(--fr-card);
  color: var(--fr-text);
  border-color: var(--fr-line-soft);
}

html[data-theme="dark"] .fr-user__role { color: rgba(147, 167, 189, 0.85); }

html[data-theme="dark"] .fr-skeleton::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

html[data-theme="dark"] .fr-badge--ink {
  background: rgba(232, 238, 245, 0.10);
}

/* Light operations dashboard */
body.fr-body { background: #f5f8fd; }
.fr-sidebar { background: #fff; color: #152544; border-inline-end: 1px solid #e5ebf4; box-shadow: -8px 0 28px rgba(37,77,140,.04); }
.fr-sidebar__brand { border-bottom-color: #edf1f7; }
.fr-logo { color: #142344; }
.fr-logo:hover { color: #1769f2; }
.fr-logo__mark { color: #fff; background: linear-gradient(135deg,#2b83ff,#1765e7); border: 0; animation: none; }
.fr-logo__tag,.fr-nav__label { color: #8a98ae; }
.fr-nav__link { color: #41516d; border-radius: 11px; padding-block: .68rem; }
.fr-nav__link:hover { color: #1769f2; background: #f2f7ff; border-color: #e3edff; }
.fr-nav__link.is-active { color: #fff; background: linear-gradient(135deg,#2e82ff,#1765e7); border-color: transparent; box-shadow: 0 8px 20px rgba(30,105,231,.2); }
.fr-nav__icon { color: currentColor; opacity: .9; }
.fr-sidebar__foot { border-top-color: #edf1f7; }
.fr-user__avatar,.fr-topbar__avatar { color: #1765e7; background: #e8f1ff; }
.fr-user__name { color: #142344; }.fr-user__role { color: #8a98ae; }
.fr-logout { color: #dc4058; background: #fff1f3; border-color: #ffdce2; }
.fr-topbar { min-height: 68px; background: rgba(255,255,255,.93); border-color: #e8edf5; padding: .65rem 1.75rem; }
.fr-content { padding: 1.35rem 1.75rem 2.5rem; }
.fr-topbar__search { width: min(460px,45vw); height: 42px; display:flex; align-items:center; gap:.65rem; padding:0 .85rem; background:#f5f8fc; border:1px solid #e9eef6; border-radius:10px; color:#8190a7; }
.fr-topbar__search input { min-width:0; flex:1; border:0; outline:0; background:transparent; color:#24324b; font-family:inherit; font-size:.82rem; }
.fr-topbar__search kbd { direction:ltr; color:#9aa7ba; background:transparent; font:600 .65rem var(--fr-font); }
.fr-topbar__actions { display:flex; align-items:center; gap:.65rem; margin-inline-start:auto; }
.fr-topbar__action { position:relative; width:40px; height:40px; display:grid; place-items:center; border:1px solid #e8edf5; border-radius:10px; background:#fff; color:#53647f; font:700 1rem var(--fr-font); }
.fr-topbar__action i { position:absolute; top:8px; inset-inline-start:8px; width:7px; height:7px; border:2px solid #fff; border-radius:50%; background:#ff4963; }
.fr-topbar__user { display:flex; align-items:center; gap:.55rem; padding-inline-start:.35rem; }
.fr-topbar__avatar { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; font-weight:800; }
.fr-topbar__user>span:last-child { display:flex; flex-direction:column; }.fr-topbar__user b { font-size:.78rem; color:#1a2945; }.fr-topbar__user small { color:#8d9ab0; font-size:.65rem; }

.fr-dashboard { max-width: 1440px; margin: 0 auto; }
.fr-dashboard__welcome { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1.15rem; }
.fr-dashboard__eyebrow { margin:0 0 .3rem!important; color:#8a99af!important; font-size:.75rem!important; }
.fr-dashboard__welcome h2 { margin:0; color:#142344; font-size:clamp(1.4rem,2.4vw,1.9rem); font-weight:800; }.fr-dashboard__welcome h2 span { font-size:.9em; }
.fr-dashboard__welcome p { margin:.3rem 0 0; color:#75849c; font-size:.85rem; }
.fr-dashboard__filters { display:flex; gap:.55rem; }.fr-dashboard__filters span,.fr-widget__head>span { padding:.55rem .8rem; border:1px solid #e3eaf4; border-radius:9px; background:#fff; color:#64748b; font-size:.72rem; font-weight:700; }
.fr-kpi-grid { gap:.9rem; margin-bottom:.9rem; }
.fr-kpi { min-height:126px; display:flex; align-items:flex-start; gap:.85rem; padding:1rem; border-color:#e6ebf4; border-radius:13px; box-shadow:0 5px 18px rgba(38,64,105,.05); }
.fr-kpi::before { display:none; }.fr-kpi:hover { transform:translateY(-2px); box-shadow:0 12px 28px rgba(38,64,105,.09); }
.fr-kpi__icon { width:45px; height:45px; flex:0 0 45px; display:grid; place-items:center; border-radius:12px; font-weight:900; font-size:1.1rem; }
.fr-kpi--blue .fr-kpi__icon{color:#1671ed;background:#e6f0ff}.fr-kpi--green .fr-kpi__icon{color:#0aaa72;background:#dcf8ed}.fr-kpi--orange .fr-kpi__icon{color:#eb8a09;background:#fff1d9}.fr-kpi--red .fr-kpi__icon{color:#eb4760;background:#ffe5e9}
.fr-kpi__label { display:block; color:#485976; margin:0 0 .18rem; font-size:.78rem; font-weight:700; }.fr-kpi__value { display:block; font-size:1.65rem; color:#11213f; }.fr-kpi small { display:block; margin-top:.35rem; color:#93a0b3; font-size:.66rem; }
.fr-dashboard__analytics { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(300px,.85fr); gap:.9rem; margin-bottom:.9rem; }
.fr-widget { background:#fff; border:1px solid #e6ebf4; border-radius:13px; box-shadow:0 5px 18px rgba(38,64,105,.05); padding:1rem; }
.fr-widget__head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:.9rem; }.fr-widget__head h3 { margin:0; color:#172643; font-size:.94rem; font-weight:800; }.fr-widget__head p { margin:.18rem 0 0; color:#91a0b4; font-size:.68rem; }
.fr-finance-summary { display:grid; grid-template-columns:repeat(3,1fr); gap:.65rem; }.fr-finance-summary>div { padding:.65rem .8rem; background:#f8faff; border-radius:9px; }.fr-finance-summary span { display:block;color:#7d8ca2;font-size:.67rem}.fr-finance-summary strong{display:inline-block;margin:.2rem 0 0;color:#1b2b48;font:700 1rem var(--fr-display)}.fr-finance-summary small{margin-inline-start:.25rem;color:#9aa7b7;font-size:.62rem}.fr-finance-summary__margin{background:#edfbf6!important}.fr-finance-summary__margin strong{color:#079b69}
.fr-mini-chart { height:130px; display:flex; align-items:flex-end; justify-content:space-around; gap:6px; padding:18px 9% 0; border-bottom:1px solid #e9eef5; background:repeating-linear-gradient(to bottom,#fff 0,#fff 31px,#eef2f7 32px); }.fr-mini-chart span { width:7%; height:var(--h); min-height:8px; border-radius:5px 5px 0 0; background:linear-gradient(#3d91ff,#176bea); }.fr-mini-chart .cost { margin-inline-start:-6%; background:linear-gradient(#63d8ba,#17ad83); opacity:.78; }
.fr-chart-legend { display:flex; justify-content:center; gap:1rem; margin-top:.6rem; color:#76859b; font-size:.65rem}.fr-chart-legend i,.fr-status-list i{display:inline-block;width:8px;height:8px;border-radius:50%;margin-inline-end:.35rem;background:#17ad83}.fr-chart-legend i.revenue{background:#2478ee}
.fr-status-chart { display:flex; align-items:center; justify-content:center; gap:1.2rem; padding:.7rem 0; }.fr-donut { width:140px;height:140px;flex:0 0 140px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#2478ee 0 calc(var(--transit)*1%),#18b685 0 calc((var(--transit) + var(--delivered))*1%),#ef5369 0); }.fr-donut>div{width:88px;height:88px;display:grid;place-content:center;text-align:center;border-radius:50%;background:#fff}.fr-donut strong{font:700 1.4rem var(--fr-display);color:#142344}.fr-donut span{color:#8795a9;font-size:.58rem}
.fr-status-list { flex:1; min-width:130px; }.fr-status-list>div { display:flex; justify-content:space-between; gap:.6rem; padding:.45rem 0; color:#53627a; font-size:.68rem; border-bottom:1px solid #f0f3f7; }.fr-status-list i.blue{background:#2478ee}.fr-status-list i.green{background:#18b685}.fr-status-list i.red{background:#ef5369}.fr-status-list strong{color:#24344f}.fr-status-list small{margin-inline-start:.25rem;color:#9aa6b8;font-weight:500}
.fr-shortcuts-widget { padding-bottom:.85rem; }.fr-quick-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:.7rem; }.fr-quick { min-height:76px; flex-direction:row; align-items:center; gap:.7rem; padding:.75rem; box-shadow:none; border-color:#edf1f6; }.fr-quick:hover { transform:translateY(-1px); box-shadow:0 7px 18px rgba(35,65,110,.07); }.fr-quick__icon{flex:0 0 40px}.fr-quick>span:nth-child(2){display:flex;flex:1;min-width:0;flex-direction:column}.fr-quick b{color:#273752;font-size:.78rem}.fr-quick small{color:#96a2b4;font-size:.62rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fr-quick em{color:#9daabc;font-style:normal;font-size:1.25rem}.fr-quick--blue .fr-quick__icon{color:#2478ee;background:#e8f1ff}.fr-quick--green .fr-quick__icon{color:#09a977;background:#e1f8f0}.fr-quick--orange .fr-quick__icon{color:#e88a0c;background:#fff1dd}.fr-quick--violet .fr-quick__icon{color:#8058ed;background:#f0ebff}.fr-quick--cyan .fr-quick__icon{color:#079cb5;background:#e1f7fb}.fr-quick--red .fr-quick__icon{color:#e94d64;background:#ffe9ed}
.fr-dashboard__empty{display:flex;flex-direction:column;gap:.25rem;margin-bottom:.9rem;padding:1rem;border:1px solid #ffe2a7;border-radius:12px;background:#fff9ed;color:#7d5a13}.fr-dashboard__empty span{font-size:.75rem;color:#9b7a36}
@media(max-width:1100px){.fr-dashboard__analytics{grid-template-columns:1fr}.fr-quick-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.fr-topbar__user>span:last-child{display:none}}
@media(max-width:767.98px){.fr-topbar__search{width:auto;flex:1}.fr-topbar__search kbd,.fr-topbar__actions .fr-topbar__action:nth-child(2){display:none}.fr-topbar__user{display:none}.fr-dashboard__welcome{align-items:flex-start;flex-direction:column}.fr-dashboard__filters{width:100%}.fr-dashboard__filters span{flex:1;text-align:center}.fr-status-chart{flex-wrap:wrap}.fr-quick-grid{grid-template-columns:1fr}}
@media(max-width:767.98px){.fr-topbar__brand-mobile{display:none!important}}
@media(max-width:479.98px){.fr-topbar{padding-inline:.8rem}.fr-content{padding-inline:.8rem}.fr-finance-summary{grid-template-columns:1fr}.fr-mini-chart{height:105px}.fr-kpi{min-height:112px}.fr-dashboard__welcome h2{font-size:1.25rem}}

/* Unified inner screens polish */
.fr-content > .fr-page-head {
  position: relative;
  align-items: center;
  min-height: 104px;
  margin: 0 0 1rem;
  padding: 1.25rem 1.35rem;
  overflow: hidden;
  border: 1px solid #e3eaf4;
  border-radius: 15px;
  background: linear-gradient(118deg, #fff 0%, #f7faff 66%, #edf5ff 100%);
  box-shadow: 0 6px 22px rgba(40, 72, 118, .055);
}
.fr-content > .fr-page-head::after {
  content: "";
  position: absolute;
  inset-inline-end: -32px;
  top: -62px;
  width: 175px;
  height: 175px;
  border: 24px solid rgba(36, 120, 238, .055);
  border-radius: 50%;
  pointer-events: none;
}
.fr-page-head > * { position: relative; z-index: 1; }
.fr-page-head h1,.fr-page-head h2 { color: #152544; font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.fr-page-head__meta,.fr-page-head p { color: #7b8aa0; font-size: .78rem; }
.fr-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.btn,.fr-btn,.btn-fr { min-height: 40px; border-radius: 9px; font-size: .78rem; font-weight: 700; }
.btn-fr,.fr-btn { background: linear-gradient(135deg, #2d83ff, #1765e7); box-shadow: 0 7px 18px rgba(29, 105, 230, .2); }
.btn-fr:hover,.fr-btn:hover { box-shadow: 0 10px 24px rgba(29, 105, 230, .28); }
.btn-outline-secondary { color: #566780; border-color: #dbe3ee; background: #fff; }
.btn-outline-secondary:hover { color: #1b68d8; border-color: #bcd2f2; background: #f1f6fd; }
.btn-outline-danger { border-color: #f4cbd2; background: #fff8f9; }
.fr-table-wrap {
  overflow: hidden;
  border: 1px solid #e4eaf3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 22px rgba(40, 72, 118, .055);
}
.fr-table-wrap.is-scrollable { overflow-x: auto; }
.fr-table-wrap .table { min-width: 720px; }
.fr-table-wrap thead th {
  padding: .85rem 1rem;
  color: #687891;
  border-bottom: 1px solid #e5ebf3;
  background: #f6f8fc;
  font-size: .69rem;
  letter-spacing: 0;
}
.fr-table-wrap tbody td { padding: .85rem 1rem; color: #43536d; font-size: .77rem; border-color: #edf1f6; }
.fr-table-wrap tbody tr:nth-child(odd) > * { background: #fff; }
.fr-table-wrap tbody tr:nth-child(even) > * { background: #fbfcfe; }
.fr-table-wrap tbody tr:hover > * { background: #f3f7fe; }
.fr-table-wrap tbody .fw-bold { color: #20314e; }
.fr-link { display: inline-flex; align-items: center; gap: .25rem; padding: .36rem .62rem; border-radius: 7px; color: #176be6; background: #eaf2ff; font-size: .7rem; font-weight: 800; }
.fr-link::after { content: "‹"; font-size: 1rem; line-height: .7; }
.fr-link:hover { color: #fff; background: #2478ee; }
.fr-toolbar {
  margin-bottom: .75rem;
  padding: .65rem;
  border: 1px solid #e5ebf3;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(40, 72, 118, .04);
}
.fr-toolbar .form-control,.fr-toolbar .form-select { min-height: 40px; background-color: #f7f9fc; }
.fr-toolbar input[type="search"] { padding-inline-start: 2.25rem; background-image: radial-gradient(circle, transparent 5px, #8493a8 6px, #8493a8 7px, transparent 8px); background-repeat: no-repeat; background-size: 18px 18px; background-position: right .65rem center; }
.fr-panel,.fr-form:not(.row),.fr-content > form.row,.fr-content form.row.g-2,.fr-content form.row.g-3 {
  border: 1px solid #e4eaf3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(40, 72, 118, .05);
}
.fr-panel { margin-bottom: .85rem; padding: 1rem; }
.fr-content label,.fr-content .form-label { color: #40516c; font-size: .72rem; font-weight: 750; }
.form-control,.form-select {
  min-height: 42px;
  border-color: #dce4ef;
  border-radius: 9px;
  color: #273752;
  background-color: #fbfcfe;
  font-size: .78rem;
}
.form-control:hover,.form-select:hover { border-color: #bdcce0; }
.form-control:focus,.form-select:focus { background-color: #fff; box-shadow: 0 0 0 3px rgba(36,120,238,.13); border-color: #5594eb; }
.form-check-input { border-color: #b9c7da; }
.form-check-input:checked { background-color: #2478ee; border-color: #2478ee; }
.fr-form-actions { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #edf1f6; }
.fr-badge { padding: .35rem .58rem; border-radius: 999px; font-size: .64rem; font-weight: 800; }
.alert,.fr-alert { border-width: 1px; border-radius: 11px; font-size: .76rem; box-shadow: 0 4px 14px rgba(40,72,118,.035); }
.alert-success,.fr-alert--ok { color: #087853; border-color: #bcebd9; background: #eafaf4; }
.alert-danger { color: #b72f48; border-color: #f4c6cf; background: #fff0f3; }
.fr-card,.card { border-color: #e4eaf3; box-shadow: 0 6px 20px rgba(40,72,118,.055); }
.card-header { padding: .9rem 1rem; border-bottom-color: #e8edf4; background: #f8faff; color: #24344f; font-size: .8rem; font-weight: 800; }
.fr-form-drawer .offcanvas-header,.modal-header { border-bottom: 1px solid #e7edf5; background: #f8faff; }
.modal-title,.offcanvas-title { color: #1e2f4d; font-size: 1rem; font-weight: 800; }
.modal-footer { border-top-color: #e7edf5; background: #fafbfd; }
.fr-pager { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem .85rem; border-top: 1px solid #e8edf4; background: #fafbfd; color: #7d8ba0; font-size: .68rem; }
.fr-pager button { min-width: 34px; height: 32px; border: 1px solid #dfe6f0; border-radius: 7px; color: #52627a; background: #fff; }
.fr-pager button:hover:not(:disabled) { color: #fff; border-color: #2478ee; background: #2478ee; }
.fr-pager button:disabled { opacity: .45; }
html[data-theme="dark"] .fr-content > .fr-page-head { border-color: var(--fr-card-border); background: linear-gradient(118deg, var(--fr-card), #101d30); }
html[data-theme="dark"] .fr-page-head h1,html[data-theme="dark"] .fr-page-head h2,html[data-theme="dark"] .fr-table-wrap tbody .fw-bold { color: var(--fr-text); }
html[data-theme="dark"] .fr-table-wrap,html[data-theme="dark"] .fr-toolbar,html[data-theme="dark"] .fr-panel,html[data-theme="dark"] .fr-form:not(.row),html[data-theme="dark"] .fr-content > form.row,html[data-theme="dark"] .fr-content form.row.g-2,html[data-theme="dark"] .fr-content form.row.g-3 { border-color: var(--fr-card-border); background: var(--fr-card); }
html[data-theme="dark"] .fr-table-wrap thead th,html[data-theme="dark"] .card-header,html[data-theme="dark"] .fr-pager { color: var(--fr-muted); border-color: var(--fr-line-soft); background: rgba(148,183,214,.055); }
html[data-theme="dark"] .fr-table-wrap tbody tr:nth-child(odd)>*,html[data-theme="dark"] .fr-table-wrap tbody tr:nth-child(even)>* { background: transparent; }
html[data-theme="dark"] .fr-table-wrap tbody tr:hover>* { background: var(--fr-hover); }
html[data-theme="dark"] .fr-table-wrap tbody td,html[data-theme="dark"] .fr-form-actions { color: var(--fr-text); border-color: var(--fr-line-soft); }
html[data-theme="dark"] .btn-outline-secondary,html[data-theme="dark"] .fr-pager button { color: var(--fr-text); border-color: var(--fr-line-strong); background: var(--fr-field-bg); }
@media (max-width: 767.98px) {
  .fr-content > .fr-page-head { min-height: 0; padding: 1rem; align-items: flex-start; }
  .fr-page-head .fr-actions,.fr-page-head > .btn,.fr-page-head > a.btn { width: 100%; }
  .fr-page-head .fr-actions > *,.fr-page-head > .btn,.fr-page-head > a.btn { flex: 1; }
  .fr-table-wrap { border-radius: 11px; }
  .fr-table-wrap .table { min-width: 650px; }
  .fr-table-wrap thead th,.fr-table-wrap tbody td { padding: .7rem .75rem; }
  .fr-toolbar { align-items: stretch; }
  .fr-toolbar > * { width: 100%; }
}

/* Dashboard shell dark theme overrides */
html[data-theme="dark"] body.fr-body { background: #07111f; color: #dce7f5; }
html[data-theme="dark"] .fr-sidebar { color: #dce7f5; border-color: #223149; background: #0b1727; box-shadow: none; }
html[data-theme="dark"] .fr-sidebar__brand,html[data-theme="dark"] .fr-sidebar__foot { border-color: #223149; }
html[data-theme="dark"] .fr-logo,html[data-theme="dark"] .fr-logo:hover,html[data-theme="dark"] .fr-user__name { color: #eff6ff; }
html[data-theme="dark"] .fr-logo__tag,html[data-theme="dark"] .fr-nav__label,html[data-theme="dark"] .fr-user__role { color: #8294ad; }
html[data-theme="dark"] .fr-nav__link { color: #b5c3d7; }
html[data-theme="dark"] .fr-nav__link:hover { color: #fff; border-color: #293950; background: #14233a; }
html[data-theme="dark"] .fr-nav__link.is-active { color: #fff; border-color: transparent; background: linear-gradient(135deg,#2e82ff,#1765e7); }
html[data-theme="dark"] .fr-topbar { color: #dce7f5; border-color: #223149; background: rgba(9,20,35,.94); }
html[data-theme="dark"] .fr-topbar__search,html[data-theme="dark"] .fr-topbar__action { color: #91a2ba; border-color: #293950; background: #111f33; }
html[data-theme="dark"] .fr-topbar__search input,html[data-theme="dark"] .fr-topbar__user b { color: #e5eef9; }
html[data-theme="dark"] .fr-topbar__avatar,html[data-theme="dark"] .fr-user__avatar { color: #8ebaff; background: #182b47; }
html[data-theme="dark"] .fr-dashboard__welcome h2 { color: #f1f6fc; }
html[data-theme="dark"] .fr-dashboard__welcome p,html[data-theme="dark"] .fr-dashboard__eyebrow { color: #91a2b9!important; }
html[data-theme="dark"] .fr-dashboard__filters span,html[data-theme="dark"] .fr-widget__head>span { color: #aebcd0; border-color: #2a3b53; background: #111f33; }
html[data-theme="dark"] .fr-kpi,html[data-theme="dark"] .fr-widget { border-color: #263750; background: #101e31; box-shadow: 0 8px 22px rgba(0,0,0,.16); }
html[data-theme="dark"] .fr-kpi__label,html[data-theme="dark"] .fr-kpi small { color: #91a2b9; }
html[data-theme="dark"] .fr-kpi__value,html[data-theme="dark"] .fr-widget__head h3,html[data-theme="dark"] .fr-finance-summary strong,html[data-theme="dark"] .fr-status-list strong { color: #edf4fc; }
html[data-theme="dark"] .fr-widget__head p,html[data-theme="dark"] .fr-finance-summary span,html[data-theme="dark"] .fr-status-list>div { color: #91a2b9; }
html[data-theme="dark"] .fr-finance-summary>div { background: #14243a; }
html[data-theme="dark"] .fr-finance-summary__margin { background: #0e302c!important; }
html[data-theme="dark"] .fr-mini-chart { border-color: #293950; background: repeating-linear-gradient(to bottom,#101e31 0,#101e31 31px,#25354b 32px); }
html[data-theme="dark"] .fr-donut>div { background: #101e31; }
html[data-theme="dark"] .fr-donut strong { color: #edf4fc; }
html[data-theme="dark"] .fr-status-list>div { border-color: #25354b; }
html[data-theme="dark"] .fr-quick { border-color: #293950; background: #122238; }
html[data-theme="dark"] .fr-quick:hover { border-color: #3a72b8; background: #172a44; }
html[data-theme="dark"] .fr-quick b { color: #e7f0fb; }
html[data-theme="dark"] .fr-quick small,html[data-theme="dark"] .fr-quick em { color: #8fa0b8; }

/* Global search dropdown */
.fr-gs-results { position:absolute; top:calc(100% + 6px); inset-inline:0; z-index:1050; background:#fff; border:1px solid #e6ecf4; border-radius:12px; box-shadow:0 18px 44px rgba(7,17,31,.16); max-height:min(420px,60vh); overflow-y:auto; padding:.35rem; }
.fr-gs-results a { display:flex; align-items:center; gap:.6rem; padding:.5rem .6rem; border-radius:8px; text-decoration:none; color:#24324b; }
.fr-gs-results a:hover, .fr-gs-results a.is-active { background:#eef4fa; }
.fr-gs-kind { flex:none; font-size:.62rem; font-weight:700; color:#0f9d8a; background:rgba(15,157,138,.12); border-radius:999px; padding:.15rem .55rem; min-width:3.6rem; text-align:center; }
.fr-gs-title { font-weight:700; font-size:.82rem; direction:ltr; }
.fr-gs-sub { color:#8190a7; font-size:.72rem; margin-inline-start:auto; max-width:45%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fr-gs-empty { padding:.8rem; color:#8190a7; font-size:.8rem; text-align:center; }
html[data-theme="dark"] .fr-gs-results { background:#101e31; border-color:#263750; }
html[data-theme="dark"] .fr-gs-results a { color:#e5eef9; }
html[data-theme="dark"] .fr-gs-results a:hover, html[data-theme="dark"] .fr-gs-results a.is-active { background:#172a44; }

/* ===================== Mimarak — Public site (dark topbar + footer) ===================== */

.fr-topbar--public {
  background: var(--fr-ink);
  border-bottom-color: rgba(148,183,214,.14);
  color: #dbe6f3;
  padding: .8rem 1.5rem;
  gap: 1.25rem;
}
.fr-topbar--public .fr-logo { display:flex; align-items:center; gap:.7rem; text-decoration:none; color:#fff; flex:none; }
.fr-topbar--public .fr-logo__mark {
  display:grid; place-items:center; width:42px; height:42px; flex:none;
  color:#12c4ab; background:rgba(18,196,171,.12);
  border:1px solid rgba(18,196,171,.3); border-radius:12px;
}
.fr-topbar--public .fr-logo__mark svg { width:26px; height:26px; }
.fr-topbar--public .fr-logo__name {
  font-family:var(--fr-display); font-weight:800; font-size:1.05rem; letter-spacing:.02em; color:#fff; line-height:1.1;
}
.fr-topbar--public .fr-logo__tag { display:block; font-size:.68rem; color:#8fa4bf; }

.fr-public-nav { display:flex; align-items:center; gap:.25rem; flex:1; min-width:0; overflow-x:auto; }
.fr-public-nav__link {
  color:#b9c9dd; text-decoration:none; font-weight:600; font-size:.92rem;
  padding:.5rem .9rem; border-radius:10px; white-space:nowrap;
  transition:color .2s var(--fr-ease), background .2s var(--fr-ease);
}
.fr-public-nav__link:hover { color:#fff; background:rgba(255,255,255,.07); }
.fr-public-nav__link.is-active { color:#fff; background:rgba(18,196,171,.16); }

.fr-public-cta { background:var(--fr-accent); border-color:transparent; color:#fff !important; }
.fr-public-cta:hover { background:var(--fr-accent-2); color:#fff !important; }
.fr-public-login { color:#dbe6f3 !important; }
.fr-public-login:hover { color:#fff !important; }
.fr-topbar--public .fr-theme-btn { color:#b9c9dd; border-color:rgba(148,183,214,.25); }
.fr-topbar--public .fr-theme-btn:hover { color:#fff; }
.fr-topbar--public .fr-topbar__user b { color:#fff; }
.fr-topbar--public .fr-topbar__user small { color:#8fa4bf; }
.fr-topbar--public .fr-topbar__avatar { background:#182b47; color:#8ebaff; }

body.fr-body { overflow-x:hidden; }
.fr-public-content { min-height:60vh; padding:0 0 3rem; max-width:100%; margin:0; }
.fr-public-inner { max-width:1200px; margin:0 auto; padding:2rem 1.5rem 0; }

.fr-public-footer { background:var(--fr-ink); color:#93a7c0; margin-top:3rem; }
.fr-public-footer__inner {
  max-width:1200px; margin:0 auto; padding:2rem 1.5rem;
  display:flex; flex-wrap:wrap; gap:1.5rem; align-items:center; justify-content:space-between;
}
.fr-public-footer strong { color:#fff; font-family:var(--fr-display); }
.fr-public-footer p { margin:.25rem 0 0; font-size:.85rem; }
.fr-public-footer__contact { display:flex; flex-wrap:wrap; gap:1rem; font-size:.85rem; }
.fr-public-footer__contact a { color:#12c4ab; text-decoration:none; }
.fr-public-footer__contact a:hover { color:#fff; }

@media (max-width: 767.98px) {
  .fr-topbar--public { flex-wrap:wrap; gap:.5rem; padding:.7rem 1rem; }
  .fr-public-nav { order:3; flex-basis:100%; }
  .fr-topbar--public .fr-logo__tag { display:none; }
}

/* ===================== Mimarak — Hero + Auth + Services ===================== */

.fr-hero {
  position:relative; overflow:hidden;
  padding:5rem 2rem 5.5rem;
  background:
    radial-gradient(700px 380px at 85% 0%, rgba(18,196,171,.22), transparent 60%),
    radial-gradient(600px 320px at 10% 90%, rgba(61,139,253,.16), transparent 55%),
    linear-gradient(160deg, #07111f 0%, #0e1a2e 55%, #122036 100%);
  color:#fff;
  border-bottom:1px solid rgba(148,183,214,.15);
}
.fr-hero__inner { max-width:860px; margin:0 auto; text-align:center; }
.fr-hero__eyebrow {
  display:inline-block; margin:0 0 1rem; padding:.4rem 1rem;
  font-size:.75rem; font-weight:700; letter-spacing:.04em;
  color:#12c4ab; background:rgba(18,196,171,.12);
  border:1px solid rgba(18,196,171,.35); border-radius:999px;
}
.fr-hero h1 {
  margin:0; font-size:clamp(2rem,5vw,3.2rem); font-weight:800; line-height:1.25;
}
.fr-hero h1 span {
  background:linear-gradient(135deg,#12c4ab,#3d8bfd);
  -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
}
.fr-hero__sub { margin:1.1rem auto 0; max-width:640px; color:#a9bcd4; font-size:1.05rem; line-height:1.9; }
.fr-hero__actions { margin-top:2rem; display:flex; flex-wrap:wrap; gap:.8rem; justify-content:center; }
.fr-hero__actions .fr-btn { padding:.8rem 1.7rem; font-size:.95rem; }
.fr-hero__ghost {
  background:transparent !important; box-shadow:none !important;
  border:1px solid rgba(148,183,214,.4) !important; color:#dbe6f3 !important;
}
.fr-hero__ghost:hover { background:rgba(255,255,255,.08) !important; filter:none; }

.fr-services { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:1rem; }
.fr-services .fr-quick {
  flex-direction:column; align-items:flex-start; text-align:right;
  padding:1.6rem 1.4rem; min-height:170px;
}
.fr-services .fr-quick__icon {
  width:52px; height:52px; font-size:1.3rem; margin-bottom:.9rem;
}
.fr-services .fr-quick b { font-size:1.02rem; }
.fr-services .fr-quick small { font-size:.8rem; line-height:1.7; margin-top:.4rem; }

.fr-section-title--public { margin:0 0 1.5rem; }
.fr-section-title--public h2 { margin:0; font-weight:800; font-size:1.5rem; color:#142344; }
.fr-section-title--public p { margin:.3rem 0 0; color:#75849c; font-size:.9rem; }
html[data-theme="dark"] .fr-section-title--public h2 { color:#edf4fc; }
html[data-theme="dark"] .fr-section-title--public p { color:#91a2b9; }

.fr-cta {
  margin-top:3rem; padding:2.5rem 2rem; text-align:center;
  border-radius:var(--fr-radius);
  background:linear-gradient(135deg,#0e1a2e,#122036);
  border:1px solid rgba(148,183,214,.18); color:#fff;
}
.fr-cta h2 { margin:0 0 .5rem; font-weight:800; }
.fr-cta p { margin:0 0 1.5rem; color:#a9bcd4; }

.fr-auth {
  display:flex; justify-content:center; padding:3rem 1rem 2rem;
}
.fr-auth__card { width:100%; max-width:480px; padding:1.75rem; }
.fr-auth__head { text-align:center; margin-bottom:1.4rem; }
.fr-auth__head h2 { margin:0; font-weight:800; font-size:1.4rem; color:#142344; }
.fr-auth__head p { margin:.4rem 0 0; color:#75849c; font-size:.85rem; }
.fr-auth__card .fr-form { max-width:none; }
.fr-auth__card .fr-form-actions .fr-btn { flex:1; }
.fr-auth__foot {
  margin-top:1.25rem; padding-top:1.1rem; text-align:center;
  border-top:1px solid var(--fr-line-soft, #e6ebf4); font-size:.85rem; color:#75849c;
}
html[data-theme="dark"] .fr-auth__head h2 { color:#edf4fc; }
html[data-theme="dark"] .fr-auth__head p, html[data-theme="dark"] .fr-auth__foot { color:#91a2b9; }
html[data-theme="dark"] .fr-auth__foot { border-color:#263750; }

@media (max-width: 767.98px) {
  .fr-hero { padding:3rem 1.25rem 2.6rem; margin:-1rem -1rem 1.5rem; }
  .fr-public-content { padding:1rem 1rem 2rem; }
}
