/* ============================================================================
   FRONTIER ALLIANCE — Clean Unified Responsive Executive Admin CMS (v50)
   JolokLabs Academic Engineering Palette (#035A6E Teal + #0284C7 Sky)
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&family=Manrope:wght@700;800;900&display=swap');

:root,
html[data-theme="light"],
html[data-theme="auto"] {
  --primary: #ffffff;
  --secondary: #f8fafc;
  --accent: #035a6e;
  --fa-teal: #035a6e;
  --fa-teal-hover: #024554;
  --fa-sky: #0284c7;
  --fa-sky-hover: #0369a1;
  --primary-fg: #0f172a;
  --body-fg: #334155;
  --body-bg: #f4f7fa;
  --body-quiet-color: #64748b;
  --body-loud-color: #0f172a;
  --header-color: #0f172a;
  --header-branding-color: #0f172a;
  --header-bg: #ffffff;
  --header-link-color: #334155;
  --breadcrumbs-fg: #64748b;
  --breadcrumbs-link-fg: #035a6e;
  --breadcrumbs-bg: #eef4f7;
  --link-fg: #0284c7;
  --link-hover-color: #035a6e;
  --link-selected-fg: #035a6e;
  --hairline-color: #e2e8f0;
  --border-color: #dbe4ee;
  --error-fg: #dc2626;
  --darkened-bg: #f1f5f9;
  --selected-bg: #e0f2fe;
  --selected-row: #f0f9ff;
  --button-fg: #ffffff;
  --button-bg: #035a6e;
  --button-hover-bg: #024554;
  --default-button-bg: #035a6e;
  --default-button-hover-bg: #024554;
  --object-tools-fg: #ffffff;
  --object-tools-bg: #035a6e;
  --object-tools-hover-bg: #024554;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  overflow-x: clip;
  max-width: 100vw;
}

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif !important;
  background: var(--body-bg) !important;
  color: #334155 !important;
  margin: 0;
  line-height: 1.5;
}

/* ==================== TOP STICKY SINGLE-ROW HEADER ==================== */
#header {
  background: #ffffff !important;
  border-bottom: 1px solid #dbe4ee;
  padding: 9px 20px !important;
  height: auto !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

#branding {
  float: none !important;
  flex-shrink: 0 !important;
}

.fa-admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none !important;
  white-space: nowrap;
}

.fa-admin-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  border: 1px solid #dbe4ee;
}

.fa-admin-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 900;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: #0f172a;
}

.fa-admin-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e6f4f7;
  color: #035a6e;
  border: 1px solid #b8dce4;
}

#user-tools {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 4px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#user-tools a {
  color: #334155 !important;
  text-decoration: none !important;
  padding: 5px 8px !important;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

#user-tools a:hover {
  background: #eef4f7;
  border-color: #cbd5e1;
  color: #035a6e !important;
}

#logout-form {
  display: inline-flex !important;
  margin: 0 0 0 2px !important;
  flex-shrink: 0;
}

#logout-form button {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
  border-radius: 7px !important;
  padding: 5px 10px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  white-space: nowrap;
  cursor: pointer;
}

#logout-form button:hover {
  background: #fee2e2 !important;
}

.theme-toggle {
  display: none !important;
}

/* ==================== MODERN ADMIN LOGIN PAGE ==================== */
body.fa-login-page {
  background: radial-gradient(circle at 18% 18%, #e0f2fe 0%, #f4f7fa 48%, #e6f4f7 100%) !important;
  min-height: 100vh;
}
body.fa-login-page #header {
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(8px);
}
body.fa-login-page #content {
  padding: 32px 16px 48px !important;
}
.fa-login-wrap {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fa-login-card {
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 20px;
  padding: 32px 30px;
  box-shadow: 0 18px 48px rgba(3, 90, 110, 0.09);
}
.fa-login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.fa-login-brand img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #dbe4ee;
}
.fa-login-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #035a6e;
}
.fa-login-heading {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  margin: 2px 0 0 !important;
}
.fa-login-sub {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 20px 0;
  line-height: 1.5;
}
.fa-login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 16px;
}
.fa-login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.fa-login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fa-login-field label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
}
.fa-login-field input {
  width: 100% !important;
  min-height: 42px !important;
  padding: 9px 13px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  color: #0f172a !important;
  background: #ffffff !important;
}
.fa-login-field input:focus {
  outline: none !important;
  border-color: #035a6e !important;
  box-shadow: 0 0 0 3px rgba(3, 90, 110, 0.14) !important;
}
.fa-field-err {
  color: #dc2626;
  font-size: 12px;
}
.fa-login-submit {
  width: 100%;
  margin-top: 4px;
  padding: 11px 16px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #035a6e 0%, #0284c7 100%);
  color: #ffffff;
  font-family: 'Manrope', sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(3, 90, 110, 0.22);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.fa-login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(3, 90, 110, 0.28);
}
.fa-login-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eef2f7;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
}
.fa-login-footer a {
  color: #035a6e !important;
  font-weight: 600;
  text-decoration: none;
}
.fa-login-footer a:hover {
  text-decoration: underline;
}

/* ==================== BREADCRUMBS & CONTAINER ==================== */
div.breadcrumbs {
  background: #eef4f7 !important;
  border-bottom: 1px solid #dbe4ee;
  padding: 10px 24px !important;
  font-size: 12px !important;
  font-weight: 600;
}

#content {
  padding: 20px 24px 48px !important;
  max-width: 1520px !important;
  width: 100% !important;
  margin: 0 auto !important;
}

body.dashboard #content > h1 {
  display: none;
}

/* ==================== DASHBOARD HOME HERO, KPIS & CARDS ==================== */
.fa-hero-banner {
  background: linear-gradient(135deg, #ffffff 0%, #edf7fa 60%, #e0f2fe 100%);
  border: 1px solid #cfe2ec;
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(3, 90, 110, 0.05);
}
.fa-hero-copy { max-width: 680px; }
.fa-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #035a6e;
  margin-bottom: 5px;
}
.fa-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}
.fa-hero-heading {
  font-family: 'Manrope', sans-serif;
  font-size: 21px;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
}
.fa-hero-sub { font-size: 13px; color: #475569; margin: 4px 0 0; }
.fa-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  min-height: 36px;
}
.fa-btn-sky { background: #0284c7; color: #ffffff !important; }
.fa-btn-sky:hover { background: #0369a1; }
.fa-btn-teal { background: #035a6e; color: #ffffff !important; }
.fa-btn-teal:hover { background: #024554; }
.fa-btn-ghost { background: #ffffff; color: #0f172a !important; border-color: #cbd5e1; }
.fa-btn-ghost:hover { border-color: #035a6e; color: #035a6e !important; }

.fa-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.fa-kpi {
  display: block;
  text-decoration: none !important;
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  padding: 15px 17px;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.fa-kpi:hover {
  border-color: #035a6e;
  box-shadow: 0 6px 16px rgba(3, 90, 110, 0.08);
  transform: translateY(-1px);
}
.fa-kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 8px; }
.fa-kpi-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #64748b; }
.fa-kpi-link { color: #0284c7; font-size: 11px; font-weight: 700; }
.fa-kpi-num { font-family: 'Manrope', sans-serif; font-size: 26px; font-weight: 900; line-height: 1.1; color: #0f172a; }
.fa-kpi-foot { font-size: 11.5px; color: #64748b; margin-top: 5px; }

.fa-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
.fa-domain-group {
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}
.fa-domain-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 11px;
  margin-bottom: 14px;
  border-bottom: 1px solid #eef2f7;
}
.fa-domain-title { font-family: 'Manrope', sans-serif; font-size: 14.5px; font-weight: 800; color: #0f172a; margin: 0; }
.fa-domain-tag { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; color: #035a6e; background: #e6f4f7; padding: 3px 8px; border-radius: 999px; text-transform: uppercase; }
.fa-model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 11px; }
.fa-model-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.15s ease;
}
.fa-model-card:hover { border-color: #035a6e; background: #ffffff; box-shadow: 0 4px 12px rgba(3, 90, 110, 0.06); }
.fa-model-name { font-weight: 700; font-size: 13.5px; color: #0f172a; }
.fa-model-desc { font-size: 11.5px; color: #64748b; margin-top: 2px; }
.fa-model-actions { display: flex; gap: 6px; }
.fa-chip-btn {
  flex: 1;
  text-align: center;
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none !important;
  background: #ffffff;
  color: #334155 !important;
  border: 1px solid #cbd5e1;
  transition: all 0.15s ease;
}
.fa-chip-btn:hover { border-color: #035a6e; color: #035a6e !important; }
.fa-chip-btn.add { flex: 0 0 auto; padding: 6px 11px; background: #e6f4f7; color: #035a6e !important; border-color: #b8dce4; }
.fa-chip-btn.add:hover { background: #035a6e; color: #ffffff !important; }

.fa-rail-card {
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}
.fa-rail-title { font-family: 'Manrope', sans-serif; font-size: 13.5px; font-weight: 800; color: #0f172a; margin: 0 0 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fa-rail-badge { font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700; color: #0284c7; }
.fa-activity-list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.fa-activity-list li { padding: 9px 0 !important; border-bottom: 1px solid #f1f5f9; font-size: 12px; color: #334155; list-style: none !important; }
.fa-activity-list li:last-child { border-bottom: none; }

/* ==================== FULL-WIDTH CHANGELIST & COLLAPSIBLE FILTER DRAWER ==================== */
#changelist {
  display: block !important;
  width: 100% !important;
}
#changelist .changelist-form-container {
  width: 100% !important;
  max-width: 100% !important;
}
#toolbar {
  background: #ffffff !important;
  border: 1px solid #dbe4ee !important;
  border-radius: 14px !important;
  padding: 12px 16px !important;
  margin-bottom: 14px !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}
#changelist-search > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}
#changelist-search #searchbar {
  flex: 1 1 260px;
  min-width: 180px;
  max-width: 440px;
  min-height: 38px !important;
  padding: 7px 12px !important;
  border-radius: 9px !important;
  border: 1px solid #cbd5e1 !important;
}
.actions {
  background: #ffffff !important;
  border: 1px solid #dbe4ee !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  margin-bottom: 12px !important;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.actions select {
  min-height: 36px !important;
  height: auto !important;
  line-height: 1.35 !important;
  padding: 6px 10px !important;
  border-radius: 9px !important;
  border: 1px solid #cbd5e1 !important;
}
.actions button.button {
  background: #035a6e !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 7px 14px !important;
  font-weight: 700 !important;
  cursor: pointer;
}
#changelist .results {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
}
#result_list {
  width: 100%;
  border-collapse: collapse;
}
#result_list thead th {
  background: #f1f5f9 !important;
  color: #334155 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 11px 12px !important;
  white-space: nowrap;
}
#result_list tbody tr { transition: background 0.12s ease; }
#result_list tbody tr:hover { background: #f4f9fc !important; }
#result_list tbody td, #result_list tbody th {
  padding: 10px 12px !important;
  vertical-align: middle !important;
  font-size: 12.5px !important;
}

/* Slide-over Filter Drawer (Hidden by default) */
#changelist-filter {
  display: none !important;
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 310px !important;
  max-width: 90vw !important;
  z-index: 1000 !important;
  margin: 0 !important;
  background: #ffffff !important;
  border-left: 1px solid #dbe4ee !important;
  border-radius: 16px 0 0 16px !important;
  box-shadow: -12px 0 36px rgba(15, 23, 42, 0.16) !important;
  overflow-y: auto !important;
  padding-bottom: 24px !important;
}
#changelist-filter.fa-filter-open { display: block !important; }
#changelist-filter h2 {
  background: #035a6e !important;
  color: #ffffff !important;
  font-family: 'Manrope', sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  padding: 12px 16px !important;
  margin: 0 0 8px 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: sticky;
  top: 0;
  z-index: 2;
}
.fa-filter-close {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  font-size: 18px;
  cursor: pointer;
}
.fa-filter-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(2px);
  z-index: 999;
}
.fa-filter-backdrop.fa-filter-open { display: block; }
.fa-filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  margin-left: auto;
  transition: all 0.15s ease;
}
.fa-filter-toggle-btn:hover,
.fa-filter-toggle-btn.has-active {
  background: #035a6e;
  color: #ffffff;
  border-color: #035a6e;
}
#changelist-filter details, #changelist-filter h3 {
  margin: 0 !important;
  padding: 8px 14px 4px !important;
  font-family: 'Manrope', sans-serif !important;
  font-size: 11.5px !important;
  font-weight: 800 !important;
  color: #035a6e !important;
  text-transform: uppercase;
}
#changelist-filter ul {
  margin: 4px 0 10px 0 !important;
  padding: 0 12px 10px 12px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
#changelist-filter li { list-style: none !important; margin: 0 !important; padding: 0 !important; border: none !important; }
#changelist-filter li a {
  display: inline-block !important;
  padding: 4px 9px !important;
  border-radius: 8px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  color: #334155 !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  text-decoration: none !important;
}
#changelist-filter li.selected a {
  background: #035a6e !important;
  color: #ffffff !important;
  border-color: #035a6e !important;
}

/* ==================== CLEAN MODERN CHANGE FORMS (DJANGO 5 COMPATIBLE) ==================== */
body.change-form #content > h1 {
  font-family: 'Manrope', sans-serif !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  margin: 0 0 4px 0 !important;
}
body.change-form #content > h2 {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  margin: 0 0 16px 0 !important;
}

.module, .inline-group {
  background: #ffffff !important;
  border: 1px solid #dbe4ee !important;
  border-radius: 16px !important;
  overflow: hidden;
  margin-bottom: 20px !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}
.module h2, .module caption, .inline-group h2 {
  background: linear-gradient(90deg, #edf7fa 0%, #f8fafc 100%) !important;
  border-left: 4px solid #035a6e !important;
  color: #0f172a !important;
  font-family: 'Manrope', sans-serif !important;
  font-weight: 800 !important;
  font-size: 13.5px !important;
  padding: 13px 18px !important;
  border-bottom: 1px solid #dbe4ee !important;
}
fieldset.module .description {
  padding: 11px 18px !important;
  background: #f8fbfd !important;
  border-bottom: 1px solid #eef2f7;
  color: #475569 !important;
  font-size: 12.5px !important;
}

/* Properly scoped Django 5 form rows (never breaks multi-field tuples or checkboxes!) */
fieldset.module.aligned .form-row {
  padding: 14px 20px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  display: block !important;
  overflow: visible !important;
}
fieldset.module.aligned .form-row:last-child {
  border-bottom: none !important;
}
/* Multi-field tuple rows in Django 5 use .flex-container.form-multiline */
fieldset.module.aligned .flex-container.form-multiline {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 16px 20px !important;
  align-items: start !important;
  width: 100% !important;
}
fieldset.module.aligned .flex-container.form-multiline > div {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
}
/* Single-field rows in Django 5 */
fieldset.module.aligned .form-row > div.flex-container:not(.form-multiline) {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 6px !important;
  width: 100% !important;
}
/* Checkbox rows stay horizontal & tidy */
fieldset.module.aligned .form-row.checkbox-row > div.flex-container,
fieldset.module.aligned .flex-container.form-multiline > div.checkbox-row {
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  padding-top: 22px !important;
}
fieldset.module.aligned label {
  float: none !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #475569 !important;
}
fieldset.module.aligned label.vCheckboxLabel {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: #0f172a !important;
}

/* Inputs & Selects (zero vertical clipping, checkboxes untouched!) */
fieldset.module input[type="text"],
fieldset.module input[type="password"],
fieldset.module input[type="email"],
fieldset.module input[type="url"],
fieldset.module input[type="number"],
fieldset.module input[type="date"],
fieldset.module select,
fieldset.module .vTextField {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 40px !important;
  line-height: 1.4 !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
fieldset.module textarea,
fieldset.module .vLargeTextField {
  width: 100% !important;
  max-width: 100% !important;
  padding: 10px 12px !important;
  font-size: 13px !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  line-height: 1.5 !important;
}
fieldset.module input:focus,
fieldset.module select:focus,
fieldset.module textarea:focus {
  outline: none !important;
  border-color: #035a6e !important;
  box-shadow: 0 0 0 3px rgba(3, 90, 110, 0.12) !important;
}
fieldset.module input[type="checkbox"],
fieldset.module input[type="radio"] {
  width: 17px !important;
  height: 17px !important;
  min-height: 0 !important;
  accent-color: #035a6e;
  cursor: pointer;
}
.related-widget-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
}
.related-widget-wrapper select { flex: 1 1 auto !important; }
.related-widget-wrapper-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}
.readonly { padding: 6px 0 !important; font-size: 13px !important; color: #0f172a !important; }
.help, div.help { margin: 4px 0 0 0 !important; padding: 0 !important; font-size: 11.5px !important; color: #64748b !important; }

/* Top & Bottom Save Action Bars */
.submit-row {
  background: #ffffff !important;
  border: 1px solid #dbe4ee !important;
  border-radius: 14px !important;
  padding: 12px 16px !important;
  margin: 0 0 18px 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04) !important;
}
.submit-row input.default,
.submit-row input[name="_save"] {
  background: linear-gradient(135deg, #035a6e 0%, #0284c7 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 9px 20px !important;
  font-size: 12.5px !important;
  font-weight: 800 !important;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(3, 90, 110, 0.22);
}
.submit-row input[type="submit"]:not(.default):not([name="_save"]) {
  background: #f8fafc !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 9px 14px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  cursor: pointer;
}
.submit-row input[type="submit"]:not(.default):not([name="_save"]):hover {
  border-color: #035a6e !important;
  color: #035a6e !important;
  background: #edf7fa !important;
}
.submit-row a.deletelink {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
  border-radius: 10px !important;
  padding: 8px 14px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  height: auto !important;
  line-height: 1.3 !important;
}

/* ==================== TABULAR INLINES & SELECT2 ==================== */
.inline-group .tabular {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  padding: 0 4px 12px 4px;
}
.inline-group .tabular table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

/* Zero out and hide Django default original column completely */
.inline-group .tabular td.original,
.inline-group .tabular th.original {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  visibility: hidden !important;
  display: none !important;
}
.inline-group .tabular td.original * {
  display: none !important;
}

.inline-group .tabular thead th {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
  color: #475569 !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 14px !important;
  border-bottom: 1.5px solid #cbd5e1 !important;
  white-space: nowrap;
}

.inline-group .tabular tbody tr.form-row td {
  padding: 12px 12px !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #f1f5f9 !important;
  background: #ffffff;
  transition: background 0.12s ease;
}
.inline-group .tabular tbody tr.form-row:nth-child(even) td { background: #fafcfe; }
.inline-group .tabular tbody tr.form-row:hover td { background: #f0f9ff; }

/* Dedicated Column Minimum Widths & Typography */
.inline-group .tabular td.field-member_preview {
  min-width: 210px !important;
  width: 220px !important;
}
.inline-group .tabular td.field-team_member {
  min-width: 260px !important;
  width: 280px !important;
}
.inline-group .tabular td.field-session_role {
  min-width: 280px !important;
  width: 320px !important;
}
.inline-group .tabular td.field-session_role input,
.inline-group .tabular input.fa-session-role-input {
  width: 100% !important;
  min-width: 260px !important;
  font-size: 13px !important;
  padding: 8px 12px !important;
  border-radius: 9px !important;
}
.inline-group .tabular td.field-status {
  min-width: 125px !important;
  width: 130px !important;
}
.inline-group .tabular td.field-status select {
  width: 100% !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
}
.inline-group .tabular td.field-retained_from_previous {
  min-width: 90px !important;
  width: 100px !important;
  text-align: center !important;
}
.inline-group .tabular td.field-retained_from_previous input {
  display: block !important;
  margin: 0 auto !important;
  width: 18px !important;
  height: 18px !important;
  cursor: pointer !important;
  accent-color: #035a6e !important;
}
.inline-group .tabular td.field-display_order {
  min-width: 75px !important;
  width: 80px !important;
  text-align: center !important;
}
.inline-group .tabular td.field-display_order input,
.inline-group .tabular input.fa-order-input {
  width: 65px !important;
  min-width: 60px !important;
  text-align: center !important;
  font-weight: 800 !important;
  font-family: 'JetBrains Mono', monospace !important;
  padding: 6px 4px !important;
  border-radius: 8px !important;
  display: inline-block !important;
}
.inline-group .tabular thead th.delete,
.inline-group .tabular tbody td.delete {
  text-align: center !important;
  color: #dc2626 !important;
  font-weight: 800 !important;
  width: 65px !important;
  min-width: 65px !important;
}
.inline-group .tabular tbody td.delete input[type="checkbox"] {
  display: block !important;
  margin: 0 auto !important;
  width: 18px !important;
  height: 18px !important;
  accent-color: #dc2626;
  cursor: pointer;
}

/* Related Widget Wrapper (Autocomplete + Action Icons on a single line) */
.inline-group .tabular td .related-widget-wrapper {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  max-width: 100% !important;
}
.inline-group .tabular td .related-widget-wrapper .select2-container {
  flex: 1 1 auto !important;
  min-width: 200px !important;
  max-width: 100% !important;
}
.inline-group .tabular td .related-widget-wrapper-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  flex-shrink: 0 !important;
  transition: all 0.15s ease !important;
}
.inline-group .tabular td .related-widget-wrapper-link:hover {
  background: #e0f2fe !important;
  border-color: #0284c7 !important;
  transform: translateY(-1px);
}
.inline-group .tabular td .related-widget-wrapper-link img {
  width: 14px;
  height: 14px;
}

/* Add Row Button */
.inline-group .tabular tr.add-row td {
  padding: 14px 16px !important;
  background: #f8fbfd !important;
}
.inline-group .tabular tr.add-row a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #e6f4f7 0%, #edf7fa 100%);
  color: #035a6e !important;
  border: 1px solid #b8dce4;
  font-weight: 800;
  font-size: 12.5px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(3, 90, 110, 0.08);
  transition: all 0.15s ease;
}
.inline-group .tabular tr.add-row a:hover {
  background: #035a6e;
  color: #ffffff !important;
  border-color: #035a6e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(3, 90, 110, 0.22);
}

.select2-container--admin-autocomplete .select2-selection--single {
  height: 38px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9px !important;
  background: #ffffff !important;
  display: flex !important;
  align-items: center !important;
}
.select2-container--admin-autocomplete { min-width: 210px !important; }

/* ==================== SESSION MEMBER & PREVIEW BADGES ==================== */
.fa-session-preview-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}
.fa-session-preview-badge.empty {
  padding: 6px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}
.fa-preview-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  border: 1.5px solid #035a6e;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
  flex-shrink: 0;
}
.fa-preview-avatar.initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e6f4f7 0%, #e0f2fe 100%);
  color: #035a6e;
  font-weight: 800;
  font-size: 13px;
  border: 1.5px solid #b8dce4;
}
.fa-preview-avatar.placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #94a3b8;
  font-weight: 700;
  font-size: 13px;
  border: 1px dashed #cbd5e1;
}
.fa-preview-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fa-preview-title {
  font-weight: 800;
  font-size: 12.5px;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.fa-preview-title.muted { color: #94a3b8; font-weight: 600; font-size: 11.5px; }
.fa-preview-sub { font-size: 10.5px; color: #94a3b8; }
.fa-preview-meta {
  display: flex;
  align-items: center;
  gap: 4px;
}
.fa-preview-id-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  color: #035a6e;
  background: #e6f4f7;
  padding: 2px 7px;
  border-radius: 6px;
  text-decoration: none;
  border: 1px solid #b8dce4;
  transition: all 0.12s ease;
}
.fa-preview-id-pill:hover {
  background: #035a6e;
  color: #ffffff !important;
  border-color: #035a6e;
}
.fa-preview-gear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  color: #64748b;
  text-decoration: none;
  font-size: 12px;
  transition: color 0.12s ease;
}
.fa-preview-gear:hover { color: #0f172a; }

/* ==================== SESSION DASHBOARD OVERVIEW ==================== */
.fa-session-dash {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbfd 100%);
  border: 1px solid #dbe4ee;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.fa-session-dash.empty { padding: 14px 18px; }
.fa-sd-left { display: flex; flex-direction: column; gap: 4px; }
.fa-sd-year-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fa-sd-year { font-family: 'Manrope', sans-serif; font-size: 16px; font-weight: 900; color: #0f172a; }
.fa-sd-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  letter-spacing: 0.05em;
}
.fa-sd-badge.current { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.fa-sd-sub { font-size: 12px; color: #64748b; }
.fa-sd-stats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fa-sd-stat-box {
  display: flex;
  flex-direction: column;
  padding: 8px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-align: center;
}
.fa-sd-stat-box.emerald { background: #ecfdf5; border-color: #a7f3d0; }
.fa-sd-stat-box.emerald .fa-sd-num { color: #047857; }
.fa-sd-stat-box.indigo { background: #eef2ff; border-color: #c7d2fe; }
.fa-sd-stat-box.indigo .fa-sd-num { color: #4338ca; }
.fa-sd-num { font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 900; color: #035a6e; line-height: 1.1; }
.fa-sd-label { font-size: 10px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.fa-btn-preview-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border-radius: 10px;
  background: #035a6e;
  color: #ffffff !important;
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(3, 90, 110, 0.22);
  transition: all 0.15s ease;
}
.fa-btn-preview-link:hover {
  background: #024554;
  transform: translateY(-1px);
}

/* ==================== EXECUTIVE DOSSIER CARDS (CHANGE FORMS) ==================== */
.fa-dossier-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbfd 100%);
  border: 1px solid #dbe4ee;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  width: 100%;
}
.fa-dossier-card.empty {
  padding: 14px 18px;
  background: #f8fafc;
  border-style: dashed;
}
.fa-dc-icon {
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #edf7fa;
  flex-shrink: 0;
}
.fa-dc-left { flex-shrink: 0; }
.fa-dc-avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #035a6e;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
  display: block;
}
.fa-dc-avatar.initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e6f4f7 0%, #e0f2fe 100%);
  color: #035a6e;
  font-weight: 900;
  font-size: 18px;
  border: 2px solid #b8dce4;
}
.fa-dc-thumb {
  width: 64px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  border: 1.5px solid #035a6e;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
  display: block;
}
.fa-dc-thumb.initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 46px;
  border-radius: 8px;
  background: #edf7fa;
  color: #035a6e;
  font-weight: 900;
  font-size: 16px;
  border: 1.5px solid #b8dce4;
}
.fa-dc-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.fa-dc-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fa-dc-name {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
}
.fa-dc-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}
.fa-dc-pill.teal { background: #e6f4f7; color: #035a6e; border: 1px solid #b8dce4; }
.fa-dc-pill.sky { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.fa-dc-pill.emerald { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.fa-dc-pill.amber { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.fa-dc-pill.slate { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

.fa-dc-role {
  font-size: 13px;
  font-weight: 700;
  color: #035a6e;
}
.fa-dc-wing { color: #64748b; font-weight: 500; }
.fa-dc-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #64748b;
  flex-wrap: wrap;
}
.fa-dc-code { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: #0f172a; }
.fa-dc-dot { color: #cbd5e1; }
.fa-dc-link {
  font-weight: 700;
  color: #0284c7;
  text-decoration: none;
  transition: color 0.12s ease;
}
.fa-dc-link:hover { color: #035a6e; text-decoration: underline; }

/* ==================== FULL-WIDTH VISUAL JSON BUILDERS & DROPZONES ==================== */
.fa-dz-native-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.fa-dropzone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1.5px dashed #94a3b8;
  border-radius: 14px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  max-width: 100%;
}
.fa-dropzone-compact { padding: 8px 12px; gap: 10px; max-width: 260px; }
.fa-dropzone:hover, .fa-dropzone.fa-dz-dragover, .fa-dropzone.dragover {
  border-color: #035a6e;
  background: #edf7fa;
  box-shadow: 0 2px 8px rgba(3, 90, 110, 0.08);
}
.fa-dz-preview {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #cbd5e1;
}
.fa-dz-preview img { width: 100%; height: 100%; object-fit: cover; }
.fa-dz-icon { font-size: 20px; color: #035a6e; font-weight: 700; }
.fa-dz-title { font-size: 13px; font-weight: 800; color: #0f172a; }
.fa-dz-status { font-size: 11.5px; color: #64748b; margin-top: 2px; }

.fa-smart-json {
  width: 100% !important;
  max-width: 100% !important;
  border: 1px solid #dbe4ee !important;
  border-radius: 14px !important;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.03);
}
.fa-sj-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  background: linear-gradient(90deg, #f8fbfd 0%, #edf7fa 100%);
  border-bottom: 1px solid #e2e8f0;
}
.fa-sj-title {
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.fa-sj-toggle {
  font-size: 11.5px;
  font-weight: 700;
  color: #035a6e;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.fa-sj-toggle:hover {
  border-color: #035a6e;
  background: #edf7fa;
}
.fa-sj-body { padding: 16px 18px; }
.fa-sj-list { display: flex; flex-direction: column; gap: 12px; }
.fa-sj-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.fa-sj-card-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  transition: all 0.12s ease;
}
.fa-sj-card-row:hover {
  border-color: #cbd5e1;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.fa-sj-card-fields {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 14px;
}
.fa-sj-dict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.fa-sj-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
}
.fa-sj-input {
  width: 100% !important;
  min-height: 38px !important;
  padding: 8px 12px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 9px !important;
  font-size: 12.5px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.fa-sj-input:focus {
  border-color: #035a6e !important;
  box-shadow: 0 0 0 3px rgba(3, 90, 110, 0.12) !important;
  outline: none !important;
}
.fa-sj-thumb, .fa-sj-thumb-box {
  width: 58px;
  height: 44px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.fa-sj-del {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  margin-top: 18px;
}
.fa-sj-del:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}
.fa-sj-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.fa-sj-add, .fa-sj-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.12s ease;
}
.fa-sj-add {
  background: #e6f4f7;
  color: #035a6e;
  border: 1px solid #b8dce4;
}
.fa-sj-add:hover {
  background: #035a6e;
  color: #ffffff;
}
.fa-sj-upload-btn {
  background: #035a6e;
  color: #ffffff;
  border: 1px solid #035a6e;
}
.fa-sj-upload-btn:hover {
  background: #024554;
}
.fa-sj-empty {
  font-size: 12.5px;
  color: #64748b;
  padding: 12px 0;
  text-align: center;
}

/* ==================== RESPONSIVE BREAKPOINTS ==================== */
@media (max-width: 1200px) {
  .fa-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fa-main-layout { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  #header { flex-wrap: wrap !important; padding: 8px 14px !important; gap: 6px !important; }
  #user-tools { width: 100%; justify-content: flex-start !important; padding-bottom: 2px !important; }
}
@media (max-width: 768px) {
  .fa-admin-pill { display: none; }
  div.breadcrumbs { padding: 8px 14px !important; font-size: 11.5px !important; }
  #content { padding: 14px 12px 36px !important; }
  .fa-hero-banner { padding: 16px; }
  .fa-hero-actions .fa-btn { flex: 1 1 calc(50% - 6px); font-size: 11.5px; }
  .fa-model-grid { grid-template-columns: 1fr; }
  fieldset.module.aligned .flex-container.form-multiline { grid-template-columns: 1fr !important; }
  fieldset.module.aligned .form-row.checkbox-row > div.flex-container,
  fieldset.module.aligned .flex-container.form-multiline > div.checkbox-row { padding-top: 4px !important; }
  .submit-row { flex-direction: column !important; align-items: stretch !important; }
  .submit-row input[type="submit"], .submit-row a.deletelink { width: 100% !important; text-align: center !important; margin: 0 !important; }
  .fa-sj-card-row { flex-direction: column; align-items: stretch !important; }
  .fa-sj-card-fields, .fa-sj-dict-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .fa-kpi-grid { grid-template-columns: 1fr; }
}


/* Fix select dropdown vertical clipping across Admin forms & Issue Certificate Studio */
select, .form-row select {
  height: auto !important;
  min-height: 40px !important;
  line-height: 1.45 !important;
  padding: 8px 34px 8px 12px !important;
  box-sizing: border-box !important;
}
