:root {
  --ec-bg: #06080f;
  --ec-bg-soft: #0d1523;
  --ec-surface: rgba(9, 16, 29, 0.86);
  --ec-surface-strong: rgba(14, 23, 39, 0.94);
  --ec-line: rgba(255, 255, 255, 0.1);
  --ec-text: #f3f6fb;
  --ec-text-soft: #9fb0cb;
  --ec-signal: #d83933;
  --ec-signal-strong: #f04d43;
  --ec-signal-soft: rgba(216, 57, 51, 0.18);
  --ec-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

html {
  min-height: 100%;
  background: #05070c;
  overscroll-behavior-y: none;
}

body.ec_admin_page,
body.ec_login_page {
  min-height: 100%;
  position: relative;
  font-family: "Barlow", sans-serif;
  color: var(--ec-text);
  background:
    radial-gradient(circle at top, rgba(58, 100, 255, 0.14), transparent 34%),
    linear-gradient(180deg, #04070d 0%, #09101a 42%, #05070c 100%);
  background-color: #05070c;
  background-repeat: no-repeat;
  background-attachment: fixed;
  isolation: isolate;
}

body.ec_admin_page::before,
body.ec_login_page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at top, rgba(58, 100, 255, 0.14), transparent 34%),
    linear-gradient(180deg, #04070d 0%, #09101a 42%, #05070c 100%);
  background-color: #05070c;
}

body.ec_admin_page a,
body.ec_login_page a {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.ec_global_navbar.navbar {
  margin-bottom: 0;
  border: 0;
  background: rgba(4, 8, 15, 0.84);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

.ec_nav_shell {
  width: min(1180px, calc(100% - 32px));
}

.ec_nav_brand {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ec-text) !important;
}

.ec_nav_links > li > a {
  color: var(--ec-text-soft) !important;
  font-size: 0.92rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ec_nav_links > li > a:hover,
.ec_nav_links > li > a:focus {
  color: var(--ec-text) !important;
  background: transparent !important;
}

.ec_admin_main,
.ec_login_main {
  padding: 104px 0 48px;
}

.ec_admin_shell,
.ec_login_shell {
  width: min(1180px, calc(100% - 32px));
}

.ec_page_intro_panel,
.ec_surface_card,
.well,
.ec_login_card,
.tab-content,
.ec_panel_tabs,
.ec_side_tabs {
  background: var(--ec-surface);
  border: 1px solid var(--ec-line);
  border-radius: 28px;
  box-shadow: var(--ec-shadow);
  backdrop-filter: blur(10px);
}

.ec_page_intro {
  margin-bottom: 32px;
}

.ec_page_intro_panel {
  position: relative;
  overflow: hidden;
  padding: 32px;
}

.ec_page_intro_panel::before,
.well::before,
.ec_login_card::before,
.tab-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 42%);
  pointer-events: none;
}

.ec_kicker {
  display: inline-block;
  margin-bottom: 14px;
  color: #ff7d76;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.ec_page_intro h1,
.ec_login_title,
.ec_tab_title,
.ec_admin_page h2,
.ec_admin_page h3,
.ec_admin_page h4 {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ec-text);
}

.ec_page_intro h1 {
  margin: 0 0 12px;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.ec_page_intro .lead,
.ec_admin_page p,
.ec_login_page p,
.ec_footer_copy,
.ec_footer_note {
  color: var(--ec-text-soft);
}

.ec_intro_actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.ec_metric_row {
  margin-top: 28px;
}

.ec_metric_card {
  height: 100%;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
}

.ec_metric_label {
  display: block;
  margin-bottom: 8px;
  color: #8fb0e6;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.ec_metric_value {
  display: block;
  margin-bottom: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  line-height: 1;
  color: var(--ec-text);
}

.ec_admin_page .btn,
.ec_login_page .btn {
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.ec_admin_page .btn:hover,
.ec_login_page .btn:hover {
  transform: translateY(-1px);
}

.ec_admin_page .btn-primary,
.ec_login_page .btn-primary,
.ec_login_page .btn-default.ec_login_secondary {
  color: #fff;
  background: linear-gradient(135deg, var(--ec-signal-strong) 0%, #9f1f22 100%);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 30px rgba(159, 31, 34, 0.3);
}

.ec_admin_page .btn-default,
.ec_login_page .btn-default {
  color: var(--ec-text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.16);
}

.ec_admin_page .btn-danger {
  background: linear-gradient(135deg, #ff6d66 0%, #d83933 100%);
  border-color: rgba(255, 255, 255, 0.14);
}

.ec_admin_page hr {
  border-color: rgba(255, 255, 255, 0.08);
}

.ec_dashboard_row,
.ec_admin_shell > .row {
  margin-bottom: 28px;
}

.ec_dashboard_layout {
  display: flex;
  flex-wrap: wrap;
}

.ec_dashboard_sidebar,
.ec_dashboard_field {
  display: grid;
  gap: 24px;
}

.ec_dashboard_sidebar {
  position: sticky;
  top: 96px;
}

.ec_operations_grid > [class*="col-"] {
  margin-bottom: 24px;
}

.ec_full_width_card {
  width: 100%;
}

.ec_panel_tabs,
.ec_side_tabs {
  padding: 24px;
}

.ec_admin_page .well {
  position: relative;
  padding: 24px;
  background: var(--ec-surface);
  border: 1px solid var(--ec-line);
}

.ec_admin_page .well h4,
.ec_admin_page .well h3 {
  margin-top: 0;
}

.ec_action_card,
.ec_list_card,
.ec_table_card,
.ec_chart_card,
.ec_note_card {
  margin-bottom: 0;
}

.ec_action_card .btn,
.ec_note_card .btn {
  margin-top: 12px;
}

.ec_list_card .list-group,
.ec_table_card .table {
  margin-bottom: 0;
}

.ec_table_card,
.ec_chart_card {
  overflow: hidden;
}

.ec_section_header {
  margin-bottom: 18px;
}

.ec_section_header h2,
.ec_section_header h3 {
  margin: 0;
}

.ec_section_header_split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.ec_form_inline {
  width: min(320px, 100%);
}

.ec_form_inline label {
  display: block;
  margin-bottom: 8px;
}

.ec_button_row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 0;
}

.ec_forecast_intro,
.ec_forecast_product {
  margin-bottom: 14px;
}

.ec_forecast_controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  margin: 18px 0 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
}

.ec_forecast_controls .ec_form_inline {
  flex: 1 1 320px;
  min-width: 260px;
}

.ec_forecast_action {
  display: flex;
  align-items: flex-end;
}

.ec_forecast_select_wrap label {
  color: #cdd7e7;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.ec_forecast_controls #forecastLoadButton {
  min-height: 46px;
  padding-left: 22px;
  padding-right: 22px;
}

.ec_processing_note {
  margin-top: 12px;
  color: #ffb0ab;
  font-weight: 600;
}

.ec_admin_page .table,
.ec_admin_page table.dataTable {
  color: var(--ec-text);
  background: rgba(7, 12, 23, 0.64);
  border: 1px solid var(--ec-line);
  border-radius: 20px;
  overflow: hidden;
}

.ec_admin_page .table > thead > tr > th,
.ec_admin_page .table > tbody > tr > td,
.ec_admin_page table.dataTable thead th,
.ec_admin_page table.dataTable tbody td {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.ec_admin_page .table > thead > tr > th,
.ec_admin_page table.dataTable thead th {
  background: rgba(216, 57, 51, 0.12);
  color: var(--ec-text);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
}

.ec_admin_page .table > tbody > tr > td,
.ec_admin_page table.dataTable tbody td {
  background: rgba(8, 14, 25, 0.76);
  color: var(--ec-text-soft);
}

.ec_admin_page .table a,
.ec_admin_page table.dataTable a {
  color: #8cb5ff;
}

.ec_admin_page .form-control,
.ec_admin_page input[type="file"],
.ec_login_page .form-control {
  min-height: 46px;
  color: var(--ec-text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: none;
}

.ec_admin_page .form-control:focus,
.ec_login_page .form-control:focus {
  border-color: rgba(216, 57, 51, 0.55);
  box-shadow: 0 0 0 3px rgba(216, 57, 51, 0.14);
}

.ec_admin_page label,
.ec_login_page label {
  margin-bottom: 8px;
  color: var(--ec-text);
  font-weight: 600;
}

.ec_chart_canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
}

.ec_chart_frame {
  position: relative;
  width: 100%;
}

.ec_chart_frame_medium {
  height: 340px;
}

.ec_chart_frame_wide {
  height: 360px;
}

.ec_chart_frame_tall {
  height: 420px;
}

.ec_chart_placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--ec-text-soft);
  text-align: center;
  font-size: 1rem;
  letter-spacing: 0.02em;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
    rgba(7, 12, 23, 0.18);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 18px;
}

#selectedRows.ec_selected_rows {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  min-height: 120px;
  color: var(--ec-text-soft);
  background: rgba(255, 255, 255, 0.04);
}

.ec_admin_page .list-group-item {
  color: var(--ec-text-soft);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.ec_admin_page .nav-tabs,
.ec_admin_page .nav-pills {
  border-bottom: 0;
}

.ec_admin_page .nav-tabs > li > a,
.ec_admin_page .nav-pills > li > a,
.ec_side_tabs a {
  margin-right: 8px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--ec-text-soft);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
}

.ec_admin_page .nav-tabs > li.active > a,
.ec_admin_page .nav-tabs > li.active > a:hover,
.ec_admin_page .nav-tabs > li.active > a:focus,
.ec_admin_page .nav-pills > li.active > a,
.ec_admin_page .nav-pills > li.active > a:hover,
.ec_admin_page .nav-pills > li.active > a:focus {
  color: #fff;
  background: linear-gradient(135deg, var(--ec-signal-strong) 0%, #9f1f22 100%);
  border-color: transparent;
}

.ec_admin_page .tab-content {
  position: relative;
  padding: 24px;
  margin-top: 20px;
}

.ec_admin_page .tab-pane > .row:first-child {
  margin-top: 0;
}

.ec_side_tabs {
  padding: 24px;
}

.ec_side_tabs ul {
  padding-left: 0;
  list-style: none;
}

.ec_side_tabs li + li {
  margin-top: 10px;
}

.ec_side_tabs a {
  display: block;
  text-decoration: none;
}

.ec_admin_page input[type="file"] {
  display: block;
  width: 100%;
  padding: 12px;
}

.ec_login_shell {
  max-width: 520px;
}

.ec_login_card {
  position: relative;
  overflow: hidden;
  padding: 34px;
}

.ec_login_title {
  margin: 0 0 12px;
  font-size: 2.6rem;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.ec_login_actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.ec_login_page .form-group {
  margin-bottom: 18px;
}

.ec_global_footer {
  padding: 20px 0 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ec_footer_shell {
  width: min(1180px, calc(100% - 32px));
}

.ec_footer_brand {
  margin: 0 0 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.16em;
  color: var(--ec-text);
}

.ec_footer_copy,
.ec_footer_note {
  margin: 0;
}

.ec_footer_note {
  text-align: right;
}

div.dataTables_wrapper div.dataTables_filter input,
div.dataTables_wrapper div.dataTables_length select {
  color: var(--ec-text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}

div.dataTables_wrapper div.dataTables_filter label,
div.dataTables_wrapper div.dataTables_length label,
div.dataTables_wrapper div.dataTables_info,
div.dataTables_wrapper div.dataTables_paginate {
  color: var(--ec-text-soft) !important;
}

@media (max-width: 991px) {
  .ec_intro_actions {
    justify-content: flex-start;
  }

  .ec_section_header_split {
    display: block;
  }

  .ec_form_inline {
    margin-top: 16px;
    width: 100%;
  }

  .ec_footer_note {
    margin-top: 12px;
    text-align: left;
  }
}

@media (max-width: 767px) {
  .ec_admin_main,
  .ec_login_main {
    padding-top: 88px;
  }

  .ec_admin_shell,
  .ec_login_shell,
  .ec_nav_shell,
  .ec_footer_shell {
    width: calc(100% - 24px);
  }

  .ec_page_intro_panel,
  .ec_login_card,
  .ec_admin_page .well,
  .ec_admin_page .tab-content,
  .ec_side_tabs {
    padding: 20px;
    border-radius: 22px;
  }
}
