/**
 * HOMS · SOTIS Admin Theme v9 — tight brand stack + contrast
 * Red #940609 · Gold #998E52 · Dark #53170E · Cream #F0D5AB
 */

:root {
  --sotis-red: #940609;
  --sotis-red-deep: #53170e;
  --sotis-gold: #998e52;
  --sotis-cream: #f0d5ab;
  --sotis-cream-soft: #faf8f5;
  --sotis-ink: #1a0c0c;
  --sotis-muted: #5c4545;
}

/* ========== TOPBAR ========== */
.fi-topbar nav {
  background: linear-gradient(90deg, var(--sotis-red-deep) 0%, var(--sotis-red) 55%, #6e0507 100%) !important;
  border-bottom: 3px solid var(--sotis-gold) !important;
  box-shadow: 0 2px 10px rgba(83, 23, 14, 0.28);
}

.fi-topbar .fi-logo,
.fi-topbar .fi-logo span,
.fi-sidebar-header .fi-logo,
.fi-sidebar-header .fi-logo span {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  opacity: 1 !important;
}

.fi-topbar nav .fi-topbar-open-sidebar-btn,
.fi-topbar nav .fi-topbar-close-sidebar-btn,
.fi-topbar nav .fi-icon-btn,
.fi-topbar nav button,
.fi-topbar nav a,
.fi-topbar nav svg,
.fi-topbar nav .fi-icon-btn svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
  opacity: 1 !important;
}

/* ========== THEME SWITCHER ========== */
.fi-theme-switcher,
.fi-theme-switcher-btn {
  color: var(--sotis-ink) !important;
}

.fi-theme-switcher-btn svg,
.fi-theme-switcher button svg {
  color: var(--sotis-ink) !important;
  stroke: var(--sotis-ink) !important;
  opacity: 1 !important;
}

.fi-theme-switcher-btn.fi-active {
  background: rgba(148, 6, 9, 0.12) !important;
  color: var(--sotis-red) !important;
}

.fi-theme-switcher-btn.fi-active svg {
  color: var(--sotis-red) !important;
  stroke: var(--sotis-red) !important;
}

.dark .fi-theme-switcher,
.dark .fi-theme-switcher-btn {
  color: #f5ebe8 !important;
}

.dark .fi-theme-switcher-btn svg {
  color: #f5ebe8 !important;
  stroke: #f5ebe8 !important;
}

.dark .fi-theme-switcher-btn.fi-active {
  background: rgba(153, 142, 82, 0.25) !important;
  color: var(--sotis-gold) !important;
}

.dark .fi-theme-switcher-btn.fi-active svg {
  color: var(--sotis-gold) !important;
  stroke: var(--sotis-gold) !important;
}

.fi-dropdown-list-item,
.fi-dropdown-list-item-label {
  color: var(--sotis-ink) !important;
}

.dark .fi-dropdown-list-item,
.dark .fi-dropdown-list-item-label {
  color: #f5ebe8 !important;
}

/* ========== SIDEBAR ========== */
.fi-sidebar {
  background: linear-gradient(180deg, #1a0808 0%, var(--sotis-red-deep) 50%, #120606 100%) !important;
  border-right: 1px solid rgba(153, 142, 82, 0.3) !important;
}

.fi-sidebar-header {
  background: transparent !important;
  border-bottom: 1px solid rgba(153, 142, 82, 0.22) !important;
}

.fi-sidebar-header a,
.fi-sidebar-header .fi-logo,
.fi-sidebar-header span {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.fi-sidebar-nav-groups > li > .fi-sidebar-group-label,
.fi-sidebar-group-label {
  color: var(--sotis-gold) !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600 !important;
}

.fi-sidebar-item-button {
  color: rgba(255, 255, 255, 0.92) !important;
  border-radius: 0.5rem !important;
}

.fi-sidebar-item-button:hover {
  background: rgba(148, 6, 9, 0.55) !important;
  color: #ffffff !important;
}

.fi-sidebar-item-button.fi-active,
.fi-sidebar-item.fi-active > .fi-sidebar-item-button {
  background: linear-gradient(90deg, var(--sotis-red), var(--sotis-red-deep)) !important;
  color: #ffffff !important;
  box-shadow: inset 3px 0 0 var(--sotis-gold);
}

.fi-sidebar-item-label { color: inherit !important; }

.fi-sidebar-item-icon {
  color: rgba(240, 213, 171, 0.9) !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-icon {
  color: var(--sotis-gold) !important;
}

/* ========== MAIN LIGHT ========== */
.fi-main { background: var(--sotis-cream-soft) !important; }
.fi-main-ctn { background: transparent !important; }

.fi-header-heading,
.fi-header h1 {
  color: var(--sotis-red) !important;
  font-weight: 700 !important;
}

.fi-header {
  border-bottom: 2px solid var(--sotis-gold);
  padding-bottom: 0.75rem;
  margin-bottom: 0.65rem;
}

.fi-breadcrumbs,
.fi-breadcrumbs-item-label {
  color: var(--sotis-muted) !important;
}

/* ========== CARDS ========== */
.fi-wi-stats-overview-stat,
.fi-section,
.fi-ta-ctn,
.fi-wi-chart,
.fi-fo-tabs {
  border-radius: 0.65rem !important;
  border: 1px solid rgba(148, 6, 9, 0.1) !important;
  box-shadow: 0 1px 4px rgba(83, 23, 14, 0.06) !important;
  background: #ffffff !important;
  color: var(--sotis-ink) !important;
}

.fi-wi-stats-overview-stat {
  border-top: 3px solid var(--sotis-red) !important;
}

.fi-wi-stats-overview-stat-label,
.fi-wi-stats-overview-stat-value,
.fi-section-header-heading {
  color: var(--sotis-ink) !important;
}

.fi-wi-stats-overview-stat-description,
.fi-section-header-description,
.fi-ta-empty-state-heading,
.fi-ta-empty-state-description {
  color: var(--sotis-muted) !important;
}

/* ========== BUTTONS ========== */
.fi-btn-color-primary {
  background: linear-gradient(135deg, var(--sotis-red), var(--sotis-red-deep)) !important;
  border-color: transparent !important;
  color: #ffffff !important;
}

.fi-btn-color-warning {
  background: var(--sotis-gold) !important;
  color: var(--sotis-ink) !important;
}

/* ========== TABLES ========== */
.fi-ta-header-cell {
  background: rgba(148, 6, 9, 0.05) !important;
  color: var(--sotis-red-deep) !important;
  font-weight: 600 !important;
}

.fi-ta-cell { color: var(--sotis-ink) !important; }

.fi-ta-row:hover {
  background: rgba(240, 213, 171, 0.22) !important;
}

/* ========== LOGIN PAGE ========== */
.fi-simple-layout {
  background: linear-gradient(165deg, var(--sotis-red-deep) 0%, var(--sotis-red) 45%, #2a0808 100%) !important;
  min-height: 100vh;
}

/* Sembunyikan HANYA logo default (bukan seluruh header / Sign in) */
.fi-simple-layout .fi-logo,
.fi-simple-layout .fi-simple-header .fi-logo {
  display: none !important;
}
.fi-simple-layout .fi-simple-header {
  display: block !important;
  margin-bottom: 0 !important;
}

/* Kartu form */
.fi-simple-main {
  border-top: 3px solid var(--sotis-gold) !important;
  border-bottom: 3px solid var(--sotis-gold) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35) !important;
  background: #ffffff !important;
  border-radius: 0.75rem !important;
  padding-top: 0.5rem !important;
}

/* Urutan visual: brand (hook) → Sign in → form
   Brand dari AUTH_LOGIN_FORM_BEFORE; heading Sign in di bawahnya */
.fi-simple-main .fi-simple-header-heading,
.fi-simple-main h1 {
  color: var(--sotis-ink) !important;
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  margin-top: 0.35rem !important;
  order: 2;
}

/* ========== DARK MODE ========== */
.dark .fi-main {
  background: #120808 !important;
  color: #f5ebe8 !important;
}

.dark .fi-sidebar {
  background: linear-gradient(180deg, #0a0404 0%, #1a0808 50%, #0a0404 100%) !important;
}

.dark .fi-topbar nav {
  background: linear-gradient(90deg, #2a0808 0%, var(--sotis-red-deep) 45%, var(--sotis-red) 100%) !important;
  border-bottom-color: var(--sotis-gold) !important;
}

.dark .fi-logo,
.dark .fi-logo span,
.dark .fi-sidebar-header .fi-logo,
.dark .fi-sidebar-header span,
.dark .fi-topbar .fi-logo {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}

.dark .fi-header-heading,
.dark .fi-header h1 {
  color: #f0d5ab !important;
}

.dark .fi-wi-stats-overview-stat,
.dark .fi-section,
.dark .fi-ta-ctn,
.dark .fi-wi-chart {
  background: #1c0e0e !important;
  border-color: rgba(153, 142, 82, 0.25) !important;
  color: #f5ebe8 !important;
}

.dark .fi-wi-stats-overview-stat-label,
.dark .fi-wi-stats-overview-stat-value,
.dark .fi-section-header-heading,
.dark .fi-ta-cell,
.dark .fi-ta-empty-state-heading {
  color: #f5ebe8 !important;
}

.dark .fi-wi-stats-overview-stat-description,
.dark .fi-section-header-description,
.dark .fi-ta-empty-state-description,
.dark .fi-breadcrumbs,
.dark .fi-breadcrumbs-item-label {
  color: rgba(240, 213, 171, 0.8) !important;
}

.dark .fi-ta-header-cell {
  background: rgba(148, 6, 9, 0.28) !important;
  color: #f0d5ab !important;
}

.dark .fi-ta-row:hover {
  background: rgba(153, 142, 82, 0.1) !important;
}

.fi-dropdown-panel {
  border-top: 2px solid var(--sotis-gold) !important;
}

/* ===== Login brand stack TIGHT (v9) ===== */
.fi-simple-layout .fi-simple-header {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.fi-simple-main .fi-simple-header-heading,
.fi-simple-main > h1,
.fi-simple-main .fi-header-heading {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* Hilangkan spacer Filament di atas form */
.fi-simple-main form > .fi-fo-field-wrp:first-child {
  margin-top: 0 !important;
}
.fi-simple-main {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}
/* Satu blok brand: title 4px → sub 10px → Sign in 14px → form */
.homs-login-stack {
  text-align: center !important;
  margin: 0 0 1rem !important;
  padding: 0 !important;
  line-height: 1.25 !important;
}
.homs-login-stack .homs-brand-title {
  display: block !important;
  font-size: 1.375rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  color: #940609 !important;
  margin: 0 0 4px !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}
.homs-login-stack .homs-brand-sub {
  display: block !important;
  font-size: 0.8125rem !important;
  color: #5c4545 !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}
.homs-login-stack .homs-login-sign-in {
  display: block !important;
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  color: #1a0c0c !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}
