:root {
  --ibo-bg: #0e1014;
  --ibo-bg-soft: #12161d;
  --ibo-surface: rgba(24, 29, 38, 0.94);
  --ibo-surface-2: rgba(31, 37, 48, 0.92);
  --ibo-border: rgba(177, 191, 211, 0.16);
  --ibo-border-strong: rgba(67, 214, 181, 0.34);
  --ibo-text: #eef4f8;
  --ibo-muted: #a9b5c4;
  --ibo-soft: #d8e3ea;
  --ibo-accent: #43d6b5;
  --ibo-accent-2: #78a6ff;
  --ibo-warning: #f1c66d;
  --ibo-danger: #ff6b6b;
  --ibo-success: #55d487;
  --ibo-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
  --ibo-shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.24);
  --ibo-radius: 8px;
}

html {
  background: var(--ibo-bg);
}

body {
  background:
    linear-gradient(140deg, rgba(67, 214, 181, 0.08), transparent 30%),
    linear-gradient(315deg, rgba(241, 198, 109, 0.08), transparent 26%),
    var(--ibo-bg) !important;
  color: var(--ibo-text) !important;
  font-family: "Segoe UI", "Inter", Arial, sans-serif !important;
  letter-spacing: 0;
  min-height: 100vh;
}

a {
  color: inherit;
}

a:hover {
  color: var(--ibo-accent);
  text-decoration: none;
}

#js-particles,
#particles-js,
.particles-js-canvas-el {
  display: none !important;
}

#wrapper {
  min-height: 100vh;
  overflow-x: hidden;
}

#sidebar-wrapper {
  background:
    linear-gradient(180deg, rgba(27, 32, 42, 0.98), rgba(16, 19, 25, 0.98)) !important;
  border-right: 1px solid var(--ibo-border) !important;
  box-shadow: 16px 0 44px rgba(0, 0, 0, 0.28);
  flex: 0 0 17rem;
  min-height: 100vh;
  position: relative;
  z-index: 10;
}

#wrapper.toggled #sidebar-wrapper {
  margin-left: 0;
}

#sidebar-wrapper .list-group {
  padding: 0.35rem 0.65rem 1rem;
  width: 17rem;
}

.sidebar-heading {
  align-items: center;
  border-bottom: 1px solid var(--ibo-border) !important;
  color: var(--ibo-text) !important;
  display: flex;
  font-size: 0.96rem !important;
  font-weight: 800 !important;
  gap: 0.75rem;
  letter-spacing: 0;
  min-height: 74px;
  padding: 1rem 1.05rem !important;
  text-align: left !important;
}

.sidebar-heading::before {
  align-items: center;
  background: linear-gradient(135deg, var(--ibo-accent), var(--ibo-accent-2));
  border-radius: var(--ibo-radius);
  box-shadow: 0 14px 30px rgba(67, 214, 181, 0.18);
  color: #06100d;
  content: "IB";
  display: inline-flex;
  flex: 0 0 38px;
  font-size: 0.82rem;
  font-weight: 900;
  height: 38px;
  justify-content: center;
}

#sidebar-wrapper .list-group-item {
  align-items: center;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: var(--ibo-radius) !important;
  color: var(--ibo-muted) !important;
  display: flex;
  gap: 0.7rem;
  margin: 0.18rem 0;
  min-height: 42px;
  padding: 0.72rem 0.82rem !important;
  position: relative;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

#sidebar-wrapper .list-group-item i:first-child {
  color: rgba(216, 227, 234, 0.72);
  flex: 0 0 18px;
  font-size: 0.98rem;
  text-align: center;
}

#sidebar-wrapper .list-group-item:hover,
#sidebar-wrapper .list-group-item.active {
  background: rgba(67, 214, 181, 0.11) !important;
  border-color: var(--ibo-border-strong) !important;
  box-shadow: inset 3px 0 0 var(--ibo-accent), 0 10px 22px rgba(0, 0, 0, 0.16);
  color: #ffffff !important;
  transform: translateX(2px);
}

#sidebar-wrapper .list-group-item:hover i:first-child,
#sidebar-wrapper .list-group-item.active i:first-child {
  color: var(--ibo-accent);
}

.personalization-toggle .menu-caret {
  float: none !important;
  margin-left: auto;
  margin-top: 0 !important;
}

#sidebar-wrapper .sidebar-submenu {
  border-left: 1px solid rgba(67, 214, 181, 0.18);
  margin: 0.1rem 0 0.35rem 1.12rem;
  padding-left: 0.55rem;
}

#sidebar-wrapper .sidebar-submenu .list-group-item {
  background: rgba(12, 15, 20, 0.32) !important;
  color: rgba(216, 227, 234, 0.75) !important;
  font-size: 0.9rem !important;
  min-height: 38px;
  padding-left: 0.72rem !important;
}

#page-content-wrapper {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 220px),
    transparent !important;
  min-height: 100vh;
  width: 100%;
}

.navbar {
  background: rgba(18, 22, 29, 0.92) !important;
  border-bottom: 1px solid var(--ibo-border) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  min-height: 66px;
  padding: 0.75rem 1.35rem !important;
}

.admin-topbar-title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  margin-left: 0.45rem;
}

.admin-topbar-title span {
  color: var(--ibo-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.admin-topbar-title strong {
  color: var(--ibo-text);
  font-size: 0.98rem;
  font-weight: 800;
}

#page-content-wrapper > .container-fluid {
  max-width: 1360px;
  padding: 1.8rem 2rem 3rem !important;
}

#page-content-wrapper > .container-fluid > br:first-child {
  display: none;
}

.col-md-12 > .card-body,
.col-md-8 > .card-body,
.col-md-7 > .card-body,
.col-lg-6 > .card-body,
.col-xl-4 > .card-body {
  padding-left: 0;
  padding-right: 0;
}

.card {
  background: var(--ibo-surface) !important;
  border: 1px solid var(--ibo-border) !important;
  border-radius: var(--ibo-radius) !important;
  box-shadow: var(--ibo-shadow);
  color: var(--ibo-text) !important;
  overflow: hidden;
}

.card.bg-primary,
.card.text-white,
.card.bg-dark {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018)),
    var(--ibo-surface) !important;
}

.card-header,
.card-header-warning {
  background:
    linear-gradient(90deg, rgba(67, 214, 181, 0.13), rgba(120, 166, 255, 0.08)),
    rgba(14, 17, 22, 0.78) !important;
  border-bottom: 1px solid var(--ibo-border) !important;
  color: var(--ibo-text) !important;
  padding: 1.1rem 1.35rem !important;
  position: relative;
}

.card-header::after {
  background: linear-gradient(90deg, var(--ibo-accent), transparent 46%, rgba(241, 198, 109, 0.72));
  bottom: 0;
  content: "";
  height: 1px;
  left: 0;
  position: absolute;
  right: 0;
}

.card-header center,
.card-body center {
  width: 100%;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-body h2,
.card-body h3 {
  color: var(--ibo-text) !important;
  font-weight: 800 !important;
  letter-spacing: 0;
  margin: 0.25rem 0;
}

.card-header h2 {
  font-size: clamp(1.25rem, 1.2rem + 0.45vw, 1.75rem) !important;
}

.card-body {
  color: var(--ibo-soft);
  padding: 1.35rem !important;
}

.card .alert {
  border-radius: var(--ibo-radius);
  border-width: 1px;
  box-shadow: var(--ibo-shadow-soft);
  margin: 1rem;
}

.table-responsive {
  background: rgba(12, 15, 20, 0.48);
  border: 1px solid var(--ibo-border);
  border-radius: var(--ibo-radius);
  box-shadow: var(--ibo-shadow-soft);
  overflow: auto;
}

.table {
  color: var(--ibo-soft) !important;
  margin-bottom: 0 !important;
}

.table thead {
  background: rgba(255, 255, 255, 0.055) !important;
  color: var(--ibo-text) !important;
}

.table thead th {
  border-bottom: 1px solid var(--ibo-border) !important;
  border-top: 0 !important;
  color: var(--ibo-text) !important;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  padding: 0.95rem 0.85rem !important;
  text-transform: none;
}

.table td,
.table th {
  border-color: rgba(177, 191, 211, 0.1) !important;
  vertical-align: middle !important;
}

.table td {
  color: rgba(238, 244, 248, 0.88);
  padding: 0.86rem 0.85rem !important;
}

.table-striped tbody tr:nth-of-type(odd),
.table-dark.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.028) !important;
}

.table tbody tr {
  transition: background-color 0.16s ease, transform 0.16s ease;
}

.table tbody tr:hover {
  background: rgba(67, 214, 181, 0.085) !important;
}

.table .btn-ok {
  align-items: center;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  margin: 0.1rem;
  padding: 0 !important;
  width: 36px;
}

.form-label,
label {
  color: var(--ibo-soft);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

small,
.text-muted {
  color: var(--ibo-muted) !important;
}

.form-control,
.custom-select,
select.form-control {
  background: rgba(8, 11, 16, 0.72) !important;
  border: 1px solid rgba(177, 191, 211, 0.18) !important;
  border-radius: var(--ibo-radius) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  color: var(--ibo-text) !important;
  min-height: 44px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.form-control::placeholder {
  color: rgba(169, 181, 196, 0.7);
}

.form-control:focus,
.custom-select:focus,
select.form-control:focus {
  background: rgba(13, 17, 23, 0.94) !important;
  border-color: var(--ibo-accent) !important;
  box-shadow: 0 0 0 0.18rem rgba(67, 214, 181, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
  color: #ffffff !important;
}

.form-check {
  color: var(--ibo-soft);
}

.form-check-input {
  accent-color: var(--ibo-accent);
}

#search {
  margin-bottom: 0.95rem;
}

.btn {
  border-radius: var(--ibo-radius) !important;
  border-width: 1px !important;
  font-weight: 800 !important;
  letter-spacing: 0;
  min-height: 38px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.btn:focus,
.btn.focus {
  box-shadow: 0 0 0 0.18rem rgba(67, 214, 181, 0.2) !important;
}

.btn-primary,
.btn-info {
  background: linear-gradient(135deg, var(--ibo-accent), #35aee2) !important;
  border-color: rgba(67, 214, 181, 0.6) !important;
  color: #06100d !important;
}

.btn-primary:hover,
.btn-info:hover {
  background: linear-gradient(135deg, #5be6c8, #65baff) !important;
  color: #04100c !important;
}

.btn-warning {
  background: linear-gradient(135deg, var(--ibo-warning), #ef9e54) !important;
  border-color: rgba(241, 198, 109, 0.72) !important;
  color: #1d1405 !important;
}

.btn-danger {
  background: linear-gradient(135deg, var(--ibo-danger), #dc3f55) !important;
  border-color: rgba(255, 107, 107, 0.58) !important;
  color: #fff !important;
}

.btn-success {
  background: linear-gradient(135deg, var(--ibo-success), #2daf84) !important;
  border-color: rgba(85, 212, 135, 0.58) !important;
  color: #06100d !important;
}

.btn-default,
.btn-secondary {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--ibo-border) !important;
  color: var(--ibo-text) !important;
}

#menu-toggle {
  align-items: center;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 0 !important;
  width: 46px;
}

#menu-toggle img {
  border-radius: 6px;
  height: 26px;
  object-fit: contain;
  width: 26px;
}

#pageMessages {
  max-width: min(760px, calc(100% - 2rem));
  top: 78px !important;
  width: auto !important;
}

.alert {
  border-radius: var(--ibo-radius) !important;
  border-width: 1px !important;
}

.alert-success {
  background: rgba(85, 212, 135, 0.14) !important;
  border-color: rgba(85, 212, 135, 0.34) !important;
  color: #c8f7d7 !important;
}

.alert-info {
  background: rgba(120, 166, 255, 0.12) !important;
  border-color: rgba(120, 166, 255, 0.3) !important;
  color: #d7e5ff !important;
}

.modal-content {
  background: var(--ibo-surface) !important;
  border: 1px solid var(--ibo-border) !important;
  border-radius: var(--ibo-radius) !important;
  box-shadow: var(--ibo-shadow);
  color: var(--ibo-text);
}

.modal-header,
.modal-footer {
  border-color: var(--ibo-border) !important;
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
}

hr {
  border-color: var(--ibo-border) !important;
}

.imagem-alerta {
  border-radius: var(--ibo-radius);
  filter: saturate(0.96) contrast(1.03);
  max-height: 220px;
  object-fit: contain;
}

body.login-modern {
  align-items: center !important;
  background:
    linear-gradient(140deg, rgba(67, 214, 181, 0.16), transparent 32%),
    linear-gradient(320deg, rgba(241, 198, 109, 0.16), transparent 28%),
    linear-gradient(180deg, #171b23, #0e1014 58%, #0a0c10) !important;
  display: flex !important;
  justify-content: center !important;
  min-height: 100vh !important;
  padding: 2rem 1rem 6rem !important;
}

.login-modern .container {
  max-width: 980px;
  position: relative;
  z-index: 1;
}

.login-modern .row {
  justify-content: center;
}

.login-modern .col-lg-4 {
  flex: 0 0 min(430px, 100%);
  max-width: min(430px, 100%);
}

.login-modern .caixa-transparente {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
    rgba(19, 23, 31, 0.92) !important;
  border: 1px solid var(--ibo-border);
  border-radius: var(--ibo-radius) !important;
  box-shadow: var(--ibo-shadow);
  padding: 2rem !important;
  position: relative;
}

.login-modern .caixa-transparente::before {
  background: linear-gradient(90deg, var(--ibo-accent), var(--ibo-warning), var(--ibo-accent-2));
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.login-modern .caixa-transparente img {
  max-height: 128px;
  object-fit: contain;
}

.login-modern .form-control {
  font-size: 1rem !important;
}

.login-modern .btn-block {
  min-height: 48px;
}

.login-modern .floating-btn {
  background: linear-gradient(135deg, #25d366, #16a878) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  bottom: 92px !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28) !important;
}

.login-modern .footer {
  background: rgba(10, 12, 16, 0.86) !important;
  border-top: 1px solid var(--ibo-border);
  box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.24) !important;
  color: var(--ibo-muted) !important;
  padding: 1rem 0 !important;
}

@media (max-width: 767.98px) {
  #sidebar-wrapper {
    flex-basis: 16rem;
    margin-left: -16rem;
  }

  #sidebar-wrapper .list-group {
    width: 16rem;
  }

  #wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
  }

  .navbar {
    padding: 0.7rem 0.9rem !important;
  }

  .admin-topbar-title {
    display: none;
  }

  #page-content-wrapper > .container-fluid {
    padding: 1rem 0.85rem 2rem !important;
  }

  .card-body {
    padding: 1rem !important;
  }

  .table thead th,
  .table td {
    padding: 0.72rem 0.68rem !important;
  }

  .login-modern .caixa-transparente {
    padding: 1.4rem !important;
  }
}

@media (min-width: 768px) {
  #sidebar-wrapper {
    margin-left: 0;
  }

  #wrapper.toggled #sidebar-wrapper {
    margin-left: -17rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
