@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Sora: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;
}

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;
}

