:root {
  --ui-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --brand-font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --ui-bg: #eef4fb;
  --ui-bg-soft: #f6f9fd;
  --ui-surface: #ffffff;
  --ui-surface-2: #f8fbff;

  --ui-text: #10233b;
  --ui-text-soft: #42556d;
  --ui-text-muted: #6b7d93;

  --ui-border: #d9e4f0;
  --ui-border-strong: #c7d6e6;

  --ui-primary: #1d4ed8;
  --ui-primary-hover: #1e40af;
  --ui-primary-soft: #dbeafe;

  --ui-success: #15803d;
  --ui-success-soft: #dcfce7;

  --ui-warning: #b45309;
  --ui-warning-soft: #fef3c7;

  --ui-danger: #b91c1c;
  --ui-danger-soft: #fee2e2;

  --ui-sidebar: #2b5988;
  --ui-sidebar-2: #244c76;
  --ui-sidebar-text: #edf4fb;
  --ui-sidebar-muted: #c9d8e8;

  --ui-header-bg: #2c5988;
  --ui-header-left-bg: #2c5988;

  --ui-shadow-xs: 0 1px 2px rgba(16, 35, 59, 0.05);
  --ui-shadow-sm: 0 6px 18px rgba(16, 35, 59, 0.07);
  --ui-shadow-md: 0 14px 34px rgba(16, 35, 59, 0.10);

  --ui-radius-sm: 10px;
  --ui-radius-md: 14px;
  --ui-radius-lg: 18px;

  --ui-sidebar-width: 248px;
  --ui-sidebar-collapsed: 76px;
  --ui-header-height: 74px;
  --ui-main-max: 1680px;
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--ui-font);
  background:
    radial-gradient(circle at top left, rgba(59,130,246,0.05), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f8 100%);
  color: var(--ui-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.preload * {
  transition: none !important;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--ui-header-height);
  display: grid;
  grid-template-columns: var(--ui-sidebar-width) 1fr;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--ui-header-bg);
  box-shadow: 0 4px 14px rgba(16, 35, 59, 0.08);
}

.app-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px 0 18px;
  background: var(--ui-header-left-bg);
  color: #fff;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.sidebar-toggle {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  background: rgba(255,255,255,0.10);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.sidebar-toggle:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-1px);
}

.app-brand {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-full {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  flex: 0 0 auto;
  font-family: var(--brand-font);
  font-size: 2.05rem;
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #ffffff;
  opacity: 0.96;
}

.brand-text {
  min-width: 0;
}

.brand-name {
  font-family: var(--brand-font);
  font-size: 1.28rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.brand-name-accent {
  font-size: 1.38em;
  line-height: 0.8;
  font-weight: 800;
  margin-right: 0.01em;
}

.brand-tagline {
  margin-top: 3px;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}

.brand-compact {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.app-brand .info {
  margin-top: 5px;
  font-size: 0.72rem;
  line-height: 1.2;
  color: rgba(255,255,255,0.74);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.app-header-right {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  min-width: 0;
  color: #ffffff;
}

.app-userbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.app-userchip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  box-shadow: none;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.92);
}

.app-userchip strong {
  color: #ffffff;
  font-weight: 700;
}

.app-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  text-decoration: none;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}

.app-logout:hover {
  color: #ffffff;
  border-color: rgba(255,255,255,0.30);
  background: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

.layout {
  display: grid;
  grid-template-columns: var(--ui-sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--ui-header-height));
}

nav.sidebar {
  position: sticky;
  top: var(--ui-header-height);
  align-self: start;
  height: calc(100vh - var(--ui-header-height));
  overflow-y: auto;
  background: linear-gradient(180deg, #2f6093 0%, #295581 100%);
  border-right: 1px solid rgba(255,255,255,0.08);
  padding: 14px 10px;
  transition: width .22s ease, padding .22s ease;
}

nav.sidebar a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-bottom: 6px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--ui-sidebar-text);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

nav.sidebar a:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.07);
  color: #fff;
  transform: translateX(2px);
}

nav.sidebar a.active {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.14);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

nav.sidebar i {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

nav.sidebar span {
  white-space: nowrap;
}

.sidebar-alert-dot {
  margin-left: auto;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ui-warning-soft);
  color: var(--ui-warning);
  font-size: .78rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.12);
}

main.app-main {
  min-width: 0;
  padding: 26px 24px;
  background: transparent;
}

.app-content {
  max-width: var(--ui-main-max);
  margin: 0 auto;
}

main > * + * {
  margin-top: 22px;
}

.page-spacer {
  height: 48px;
}

.subdashboard-header,
.subdashboard-nav {
  width: 100%;
}

.subdashboard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subdashboard-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  background: rgba(255,255,255,0.96);
  text-decoration: none;
  color: var(--ui-text-soft);
  font-size: 0.87rem;
  font-weight: 700;
  box-shadow: var(--ui-shadow-xs);
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.subdashboard-item:hover,
.subdashboard-item.active {
  color: #173e68;
  border-color: #bfd8f5;
  background: #eef6ff;
}

.card,
.table-responsive,
.dashboard-card,
.dashboard-stat-card {
  border-radius: var(--ui-radius-lg) !important;
}

.card {
  border: 1px solid rgba(217, 228, 240, 0.98);
  box-shadow: var(--ui-shadow-sm);
  overflow: hidden;
  background: #fff;
}

.card-header {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border-bottom: 1px solid var(--ui-border);
  padding: 15px 18px;
  font-weight: 800;
  color: var(--ui-text);
}

.card-body {
  padding: 18px;
}

.btn,
button,
input[type="submit"],
input[type="button"] {
  border-radius: 12px !important;
}

.btn {
  min-height: 40px;
  font-weight: 700;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border-color: #1d4ed8;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
  border-color: #1e40af;
}

.btn-outline-primary {
  color: #1e40af;
  border-color: #b7d1f3;
  background: #f7fbff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: #163b63;
  border-color: #8fb4e2;
  background: #eef6ff;
}

.btn-secondary {
  background: #e7eef6;
  border-color: #d5e1ed;
  color: #1e3550;
}

.btn-danger {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  border-color: #dc2626;
}

.form-control,
.form-select,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="password"],
input[type="search"] {
  min-height: 42px;
  border-radius: 12px !important;
  border: 1px solid var(--ui-border-strong) !important;
  background: rgba(255,255,255,0.98) !important;
  color: var(--ui-text) !important;
  box-shadow: none !important;
}

textarea.form-control,
textarea {
  min-height: 110px;
}

.form-control:focus,
.form-select:focus,
select:focus,
textarea:focus,
input:focus {
  border-color: #93c5fd !important;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.14) !important;
}

label,
.form-label {
  margin-bottom: 6px;
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ui-text-soft);
}

.table-responsive,
.table-wrap {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  background: #fff;
  box-shadow: var(--ui-shadow-sm);
}

.table {
  margin-bottom: 0;
  vertical-align: middle;
}

.table thead th {
  background: #f6fafe;
  color: #536980;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  border-bottom: 1px solid var(--ui-border) !important;
  padding-top: 14px;
  padding-bottom: 14px;
}

.table tbody td {
  padding-top: 14px;
  padding-bottom: 14px;
  border-color: #edf3f8;
}

.table-hover tbody tr:hover {
  background: #f8fbff;
}

.badge {
  border-radius: 999px;
  padding: 0.48rem 0.68rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.alert {
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  box-shadow: var(--ui-shadow-xs);
}

.toast-flash-container {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 420px;
}

.toast-flash {
  pointer-events: auto;
  border-radius: 14px;
  padding: 13px 15px;
  box-shadow: var(--ui-shadow-md);
  border: 1px solid var(--ui-border);
  background: #ffffff;
  color: var(--ui-text);
  font-size: 0.92rem;
  line-height: 1.35;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.toast-flash.toast-success { background: #f0fdf4; border-color: #bbf7d0; }
.toast-flash.toast-error   { background: #fef2f2; border-color: #fecaca; }
.toast-flash.toast-warning { background: #fffbeb; border-color: #fde68a; }
.toast-flash.toast-info    { background: #f0f9ff; border-color: #bae6fd; }

.toast-flash.is-hiding {
  opacity: 0;
  transform: translateY(-8px);
}

nav.sidebar.collapsed {
  width: var(--ui-sidebar-collapsed);
  padding-left: 8px;
  padding-right: 8px;
}

.layout.sidebar-collapsed {
  grid-template-columns: var(--ui-sidebar-collapsed) minmax(0, 1fr);
}

.app-header.sidebar-collapsed {
  grid-template-columns: var(--ui-sidebar-collapsed) 1fr;
}

nav.sidebar.collapsed a {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

nav.sidebar.collapsed span {
  display: none;
}

nav.sidebar.collapsed .sidebar-alert-dot {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 10px;
  height: 10px;
  display: inline-flex;
  overflow: hidden;
  color: transparent;
}

nav.sidebar.collapsed i {
  margin: 0;
}

@media (max-width: 992px) {
  .app-header,
  .layout,
  .app-header.sidebar-collapsed,
  .layout.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .app-header-left {
    border-right: 0;
  }

  nav.sidebar,
  nav.sidebar.collapsed {
    position: static;
    height: auto;
    overflow-y: visible;
    width: 100%;
    padding: 12px;
  }

  nav.sidebar.collapsed span {
    display: inline;
  }

  nav.sidebar.collapsed a {
    justify-content: flex-start;
    padding: 0 14px;
  }

  .app-header-right {
    padding: 14px 18px;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  main.app-main {
    padding: 18px;
  }
}


.app-header.sidebar-collapsed .brand-full,
.app-header.sidebar-collapsed .app-brand .info {
  display: none;
}

.app-header.sidebar-collapsed .brand-compact {
  display: inline-flex;
}

.app-header.sidebar-collapsed .app-header-left {
  justify-content: center;
  padding-left: 8px;
  padding-right: 8px;
}

.app-header.sidebar-collapsed .app-brand {
  align-items: center;
}

@media (max-width: 992px) {
  .brand-compact {
    display: none !important;
  }

  .brand-full {
    display: flex !important;
  }

  .app-brand .info {
    display: block !important;
  }
}

/* =========================================================
   AERION UI — PAGE HEADER / FILTER CARD / TABLE POLISH
   ========================================================= */

:root {
  --page-head-title: #1f2b3d;
  --page-head-subtitle: #66768a;

  --filter-card-bg: rgba(255,255,255,0.74);
  --filter-card-border: #dbe5ef;

  --table-head-bg: #f4f8fc;
  --table-head-text: #55687f;
  --table-row-border: #eaf0f6;

  --pill-green-bg: #dff3e5;
  --pill-green-text: #1f6a3a;

  --pill-red-bg: #f8dede;
  --pill-red-text: #9f2626;

  --pill-amber-bg: #f8ecd1;
  --pill-amber-text: #9a6415;

  --pill-blue-bg: #dfeafb;
  --pill-blue-text: #2d5f96;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.page-head-main {
  min-width: 0;
}

.page-head-title {
  margin: 0;
  font-size: 2.15rem;
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--page-head-title);
}

.page-head-subtitle {
  margin-top: 8px;
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--page-head-subtitle);
}

.page-head-tools {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.page-head-tool {
  min-width: 180px;
}

.page-head-tool-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6d7f94;
}

.filter-card,
.table-card {
  border: 1px solid var(--filter-card-border);
  border-radius: 22px;
  background: var(--filter-card-bg);
  box-shadow: 0 10px 28px rgba(31, 43, 61, 0.05);
  backdrop-filter: blur(6px);
}

.filter-card {
  padding: 18px 18px 14px;
}

.table-card {
  padding: 0;
  overflow: hidden;
}

.filter-grid {
  display: grid;
  grid-template-columns: 150px minmax(280px, 1fr) 160px;
  gap: 14px;
  align-items: end;
}

.field-block {
  min-width: 0;
}

.field-label-pro {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6d7f94;
}

.filter-card .form-control,
.filter-card .form-select,
.filter-card select,
.filter-card input[type="text"],
.filter-card input[type="search"] {
  min-height: 44px;
  background: rgba(255,255,255,0.92) !important;
}

.table-card .table {
  margin: 0;
}

.table-card .table thead th {
  background: var(--table-head-bg);
  color: var(--table-head-text);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid #dce7f1 !important;
  padding: 14px 16px;
  white-space: nowrap;
}

.table-card .table tbody td {
  padding: 16px;
  border-color: var(--table-row-border);
  vertical-align: middle;
}

.table-card .table tbody tr:hover {
  background: rgba(247, 250, 253, 0.9);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  min-width: 96px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 0;
}

.status-pill--green {
  background: var(--pill-green-bg);
  color: var(--pill-green-text);
}

.status-pill--red {
  background: var(--pill-red-bg);
  color: var(--pill-red-text);
}

.status-pill--amber {
  background: var(--pill-amber-bg);
  color: var(--pill-amber-text);
}

.status-pill--blue {
  background: var(--pill-blue-bg);
  color: var(--pill-blue-text);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 88px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease;
}

.action-btn:hover {
  transform: translateY(-1px);
}

.action-btn--primary {
  background: #9f1d1d;
  color: #ffffff;
  border: 1px solid #9f1d1d;
}

.action-btn--primary:hover {
  background: #871919;
  color: #ffffff;
  border-color: #871919;
}

.action-btn--ghost {
  background: rgba(255,255,255,0.82);
  color: #2b5d94;
  border: 1px solid #bdd0e4;
}

.action-btn--ghost:hover {
  background: #f5faff;
  color: #234f80;
  border-color: #98b7d5;
}

.card-soft-section {
  border: 1px solid #e4edf5;
  border-radius: 18px;
  background: rgba(255,255,255,0.5);
}

@media (max-width: 1100px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .page-head-tools {
    align-items: stretch;
  }

  .page-head-tool {
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .page-head-title {
    font-size: 1.8rem;
  }

  .filter-card {
    padding: 16px;
  }

  .table-card .table thead th,
  .table-card .table tbody td {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* =========================================================
   AERION UI — MINI POLISH FINALE
   ========================================================= */

:root {
  --ui-short-field-width: 148px;
}

.page-head-tool {
  min-width: var(--ui-short-field-width);
}

.page-head.gs-header .page-head-tool {
  min-width: var(--ui-short-field-width);
}

.page-head.gs-header .gs-view-form,
.page-head.gs-header .gs-view-form .gs-select,
.page-head.gs-header .gs-view-form .form-select {
  width: var(--ui-short-field-width);
  min-width: var(--ui-short-field-width);
  max-width: var(--ui-short-field-width);
}

.filter-grid {
  grid-template-columns: var(--ui-short-field-width) minmax(340px, 1fr) var(--ui-short-field-width);
}

.action-btn {
  min-height: 38px;
  min-width: 76px;
  padding: 0 15px;
  border-radius: 13px;
  font-size: 0.87rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.action-btn--ghost {
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(246,250,255,0.96) 100%);
  color: #234f80;
  border: 1px solid #b7cae0;
  box-shadow: 0 1px 2px rgba(35, 79, 128, 0.06);
}

.action-btn--ghost:hover {
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%);
  color: #1d456f;
  border-color: #93b0cf;
  box-shadow: 0 3px 8px rgba(35, 79, 128, 0.08);
}

.table-card .table thead th {
  padding-top: 13px;
  padding-bottom: 13px;
}

.table-card .table tbody td {
  padding-top: 12px;
  padding-bottom: 12px;
}

.gs-table .gs-badge {
  min-height: 30px;
  min-width: 98px;
  padding: 0 13px;
}

@media (max-width: 1100px) {
  .page-head.gs-header .gs-view-form,
  .page-head.gs-header .gs-view-form .gs-select,
  .page-head.gs-header .gs-view-form .form-select {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   AERION UI — ALIGN VISTA WITH SHORT FILTERS
   ========================================================= */

.page-head {
  align-items: flex-start;
}

.page-head-tools {
  align-items: flex-start;
}

.page-head-tool {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.page-head-tool-label,
.field-label-pro {
  margin-bottom: 8px;
  min-height: 12px;
  line-height: 1;
}

.page-head.gs-header .gs-view-form {
  gap: 0;
}

.page-head.gs-header .page-head-tool-label {
  display: block;
}

.page-head.gs-header .gs-view-form .gs-select,
.page-head.gs-header .gs-view-form .form-select,
.filter-card .form-select,
.filter-card select {
  min-height: 44px;
  height: 44px;
}

@media (max-width: 1100px) {
  .page-head-tool-label,
  .field-label-pro {
    min-height: 0;
  }
}

/* =========================================================
   AERION UI — ALIGN VISTA LEFT EDGE WITH STATO SOCIO
   ========================================================= */

.page-head.gs-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ui-short-field-width);
  column-gap: 14px;
  align-items: start;
}

.page-head.gs-header .page-head-main {
  min-width: 0;
}

.page-head.gs-header .page-head-tools {
  width: var(--ui-short-field-width);
  justify-self: start;
  align-items: stretch;
}

.page-head.gs-header .page-head-tool,
.page-head.gs-header .gs-view-form {
  width: var(--ui-short-field-width);
  min-width: var(--ui-short-field-width);
  max-width: var(--ui-short-field-width);
}

@media (max-width: 1100px) {
  .page-head.gs-header {
    display: flex;
  }

  .page-head.gs-header .page-head-tools,
  .page-head.gs-header .page-head-tool,
  .page-head.gs-header .gs-view-form {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

/* =========================================================
   AERION UI — FORCE MOVE VISTA LEFT
   ========================================================= */

.page-head.gs-header .page-head-tools {
  margin-right: 28px !important;
}

@media (max-width: 1100px) {
  .page-head.gs-header .page-head-tools {
    margin-right: 0 !important;
  }
}

/* =========================================================
   AERION UI — FORCE VISTA REAL LEFT SHIFT
   ========================================================= */

.page-head.gs-header .page-head-tools {
  transform: translateX(-42px) !important;
}

@media (max-width: 1100px) {
  .page-head.gs-header .page-head-tools {
    transform: none !important;
  }
}

/* =========================================================
   AERION UI — SCADENZIARIO WORKSPACE
   ========================================================= */

.scad-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.scad-head-main {
  min-width: 0;
}

.scad-title {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #223247;
}

.scad-subtitle {
  margin-top: 7px;
  font-size: 0.96rem;
  line-height: 1.4;
  color: #6a7b8f;
}

.scad-head-actions {
  display: flex;
  align-items: flex-start;
}

.scad-genera-btn {
  min-height: 40px;
  padding-left: 14px;
  padding-right: 14px;
  font-size: 0.88rem;
}

.scad-filters {
  margin-bottom: 14px;
}

.scad-filter-grid {
  display: grid;
  grid-template-columns: 118px minmax(220px, 1fr) 150px 132px;
  gap: 12px;
  align-items: end;
}

.scad-filter {
  min-width: 0;
}

.scad-filter-short .form-select,
.scad-filter-short select {
  min-width: 118px;
}

.scad-filter-medium .form-select,
.scad-filter-medium select {
  min-width: 150px;
}


.scad-table-wrap {
  overflow: hidden;
}

.scad-table th.scad-col-socio {
  min-width: 250px;
}

.scad-table thead th {
  font-size: 0.78rem;
}

.scad-table thead th:not(.scad-col-socio),
.scad-table tbody td:not(.scad-socio-cell) {
  text-align: center;
}

.scad-table tbody td {
  padding-top: 14px;
  padding-bottom: 14px;
}

.scad-socio-cell {
  min-width: 250px;
}

.scad-socio-name {
  font-size: 0.98rem;
  font-weight: 800;
  color: #1f2d40;
}

.scad-quota-name {
  margin-top: 3px;
  font-size: 0.78rem;
  color: #7a8899;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media (max-width: 1200px) {
  .scad-filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .scad-filter-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   AERION UI — SCADENZIARIO WORKSPACE BLOCK 2
   ========================================================= */

.scad-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: 2px 0 10px;
  padding: 0 2px;
}

.scad-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6f8094;
}

.scad-legend-item .dot {
  width: 10px;
  height: 10px;
}

.scad-apply-btn.btn-primary {
  background: linear-gradient(180deg, #2f64d8 0%, #2453c7 100%);
  border-color: #2453c7;
  box-shadow: 0 3px 8px rgba(36, 83, 199, 0.14);
}

.scad-apply-btn.btn-primary:hover,
.scad-apply-btn.btn-primary:focus {
  background: linear-gradient(180deg, #2a59c9 0%, #2149ae 100%);
  border-color: #2149ae;
}

.scad-table th.scad-col-socio,
.scad-table td.scad-socio-cell {
  min-width: 220px;
  width: 220px;
}

.scad-table thead th {
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 0.76rem;
  letter-spacing: 0.05em;
}

.scad-table thead th:not(.scad-col-socio) {
  width: 52px;
}

.scad-table tbody td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.scad-socio-name {
  font-size: 0.95rem;
  line-height: 1.15;
}

.scad-quota-name {
  margin-top: 4px;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.scad-table .dot {
  width: 10px;
  height: 10px;
}

.scad-table-wrap {
  margin-top: 0;
}

@media (max-width: 768px) {
  .scad-legend {
    gap: 12px;
  }

  .scad-legend-item {
    font-size: 0.78rem;
  }
}

/* =========================================================
   AERION UI — SCADENZIARIO MINI POLISH FINALE
   ========================================================= */

.scad-genera-btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(245,249,253,0.98) 100%);
  border-color: #bfd0e1;
  color: #264e78;
  box-shadow: 0 1px 2px rgba(38, 78, 120, 0.05);
}

.scad-genera-btn:hover,
.scad-genera-btn:focus {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fa 100%);
  border-color: #aabfd6;
  color: #1f456d;
  box-shadow: 0 3px 8px rgba(38, 78, 120, 0.08);
}

.scad-socio-name {
  font-size: 0.93rem;
  font-weight: 750;
  color: #223246;
  letter-spacing: -0.01em;
}

.scad-quota-name {
  margin-top: 5px;
  font-size: 0.73rem;
  color: #8695a6;
  letter-spacing: 0.045em;
}

.scad-table tbody td.scad-socio-cell {
  padding-top: 11px;
  padding-bottom: 11px;
}

.scad-table tbody td:not(.scad-socio-cell) {
  padding-top: 9px;
  padding-bottom: 9px;
}

/* =========================================================
   AERION UI — SCADENZIARIO LIVE FILTERS
   ========================================================= */

.scad-filters.is-loading {
  opacity: 0.72;
  transition: opacity .18s ease;
}

/* =========================================================
   AERION UI — DASHBOARD
   ========================================================= */

.dash-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.dash-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: stretch;
}

.dash-hero-main,
.dash-context-card,
.dash-kpi-card,
.dash-module-card,
.dash-reminders-card {
  border: 1px solid #dbe5ef;
  border-radius: 24px;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 10px 28px rgba(31, 43, 61, 0.05);
  backdrop-filter: blur(6px);
}

.dash-hero-main {
  padding: 24px 24px 22px;
}

.dash-eyebrow {
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #708197;
}

.dash-title {
  margin: 12px 0 0;
  font-size: 2.45rem;
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.045em;
  color: #1f2d40;
}

.dash-subtitle {
  margin: 12px 0 0;
  max-width: 760px;
  font-size: 1.02rem;
  line-height: 1.5;
  color: #6b7c90;
}

.dash-context-card {
  height: 100%;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dash-context-label {
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #708197;
}

.dash-context-value {
  margin-top: 12px;
  font-size: 1.1rem;
  line-height: 1.25;
  font-weight: 800;
  color: #223247;
}

.dash-context-note {
  margin-top: 8px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #73849a;
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dash-kpi-card {
  padding: 18px 18px 16px;
}

.dash-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dash-kpi-top i {
  width: 18px;
  height: 18px;
  color: #5f7897;
}

.dash-kpi-label {
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #708197;
}

.dash-kpi-value {
  margin-top: 14px;
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #1f2d40;
}

.dash-kpi-foot {
  margin-top: 10px;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #72839a;
}

.dash-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.dash-section-title {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #223247;
}

.dash-section-subtitle {
  margin: 8px 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #72839a;
}

.dash-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dash-operations-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
  gap: 16px;
  align-items: stretch;
}

.dash-module-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.dash-module-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}

.dash-module-card:hover {
  transform: translateY(-2px);
  border-color: #c9d8e8;
  box-shadow: 0 14px 34px rgba(31, 43, 61, 0.08);
  background: rgba(255,255,255,0.9);
}

.dash-module-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #eef5fd 0%, #e4eef9 100%);
  border: 1px solid #d5e2ef;
  color: #2d5f96;
}

.dash-module-icon i {
  width: 24px;
  height: 24px;
}

.dash-module-body h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.15;
  font-weight: 800;
  color: #223247;
}

.dash-module-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dash-module-arrow {
  flex: 0 0 auto;
  font-size: 1.15rem;
  font-weight: 700;
  color: #7a8da5;
  transition: transform .16s ease, color .16s ease;
}

.dash-module-card:hover .dash-module-arrow {
  transform: translateX(2px);
  color: #2d5f96;
}

.dash-module-body p {
  margin: 10px 0 0;
  font-size: 0.93rem;
  line-height: 1.5;
  color: #6e8096;
}

.dash-reminders-card {
  min-height: 100%;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dash-reminders-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dash-reminders-label {
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #708197;
}

.dash-reminders-head h3 {
  margin: 10px 0 0;
  font-size: 1.35rem;
  line-height: 1.05;
  font-weight: 800;
  color: #223247;
}

.dash-reminders-total {
  min-width: 44px;
  height: 38px;
  padding: 0 12px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #223247;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 800;
}

.dash-reminders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-reminder-group {
  padding-top: 14px;
  border-top: 1px solid #e0e8f1;
}

.dash-reminder-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.dash-reminder-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.dash-reminder-group-title {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.88rem;
  line-height: 1.2;
  font-weight: 800;
  color: #243449;
}

.dash-reminder-group-title i {
  width: 17px;
  height: 17px;
  color: #2f6f7f;
}

.dash-reminder-count {
  min-width: 26px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf3f5;
  color: #245464;
  font-size: 0.8rem;
  line-height: 1;
  font-weight: 800;
}

.dash-reminder-items {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-reminder-item {
  min-height: 56px;
  padding: 10px 0;
  border-top: 1px solid #edf2f7;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.dash-reminder-item:first-child {
  border-top: 0;
}

.dash-reminder-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-reminder-item-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 800;
  color: #243449;
}

.dash-reminder-item-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  line-height: 1.25;
  color: #708197;
}

.dash-reminder-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  font-size: 0.8rem;
  line-height: 1;
  font-weight: 800;
  color: #465a72;
  white-space: nowrap;
}

.dash-reminder-status {
  padding: 4px 7px;
  border-radius: 999px;
  font-style: normal;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 800;
  color: #55677c;
  background: #edf2f7;
}

.dash-reminder-status--overdue {
  color: #9b2f2f;
  background: #fdecec;
}

.dash-reminder-status--today {
  color: #7b4c00;
  background: #fff1cf;
}

.dash-reminder-status--soon {
  color: #1f5d49;
  background: #e4f6ef;
}

.dash-reminder-status--open {
  color: #55677c;
  background: #edf2f7;
}

.dash-reminder-empty {
  margin-top: 10px;
  padding: 11px 0 0;
  border-top: 1px solid #edf2f7;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #7c8da2;
}

@media (max-width: 1200px) {
  .dash-hero {
    grid-template-columns: 1fr;
  }

  .dash-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dash-operations-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .dash-title {
    font-size: 2rem;
  }

  .dash-kpi-grid,
  .dash-module-grid,
  .dash-operations-layout {
    grid-template-columns: 1fr;
  }

  .dash-hero-main,
  .dash-context-card,
  .dash-kpi-card,
  .dash-module-card,
  .dash-reminders-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .dash-module-card {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
  }

  .dash-module-icon {
    width: 52px;
    height: 52px;
  }

  .dash-reminder-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 8px;
  }

  .dash-reminder-date {
    align-items: flex-start;
  }
}

/* =========================================================
   AERION UI — PRIMA NOTA WORKSPACE
   ========================================================= */

.pn-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pn-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.pn-title {
  margin: 0;
  font-size: 2.15rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #1f2d40;
}

.pn-subtitle {
  margin: 10px 0 0;
  font-size: 1rem;
  line-height: 1.45;
  color: #6d7f94;
}

.pn-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border: 1px solid #dbe5ef;
  border-radius: 20px;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 10px 28px rgba(31, 43, 61, 0.05);
  backdrop-filter: blur(6px);
}

.pn-toolbar-left,
.pn-toolbar-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.pn-toolbar-left {
  flex: 0 0 auto;
}

.pn-toolbar-actions {
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

.pn-toolbar-form {
  display: flex;
  align-items: flex-end;
  margin: 0;
}

.pn-short-field {
  min-width: 128px;
}

.pn-toolbar-btn {
  min-height: 42px;
  white-space: nowrap;
}

.pn-workspace {
  display: flex;
  flex-direction: column;
}

.pn-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.pn-card {
  border: 1px solid #dbe5ef;
  border-radius: 24px;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 10px 28px rgba(31, 43, 61, 0.05);
  backdrop-filter: blur(6px);
  padding: 20px;
}

.pn-card-head {
  margin-bottom: 16px;
}

.pn-card-title {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #223247;
}

.pn-card-subtitle {
  margin: 8px 0 0;
  font-size: 0.94rem;
  line-height: 1.45;
  color: #72839a;
}

.pn-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pn-form-grid {
  display: grid;
  gap: 14px;
}

.pn-form-grid-insert-top {
  grid-template-columns: 138px minmax(0, 1fr);
}

.pn-form-grid-insert-middle {
  grid-template-columns: 140px 180px minmax(0, 1fr);
  align-items: end;
}

.pn-form-grid-search-date,
.pn-form-grid-search-amount {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pn-field {
  min-width: 0;
}

.pn-field-grow {
  min-width: 0;
}

.pn-inline-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.pn-date-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pn-date-input {
  width: 64px;
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.pn-date-sep {
  flex: 0 0 auto;
  color: #66788f;
  font-weight: 700;
}

.pn-check-field {
  display: flex;
  flex-direction: column;
}

.pn-check-label {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #53667e;
  font-size: 0.92rem;
  font-weight: 600;
}

.pn-wizard-btn {
  min-height: 44px;
}

.pn-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.pn-form-actions-search {
  padding-top: 2px;
}

.pn-save-btn {
  min-height: 42px;
  padding-left: 16px;
  padding-right: 16px;
  font-weight: 800;
}

.pn-secondary-action {
  padding-top: 4px;
  border-top: 1px solid #e7eef6;
}

.pn-bilancio-btn {
  min-height: 40px;
}

.pn-quadratura-open {
  overflow: hidden;
}

.pn-quadratura-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.pn-quadratura-modal[hidden] {
  display: none;
}

.pn-quadratura-box {
  width: min(560px, 100%);
  border: 1px solid #d8e4f1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.24);
}

.pn-quadratura-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid #e7eef6;
}

.pn-quadratura-title {
  margin: 0;
  color: #16253b;
  font-size: 1.15rem;
  line-height: 1.3;
}

.pn-quadratura-subtitle {
  margin: 4px 0 0;
  color: #65758b;
  font-size: 0.9rem;
  font-weight: 600;
}

.pn-quadratura-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #dbe5ef;
  border-radius: 8px;
  background: #f8fbff;
  color: #31445f;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.pn-quadratura-close:hover {
  background: #eef5fc;
}

.pn-quadratura-status {
  margin: 18px 22px 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 800;
}

.pn-quadratura-status--ok {
  border: 1px solid #abd4b8;
  background: #eaf7ee;
  color: #24613a;
}

.pn-quadratura-status--ko {
  border: 1px solid #f0b8b8;
  background: #fff0f0;
  color: #9b2424;
}

.pn-quadratura-calc {
  display: flex;
  flex-direction: column;
  padding: 16px 22px 22px;
}

.pn-quadratura-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #edf2f7;
  color: #40536c;
  font-size: 0.95rem;
}

.pn-quadratura-row strong {
  color: #17263a;
  white-space: nowrap;
}

.pn-quadratura-row--expected,
.pn-quadratura-row--delta {
  font-weight: 800;
}

.pn-quadratura-row--delta {
  border-bottom: 0;
}

.pn-results-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 1200px) {
  .pn-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .pn-title {
    font-size: 1.9rem;
  }

  .pn-form-grid-insert-top,
  .pn-form-grid-insert-middle,
  .pn-form-grid-search-date,
  .pn-form-grid-search-amount,
  .pn-inline-row {
    grid-template-columns: 1fr;
  }

  .pn-card,
  .pn-toolbar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .pn-date-wrap {
    justify-content: flex-start;
  }

  .pn-quadratura-modal {
    align-items: flex-end;
    padding: 14px;
  }

  .pn-quadratura-head,
  .pn-quadratura-calc {
    padding-left: 16px;
    padding-right: 16px;
  }

  .pn-quadratura-status {
    margin-left: 16px;
    margin-right: 16px;
  }

  .pn-quadratura-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* =========================================================
   AERION UI — PRIMA NOTA EQUAL HEIGHT
   ========================================================= */

.pn-grid {
  align-items: stretch;
}

.pn-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pn-form {
  flex: 1 1 auto;
}

.pn-card .pn-secondary-action,
.pn-card .pn-form-actions:last-child {
  margin-top: auto;
}

.pn-card .pn-secondary-action {
  padding-top: 12px;
}

/* =========================================================
   AERION UI — PRIMA NOTA RESULTS
   ========================================================= */

.pn-results-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pn-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pn-results-title {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #223247;
}

.pn-saldi-card,
.pn-table-card {
  border: 1px solid #dbe5ef;
  border-radius: 22px;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 10px 28px rgba(31, 43, 61, 0.05);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.pn-saldo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid #e9eef5;
}

.pn-saldo-row:first-child {
  border-top: 0;
}

.pn-saldo-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #223247;
}

.pn-saldo-value {
  font-size: 0.95rem;
  font-weight: 800;
  color: #223247;
  text-align: right;
}

.pn-saldo-value.is-negative {
  color: #b42318;
}

.pn-table {
  margin: 0;
}

.pn-table thead th {
  background: #f5f8fc;
  color: #55687f;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  border-bottom: 1px solid #dce7f1 !important;
  padding: 14px 14px;
  white-space: nowrap;
}

.pn-table tbody td {
  padding: 12px 14px;
  border-color: #e8eef5;
  vertical-align: middle;
}

.pn-col-date {
  width: 110px;
}

.pn-col-amount {
  width: 108px;
}

.pn-col-account {
  width: 120px;
}

.pn-col-classification,
.pn-cell-classification {
  padding-left: 22px !important;
  padding-right: 8px !important;
}

.pn-col-actions {
  width: 94px;
}

.is-right {
  text-align: right;
}

.is-center {
  text-align: center;
}

.pn-row-totali td {
  background: #eaf1fb;
  font-weight: 800;
  color: #203247;
  border-top: 2px solid #3f6ef0;
}

.pn-row-view td {
  transition: background-color .15s ease;
}

.pn-row-incongruente td {
  background-color: #fdecec !important;
}

.pn-col-split,
.pn-cell-split {
  width: 42px;
  min-width: 42px;
}

.pn-row-split-detail td {
  background: #f7fbff;
  border-top: 1px solid #dbe8f5;
  color: #33465f;
}

.pn-split-description {
  padding-left: 18px;
  font-weight: 700;
  color: #45627f;
}

.pn-row-split-form td {
  background: #f8fafc;
  border-top: 1px solid #d9e4ef;
}

.pn-split-form {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.pn-split-field {
  display: grid;
  gap: 4px;
  min-width: 130px;
}

.pn-split-field--class {
  min-width: 300px;
  flex: 1 1 300px;
}

.pn-split-field label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #4a5f78;
}

.pn-icon-btn--split,
.pn-icon-btn--split-toggle {
  color: #1f6a3a;
  border-color: #b8ddc6;
  background: linear-gradient(180deg, #fbfefc 0%, #f1fbf4 100%);
}

.pn-icon-btn--split:hover,
.pn-icon-btn--split-toggle:hover {
  background: linear-gradient(180deg, #f4fcf6 0%, #eaf8ef 100%);
  border-color: #9fd0b3;
  color: #14532d;
}

.pn-row-view:hover td {
  background-color: rgba(255,255,255,0.18);
}

.pn-row-edit td {
  background: #fffdf2;
}

.pn-cell-date {
  font-weight: 600;
  color: #33465f;
  white-space: nowrap;
}

.pn-description-main {
  color: #24364d;
  line-height: 1.45;
}

.pn-cell-amount {
  font-variant-numeric: tabular-nums;
  color: #203247;
}

.pn-cell-classification {
  color: #33465f;
}

.pn-classification-content {
  display: block;
  width: calc(100% - 48px);
  transform: translateX(48px);
}

.pn-cell-account {
  color: #33465f;
  white-space: nowrap;
  padding-left: 8px !important;
  padding-right: 6px !important;
}

.pn-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pn-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid #c8d8e8;
  background: rgba(255,255,255,0.92);
  color: #2b557f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  line-height: 1;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease, color .15s ease;
}

.pn-icon-btn:hover {
  transform: translateY(-1px);
}

.pn-icon-btn--edit:hover {
  border-color: #9eb9d5;
  background: #f6fbff;
  color: #21496f;
}

.pn-icon-btn--delete {
  color: #a02727;
  border-color: #e3c3c3;
}

.pn-icon-btn--delete:hover {
  background: #fff5f5;
  border-color: #d7a7a7;
  color: #8f1d1d;
}

.pn-icon-btn--save {
  color: #166534;
  border-color: #b8ddc6;
}

.pn-icon-btn--save:hover {
  background: #f0fbf4;
  border-color: #9fd0b3;
  color: #14532d;
}

.pn-icon-btn--cancel {
  color: #5f6f82;
}

.pn-icon-btn--cancel:hover {
  background: #f7f9fc;
  border-color: #b9c7d6;
  color: #405264;
}

@media (max-width: 992px) {
  .pn-table thead th,
  .pn-table tbody td {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* =========================================================
   AERION UI — PRIMA NOTA ACTION BUTTONS POLISH
   ========================================================= */

.pn-col-actions {
  width: 104px;
}

.pn-row-actions {
  gap: 10px;
}

.pn-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  border: 1px solid #bfd0e1;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(246,250,255,0.98) 100%);
  box-shadow: 0 1px 2px rgba(31, 43, 61, 0.05);
  font-size: 0.98rem;
  font-weight: 700;
}

.pn-icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(31, 43, 61, 0.08);
}

.pn-icon-btn--edit {
  color: #2b5d94;
  border-color: #bfd0e4;
}

.pn-icon-btn--edit:hover {
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fc 100%);
  border-color: #98b7d5;
  color: #234f80;
}

.pn-icon-btn--delete {
  color: #a12b2b;
  border-color: #e2c5c5;
  background: linear-gradient(180deg, #fffefe 0%, #fff7f7 100%);
}

.pn-icon-btn--delete:hover {
  background: linear-gradient(180deg, #fff7f7 0%, #ffeceb 100%);
  border-color: #d8a8a8;
  color: #8e1f1f;
}

.pn-icon-btn--save {
  color: #1f6a3a;
  border-color: #b8ddc6;
  background: linear-gradient(180deg, #fbfefc 0%, #f1fbf4 100%);
}

.pn-icon-btn--save:hover {
  background: linear-gradient(180deg, #f4fcf6 0%, #eaf8ef 100%);
  border-color: #9fd0b3;
  color: #14532d;
}

.pn-icon-btn--cancel {
  color: #5b6d82;
  border-color: #c9d5e2;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.pn-icon-btn--cancel:hover {
  background: linear-gradient(180deg, #fbfcfe 0%, #f0f4f8 100%);
  border-color: #b2c3d3;
  color: #415368;
}

/* =========================================================
   AERION UI — PRIMA NOTA ACTION SVG ICONS
   ========================================================= */

.pn-btn-svg {
  width: 16px;
  height: 16px;
  display: block;
}

.pn-btn-svg path,
.pn-btn-svg line,
.pn-btn-svg polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pn-icon-btn {
  font-size: 0;
}

.pn-icon-btn--edit .pn-btn-svg {
  transform: translateX(0.2px) translateY(0.2px);
}

.pn-icon-btn--delete .pn-btn-svg {
  transform: translateY(0.3px);
}

.pn-icon-btn--save .pn-btn-svg,
.pn-icon-btn--cancel .pn-btn-svg {
  width: 15px;
  height: 15px;
}

/* =========================================================
   AERION UI — CONTABILITA HUB
   ========================================================= */

.ch-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ch-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ch-title {
  margin: 0;
  font-size: 2.15rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #1f2d40;
}

.ch-subtitle {
  margin: 10px 0 0;
  font-size: 1rem;
  line-height: 1.45;
  color: #6d7f94;
}

.ch-tabs-wrap {
  border: 1px solid #dbe5ef;
  border-radius: 20px;
  background: rgba(255,255,255,0.72);
  box-shadow: 0 10px 28px rgba(31, 43, 61, 0.05);
  backdrop-filter: blur(6px);
  padding: 14px 16px;
}

.ch-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.ch-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid #c6d6e6;
  background: rgba(255,255,255,0.9);
  color: #2b5d94;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.ch-tab:hover {
  transform: translateY(-1px);
  border-color: #9db8d3;
  background: #f7fbff;
  color: #234f80;
  box-shadow: 0 4px 10px rgba(31, 43, 61, 0.06);
}

.ch-tab.is-active {
  background: #2f64d8;
  border-color: #2f64d8;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(47, 100, 216, 0.16);
}

.ch-tab--ghost {
  background: rgba(255,255,255,0.9);
  color: #2b5d94;
}

.ch-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ch-card {
  border: 1px solid #dbe5ef;
  border-radius: 22px;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 10px 28px rgba(31, 43, 61, 0.05);
  backdrop-filter: blur(6px);
  padding: 18px;
}

.ch-card-soft {
  border: 1px solid #e4edf5;
  border-radius: 18px;
  background: rgba(255,255,255,0.55);
}

.ch-section-title {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #223247;
}

.ch-section-subtitle {
  margin: 8px 0 0;
  font-size: 0.94rem;
  line-height: 1.45;
  color: #72839a;
}

.ch-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.ch-toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 768px) {
  .ch-title {
    font-size: 1.9rem;
  }

  .ch-tabs-wrap,
  .ch-card {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* =========================================================
   AERION UI — CONTABILITA HUB ESTRATTI
   ========================================================= */

.ch-action-btn {
  min-height: 40px;
}

.ch-action-btn--soft-primary {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(244,248,253,0.98) 100%);
  border-color: #bfd0e1;
  color: #264e78;
  box-shadow: 0 1px 2px rgba(38, 78, 120, 0.05);
}

.ch-action-btn--soft-primary:hover {
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fa 100%);
  border-color: #aabfd6;
  color: #1f456d;
  box-shadow: 0 3px 8px rgba(38, 78, 120, 0.08);
}

.ch-account-card {
  margin-bottom: 22px;
  padding: 14px 14px 10px;
}

.ch-account-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ch-account-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ch-account-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.7);
}

.ch-account-title {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #223247;
}

.ch-table-wrap {
  overflow: hidden;
  border: 1px solid #e3ebf4;
  border-radius: 18px;
  background: rgba(255,255,255,0.55);
}

.ch-table {
  margin: 0;
}

.ch-table thead th {
  background: #f5f8fc;
  color: #55687f;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  border-bottom: 1px solid #dce7f1 !important;
  padding: 13px 14px;
  white-space: nowrap;
}

.ch-table tbody td {
  padding: 12px 14px;
  border-color: #e8eef5;
  vertical-align: middle;
  color: #24364d;
}

.ch-table tbody tr:hover td {
  background: rgba(247, 250, 253, 0.95);
}

.ch-table .is-right {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ch-table .is-center {
  text-align: center;
}

.ch-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef3f8;
  color: #5b6d82;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.ch-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ch-table-btn {
  min-height: 34px;
  min-width: 70px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 0.84rem;
}

.ch-delete-btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #e2c5c5;
  background: linear-gradient(180deg, #fffefe 0%, #fff7f7 100%);
  color: #a12b2b;
  font-size: 0.84rem;
  font-weight: 800;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.ch-delete-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #fff7f7 0%, #ffeceb 100%);
  border-color: #d8a8a8;
  color: #8e1f1f;
  box-shadow: 0 4px 10px rgba(31, 43, 61, 0.06);
}

.ch-empty-note {
  color: #6f8094;
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .ch-account-card {
    padding-left: 12px;
    padding-right: 12px;
  }

  .ch-table thead th,
  .ch-table tbody td {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* =========================================================
   AERION UI — CONTABILITA COERENZA MODULO
   ========================================================= */

/* Hub contabilità: tabs allineati a destra come action bar di Prima Nota */
.ch-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.ch-tabs-wrap {
  padding-top: 12px;
  padding-bottom: 12px;
}

.ch-tab {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 13px;
}

.ch-tab.is-active {
  background: #3b63c9;
  border-color: #3b63c9;
  box-shadow: 0 4px 10px rgba(59, 99, 201, 0.12);
}

.ch-tab:hover {
  box-shadow: 0 3px 8px rgba(31, 43, 61, 0.05);
}

/* Pulsante azione nei conti meno aggressivo */
.ch-action-btn--soft-primary {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(246,249,253,0.98) 100%);
  border-color: #c7d5e2;
  color: #294c72;
}

/* Colonna azioni: stessa linea, più compatta */
.ch-col-actions,
.ch-table .is-center {
  white-space: nowrap;
}

.ch-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.ch-table-btn,
.ch-delete-btn {
  min-width: 72px;
  min-height: 32px;
  height: 32px;
  padding: 0 12px;
  border-radius: 11px;
  font-size: 0.80rem;
}

.ch-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Tabella estratti più bancaria e compatta */
.ch-table thead th {
  padding: 11px 12px;
  font-size: 0.73rem;
}

.ch-table tbody td {
  padding: 9px 12px;
  font-size: 0.92rem;
}

.ch-status-pill {
  min-height: 24px;
  padding: 0 10px;
  font-size: 0.72rem;
}

.ch-account-card {
  padding: 12px 12px 8px;
}

.ch-account-head {
  margin-bottom: 10px;
}

.ch-account-title {
  font-size: 1.22rem;
}

.ch-empty-note {
  padding: 2px 0;
}

/* Anche Prima Nota: righe e azioni leggermente più compatte */
.pn-col-actions {
  width: 132px;
  min-width: 132px;
}

.pn-row-actions {
  gap: 6px;
  flex-wrap: nowrap;
}

.pn-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
}

.pn-cell-actions {
  padding-left: 4px !important;
  padding-right: 6px !important;
}

.pn-table thead th {
  padding: 11px 12px;
  font-size: 0.73rem;
}

.pn-table tbody td {
  padding: 9px 12px;
  font-size: 0.92rem;
}

.pn-row-totali td {
  padding-top: 11px;
  padding-bottom: 11px;
}

.pn-description-main {
  line-height: 1.38;
}

@media (max-width: 992px) {
  .ch-tabs {
    justify-content: flex-start;
  }
}

/* =========================================================
   AERION UI — HUB CONTABILITA RIFINITURA
   ========================================================= */

.ch-tabs-wrap {
  padding: 10px 14px;
  border-radius: 18px;
}

.ch-tabs {
  gap: 8px;
}

.ch-tab {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 12px;
  font-size: 0.88rem;
  border-color: #ccd9e6;
  background: rgba(255,255,255,0.96);
  color: #35567d;
}

.ch-tab:hover {
  border-color: #b7c9da;
  background: #fbfdff;
  color: #28496f;
}

.ch-tab.is-active {
  background: linear-gradient(180deg, #4c6fd1 0%, #4365c5 100%);
  border-color: #4365c5;
  box-shadow: 0 4px 10px rgba(67, 101, 197, 0.12);
}

.ch-body {
  gap: 16px;
}

.ch-account-card {
  padding: 14px 14px 12px;
  border-radius: 20px;
}

.ch-account-head {
  margin-bottom: 14px;
  align-items: center;
}

.ch-account-title-wrap {
  gap: 12px;
}

.ch-account-dot {
  width: 12px;
  height: 12px;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.78);
}

.ch-account-title {
  font-size: 1.18rem;
  letter-spacing: -0.015em;
}

.ch-action-btn,
.ch-action-btn--soft-primary {
  min-height: 38px;
  border-radius: 12px;
}

.ch-action-btn--soft-primary {
  background: linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(247,250,253,0.99) 100%);
  border-color: #c8d6e2;
  color: #294a70;
}

.ch-action-btn--soft-primary:hover {
  background: linear-gradient(180deg, #fbfdff 0%, #f1f6fb 100%);
  border-color: #b5c8d9;
  color: #223f63;
}

.ch-table-wrap {
  border-radius: 16px;
}

.ch-table thead th {
  padding: 10px 12px;
  font-size: 0.71rem;
}

.ch-table tbody td {
  padding: 8px 12px;
  font-size: 0.90rem;
}

.ch-status-pill {
  min-height: 23px;
  padding: 0 9px;
  font-size: 0.70rem;
  background: #eef2f7;
  color: #5e6f83;
}

.ch-row-actions {
  gap: 6px;
}

.ch-table-btn,
.ch-delete-btn {
  min-width: 68px;
  min-height: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.ch-empty-note {
  position: relative;
  padding: 10px 0 4px 18px;
  color: #73849a;
  font-size: 0.93rem;
}

.ch-empty-note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 17px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d7e3ef;
}

.ch-card .ch-empty-note {
  padding-bottom: 2px;
}

@media (max-width: 768px) {
  .ch-tabs {
    gap: 7px;
  }

  .ch-tab {
    min-height: 36px;
    padding: 0 12px;
  }
}

/* =========================================================
   AERION UI — DETTAGLIO ESTRATTO TOP REDO
   ========================================================= */

.de-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 4px;
}

.de-grid {
  display: grid;
  grid-template-columns: minmax(380px, 0.92fr) minmax(520px, 1.28fr);
  gap: 16px;
  align-items: stretch;
}

.de-panel {
  border: 1px solid #dbe5ef;
  border-radius: 20px;
  background: rgba(255,255,255,0.78);
  box-shadow: 0 8px 22px rgba(31, 43, 61, 0.04);
  padding: 16px;
}

.de-panel-head {
  margin-bottom: 14px;
}

.de-main-title {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #223247;
}

.de-main-title--hub {
  font-size: 1.34rem;
}

.de-section-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #223247;
}

.de-section-text {
  margin: 7px 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #72839a;
}

.de-summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.de-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.de-k,
.de-metric-label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6a7c92;
}

.de-k--inline {
  display: block;
  margin-bottom: 6px;
}

.de-v {
  color: #223247;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.4;
}

.de-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef2f7;
  color: #5e6f83;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.de-opening-form {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #edf2f7;
}

.de-opening-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.de-input {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #c7d5e2;
  border-radius: 12px;
  background: #fff;
  color: #223247;
}

.de-input--short {
  width: 132px;
}

.de-input--select {
  min-width: 150px;
}

.de-import-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.de-import-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid #edf2f7;
}

.de-import-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.de-import-name {
  font-size: 0.90rem;
  font-weight: 700;
  color: #31445c;
}

.de-import-fields {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.de-btn-primary-soft {
  background: linear-gradient(180deg, #4c6fd1 0%, #4365c5 100%);
  border-color: #4365c5;
  color: #ffffff;
}

.de-btn-primary-soft:hover {
  background: linear-gradient(180deg, #4568c9 0%, #3d5dbc 100%);
  border-color: #3d5dbc;
  color: #ffffff;
}

.de-btn-quiet {
  border-color: #c7d5e2;
  color: #294c72;
}

.de-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.de-metric-card {
  border: 1px solid #dfe8f1;
  border-radius: 16px;
  background: rgba(255,255,255,0.68);
  padding: 14px 14px 12px;
}

.de-metric-number {
  margin-top: 7px;
  color: #223247;
  font-size: 1.18rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

@media (max-width: 1100px) {
  .de-grid {
    grid-template-columns: 1fr;
  }

  .de-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .de-import-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .de-metric-grid {
    grid-template-columns: 1fr;
  }
}\n\n/* =========================================================
   AERION UI — DETTAGLIO ESTRATTO SMART COMPACT
   ========================================================= */

.de-grid {
  grid-template-columns: minmax(420px, 1fr) minmax(620px, 1.35fr);
  align-items: start;
}

.de-panel {
  padding: 14px;
}

.de-panel-head {
  margin-bottom: 10px;
}

.de-main-title {
  font-size: 1.38rem;
}

.de-main-title--hub {
  font-size: 1.22rem;
}

.de-summary-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.de-summary-item {
  gap: 3px;
}

.de-k,
.de-metric-label {
  font-size: 0.70rem;
}

.de-v {
  font-size: 0.92rem;
  line-height: 1.3;
}

.de-state {
  min-height: 24px;
  padding: 0 10px;
  font-size: 0.70rem;
}

.de-opening-form {
  margin-top: 12px;
  padding-top: 10px;
}

.de-opening-row {
  gap: 8px;
}

.de-input--short {
  width: 118px;
}

.de-import-list {
  gap: 0;
}

.de-import-item {
  grid-template-columns: 185px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
}

.de-import-name {
  font-size: 0.86rem;
  line-height: 1.25;
}

.de-import-fields {
  gap: 8px;
  flex-wrap: nowrap;
}

.de-import-fields input[type="file"] {
  max-width: 250px;
}

.de-input--select {
  min-width: 126px;
  max-width: 126px;
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
}

.de-btn-primary-soft,
.de-btn-quiet {
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 0.80rem;
  white-space: nowrap;
}

.de-metric-grid {
  gap: 10px;
}

.de-metric-card {
  padding: 12px 12px 10px;
}

.de-metric-number {
  margin-top: 5px;
  font-size: 1.08rem;
}

@media (max-width: 1200px) {
  .de-grid {
    grid-template-columns: 1fr;
  }

  .de-summary-list {
    grid-template-columns: 1fr;
  }

  .de-import-item {
    grid-template-columns: 1fr;
  }

  .de-import-fields {
    flex-wrap: wrap;
  }
}\n

/* =========================================================
   AERION UI — DETTAGLIO ESTRATTO IMPORT CLEAN BASE
   ========================================================= */

.de-import-fields .de-btn-quiet,
.de-import-fields .de-btn-primary-soft {
  min-width: auto;
}

.de-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 33, 49, 0.42);
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.de-modal-box {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid #d9e3ee;
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(18, 31, 48, 0.18);
  padding: 20px;
}

.de-modal-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #223247;
  letter-spacing: -0.02em;
}

.de-modal-subtitle {
  margin-top: 6px;
  font-size: 0.93rem;
  line-height: 1.45;
  color: #71829a;
}

.de-parser-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.de-parser-choice {
  min-height: 42px;
  border: 1px solid #c9d6e3;
  border-radius: 12px;
  background: #fbfdff;
  color: #27476d;
  font-weight: 700;
  text-align: left;
  padding: 0 14px;
}

.de-parser-choice:hover {
  background: #f2f7fc;
  border-color: #b7c9dc;
}

.de-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

/* =========================================================
   AERION UI — DETTAGLIO ESTRATTO FINAL TWO CARDS CLEANUP
   ========================================================= */

.de-panel {
  padding: 12px;
}

.de-panel-head {
  margin-bottom: 8px;
}

.de-main-title--hub,
.de-section-title {
  font-size: 1.22rem;
  line-height: 1.02;
}

.de-section-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #223247;
}

.de-section-text {
  margin-top: 5px;
  font-size: 0.90rem;
}

.de-summary-list {
  gap: 10px;
}

.de-summary-item {
  gap: 2px;
}

.de-v,
.de-import-name {
  font-size: 0.93rem;
  line-height: 1.25;
  font-weight: 700;
  color: #31445c;
}

.de-state {
  min-height: 22px;
  padding: 0 9px;
}

.de-opening-form {
  margin-top: 10px;
  padding-top: 8px;
}

.de-input--short {
  width: 108px;
}

.de-import-list {
  gap: 0;
}

.de-import-item {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
}

.de-import-name {
  white-space: nowrap;
}

.de-import-fields {
  gap: 8px;
  flex-wrap: nowrap;
}

.de-import-fields input[type="file"] {
  max-width: 235px;
}

.de-btn-primary-soft,
.de-btn-quiet {
  min-height: 32px;
  height: 32px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 0.79rem;
  white-space: nowrap;
}

.de-btn-primary-soft {
  background: #f7faff;
  border-color: #c7d5e2;
  color: #294c72;
  box-shadow: none;
}

.de-btn-primary-soft:hover {
  background: #f0f6fc;
  border-color: #b8cadc;
  color: #244568;
}

.de-metric-grid {
  gap: 8px;
}

.de-metric-card {
  padding: 10px 11px 9px;
}

.de-metric-label {
  font-size: 0.68rem;
}

.de-metric-number {
  margin-top: 4px;
  font-size: 1.02rem;
}

body.de-modal-open {
  overflow: hidden;
}

.de-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 33, 49, 0.34);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 24px;
}

.de-modal-box {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border: 1px solid #d9e3ee;
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(18, 31, 48, 0.18);
  padding: 18px;
}

.de-modal-title {
  font-size: 1.02rem;
}

.de-modal-subtitle {
  margin-top: 5px;
  font-size: 0.90rem;
}

.de-parser-options {
  gap: 8px;
  margin-top: 14px;
}

.de-parser-choice {
  min-height: 38px;
  border-radius: 11px;
  padding: 0 12px;
}

.de-modal-actions {
  margin-top: 14px;
}

@media (max-width: 1200px) {
  .de-import-item {
    grid-template-columns: 1fr;
  }

  .de-import-name {
    white-space: normal;
  }

  .de-import-fields {
    flex-wrap: wrap;
  }
}

/* =========================================================
   AERION UI — PDF POPOVER FIX
   ========================================================= */

.de-file-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.de-file-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.de-file-label {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  color: #33465e;
}

.de-import-fields--pdf {
  align-items: center;
}

.de-parser-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 2500;
  min-width: 190px;
  background: #ffffff;
  border: 1px solid #d7e1ec;
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(18, 31, 48, 0.14);
  padding: 10px;
}

.de-parser-popover-title {
  font-size: 0.80rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6a7c92;
  margin-bottom: 8px;
}

.de-parser-choice-inline {
  width: 100%;
  min-height: 36px;
  border: 1px solid #c9d6e3;
  border-radius: 10px;
  background: #fbfdff;
  color: #27476d;
  font-weight: 700;
  text-align: left;
  padding: 0 10px;
  margin-top: 6px;
}

.de-parser-choice-inline:first-of-type {
  margin-top: 0;
}

.de-parser-choice-inline:hover {
  background: #f2f7fc;
  border-color: #b7c9dc;
}

/* disattiva il vecchio stile modale se ancora presente nel css */
.de-modal-overlay,
.de-modal-box,
.de-modal-title,
.de-modal-subtitle,
.de-parser-options,
.de-parser-choice,
.de-modal-actions,
body.de-modal-open {
  all: unset;
}\n\n/* =========================================================
   AERION UI — SAFE MICRO POLISH DETTAGLIO ESTRATTO
   ========================================================= */

.de-panel--summary {
  padding: 16px 18px;
}

.de-summary-list {
  gap: 14px;
}

.de-summary-item {
  gap: 4px;
}

.de-opening-form {
  margin-top: 14px;
  padding-top: 12px;
}

.de-import-fields .de-btn-quiet,
.de-import-fields .de-btn-primary-soft {
  min-width: 82px;
  justify-content: center;
}

.de-file-picker-wrap .de-btn-quiet {
  min-width: 96px;
}

.de-file-label {
  max-width: 170px;
}\n

/* =========================================================
   AERION UI — IMPORT CARD UNIFORMITY
   ========================================================= */

.de-file-trigger {
  min-width: 96px;
  justify-content: center;
  text-align: center;
  cursor: pointer;
}

.de-import-fields input[type="file"] {
  position: absolute !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.de-import-fields .de-file-label {
  max-width: 165px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  color: #33465e;
}

.de-import-fields .de-btn-quiet,
.de-import-fields .de-btn-primary-soft {
  min-width: 82px;
  justify-content: center;
}

/* =========================================================
   AERION UI — IMPORT CONTROLS RIGHT FIX
   ========================================================= */

.de-import-item {
  grid-template-columns: 250px minmax(0, 1fr) !important;
  gap: 14px !important;
}

.de-import-fields {
  justify-content: flex-start !important;
}

/* =========================================================
   AERION UI — METRICHE DENTRO SUMMARY CARD
   ========================================================= */

.de-panel--summary {
  display: flex;
  flex-direction: column;
}

.de-metric-grid--inside {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.de-metric-card--inside {
  padding: 10px 11px 9px;
  border-radius: 14px;
  background: rgba(250, 252, 255, 0.9);
  border: 1px solid #dfe8f1;
  box-shadow: none;
}

.de-metric-card--inside .de-metric-label {
  font-size: 0.67rem;
}

.de-metric-card--inside .de-metric-number {
  margin-top: 4px;
  font-size: 1rem;
}

@media (max-width: 1200px) {
  .de-metric-grid--inside {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   AERION UI — EQUAL MAIN CARDS + COMPACT LEFT
   ========================================================= */

.de-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-items: stretch !important;
}

.de-panel--summary {
  padding: 14px 16px !important;
}

.de-panel--imports {
  padding: 14px 16px !important;
}

.de-panel--summary .de-panel-head {
  margin-bottom: 8px !important;
}

.de-panel--summary .de-summary-list {
  gap: 12px !important;
}

.de-panel--summary .de-opening-form {
  margin-top: 10px !important;
  padding-top: 10px !important;
}

.de-panel--summary .de-opening-row {
  gap: 8px !important;
}

.de-metric-grid--inside {
  gap: 8px !important;
  margin-top: 12px !important;
}

.de-metric-card--inside {
  padding: 8px 10px 7px !important;
}

.de-metric-card--inside .de-metric-label {
  font-size: 0.65rem !important;
}

.de-metric-card--inside .de-metric-number {
  margin-top: 3px !important;
  font-size: 0.96rem !important;
}

/* =========================================================
   AERION UI — RIDUZIONE GAP SALDO / METRICHE
   ========================================================= */

.de-panel--summary .de-opening-form {
  margin-bottom: 8px !important;
}

.de-metric-grid--inside {
  margin-top: 15px !important;
}

/* =========================================================
   AERION UI — ESTRATTO ACTION BAR
   ========================================================= */

.de-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.de-action-form {
  margin: 0;
  flex: 0 0 auto;
}

.de-action-btn {
  min-width: 110px;
  width: 110px;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  flex: 0 0 auto;
}

.de-action-input {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
  padding: 8px 10px;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  background: #fff;
  color: #31445c;
  flex: 0 0 auto;
}

@media (max-width: 1200px) {
  .de-action-bar {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

/* =========================================================
   AERION UI — ESTRATTO ACTION BAR REAL
   ========================================================= */

.de-action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.de-action-form {
  margin: 0;
  flex: 0 0 auto;
}

.de-action-btn {
  min-width: 112px;
  width: 112px;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  flex: 0 0 auto;
}

.de-action-input {
  width: 145px;
  min-width: 145px;
  max-width: 145px;
  padding: 8px 10px;
  border: 1px solid #d0d7de;
  border-radius: 10px;
  background: #fff;
  color: #31445c;
  flex: 0 0 auto;
}

@media (max-width: 1280px) {
  .de-action-bar {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

/* =========================================================
   AERION UI — TOOLBAR COLORI + FILTRI REFINE
   ========================================================= */

/* toolbar azioni */
#btn-seleziona-tutto.de-action-btn,
#btn-deseleziona-tutto.de-action-btn {
  background: #ffffff !important;
  border-color: #c7d3df !important;
  color: #334a62 !important;
  box-shadow: none !important;
}

#btn-seleziona-tutto.de-action-btn:hover,
#btn-deseleziona-tutto.de-action-btn:hover {
  background: #f6f9fc !important;
  border-color: #b7c7d8 !important;
  color: #263f59 !important;
}

#btn-consolida-toggle.de-action-btn {
  background: #eef4fb !important;
  border-color: #bfd0e1 !important;
  color: #294b71 !important;
  box-shadow: none !important;
}

#btn-consolida-toggle.de-action-btn:hover {
  background: #e6eef8 !important;
  border-color: #adc2d8 !important;
  color: #223f61 !important;
}

#form-crea-movimenti .de-action-btn {
  background: #2f8f4e !important;
  border-color: #2b8247 !important;
  color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(43, 130, 71, 0.14) !important;
}

#form-crea-movimenti .de-action-btn:hover {
  background: #287b42 !important;
  border-color: #236d3a !important;
}

/* =========================================================
   AERION UI — ESTRATTO HEADER COMPATTO
   ========================================================= */

.de-head + hr {
  display: none !important;
}

.de-panel--summary .de-summary-topline {
  display: grid !important;
  grid-template-columns: minmax(115px, 0.7fr) minmax(76px, 0.42fr) minmax(150px, 1fr) minmax(220px, 0.95fr) !important;
  gap: 12px !important;
  align-items: end !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid #edf2f7 !important;
}

.de-panel--summary .de-summary-topline .de-summary-list {
  display: contents !important;
}

.de-panel--summary .de-summary-topline .de-summary-item {
  min-width: 0 !important;
}

.de-panel--summary .de-summary-topline .de-v {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.de-panel--summary .de-summary-topline .de-state {
  min-height: 24px !important;
  padding: 0 9px !important;
}

.de-panel--summary .de-summary-topline .de-opening-form {
  margin: 0 !important;
  padding: 0 !important;
  border-top: 0 !important;
  margin-bottom: 0 !important;
}

.de-panel--summary .de-summary-topline .de-opening-row {
  gap: 8px !important;
  flex-wrap: nowrap !important;
}

.de-panel--summary .de-summary-topline .de-input--short {
  width: 108px !important;
}

.de-panel--summary .de-summary-topline .de-btn-quiet {
  min-height: 38px !important;
  padding-left: 14px !important;
  padding-right: 14px !important;
}

.de-panel--summary .de-metric-grid--inside {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  margin-top: 10px !important;
}

.de-panel--summary .de-metric-card--inside {
  min-height: 0 !important;
  padding: 8px 10px 7px !important;
}

@media (max-width: 1180px) {
  .de-panel--summary .de-summary-topline {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .de-panel--summary .de-summary-topline .de-opening-form {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 720px) {
  .de-panel--summary .de-summary-topline,
  .de-panel--summary .de-metric-grid--inside {
    grid-template-columns: 1fr !important;
  }

  .de-panel--summary .de-summary-topline .de-opening-row {
    flex-wrap: wrap !important;
  }
}

/* box filtri */
#filtro-estratto-box {
  gap: 10px !important;
  margin: 12px 0 18px 0 !important;
  padding: 14px 14px 12px !important;
  border-color: #dde6ef !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fbfe 100%) !important;
}

#filtro-estratto-box label {
  color: #667a91;
  font-weight: 700 !important;
  font-size: 0.76rem !important;
  letter-spacing: 0.02em;
}

#filtro-estratto-box .input-filtro-estratto,
#filtro-estratto-box input[type="date"],
#filtro-estratto-box input[type="number"],
#filtro-estratto-box input[type="text"],
#filtro-estratto-box select {
  min-height: 36px;
  border-radius: 10px !important;
  border-color: #cad6e2 !important;
  background: #ffffff !important;
}

#filtro-estratto-box input::placeholder {
  color: #9aaabc;
}

#filtro-estratto-box > div[style*="padding-top:18px"] {
  padding-top: 10px !important;
  gap: 12px !important;
}

#filtro-estratto-box > div[style*="padding-top:18px"] label {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: #445970 !important;
  letter-spacing: 0 !important;
}

#btn-reset-filtri-estratto {
  background: #ffffff !important;
  border-color: #c7d3df !important;
  color: #334a62 !important;
  box-shadow: none !important;
}

#btn-reset-filtri-estratto:hover {
  background: #f6f9fc !important;
  border-color: #b7c7d8 !important;
}

/* =========================================================
   AERION UI — FILTRI SELECT + RESET INLINE
   ========================================================= */

#filtro-estratto-box select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 38px !important;
  background-color: #ffffff !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #6f8297 50%),
    linear-gradient(135deg, #6f8297 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  border: 1px solid #c8d5e2 !important;
  border-radius: 10px !important;
  color: #334a62 !important;
  box-shadow: inset 0 1px 1px rgba(20, 37, 63, 0.02);
}

#filtro-estratto-box select:hover,
#filtro-estratto-box select:focus {
  border-color: #b4c7da !important;
  background-color: #fbfdff !important;
  outline: none;
}

#filtro-estratto-box > div[style*="padding-top:18px"] {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  padding-top: 10px !important;
  gap: 12px !important;
  flex: 1 1 100% !important;
}

#filtro-estratto-box > div:last-child {
  display: flex !important;
  align-items: center !important;
  margin-left: 0 !important;
}

#btn-reset-filtri-estratto {
  min-width: 104px;
  height: 36px;
  padding: 0 14px !important;
  border-radius: 10px !important;
  align-self: center !important;
}

/* =========================================================
   AERION UI — RESET ACCANTO A CLASSIFICAZIONE
   ========================================================= */

#filtro-estratto-box > div[style*="padding-top:18px"] {
  order: 20 !important;
  flex: 1 1 100% !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  padding-top: 10px !important;
}

#filtro-estratto-box > div:last-child {
  order: 6 !important;
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: end !important;
  align-self: end !important;
  margin-left: -2px !important;
}

#btn-reset-filtri-estratto {
  min-width: 88px !important;
  width: 88px !important;
  height: 36px !important;
  padding: 0 10px !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
}

/* =========================================================
   AERION UI — CLASSIFICAZIONE + RESET INLINE FIX
   ========================================================= */

#filtro-estratto-box .de-filter-class-reset {
  order: 6 !important;
  flex: 0 1 430px !important;
  min-width: 430px !important;
}

#filtro-estratto-box .de-filter-class-reset-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#filtro-estratto-box .de-filter-class-reset select {
  flex: 0 1 320px !important;
  width: 320px !important;
  min-width: 320px !important;
  max-width: 320px !important;
}

#filtro-estratto-box #btn-reset-filtri-estratto {
  flex: 0 0 88px !important;
  width: 88px !important;
  min-width: 88px !important;
  height: 36px !important;
  padding: 0 10px !important;
  white-space: nowrap !important;
}

#filtro-estratto-box > div[style*="padding-top:18px"] {
  order: 20 !important;
  flex: 1 1 100% !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  padding-top: 10px !important;
}

/* =========================================================
   AERION UI — CLASSIFICAZIONE + RESET FINAL FIX
   ========================================================= */

.de-filter-class-wrap {
  min-width: 360px !important;
  flex: 0 0 460px !important;
}

.de-filter-class-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.de-filter-class-row select#filtro-classificazione {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  flex: 0 0 340px !important;
  width: 340px !important;
  min-width: 340px !important;
  max-width: 340px !important;
  padding-right: 38px !important;
  background-color: #ffffff !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #6f8297 50%),
    linear-gradient(135deg, #6f8297 50%, transparent 50%) !important;
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px) !important;
  background-size: 6px 6px, 6px 6px !important;
  background-repeat: no-repeat !important;
  border: 1px solid #c8d5e2 !important;
  border-radius: 10px !important;
  color: #334a62 !important;
}

.de-filter-class-row #btn-reset-filtri-estratto {
  flex: 0 0 92px !important;
  width: 92px !important;
  min-width: 92px !important;
  height: 36px !important;
  padding: 0 10px !important;
  white-space: nowrap !important;
  align-self: end !important;
}

/* neutralizza vecchie regole contrastanti */
#filtro-estratto-box > div:last-child {
  order: initial !important;
  flex: initial !important;
  margin-left: 0 !important;
}\n\n/* =========================================================
   AERION UI — PRIMA NOTA SEARCH LIVE ACTIONS
   ========================================================= */

.pn-search-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pn-search-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #4a5f78;
  white-space: nowrap;
}

.pn-search-check input[type="checkbox"] {
  margin: 0;
}\n

/* =========================================================
   AERION UI — PRIMA NOTA RICERCA ENTRATA/USCITA
   ========================================================= */

.pn-inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #4a5f78;
  white-space: nowrap;
}

.pn-inline-check input[type="checkbox"] {
  margin: 0;
}

/* =========================================================
   AERION UI — AZZERA FILTRI BUTTON SIZE FIX
   ========================================================= */

#btn-reset-filtri-estratto {
  min-width: 128px !important;
  width: 128px !important;
  height: 36px !important;
  padding: 0 16px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

/* =========================================================
   AERION UI — RESET FILTRI FINAL REAL FIX
   ========================================================= */

.de-filter-class-wrap {
  min-width: 470px !important;
  flex: 0 0 470px !important;
}

.de-filter-class-row {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.de-filter-class-row select#filtro-classificazione {
  flex: 0 0 330px !important;
  width: 330px !important;
  min-width: 330px !important;
  max-width: 330px !important;
}

.de-filter-class-row #btn-reset-filtri-estratto {
  flex: 0 0 128px !important;
  width: 128px !important;
  min-width: 128px !important;
  height: 36px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

/* =========================================================
   AERION UI — SINGLE RESET BUTTON REAL SIZE
   ========================================================= */

.de-filter-class-row #btn-reset-filtri-estratto,
#filtro-estratto-box #btn-reset-filtri-estratto,
#btn-reset-filtri-estratto {
  flex: 0 0 132px !important;
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  height: 36px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

/* =========================================================
   AERION UI — MOVIMENTI ESTRATTO SCROLLABILI
   ========================================================= */

.de-movements-scroll {
  max-height: clamp(280px, calc(100vh - 395px), 680px);
  overflow: auto;
  border: 1px solid #dde6ef;
  border-radius: 14px;
  background: #ffffff;
  scrollbar-gutter: stable;
}

.de-movements-scroll #tabella-estratto {
  margin: 0;
  min-width: 1240px;
}

.de-movements-scroll #tabella-estratto thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f7fafc;
  box-shadow: inset 0 -1px 0 #dbe5ef;
}

.de-movements-scroll #tabella-estratto tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-height: 720px) {
  .de-movements-scroll {
    max-height: clamp(240px, calc(100vh - 340px), 560px);
  }
}

/* =========================================================
   AERION UI — ABBINA FATTURE BLOCCO 1
   ========================================================= */

.af-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.af-panel-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.af-step-badge {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #edf4fb;
  border: 1px solid #c7d6e5;
  color: #2d4f76;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.af-panel-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #27384f;
}

.af-panel-subtitle {
  margin-top: 3px;
  font-size: 0.84rem;
  color: #7a8da3;
}

.af-field-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: #6b7f95;
  letter-spacing: 0.02em;
}

.af-source-wrap {
  min-width: 320px;
}

.af-source-select {
  min-width: 320px;
  max-width: 420px;
}

.af-actions-wrap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.af-empty-state {
  min-height: 220px;
  border: 1px dashed #d7e2ee;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fbfe 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 18px;
}

.af-empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef7f1;
  border: 1px solid #cfe4d5;
  color: #2e7a47;
  font-weight: 800;
  font-size: 1rem;
}

.af-empty-title {
  margin-top: 10px;
  font-size: 1rem;
  font-weight: 800;
  color: #2c3d53;
}

.af-empty-text {
  margin-top: 6px;
  max-width: 360px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #7b8ea4;
}

@media (max-width: 1200px) {
  .af-source-wrap,
  .af-source-select {
    min-width: 0;
    width: 100%;
    max-width: none;
  }
}

/* =========================================================
   AERION UI — ABBINA FATTURE SOURCE SELECT POLISH
   ========================================================= */

.af-source-select {
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 38px 0 12px !important;
  border: 1px solid #c8d5e2 !important;
  border-radius: 10px !important;
  background-color: #ffffff !important;
  color: #334a62 !important;
  font-size: 0.93rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  box-shadow: inset 0 1px 1px rgba(20, 37, 63, 0.02);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6f8297 50%),
    linear-gradient(135deg, #6f8297 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.af-source-select:hover,
.af-source-select:focus {
  border-color: #b4c7da !important;
  background-color: #fbfdff !important;
  outline: none !important;
}

/* =========================================================
   AERION UI — SOCIO PANEL EXPAND HIGHLIGHT
   ========================================================= */

.socio-panel-expand {
  margin-top: 14px !important;
  padding: 16px 14px 14px !important;
  border-top: 1px solid #cfddec !important;
  border-left: 1px solid #cfddec !important;
  border-right: 1px solid #d7e3ef !important;
  border-bottom: 1px solid #d7e3ef !important;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7fbff 0%, #edf4fb 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 2px 6px rgba(44, 68, 96, 0.06);
}

.socio-panel-expand .card {
  border-color: #d7e2ee;
}

.socio-panel-expand .card-header {
  background: #f7fbff;
}\n\n/* =========================================================
   AERION UI — SOCIO HEADER REALIGN V1
   ========================================================= */

.socio-head-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.socio-head-top {
  display: flex;
  align-items: center;
}

.socio-head-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.socio-head-title {
  min-width: 0;
}

.socio-switch-form {
  min-width: 260px;
  max-width: 320px;
  width: 100%;
  margin-top: 10px;
}

.socio-switch-form .form-label {
  margin-bottom: 6px !important;
}

@media (min-width: 992px) {
  .socio-switch-form {
    width: 300px;
  }
}\n\n\n/* =========================================================
   AERION UI — SOCIO TYPOGRAPHY HARMONIZATION
   ========================================================= */

.socio-head-title h2 {
  font-size: 2.02rem;
  line-height: 1.08;
  font-weight: 760;
  letter-spacing: -0.02em;
  color: #25364a;
}

.socio-head-title small {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.94rem;
  color: #75859a !important;
}

.socio-switch-form .form-label,
#selectAnno,
#annoHidden,
#panel-tesseramenti .form-label,
#panel-certificati .form-label,
#panel-tesseramenti .form-label-sm,
#panel-certificati .form-label-sm,
.card .form-label,
.card .form-label-sm {
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #51657d;
}

.card-header h6,
.card-header .mb-0.fw-semibold {
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  color: #3c4f66;
}

.card .form-control,
.card .form-select,
.card .form-control-sm,
.card .form-select-sm {
  font-size: 0.94rem;
  font-weight: 500;
  color: #2d3f55;
}

.card input::placeholder,
.card textarea::placeholder {
  color: #97a6b8;
  font-weight: 450;
}

#panel-tesseramenti table,
#panel-certificati table,
.card table {
  color: #33465d;
}

#panel-tesseramenti table thead th,
#panel-certificati table thead th,
.card table thead th {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #61748b;
}\n\n\n/* =========================================================
   AERION UI — SOCIO PAGE FULL HARMONIZATION
   ========================================================= */

.socio-head-title h2 {
  font-size: 2.22rem;
  line-height: 1.04;
  font-weight: 780;
  letter-spacing: -0.032em;
  color: #243449;
}

.socio-head-title small {
  display: inline-block;
  margin-top: 7px;
  font-size: 1.02rem;
  line-height: 1.3;
  color: #73849a !important;
  font-weight: 500;
}

.socio-head-wrap .btn.btn-outline-secondary.btn-sm {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 650;
}

.socio-switch-form {
  min-width: 280px;
  max-width: 340px;
  width: 100%;
  margin-top: 12px;
}

.socio-switch-form .form-label {
  margin-bottom: 7px !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: #6e8096 !important;
}

.socio-switch-form .form-select {
  min-height: 40px;
  border-radius: 12px;
  font-size: 0.96rem;
  font-weight: 550;
  color: #2f4259;
}

.card {
  border: 1px solid #d8e2ed;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(31, 52, 79, 0.035);
}

.card-header {
  min-height: 38px;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6fb 100%);
  border-bottom: 1px solid #dbe5ef;
  border-top-left-radius: 18px !important;
  border-top-right-radius: 18px !important;
}

.card-header h6,
.card-header .mb-0.fw-semibold {
  margin: 0 !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em !important;
  color: #55697f !important;
}

.card-body {
  color: #304359;
}

.card .form-label,
.card .form-label-sm {
  margin-bottom: 6px !important;
  font-size: 0.78rem !important;
  font-weight: 760 !important;
  letter-spacing: 0.025em;
  color: #5b6f87 !important;
}

.card .text-muted,
.card small.text-muted {
  color: #8091a5 !important;
}

.card .form-control,
.card .form-select,
.card .form-control-sm,
.card .form-select-sm {
  min-height: 38px;
  border-radius: 12px;
  border-color: #c7d5e4;
  background: #ffffff;
  font-size: 0.98rem;
  font-weight: 540;
  color: #2d4057;
  box-shadow: none;
}

.card .form-control:focus,
.card .form-select:focus,
.card .form-control-sm:focus,
.card .form-select-sm:focus {
  border-color: #9db8d4;
  box-shadow: 0 0 0 0.18rem rgba(90, 136, 189, 0.12);
}

.card input::placeholder,
.card textarea::placeholder {
  color: #98a8ba;
  font-weight: 460;
}

.azioni-anno {
  gap: 10px;
}

.btn-azioni-anno {
  min-width: 128px;
  min-height: 40px;
  border-radius: 12px;
  font-weight: 700;
}

#panel-tesseramenti .btn-sm,
#panel-certificati .btn-sm,
.card .btn-sm {
  border-radius: 12px;
  font-weight: 700;
}

#panel-tesseramenti table,
#panel-certificati table,
.card table {
  color: #31445d;
}

#panel-tesseramenti table thead th,
#panel-certificati table thead th,
.card table thead th {
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: #60748c;
  border-bottom-color: #dbe4ef;
}

#panel-tesseramenti table tbody td,
#panel-certificati table tbody td,
.card table tbody td {
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 0.95rem;
  color: #34465d;
  border-bottom-color: #e6edf4;
}

.badge.bg-success,
.badge.bg-secondary,
.badge.bg-danger {
  padding: 0.4rem 0.62rem;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.card .alert,
.card .alert-info {
  border-radius: 14px;
  font-size: 0.92rem;
}

@media (max-width: 991px) {
  .socio-head-title h2 {
    font-size: 1.92rem;
  }

  .socio-switch-form {
    max-width: 100%;
  }
}\n\n\n/* =========================================================
   AERION UI — SOCIO TITLE BRAND ALIGN
   ========================================================= */

.socio-page-title {
  font-family: var(--ui-font) !important;
  font-size: 2.02rem !important;
  line-height: 1.08 !important;
  font-weight: 760 !important;
  letter-spacing: -0.02em !important;
  color: #25364a !important;
}

.socio-page-subtitle {
  display: inline-block;
  margin-top: 10px;
  font-size: 1rem !important;
  line-height: 1.3;
  font-weight: 500;
  color: #73849a !important;
}

@media (max-width: 991px) {
  .socio-page-title {
    font-size: 2.45rem !important;
  }
}\n\n\n/* =========================================================
   AERION UI — LIBRO SOCI
   ========================================================= */

.ls-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ls-page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  flex-wrap: wrap;
}

.ls-page-title {
  margin: 0;
  font-family: var(--brand-font);
  font-size: 3.1rem;
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.045em;
  color: #243449;
}

.ls-page-subtitle {
  margin: 10px 0 0;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 500;
  color: #73849a;
}

.ls-head-actions {
  display: flex;
  align-items: center;
}

.ls-new-btn {
  min-height: 42px;
  padding-inline: 16px;
  border-radius: 12px;
}

.ls-card {
  border-radius: 22px;
  overflow: hidden;
}

.ls-table-wrap {
  padding: 14px 16px 18px;
}

.ls-table {
  margin-bottom: 0;
  vertical-align: middle;
}

.ls-table thead th {
  padding-top: 14px;
  padding-bottom: 14px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: #60748c;
  border-bottom-color: #dbe4ef;
  background: #f7faff;
}

.ls-table tbody td {
  padding-top: 14px;
  padding-bottom: 14px;
  font-size: 0.96rem;
  color: #33465d;
  border-bottom-color: #e4ecf4;
}

.ls-table tbody tr:last-child td {
  border-bottom: 0;
}

.ls-cell-strong {
  font-weight: 700;
  color: #2d3f56;
}

.ls-row-muted td {
  opacity: 0.78;
}

.ls-badge-matricola {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef3f8;
  color: #44586f;
  font-size: 0.86rem;
  font-weight: 800;
}

.ls-badge-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ls-badge-state--active {
  background: #dff1e2;
  color: #2f6b3e;
}

.ls-badge-state--inactive {
  background: #f2e1df;
  color: #9b4237;
}

.ls-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ls-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid #c7d5e4;
  background: #ffffff;
  color: #2f5bdb;
  text-decoration: none;
  transition: all .16s ease;
}

.ls-icon-btn:hover {
  background: #f5f8fc;
  border-color: #b5c8db;
  color: #244dbf;
}

.ls-icon-btn--danger {
  color: #c74832;
}

.ls-icon-btn--danger:hover {
  color: #af3b28;
  border-color: #e2b6ae;
  background: #fff7f5;
}

.ls-icon-btn i,
.ls-actions i {
  width: 18px;
  height: 18px;
  stroke-width: 2.1;
}

@media (max-width: 991px) {
  .ls-page-title {
    font-size: 2.45rem;
  }

  .ls-page-head {
    align-items: start;
  }
}\n\n\n/* =========================================================
   AERION UI — LIBRO SOCI REBALANCE
   ========================================================= */

.ls-page-head--compact {
  align-items: end;
  gap: 14px;
  margin-bottom: 4px;
}

.ls-page-title--compact {
  font-size: 2.28rem !important;
  line-height: 1.02 !important;
  letter-spacing: -0.035em !important;
}

.ls-page-subtitle--compact {
  margin-top: 8px;
  font-size: 0.98rem;
  color: #77889d;
}

.ls-new-btn--balanced {
  min-height: 40px;
  padding-inline: 15px;
  border-radius: 12px;
  font-weight: 700;
  color: #294d75 !important;
  border-color: #c5d4e3 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.ls-new-btn--balanced:hover {
  background: #f7fbff !important;
  border-color: #b4c8dc !important;
  color: #234567 !important;
}

.ls-card--balanced {
  border-radius: 20px;
}

.ls-table-wrap--balanced {
  padding-top: 8px !important;
}

.ls-table--balanced thead th {
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 0.74rem;
}

.ls-table--balanced tbody td {
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 0.95rem;
}

.ls-table--balanced tbody tr {
  height: 58px;
}

.ls-badge-matricola {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  font-size: 0.82rem;
}

.ls-badge-state {
  min-width: 72px;
  height: 28px;
  padding: 0 10px;
  font-size: 0.79rem;
}

.ls-actions {
  gap: 8px;
}

.ls-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 11px;
}

.ls-icon-btn i,
.ls-actions i {
  width: 17px;
  height: 17px;
}

@media (max-width: 991px) {
  .ls-page-title--compact {
    font-size: 2rem !important;
  }
}\n\n\n/* =========================================================
   AERION UI — LIBRO SOCI SPACING + ACTIONS FIX
   ========================================================= */

.ls-page-head--compact {
  margin-bottom: 18px !important;
}

.ls-page-subtitle--compact {
  margin-bottom: 0 !important;
}

.ls-card--balanced {
  margin-top: 2px;
}

.ls-table td:last-child,
.ls-table th:last-child {
  text-align: center;
}

.ls-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  min-width: 84px;
}

.ls-table td:last-child > .ls-actions,
.ls-table td:last-child > form,
.ls-table td:last-child > a {
  vertical-align: middle;
}

.ls-table tbody td {
  vertical-align: middle !important;
}

.ls-icon-btn {
  flex: 0 0 32px;
}\n\n\n/* =========================================================
   AERION UI — LIBRO SOCI STRUCTURAL FIX
   ========================================================= */

.ls-col-cf {
  text-align: center !important;
}

.ls-table thead .ls-col-cf,
.ls-table tbody .ls-col-cf {
  text-align: center !important;
}

.ls-table tbody .ls-col-cf {
  font-weight: 500;
  color: #42566f;
}

.ls-col-actions {
  text-align: center !important;
}

.ls-actions-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 150px;
}

.ls-action-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.ls-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #c7d5e4;
  border-radius: 11px;
  background: #ffffff;
  color: #31557f;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  transition: all .16s ease;
}

.ls-action-btn:hover {
  background: #f6faff;
  border-color: #b6c8db;
  color: #28486d;
}

.ls-action-btn--danger {
  background: #fff7f5;
  border-color: #e5c0b8;
  color: #b64a38;
}

.ls-action-btn--danger:hover {
  background: #fff1ed;
  border-color: #dca89d;
  color: #9f3f30;
}

.ls-table td.ls-col-actions,
.ls-table th.ls-col-actions,
.ls-table td.ls-col-cf,
.ls-table th.ls-col-cf {
  vertical-align: middle !important;
}\n\n\n/* =========================================================
   AERION UI — LIBRO SOCI SEARCH TOOLBAR FIX
   ========================================================= */

.ls-toolbar {
  display: block !important;
  padding: 16px 22px 14px 22px !important;
}

.ls-search-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 10px !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 520px !important;
}

.ls-search-label {
  display: block !important;
  margin: 0 !important;
  padding-left: 2px !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: #6b7e94 !important;
}

.ls-search-input {
  display: block !important;
  width: 100% !important;
  max-width: 520px !important;
  height: 40px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  font-size: 0.96rem !important;
}

.ls-table-wrap--balanced {
  padding-top: 4px !important;
}\n\n\n/* =========================================================
   AERION UI — SOCI NUOVO
   ========================================================= */

.sn-page {
  max-width: 980px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sn-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  flex-wrap: wrap;
}

.sn-page-title {
  margin: 0;
  font-family: var(--brand-font);
  font-size: 3rem;
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.045em;
  color: #243449;
}

.sn-page-subtitle {
  margin: 10px 0 0;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 500;
  color: #73849a;
}

.sn-head-actions {
  display: flex;
  align-items: center;
}

.sn-back-btn {
  min-height: 42px;
  padding-inline: 16px;
  border-radius: 12px;
}

.sn-form-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sn-card {
  border-radius: 20px;
  overflow: hidden;
}

.sn-card-title {
  font-size: .72rem;
  letter-spacing: .06em;
}

.sn-notes {
  min-height: 92px;
  resize: vertical;
}

.sn-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.sn-submit-btn,
.sn-cancel-btn {
  min-width: 124px;
  min-height: 40px;
  border-radius: 12px;
  font-weight: 700;
}

@media (max-width: 991px) {
  .sn-page-title {
    font-size: 2.4rem;
  }
}\n\n\n/* =========================================================
   AERION UI — SOCI NUOVO GRID COMPACT
   ========================================================= */

.sn-page-title--compact {
  font-size: 2.35rem !important;
  line-height: 1.02 !important;
  letter-spacing: -0.035em !important;
}

.sn-page-subtitle--spaced {
  margin-top: 8px !important;
  margin-bottom: 8px !important;
}

.sn-form-shell {
  gap: 16px !important;
}

.sn-form-shell .row.g-3 {
  --bs-gutter-y: 1rem;
}

.sn-card {
  border-radius: 20px;
  overflow: hidden;
}

.sn-card .card-body {
  min-height: 100%;
}

.sn-notes {
  min-height: 116px !important;
  resize: vertical;
}

.sn-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

@media (max-width: 1199px) {
  .sn-page-title--compact {
    font-size: 2.15rem !important;
  }
}\n
