/* ============================================================================
   SRINFO v2 — casca SaaS (layout v2) + tokens refinados + shim Bootstrap 3
   ============================================================================ */

:root {
  --dv2-navy: #0b1f33;
  --dv2-blue: #0b6fcf;
  --dv2-blue-hover: #0959b8;
  --dv2-purple: #6b5c9e;
  --dv2-orange: #d4883a;
  --dv2-green: #3d9a78;
  --dv2-canvas: #f0f4fa;
  --dv2-surface: #ffffff;
  --dv2-line: #dce3ec;
  --dv2-ink: #172033;
  --dv2-ink-2: #64748b;
  --srinfo-sidebar-width: 256px;
  --srinfo-sidebar-collapsed: 4.25rem;
  --srinfo-header-height: 64px;

  --bs-primary: var(--dv2-blue);
  --bs-primary-rgb: 18, 104, 179;
  --bs-body-font-family: var(--font-family-base);
  --bs-body-color: var(--dv2-ink);
  --bs-body-bg: var(--dv2-canvas);
  --bs-border-color: var(--dv2-line);
  --bs-border-radius: 0.625rem;
  --bs-link-color: var(--dv2-blue);
  --bs-link-hover-color: var(--dv2-blue-hover);
}

html {
  min-height: 100%;
}

html,
body.srinfo-shell {
  background: var(--dv2-canvas);
  color: var(--dv2-ink);
  font-family: var(--font-family-base);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

body.srinfo-shell {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.top-indicator-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 9999;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    var(--color-chart-1) 0%,
    var(--color-chart-2) 20%,
    var(--color-chart-3) 40%,
    var(--color-chart-4) 60%,
    var(--color-chart-5) 80%,
    var(--color-chart-6) 100%
  );
}

body.hmg-environment .top-indicator-bar {
  background: linear-gradient(
    to right,
    rgb(155, 5, 5),
    rgb(238, 17, 5),
    rgb(202, 81, 0),
    rgb(182, 118, 0),
    rgba(210, 200, 91, 0.96)
  );
}

.srinfo-app.wrapper,
.srinfo-app {
  display: flex;
  align-items: flex-start;
  box-sizing: border-box;
  min-height: 100vh;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 20px 16px 16px 16px;
  gap: 16px;
  overflow: visible;
  background: var(--ds-color-neutral-100, var(--dv2-canvas));
}

.srinfo-sidebar,
.main-sidebar {
  position: sticky;
  top: 20px;
  z-index: 1030;
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  width: var(--srinfo-sidebar-width);
  min-height: calc(100vh - 36px);
  height: auto;
  max-height: none;
  background: var(--dv2-surface);
  color: var(--dv2-ink);
  border: 1px solid color-mix(in srgb, var(--dv2-line) 70%, transparent);
  border-radius: 16px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.04),
    0 12px 32px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
  overflow: hidden;
  transition: width 200ms var(--ease-default);
}

.srinfo-brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 1.25rem 2.75rem;
  background: #1268b3;
  color: #fff;
  flex-shrink: 0;
  border-radius: 15px 15px 0 0;
  overflow: hidden;
  box-shadow: inset 0 -1px 0 color-mix(in srgb, #0b4f86 24%, transparent);
}

.srinfo-brand a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin-left: -24px;
  text-decoration: none;
  color: #fff;
}

.srinfo-brand img.srinfo-brand-full {
  height: 2.5rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.srinfo-brand .srinfo-brand-mark {
  display: none;
  height: 1.75rem;
  width: auto;
  max-width: 2.5rem;
  object-fit: contain;
  filter: none;
  opacity: 1;
}

.srinfo-brand-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
}

.srinfo-sidebar-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.srinfo-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.srinfo-sidebar-scroll {
  flex: 1 0 auto;
  min-height: 0;
  overflow: visible;
  padding: 8px;
}

.srinfo-sidebar-support {
  border-top: 1px solid #dce3ec;
  padding: 12px 8px;
  flex-shrink: 0;
}

.srinfo-sidebar-support-label {
  margin: 0 12px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
}

.srinfo-sidebar-support a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(26, 29, 35, 0.75);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.srinfo-sidebar-support a .fa {
  width: 18px;
  color: #718096;
  text-align: center;
}

.srinfo-sidebar-support a .fa-angle-right {
  margin-left: auto;
  color: rgba(113, 128, 150, 0.45);
  font-size: 12px;
  width: auto;
}

.srinfo-sidebar-support a:hover {
  background: #f0f6fc;
  color: var(--dv2-ink);
}

.srinfo-sidebar-support a.is-active {
  background: #1268b3;
  color: #fff;
}

.srinfo-sidebar-support a.is-active .fa {
  color: #fff;
}

.srinfo-sidebar-support .dropdown {
  width: 100%;
}

.srinfo-sidebar-support .dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(26, 29, 35, 0.75);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: 0;
  height: auto;
}

.srinfo-sidebar-support .dropdown-toggle::after {
  display: none;
}

.srinfo-sidebar-support .dropdown-toggle .fa {
  width: 18px;
  color: #718096;
  text-align: center;
}

.srinfo-sidebar-support .dropdown-toggle .fa-angle-right {
  margin-left: auto;
  color: rgba(113, 128, 150, 0.45);
  font-size: 12px;
}

.srinfo-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  min-height: calc(100vh - 36px);
  height: calc(100vh - 36px);
  overflow: hidden;
}

.srinfo-header,
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
  min-height: 0;
  padding: 0 16px 12px 32px;
  background: transparent;
  border-bottom: 0;
  position: relative;
  top: 0;
  z-index: 1080;
  flex-shrink: 0;
  overflow: visible;
}

.srinfo-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #9aa3b2;
  min-width: 0;
}

.srinfo-breadcrumb-section,
.srinfo-breadcrumb-parent {
  color: #9aa3b2;
  font-weight: 400;
  white-space: nowrap;
  text-decoration: none;
}

.srinfo-breadcrumb-parent:hover {
  color: #7b8494;
}

.srinfo-breadcrumb-sep {
  font-size: 9px;
  color: #c5ced8;
}

.srinfo-breadcrumb-current {
  color: #8b95a5;
  font-weight: 500;
  white-space: nowrap;
}

.srinfo-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  margin-left: auto;
  position: relative;
  z-index: 1080;
}

.srinfo-header .dropdown {
  position: relative;
}

.srinfo-user-menu {
  position: relative;
  flex: 0 0 auto;
}

.srinfo-search-wrap {
  position: relative;
}

.srinfo-search-wrap > .fa-search {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dv2-ink-2);
  font-size: 13px;
  pointer-events: none;
}

.srinfo-search {
  width: 16rem;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--dv2-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--ds-color-neutral-100, #f3f5f7) 60%, white);
  font-size: 14px;
  color: var(--dv2-ink);
}

@media (min-width: 1200px) {
  .srinfo-search {
    width: 20rem;
  }
}

.srinfo-search:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 2px color-mix(in srgb, #1268b3 25%, transparent);
}

.srinfo-avatar,
[data-header-avatar] {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: #1268b3;
  background-image: none;
  box-shadow: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.srinfo-profile-btn {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--dv2-ink);
  cursor: pointer;
  font: inherit;
  max-width: none;
  height: auto;
  width: auto;
}

.srinfo-profile-btn:hover,
.srinfo-profile-btn.is-open {
  background: #eef1f4;
}

.srinfo-profile-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  text-align: left;
}

.srinfo-profile-meta strong {
  font-size: 13px;
  font-weight: 600;
}

.srinfo-profile-meta small {
  font-size: 11px;
  color: var(--dv2-ink-2);
}

.srinfo-profile-dot {
  margin: 0 2px;
}

.srinfo-profile-caret {
  font-size: 11px;
  color: var(--dv2-ink-2);
  display: inline-flex !important;
  flex-shrink: 0;
  align-self: center;
}

.srinfo-header-notify {
  position: relative;
}

.srinfo-header-notify > .dropdown-toggle span:not(.live_notify_badge):not(.label),
.srinfo-header-notify > .dropdown-toggle .fa-angle-right {
  display: none !important;
}

.srinfo-header-notify .live_notify_badge,
.srinfo-header-notify .label {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.srinfo-header .dropdown-toggle,
.srinfo-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  width: 36px;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
  color: var(--dv2-ink-2);
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--dv2-line);
}

.srinfo-header .dropdown-toggle:hover,
.srinfo-icon-btn:hover {
  background: #eef1f4;
  color: var(--dv2-ink);
}

.srinfo-icon-btn.is-active {
  background: #e8f1fa;
  color: #1268b3;
  border-color: color-mix(in srgb, #1268b3 28%, var(--dv2-line));
}

.srinfo-header .dropdown-toggle::after {
  display: none;
}

.srinfo-header-notify > .dropdown-toggle {
  position: relative;
}

.srinfo-header .dropdown-menu {
  position: absolute;
  z-index: 1080;
  display: none;
  float: none;
  background: #fff;
  background-color: #fff;
  --bs-dropdown-bg: #fff;
  border: 1px solid #d8dee8;
  border-radius: 12px;
  box-shadow:
    0 12px 32px rgba(15, 23, 42, 0.14),
    0 2px 8px rgba(15, 23, 42, 0.06);
  padding: 8px;
}

.srinfo-header .dropdown-menu.show {
  display: block;
}

.srinfo-header .dropdown-menu li > a,
.srinfo-header .dropdown-item {
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--dv2-ink);
  text-decoration: none;
  display: block;
}

.srinfo-header .dropdown-menu li > a:hover,
.srinfo-header .dropdown-item:hover {
  background: var(--color-hover-bg);
}

.srinfo-user-panel {
  position: fixed;
  z-index: 4000;
  width: 18rem;
  box-sizing: border-box;
  padding: 10px;
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 12px;
  box-shadow:
    0 12px 32px rgba(15, 23, 42, 0.16),
    0 2px 8px rgba(15, 23, 42, 0.08);
}

.srinfo-user-panel[hidden] {
  display: none !important;
}

.srinfo-user-panel-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px 12px;
  color: #152033;
}

.srinfo-user-panel-head small {
  color: #5b6573;
  font-size: 12px;
}

.srinfo-user-panel .srinfo-view-as-form {
  padding: 4px 8px 12px;
}

.srinfo-user-panel-link {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px;
  padding: 8px 10px;
  border-radius: 8px;
  color: #152033;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.srinfo-user-panel-link:hover {
  background: #f4f7fb;
  color: #152033;
}

.srinfo-user-panel-actions {
  display: flex;
  gap: 8px;
  padding: 8px 4px 4px;
}

.srinfo-user-panel-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  color: #152033;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.srinfo-user-panel-btn:hover {
  background: #f4f7fb;
  border-color: #c5ced9;
  color: #152033;
}

.srinfo-view-as-item {
  padding: 4px 6px 10px;
  list-style: none;
}

.srinfo-view-as-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.srinfo-view-as-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.srinfo-view-as-select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 32px 0 12px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23718096' d='M1.2 1.5 6 6.3l4.8-4.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  appearance: none;
  -webkit-appearance: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--dv2-ink);
  line-height: 34px;
}

.srinfo-view-as-select:focus {
  outline: none;
  border-color: #1268b3;
  background-color: #fff;
  box-shadow: 0 0 0 2px color-mix(in srgb, #1268b3 25%, transparent);
}

.content-wrapper {
  flex: 1;
  background: transparent;
  min-height: 0;
  overflow: auto;
}

.content {
  /* Área útil igual à do protótipo: 32px da lateral e do cabeçalho. */
  padding: 26px 16px 32px 32px;
}

.main-footer {
  display: none;
}

body.sidebar-collapse .srinfo-sidebar,
body.sidebar-collapse .main-sidebar {
  width: var(--srinfo-sidebar-collapsed);
}

body.sidebar-collapse .srinfo-brand img.srinfo-brand-full,
body.sidebar-collapse .srinfo-brand-text,
body.sidebar-collapse .sidebar-menu span,
body.sidebar-collapse .sidebar-menu .header,
body.sidebar-collapse .sidebar-menu .fa-angle-left,
body.sidebar-collapse .sidebar-form,
body.sidebar-collapse .srinfo-sidebar-support-label,
body.sidebar-collapse .srinfo-sidebar-support span,
body.sidebar-collapse .srinfo-sidebar-support .fa-angle-right {
  display: none !important;
}

body.sidebar-collapse .srinfo-brand .srinfo-brand-mark {
  display: block;
}

body.sidebar-collapse .srinfo-brand a {
  margin-left: 0;
}

body.sidebar-collapse .srinfo-brand {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px 8px;
  gap: 4px;
}

body.sidebar-collapse .srinfo-brand .srinfo-sidebar-toggle {
  position: static;
}

body.sidebar-collapse .srinfo-sidebar-toggle .fa {
  transform: rotate(180deg);
}

body.sidebar-collapse .sidebar-menu > li > a {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

@media (max-width: 991.98px) {
  .srinfo-sidebar,
  .main-sidebar {
    position: fixed;
    top: 16px;
    bottom: 16px;
    height: auto;
    min-height: 0;
    max-height: calc(100vh - 32px);
    overflow: hidden;
    /* Inclui o recuo à esquerda, para não sobrar uma faixa da barra. */
    transform: translateX(calc(-100% - 24px));
  }

  body.sidebar-open .srinfo-sidebar,
  body.sidebar-open .main-sidebar {
    transform: translateX(0);
    box-shadow: 8px 0 24px rgba(11, 31, 51, 0.12);
  }

  .srinfo-sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
}

/* ---- Sidebar menus (AdminLTE markup) ---- */
.sidebar {
  height: auto;
  overflow: visible;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-menu > li.header {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 16px 12px 6px;
}

.sidebar-menu > li > a,
.treeview-menu > li > a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 2.5rem;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(26, 29, 35, 0.7);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.sidebar-menu > li > a > .fa,
.sidebar-menu > li > a > .fas,
.sidebar-menu > li > a > .far,
.sidebar-menu > li > a > .fab,
.treeview-menu > li > a > .fa {
  width: 18px;
  text-align: center;
  color: #718096;
}

.srinfo-menu-hint {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0;
  color: #94a3b8;
}

.sidebar-menu > li > a:hover,
.treeview-menu > li > a:hover {
  background: #f0f6fc;
  color: var(--dv2-ink);
}

.sidebar-menu > li.active,
.treeview-menu > li.active {
  background: transparent;
}

.sidebar-menu > li.treeview.active > a,
.sidebar-menu > li.treeview.menu-open > a,
.treeview-menu > li.treeview.active > a,
.treeview-menu > li.treeview.menu-open > a {
  background: transparent;
  color: rgba(26, 29, 35, 0.7);
  font-weight: 500;
  border: 0;
  box-shadow: none;
}

.sidebar-menu > li.treeview.active > a > .fa,
.sidebar-menu > li.treeview.menu-open > a > .fa,
.sidebar-menu > li.treeview.active > a > .fas,
.sidebar-menu > li.treeview.menu-open > a > .fas,
.treeview-menu > li.treeview.active > a > .fa,
.treeview-menu > li.treeview.menu-open > a > .fa {
  color: #718096;
}

.sidebar-menu > li.active:not(.treeview) > a,
.treeview-menu > li.active:not(.treeview) > a {
  background: #1268b3;
  color: #fff;
  font-weight: 500;
  border: 0;
  box-shadow: none;
}

.sidebar-menu > li.active:not(.treeview) > a:hover,
.treeview-menu > li.active:not(.treeview) > a:hover {
  background: #0f5c9c;
  color: #fff;
}

.sidebar-menu > li.active:not(.treeview) > a > .fa,
.sidebar-menu > li.active:not(.treeview) > a > .fas,
.treeview-menu > li.active:not(.treeview) > a > .fa {
  color: #fff;
}

.sidebar-menu .fa-angle-left.pull-right,
.sidebar-menu .fa-angle-left.float-end {
  margin-left: auto;
  font-size: 12px;
  color: #94a3b8;
  transform: rotate(180deg);
  transition: transform 150ms ease;
}

.sidebar-menu li.treeview.menu-open > a > .fa-angle-left,
.sidebar-menu li.treeview.active > a > .fa-angle-left {
  transform: rotate(-90deg);
}

.treeview-menu {
  display: none;
  list-style: none;
  padding: 2px 0 8px;
  margin: 0;
  overflow: visible;
}

.treeview.menu-open > .treeview-menu,
.treeview.active > .treeview-menu {
  display: block;
}

.treeview-menu > li > a {
  padding-left: 36px;
  gap: 10px;
}

.sidebar-form {
  padding: 4px;
}

.sidebar-form .select2-container {
  width: 100% !important;
}

/* ---- AdminLTE boxes / chrome ---- */
.box {
  background: var(--dv2-surface);
  border: 1px solid var(--dv2-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px 0;
}

.box-header.with-border {
  border-bottom: 1px solid var(--dv2-line);
  padding-bottom: 12px;
}

.box-title {
  font-size: var(--font-size-h3);
  font-weight: 600;
  line-height: var(--line-height-h3);
  margin: 0;
  flex: 1;
}

.box-body {
  padding: var(--card-padding);
}

.collapsed-box > .box-body,
.collapsed-box > .box-footer { display: none; }

.box-primary { border-top: 3px solid var(--dv2-blue); }
.box-success { border-top: 3px solid var(--color-status-success); }
.box-warning { border-top: 3px solid var(--color-status-warning); }
.box-danger { border-top: 3px solid var(--color-status-danger); }
.box-info { border-top: 3px solid var(--color-status-info); }

.btn-box-tool {
  background: transparent;
  border: 0;
  color: var(--dv2-ink-2);
  padding: 4px 8px;
}

.content-header {
  padding: 0 0 12px;
}

.page-header {
  font-size: var(--font-size-display);
  font-weight: 700;
  letter-spacing: var(--letter-spacing-display);
  margin: 0 0 16px;
  border: 0;
  padding: 0;
}

.callout {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--dv2-line);
  border-left-width: 4px;
  margin-bottom: 16px;
  background: var(--dv2-surface);
}

.callout-info { border-left-color: var(--color-status-info); background: var(--color-status-info-bg); }
.callout-success { border-left-color: var(--color-status-success); background: var(--color-status-success-bg); }
.callout-warning { border-left-color: var(--color-status-warning); background: var(--color-status-warning-bg); }
.callout-danger { border-left-color: var(--color-status-danger); background: var(--color-status-danger-bg); }

.info-box {
  display: flex;
  background: var(--dv2-surface);
  border: 1px solid var(--dv2-line);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
}

.info-box-icon {
  width: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  background: var(--dv2-blue);
}

.info-box-content { padding: 12px 16px; flex: 1; }
.info-box-text { font-size: 12px; color: var(--dv2-ink-2); }
.info-box-number { font-size: 1.5rem; font-weight: 700; }

.nav-tabs-custom {
  background: var(--dv2-surface);
  border: 1px solid var(--dv2-line);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.nav-tabs-custom > .nav-tabs {
  border-bottom: 1px solid var(--dv2-line);
  padding: 8px 8px 0;
}

.nav-tabs-custom > .tab-content {
  padding: 16px;
}

.label,
.badge {
  display: inline-block;
  padding: 0.2em 0.55em;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1.4;
}

.label-default, .bg-gray { background: var(--color-status-neutral-bg); color: var(--color-status-neutral); }
.label-primary, .bg-light-blue { background: var(--color-primary-100); color: var(--color-primary-700); }
.label-success, .bg-green { background: var(--color-status-success-bg); color: var(--color-status-success); }
.label-info, .bg-aqua { background: var(--color-status-info-bg); color: var(--color-status-info); }
.label-warning, .bg-yellow { background: var(--color-status-warning-bg); color: var(--color-status-warning); }
.label-danger, .bg-red { background: var(--color-status-danger-bg); color: var(--color-status-danger); }

.table > :not(caption) > * > * {
  border-color: var(--dv2-line);
}

.table-hover > tbody > tr:hover > * {
  background: var(--color-row-hover-bg);
}

.btn {
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
}

.btn-primary {
  --bs-btn-bg: var(--dv2-blue);
  --bs-btn-border-color: var(--dv2-blue);
  --bs-btn-hover-bg: var(--dv2-blue-hover);
  --bs-btn-hover-border-color: var(--dv2-blue-hover);
}

.btn-flat { box-shadow: none; }
.btn-default {
  --bs-btn-color: var(--dv2-ink);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: var(--dv2-line);
  --bs-btn-hover-color: var(--dv2-ink);
  --bs-btn-hover-bg: #eef1f4;
  --bs-btn-hover-border-color: var(--dv2-line);
  color: var(--dv2-ink);
  background: #fff;
  border: 1px solid var(--dv2-line);
}
.btn-block { display: block; width: 100%; }
.alert-dismissable { padding-right: 3rem; }

.form-control,
.form-select {
  border-color: var(--dv2-line);
  border-radius: var(--radius-md);
  background: var(--color-field-bg);
  min-height: var(--control-height-md);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--dv2-blue);
  box-shadow: 0 0 0 var(--focus-ring-width) var(--focus-ring-color);
}

.modal-content {
  border: 1px solid var(--dv2-line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-funnel);
}

.live_notify_badge {
  position: absolute;
  top: 4px;
  right: 4px;
}

/* ---- Login ---- */
body.srinfo-login {
  min-height: 100vh;
  background: var(--dv2-canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family-base);
}

.srinfo-login-card {
  width: min(100% - 32px, 400px);
  background: var(--dv2-surface);
  border: 1px solid var(--dv2-line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 42px 48px;
  overflow: visible;
}

.srinfo-login-brand {
  text-align: center;
  margin: 0 0 24px;
}

.srinfo-login-brand img {
  display: block;
  width: min(100%, 280px);
  height: auto;
  margin: -28px 0 20px -20px;
}

.srinfo-login-card h1 {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #5c5c5c;
  margin: 0;
}

.srinfo-login-card .login-subtitle {
  color: #4a4a4a;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.35;
  margin: 8px 0 0;
}

/* ---- Home welcome ---- */
.srinfo-welcome {
  background: var(--dv2-surface);
  border: 1px solid var(--dv2-line);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.srinfo-welcome h1 {
  font-size: var(--font-size-display);
  font-weight: 700;
  color: var(--dv2-ink);
}

.srinfo-welcome h3 {
  color: var(--dv2-ink-2);
  font-size: 16px;
  font-weight: 500;
}

/* ============================================================================
   Shim Bootstrap 3 — manter telas existentes usáveis
   ============================================================================ */

.row.no-margin,
.no-margin { margin-left: 0; margin-right: 0; }
.no-padding { padding: 0 !important; }
.no-border { border: 0 !important; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pull-left { float: left !important; }
.pull-right { float: right !important; }
.center-block { display: block; margin-left: auto; margin-right: auto; }
.img-responsive { max-width: 100%; height: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hidden { display: none !important; }
.show { display: block !important; }
.collapse.in,
.collapse.show { display: block; }

.col-xs-1 { flex: 0 0 auto; width: 8.33333333%; }
.col-xs-2 { flex: 0 0 auto; width: 16.66666667%; }
.col-xs-3 { flex: 0 0 auto; width: 25%; }
.col-xs-4 { flex: 0 0 auto; width: 33.33333333%; }
.col-xs-5 { flex: 0 0 auto; width: 41.66666667%; }
.col-xs-6 { flex: 0 0 auto; width: 50%; }
.col-xs-7 { flex: 0 0 auto; width: 58.33333333%; }
.col-xs-8 { flex: 0 0 auto; width: 66.66666667%; }
.col-xs-9 { flex: 0 0 auto; width: 75%; }
.col-xs-10 { flex: 0 0 auto; width: 83.33333333%; }
.col-xs-11 { flex: 0 0 auto; width: 91.66666667%; }
.col-xs-12 { flex: 0 0 auto; width: 100%; }

@media (max-width: 767.98px) {
  .hidden-xs { display: none !important; }
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .hidden-sm { display: none !important; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .hidden-md { display: none !important; }
}
@media (min-width: 1200px) {
  .hidden-lg { display: none !important; }
}

.form-group { margin-bottom: 1rem; }
.help-block { display: block; margin-top: 4px; font-size: 12px; color: var(--dv2-ink-2); }
.control-label { font-weight: 500; margin-bottom: 4px; }
.has-error .form-control,
.has-error .form-select { border-color: var(--color-status-danger); }
.has-error .help-block,
.has-error .control-label { color: var(--color-status-danger); }
.has-success .form-control { border-color: var(--color-status-success); }
.has-feedback { position: relative; }
.form-control-feedback {
  position: absolute;
  top: 8px;
  right: 12px;
  color: var(--dv2-ink-2);
  pointer-events: none;
}

.input-group-addon {
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: var(--color-field-bg);
  border: 1px solid var(--dv2-line);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-sm, .form-control.input-sm { min-height: var(--control-height-sm); font-size: 12px; }
.btn-xs, .btn-group-xs > .btn {
  padding: 0.15rem 0.4rem;
  font-size: 11px;
  border-radius: 6px;
}

.close {
  background: transparent;
  border: 0;
  font-size: 1.4rem;
  line-height: 1;
  opacity: 0.6;
  float: right;
}
.close:hover { opacity: 1; }

.panel {
  background: var(--dv2-surface);
  border: 1px solid var(--dv2-line);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.panel-heading { padding: 12px 16px; border-bottom: 1px solid var(--dv2-line); font-weight: 600; }
.panel-body { padding: 16px; }
.panel-footer { padding: 12px 16px; border-top: 1px solid var(--dv2-line); }
.well {
  background: var(--color-canvas);
  border: 1px solid var(--dv2-line);
  border-radius: var(--radius-md);
  padding: 16px;
}

.nav-tabs > li { margin-bottom: -1px; }
.nav-tabs > li > a {
  display: block;
  padding: 8px 14px;
  color: var(--dv2-ink-2);
  text-decoration: none;
  border-radius: 8px 8px 0 0;
}
.nav-tabs > li.active > a,
.nav-tabs > li > a.active {
  color: var(--color-tab-active-foreground);
  background: var(--color-tab-active-bg);
  font-weight: 600;
  box-shadow: var(--shadow-tab-active);
}

.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  vertical-align: middle;
  border-top: 4px solid;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}

.glyphicon { font-family: "Font Awesome 5 Free"; font-weight: 900; font-style: normal; }
.glyphicon-user:before { content: "\f007"; }
.glyphicon-lock:before { content: "\f023"; }
.glyphicon-ok:before { content: "\f00c"; }
.glyphicon-log-in:before { content: "\f2f6"; }
.glyphicon-remove:before { content: "\f00d"; }

.dropdown-menu > li > a {
  display: block;
  padding: 6px 12px;
  clear: both;
  color: var(--dv2-ink);
  text-decoration: none;
}

.table-bordered { border: 1px solid var(--dv2-line); }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: #fafbfc; }

.progress { height: 12px; background: var(--dv2-line); border-radius: var(--radius-full); }
.progress-bar { background: var(--dv2-blue); }

.select2-container--default .select2-selection--single {
  border-color: var(--dv2-line);
  border-radius: var(--radius-md);
  min-height: var(--control-height-md);
}

.navbar-nav { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.navbar-nav > li { position: relative; }
.navbar-custom-menu { margin-left: auto; }

.user-header { padding: 12px; }
.user-footer { display: flex; justify-content: space-between; gap: 8px; padding: 8px; }

@media print {
  .srinfo-sidebar,
  .main-sidebar,
  .srinfo-header,
  .main-header,
  .main-footer,
  .top-indicator-bar { display: none !important; }
  .content-wrapper { margin: 0; }
}

/* Telas médias: sem o nome do usuário ao lado do avatar, o cabeçalho cabe. */
@media (max-width: 1199.98px) {
  .srinfo-profile-meta {
    display: none !important;
  }
}

/* Cabeçalho nunca mais largo que a área: o breadcrumb encolhe com reticências
   (antes, em ~1024px, ele empurrava os ícones e a página rolava para o lado). */
.srinfo-breadcrumb {
  flex: 1 1 auto;
  overflow: hidden;
}

/* Visão Geral: o breadcrumb leva os filtros de plano/período, que abrem popovers. */
.srinfo-breadcrumb:has(.ov-header-filters) {
  overflow: visible;
}

.srinfo-breadcrumb-section,
.srinfo-breadcrumb-parent,
.srinfo-breadcrumb-current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.srinfo-breadcrumb-sep {
  flex: 0 0 auto;
}

/* Quem encolhe é o lado esquerdo (menu + breadcrumb); os ícones mantêm o tamanho.
   Sem overflow: hidden aqui: a Visão Geral abre popovers (plano, período) nesse lado. */
.srinfo-header > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.srinfo-header-actions {
  flex: 0 0 auto;
}

@media (max-width: 1279.98px) {
  .srinfo-search-wrap input {
    width: 150px !important;
  }
}

@media (max-width: 767.98px) {
  .srinfo-search-wrap {
    display: none !important;
  }
}

/* Trilhas longas do Funil: em telas médias o primeiro nível ("Funil de Vendas") sai. */
@media (max-width: 1279.98px) {
  .sd-crumb-optional { display: none !important; }
}

/* Na trilha, só a página atual encolhe; os níveis acima ficam legíveis. */
.srinfo-breadcrumb > .srinfo-breadcrumb-parent,
.srinfo-breadcrumb > .srinfo-breadcrumb-section {
  flex: 0 0 auto;
}
.srinfo-breadcrumb > .srinfo-breadcrumb-current {
  flex: 0 1 auto;
}
