:root {
  --fh-brand: #16324f;
  --fh-brand-2: #1f6f8b;
  --fh-accent: #2a9d8f;
}

body {
  background: #f4f6f9;
  font-size: 0.94rem;
}

.fh-navbar {
  background: linear-gradient(90deg, var(--fh-brand), var(--fh-brand-2));
  box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
}

.fh-navbar .navbar-brand,
.fh-navbar .nav-link {
  color: rgba(255, 255, 255, .88);
}

.fh-navbar .nav-link:hover,
.fh-navbar .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border-radius: .375rem;
}

.fh-navbar .navbar-brand {
  font-weight: 600;
  letter-spacing: .02em;
}

.card {
  border: 0;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
  border-radius: .6rem;
}

.card-header {
  background: #fff;
  border-bottom: 1px solid #eceff3;
  font-weight: 600;
}

.fh-stat {
  border-left: 4px solid var(--fh-accent);
}

.fh-stat .fh-stat-value {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.2;
}

.fh-stat .fh-stat-label {
  font-size: .8rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.table > :not(caption) > * > * {
  padding: .5rem .6rem;
}

.table-sticky thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}

.fh-drop {
  border: 1px dashed #c6ced8;
  border-radius: .5rem;
  padding: .6rem;
  background: #fbfcfe;
  transition: background .15s, border-color .15s;
}

.fh-drop.dragover {
  border-color: var(--fh-accent);
  background: #eefaf7;
}

.fh-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: -4px;
}

.fh-flash .alert {
  margin-bottom: .75rem;
}

.fh-login {
  max-width: 420px;
  margin: 8vh auto;
}

.fh-nowrap {
  white-space: nowrap;
}

.fh-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fh-chart-wrap {
  position: relative;
  height: 380px;
}

@media (max-width: 768px) {
  .fh-chart-wrap {
    height: 300px;
  }
}

.badge.text-bg-calc {
  background: #6f42c1;
  color: #fff;
}

/* --- Табличный ввод показаний ------------------------------------------ */
.fh-grid {
  border-collapse: separate;
  border-spacing: 0;
}

.fh-grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8f9fb;
  vertical-align: middle;
}

.fh-grid thead tr:nth-child(2) th {
  top: 42px;
}

.fh-grid-prop {
  background: #eef4f8 !important;
  border-bottom: 2px solid var(--fh-brand-2) !important;
}

.fh-grid-meter a {
  text-decoration: none;
}

/* Первый столбец с месяцами остаётся виден при горизонтальной прокрутке */
.fh-grid-month,
.fh-grid-corner {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #f8f9fb;
  white-space: nowrap;
  min-width: 96px;
}

.fh-grid-corner {
  z-index: 4;
}

.fh-grid-current > .fh-grid-month {
  background: #e7f1ff;
}

.fh-grid-input {
  min-width: 92px;
  font-variant-numeric: tabular-nums;
}

.fh-grid-input:disabled {
  background: #f1f3f5;
}

/* Изменённая, но ещё не сохранённая ячейка */
.fh-grid-input.fh-grid-dirty {
  border-color: var(--fh-accent);
  box-shadow: inset 0 0 0 1px var(--fh-accent);
  background: #f0fbf9;
}

.fh-grid-note {
  min-height: 1.1em;
  font-size: .72rem;
  line-height: 1.1;
  text-align: right;
  padding-right: 2px;
}
