/* ==========================================================================
   MULTICAL HUD ONLINE — MODERN DARK THEME STYLESHEET
   Atom One Dark & CustomTkinter inspired styling
   ========================================================================== */

:root {
  --bg-app: #181a1f;
  --bg-sidebar: #21252b;
  --bg-card: #21252b;
  --bg-card-hover: #282c34;
  --bg-header: #1e2227;
  --bg-ribbon: #252930;
  --bg-input: #1b1d23;
  --border-color: #2d3139;
  --border-light: #3e4451;
  
  --text-main: #abb2bf;
  --text-heading: #e6edf3;
  --text-muted: #6b7280;
  --text-bright: #ffffff;
  
  --color-blue: #61afef;
  --color-blue-dark: #3b82f6;
  --color-amber: #e5c07b;
  --color-green: #98c379;
  --color-red: #e06c75;
  --color-cyan: #56b6c2;
  --color-purple: #c678dd;
  --color-orange: #d19a66;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.25);
  --font-mono: "JetBrains Mono", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.dark-theme {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #525966;
}

/* Typography utilities */
.text-blue { color: var(--color-blue); }
.text-amber { color: var(--color-amber); }
.text-green { color: var(--color-green); }
.text-red { color: var(--color-red); }
.text-cyan { color: var(--color-cyan); }
.text-purple { color: var(--color-purple); }
.text-emerald { color: #10b981; }
.accent-text { color: var(--color-blue); }

/* ==========================================================================
   1. TOP NAVIGATION
   ========================================================================== */
.top-nav {
  height: 58px;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  position: sticky;
  top: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-bright);
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.header-meter-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.header-meter-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-meter-badges {
  display: flex;
  gap: 6px;
  margin-top: 3px;
}

.badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-model {
  background-color: rgba(97, 175, 239, 0.15);
  color: var(--color-blue);
  border: 1px solid rgba(97, 175, 239, 0.3);
}

.badge-supplier {
  background-color: rgba(198, 120, 221, 0.15);
  color: var(--color-purple);
  border: 1px solid rgba(198, 120, 221, 0.3);
}

.badge-cert {
  background-color: rgba(152, 195, 121, 0.15);
  color: var(--color-green);
  border: 1px solid rgba(152, 195, 121, 0.3);
}
.badge-cert.warning {
  background-color: rgba(229, 192, 123, 0.15);
  color: var(--color-amber);
  border-color: rgba(229, 192, 123, 0.3);
}
.badge-cert.expired {
  background-color: rgba(224, 108, 117, 0.15);
  color: var(--color-red);
  border-color: rgba(224, 108, 117, 0.3);
}

.badge-admin {
  background-color: rgba(224, 108, 117, 0.18);
  color: var(--color-red);
  border: 1px solid rgba(224, 108, 117, 0.4);
}

.badge-engineer {
  background-color: rgba(152, 195, 121, 0.18);
  color: var(--color-green);
  border: 1px solid rgba(152, 195, 121, 0.4);
}

.badge-osbb {
  background-color: rgba(97, 175, 239, 0.18);
  color: var(--color-blue);
  border: 1px solid rgba(97, 175, 239, 0.4);
}

.badge-operator {
  background-color: rgba(229, 192, 123, 0.18);
  color: var(--color-amber);
  border: 1px solid rgba(229, 192, 123, 0.4);
}

.api-key-code {
  background: #14161a;
  padding: 3px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-cyan);
  border: 1px solid var(--border-light);
  user-select: all;
}

.btn-icon-action {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-icon-action:hover {
  color: var(--text-bright);
  border-color: var(--color-blue);
  background: rgba(97, 175, 239, 0.1);
}
.btn-icon-action.danger:hover {
  color: var(--color-red);
  border-color: var(--color-red);
  background: rgba(224, 108, 117, 0.1);
}

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

.server-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(152, 195, 121, 0.1);
  border: 1px solid rgba(152, 195, 121, 0.25);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-green);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-dot.green {
  background-color: var(--color-green);
  box-shadow: 0 0 8px var(--color-green);
}

/* ==========================================================================
   2. CONTROLS RIBBON (PERIOD & EXPORTS)
   ========================================================================== */
.controls-ribbon {
  background-color: var(--bg-ribbon);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.period-control-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.control-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-bright);
}

.select-preset {
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-heading);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}
.select-preset:focus {
  border-color: var(--color-blue);
}

.date-range-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
}

.date-input {
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  color: var(--text-bright);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color-scheme: dark;
}

.report-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
.btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease-in-out;
}
.btn:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--color-blue-dark);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-main);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-bright);
}

.btn-export-excel {
  background: linear-gradient(135deg, #107c41, #15803d);
  color: #fff;
  box-shadow: 0 2px 6px rgba(16, 124, 65, 0.3);
}

.btn-export-word {
  background: linear-gradient(135deg, #185abd, #1d4ed8);
  color: #fff;
  box-shadow: 0 2px 6px rgba(24, 90, 189, 0.3);
}

.btn-export-zip {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.3);
}

.btn-sm {
  padding: 4px 8px;
  font-size: 0.75rem;
}

/* ==========================================================================
   3. HUD WORKSPACE (SIDEBAR + MAIN)
   ========================================================================== */
.hud-workspace {
  display: flex;
  flex: 1;
  height: calc(100vh - 110px);
  overflow: hidden;
}

/* SIDEBAR */
.hud-sidebar {
  width: 320px;
  min-width: 300px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.sidebar-search {
  padding: 10px 12px;
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.search-icon {
  position: absolute;
  left: 22px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.sidebar-search input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  padding: 6px 30px 6px 32px;
  font-size: 0.82rem;
  outline: none;
}
.sidebar-search input:focus {
  border-color: var(--color-blue);
}

.btn-clear {
  position: absolute;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.sidebar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.1);
}

.pill-filter {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}
.pill-filter:hover {
  color: var(--text-bright);
  border-color: var(--text-main);
}
.pill-filter.active {
  background: var(--color-blue);
  color: #fff;
  border-color: var(--color-blue);
}

.meters-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 6px;
}

.meter-card {
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  background-color: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meter-card:hover {
  background-color: var(--bg-card-hover);
}
.meter-card.active {
  background-color: #2c313a;
  border-color: var(--color-blue);
  box-shadow: inset 3px 0 0 var(--color-blue);
}

.meter-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.freshness-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.freshness-dot.green { background-color: var(--color-green); box-shadow: 0 0 6px var(--color-green); }
.freshness-dot.yellow { background-color: var(--color-amber); }
.freshness-dot.red { background-color: var(--color-red); }

.meter-card-addr {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.25;
}

.meter-card-meta {
  font-size: 0.73rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  padding-left: 16px;
}

.meter-card-q {
  font-family: var(--font-mono);
  color: var(--color-amber);
  font-weight: 600;
}

.sidebar-footer {
  padding: 8px 12px;
  border-top: 1px solid var(--border-color);
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.15);
}

.legend-strip {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}
.legend-strip .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 2px;
}
.legend-strip .dot.green { background: var(--color-green); }
.legend-strip .dot.yellow { background: var(--color-amber); }
.legend-strip .dot.red { background: var(--color-red); }

/* MAIN PANEL */
.hud-main {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ==========================================================================
   4. KPI CARDS STRIP
   ========================================================================== */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.kpi-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.kpi-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
}

.kpi-main-val {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1.1;
  margin-bottom: 4px;
}

.kpi-unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.kpi-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-status {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-block;
}
.tag-ok {
  background: rgba(152, 195, 121, 0.2);
  color: var(--color-green);
  border: 1px solid var(--color-green);
}
.tag-warn {
  background: rgba(224, 108, 117, 0.2);
  color: var(--color-red);
  border: 1px solid var(--color-red);
}

/* ==========================================================================
   5. NAVIGATION TABS & PANES
   ========================================================================== */
.hud-tabs-bar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.hud-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all 0.15s;
}
.hud-tab:hover {
  color: var(--text-bright);
}
.hud-tab.active {
  color: var(--color-blue);
  border-bottom-color: var(--color-blue);
}

.tab-pane {
  display: none;
  flex-direction: column;
  flex: 1;
}
.tab-pane.active {
  display: flex;
}

/* PANE TOOLBAR */
.pane-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.82rem;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-info {
  color: var(--text-muted);
  font-weight: 600;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text-bright);
  font-size: 0.8rem;
}

.table-search-input {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  padding: 4px 10px;
  font-size: 0.8rem;
  outline: none;
}
.table-search-input:focus {
  border-color: var(--color-blue);
}

/* ==========================================================================
   6. HUD TABLES
   ========================================================================== */
.table-scroll-container {
  flex: 1;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-y: auto;
  max-height: 520px;
}

.hud-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.hud-table thead {
  position: sticky;
  top: 0;
  background-color: #282c34;
  z-index: 10;
  border-bottom: 2px solid var(--border-color);
}

.hud-table th {
  padding: 8px 10px;
  font-weight: 700;
  color: var(--text-bright);
  cursor: pointer;
  white-space: nowrap;
}
.hud-table th:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.hud-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-mono);
  color: var(--text-main);
  white-space: nowrap;
}

.hud-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.hud-table tbody tr.row-anomaly {
  background-color: rgba(224, 108, 117, 0.12);
}
.hud-table tbody tr.row-anomaly td {
  color: #ff99a0;
}

/* ==========================================================================
   7. CHARTS GRID
   ========================================================================== */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.chart-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

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

.chart-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-period-tag, .chart-legend-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chart-wrapper {
  position: relative;
  height: 380px;
  width: 100%;
}

/* ==========================================================================
   8. NOVACOM SECTION
   ========================================================================== */
.novacom-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}

.kpi-card.mini {
  padding: 8px 10px;
}
.kpi-card.mini .kpi-title {
  font-size: 0.7rem;
}
.kpi-card.mini .kpi-val {
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

/* ==========================================================================
   9. ANOMALIES & AUDIT SECTION
   ========================================================================== */
.anomalies-header-banner {
  background: rgba(152, 195, 121, 0.1);
  border: 1px solid rgba(152, 195, 121, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}
.anomalies-header-banner.has-anomalies {
  background: rgba(224, 108, 117, 0.12);
  border-color: rgba(224, 108, 117, 0.4);
}

.banner-icon {
  font-size: 2rem;
}

.banner-content h3 {
  font-size: 1.05rem;
  color: var(--text-bright);
  margin-bottom: 4px;
}
.banner-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.anomalies-details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.audit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
}
.audit-card h4 {
  font-size: 0.85rem;
  color: var(--text-bright);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.audit-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.incidents-section h4 {
  font-size: 0.9rem;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.incidents-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.incident-row {
  background: rgba(224, 108, 117, 0.1);
  border-left: 4px solid var(--color-red);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: #ffadb3;
  display: flex;
  justify-content: space-between;
}

.empty-incidents {
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   10. MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 520px;
  max-width: 90vw;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  font-size: 1.05rem;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}
.btn-close-modal:hover { color: var(--text-bright); }

.modal-body {
  padding: 18px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-weight: 600;
  color: var(--text-bright);
  font-size: 0.82rem;
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  padding: 8px 10px;
  font-size: 0.85rem;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: rgba(0, 0, 0, 0.15);
}

.setup-steps {
  padding-left: 20px;
  line-height: 1.6;
}

.code-box {
  background: #14161a;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: var(--font-mono);
  color: var(--color-green);
  font-size: 0.95rem;
  margin: 6px 0;
  word-break: break-all;
}

.info-note {
  background: rgba(97, 175, 239, 0.1);
  border-left: 3px solid var(--color-blue);
  padding: 10px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8rem;
  color: var(--color-blue);
}

/* ==========================================================================
   11. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1200px) {
  .kpi-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .hud-workspace {
    flex-direction: column;
    height: auto;
  }
  .hud-sidebar {
    width: 100%;
    max-height: 280px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .hide-mobile {
    display: none;
  }
  .kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .novacom-kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .anomalies-details-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   12. LOGIN OVERLAY & AUTHENTICATION
   ========================================================================== */
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 17, 21, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.login-overlay.active {
  display: flex;
}

.login-card {
  background: #21252b;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 400px;
  max-width: 90vw;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: loginFadeIn 0.25s ease-out;
}

@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-header {
  text-align: center;
}

.login-brand-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--color-blue), var(--color-purple));
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin: 0 auto 12px;
  box-shadow: 0 4px 12px rgba(97, 175, 239, 0.3);
}

.login-header h2 {
  font-size: 1.25rem;
  color: var(--text-bright);
  letter-spacing: 0.5px;
}

.login-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn-block {
  width: 100%;
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.login-error {
  background: rgba(224, 108, 117, 0.15);
  border: 1px solid var(--color-red);
  color: #ff99a0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.login-footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

/* User Profile Badge in Header */
.user-badge-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.user-badge-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-blue);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-logout {
  padding: 3px 8px;
  font-size: 0.75rem;
  border-color: rgba(224, 108, 117, 0.4);
  color: var(--color-red);
}
.btn-logout:hover {
  background: rgba(224, 108, 117, 0.15);
  border-color: var(--color-red);
}

/* Report Preview Paper Styles */
.report-paper-container {
  display: flex;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  min-height: 500px;
  overflow-x: auto;
}

.report-paper-sheet {
  background: #ffffff;
  color: #1e293b;
  width: 100%;
  max-width: 900px;
  padding: 2.2rem 2.5rem;
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.4;
}

.report-doc-header {
  border-bottom: 2px solid #0f172a;
  padding-bottom: 0.8rem;
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.report-doc-title {
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #0f172a;
  letter-spacing: 0.5px;
}

.report-doc-subtitle {
  font-size: 0.85rem;
  color: #475569;
  margin-top: 3px;
  font-weight: 500;
}

.report-doc-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  margin-bottom: 1.2rem;
  font-size: 0.82rem;
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.report-meta-item strong {
  color: #0f172a;
  display: inline-block;
  min-width: 130px;
}

.report-kpi-summary-box {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 1.2rem;
}

.report-kpi-cell {
  background: #f1f5f9;
  padding: 8px 10px;
  border-radius: 6px;
  border-left: 3px solid #2563eb;
  text-align: center;
}

.report-kpi-cell.green { border-left-color: #16a34a; }
.report-kpi-cell.amber { border-left-color: #d97706; }
.report-kpi-cell.purple { border-left-color: #9333ea; }

.report-kpi-label {
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 2px;
}

.report-kpi-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

.report-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  margin-bottom: 1.5rem;
}

.report-preview-table th {
  background: #0f172a;
  color: #ffffff;
  padding: 6px 4px;
  font-weight: 600;
  border: 1px solid #334155;
  text-align: center;
}

.report-preview-table td {
  padding: 5px 4px;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  text-align: right;
}

.report-preview-table td.text-center {
  text-align: center;
}

.report-preview-table tr.total-row {
  background: #e2e8f0;
  font-weight: 800;
  border-top: 2px solid #0f172a;
}

.report-doc-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #334155;
  border-top: 1px dashed #cbd5e1;
  padding-top: 1rem;
}

/* ==========================================================================
   12. INTERACTIVE MAP STYLES
   ========================================================================== */
.map-hud-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
}

.map-hud-wrapper {
  position: relative;
  width: 100%;
  margin-top: 4px;
}

/* Custom Marker Pins on Map (Ring Pin: Inspector Border + Freshness Center) */
.hud-map-pin {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  box-sizing: border-box;
}
.hud-map-pin.ring-pin {
  border-width: 3.5px;
  border-style: solid;
}
.hud-map-pin:hover {
  transform: scale(1.25) translateY(-3px);
  z-index: 9999 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8), 0 0 0 2px #ffffff !important;
}
.hud-map-pin .hud-pin-num {
  position: relative;
  z-index: 3;
  line-height: 1;
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: -0.2px;
}

.hud-map-pin-pulse {
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50%;
  border-width: 2px;
  border-style: solid;
  opacity: 0.75;
  animation: hudPinPulse 2.2s infinite;
  pointer-events: none;
}

/* Legend Inspector Chips */
.legend-insp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.legend-insp-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}
.legend-insp-chip.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.22);
  color: #fff;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
}
.legend-insp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

@keyframes hudPinPulse {
  0% { transform: scale(1); opacity: 0.7; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* User GPS Marker */
.hud-user-gps {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #38bdf8;
  border: 3px solid #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.9);
  animation: hudGpsPulse 1.8s infinite;
}
@keyframes hudGpsPulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
  70% { box-shadow: 0 0 0 16px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

/* Map Popup Dark Theme */
.hud-map-popup .leaflet-popup-content-wrapper {
  background: #1e293b !important;
  color: #fff !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6) !important;
}
.hud-map-popup .leaflet-popup-tip {
  background: #1e293b !important;
}
.hud-map-popup .leaflet-popup-content {
  margin: 10px 12px !important;
}

/* ==========================================================================
   MAIN NAVIGATION DRAWER & MENU BUTTON STYLES
   ========================================================================== */

.nav-left-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Menu Toggle Button in Header */
.btn-menu {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-light);
  color: var(--text-bright);
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-menu:hover {
  background: rgba(97, 175, 239, 0.18);
  border-color: var(--color-blue);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(97, 175, 239, 0.25);
}
.btn-menu:active {
  transform: translateY(0);
}
.btn-menu i {
  font-size: 1.05rem;
  color: var(--color-blue);
}

/* Direct Map Shortcut in Header */
.btn-nav-map {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(56, 189, 248, 0.25));
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.2);
}
.btn-nav-map:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(56, 189, 248, 0.45));
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4);
}
.btn-nav-map i {
  color: #38bdf8;
  font-size: 0.95rem;
}
.badge-mini {
  background: #2563eb;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 99px;
  line-height: 1;
}

/* Backdrop Overlay */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.menu-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Offcanvas Drawer */
.main-menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 360px;
  max-width: 88vw;
  background: #181b21;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 10px 0 35px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.main-menu-drawer.active {
  transform: translateX(0);
}

/* Drawer Header */
.menu-header {
  padding: 16px 18px;
  background: #1e2229;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.menu-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.menu-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}
.menu-brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}
.menu-brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.btn-close-menu {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.18s;
}
.btn-close-menu:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--color-red);
  color: #fff;
  transform: rotate(90deg);
}

/* Scroll Area */
.menu-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.menu-scroll-area::-webkit-scrollbar {
  width: 5px;
}
.menu-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

/* Group */
.menu-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.menu-group-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 10px 4px 10px;
  text-transform: uppercase;
}

/* Menu Items */
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  user-select: none;
}
.menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(3px);
}
.menu-item:active {
  transform: translateX(1px);
}
.menu-item.active {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
  color: #ffffff;
}

/* Special Highlight for Map Item */
.menu-item.highlight-map {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(56, 189, 248, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.12);
}
.menu-item.highlight-map:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.25), rgba(56, 189, 248, 0.3));
  border-color: #38bdf8;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
  transform: translateX(4px);
}

.menu-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  transition: transform 0.18s;
}
.menu-item:hover .menu-item-icon {
  transform: scale(1.08);
}
.map-icon {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}
.hud-icon {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.menu-item-info {
  flex: 1;
  min-width: 0;
}
.menu-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.25;
}
.menu-item:hover .menu-item-title {
  color: #ffffff;
}
.menu-item-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-item-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
  opacity: 0.4;
  transition: all 0.18s;
  flex-shrink: 0;
}
.menu-item:hover .menu-item-arrow {
  opacity: 1;
  transform: translateX(2px);
  color: var(--color-blue);
}

/* Badges */
.menu-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  line-height: 1.2;
}
.badge-blue {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.badge-green {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}
.badge-amber {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

/* Drawer Footer */
.menu-footer {
  padding: 12px 16px;
  background: #14161a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.menu-footer-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--text-heading);
}
.menu-footer-ver {
  font-size: 0.7rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .btn-menu span { display: none; }
  .btn-nav-map span:not(.badge-mini) { display: none; }
  .btn-nav-map { padding: 6px 10px; }
  .main-menu-drawer { width: 310px; }
}

/* ========================================================================== */
/* BATCH PDF REPORTS & VIEWER MODAL STYLES                                   */
/* ========================================================================== */

.modal-card-fullscreen {
  width: 95vw !important;
  max-width: 1400px !important;
  height: 92vh !important;
  max-height: 92vh !important;
}

.modal-body-iframe {
  padding: 0 !important;
  flex: 1 1 auto;
  overflow: hidden;
  height: 100%;
}

.modal-body-iframe iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #525659;
}

.pdf-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-reports-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 15px;
}

.batch-generator-card, .batch-archive-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.batch-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.batch-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 10px;
}

.batch-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.batch-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.batch-action-row {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.batch-status-msg {
  font-size: 0.9rem;
  font-weight: 600;
}

.badge-rose {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

.text-rose {
  color: #fb7185;
}

.btn-export-pdf {
  background: rgba(225, 29, 72, 0.15);
  color: #fb7185;
  border: 1px solid rgba(225, 29, 72, 0.4);
}
.btn-export-pdf:hover {
  background: #e11d48;
  color: #fff;
}

.reports-table-container {
  overflow-x: auto;
  margin-top: 15px;
}

.reports-table-container table {
  width: 100%;
}

/* ==========================================================================
   DOCUMENTS & VERIFICATION CERTIFICATES (СВІДОЦТВА ПРО ПОВІРКУ ТА ДОКУМЕНТИ)
   ========================================================================== */
.docs-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-lg, 16px);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}
.docs-hero-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15), transparent 70%);
  pointer-events: none;
}
.docs-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}
.docs-hero-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.docs-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.docs-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cert-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 12px);
  padding: 20px;
  margin-bottom: 22px;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}
.cert-card.active-cert {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}
.cert-card.archive-cert {
  border-color: rgba(148, 163, 184, 0.2);
  opacity: 0.85;
}
.cert-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cert-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cert-pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 14px;
}
.cert-page-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}
.cert-page-box:hover {
  border-color: var(--color-blue, #3b82f6);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.cert-page-header {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.cert-page-preview-wrapper {
  position: relative;
  background: #0b1120;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  max-height: 440px;
  overflow: hidden;
  cursor: pointer;
}
.cert-page-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.cert-page-preview-wrapper:hover .cert-page-preview-img {
  transform: scale(1.02);
}
.cert-page-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: opacity 0.2s ease;
}
.cert-page-preview-wrapper:hover .cert-page-overlay {
  opacity: 1;
}
.cert-page-actions {
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.8);
  display: flex;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Lightbox / Document Viewer Modal */
.modal-viewer-content {
  max-width: 95vw;
  max-height: 95vh;
  width: 960px;
  display: flex;
  flex-direction: column;
}
.modal-viewer-body {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #06090e;
  overflow: auto;
  min-height: 70vh;
  position: relative;
}
.viewer-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.viewer-image {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s ease;
}

/* ==========================================================================
   OPERATIONAL REMINDERS & CONTROL DASHBOARD
   ========================================================================== */
.btn-reminders-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
}
.btn-reminders-badge:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
}
.badge-alert-dot {
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}
.tab-badge-pill {
  background: #f59e0b;
  color: #111827;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 6px;
}

/* Hero Banner */
.reminders-hero-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.reminders-hero-banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--color-amber);
}
.reminders-hero-banner.status-overdue::before {
  background: #ef4444;
}
.reminders-hero-banner.status-closed::before {
  background: #10b981;
}
.reminders-hero-banner.status-urgent::before {
  background: #f59e0b;
}

.hero-content-left {
  display: flex;
  align-items: center;
  gap: 18px;
}
.hero-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  flex-shrink: 0;
}
.status-overdue .hero-icon-box {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.status-closed .hero-icon-box {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.hero-title-group h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-title-group p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 6px;
}
.hero-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hero-actions-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* Grid for Cards */
.reminders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}
.reminders-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
}
.reminders-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.reminders-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Checklist items */
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  cursor: pointer;
}
.checklist-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-light);
}
.checklist-item.is-done {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.04);
}
.checklist-item.is-done .checklist-title {
  text-decoration: line-through;
  color: var(--text-muted);
}
.checklist-checkbox {
  margin-top: 3px;
  cursor: pointer;
  accent-color: #10b981;
  width: 16px;
  height: 16px;
}
.checklist-body {
  flex: 1;
}
.checklist-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 2px;
}
.checklist-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Tariff Category Cards */
.tariff-tiers-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}
.tariff-tier-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  text-align: center;
}
.tariff-tier-box h5 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.tariff-tier-rate {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-blue);
  font-family: var(--font-mono);
}
.tariff-tier-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Interactive Calculator Box */
.calc-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 15px;
}
.calc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.calc-input {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-heading);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  width: 110px;
}
.calc-result-badge {
  background: rgba(97, 175, 239, 0.15);
  color: var(--color-blue);
  border: 1px solid rgba(97, 175, 239, 0.3);
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

/* Direct Invoice Building Card */
.direct-cards-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.direct-house-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: border-color 0.2s;
}
.direct-house-card:hover {
  border-color: var(--border-light);
}
.direct-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}
.direct-house-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
}
.direct-house-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.direct-amounts-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.85rem;
  flex-wrap: wrap;
}
.direct-pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}
.pipeline-step:hover {
  border-color: var(--border-light);
}
.pipeline-step.is-active {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
  color: #10b981;
}
.pipeline-step-icon {
  font-size: 1rem;
  margin-bottom: 4px;
}
.pipeline-step-label {
  font-size: 0.72rem;
  font-weight: 600;
}
.direct-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  flex-wrap: wrap;
}

/* ==========================================================================
   USERS & PERMISSIONS DEDICATED SECTION
   ========================================================================== */
.users-section-banner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.users-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
}

.users-banner-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.users-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 1px solid rgba(14, 165, 233, 0.3);
  flex-shrink: 0;
}

.users-banner-title h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--text-main);
}

.users-banner-title p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.users-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.user-profile-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.user-profile-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.4);
}

.user-profile-card.card-sasha {
  border-left: 4px solid #f59e0b;
}

.user-profile-card.card-yuriy {
  border-left: 4px solid #10b981;
}

.user-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-card-avatar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.avatar-sasha {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.avatar-yuriy {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.user-card-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-card-login {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: monospace;
}

.user-card-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-sasha {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-yuriy {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.user-card-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.user-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.78rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.meta-val {
  color: var(--text-main);
  font-weight: 500;
}

.user-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.users-notice-banner {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: #e0f2fe;
  line-height: 1.4;
}

.users-notice-banner .notice-icon {
  font-size: 1.25rem;
  color: #38bdf8;
  flex-shrink: 0;
}

/* =============================================================================
   CIPHER & DISTRICT FILTERS & BADGES (PORTAL 2)
   ============================================================================= */

.sidebar-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.filter-suppliers {
  display: flex;
  gap: 4px;
  width: 100%;
}

.filter-suppliers .pill-filter {
  flex: 1;
  text-align: center;
  padding: 4px 6px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.pill-filter.pill-tc.active {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
}

.pill-filter.pill-tm.active {
  background: #d97706;
  border-color: #fbbf24;
  color: #ffffff;
}

.district-select-box {
  width: 100%;
}

.district-filter-select,
.sidebar-filter-select,
#district-filter-select,
#inspector-filter-select {
  width: 100%;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 4px 26px 4px 9px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  letter-spacing: -0.01em;
  color: #f1f5f9;
  background-color: #181c24;
  border: 1px solid #334155;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 11px 11px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.district-filter-select:hover,
.sidebar-filter-select:hover,
#district-filter-select:hover,
#inspector-filter-select:hover {
  border-color: #475569;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.district-filter-select:focus,
.sidebar-filter-select:focus,
#district-filter-select:focus,
#inspector-filter-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.district-filter-select option,
.sidebar-filter-select option,
#district-filter-select option,
#inspector-filter-select option {
  background-color: #1e2430;
  color: #f1f5f9;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 10px;
}

.filter-ciphers-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 2px;
}

.cipher-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s;
}

.cipher-pill:hover {
  color: #fff;
  border-color: #64748b;
  background: rgba(255, 255, 255, 0.1);
}

.cipher-pill.active {
  background: #2563eb;
  color: #fff;
  border-color: #60a5fa;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.4);
}

.cipher-pill.pill-tc.active {
  background: #0284c7;
  border-color: #38bdf8;
}

.cipher-pill.pill-tm.active {
  background: #d97706;
  border-color: #fbbf24;
}

/* Card badges */
.meter-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 16px;
  margin: 1px 0;
}

.badge-cipher {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
}

.badge-cipher-tc {
  background-color: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.badge-cipher-tm {
  background-color: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-district {
  font-size: 0.68rem;
  font-weight: 500;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.badge-area {
  font-size: 0.75rem;
  font-weight: 600;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-entrances {
  font-size: 0.75rem;
  font-weight: 600;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge-contact {
  font-size: 0.75rem;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s;
}
.badge-contact:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #fbbf24;
}

.badge-inspector {
  font-size: 0.75rem;
  font-weight: 600;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.meter-card-extra-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 3px;
}

.tariffs-summary-grid .kpi-card {
  transition: transform 0.2s, border-color 0.2s;
}
.tariffs-summary-grid .kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ==========================================================================
   DAILY ARCHIVE & REPORT VIEW MODES (Спрощено vs Всі дані за добу)
   ========================================================================== */
.daily-mode-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  background: rgba(15, 23, 42, 0.65);
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.segmented-control {
  display: inline-flex;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.view-mode-pill {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.view-mode-pill:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.view-mode-pill.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.col-toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.74rem;
  color: #cbd5e1;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
}

.col-toggle-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.col-toggle-pill input[type="checkbox"] {
  accent-color: #0284c7;
  cursor: pointer;
  margin: 0;
}

#daily-records-table tbody tr {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

#daily-records-table tbody tr:hover {
  background-color: rgba(56, 189, 248, 0.09) !important;
}

.btn-open-day-passport {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 4px;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-open-day-passport:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.passport-section-card {
  transition: border-color 0.2s;
}
.passport-section-card:hover {
  border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Floating Relocation Banner & Marker Pulse */
.hud-relocation-banner {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(15, 23, 42, 0.94);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 10px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 15px rgba(245, 158, 11, 0.3);
  display: flex;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(10px);
  max-width: 90%;
  pointer-events: auto;
}

.relocating-pin {
  animation: bounceRelocate 1.2s infinite ease-in-out;
  filter: drop-shadow(0 0 12px #f59e0b) !important;
  z-index: 10000 !important;
}

.clickable-sync-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.clickable-sync-row:hover {
  background-color: rgba(168, 85, 247, 0.09) !important;
}

.clickable-audit-row {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.clickable-audit-row:hover {
  background-color: rgba(56, 189, 248, 0.08) !important;
}

.sync-modal-subtabs .btn {
  font-size: 0.8rem;
  padding: 5px 12px;
}



