/*
 * Intraclear CRM — portal polish.
 * A light, modern layer over Filament v3 (loaded after Filament's own CSS via
 * a HEAD_END render hook, so these rules win at equal specificity). Kept
 * intentionally small and token-ish to avoid fighting the framework.
 */

:root {
  --portal-radius: 0.85rem;
  --portal-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 28px -12px rgba(15, 23, 42, .12);
}

/* Softer, cooler page background than the flat default. */
.fi-body {
  background-color: #f5f7fb;
}
.dark .fi-body {
  background-color: #0a0e16;
}

/* Glassy, quieter top bar. */
.fi-topbar > nav {
  background-color: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}
.dark .fi-topbar > nav {
  background-color: rgba(13, 18, 28, .72);
  border-bottom-color: rgba(255, 255, 255, .06);
}

/* Sidebar: subtle separation and a cleaner brand area. */
.fi-sidebar,
.fi-sidebar-header {
  background-color: #ffffff;
  border-right: 1px solid rgba(15, 23, 42, .06);
}
.dark .fi-sidebar,
.dark .fi-sidebar-header {
  background-color: #0f1622;
  border-right-color: rgba(255, 255, 255, .05);
}
.fi-sidebar-group-label {
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .68rem;
  opacity: .7;
}

/* Cards, sections, tables, widgets: rounder and softly elevated. */
.fi-section,
.fi-wi-stats-overview-stat,
.fi-ta-ctn,
.fi-fo-component-ctn,
.fi-modal-window {
  border-radius: var(--portal-radius) !important;
}
.fi-section,
.fi-wi-stats-overview-stat {
  box-shadow: var(--portal-shadow);
}

/* Stat cards get a little more life. */
.fi-wi-stats-overview-stat {
  transition: transform .15s ease, box-shadow .15s ease;
}
.fi-wi-stats-overview-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 18px 36px -16px rgba(15, 23, 42, .2);
}

/* Buttons and inputs: a touch rounder, consistent with the cards. */
.fi-btn {
  border-radius: .6rem;
}
.fi-input,
.fi-select-input,
.fi-fo-field-wrp .fi-input-wrp {
  border-radius: .6rem;
}

/* Tighter, more confident headings. */
.fi-header-heading,
.fi-section-header-heading {
  letter-spacing: -.02em;
}

/* Sign-in / password-reset screen: gradient backdrop + elevated card. */
.fi-simple-layout {
  background:
    radial-gradient(1100px 520px at 50% -12%, #e8eeff 0%, rgba(232, 238, 255, 0) 70%),
    #f5f7fb;
}
.dark .fi-simple-layout {
  background:
    radial-gradient(1100px 520px at 50% -12%, #131d33 0%, rgba(19, 29, 51, 0) 70%),
    #0a0e16;
}
.fi-simple-main {
  border-radius: 1.15rem !important;
  box-shadow: 0 10px 50px -18px rgba(15, 23, 42, .35);
  border: 1px solid rgba(15, 23, 42, .06);
}
.dark .fi-simple-main {
  border-color: rgba(255, 255, 255, .06);
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  .fi-wi-stats-overview-stat { transition: none; }
  .fi-wi-stats-overview-stat:hover { transform: none; }
}
