@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700;800&family=Sora:wght@600;700&family=Space+Grotesk:wght@600;700&display=swap");

:root {
  --auth-blue-1: #0f63e9;
  --auth-blue-2: #0a43b6;
  --auth-blue-3: #082e89;
  --auth-text-dark: #253858;
  --auth-text-soft: #96a0b5;
}

body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(140deg, #eaf2ff 0%, #f7f9fc 55%, #eef6ff 100%);
  min-height: 100vh;
}

.layout-root {
  min-height: 100vh;
}

#alertArea {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 2000;
  width: min(460px, calc(100vw - 24px));
  pointer-events: none;
}

#alertArea .alert {
  margin: 0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.25);
  pointer-events: auto;
}

.auth-layout {
  min-height: 100vh;
}

.auth-shell {
  min-height: 100vh;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: #f9fbff;
  display: grid;
  grid-template-columns: minmax(300px, 38%) 1fr;
}

.auth-side {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 2rem;
  background: linear-gradient(160deg, rgba(15, 99, 233, 0.95), rgba(10, 67, 182, 0.95) 50%, rgba(8, 46, 137, 0.94));
}

.auth-side::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.34;
  background-image:
    radial-gradient(circle at 15% 22%, rgba(255, 255, 255, 0.4), transparent 26%),
    radial-gradient(circle at 78% 78%, rgba(255, 255, 255, 0.3), transparent 30%),
    radial-gradient(circle at 65% 32%, rgba(255, 255, 255, 0.22), transparent 25%);
}

.auth-side::after {
  content: "";
  position: absolute;
  inset: auto -60px -120px auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: -1;
}

.auth-side-logo-wrap {
  width: min(100%, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-side-logo {
  width: 100%;
  max-width: 500px;
  height: auto;
  display: block;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 22px 36px rgba(3, 24, 72, 0.24));
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.auth-brand-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  font-size: 1rem;
}

.auth-brand-name {
  font-family: "Sora", sans-serif;
  font-size: 1.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-side-block h2 {
  margin: 0 0 0.55rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.auth-side-block p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.52;
  color: rgba(240, 248, 255, 0.95);
}

.auth-side-btn {
  border: 0;
  border-radius: 10px;
  color: #fff;
  padding: 0.82rem 1rem;
  font-weight: 600;
  background: linear-gradient(90deg, #2c99ff, #19b6ff);
  box-shadow: 0 10px 20px rgba(10, 38, 95, 0.33);
}

.auth-side-foot {
  margin-top: auto;
  font-size: 0.88rem;
  color: rgba(238, 245, 255, 0.88);
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at 74% 36%, #f5f8ff 0%, #f9fbff 32%, #ffffff 82%);
}

.auth-main-inner {
  width: min(440px, 100%);
}

.auth-title {
  font-family: "Sora", sans-serif;
  color: var(--auth-text-dark);
  font-size: 2rem;
  letter-spacing: -0.01em;
}

.auth-subtitle {
  font-size: 0.98rem;
  color: var(--auth-text-soft);
}

.auth-google-panel {
  border: 1px solid #d8e3f6;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.9rem 1rem;
}

.auth-google-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #2e446c;
  margin-bottom: 0.55rem;
}

.auth-google-button-wrap {
  min-height: 42px;
  display: flex;
  align-items: center;
}

.auth-google-hint {
  color: #6a7894;
  font-size: 0.8rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.auth-tabs .nav-link {
  border: 1px solid #d6deef;
  border-radius: 10px;
  color: #45608f;
  background: #fff;
  font-weight: 600;
  padding: 0.56rem 0.75rem;
  transition: all 0.18s ease;
}

.auth-tabs .nav-link.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(90deg, #1068ea, #1a7df4);
  box-shadow: 0 8px 20px rgba(17, 96, 213, 0.3);
}

#authView .form-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: #445775;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap .form-control {
  border: 0;
  height: 3.2rem;
  padding: 0.8rem 2.35rem 0.8rem 0.95rem;
  background: #eef2f9;
  border-radius: 10px;
  color: #2f405f;
}

.auth-input-wrap .form-control:focus {
  box-shadow: 0 0 0 3px rgba(47, 123, 236, 0.2);
  background: #edf3ff;
}

.auth-input-wrap i {
  position: absolute;
  top: 50%;
  right: 0.78rem;
  transform: translateY(-50%);
  color: #10b981;
  font-size: 1rem;
}

.auth-submit-btn {
  border: 0;
  border-radius: 10px;
  padding: 0.82rem 1.1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, #5f8ef6, #467de7);
  box-shadow: 0 10px 22px rgba(65, 106, 193, 0.3);
}

#registerForm .form-control,
#registerForm .form-select {
  border-radius: 10px;
  border-color: #d8e0ef;
}

#registerForm .form-control:focus,
#registerForm .form-select:focus {
  border-color: #7a9de7;
  box-shadow: 0 0 0 3px rgba(58, 117, 231, 0.16);
}

@media (max-width: 991.98px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    min-height: 100vh;
  }

  .auth-side {
    min-height: 320px;
  }

  .auth-side-logo {
    max-width: 360px;
  }

  .auth-main {
    padding: 1.6rem 1rem 1.8rem;
  }

  .auth-side-block h2 {
    font-size: 1.52rem;
  }

  .auth-side-block p {
    font-size: 0.92rem;
  }
}

#appView {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: #edf1f7;
}

.app-shell {
  --app-sidebar-width: 220px;
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  width: var(--app-sidebar-width);
  height: 100vh;
  height: 100dvh;
  box-sizing: border-box;
  border-right: 1px solid #27457e;
  border-radius: 0;
  background: #0d2455;
  box-shadow: none;
  padding: 0.9rem 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  color: #ebf2ff;
}

.app-sidebar-top {
  flex: 1;
  min-height: 0;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  padding: 0.05rem 0.35rem 1rem;
}

.app-brand-logo {
  width: 150px;
  height: auto;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
}

.app-brand-logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.app-brand-title {
  color: #ffffff;
  font-family: "Sora", sans-serif;
  font-size: 1.02rem;
  line-height: 1.1;
}

#mainTabs {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0;
  padding: 0 0.05rem;
}

@media (min-width: 992px) {
  .app-sidebar-top {
    overflow-y: auto;
    padding-bottom: 0.55rem;
  }
}

#mainTabs .nav-item {
  width: 100%;
}

#mainTabs .nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #eef4ff;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.56rem 0.62rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

#mainTabs .nav-link i {
  width: 0.95rem;
  text-align: center;
  color: #b9caea;
  font-size: 0.82rem;
}

#mainTabs .nav-link:hover {
  color: #ffffff;
  background: rgba(86, 119, 177, 0.33);
}

#mainTabs .nav-link.active {
  border-color: transparent;
  color: #ffffff;
  background: #223f76;
  box-shadow: none;
}

#mainTabs .nav-link.active i {
  color: #ffffff;
}

.app-sidebar-footer {
  padding: 0.55rem 0.22rem 0.08rem;
  border-top: 1px solid rgba(167, 190, 234, 0.22);
  background: #0d2455;
  flex-shrink: 0;
}

.sidebar-appearance {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(167, 190, 234, 0.18);
}

.sidebar-appearance-title {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
}

.sidebar-appearance-title i {
  color: #b9caea;
}

.sidebar-theme-switch {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.45rem;
  margin: 0;
  padding-left: 0;
}

.sidebar-theme-switch .form-check-input {
  float: none;
  margin: 0;
  cursor: pointer;
}

.sidebar-theme-switch .form-check-label {
  color: #eaf2ff;
  font-size: 0.79rem;
  cursor: pointer;
}

.sidebar-save-theme-btn {
  width: 100%;
  border: 1px solid rgba(147, 178, 236, 0.42);
  color: #dbe8ff;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.34rem 0.45rem;
}

.sidebar-save-theme-btn:hover,
.sidebar-save-theme-btn:focus {
  color: #ffffff;
  border-color: rgba(205, 222, 255, 0.68);
  background: rgba(255, 255, 255, 0.08);
}

.app-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  justify-content: flex-start;
  width: 100%;
  margin: 0;
  border-radius: 7px;
  border: 0;
  color: #d6e3ff;
  background: transparent;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.4rem 0.5rem;
}

.app-logout-btn:hover,
.app-logout-btn:focus {
  color: #ffffff;
  border-color: transparent;
  background: rgba(71, 104, 164, 0.26);
}

.app-user-card {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  margin-top: 0.42rem;
  padding: 0.62rem 0.15rem 0.2rem;
}

.app-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e6eefc;
  color: #1a315f;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-user-name {
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-user-email {
  color: #a4b9e3;
  font-size: 0.72rem;
  margin-top: 0.08rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-user-role {
  display: none;
}

.app-user-meta {
  min-width: 0;
}

.app-content {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--app-sidebar-width);
  padding: 0.85rem 0.9rem;
  background: #edf1f7;
}

.app-content .card {
  border-radius: 10px;
}

.admin-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.request-actions,
.custom-actions {
  flex-wrap: wrap;
}

.branding-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.85rem;
}

.branding-upload-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 0.7rem;
  align-items: center;
  border: 1px solid #d8e2f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.85rem;
}

.branding-upload-card code {
  display: block;
  margin-top: 0.2rem;
  color: #52637f;
  font-size: 0.75rem;
  word-break: break-all;
}

.branding-upload-card input,
.branding-upload-card button {
  grid-column: 1 / -1;
}

.branding-preview {
  width: 92px;
  height: 68px;
  border-radius: 10px;
  object-fit: contain;
  background:
    linear-gradient(45deg, rgba(148, 163, 184, 0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(148, 163, 184, 0.12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.12) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.12) 75%),
    #0d2455;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  padding: 0.45rem;
}

.branding-preview-tall {
  height: 84px;
}

.branding-preview-icon {
  width: 56px;
  height: 56px;
  justify-self: center;
}

.branding-preview-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

#adminPageInfo,
#crmPageInfo {
  font-size: 0.82rem;
}

@media (max-width: 991.98px) {
  #appView {
    padding: 0;
  }

  .app-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .app-sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-height: auto;
    border-right: 0;
    padding: 0.72rem 0.55rem;
    overflow: visible;
  }

  #mainTabs {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  #mainTabs .nav-item {
    width: auto;
    min-width: max-content;
  }

  #mainTabs .nav-link {
    white-space: nowrap;
  }

  #logoutBtn {
    width: auto !important;
    align-self: flex-start;
  }

  .app-sidebar-footer {
    border-top: 0;
    padding-top: 0.4rem;
    background: transparent;
  }

  .sidebar-appearance {
    width: min(100%, 210px);
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .app-content {
    margin-left: 0;
    padding: 0.75rem;
  }

  .app-content .card-header {
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  #adminPane .card-header,
  #crmPane .card-header,
  #usersPane .card-header {
    align-items: flex-start !important;
  }

  #adminPane .admin-actions {
    width: 100%;
    justify-content: flex-start;
  }

  #adminPane .admin-filters > [class*="col-"],
  #crmPane .crm-filters > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
  }

  #adminPane .admin-filters > .col-12,
  #crmPane .crm-filters > .col-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #requestPane .col-lg-5 .card-body {
    overflow-x: auto;
    justify-content: flex-start !important;
  }

  #adminPageInfo,
  #crmPageInfo {
    width: 100%;
  }
}

@media (max-width: 1199.98px) {
  #adminPane .table-responsive,
  #crmPane .table-responsive,
  #minePane .table-responsive,
  #usersPane .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #adminPane .table-responsive table,
  #crmPane .table-responsive table {
    min-width: 1320px;
  }

  #adminPane .table-responsive th,
  #adminPane .table-responsive td,
  #crmPane .table-responsive th,
  #crmPane .table-responsive td {
    white-space: nowrap;
  }

  #adminPane .table-responsive td:nth-child(4),
  #adminPane .table-responsive td:nth-child(5),
  #crmPane .table-responsive td:nth-child(3),
  #crmPane .table-responsive td:nth-child(12) {
    max-width: 240px;
    white-space: normal;
    word-break: break-word;
  }

  #adminPane .table-responsive td:last-child {
    min-width: 300px;
  }
}

.tab-pane-box {
  min-height: 260px;
}

.dashboard-enterprise {
  border: 1px solid #cfd7e2;
  border-radius: 9px;
  background: linear-gradient(180deg, #f2f4f7 0%, #e9edf2 100%);
  padding: 0.85rem;
}

.dashboard-enterprise-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.dashboard-enterprise-title {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.06rem;
  font-weight: 700;
  color: #21324f;
}

.dashboard-enterprise-subtitle {
  margin-top: 0.28rem;
  color: #566783;
  font-size: 0.82rem;
}

.dashboard-updated {
  font-size: 0.74rem;
  font-weight: 600;
  color: #455a79;
  border: 1px solid #c9d3e0;
  background: #f8fafc;
  border-radius: 999px;
  padding: 0.26rem 0.62rem;
  white-space: nowrap;
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.55rem;
}

.dashboard-kpi-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.62rem 0.72rem;
  min-height: 112px;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.dashboard-kpi-card::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 70%);
}

.dashboard-kpi-label {
  position: relative;
  z-index: 1;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.95;
}

.dashboard-kpi-value {
  position: relative;
  z-index: 1;
  margin-top: 0.28rem;
  font-size: clamp(1.26rem, 2.4vw, 1.95rem);
  line-height: 1;
  font-weight: 700;
  font-family: "Sora", sans-serif;
}

.dashboard-kpi-foot {
  position: relative;
  z-index: 1;
  margin-top: 0.42rem;
  font-size: 0.72rem;
  opacity: 0.92;
}

.dashboard-kpi-card.kpi-total {
  background: linear-gradient(135deg, #378f3d 0%, #2b7431 100%);
}

.dashboard-kpi-card.kpi-approved {
  background: linear-gradient(135deg, #e66131 0%, #cf4f20 100%);
}

.dashboard-kpi-card.kpi-rate {
  background: linear-gradient(135deg, #efc245 0%, #dca42d 100%);
}

.dashboard-kpi-card.kpi-pending {
  background: linear-gradient(135deg, #3f78ba 0%, #2f629d 100%);
}

.dashboard-kpi-card.kpi-rejected {
  background: linear-gradient(135deg, #ca4e45 0%, #ab3b34 100%);
}

.dashboard-kpi-card.kpi-archived {
  background: linear-gradient(135deg, #7f8a98 0%, #67717e 100%);
}

.dashboard-widgets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.dashboard-widget-panel {
  border: 1px solid #cfd7e2;
  background: #fcfdff;
  border-radius: 4px;
  padding: 0.62rem;
}

.dashboard-widget-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: #243857;
  margin-bottom: 0.62rem;
}

.dashboard-widget-title i {
  color: #2f64a6;
}

.dashboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.dashboard-list-item {
  --list-accent: #3a65d1;
  background: #ffffff;
  border: 1px solid #d5ddea;
  border-left: 4px solid var(--list-accent);
  border-radius: 3px;
  padding: 0.44rem 0.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.dashboard-list-main {
  min-width: 0;
  flex: 1;
}

.dashboard-list-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.42rem;
}

.dashboard-list-label {
  font-size: 0.81rem;
  font-weight: 600;
  color: #2a3f63;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-list-value {
  font-size: 0.79rem;
  font-weight: 700;
  color: #1d2f4b;
}

.dashboard-list-track {
  margin-top: 0.26rem;
  height: 0.29rem;
  border-radius: 999px;
  background: #e4e9f3;
  overflow: hidden;
}

.dashboard-list-track-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--list-accent);
}

.dashboard-list-percent {
  font-size: 0.72rem;
  font-weight: 700;
  color: #4a607f;
  min-width: 2.3rem;
  text-align: right;
}

.dashboard-list-item-status.tone-APROVADO {
  --list-accent: #2f8a46;
}

.dashboard-list-item-status.tone-PENDENTE {
  --list-accent: #c58a1a;
}

.dashboard-list-item-status.tone-REPROVADO {
  --list-accent: #c24a44;
}

.dashboard-list-item-status.tone-ARQUIVADO {
  --list-accent: #727d8e;
}

.dashboard-list-item-tipo.tone-ACADEMICO {
  --list-accent: #3367b6;
}

.dashboard-list-item-tipo.tone-SERVIDOR {
  --list-accent: #2d8b9a;
}

.dashboard-courses-table th {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5b6d89;
  background: #f0f4f9;
  border-bottom-color: #d7dfec;
  white-space: nowrap;
}

.dashboard-courses-table td {
  font-size: 0.81rem;
  border-top-color: #e1e7f1;
  background: #ffffff;
}

.dashboard-courses-table tbody tr:nth-child(even) td {
  background: #f9fbfe;
}

.dashboard-course-name {
  color: #1d3556;
  font-weight: 600;
}

.dashboard-course-total {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.38rem;
}

.dashboard-course-track {
  height: 0.24rem;
  border-radius: 999px;
  background: #dde6f4;
  overflow: hidden;
}

.dashboard-course-track-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f63ad 0%, #5f8fd6 100%);
}

.dashboard-enterprise,
.dashboard-kpi-card,
.dashboard-widget-panel {
  animation: dashboardFadeIn 0.3s ease;
}

@keyframes dashboardFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1400px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .dashboard-enterprise-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-updated {
    white-space: normal;
  }

  .dashboard-widgets-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-content {
    padding: 0.55rem;
  }

  #mainTabs .nav-link {
    font-size: 0.86rem;
    padding: 0.48rem 0.56rem;
  }

  .request-actions,
  .custom-actions {
    flex-direction: column;
  }

  .request-actions .btn,
  .custom-actions .btn {
    width: 100%;
  }

  #adminPane .admin-actions .btn {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 160px;
  }

  #minePane .table-responsive table,
  #usersPane .table-responsive table {
    min-width: 760px;
  }

  #adminPane .table-responsive table,
  #crmPane .table-responsive table {
    min-width: 1320px;
  }
}

@media (max-width: 575.98px) {
  .app-brand-title {
    font-size: 0.94rem;
  }

  #adminPane .admin-filters > [class*="col-"],
  #crmPane .crm-filters > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #adminPane .admin-actions .btn {
    flex: 1 1 100%;
    min-width: 0;
  }

  #requestPane .col-lg-5 .card-body {
    padding: 0.8rem 0.6rem;
  }
}
.badge-preview {
  --badge-primary: #1e3a8a;
  --badge-text: #0f172a;
  border: none;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
  color: var(--badge-text);
}

.badge-academico {
  width: 8.55cm;
  height: 5.4cm;
  padding: 0.35cm;
}

.badge-servidor {
  width: 5.4cm;
  height: 8.55cm;
  padding: 0.35cm;
}

.badge-foto {
  background: #e2e8f0;
  border: 1px solid #94a3b8;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-academico .badge-foto {
  position: absolute;
  left: 0.7cm;
  top: 2.5cm;
  width: 2cm;
  height: 2.5cm;
}

.badge-servidor .badge-foto {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 2.8cm;
  width: 2.45cm;
  height: 3.1cm;
}

.badge-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-top {
  display: none;
  position: absolute;
  left: 0.35cm;
  right: 0.35cm;
  top: 0.18cm;
  background: var(--badge-primary);
  color: #ffffff;
  border-radius: 4px;
  text-align: center;
  font-size: 0.18cm;
  font-weight: 800;
  padding: 0.07cm 0.12cm;
  letter-spacing: 0.02cm;
}

.badge-footer {
  display: none;
  position: absolute;
  left: 0.35cm;
  right: 0.35cm;
  bottom: 0.14cm;
  color: var(--badge-text);
  text-align: center;
  font-size: 0.16cm;
  font-weight: 700;
  letter-spacing: 0.01cm;
}

.badge-text,
.badge-sub {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--badge-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-academico .badge-text {
  left: 3.1cm;
  top: 2.7cm;
  width: 4.85cm;
  height: 0.7cm;
  font-size: 0.32cm;
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.05;
  text-align: center;
  padding: 0 0.04cm;
}

.badge-academico .badge-sub {
  left: 3.1cm;
  top: 3.6cm;
  width: 4.85cm;
  height: 0.7cm;
  font-size: 0.36cm;
  white-space: normal;
  text-overflow: clip;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.05;
  text-align: center;
  padding: 0 0.04cm;
}

.badge-meta {
  position: absolute;
  inset: 0;
}

.badge-meta-box {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-transform: uppercase;
  color: var(--badge-text);
  line-height: 1.05;
}

.badge-meta-title {
  font-size: 0.18cm;
  font-weight: 800;
}

.badge-meta-value {
  font-size: 0.26cm;
  font-weight: 700;
}

.badge-academico .badge-meta-matricula {
  left: 3.1cm;
  top: 4.4cm;
  width: 2.44cm;
  height: 0.7cm;
  align-items: flex-start;
  text-align: left;
}

.badge-academico .badge-meta-validade {
  left: 5.65cm;
  top: 4.4cm;
  width: 2.3cm;
  height: 0.7cm;
  align-items: flex-end;
  text-align: right;
}

.badge-servidor .badge-text {
  left: 0.4cm;
  top: 6.7cm;
  width: 4.6cm;
  height: 0.66cm;
  font-size: 0.32cm;
}

.badge-servidor .badge-sub {
  left: 0.4cm;
  top: 7.6cm;
  width: 4.6cm;
  height: 0.66cm;
  font-size: 0.38cm;
}

.badge-servidor .badge-meta {
  display: none;
}

.status-pill {
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}

.status-PENDENTE {
  background: #fef3c7;
  color: #92400e;
}

.status-APROVADO {
  background: #dcfce7;
  color: #166534;
}

.status-REPROVADO {
  background: #fee2e2;
  color: #991b1b;
}

.photo-editor-frame {
  width: 100%;
  max-height: 60vh;
  min-height: 320px;
  background: #0f172a;
  border-radius: 8px;
  overflow: hidden;
}

#photoEditorImage {
  display: block;
  max-width: 100%;
}

/* Camada responsiva global: preserva o desktop e reorganiza telas pequenas. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  overflow-x: hidden;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

.form-control,
.form-select,
.btn,
.card,
.modal-content {
  max-width: 100%;
}

.table-responsive {
  scrollbar-width: thin;
}

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

#adminPane .table-responsive td:last-child .d-flex,
#minePane .table-responsive td:last-child,
#usersPane .table-responsive td:last-child .d-flex {
  flex-wrap: wrap;
}

@media (max-width: 1199.98px) {
  .app-shell {
    --app-sidebar-width: 204px;
  }

  .app-brand-title {
    font-size: 0.95rem;
  }

  #mainTabs .nav-link {
    font-size: 0.88rem;
  }
}

@media (max-width: 991.98px) {
  .auth-main-inner {
    width: min(520px, 100%);
  }

  .app-brand {
    align-items: center;
    padding-bottom: 0.55rem;
  }

  .app-sidebar-footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: space-between;
  }

  .app-user-card {
    min-width: 0;
    margin-top: 0;
    padding-top: 0;
  }

  #requestPane .row.g-4 {
    --bs-gutter-y: 0.9rem;
  }

  #requestPane .col-lg-5 .card-body {
    justify-content: center !important;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .admin-actions .btn {
    flex: 1 1 160px;
  }
}

@media (max-width: 767.98px) {
  #alertArea {
    top: 8px;
    right: 8px;
    left: 8px;
    width: auto;
  }

  .auth-side {
    min-height: 220px;
    padding: 1.2rem;
  }

  .auth-side-logo {
    max-width: 280px;
  }

  .auth-main {
    padding: 1.1rem 0.85rem 1.4rem;
  }

  .auth-title {
    font-size: 1.6rem;
  }

  .app-sidebar {
    border-bottom: 1px solid rgba(167, 190, 234, 0.22);
  }

  .app-sidebar-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .sidebar-appearance {
    width: 100%;
  }

  .app-logout-btn {
    justify-content: center;
    border: 1px solid rgba(167, 190, 234, 0.24);
  }

  .app-user-card {
    justify-content: flex-start;
  }

  .app-content {
    padding: 0.55rem;
  }

  .card-header {
    flex-direction: column;
    align-items: stretch !important;
  }

  .card-header > .btn,
  .card-header > div,
  .card-header .admin-actions {
    width: 100%;
  }

  .admin-actions .btn {
    flex: 1 1 100%;
  }

  #adminPane .admin-filters > [class*="col-"],
  #crmPane .crm-filters > [class*="col-"],
  #customizationForm > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  #adminPane .table-responsive,
  #crmPane .table-responsive,
  #minePane .table-responsive,
  #usersPane .table-responsive,
  .dashboard-widget-panel .table-responsive {
    overflow: visible;
  }

  #adminPane .table-responsive table,
  #crmPane .table-responsive table,
  #minePane .table-responsive table,
  #usersPane .table-responsive table,
  .dashboard-courses-table {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
  }

  #adminPane .table-responsive thead,
  #crmPane .table-responsive thead,
  #minePane .table-responsive thead,
  #usersPane .table-responsive thead,
  .dashboard-courses-table thead {
    display: none;
  }

  #adminPane .table-responsive tbody,
  #crmPane .table-responsive tbody,
  #minePane .table-responsive tbody,
  #usersPane .table-responsive tbody,
  .dashboard-courses-table tbody {
    display: grid;
    gap: 0.65rem;
  }

  #adminPane .table-responsive tr,
  #crmPane .table-responsive tr,
  #minePane .table-responsive tr,
  #usersPane .table-responsive tr,
  .dashboard-courses-table tr {
    display: block;
    width: 100%;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
    overflow: hidden;
  }

  #adminPane .table-responsive td,
  #crmPane .table-responsive td,
  #minePane .table-responsive td,
  #usersPane .table-responsive td,
  .dashboard-courses-table td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    border: 0 !important;
    border-bottom: 1px solid #eef2f7 !important;
    padding: 0.58rem 0.74rem !important;
    white-space: normal !important;
    word-break: break-word;
    text-align: left;
    background: transparent !important;
  }

  #adminPane .table-responsive td:last-child,
  #crmPane .table-responsive td:last-child,
  #minePane .table-responsive td:last-child,
  #usersPane .table-responsive td:last-child,
  .dashboard-courses-table td:last-child {
    border-bottom: 0 !important;
  }

  #adminPane .table-responsive td[data-label]::before,
  #crmPane .table-responsive td[data-label]::before,
  #minePane .table-responsive td[data-label]::before,
  #usersPane .table-responsive td[data-label]::before,
  .dashboard-courses-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.22rem;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.15;
    text-transform: uppercase;
  }

  #adminPane .table-responsive td[colspan],
  #crmPane .table-responsive td[colspan],
  #minePane .table-responsive td[colspan],
  #usersPane .table-responsive td[colspan],
  .dashboard-courses-table td[colspan] {
    text-align: center;
  }

  #adminPane .table-responsive td[colspan]::before,
  #crmPane .table-responsive td[colspan]::before,
  #minePane .table-responsive td[colspan]::before,
  #usersPane .table-responsive td[colspan]::before,
  .dashboard-courses-table td[colspan]::before {
    content: none;
  }

  #adminPane .table-responsive td[data-label="Selecionar"] {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  #adminPane .table-responsive td[data-label="Selecionar"]::before {
    margin-bottom: 0;
  }

  #adminPane .table-responsive td:last-child .d-flex,
  #minePane .table-responsive td:last-child,
  #usersPane .table-responsive td:last-child .d-flex {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem !important;
  }

  #adminPane .table-responsive td:last-child .btn,
  #minePane .table-responsive td:last-child .btn,
  #usersPane .table-responsive td:last-child .btn {
    width: 100%;
  }

  #adminPane .table-responsive td .form-check {
    margin-top: 0.45rem !important;
  }

  #adminPane .table-responsive select,
  #adminPane .table-responsive input,
  #usersPane .table-responsive select,
  #usersPane .table-responsive input {
    width: 100%;
  }

  #adminPane .border-top > div,
  #crmPane .card-body > .d-flex:last-child > div {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  #adminPageSize,
  #crmPageSize {
    flex: 1 1 110px;
  }

  #adminPrevPageBtn,
  #adminNextPageBtn,
  #crmPrevPageBtn,
  #crmNextPageBtn {
    flex: 1 1 120px;
  }

  .dashboard-enterprise {
    padding: 0.62rem;
  }

  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-list-item,
  .dashboard-list-head {
    align-items: flex-start;
  }

  .dashboard-list-head {
    flex-direction: column;
    gap: 0.18rem;
  }

  .dashboard-list-percent {
    min-width: auto;
  }

  .dashboard-course-total {
    grid-template-columns: 1fr;
  }

  .badge-academico,
  .badge-servidor {
    transform: scale(var(--preview-scale, 1));
    transform-origin: center center;
  }
}

@media (max-width: 575.98px) {
  #mainTabs {
    gap: 0.28rem;
  }

  #mainTabs .nav-link {
    font-size: 0.8rem;
    padding: 0.44rem 0.52rem;
  }

  .app-user-avatar {
    width: 28px;
    height: 28px;
  }

  #requestPane .d-flex.align-items-center.gap-2 {
    align-items: flex-start !important;
    flex-wrap: wrap;
  }

  #requestPane .d-flex.align-items-center.gap-2 small {
    flex: 1 1 100%;
  }

  #requestPane .col-lg-5 .card-body {
    overflow-x: auto;
  }

  #adminPane .table-responsive td:last-child .d-flex,
  #minePane .table-responsive td:last-child,
  #usersPane .table-responsive td:last-child .d-flex {
    grid-template-columns: 1fr;
  }

  .photo-editor-frame {
    min-height: 240px;
    max-height: 52vh;
  }
}

body.theme-dark {
  color: #e5edf8;
  background: linear-gradient(140deg, #07111f 0%, #0b1220 55%, #0d1b2e 100%);
}

body.theme-dark .auth-shell,
body.theme-dark .auth-main {
  background: #0b1220;
}

body.theme-dark .auth-title,
body.theme-dark #authView .form-label,
body.theme-dark .card,
body.theme-dark .modal-content {
  color: #e5edf8;
}

body.theme-dark .auth-subtitle,
body.theme-dark .text-muted,
body.theme-dark small,
body.theme-dark .form-text {
  color: #9fb0c8 !important;
}

body.theme-dark .app-content {
  background: #0b1220;
}

body.theme-dark .card,
body.theme-dark .modal-content,
body.theme-dark .dropdown-menu,
body.theme-dark .branding-upload-card {
  background-color: #111827;
  border-color: #263245;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28) !important;
}

body.theme-dark .card-header,
body.theme-dark .card-header.bg-white,
body.theme-dark .modal-header,
body.theme-dark .modal-footer {
  color: #e5edf8;
  background-color: #0f172a !important;
  border-color: #263245;
}

body.theme-dark .table {
  --bs-table-bg: #111827;
  --bs-table-color: #e5edf8;
  --bs-table-border-color: #263245;
  --bs-table-striped-bg: #0f172a;
  --bs-table-striped-color: #e5edf8;
  --bs-table-hover-bg: #172033;
  --bs-table-hover-color: #ffffff;
  color: #e5edf8;
}

body.theme-dark .table-light,
body.theme-dark thead,
body.theme-dark th {
  --bs-table-bg: #0f172a;
  --bs-table-color: #e5edf8;
  color: #e5edf8;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus {
  color: #e5edf8;
  background-color: #0f172a;
  border-color: #334155;
}

body.theme-dark .form-control::placeholder {
  color: #8393aa;
}

body.theme-dark .input-group-text,
body.theme-dark .bg-light {
  color: #dbe7f5 !important;
  background-color: #172033 !important;
  border-color: #334155;
}

body.theme-dark .btn-outline-secondary,
body.theme-dark .btn-outline-dark {
  color: #dbe7f5;
  border-color: #52637f;
}

body.theme-dark .btn-outline-secondary:hover,
body.theme-dark .btn-outline-dark:hover {
  color: #ffffff;
  background: #24324a;
}

body.theme-dark .branding-upload-card code {
  color: #9fb0c8;
}

/* ID & Insights Hub layout adaptation */
:root {
  --hub-bg: #f8faf8;
  --hub-card: #ffffff;
  --hub-ink: #19343a;
  --hub-muted: #718489;
  --hub-border: #dfe9e7;
  --hub-primary: #207c7a;
  --hub-primary-dark: #175e61;
  --hub-gold: #d9a928;
  --hub-success: #2f9e70;
  --hub-sidebar: rgba(255, 255, 255, 0.9);
  --hub-radius: 14px;
}

body { font-family: "Inter", sans-serif; background: var(--hub-bg); color: var(--hub-ink); }
h1, h2, h3, h4, h5, h6, .card-header { font-family: "Space Grotesk", sans-serif; letter-spacing: -0.02em; }

#appView { background: var(--hub-bg); }
.app-shell { --app-sidebar-width: 256px; width: 100%; max-width: none; margin: 0; position: relative; }
.app-sidebar {
  left: 0;
  width: var(--app-sidebar-width);
  padding: 1.5rem 1rem;
  border-right: 1px solid var(--hub-border);
  background: var(--hub-sidebar);
  color: var(--hub-ink);
  backdrop-filter: blur(18px);
}
.app-brand { min-height: 54px; gap: .75rem; padding: 0 .45rem 1.65rem; }
.app-brand-logo { width: 112px; min-width: 112px; }
.app-brand-copy { display: flex; flex-direction: column; line-height: 1.08; }
.app-brand-copy strong { color: var(--hub-ink); font-family: "Space Grotesk", sans-serif; font-size: .92rem; }
.app-brand-copy span { margin-top: .25rem; color: var(--hub-muted); font-size: .58rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
#mainTabs { gap: .3rem; }
#mainTabs .nav-link { position: relative; min-height: 44px; border-radius: 11px; color: var(--hub-muted); padding: .7rem .8rem; font-size: .86rem; }
#mainTabs .nav-link i { color: #769092; font-size: .9rem; }
#mainTabs .nav-link:hover { color: var(--hub-ink); background: #edf4f2; }
#mainTabs .nav-link.active { color: var(--hub-primary); background: rgba(32, 124, 122, .1); font-weight: 700; }
#mainTabs .nav-link.active::before { content:""; position:absolute; left:0; top:10px; bottom:10px; width:3px; border-radius:0 4px 4px 0; background:var(--hub-primary); }
#mainTabs .nav-link.active i { color: var(--hub-primary); }
.app-sidebar-footer { border-top: 1px solid var(--hub-border); background: transparent; }
.sidebar-appearance { border-bottom-color: var(--hub-border); }
.sidebar-appearance-title, .sidebar-theme-switch .form-check-label, .app-user-name { color: var(--hub-ink); }
.sidebar-appearance-title i, .app-user-email { color: var(--hub-muted); }
.sidebar-save-theme-btn { border-color: var(--hub-border); color: var(--hub-primary); background: var(--hub-card); }
.app-logout-btn { color: var(--hub-muted); }
.app-logout-btn:hover { color: var(--hub-ink); background: #edf4f2; }
.app-user-avatar { background: linear-gradient(135deg, var(--hub-primary), #43a7a2); color:#fff; }
.sidebar-appearance { display:flex; align-items:center; gap:.55rem; min-height:42px; margin-bottom:.65rem; padding:0 0 .7rem; }
.theme-toggle-btn { display:grid; width:32px; height:32px; flex:0 0 32px; place-items:center; border:1px solid var(--hub-border); border-radius:50%; background:var(--hub-card); color:var(--hub-gold); font-size:.84rem; transition:transform .18s ease, background .18s ease, color .18s ease; }
.theme-toggle-btn:hover { transform:rotate(-12deg) scale(1.05); background:#edf4f2; color:var(--hub-primary); }
.theme-toggle-btn:disabled { cursor:wait; opacity:.65; }
.theme-toggle-label { color:var(--hub-ink); font-size:.75rem; font-weight:600; }
.theme-dark .theme-toggle-btn { color:#8ed8d1; background:#223c40; }

.app-content { width: calc(100% - var(--app-sidebar-width)); margin-left: var(--app-sidebar-width); padding: 0; background: var(--hub-bg); }
.app-content::before { content:""; position:fixed; inset:0 0 0 var(--app-sidebar-width); pointer-events:none; background:radial-gradient(circle at 82% 12%, rgba(217,169,40,.09), transparent 28%), radial-gradient(circle at 22% 18%, rgba(32,124,122,.08), transparent 34%); }
.app-topbar { position: sticky; top: 0; z-index: 1020; min-height: 92px; display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1.15rem 2.5rem; border-bottom:1px solid var(--hub-border); background:rgba(248,250,248,.82); backdrop-filter:blur(18px); }
.app-topbar-copy h1 { margin:0; color:var(--hub-ink); font-size:clamp(1.45rem,2vw,1.9rem); font-weight:700; }
.app-topbar-copy p { margin:.25rem 0 0; color:var(--hub-muted); font-size:.82rem; }
.app-topbar-status { display:flex; align-items:center; gap:.5rem; border:1px solid var(--hub-border); border-radius:999px; background:var(--hub-card); padding:.48rem .75rem; color:var(--hub-muted); font-size:.72rem; font-weight:600; }
.app-topbar-status span { width:7px; height:7px; border-radius:50%; background:var(--hub-success); box-shadow:0 0 0 4px rgba(47,158,112,.12); }
.app-topbar-actions { display:flex; align-items:center; gap:.55rem; }
.topbar-action { display:inline-flex; align-items:center; gap:.45rem; min-height:42px; border:1px solid var(--hub-border); border-radius:999px; padding:.55rem 1rem; background:var(--hub-card); color:var(--hub-ink); font-size:.8rem; font-weight:600; }
.topbar-action i { font-size:.75rem; }
.topbar-action:hover { border-color:var(--hub-primary); }
.topbar-new { border-color:var(--hub-primary); background:var(--hub-primary); color:#fff; }
.topbar-new:hover { background:var(--hub-primary-dark); color:#fff; }
.topbar-theme-toggle { display:grid; width:42px; height:42px; place-items:center; border:1px solid var(--hub-border); border-radius:50%; background:var(--hub-card); color:var(--hub-ink); }
.topbar-theme-toggle:hover { border-color:var(--hub-primary); color:var(--hub-primary); }
.app-page-body { position:relative; z-index:1; width:100%; padding:1.5rem 1.75rem 2.5rem; }
.app-page-body > .tab-pane-box { width:100%; }
.app-page-body > .tab-pane-box > .row { width:100%; margin-right:0; margin-left:0; }
.app-page-body > .tab-pane-box > .row > [class*="col-"] { padding-right:.65rem; padding-left:.65rem; }

.app-content .card, .modal-content { border:1px solid var(--hub-border)!important; border-radius:10px!important; background:var(--hub-card); box-shadow:0 10px 30px -28px rgba(23,94,97,.45)!important; overflow:hidden; }
.app-content .tab-pane-box > .card { width:100%; }
.app-content .tab-pane-box > .card > .card-header { min-height:64px; }
.app-content .card-header { border-bottom:1px solid var(--hub-border); background:var(--hub-card)!important; color:var(--hub-ink); padding:1rem 1.2rem; }
.app-content .card-body { padding:1.2rem; }
.form-control, .form-select { min-height:42px; border-color:var(--hub-border); border-radius:10px; background:#fff; color:var(--hub-ink); }
.form-control:focus, .form-select:focus { border-color:var(--hub-primary); box-shadow:0 0 0 4px rgba(32,124,122,.12); }
.form-label { color:#445e63; font-size:.8rem; font-weight:600; }
.btn { border-radius:10px; font-weight:600; }
.btn-primary, .btn-success { border-color:var(--hub-primary); background:var(--hub-primary); box-shadow:0 10px 24px -16px var(--hub-primary-dark); }
.btn-primary:hover, .btn-success:hover { border-color:var(--hub-primary-dark); background:var(--hub-primary-dark); }
.btn-outline-primary { border-color:rgba(32,124,122,.35); color:var(--hub-primary); }
.btn-outline-primary:hover { border-color:var(--hub-primary); background:var(--hub-primary); }
.table { --bs-table-striped-bg: rgba(32,124,122,.035); --bs-table-hover-bg: rgba(32,124,122,.055); }
.table thead th { border-bottom-color:var(--hub-border); color:var(--hub-muted); font-size:.7rem; letter-spacing:.06em; text-transform:uppercase; }
.table td { border-color:var(--hub-border); color:#41595d; }
.status-PENDENTE { background:rgba(217,169,40,.15); color:#8a6810; }
.status-APROVADO { background:rgba(47,158,112,.14); color:#267b59; }
.badge-preview { border-color:var(--hub-border); border-radius:16px; box-shadow:0 24px 60px -30px rgba(23,94,97,.55); }

.dashboard-enterprise { padding:1.35rem!important; }
.dashboard-enterprise > .dashboard-enterprise-head { padding-bottom:.25rem; }
.dashboard-enterprise-head { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; }
.dashboard-enterprise-title { margin:0; color:var(--hub-ink); font-size:1.15rem; }
.dashboard-enterprise-subtitle, .dashboard-updated { color:var(--hub-muted)!important; font-size:.77rem; }
.dashboard-kpi-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.dashboard-kpi-card { position:relative; min-height:158px; overflow:hidden; border:1px solid var(--hub-border); border-radius:var(--hub-radius); background:var(--hub-card); padding:1.15rem; transition:transform .18s ease,box-shadow .18s ease; }
.dashboard-kpi-card:hover { transform:translateY(-2px); box-shadow:0 18px 36px -28px rgba(23,94,97,.7); }
.dashboard-kpi-card::after { content:""; position:absolute; right:-22px; bottom:-34px; width:110px; height:110px; border-radius:50%; background:currentColor; opacity:.06; }
.dashboard-kpi-icon { display:grid; width:36px; height:36px; place-items:center; border-radius:10px; background:currentColor; color:inherit; font-size:.9rem; }
.dashboard-kpi-icon i { color:#fff; }
.dashboard-kpi-label { margin-top:1rem; color:var(--hub-muted); font-size:.73rem; font-weight:600; }
.dashboard-kpi-value { margin-top:.2rem; color:var(--hub-ink); font-family:"Space Grotesk",sans-serif; font-size:1.85rem; font-weight:700; line-height:1.1; }
.dashboard-kpi-foot { display:flex; align-items:center; justify-content:space-between; margin-top:.55rem; color:var(--hub-muted); font-size:.68rem; }
.dashboard-kpi-foot i { color:currentColor; font-size:.65rem; }
.kpi-total { color:var(--hub-primary); }
.kpi-approved { color:var(--hub-success); }
.kpi-rate { color:#b78b1c; }
.kpi-pending { color:#c48728; }
.kpi-rejected { color:#ba5b58; }
.kpi-archived { color:#788f91; }
.dashboard-widgets-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.dashboard-widget-panel { border:1px solid var(--hub-border); border-radius:var(--hub-radius); background:var(--hub-card); padding:1.15rem; }
.dashboard-widget-title { color:var(--hub-ink); font-family:"Space Grotesk",sans-serif; font-size:.9rem; font-weight:700; }
.dashboard-widget-title i { color:var(--hub-primary); }
.dashboard-list { display:grid; gap:.75rem; margin-top:1rem; }
.dashboard-list-item { display:flex; align-items:center; gap:.75rem; }
.dashboard-list-main { min-width:0; flex:1; }
.dashboard-list-head { display:flex; justify-content:space-between; gap:.5rem; color:var(--hub-muted); font-size:.74rem; }
.dashboard-list-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dashboard-list-value { color:var(--hub-ink); font-weight:700; }
.dashboard-list-track { height:6px; margin-top:.35rem; overflow:hidden; border-radius:99px; background:#edf2f1; }
.dashboard-list-track-bar { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--hub-primary),#65bbb2); }
.dashboard-list-percent { min-width:40px; color:var(--hub-muted); font-size:.7rem; text-align:right; }
.dashboard-courses-table { margin-top:.75rem; }
.dashboard-courses-table th { background:#f7faf9; }
.dashboard-course-name { color:var(--hub-ink)!important; font-weight:600; }
.dashboard-course-total { display:flex; align-items:center; gap:.6rem; min-width:140px; }
.dashboard-course-track { flex:1; height:5px; overflow:hidden; border-radius:99px; background:#edf2f1; }
.dashboard-course-track-bar { display:block; height:100%; border-radius:inherit; background:var(--hub-primary); }

@media (max-width:1199.98px) { .dashboard-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:767.98px) {
  .dashboard-enterprise-head { align-items:flex-start; flex-direction:column; }
  .dashboard-kpi-grid, .dashboard-widgets-grid { grid-template-columns:1fr; }
  .dashboard-enterprise { padding:1rem!important; }
}

.auth-shell { background:var(--hub-bg); grid-template-columns:minmax(320px,42%) 1fr; }
.auth-side { background:linear-gradient(145deg,#175e61,#207c7a 58%,#276d70); }
.auth-side::before { background-image:radial-gradient(circle at 20% 20%,rgba(255,255,255,.16),transparent 34%),radial-gradient(circle at 82% 75%,rgba(217,169,40,.22),transparent 34%); }
.auth-main { background:radial-gradient(circle at 70% 25%,rgba(217,169,40,.08),transparent 30%),var(--hub-bg); }
.auth-title { color:var(--hub-ink); font-family:"Space Grotesk",sans-serif; }
.auth-input-wrap .form-control { border:1px solid var(--hub-border); background:#fff; }
.auth-submit-btn { background:var(--hub-primary); box-shadow:0 16px 34px -20px var(--hub-primary-dark); }

body.theme-dark { --hub-bg:#142326; --hub-card:#1c3033; --hub-ink:#edf7f5; --hub-muted:#9cb2b2; --hub-border:#2e494c; --hub-primary:#73c8c2; --hub-primary-dark:#4aa49f; --hub-sidebar:rgba(22,39,42,.94); }
body.theme-dark #appView, body.theme-dark .app-content { background:var(--hub-bg); }
body.theme-dark .app-topbar { background:rgba(20,35,38,.86); }
body.theme-dark .form-control, body.theme-dark .form-select { background:#17292c; border-color:var(--hub-border); color:var(--hub-ink); }
body.theme-dark .app-content .card-header { color:var(--hub-ink)!important; }
body.theme-dark .table td { color:#c7d7d6; }

@media (max-width:991.98px) {
  .app-shell { --app-sidebar-width:0px; }
  .app-sidebar { left:0; width:100%; height:auto; min-height:unset; padding:.55rem .75rem; background:rgba(255,255,255,.94); }
  .app-brand, .app-sidebar-footer { display:none; }
  .app-sidebar-top { width:100%; overflow-x:auto; }
  #mainTabs { flex-direction:row; width:max-content; }
  #mainTabs .nav-item { width:auto; }
  #mainTabs .nav-link { white-space:nowrap; min-height:40px; }
  #mainTabs .nav-link.active::before { left:10px; right:10px; top:auto; bottom:0; width:auto; height:2px; }
  .app-content { width:100%; margin-left:0; padding-top:57px; }
  .app-topbar { min-height:80px; padding:1rem 1.1rem; }
  .app-page-body { padding:1.15rem; }
  .app-topbar-status { display:none; }
  .topbar-action { padding:.55rem .7rem; }
  .topbar-action:not(.topbar-new) { font-size:0; width:42px; justify-content:center; }
}

@media (min-width:992px) {
  #requestPane > .row { align-items:stretch; }
  #requestPane > .row > .col-lg-7 { flex:0 0 62%; max-width:62%; }
  #requestPane > .row > .col-lg-5 { flex:0 0 38%; max-width:38%; }
}

body.theme-dark .dashboard-enterprise {
  color: #e5edf8;
  background:
    radial-gradient(circle at 12% 0%, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(180deg, #111827 0%, #0f172a 100%) !important;
  border-color: #263245 !important;
}

body.theme-dark .dashboard-enterprise-title,
body.theme-dark .dashboard-widget-title,
body.theme-dark .dashboard-list-label,
body.theme-dark .dashboard-list-value,
body.theme-dark .dashboard-course-name {
  color: #f8fafc;
}

body.theme-dark .dashboard-enterprise-subtitle,
body.theme-dark .dashboard-list-percent {
  color: #aebdda;
}

body.theme-dark .dashboard-updated {
  color: #c8d7ef !important;
  background: #172033 !important;
  border-color: #334155 !important;
}

body.theme-dark .dashboard-widget-panel {
  color: #e5edf8;
  background: #0f172a !important;
  border-color: #263245 !important;
}

body.theme-dark .dashboard-widget-title i {
  color: #7fb0ff;
}

body.theme-dark .dashboard-list-item {
  background: #111827 !important;
  border-color: #263245 !important;
  border-left-color: var(--list-accent);
}

body.theme-dark .dashboard-list-track,
body.theme-dark .dashboard-course-track {
  background: #243047;
}

body.theme-dark .dashboard-courses-table th {
  color: #b7c6df !important;
  background: #111827 !important;
  border-bottom-color: #334155 !important;
}

body.theme-dark .dashboard-courses-table td,
body.theme-dark .dashboard-courses-table tbody tr:nth-child(even) td {
  color: #e5edf8 !important;
  background: #0f172a !important;
  border-top-color: #263245 !important;
}

body.theme-dark .dashboard-courses-table tbody tr:hover td {
  background: #172033 !important;
}

body.theme-dark .alert {
  color: #172033;
}

/* Reference dashboard palette: midnight navy with blue, gold and green accents. */
body.theme-dark {
  --hub-bg:#080d1b;
  --hub-card:#0b1527;
  --hub-ink:#f1f3f4;
  --hub-muted:#96a3b7;
  --hub-border:#1b2a43;
  --hub-primary:#6b92f2;
  --hub-primary-dark:#4f76d8;
  --hub-gold:#f1b737;
  --hub-success:#19b77a;
  --hub-sidebar:rgba(8,18,37,.97);
}
body.theme-dark #appView, body.theme-dark .app-content { background:var(--hub-bg); }
body.theme-dark .app-sidebar { background:var(--hub-sidebar); border-right-color:var(--hub-border); }
body.theme-dark .app-topbar { background:rgba(8,13,27,.9); border-bottom-color:var(--hub-border); }
body.theme-dark .app-brand-copy strong, body.theme-dark .theme-toggle-label, body.theme-dark .app-user-name { color:var(--hub-ink); }
body.theme-dark #mainTabs .nav-link { color:#9aa8b9; }
body.theme-dark #mainTabs .nav-link i { color:#7588a0; }
body.theme-dark #mainTabs .nav-link:hover { color:#e4ebf4; background:#111f36; }
body.theme-dark #mainTabs .nav-link.active { color:var(--hub-primary); background:#142443; }
body.theme-dark #mainTabs .nav-link.active i { color:var(--hub-primary); }
body.theme-dark .app-content::before { background:radial-gradient(circle at 80% 10%,rgba(107,146,242,.11),transparent 30%),radial-gradient(circle at 25% 20%,rgba(25,183,122,.06),transparent 34%); }
body.theme-dark .app-content .card, body.theme-dark .modal-content { background:var(--hub-card); border-color:var(--hub-border)!important; }
body.theme-dark .app-content .card-header { background:var(--hub-card)!important; color:var(--hub-ink)!important; border-bottom-color:var(--hub-border); }
body.theme-dark .form-control, body.theme-dark .form-select { background:#101d31; border-color:var(--hub-border); color:var(--hub-ink); }
body.theme-dark .dashboard-enterprise { background:transparent!important; border:0!important; }
body.theme-dark .dashboard-enterprise-title, body.theme-dark .dashboard-widget-title, body.theme-dark .dashboard-list-label, body.theme-dark .dashboard-list-value, body.theme-dark .dashboard-course-name { color:var(--hub-ink)!important; }
body.theme-dark .dashboard-enterprise-subtitle, body.theme-dark .dashboard-list-percent, body.theme-dark .dashboard-kpi-label, body.theme-dark .dashboard-kpi-foot { color:var(--hub-muted)!important; }
body.theme-dark .dashboard-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
body.theme-dark .dashboard-kpi-card:nth-child(5), body.theme-dark .dashboard-kpi-card:nth-child(6) { display:none; }
body.theme-dark .dashboard-kpi-card, body.theme-dark .dashboard-widget-panel { background:#0b1527!important; border-color:#1c2c48!important; }
body.theme-dark .dashboard-kpi-card::after { opacity:.12; }
body.theme-dark .kpi-total { color:#6b92f2; }
body.theme-dark .kpi-approved { color:#f1b737; }
body.theme-dark .kpi-rate { color:#1bc48a; }
body.theme-dark .kpi-pending { color:#f2a33b; }
body.theme-dark .kpi-rejected { color:#e8756c; }
body.theme-dark .kpi-archived { color:#7d91a8; }
body.theme-dark .dashboard-widgets-grid { grid-template-columns:minmax(0,2fr) minmax(260px,1fr); }
body.theme-dark .dashboard-list-track, body.theme-dark .dashboard-course-track { background:#15233a; }
body.theme-dark .dashboard-courses-table th { background:#101d31!important; }
body.theme-dark .dashboard-courses-table td { background:#0b1527!important; color:#cbd6e8!important; border-color:var(--hub-border)!important; }

@media (max-width:767.98px) {
  body.theme-dark .dashboard-kpi-grid, body.theme-dark .dashboard-widgets-grid { grid-template-columns:1fr; }
}

/* Light mode palette: clean institutional blue. */
body:not(.theme-dark) {
  --hub-bg:#f6f8fc;
  --hub-card:#ffffff;
  --hub-ink:#17253d;
  --hub-muted:#71809b;
  --hub-border:#dce5f2;
  --hub-primary:#4778e6;
  --hub-primary-dark:#315fc8;
  --hub-gold:#d9a72d;
  --hub-success:#2f9e70;
  --hub-sidebar:rgba(255,255,255,.94);
}
body:not(.theme-dark) #appView, body:not(.theme-dark) .app-content { background:var(--hub-bg); }
body:not(.theme-dark) .app-sidebar { background:var(--hub-sidebar); border-right-color:var(--hub-border); }
body:not(.theme-dark) .app-topbar { background:rgba(246,248,252,.9); border-bottom-color:var(--hub-border); }
body:not(.theme-dark) #mainTabs .nav-link.active { color:var(--hub-primary); background:#edf3ff; }
body:not(.theme-dark) #mainTabs .nav-link.active i { color:var(--hub-primary); }
body:not(.theme-dark) .app-content::before { background:radial-gradient(circle at 80% 10%,rgba(71,120,230,.1),transparent 30%),radial-gradient(circle at 25% 20%,rgba(72,150,220,.06),transparent 34%); }
body:not(.theme-dark) .auth-side { background:linear-gradient(145deg,#315fc8,#4778e6 58%,#5b8aeb); }
body:not(.theme-dark) .auth-main { background:radial-gradient(circle at 70% 25%,rgba(71,120,230,.08),transparent 30%),var(--hub-bg); }
body:not(.theme-dark) .btn-primary, body:not(.theme-dark) .btn-success, body:not(.theme-dark) .topbar-new { border-color:var(--hub-primary); background:var(--hub-primary); }
body:not(.theme-dark) .btn-primary:hover, body:not(.theme-dark) .btn-success:hover, body:not(.theme-dark) .topbar-new:hover { border-color:var(--hub-primary-dark); background:var(--hub-primary-dark); }
body:not(.theme-dark) .dashboard-list-track-bar { background:linear-gradient(90deg,var(--hub-primary),#80a5f1); }
body:not(.theme-dark) .dashboard-widget-title i { color:var(--hub-primary); }
body:not(.theme-dark) .kpi-total { color:#4778e6; }
body:not(.theme-dark) .kpi-approved { color:#d9a72d; }
body:not(.theme-dark) .kpi-rate { color:#2f9e70; }
body:not(.theme-dark) .kpi-pending { color:#c88b2c; }
body:not(.theme-dark) .dashboard-course-track-bar { background:var(--hub-primary); }

