:root {
  --bg: #eaf1f4;
  --ink: #102234;
  --muted: #627286;
  --accent: #0b6f9f;
  --accent-2: #118c8b;
  --deep: #0b2f4c;
  --deep-2: #124a67;
  --aqua: #21b8b1;
  --sand: #fff4dc;
  --warn: #f0a020;
  --line: rgba(15, 27, 45, 0.1);
  --panel: rgba(255, 255, 255, 0.92);
  --shadow-soft: 0 22px 60px rgba(17, 31, 55, 0.09);
}

html {
  font-size: 15px;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(33, 184, 177, 0.18), transparent 27%),
    radial-gradient(circle at top right, rgba(11, 111, 159, 0.16), transparent 24%),
    linear-gradient(180deg, #f8fbfc 0%, var(--bg) 100%);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(248, 252, 253, 0.86);
  border-bottom: 1px solid rgba(15, 27, 45, 0.08);
}

.app-header__inner,
.page-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.app-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 18px;
}

.brand-mark {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(11, 47, 76, 0.12);
  overflow: hidden;
}

.brand-mark__logo img {
  max-width: 38px;
  max-height: 38px;
  object-fit: contain;
}

.brand-mark strong,
.brand-mark small {
  display: block;
  line-height: 1.1;
}

.brand-mark small {
  color: var(--muted);
}

.brand-mark__dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 0 8px rgba(14, 123, 232, 0.08);
}

.top-nav a {
  color: var(--deep);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 999px;
}

.top-nav a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--deep-2), var(--accent-2));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.header-search {
  display: flex;
  align-items: center;
  min-width: min(360px, 34vw);
  border: 1px solid rgba(11, 111, 159, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 32px rgba(15, 33, 55, 0.08);
  overflow: hidden;
}

.header-search__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  color: var(--accent);
  flex: 0 0 38px;
}

.header-search__icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  padding: 10px 8px 10px 0;
}

.header-search input::placeholder {
  color: rgba(98, 114, 134, 0.82);
  font-weight: 500;
}

.header-search button {
  height: 100%;
  border: 0;
  border-left: 1px solid rgba(11, 111, 159, 0.12);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  font-weight: 800;
  padding: 10px 16px;
  white-space: nowrap;
}

.header-search button:hover {
  filter: brightness(0.96);
}

.header-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(11, 111, 159, 0.09);
  color: var(--ink);
  font-weight: 600;
}

.page-shell {
  padding: 28px 0 48px;
}

.hero-shell,
.toolbar-card,
.info-card,
.table-card,
.status-banner,
.form-card {
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(17, 31, 55, 0.08);
  min-width: 0;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.7fr);
  gap: 24px;
  padding: clamp(22px, 3vw, 38px);
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.12), transparent 28%),
    linear-gradient(135deg, var(--deep), var(--deep-2) 56%, #146b69);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-shell::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgba(33, 184, 177, 0.2);
  filter: blur(4px);
}

.hero-content,
.hero-panel {
  position: relative;
  z-index: 1;
}

.hero-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.hero-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
}

.hero-logo img {
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
}

.eyebrow {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.hero-shell h1,
.form-card h1 {
  margin: 0;
  font-size: clamp(2.05rem, 4.4vw, 4.65rem);
  line-height: 0.9;
  letter-spacing: -0.055em;
  max-width: 940px;
}

.hero-copy {
  margin: 18px 0 0;
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.82);
}

.hero-panel {
  display: grid;
  gap: 14px;
  align-content: center;
}

.hero-metric {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.13));
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.card-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-metric span {
  display: block;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-metric strong {
  display: block;
  margin-top: 10px;
  font-size: 1.16rem;
  color: #ffffff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.18);
}

.hero-shell--dashboard {
  grid-template-columns: minmax(320px, 0.82fr) minmax(540px, 1.18fr);
  gap: clamp(18px, 2.2vw, 32px);
  padding: clamp(20px, 2.4vw, 30px);
}

.hero-shell--dashboard h1 {
  max-width: 720px;
  font-size: clamp(2rem, 3.2vw, 3.5rem);
  line-height: 0.98;
}

.hero-shell--dashboard .hero-copy {
  margin-top: 12px;
  font-size: 0.92rem;
}

.hero-dashboard {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.hero-dashboard__summary {
  display: grid;
  grid-column: 1;
  gap: 10px;
  min-width: 0;
}

.hero-dashboard .hero-metric {
  min-width: 0;
  padding: 13px 15px;
  border-radius: 16px;
}

.hero-dashboard .hero-metric strong {
  margin-top: 5px;
  overflow: hidden;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-dashboard .hero-metric small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-days-card {
  position: absolute;
  inset: 0 0 0 calc(50% + 6px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-days-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-days-card__head small {
  color: rgba(255, 255, 255, 0.64);
}

.hero-days-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: rgba(255, 255, 255, 0.52) transparent;
  scrollbar-width: thin;
}

.hero-day-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(5, 28, 48, 0.18);
  font-size: 0.78rem;
  text-decoration: none;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.hero-day-link:hover,
.hero-day-link:focus {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-2px);
}

.hero-day-link strong {
  color: #bdfbf3;
  font-size: 0.72rem;
  white-space: nowrap;
}

.hero-days-empty {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
}

.toolbar-card,
.info-card,
.table-card,
.status-banner,
.form-card {
  margin-top: 22px;
}

.toolbar-card,
.info-card,
.table-card,
.form-card {
  padding: 22px;
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.74);
}

.toolbar-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.25fr) minmax(170px, 0.55fr) minmax(280px, 0.9fr);
  gap: 14px 16px;
  align-items: start;
}

.toolbar-grid .field {
  display: flex;
  flex-direction: column;
  min-height: 86px;
}

.field span {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

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

.import-hero-actions {
  grid-column: auto;
  justify-content: flex-end;
  min-width: 250px;
}

.import-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.import-mode-card {
  min-height: 150px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(236, 247, 249, 0.95), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(11, 111, 159, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.import-mode-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--deep-2), var(--accent-2));
  font-weight: 800;
  font-size: 0.78rem;
}

.import-mode-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.02rem;
}

.import-mode-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.import-upload {
  padding: 18px;
  border-radius: 22px;
  background: rgba(236, 247, 249, 0.58);
  border: 1px solid rgba(11, 111, 159, 0.10);
}

.import-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.import-summary-grid span {
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(11, 111, 159, 0.10);
}

.import-summary-grid strong {
  color: var(--ink);
}

.inline-details {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(236, 247, 249, 0.52);
  border: 1px solid rgba(11, 111, 159, 0.12);
}

.inline-details summary {
  cursor: pointer;
  color: var(--deep-2);
  font-weight: 800;
}

.toolbar-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 2px;
}

.toolbar-actions .btn,
.table-actions .btn {
  border-radius: 999px;
  padding-inline: 16px;
}

.btn-outline-light {
  color: var(--deep-2);
  border-color: rgba(11, 111, 159, 0.28);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 22px rgba(11, 47, 76, 0.08);
}

.btn-outline-light:hover,
.btn-outline-light:focus,
.btn-outline-light:active {
  color: #ffffff;
  border-color: var(--deep-2);
  background: linear-gradient(135deg, var(--deep-2), var(--accent-2));
  box-shadow: 0 12px 28px rgba(11, 111, 159, 0.22);
}

.btn-outline-light:disabled,
.btn-outline-light.disabled {
  color: var(--muted);
  border-color: rgba(111, 127, 149, 0.24);
  background: rgba(111, 127, 149, 0.08);
  box-shadow: none;
}

.btn-export-action {
  color: #ffffff;
  border-color: rgba(11, 95, 137, 0.9);
  background: linear-gradient(135deg, #0b6f9f, #124a67);
  box-shadow: 0 14px 30px rgba(11, 95, 137, 0.20);
  font-weight: 700;
}

.btn-export-action:hover,
.btn-export-action:focus,
.btn-export-action:active {
  color: #ffffff;
  border-color: #0b5f89;
  background: linear-gradient(135deg, #0b5f89, #0b2f4c);
  box-shadow: 0 16px 34px rgba(11, 95, 137, 0.28);
}

.btn-export-table {
  color: #ffffff;
  border: 1px solid rgba(179, 96, 0, 0.82);
  background: linear-gradient(135deg, #d97706, #b45309);
  box-shadow: 0 14px 30px rgba(180, 83, 9, 0.22);
  font-weight: 800;
}

.btn-export-table:hover,
.btn-export-table:focus,
.btn-export-table:active {
  color: #ffffff;
  border-color: #92400e;
  background: linear-gradient(135deg, #b45309, #7c2d12);
  box-shadow: 0 16px 34px rgba(124, 45, 18, 0.28);
}

.btn-row-action {
  padding-inline: 12px !important;
  min-height: 32px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-map-link {
  color: #ffffff;
  background: #0f766e;
  border-color: #0f766e;
  border-radius: 999px;
  font-weight: 800;
  min-height: 30px;
  padding: 0.25rem 0.75rem;
}

.btn-map-link:hover,
.btn-map-link:focus,
.btn-map-link:active {
  color: #ffffff;
  background: #115e59;
  border-color: #115e59;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.status-banner {
  padding: 14px 18px;
  background: linear-gradient(90deg, var(--sand), rgba(255, 244, 220, 0.62));
  color: #7b4a00;
  border: 1px solid rgba(240, 160, 32, 0.22);
}

.status-banner--compact {
  margin-top: 14px;
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 0.9rem;
}

.status-banner--error {
  color: #991b1b;
  border-color: rgba(190, 18, 60, 0.24);
  background: linear-gradient(90deg, rgba(255, 228, 230, 0.94), rgba(255, 247, 247, 0.9));
}

.status-banner--warning {
  color: #7c4600;
  border-color: rgba(240, 160, 32, 0.32);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.92));
}

.auth-recovery-card {
  max-width: 620px;
  margin: 48px auto;
}

.auth-recovery-card h1 {
  font-size: clamp(2.1rem, 5vw, 3.8rem);
}

.auth-recovery-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.login-help-link {
  margin-top: 14px;
  text-align: center;
}

.login-help-link a {
  color: #0b6f9f;
  font-weight: 700;
  text-decoration: none;
}

.login-help-link a:hover {
  text-decoration: underline;
}

.search-result-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 20px;
  border: 1px solid rgba(11, 111, 159, 0.16);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(17, 31, 55, 0.08);
}

.search-result-banner strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.search-result-banner p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.4;
}

.search-result-banner.is-found {
  border-color: rgba(17, 140, 139, 0.25);
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 0.92));
}

.search-result-banner.is-empty {
  border-color: rgba(240, 160, 32, 0.28);
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(255, 255, 255, 0.92));
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 22px;
  min-width: 0;
}

.masterdata-subscriber-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(220px, 1.4fr) 130px auto;
  gap: 12px;
  align-items: end;
  margin: 4px 0 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(242, 247, 250, 0.78);
}

.masterdata-subscriber-toolbar .field {
  margin: 0;
}

.masterdata-filter-actions,
.masterdata-pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.masterdata-results-summary {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.masterdata-empty-row {
  padding: 28px !important;
  text-align: center;
  color: var(--muted);
}

.masterdata-pagination {
  justify-content: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.masterdata-pagination .disabled {
  pointer-events: none;
  opacity: 0.45;
}

.masterdata-pagination span {
  color: var(--muted);
  font-size: 0.88rem;
}

.side-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(260px, 1fr) minmax(320px, 1.4fr);
  gap: 18px;
  align-items: stretch;
  min-width: 0;
}

.main-panel {
  min-width: 0;
}

.side-panel .info-card {
  margin-top: 0;
}

.side-panel .info-card:first-child {
  border-top: 0;
}

.accent {
  background: linear-gradient(135deg, rgba(11, 111, 159, 0.94), rgba(33, 184, 177, 0.88));
  color: white;
}

.accent .card-label,
.accent p {
  color: rgba(255, 255, 255, 0.88);
}

.accent .card-label {
  color: rgba(255, 255, 255, 0.78);
}

.accent h3 {
  color: #ffffff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.18);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.day-list,
.meta-list {
  display: grid;
  gap: 10px;
  max-height: 230px;
  overflow: auto;
  padding-right: 3px;
}

.day-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.day-item strong,
.table-head h2,
.info-card h2,
.info-card h3 {
  margin: 0;
}

.day-item span,
.table-head p,
.info-card p {
  color: var(--muted);
}

.active-table-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(11, 111, 159, 0.16);
  border-radius: 999px;
  background: rgba(11, 111, 159, 0.08);
  color: var(--deep-2);
  font-size: 0.9rem;
  font-weight: 700;
}

.active-table-filter a {
  color: #0b6f9f;
  font-weight: 800;
  text-decoration: none;
}

.active-table-filter a:hover {
  text-decoration: underline;
}

.object-photo-link {
  display: block;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(15, 27, 45, 0.08);
  box-shadow: 0 16px 32px rgba(15, 33, 55, 0.10);
}

.object-photo-link img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.map-card {
  margin-bottom: 22px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.90);
  box-shadow: 0 22px 60px rgba(17, 31, 55, 0.08);
}

.map-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.map-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.map-card__head h2 {
  margin: 4px 0 6px;
}

.map-card__head p {
  margin: 0;
  color: var(--muted);
  max-width: 78ch;
}

.map-card.is-map-collapsed {
  padding-bottom: 18px;
}

.map-card.is-map-collapsed .dashboard-map {
  display: none;
}

.map-card.is-map-collapsed .object-info-panel {
  display: none;
}

.dashboard-map,
.building-location-map {
  width: 100%;
  height: clamp(320px, 42vh, 520px);
  max-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(15, 27, 45, 0.10);
  border-radius: 20px;
  background: #dbe7ea;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
}

.building-location-map {
  height: clamp(280px, 38vh, 420px);
  max-height: 420px;
}

.dashboard-map .ol-viewport,
.building-location-map .ol-viewport {
  border-radius: 20px;
}

.dashboard-map .ol-control button,
.building-location-map .ol-control button {
  background: rgba(11, 47, 76, 0.82);
}

.dashboard-map .ol-control button:hover,
.building-location-map .ol-control button:hover {
  background: rgba(11, 47, 76, 0.96);
}

.map-popup {
  min-width: 190px;
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 27, 45, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(15, 33, 55, 0.22);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
}

.map-popup a {
  color: #0b6f9f;
  font-weight: 700;
}

.map-popup a + a {
  margin-left: 4px;
}

.map-popup-selected {
  display: inline-flex;
  margin-bottom: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: #dc2626;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-empty-state {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 0.86rem;
  box-shadow: 0 8px 24px rgba(15, 33, 55, 0.12);
}

.object-info-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(15, 27, 45, 0.08);
  border-radius: 20px;
  background:
    radial-gradient(circle at 10% 0%, rgba(38, 166, 184, 0.12), transparent 34%),
    rgba(247, 251, 252, 0.88);
}

.object-info-tabs {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid rgba(11, 111, 159, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.object-info-tab {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #436174;
  background: transparent;
  font-weight: 800;
}

.object-info-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #0b6f9f, #118c8b);
  box-shadow: 0 10px 22px rgba(17, 140, 139, 0.18);
}

.object-info-content {
  display: none;
}

.object-info-content.active {
  display: block;
}

.object-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 12px;
}

.object-info-card,
.contact-card,
.empty-photo {
  border: 1px solid rgba(15, 27, 45, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(15, 33, 55, 0.06);
}

.object-info-card {
  padding: 16px;
}

.object-info-card h3 {
  margin: 4px 0 4px;
  font-size: 1.08rem;
}

.object-info-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.note-block {
  white-space: pre-wrap;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.55;
}

.empty-note {
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(15, 27, 45, 0.04);
}

.compact-note-list {
  display: grid;
  gap: 8px;
}

.compact-note-list article {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 27, 45, 0.04);
}

.compact-note-list strong,
.compact-note-list span,
.compact-note-list small {
  display: block;
}

.compact-note-list span {
  margin: 3px 0;
  color: var(--ink);
}

.compact-note-list small {
  color: var(--muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.contact-card {
  padding: 12px;
}

.contact-card div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.contact-card strong,
.contact-card span,
.contact-card small {
  display: block;
}

.contact-card span,
.contact-card small,
.contact-card p {
  color: var(--muted);
}

.contact-card p {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 27, 45, 0.08);
}

.object-info-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.object-info-photo {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.object-info-photo img {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
}

.empty-photo {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.empty-photo strong,
.empty-photo span {
  display: block;
}

.comparison-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin: 0 0 14px;
  padding: 12px 16px;
  border: 1px solid rgba(11, 111, 159, 0.14);
  border-radius: 18px;
  background: rgba(11, 111, 159, 0.07);
  color: var(--ink);
}

.comparison-banner span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comparison-banner strong {
  font-weight: 900;
}

.day-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chip-link,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

.chip-link {
  color: white;
  text-decoration: none;
  background: linear-gradient(135deg, var(--deep-2), var(--aqua));
}

.table-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(15, 27, 45, 0.08);
}

.table-workspace-bar {
  display: grid;
  gap: 10px;
  margin: -6px -6px 16px;
  padding: 14px;
  border: 1px solid rgba(11, 111, 159, 0.12);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(237, 247, 250, 0.9), rgba(255, 255, 255, 0.88));
}

.table-report-controls {
  display: grid;
  grid-template-columns: minmax(250px, 1.45fr) minmax(118px, 0.42fr) minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.compact-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.compact-field > span {
  color: #496479;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.compact-field .form-select {
  min-height: 38px;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  border-color: rgba(11, 111, 159, 0.18);
  background-color: rgba(255, 255, 255, 0.92);
  font-size: 0.86rem;
}

.object-picker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 38px;
  padding: 0.4rem 0.65rem;
  border: 1px solid rgba(11, 111, 159, 0.18);
  border-radius: 0.375rem;
  color: #263f55;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.86rem;
  text-align: left;
}

.object-picker-trigger:hover,
.object-picker-trigger:focus {
  border-color: rgba(11, 111, 159, 0.48);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(11, 111, 159, 0.1);
}

.object-picker-trigger__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-picker-trigger__icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.object-picker-trigger__icon svg,
.object-picker-search svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.object-picker-dialog {
  width: min(900px, calc(100vw - 28px));
  max-width: 900px;
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  box-shadow: 0 30px 90px rgba(9, 31, 52, 0.32);
}

.object-picker-dialog::backdrop {
  background: rgba(7, 26, 43, 0.62);
  backdrop-filter: blur(4px);
}

.object-picker-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: min(760px, calc(100vh - 32px));
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 24px;
  background: linear-gradient(150deg, #f8fcfd, #edf5f7);
}

.object-picker-head,
.object-picker-toolbar,
.object-progress-item__top,
.object-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.object-picker-head {
  align-items: flex-start;
  margin-bottom: 14px;
}

.object-picker-head h2 {
  margin: 3px 0;
}

.object-picker-head p {
  margin: 0;
  color: var(--muted);
}

.object-picker-close {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  color: #526b7e;
  background: rgba(15, 27, 45, 0.06);
  font-size: 1.5rem;
  line-height: 1;
}

.object-picker-toolbar {
  margin-bottom: 14px;
}

.object-picker-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1 1 auto;
  padding: 0 12px;
  border: 1px solid rgba(11, 111, 159, 0.16);
  border-radius: 14px;
  color: #527086;
  background: rgba(255, 255, 255, 0.9);
}

.object-picker-search input {
  width: 100%;
  min-height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
}

.object-picker-period {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.82rem;
}

.object-progress-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 10px;
  min-height: 180px;
  overflow-y: auto;
  padding: 2px 5px 2px 2px;
}

.object-progress-item {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(15, 27, 45, 0.09);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  text-align: left;
  box-shadow: 0 10px 26px rgba(15, 33, 55, 0.05);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.object-progress-item:hover,
.object-progress-item:focus,
.object-progress-item.is-selected {
  border-color: rgba(11, 111, 159, 0.42);
  outline: 0;
  box-shadow: 0 14px 32px rgba(11, 111, 159, 0.12);
  transform: translateY(-1px);
}

.object-progress-item.is-selected {
  box-shadow: inset 4px 0 0 #0b6f9f, 0 14px 32px rgba(11, 111, 159, 0.1);
}

.object-progress-item__top > span:first-child {
  min-width: 0;
}

.object-progress-item__top strong,
.object-progress-item__top small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-progress-item__top small,
.object-progress-date,
.object-progress-meta {
  color: var(--muted);
  font-size: 0.76rem;
}

.object-progress-status {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: #52677a;
  background: rgba(100, 116, 139, 0.12);
  font-size: 0.7rem;
  font-weight: 800;
}

.object-progress-meta strong {
  color: #213c52;
}

.object-progress-track {
  display: block;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.14);
}

.object-progress-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #94a3b8;
}

.object-progress-item.is-ready .object-progress-track > span,
.object-progress-item.is-ready .object-progress-status {
  color: #075a43;
  background: #42c79a;
}

.object-progress-item.is-near .object-progress-track > span,
.object-progress-item.is-near .object-progress-status {
  color: #075985;
  background: #55c4df;
}

.object-progress-item.is-progress .object-progress-track > span,
.object-progress-item.is-progress .object-progress-status {
  color: #814b00;
  background: #f3b955;
}

.object-progress-item.is-ready .object-progress-status,
.object-progress-item.is-near .object-progress-status,
.object-progress-item.is-progress .object-progress-status {
  background-color: color-mix(in srgb, currentColor 12%, white);
}

.object-picker-state {
  grid-column: 1 / -1;
  padding: 42px 18px;
  border: 1px dashed rgba(11, 111, 159, 0.18);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.object-picker-state.is-error {
  color: #9a4f00;
  border-color: rgba(240, 160, 32, 0.3);
  background: rgba(255, 247, 237, 0.82);
}

.table-control-actions,
.table-export-cluster {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.table-control-actions {
  justify-content: flex-end;
}

.table-control-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border-radius: 12px;
  white-space: nowrap;
}

.table-control-actions svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.table-icon-button {
  width: 40px;
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.table-export-cluster {
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid rgba(11, 111, 159, 0.1);
}

.table-card {
  overflow: hidden;
}

.table-responsive {
  max-width: 100%;
}

.table-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.pill.ok {
  background: rgba(17, 140, 139, 0.14);
  color: #0f6d6c;
}

.pill.warn {
  background: rgba(240, 160, 32, 0.16);
  color: #885500;
}

.operator-table {
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
  min-width: 1040px;
}

.operator-table thead th {
  border-bottom: 1px solid rgba(15, 27, 45, 0.14);
  color: #4e6479;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  background: #f5f9fa;
  position: sticky;
  top: 0;
  z-index: 2;
}

.operator-table td {
  border-bottom: 1px solid rgba(15, 27, 45, 0.075);
  vertical-align: middle;
}

.operator-table tbody tr {
  cursor: pointer;
  box-shadow: inset 0 -1px 0 rgba(15, 27, 45, 0.04);
}

.operator-table tbody tr:hover {
  background: rgba(33, 184, 177, 0.09);
}

.report-table thead th {
  background: linear-gradient(180deg, #eef8fa 0%, #f7fbfc 100%);
}

.report-table tbody tr:not(.reported-row):not(.orphan-row):nth-child(even) > * {
  background-color: rgba(238, 246, 249, 0.52);
}

.identity-chip,
.subscriber-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.identity-chip {
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.identity-chip--meter {
  color: #075985;
  border-color: rgba(14, 116, 144, 0.16);
  background: rgba(224, 242, 254, 0.7);
}

.identity-chip--module {
  color: #166534;
  border-color: rgba(22, 101, 52, 0.15);
  background: rgba(220, 252, 231, 0.68);
}

.identity-chip__icon,
.subscriber-cell__icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: currentColor;
  background: rgba(255, 255, 255, 0.78);
}

.identity-chip__icon svg,
.subscriber-cell__icon svg,
.consumption-chart-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.subscriber-cell {
  color: #334155;
  font-weight: 600;
}

.subscriber-number-cell {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(14, 116, 144, 0.16);
  border-radius: 9px;
  color: #0c4a6e;
  background: rgba(224, 242, 254, 0.62);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
}

.subscriber-number-input {
  min-width: 132px;
  color: #0c4a6e;
  background: rgba(224, 242, 254, 0.72);
  border-color: rgba(14, 116, 144, 0.28);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.subscriber-coverage-banner strong {
  color: #0c4a6e;
  font-variant-numeric: tabular-nums;
}

.subscriber-cell__icon {
  color: #7c3aed;
  background: rgba(237, 233, 254, 0.9);
}

.consumption-cell {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 7px;
  min-width: 132px;
}

.consumption-cell__current {
  color: #0f5132;
  font-weight: 700;
}

.consumption-cell__average {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.consumption-chart-button {
  display: inline-grid;
  grid-column: 2;
  grid-row: 1 / span 2;
  place-items: center;
  align-self: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(11, 111, 159, 0.2);
  border-radius: 9px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.86);
}

.consumption-chart-button:hover,
.consumption-chart-button:focus {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.consumption-modal {
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 32px 90px rgba(10, 35, 55, 0.24);
}

.consumption-chart {
  display: grid;
  gap: 12px;
}

.consumption-chart__item {
  display: grid;
  grid-template-columns: 78px minmax(140px, 1fr) 120px;
  gap: 12px;
  align-items: center;
}

.consumption-chart__item > span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.consumption-chart__item > strong {
  color: var(--deep);
  font-size: 0.86rem;
  text-align: right;
}

.consumption-chart__track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f0f3;
}

.consumption-chart__bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--aqua));
  box-shadow: 0 5px 14px rgba(11, 111, 159, 0.22);
}

.report-table tbody td:first-child {
  border-left: 4px solid transparent;
}

.row-number-column,
.row-number-cell {
  width: 58px;
  min-width: 58px;
  text-align: center;
}

.row-number-cell {
  color: var(--muted);
  font-weight: 800;
}

.report-table--interactive thead th {
  vertical-align: top;
}

.table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: inherit;
}

.table-sort-button::after {
  content: "↕";
  color: rgba(78, 100, 121, 0.55);
  font-size: 0.72rem;
}

.table-sort-button.is-sorted::after {
  content: attr(data-direction);
  color: var(--deep-2);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.table-filter-input {
  display: block;
  width: 100%;
  min-width: 86px;
  margin-top: 7px;
  padding: 5px 8px;
  border: 1px solid rgba(11, 111, 159, 0.18);
  border-radius: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.table-filter-input::placeholder {
  color: rgba(78, 100, 121, 0.68);
}

.report-table tbody tr.reported-row {
  --bs-table-bg: rgba(11, 111, 159, 0.08);
  --bs-table-accent-bg: rgba(11, 111, 159, 0.08);
  --bs-table-hover-bg: rgba(11, 111, 159, 0.14);
}

.report-table tbody tr.reported-row > * {
  background-color: rgba(11, 111, 159, 0.08) !important;
  border-color: rgba(11, 111, 159, 0.16);
}

.report-table tbody tr.reported-row > td:first-child {
  border-left-color: #0b6f9f;
}

.report-table tbody tr.reported-row:hover > * {
  background-color: rgba(11, 111, 159, 0.14) !important;
}

.report-table tbody tr.main-meter-row > * {
  background-color: rgba(237, 233, 254, 0.82) !important;
  border-color: rgba(109, 40, 217, 0.18);
}

.report-table tbody tr.main-meter-row > td:first-child {
  border-left-color: #7c3aed;
  border-left-width: 4px;
}

.report-table tbody tr.main-meter-row:hover > * {
  background-color: rgba(221, 214, 254, 0.9) !important;
}

.report-table tbody tr.main-meter-row.reported-row > td:first-child {
  border-left-color: #059669;
}

.meter-role-badge,
.main-meter-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  border-radius: 999px;
  white-space: nowrap;
}

.meter-role-badge {
  padding: 4px 8px;
  color: #475569;
  background: rgba(241, 245, 249, 0.92);
  font-size: 0.72rem;
  font-weight: 700;
}

.meter-role-badge--main {
  color: #5b21b6;
  border: 1px solid rgba(109, 40, 217, 0.2);
  background: rgba(255, 255, 255, 0.82);
}

.main-meter-status {
  margin-top: 5px;
  padding: 3px 7px;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.main-meter-status.is-reported {
  background: #047857;
}

.main-meter-status.is-pending {
  background: #c56a09;
}

.balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 0;
  margin-bottom: 22px;
}

.balance-card {
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 22px 60px rgba(17, 31, 55, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.78);
}

.balance-card__head,
.balance-metrics {
  display: flex;
  gap: 14px;
}

.balance-card__head {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.balance-card__head h3 {
  margin: 4px 0 0;
}

.balance-metrics {
  flex-wrap: wrap;
}

.balance-metrics div {
  flex: 1 1 120px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(13, 32, 56, 0.05);
}

.balance-metrics span,
.balance-metrics small {
  display: block;
  color: var(--muted);
}

.balance-metrics strong {
  display: block;
  margin: 4px 0;
  font-size: 1.2rem;
}

.balance-difference-value {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 0 !important;
  background: transparent !important;
}

.balance-percent {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.balance-percent.ok {
  color: #0f6d6c;
  background: rgba(17, 140, 139, 0.14);
}

.balance-percent.warn {
  color: #8a4b00;
  background: rgba(240, 160, 32, 0.2);
}

.balance-limit.warn {
  color: #a34f00;
  font-weight: 800;
}

.balance-note {
  margin: 14px 0 0;
  color: #885500;
  font-size: 0.9rem;
}

.inline-form {
  display: inline-flex;
  margin: 0 6px 0 0;
}

.compact-toolbar {
  grid-template-columns: 1fr auto;
}

.quick-edit-table {
  max-height: 62vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.quick-edit-table .operator-table {
  min-width: 1120px;
}

.quick-edit-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.96);
}

.quick-edit-table input,
.quick-edit-table select {
  min-width: 96px;
}

.report-table tbody tr.orphan-row {
  --bs-table-bg: rgba(240, 160, 32, 0.14);
  --bs-table-accent-bg: rgba(240, 160, 32, 0.14);
  --bs-table-hover-bg: rgba(240, 160, 32, 0.22);
}

.report-table tbody tr.orphan-row > * {
  background-color: rgba(240, 160, 32, 0.14) !important;
  border-color: rgba(240, 160, 32, 0.22);
}

.report-table tbody tr.orphan-row > td:first-child {
  border-left-color: var(--warn);
}

.report-table tbody tr.orphan-row:hover > * {
  background-color: rgba(240, 160, 32, 0.22) !important;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.table-actions .inline-form {
  display: inline-flex;
  margin: 0;
}

.btn-delete-action {
  color: #9f1239;
  border-color: rgba(159, 18, 57, 0.36);
  background: rgba(255, 241, 242, 0.92);
}

.btn-delete-action:hover,
.btn-delete-action:focus,
.btn-delete-action:active {
  color: #ffffff;
  border-color: #9f1239;
  background: linear-gradient(135deg, #be123c, #7f1d1d);
}

.export-modal {
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(11, 47, 76, 0.28);
}

.export-modal .modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: #ffffff;
  border: 0;
  background: linear-gradient(135deg, var(--deep), var(--accent-2));
}

.export-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.export-modal-actions .btn {
  white-space: nowrap;
}

.export-modal-actions .btn-light {
  color: var(--deep);
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.94);
}

.export-modal .modal-header .eyebrow {
  color: rgba(255, 255, 255, 0.74);
}

.export-modal .btn-close {
  filter: invert(1) grayscale(1);
  opacity: 0.86;
}

.export-modal .modal-body {
  background: linear-gradient(180deg, #ffffff, #f7fbfc);
}

.export-options {
  margin-bottom: 16px;
}

.export-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.export-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 48px;
  padding: 12px;
  border: 1px solid rgba(15, 27, 45, 0.10);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.export-option:hover {
  border-color: rgba(11, 111, 159, 0.32);
  box-shadow: 0 12px 28px rgba(11, 47, 76, 0.08);
  transform: translateY(-1px);
}

.export-option input {
  margin-top: 3px;
}

.export-option span {
  display: grid;
  gap: 2px;
  font-weight: 800;
}

.export-option small {
  color: var(--muted);
  font-weight: 600;
}

.export-option--wide {
  width: 100%;
  border-color: rgba(217, 119, 6, 0.28);
  background: rgba(255, 247, 237, 0.92);
}

@media (max-width: 575.98px) {
  .export-modal .modal-header {
    align-items: stretch;
  }

  .export-modal-actions {
    width: 100%;
    margin-left: 0;
  }

  .export-modal-actions .btn {
    flex: 1 1 0;
  }
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 22px;
}

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

.form-grid .full {
  grid-column: 1 / -1;
}

.meta-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(13, 32, 56, 0.05);
}

.history-table td,
.history-table th {
  vertical-align: top;
}

.structure-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: var(--ink);
}

.structure-dialog::backdrop {
  background: rgba(10, 21, 34, 0.58);
  backdrop-filter: blur(5px);
}

.structure-modal {
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(14, 123, 232, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 252, 0.96));
  box-shadow: 0 34px 90px rgba(15, 33, 55, 0.28);
}

.structure-modal__head,
.structure-modal__actions,
.note-strip,
.manual-reading-form {
  display: flex;
  align-items: center;
  gap: 12px;
}

.structure-modal__head {
  justify-content: space-between;
  margin-bottom: 14px;
}

.structure-modal__head h2 {
  margin: 4px 0;
}

.structure-modal__head p {
  margin: 0;
  color: var(--muted);
}

.structure-modal__actions {
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.structure-toggle.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #165ec9);
}

.note-strip {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.note-strip .form-control {
  min-width: min(520px, 100%);
}

.note-history-panel {
  margin-bottom: 14px;
  padding: 13px 16px;
  border: 1px solid rgba(36, 154, 98, 0.18);
  border-radius: 20px;
  background: rgba(36, 154, 98, 0.06);
}

.note-history-panel summary {
  cursor: pointer;
  font-weight: 800;
}

.note-history-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  max-height: 240px;
  overflow: auto;
}

.note-history-item {
  padding: 12px;
  border: 1px solid rgba(13, 32, 56, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.note-history-item strong,
.note-history-item span {
  display: block;
}

.note-history-item span,
.note-history-item p,
.report-note {
  color: var(--muted);
}

.note-history-item p {
  margin: 6px 0 0;
}

.telegram-details {
  max-width: 260px;
}

.telegram-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}

.telegram-details code {
  display: block;
  max-height: 120px;
  overflow: auto;
  white-space: normal;
  word-break: break-all;
}

.quick-meter-panel {
  margin-bottom: 14px;
  padding: 13px 16px;
  border: 1px solid rgba(14, 123, 232, 0.18);
  border-radius: 20px;
  background: rgba(14, 123, 232, 0.06);
}

.quick-meter-panel summary {
  cursor: pointer;
  font-weight: 800;
}

.quick-meter-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.quick-meter-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.quick-meter-form__wide {
  grid-column: span 2;
}

.quick-check {
  align-content: end;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.structure-view[hidden] {
  display: none;
}

.structure-table-wrap {
  max-height: 58vh;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.structure-table {
  min-width: 1180px;
}

.structure-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.98);
}

.manual-reading-form {
  min-width: 390px;
}

.manual-reading-form .reading-input {
  width: 112px;
}

.manual-reading-form .note-input {
  min-width: 160px;
}

.water-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.water-cold {
  background: rgba(14, 123, 232, 0.09);
}

.water-hot {
  background: rgba(215, 43, 83, 0.09);
}

.water-all {
  background: rgba(36, 154, 98, 0.08);
}

.water-badge.water-cold {
  color: #0c63bd;
  background: rgba(14, 123, 232, 0.14);
}

.water-badge.water-hot {
  color: #b7204f;
  background: rgba(215, 43, 83, 0.14);
}

.water-badge.water-all {
  color: #137646;
  background: rgba(36, 154, 98, 0.14);
}

.tree-node {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.tree-node summary {
  cursor: pointer;
  font-weight: 850;
}

.tree-node summary span {
  margin-left: 10px;
  color: var(--muted);
  font-weight: 650;
}

.tree-node--floor {
  margin-left: 18px;
  background: rgba(14, 123, 232, 0.04);
}

.tree-node--apartment {
  margin-left: 18px;
  background: rgba(36, 154, 98, 0.04);
}

.tree-meter-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.tree-meter {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(13, 32, 56, 0.08);
}

.tree-meter strong {
  font-size: 1.05rem;
}

.tree-meter span,
.tree-meter small {
  color: var(--muted);
}

.users-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: 22px;
  padding: 28px;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(125deg, #0b2f4c 0%, #0b6f9f 55%, #118c8b 100%);
  box-shadow: var(--shadow-soft);
}

.users-hero h1,
.users-hero p {
  margin-bottom: 0;
}

.users-hero .eyebrow,
.users-hero p {
  color: rgba(255, 255, 255, 0.76);
}

.users-hero__metric {
  min-width: 180px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

.users-hero__metric span,
.users-hero__metric strong {
  display: block;
}

.users-hero__metric strong {
  margin-top: 4px;
  font-size: 1.8rem;
}

.user-create-card {
  padding: 20px 22px;
}

.user-form-grid,
.user-account-form {
  display: grid;
  gap: 12px;
  align-items: end;
}

.user-form-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto;
}

.user-form-grid .field,
.user-account-form .field {
  margin: 0;
}

.user-active-check {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  white-space: nowrap;
}

.user-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.user-account-card {
  padding: 20px;
  border: 1px solid rgba(11, 111, 159, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(17, 31, 55, 0.07);
}

.user-account-card.is-disabled {
  opacity: 0.72;
  filter: grayscale(0.35);
}

.user-account-card__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.user-account-card__head h2,
.user-account-card__head p {
  margin: 0;
}

.user-account-card__head p {
  color: var(--muted);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.user-status {
  padding: 5px 9px;
  border-radius: 999px;
  color: #9f1239;
  background: rgba(255, 228, 230, 0.9);
  font-size: 0.75rem;
  font-weight: 800;
}

.user-status.is-active {
  color: #166534;
  background: rgba(220, 252, 231, 0.92);
}

.user-account-form {
  grid-template-columns: minmax(150px, 1fr) 140px;
}

.user-password-field {
  grid-column: 1 / -1;
}

.user-account-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
}

@media (max-width: 1080px) {
  html {
    font-size: 14px;
  }

  .hero-shell,
  .content-grid,
  .detail-grid,
  .toolbar-grid,
  .form-grid,
  .import-hero,
  .import-mode-grid,
  .import-summary-grid {
    grid-template-columns: 1fr;
  }

  .import-hero-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .user-form-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .side-panel {
    grid-template-columns: 1fr;
  }

  .app-header__inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .header-search {
    flex: 1 1 320px;
    min-width: 260px;
  }

  .search-result-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    gap: 8px;
  }

  .top-nav a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(11, 111, 159, 0.08);
  }

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

  .map-card__head {
    align-items: stretch;
    flex-direction: column;
  }

  .object-info-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .table-meta {
    position: sticky;
    top: 86px;
    z-index: 8;
    justify-content: flex-start;
    padding: 10px;
    border: 1px solid rgba(11, 111, 159, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 34px rgba(15, 33, 55, 0.12);
    backdrop-filter: blur(10px);
  }

  .btn-export-action {
    min-height: 40px;
    padding-inline: 18px !important;
  }

  .quick-meter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-meter-form__wide {
    grid-column: 1 / -1;
  }

  .structure-modal__head,
  .note-strip,
  .manual-reading-form {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-reading-form,
  .note-strip .form-control {
    min-width: 0;
    width: 100%;
  }

  .manual-reading-form .reading-input,
  .manual-reading-form .note-input {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .app-header__inner,
  .page-shell {
    width: min(100% - 18px, 100%);
  }

  .page-shell {
    padding-top: 14px;
  }

  .header-search {
    width: 100%;
    min-width: 0;
  }

  .header-search button {
    padding-inline: 12px;
  }

  .users-hero {
    align-items: stretch;
    flex-direction: column;
    padding: 20px;
  }

  .users-hero__metric {
    min-width: 0;
  }

  .user-form-grid,
  .user-account-form {
    grid-template-columns: 1fr;
  }

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

  .user-account-card__head {
    grid-template-columns: auto 1fr;
  }

  .user-status {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .user-account-meta {
    flex-direction: column;
  }

  .consumption-chart__item {
    grid-template-columns: 64px minmax(90px, 1fr);
  }

  .consumption-chart__item > strong {
    grid-column: 2;
    text-align: left;
  }

  .hero-shell,
  .toolbar-card,
  .info-card,
  .table-card,
  .map-card,
  .form-card {
    border-radius: 18px;
  }

  .hero-shell,
  .toolbar-card,
  .info-card,
  .table-card,
  .map-card,
  .form-card,
  .structure-modal {
    padding: 16px;
  }

  .dashboard-map,
  .building-location-map {
    height: 300px;
    max-height: 300px;
  }

  .object-info-tabs {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 16px;
  }

  .object-info-tab {
    width: 100%;
  }

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

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

  .table-report-controls {
    grid-template-columns: minmax(0, 1fr) 150px;
  }

  .compact-field--compare,
  .table-control-actions {
    grid-column: 1 / -1;
  }

  .table-control-actions {
    justify-content: flex-start;
  }

  .hero-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-metric {
    padding: 13px;
  }

  .toolbar-actions,
  .table-meta,
  .day-item,
  .day-actions,
  .structure-modal__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions .btn,
  .table-meta .btn,
  .day-actions .btn,
  .structure-modal__actions .btn,
  .inline-form,
  .inline-form .btn {
    width: 100%;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: 18px;
  }

  .table-responsive::before,
  .structure-table-wrap::before {
    content: "Плъзнете хоризонтално за всички колони";
    display: block;
    position: sticky;
    left: 0;
    padding: 8px 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.94);
    font-size: 0.78rem;
    font-weight: 700;
  }

  .operator-table {
    min-width: 900px;
  }

  .operator-table thead th,
  .operator-table tbody td {
    padding: 0.55rem 0.65rem;
  }

  .report-table th:nth-child(4),
  .report-table td:nth-child(4),
  .report-table th:nth-child(11),
  .report-table td:nth-child(11),
  .report-table th:nth-child(15),
  .report-table td:nth-child(15),
  .report-table th:nth-child(16),
  .report-table td:nth-child(16),
  .report-table th:nth-child(17),
  .report-table td:nth-child(17) {
    display: none;
  }

  .operator-table {
    min-width: 620px;
  }

  .structure-table {
    min-width: 720px;
  }

  .table-actions {
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    flex-direction: column;
  }

  .btn-row-action {
    min-height: 36px;
  }

  .quick-meter-form {
    grid-template-columns: 1fr;
  }

  .tree-node,
  .tree-node--floor,
  .tree-node--apartment {
    margin-left: 0;
  }

  .structure-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 18px);
  }

  .structure-modal {
    max-height: calc(100vh - 18px);
    border-radius: 20px;
  }
}

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

  .hero-dashboard,
  .hero-dashboard__summary,
  .table-report-controls {
    grid-template-columns: 1fr;
  }

  .hero-dashboard__summary {
    grid-column: auto;
  }

  .hero-days-card {
    position: static;
    inset: auto;
    max-height: 280px;
    margin-top: 12px;
  }

  .hero-days-list {
    max-height: 220px;
  }

  .object-picker-shell {
    padding: 14px;
    border-radius: 18px;
  }

  .object-picker-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .object-picker-period {
    align-self: flex-start;
  }

  .object-progress-list {
    grid-template-columns: 1fr;
  }

  .compact-field--compare,
  .table-control-actions {
    grid-column: auto;
  }

  .table-workspace-bar {
    margin-right: -4px;
    margin-left: -4px;
    padding: 11px;
  }

  .table-open-report,
  .table-structure-button {
    flex: 1 1 auto;
  }

  .table-export-cluster {
    align-items: stretch;
    justify-content: stretch;
  }

  .table-export-cluster .btn,
  .table-export-cluster .inline-form,
  .table-export-cluster .pill {
    width: 100%;
  }

  .hero-shell h1,
  .form-card h1 {
    font-size: clamp(1.9rem, 11vw, 2.65rem);
  }

  .brand-mark__logo {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .brand-mark__logo img {
    max-width: 32px;
    max-height: 32px;
  }

  .brand-mark strong {
    font-size: 0.95rem;
  }

  .brand-mark small,
  .header-user span {
    font-size: 0.78rem;
  }

  .top-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .top-nav a {
    text-align: center;
  }

  .header-user {
    width: 100%;
    justify-content: space-between;
  }

  .pill,
  .chip-link {
    width: 100%;
  }
}
