:root {
  --bg-main: #e8eef7;
  --bg-soft: #dde7f3;
  --surface: #f5f9fe;
  --surface-2: #ecf3fb;
  --surface-elevated: rgba(247, 251, 255, 0.92);
  --text: #12233f;
  --muted: #60708a;
  --border: #cad7e8;
  --brand-900: #0f2e60;
  --brand-800: #15407c;
  --brand-700: #1b58a1;
  --brand-600: #246dc2;
  --brand-500: #3087de;
  --brand-200: #c4daf4;
  --success: #169c4d;
  --warning: #f1a81e;
  --danger: #dd3846;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 14px 32px rgba(16, 38, 73, 0.08);
  --shadow-hard: 0 22px 50px rgba(7, 20, 42, 0.28);
  --page-glow-a: rgba(45, 126, 210, 0.12);
  --page-glow-b: rgba(26, 76, 144, 0.1);
  --page-gradient: linear-gradient(165deg, var(--bg-main), var(--bg-soft));
  --topbar-kicker-color: #6883a6;
  --topbar-title-color: #0f2240;
  --footer-color: #5f7697;
  --theme-toggle-text: #234874;
  --theme-toggle-border: #c6d8ef;
  --theme-toggle-bg: linear-gradient(140deg, #f8fbff, #edf4fe);
  --theme-toggle-shadow: 0 8px 20px rgba(26, 57, 99, 0.1);
  --theme-toggle-dot: linear-gradient(140deg, #3c8de8, #1d5eb8);
  --theme-toggle-dot-shift: 0;
}

:root[data-theme="dark"] {
  --bg-main: #071327;
  --bg-soft: #0b1e38;
  --surface: #0f2342;
  --surface-2: #132948;
  --surface-elevated: rgba(16, 35, 64, 0.9);
  --text: #e7f1ff;
  --muted: #a7bfde;
  --border: #29476d;
  --page-glow-a: rgba(41, 138, 236, 0.2);
  --page-glow-b: rgba(22, 84, 165, 0.18);
  --page-gradient: linear-gradient(160deg, #061224, #0a1e39 55%, #091932);
  --topbar-kicker-color: #95b2d8;
  --topbar-title-color: #f2f7ff;
  --footer-color: #9cb7d9;
  --theme-toggle-text: #dce9fb;
  --theme-toggle-border: #355783;
  --theme-toggle-bg: linear-gradient(145deg, rgba(21, 46, 83, 0.95), rgba(14, 33, 63, 0.95));
  --theme-toggle-shadow: 0 12px 24px rgba(2, 10, 24, 0.35);
  --theme-toggle-dot: linear-gradient(145deg, #89c4ff, #4a8ee8);
  --theme-toggle-dot-shift: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 100% 0%, var(--page-glow-a), transparent 38%),
    radial-gradient(circle at 0% 100%, var(--page-glow-b), transparent 42%),
    var(--page-gradient);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Layout base */
.app-shell {
  display: grid;
  grid-template-columns: 278px minmax(0, 1fr);
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  overscroll-behavior: none;
}

.sidebar {
  position: sticky;
  z-index: 40;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 22px 16px 18px;
  background:
    radial-gradient(circle at 90% 8%, rgba(57, 161, 255, 0.15), transparent 34%),
    linear-gradient(188deg, #0b2958 0%, #102f5e 56%, #0d2448 100%);
  color: #e4edfb;
  border-right: 1px solid rgba(175, 208, 255, 0.2);
}

.sidebar-mobile-head {
  display: none;
}

.sidebar-overlay {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 70;
  border: 0;
  padding: 0;
  margin: 0;
  appearance: none;
  background: rgba(4, 12, 28, 0.56);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.sidebar-overlay[hidden] {
  display: none;
}

.mobile-nav-toggle,
.sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--brand-800);
  box-shadow: 0 10px 24px rgba(14, 33, 63, 0.12);
  cursor: pointer;
}

.mobile-nav-toggle svg,
.sidebar-close svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-brand {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(183, 210, 248, 0.2);
}

.brand-symbol {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(173, 207, 252, 0.46);
  background: linear-gradient(135deg, rgba(62, 152, 242, 0.34), rgba(26, 95, 180, 0.2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
}

.brand-symbol::before,
.brand-symbol::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 47%;
  top: 50%;
  background: linear-gradient(180deg, #ff5a6b, #ff8e59);
  transform: translate(-50%, -50%) rotate(25deg);
  border-radius: 2px;
}

.brand-symbol::before {
  left: calc(50% - 4px);
}

.brand-symbol::after {
  left: calc(50% + 4px);
}

.sidebar h2 {
  margin: 0 0 2px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.06rem;
  letter-spacing: 0.02em;
  color: #f6f9ff;
}

.sidebar p {
  margin: 0;
  color: #bad0f0;
  font-size: 0.76rem;
}

.nav-label {
  margin: 16px 10px 8px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9cbbdf;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #dce9fb;
  transition: all 0.2s ease;
}

.nav-link-button {
  width: 100%;
  box-shadow: none;
  text-align: left;
}

.nav-link-button,
.nav-link-button:hover,
.nav-link-button:focus {
  background: transparent;
  filter: none;
}

.nav-link-button:hover,
.nav-link-button:focus {
  transform: none;
  box-shadow: none;
}

.nav-link:hover {
  border-color: rgba(168, 204, 253, 0.34);
  background: linear-gradient(135deg, rgba(70, 135, 218, 0.2), rgba(40, 96, 172, 0.12));
}

.nav-link.active {
  border-color: rgba(170, 207, 255, 0.44);
  background: linear-gradient(135deg, rgba(88, 157, 245, 0.34), rgba(44, 108, 188, 0.2));
  color: #ffffff;
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.nav-link.disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: default;
}

.nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(166, 203, 252, 0.34);
  background: rgba(13, 49, 96, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  flex: 0 0 30px;
}

.nav-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-link.active .nav-icon,
.nav-link:hover .nav-icon {
  background: rgba(75, 149, 237, 0.35);
  border-color: rgba(176, 214, 255, 0.52);
}

.logout-link {
  margin-top: 14px;
  border-color: rgba(234, 122, 142, 0.4);
  color: #ffd8de;
  background: rgba(178, 35, 66, 0.12);
}

.logout-link .nav-icon {
  border-color: rgba(234, 122, 142, 0.4);
  background: rgba(178, 35, 66, 0.2);
}

.content {
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 24px clamp(16px, 3vw, 34px) 30px;
}

.app-footer {
  margin-top: 18px;
  padding: 14px 10px 6px;
  font-size: 0.77rem;
  text-align: center;
  color: var(--footer-color);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.topbar-leading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-title-group {
  min-width: 0;
}

.topbar-kicker {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--topbar-kicker-color);
}

.topbar h1 {
  margin: 0;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.1;
  color: var(--topbar-title-color);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  box-shadow: 0 6px 20px rgba(22, 46, 82, 0.08);
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #f3f8ff;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
}

.topbar-user strong {
  display: block;
  font-size: 0.87rem;
  color: #1a3358;
}

.topbar-user small {
  display: block;
  font-size: 0.72rem;
  color: #637a9b;
}

.theme-toggle {
  border: 1px solid var(--theme-toggle-border);
  border-radius: 999px;
  padding: 6px 11px 6px 8px;
  background: var(--theme-toggle-bg);
  color: var(--theme-toggle-text);
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: var(--theme-toggle-shadow);
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.theme-toggle-dot {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--theme-toggle-dot);
  box-shadow: 0 2px 8px rgba(8, 23, 47, 0.28);
  transform: translateX(var(--theme-toggle-dot-shift));
  margin-right: calc(var(--theme-toggle-dot-shift) + 2px);
  transition: transform 0.2s ease;
}

/* Componentes globais */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0%, rgba(63, 139, 223, 0.06), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), var(--surface));
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(202, 215, 232, 0.72);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(240, 246, 255, 0.92));
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.table-summary {
  color: var(--muted);
  font-size: 0.83rem;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-form input {
  min-width: 240px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  min-width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
}

.pagination a:hover {
  border-color: #6ea9e8;
}

.pagination .current {
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  color: #fff;
  border-color: transparent;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid #dbe5f2;
  font-size: 0.9rem;
}

th {
  background: #edf4fc;
  color: #526884;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tbody tr:hover td {
  background: #f7fbff;
}

form.inline,
.form-grid {
  display: grid;
  gap: 10px;
}

form.inline {
  display: inline-grid;
}

.upload-proof-form {
  gap: 6px;
  min-width: 200px;
}

.upload-proof-form select,
.upload-proof-form input[type="file"] {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 0.78rem;
}

.upload-proof-form input[type="file"] {
  min-width: 0;
}

.upload-proof-form input[type="file"]::file-selector-button {
  margin-right: 8px;
  border: 1px solid #b8c9de;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.76rem;
  color: #2d486d;
  background: #eef4fd;
  cursor: pointer;
}

.upload-proof-form input[type="file"]::-webkit-file-upload-button {
  margin-right: 8px;
  border: 1px solid #b8c9de;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.76rem;
  color: #2d486d;
  background: #eef4fd;
  cursor: pointer;
}

.upload-proof-form .upload-proof-btn {
  justify-self: start;
  width: auto;
  min-width: 78px;
  padding: 6px 10px;
  font-size: 0.78rem;
  line-height: 1.1;
}

.form-grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

input,
select,
textarea,
button {
  font: inherit;
}

label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.77rem;
  font-weight: 700;
  color: #4e6686;
  letter-spacing: 0.03em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c9d6e8;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: #142847;
  padding: 10px 11px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #5a9be2;
  box-shadow: 0 0 0 3px rgba(73, 141, 218, 0.16);
}

.form-help {
  display: block;
  margin-top: 5px;
  font-size: 0.72rem;
  color: #617b9f;
}

button,
.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.compact {
  padding: 7px 11px;
  font-size: 0.8rem;
  line-height: 1.12;
  border-radius: 10px;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 12px 25px rgba(37, 110, 187, 0.26);
}

.btn.secondary {
  border-color: #b9c7dc;
  background: linear-gradient(135deg, #506681, #3f556f);
}

button[disabled],
.btn[disabled] {
  opacity: 0.58;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
  transform: none;
}

.btn.full {
  width: 100%;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.notas-form .notas-table th:nth-child(2),
.notas-form .notas-table td:nth-child(2) {
  min-width: 112px;
}

.notas-form .notas-table th:nth-child(4),
.notas-form .notas-table td:nth-child(4) {
  min-width: 148px;
}

.notas-form .nota-input {
  min-width: 96px;
  text-align: center;
}

.notas-form .nota-input-recuperacao {
  min-width: 112px;
}

.badge.ok {
  background: #dff7e8;
  color: #147a3d;
}

.badge.warn {
  background: #fff1d4;
  color: #9b5f00;
}

.badge.danger {
  background: #ffe1e5;
  color: #a71831;
}

.flash {
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  max-height: 260px;
  transition:
    opacity 0.36s ease,
    transform 0.36s ease,
    max-height 0.45s ease,
    margin 0.45s ease,
    padding 0.45s ease,
    border-width 0.45s ease;
}

.flash.success {
  border-color: rgba(22, 156, 77, 0.28);
  background: rgba(22, 156, 77, 0.11);
  color: #0f7438;
}

.flash.error {
  border-color: rgba(221, 56, 70, 0.28);
  background: rgba(221, 56, 70, 0.1);
  color: #a91d2a;
}

.flash[data-auto-dismiss="1"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.2;
  transform-origin: left center;
  animation: flash-auto-dismiss-progress 5.2s linear forwards;
}

.flash.is-hiding {
  opacity: 0;
  transform: translateY(-8px);
  max-height: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
}

@keyframes flash-auto-dismiss-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* Dashboard */
.dashboard-hero {
  display: grid;
  grid-template-columns: 1.5fr minmax(210px, 1fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 14px;
}

.dashboard-kicker {
  margin: 0 0 5px;
  color: #537094;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dashboard-hero h2 {
  margin: 0 0 8px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(1.14rem, 2vw, 1.6rem);
  color: #112749;
}

.dashboard-hero-copy p {
  margin: 0;
  color: #546f90;
  line-height: 1.55;
}

.dashboard-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.dashboard-chips span {
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid #c6d6ec;
  background: #f5f9ff;
  font-size: 0.72rem;
  font-weight: 700;
  color: #35557d;
}

.dashboard-health {
  border: 1px solid #d3e0f1;
  border-radius: var(--radius-md);
  background: linear-gradient(155deg, #eff5fe, #e8f1fc);
  padding: 10px;
  display: grid;
  gap: 9px;
}

.health-row {
  border-radius: 11px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid #d4e1f1;
}

.health-row span {
  display: block;
  color: #5a7395;
  font-size: 0.76rem;
}

.health-row strong {
  display: block;
  margin-top: 2px;
  font-size: 1.16rem;
  color: #16335e;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.stat-card p {
  margin: 0;
  color: #627a9a;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.75rem;
  color: #112c55;
  line-height: 1;
}

.stat-card-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cae0f8;
}

.stat-card-icon svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-card-icon.students {
  color: #1b61a8;
  background: #e6f1fb;
}

.stat-card-icon.courses {
  color: #2174b2;
  background: #e8f5fb;
}

.stat-card-icon.classes {
  color: #2f62a8;
  background: #ebf0ff;
}

.stat-card-icon.due {
  color: #bd2d3f;
  background: #fde9ec;
}

.stat-card-icon.pending {
  color: #b97206;
  background: #fff3df;
}

.dashboard-split {
  display: grid;
  grid-template-columns: minmax(350px, 1.8fr) minmax(290px, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.dashboard-panel {
  padding: 16px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-family: "Sora", "Manrope", sans-serif;
  color: #12284d;
}

.table-muted {
  font-size: 0.74rem;
  color: #637c9b;
}

.dashboard-chart-wrap {
  position: relative;
  height: 286px;
  max-height: 286px;
}

.dashboard-panel canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 0;
  max-height: 286px;
}

.desktop-update-note {
  margin: 0;
  color: #5b7394;
  line-height: 1.5;
}

.desktop-update-actions {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.desktop-update-actions button {
  justify-content: center;
}

.desktop-update-status {
  margin: 10px 0 0;
  font-size: 0.85rem;
  color: #2e4f7b;
  min-height: 1.1rem;
}

/* Configuracoes */
.settings-card h2 {
  font-family: "Sora", "Manrope", sans-serif;
  color: #112a52;
}

.settings-field {
  min-width: 0;
}

.settings-field-compact {
  justify-self: start;
  width: min(100%, 360px);
}

.settings-field-tight {
  justify-self: start;
  width: min(100%, 220px);
}

.settings-checkboxes {
  display: grid;
  align-content: center;
  gap: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #2a4e7a;
  font-weight: 600;
  margin: 0;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.settings-logo-wrap {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 16px;
  align-items: start;
}

.settings-logo-wrap .form-grid {
  gap: 8px;
}

.settings-logo-wrap input[type="file"] {
  display: inline-block;
  width: min(420px, 100%);
  padding: 6px 8px;
  font-size: 0.82rem;
}

.settings-logo-preview {
  min-height: 160px;
  border-radius: 16px;
  border: 1px dashed #b9cce6;
  background: linear-gradient(145deg, #f5f9ff, #eef4fc);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  color: #5f7697;
  text-align: center;
  font-weight: 700;
}

.settings-logo-preview img {
  max-width: 100%;
  max-height: 130px;
  object-fit: contain;
  border-radius: 10px;
}

.settings-inline-btn {
  justify-self: start;
  width: auto;
}

.settings-form-actions {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.settings-status-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(236, 244, 255, 0.78));
}

.settings-status-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  color: #14315a;
}

.settings-status-card-file strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-status-card span {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5d789a;
  font-weight: 700;
}

.users-action-group {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
}

.users-action-group .inline {
  display: flex;
  flex: 0 0 auto;
}

.alunos-action-group {
  flex-wrap: wrap;
  gap: 8px;
}

/* Licencas */
.license-intro {
  margin-bottom: 14px;
}

.license-intro h2 {
  margin: 0;
  font-family: "Sora", "Manrope", sans-serif;
  color: #12284d;
}

.license-intro p {
  margin: 6px 0 0;
  color: #5b7394;
  font-size: 0.9rem;
}

.license-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.license-kpi-card {
  padding: 14px;
}

.license-kpi-card h3 {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5e7697;
}

.license-kpi-value {
  margin-top: 8px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.45rem;
  line-height: 1.1;
  color: #142d57;
  font-weight: 700;
  word-break: break-word;
}

.license-kpi-value-small {
  font-size: 1.06rem;
}

.license-kpi-value.is-active {
  color: #7a4bc1;
}

.license-kpi-value.is-inactive {
  color: #ad2a3d;
}

.license-section {
  margin-bottom: 14px;
}

.license-section h3 {
  margin: 0 0 10px;
  font-family: "Sora", "Manrope", sans-serif;
  color: #12284d;
}

.license-action-note {
  margin: 0 0 12px;
  color: #5b7394;
  font-size: 0.9rem;
}

.license-detail-table {
  border: 1px solid #d5e1f0;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, #f9fcff, #f4f8ff);
}

.license-detail-table table {
  border-collapse: separate;
  border-spacing: 0;
}

.license-detail-table td {
  border-bottom: 1px solid #dce7f4;
}

.license-detail-table tbody tr:last-child td {
  border-bottom: 0;
}

.license-detail-table td:first-child {
  width: 220px;
  font-size: 0.82rem;
  color: #4f698b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(232, 240, 251, 0.72);
}

.license-detail-table td:last-child {
  color: #17365f;
  word-break: break-word;
}

.license-remove-form {
  display: grid;
  gap: 10px;
  max-width: 320px;
  justify-items: start;
}

.btn-danger {
  border: 1px solid rgba(211, 66, 80, 0.55);
  background: linear-gradient(135deg, #c32737, #a91f2f);
  box-shadow: 0 10px 20px rgba(166, 28, 40, 0.24);
}

.users-action-group .btn,
.users-action-group button {
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
}

.actions-cell {
  min-width: 250px;
}

:root[data-theme="dark"] .license-intro h2,
:root[data-theme="dark"] .license-section h3 {
  color: #f3f8ff;
}

:root[data-theme="dark"] .license-intro p,
:root[data-theme="dark"] .license-action-note {
  color: #b5cce9;
}

:root[data-theme="dark"] .license-kpi-card h3 {
  color: #9db9db;
}

:root[data-theme="dark"] .license-kpi-value {
  color: #e9f3ff;
}

:root[data-theme="dark"] .license-kpi-value.is-active {
  color: #c2a3ff;
}

:root[data-theme="dark"] .license-kpi-value.is-inactive {
  color: #ffacb8;
}

:root[data-theme="dark"] .license-detail-table {
  border-color: #2f5078;
  background: linear-gradient(145deg, #0f2646, #102441);
}

:root[data-theme="dark"] .license-detail-table td {
  border-bottom-color: #2c4b72;
}

:root[data-theme="dark"] .license-detail-table td:first-child {
  background: rgba(25, 51, 84, 0.72);
  color: #bfd6f3;
}

:root[data-theme="dark"] .license-detail-table td:last-child {
  color: #e6f1ff;
}

:root[data-theme="dark"] .btn-danger {
  border-color: rgba(255, 118, 132, 0.55);
  box-shadow: 0 10px 20px rgba(160, 26, 42, 0.34);
}

/* Login */
.login-page {
  min-height: 100vh;
  margin: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: clamp(14px, 3.2vw, 28px);
  background:
    radial-gradient(circle at 88% 14%, rgba(39, 154, 255, 0.18), transparent 34%),
    radial-gradient(circle at 12% 86%, rgba(24, 103, 196, 0.22), transparent 42%),
    linear-gradient(160deg, #071325, #0b1f3e 46%, #081a33);
}

.login-bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(104, 151, 211, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104, 151, 211, 0.14) 1px, transparent 1px);
  background-size: 64px 64px;
}

.login-bg-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 30%, rgba(74, 145, 229, 0.2), transparent 42%),
    radial-gradient(circle at 78% 76%, rgba(198, 62, 108, 0.16), transparent 38%);
  mix-blend-mode: screen;
}

.login-page::before,
.login-page::after {
  content: "";
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(26px);
  opacity: 0.35;
  pointer-events: none;
  animation: float-login-orb 12s ease-in-out infinite;
}

.login-page::before {
  top: -120px;
  right: -80px;
  background: rgba(44, 154, 255, 0.4);
}

.login-page::after {
  left: -140px;
  bottom: -130px;
  background: rgba(20, 89, 188, 0.38);
  animation-delay: -5s;
}

.login-layout {
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
  gap: 34px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.login-layout-animated .login-showcase {
  animation: login-panel-left 0.8s ease both;
}

.login-layout-animated .login-card-shell {
  animation: login-panel-right 0.8s ease both;
}

.login-showcase {
  position: relative;
  border-radius: 24px;
  border: 1px solid rgba(146, 191, 244, 0.3);
  background:
    radial-gradient(circle at 100% 8%, rgba(105, 186, 255, 0.26), transparent 38%),
    linear-gradient(160deg, rgba(8, 27, 56, 0.92), rgba(6, 21, 43, 0.9));
  color: #eaf3ff;
  padding: clamp(18px, 2.6vw, 24px);
  box-shadow: var(--shadow-hard);
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
}

.login-showcase::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 94px;
  height: 1px;
  background: linear-gradient(90deg, rgba(81, 160, 243, 0), rgba(81, 160, 243, 0.62), rgba(81, 160, 243, 0));
}

.login-showcase-logo {
  width: 100%;
  max-width: 470px;
  justify-self: start;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.login-showcase-logo::after {
  display: none;
}

.login-system-logo-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: inherit;
  filter: none;
}

.login-system-logo-placeholder {
  width: min(100%, 420px);
  border-radius: 18px;
  border: 1px dashed rgba(159, 201, 249, 0.44);
  background: rgba(20, 60, 112, 0.35);
  padding: 24px 18px;
  text-align: center;
  display: grid;
  gap: 8px;
}

.login-system-logo-placeholder strong {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.15rem;
  color: #eaf3ff;
}

.login-system-logo-placeholder span {
  color: #c3d8f2;
  font-size: 0.9rem;
}

.showcase-kicker {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a9c9ef;
  font-weight: 700;
}

.login-showcase h1 {
  margin: 0 0 12px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(1.4rem, 2.3vw, 2.1rem);
  line-height: 1.2;
}

.login-showcase p {
  margin: 0;
  color: #c3d8f2;
  line-height: 1.65;
}

.showcase-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.showcase-tags span {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(159, 201, 249, 0.38);
  background: rgba(55, 127, 211, 0.2);
  color: #d9eaff;
  font-size: 0.74rem;
  font-weight: 700;
}

.showcase-mini-card {
  margin-top: auto;
  border-radius: 16px;
  border: 1px solid rgba(143, 191, 247, 0.32);
  background: rgba(13, 42, 82, 0.56);
  padding: 12px;
  max-width: 380px;
}

.showcase-mini-kicker {
  margin: 0 0 6px;
  font-size: 0.67rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9ec0e8;
  font-weight: 700;
}

.showcase-mini-card strong {
  display: block;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1rem;
}

.showcase-mini-card span {
  display: block;
  margin-top: 6px;
  color: #bed5f0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.login-card-shell {
  width: min(330px, 100%);
  justify-self: end;
  position: relative;
}

.login-card {
  position: relative;
  border-radius: 24px;
  border: 1px solid rgba(163, 203, 249, 0.35);
  background: linear-gradient(160deg, rgba(9, 29, 58, 0.96), rgba(7, 20, 41, 0.94));
  color: #e8f2ff;
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  padding: clamp(10px, 1.4vw, 14px);
  width: 100%;
  min-height: 0;
  height: auto;
}

.login-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, #2b7fdd, #59b4ff, #d95f90);
}

.login-theme-toggle {
  position: absolute;
  right: 0;
  bottom: 100%;
  margin: 0 0 10px 0;
}

.login-card-head {
  margin-bottom: 10px;
}

.login-kicker {
  margin: 0 0 7px;
  font-size: 0.7rem;
  color: #9cbfe8;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.login-card h2 {
  margin: 0;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.58rem;
  line-height: 1.05;
}

.login-card-head p:last-child {
  margin: 9px 0 0;
  color: #bdd2ec;
}

.login-card label {
  color: #c7ddf8;
}

.login-card input {
  background: rgba(248, 252, 255, 0.98);
}

.login-card .form-help {
  color: #9ec1ea;
}

.login-card .alert {
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  border: 1px solid rgba(232, 127, 142, 0.4);
  background: rgba(214, 42, 65, 0.18);
  color: #ffd2d8;
}

.login-logo-wrap {
  margin-bottom: 12px;
  display: flex;
  justify-content: center;
}

.login-logo-img {
  width: min(170px, 100%);
  max-height: 74px;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.public-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 2;
  text-align: center;
  color: #c4d8f3;
  font-size: 0.77rem;
  letter-spacing: 0.02em;
  padding: 0 10px;
}

:root:not([data-theme="dark"]) .login-page {
  background:
    radial-gradient(circle at 90% 12%, rgba(73, 160, 245, 0.2), transparent 36%),
    radial-gradient(circle at 10% 90%, rgba(39, 109, 196, 0.18), transparent 40%),
    linear-gradient(160deg, #0f2a52, #1b4276 56%, #123461);
}

:root:not([data-theme="dark"]) .login-bg-grid {
  background-image:
    linear-gradient(rgba(93, 141, 200, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 141, 200, 0.16) 1px, transparent 1px);
  opacity: 0.52;
}

:root:not([data-theme="dark"]) .login-showcase {
  border-color: rgba(163, 200, 241, 0.42);
  background:
    radial-gradient(circle at 100% 8%, rgba(122, 191, 255, 0.22), transparent 40%),
    linear-gradient(155deg, rgba(15, 49, 94, 0.9), rgba(11, 37, 71, 0.9));
}

:root:not([data-theme="dark"]) .login-system-logo-placeholder {
  border-color: rgba(166, 204, 246, 0.56);
  background: rgba(36, 86, 146, 0.4);
}

:root:not([data-theme="dark"]) .login-card {
  background: linear-gradient(160deg, rgba(244, 249, 255, 0.98), rgba(235, 244, 255, 0.96));
  border-color: rgba(159, 191, 230, 0.56);
  color: #13335f;
  box-shadow: 0 24px 56px rgba(8, 29, 59, 0.24);
}

:root:not([data-theme="dark"]) .login-kicker {
  color: #587aa6;
}

:root:not([data-theme="dark"]) .login-card h2 {
  color: #13335f;
}

:root:not([data-theme="dark"]) .login-card label {
  color: #3f6088;
}

:root:not([data-theme="dark"]) .login-card input {
  border-color: #b9d0eb;
  background: #f9fcff;
  color: #16345e;
}

:root:not([data-theme="dark"]) .showcase-mini-card {
  border-color: rgba(162, 199, 242, 0.46);
  background: rgba(27, 74, 129, 0.46);
}

.password-change-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(14px, 3vw, 26px);
  background:
    radial-gradient(circle at 92% 8%, rgba(34, 151, 255, 0.16), transparent 36%),
    radial-gradient(circle at 8% 95%, rgba(22, 95, 181, 0.14), transparent 40%),
    linear-gradient(158deg, #09162e, #102b52 52%, #0c2244);
}

.password-change-shell {
  width: min(560px, 100%);
  position: relative;
  z-index: 1;
}

.password-change-modal {
  border-radius: 20px;
  border: 1px solid rgba(163, 203, 249, 0.35);
  background: linear-gradient(160deg, rgba(9, 29, 58, 0.96), rgba(7, 20, 41, 0.94));
  box-shadow: var(--shadow-hard);
  color: #e8f2ff;
  padding: clamp(16px, 2.2vw, 22px);
}

.password-change-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9cbfe8;
}

.password-change-modal h1 {
  margin: 0;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(1.5rem, 2.8vw, 1.95rem);
}

.password-change-subtitle {
  margin: 10px 0 14px;
  color: #c5dbf5;
  line-height: 1.55;
}

.password-change-modal .alert.error {
  margin-bottom: 12px;
}

.password-change-modal label {
  color: #c7ddf8;
}

.password-change-modal input {
  background: rgba(248, 252, 255, 0.98);
}

.password-change-rules {
  border-radius: 12px;
  border: 1px solid rgba(161, 200, 247, 0.35);
  background: rgba(32, 84, 150, 0.24);
  padding: 10px 11px;
  font-size: 0.83rem;
  color: #d6e7fb;
  display: grid;
  gap: 4px;
}

:root:not([data-theme="dark"]) .password-change-page {
  background:
    radial-gradient(circle at 92% 8%, rgba(67, 157, 244, 0.2), transparent 36%),
    radial-gradient(circle at 8% 95%, rgba(35, 102, 188, 0.16), transparent 40%),
    linear-gradient(158deg, #0f2a52, #1a467f 56%, #123463);
}

:root:not([data-theme="dark"]) .password-change-modal {
  background: linear-gradient(160deg, rgba(244, 249, 255, 0.98), rgba(235, 244, 255, 0.96));
  border-color: rgba(159, 191, 230, 0.56);
  color: #13335f;
  box-shadow: 0 24px 56px rgba(8, 29, 59, 0.24);
}

:root:not([data-theme="dark"]) .password-change-kicker {
  color: #587aa6;
}

:root:not([data-theme="dark"]) .password-change-modal h1 {
  color: #13335f;
}

:root:not([data-theme="dark"]) .password-change-subtitle,
:root:not([data-theme="dark"]) .password-change-rules {
  color: #3f6088;
}

:root:not([data-theme="dark"]) .password-change-modal label {
  color: #3f6088;
}

:root:not([data-theme="dark"]) .password-change-modal input {
  border-color: #b9d0eb;
  background: #f9fcff;
  color: #16345e;
}

/* Splash e licenca */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 88% 12%, rgba(29, 214, 193, 0.14), transparent 40%),
    radial-gradient(circle at 8% 90%, rgba(63, 168, 255, 0.12), transparent 42%),
    linear-gradient(155deg, #09152b, #0f2b54);
  color: #f2f8ff;
  transition: opacity 0.45s ease;
}

.splash-overlay::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(63, 168, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 168, 255, 0.07) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, #000 48%, transparent 95%);
}

.splash-card {
  width: min(560px, calc(100vw - 44px));
  border: 1px solid rgba(86, 168, 255, 0.3);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(8, 20, 40, 0.76), rgba(7, 16, 33, 0.86));
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 1.55rem 1.6rem 1.4rem;
  position: relative;
  overflow: hidden;
}

.splash-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #3fa8ff, #1dd6c1, #3fa8ff);
  box-shadow: 0 0 20px rgba(63, 168, 255, 0.45);
}

.splash-brand {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0.95rem;
  align-items: center;
  margin-bottom: 0.95rem;
}

.splash-brand-logo {
  width: 100%;
  max-width: 112px;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(8, 16, 30, 0.35);
  border: 1px solid rgba(63, 168, 255, 0.24);
  padding: 0.32rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.splash-brand-copy h1 {
  margin: 0 0 0.22rem;
  font-size: 1.56rem;
  letter-spacing: 0.05em;
  color: #f5f9ff;
}

.splash-brand-copy p {
  margin: 0;
  color: #a7bdd8;
  font-size: 0.84rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.splash-headline {
  margin: 0.85rem 0 0.24rem;
  font-size: 1.03rem;
  font-weight: 600;
  color: #eaf3ff;
}

.splash-status {
  margin: 0;
  font-size: 0.82rem;
  color: #a7bdd8;
  min-height: 1.1rem;
}

.splash-progress-track {
  margin-top: 0.82rem;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.splash-progress-bar {
  width: 44%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1dd6c1, #3fa8ff, #9cd4ff);
  box-shadow: 0 0 20px rgba(63, 168, 255, 0.55);
  animation: splash-progress-slide 1.4s ease-in-out infinite;
}

.splash-chips {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.splash-chips span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(63, 168, 255, 0.28);
  background: rgba(63, 168, 255, 0.12);
  padding: 0.22rem 0.52rem;
  font-size: 0.68rem;
  color: #d3e6ff;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-transform: uppercase;
}

@keyframes splash-progress-slide {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(340%);
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 12, 27, 0.72);
  backdrop-filter: blur(3px);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-overlay.show {
  display: flex;
}

.modal-card {
  width: min(640px, 100%);
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.modal-card h3 {
  margin: 0;
  font-size: 1.42rem;
  font-family: "Sora", "Manrope", sans-serif;
  color: #10284d;
}

.modal-card p {
  margin: 8px 0 12px;
  color: #5f7595;
  line-height: 1.5;
}

.license-activation-overlay {
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 100% 0%, rgba(43, 145, 255, 0.22), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(29, 214, 193, 0.18), transparent 36%),
    linear-gradient(155deg, rgba(6, 18, 36, 0.96), rgba(10, 30, 56, 0.94));
  backdrop-filter: blur(12px) saturate(1.08);
}

.license-activation-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(125, 177, 243, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 177, 243, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.72;
  pointer-events: none;
}

.license-activation-stage {
  position: absolute;
  inset: clamp(18px, 4vw, 44px);
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 22px;
  padding: clamp(18px, 2vw, 28px);
  border-radius: 30px;
  border: 1px solid rgba(120, 169, 230, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(64, 149, 255, 0.18), transparent 34%),
    linear-gradient(160deg, rgba(10, 28, 53, 0.86), rgba(6, 20, 40, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 34px 80px rgba(0, 0, 0, 0.34);
  filter: blur(9px) saturate(0.76);
  opacity: 0.96;
  transform: scale(1.03);
  pointer-events: none;
}

.license-activation-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(214, 232, 255, 0.08), rgba(214, 232, 255, 0.02));
}

.license-preview-sidebar,
.license-preview-main {
  position: relative;
  z-index: 1;
}

.license-preview-sidebar {
  border-radius: 24px;
  border: 1px solid rgba(141, 187, 243, 0.18);
  background: linear-gradient(180deg, rgba(13, 39, 71, 0.9), rgba(9, 26, 48, 0.92));
  padding: 22px 18px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.license-preview-brand {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.license-preview-brand strong {
  display: block;
  font-size: 1rem;
  color: #f2f7ff;
}

.license-preview-brand span {
  font-size: 0.76rem;
  color: rgba(208, 225, 247, 0.82);
}

.license-preview-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(147, 193, 249, 0.36);
  background:
    linear-gradient(135deg, rgba(80, 166, 255, 0.34), rgba(20, 79, 147, 0.24));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  position: relative;
}

.license-preview-brand-mark::before,
.license-preview-brand-mark::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 3px;
  height: 46%;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff7d6d, #ff4f67);
  transform: translate(-50%, -50%) rotate(24deg);
}

.license-preview-brand-mark::before {
  left: calc(50% - 5px);
}

.license-preview-brand-mark::after {
  left: calc(50% + 5px);
}

.license-preview-nav-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(183, 208, 240, 0.7);
}

.license-preview-nav {
  display: grid;
  gap: 8px;
}

.license-preview-nav span {
  border-radius: 14px;
  border: 1px solid rgba(141, 187, 243, 0.12);
  background: rgba(53, 110, 180, 0.16);
  padding: 11px 13px;
  color: rgba(225, 238, 255, 0.78);
  font-size: 0.84rem;
}

.license-preview-nav span.is-active {
  border-color: rgba(146, 203, 255, 0.28);
  background: linear-gradient(135deg, rgba(78, 163, 255, 0.3), rgba(48, 112, 196, 0.2));
  color: #ffffff;
}

.license-preview-main {
  display: grid;
  align-content: start;
  gap: 18px;
}

.license-preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.license-preview-search {
  width: min(420px, 62%);
  height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(146, 191, 245, 0.16);
  background: rgba(228, 239, 255, 0.08);
}

.license-preview-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.license-preview-topbar-actions span {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(226, 238, 255, 0.1);
  border: 1px solid rgba(144, 190, 244, 0.16);
}

.license-preview-topbar-actions .license-preview-avatar {
  width: 46px;
}

.license-preview-hero {
  border-radius: 24px;
  border: 1px solid rgba(143, 188, 243, 0.16);
  background:
    radial-gradient(circle at 100% 0%, rgba(72, 161, 255, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(15, 44, 79, 0.92), rgba(12, 35, 63, 0.9));
  padding: 24px 26px;
}

.license-preview-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(183, 212, 245, 0.72);
}

.license-preview-hero strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.35rem;
  color: #f5f9ff;
}

.license-preview-hero p {
  margin: 0;
  max-width: 560px;
  color: rgba(211, 226, 245, 0.82);
  line-height: 1.65;
}

.license-preview-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.license-preview-kpis article,
.license-preview-panel {
  border-radius: 20px;
  border: 1px solid rgba(142, 188, 243, 0.14);
  background: linear-gradient(180deg, rgba(18, 46, 82, 0.9), rgba(11, 31, 57, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.license-preview-kpis article {
  padding: 18px 20px;
}

.license-preview-kpis span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.76rem;
  color: rgba(190, 214, 241, 0.72);
}

.license-preview-kpis strong {
  display: block;
  font-size: 1.15rem;
  color: #f7fbff;
}

.license-preview-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.license-preview-panel {
  min-height: 140px;
  position: relative;
  overflow: hidden;
}

.license-preview-panel::before,
.license-preview-panel::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  border-radius: 999px;
  background: rgba(205, 224, 247, 0.16);
}

.license-preview-panel::before {
  top: 22px;
  height: 12px;
  width: 44%;
}

.license-preview-panel::after {
  top: 52px;
  height: 9px;
}

.license-preview-panel.wide {
  grid-column: 1 / -1;
  min-height: 190px;
}

.license-preview-panel.wide::before {
  width: 28%;
}

.license-preview-panel.wide::after {
  height: 94px;
  top: auto;
  bottom: 20px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(84, 170, 255, 0.12), rgba(84, 170, 255, 0.04)),
    linear-gradient(90deg, rgba(153, 197, 247, 0.16) 18%, transparent 18%),
    linear-gradient(rgba(153, 197, 247, 0.12) 1px, transparent 1px);
  background-size: auto, 76px 100%, 100% 22px;
}

.license-activation-card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 34px));
  padding: clamp(18px, 2.3vw, 22px);
  border: 1px solid rgba(128, 177, 235, 0.32);
  background:
    radial-gradient(circle at 100% 0%, rgba(79, 163, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(12, 41, 77, 0.9), rgba(9, 31, 58, 0.94));
  box-shadow: 0 20px 52px rgba(5, 17, 34, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}

.license-activation-card h3 {
  margin-bottom: 6px;
  font-size: clamp(1.12rem, 1.8vw, 1.28rem);
  line-height: 1.08;
  color: #eef6ff;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.license-activation-card .license-activation-lead {
  margin: 0 0 14px;
  color: #b6cce8;
  font-size: 0.84rem;
  line-height: 1.45;
  font-weight: 700;
  text-transform: uppercase;
}

.license-field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8fb8e5;
}

.license-instance-box {
  border-radius: 14px;
  border: 1px solid rgba(126, 176, 234, 0.36);
  background: linear-gradient(180deg, rgba(18, 53, 94, 0.92), rgba(14, 41, 74, 0.94));
  padding: 12px 14px;
  margin-bottom: 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.84rem;
  color: #ebf5ff;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.license-activation-card textarea {
  width: 100%;
  min-height: 126px;
  border-radius: 14px;
  border: 1px solid rgba(126, 176, 234, 0.36);
  background: rgba(15, 43, 77, 0.92);
  padding: 12px 14px;
  resize: vertical;
  outline: none;
  font: inherit;
  line-height: 1.45;
  font-size: 0.92rem;
  color: #ebf5ff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.14);
}

.license-activation-card textarea::placeholder {
  color: #9fbad9;
}

.license-activation-card textarea:focus {
  border-color: rgba(93, 177, 255, 0.82);
  box-shadow: 0 0 0 3px rgba(48, 135, 222, 0.18);
}

.license-activation-card .status-text {
  min-height: 18px;
  margin-top: 10px;
  font-size: 0.84rem;
  color: #abc3e0;
}

.license-activation-card .status-text.error {
  color: #c33f4c;
}

.license-activation-card .status-text.success {
  color: #13814a;
}

.license-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.license-activation-card button {
  min-width: 154px;
  border: 0;
  border-radius: 13px;
  padding: 11px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #2f8be6, #1f64ba);
  box-shadow: 0 14px 22px rgba(24, 85, 156, 0.2);
}

.license-activation-card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 24px rgba(24, 85, 156, 0.22);
}

.license-activation-card button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

.license-support-copy {
  margin: 0;
  max-width: 220px;
  color: #9bb8d9;
  font-size: 0.77rem;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .license-activation-stage {
    inset: 14px;
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .license-preview-sidebar {
    display: none;
  }

  .license-preview-kpis,
  .license-preview-panels {
    grid-template-columns: 1fr;
  }

  .license-preview-panel.wide {
    grid-column: auto;
    min-height: 150px;
  }
}

@media (max-width: 640px) {
  .license-activation-stage {
    opacity: 0.5;
    filter: blur(11px) saturate(0.72);
  }

  .license-preview-kpis,
  .license-preview-panels {
    display: none;
  }

  .license-activation-card {
    width: min(100vw - 18px, 100%);
    padding: 16px 15px;
    border-radius: 22px;
  }

  .license-action-row {
    align-items: stretch;
  }

  .license-activation-card button {
    width: 100%;
    min-width: 0;
  }

  .license-support-copy {
    max-width: none;
  }
}

.alunos-edit-modal-card {
  width: min(860px, 100%);
}

.alunos-edit-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.alunos-edit-modal-head p {
  margin-bottom: 0;
}

.alunos-edit-modal-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  align-self: end;
}

body.enterprise-modal-open {
  overflow: hidden;
}

.related-actions-modal-card {
  width: min(420px, 100%);
  padding: 18px;
  border-color: #c0d0e4;
  background:
    radial-gradient(circle at 100% 0%, rgba(77, 147, 232, 0.16), transparent 38%),
    linear-gradient(145deg, #eef4fb, #e2eaf5 58%, #edf3fb);
  box-shadow: 0 24px 48px rgba(12, 31, 58, 0.18);
}

.related-actions-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.related-actions-head h3 {
  margin: 0;
}

.related-actions-head p {
  margin: 6px 0 0;
}

.related-actions-close {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  border: 1px solid #b7c9df;
  background: rgba(232, 240, 251, 0.92);
  color: #14315a;
  box-shadow: none;
}

.related-actions-close:hover,
.related-actions-close:focus {
  transform: none;
  filter: none;
  box-shadow: none;
}

.related-actions-close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.related-actions-links {
  display: grid;
  gap: 10px;
}

.related-actions-link {
  display: block;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(145deg, rgba(232, 240, 251, 0.92), rgba(221, 233, 248, 0.94));
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.related-actions-link:hover {
  transform: translateY(-1px);
  border-color: #78ace7;
  box-shadow: 0 14px 24px rgba(19, 53, 96, 0.12);
}

.related-actions-link strong {
  display: block;
  font-size: 0.94rem;
  color: #14315a;
}

.related-actions-link span {
  display: block;
  margin-top: 4px;
  font-size: 0.79rem;
  color: #5a7697;
  line-height: 1.45;
}

.related-actions-link.is-active {
  border-color: rgba(77, 147, 232, 0.58);
  background: linear-gradient(145deg, rgba(226, 238, 255, 0.88), rgba(212, 229, 252, 0.9));
}

.portal-notas-modal-card {
  width: min(980px, 100%);
  max-height: min(82vh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.portal-notas-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.portal-notas-modal-head p {
  margin: 6px 0 0;
}

.portal-notas-modal-body {
  min-height: 0;
  overflow: auto;
}

.portal-notas-trigger,
.portal-notas-close {
  padding: 8px 12px;
  font-size: 0.84rem;
}

.portal-mensalidade-status {
  display: grid;
  gap: 6px;
}

.portal-mensalidade-motivo {
  max-width: 220px;
  color: #9f2e3f;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
  word-break: break-word;
}

.financeiro-baixa-form {
  align-items: end;
}

.financeiro-baixa-field-compact {
  width: min(100%, 220px);
  justify-self: start;
}

.financeiro-baixa-observacao {
  width: min(100%, 220px);
  justify-self: start;
  align-self: end;
}

.financeiro-baixa-resumo {
  align-self: end;
}

.financeiro-baixa-actions {
  grid-column: 1 / -1;
}

.status-text {
  min-height: 1.2rem;
  margin: 9px 0 10px;
  color: #597297;
  font-size: 0.88rem;
}

.status-text.error {
  color: #ba2036;
}

.status-text.success {
  color: #0e8040;
}

.welcome-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(4, 11, 26, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.welcome-modal-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

.welcome-modal-card {
  width: min(560px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(145, 194, 246, 0.4);
  background:
    radial-gradient(circle at 100% 0%, rgba(71, 153, 237, 0.24), transparent 44%),
    linear-gradient(150deg, rgba(9, 29, 58, 0.96), rgba(7, 20, 41, 0.95));
  color: #f2f8ff;
  padding: 20px;
  box-shadow: 0 30px 70px rgba(2, 8, 22, 0.52);
  transform: translateY(0);
  animation: welcome-in 0.36s ease;
}

.welcome-modal-card.logout {
  border-color: rgba(145, 194, 246, 0.4);
  background:
    radial-gradient(circle at 100% 0%, rgba(71, 153, 237, 0.24), transparent 44%),
    linear-gradient(150deg, rgba(9, 29, 58, 0.96), rgba(7, 20, 41, 0.95));
}

.welcome-modal-title {
  margin: 0 0 8px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
}

.welcome-modal-text {
  margin: 0;
  color: #d6e8ff;
  font-size: 1rem;
  line-height: 1.55;
}

.welcome-modal-progress {
  margin-top: 14px;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(153, 198, 247, 0.24);
}

.welcome-modal-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #84c1ff, #3f88ea);
  transform-origin: left center;
  animation: welcome-progress 3.1s linear forwards;
}

.welcome-modal-card.logout .welcome-modal-progress span {
  background: linear-gradient(90deg, #84c1ff, #3f88ea);
}

@keyframes welcome-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@keyframes welcome-in {
  from {
    transform: translateY(8px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes float-login-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-16px, 22px) scale(1.08); }
}

@keyframes login-panel-left {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes login-panel-right {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

:root[data-theme="dark"] .content {
  color: var(--text);
}

:root[data-theme="dark"] .card {
  background:
    radial-gradient(circle at 100% 0%, rgba(80, 156, 238, 0.12), transparent 42%),
    var(--surface);
  border-color: var(--border);
  box-shadow: 0 18px 34px rgba(2, 10, 24, 0.35);
}

:root[data-theme="dark"] .topbar-user strong,
:root[data-theme="dark"] .section-head h2,
:root[data-theme="dark"] .settings-card h2,
:root[data-theme="dark"] .stat-card strong,
:root[data-theme="dark"] .dashboard-hero-copy h2,
:root[data-theme="dark"] .dashboard-health strong {
  color: #f3f8ff;
}

:root[data-theme="dark"] .dashboard-health {
  border-color: #30527c;
  background: linear-gradient(155deg, #0f2542, #102b4d);
}

:root[data-theme="dark"] .health-row {
  background: rgba(10, 30, 56, 0.9);
  border-color: #325680;
}

:root[data-theme="dark"] .health-row span {
  color: #a9c5e8;
}

:root[data-theme="dark"] .topbar-user small,
:root[data-theme="dark"] .table-muted,
:root[data-theme="dark"] .dashboard-kicker,
:root[data-theme="dark"] .dashboard-hero-copy p,
:root[data-theme="dark"] .desktop-update-note,
:root[data-theme="dark"] .desktop-update-status,
:root[data-theme="dark"] .stat-card p,
:root[data-theme="dark"] .form-help,
:root[data-theme="dark"] label,
:root[data-theme="dark"] th {
  color: #b5cce9;
}

:root[data-theme="dark"] .stat-card-icon.students {
  background: rgba(36, 97, 168, 0.24);
  color: #99c7ff;
}

:root[data-theme="dark"] .stat-card-icon.courses {
  background: rgba(20, 121, 176, 0.24);
  color: #95d8f2;
}

:root[data-theme="dark"] .stat-card-icon.classes {
  background: rgba(64, 94, 177, 0.26);
  color: #b7c8ff;
}

:root[data-theme="dark"] .stat-card-icon.due {
  background: rgba(190, 45, 63, 0.2);
  color: #ffb3bf;
}

:root[data-theme="dark"] .stat-card-icon.pending {
  background: rgba(185, 114, 6, 0.2);
  color: #ffd59a;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  background: #102849;
  color: #e7f1ff;
  border-color: #32557f;
}

:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder {
  color: #9ab5d7;
}

:root[data-theme="dark"] th,
:root[data-theme="dark"] td {
  border-bottom-color: #2b4a73;
}

:root[data-theme="dark"] body:not(.enterprise-login-page) .table-wrap:not(.license-detail-table) {
  border-color: #33567f;
  background: linear-gradient(180deg, rgba(13, 31, 56, 0.96), rgba(10, 24, 45, 0.98));
}

:root[data-theme="dark"] body:not(.enterprise-login-page) .table-wrap:not(.license-detail-table) table {
  background: transparent;
}

:root[data-theme="dark"] body:not(.enterprise-login-page) .table-wrap:not(.license-detail-table) thead th {
  color: #d8e7fb;
  background: #132a49;
}

:root[data-theme="dark"] body:not(.enterprise-login-page) .table-wrap:not(.license-detail-table) tbody td {
  color: #edf5ff;
  background: rgba(10, 25, 46, 0.92);
}

:root[data-theme="dark"] body:not(.enterprise-login-page) .table-wrap:not(.license-detail-table) tbody tr:nth-child(even) td {
  background: rgba(13, 29, 53, 0.98);
}

:root[data-theme="dark"] th {
  background: #132a49;
}

:root[data-theme="dark"] body:not(.enterprise-login-page) .table-summary {
  color: #c8dbf3;
}

:root[data-theme="dark"] tbody tr:hover td {
  background: #11233f;
}

:root[data-theme="dark"] .settings-logo-preview {
  border-color: #365982;
  background: linear-gradient(145deg, #0f2645, #102441);
  color: #bdd2ed;
}

:root[data-theme="dark"] .settings-status-card {
  border-color: #355782;
  background: linear-gradient(145deg, rgba(16, 37, 67, 0.92), rgba(13, 31, 56, 0.96));
}

:root[data-theme="dark"] .settings-status-card strong {
  color: #f1f7ff;
}

:root[data-theme="dark"] .settings-status-card span,
:root[data-theme="dark"] .related-actions-link span {
  color: #a9c4e6;
}

:root[data-theme="dark"] .related-actions-close {
  border-color: #355782;
  background: #102849;
  color: #e7f1ff;
}

:root[data-theme="dark"] .related-actions-link {
  border-color: #355782;
  background: linear-gradient(145deg, rgba(16, 38, 70, 0.94), rgba(13, 31, 56, 0.98));
}

:root[data-theme="dark"] .related-actions-link strong {
  color: #f1f7ff;
}

:root[data-theme="dark"] .related-actions-link.is-active {
  border-color: rgba(102, 172, 255, 0.66);
  background: linear-gradient(145deg, rgba(23, 55, 96, 0.98), rgba(18, 43, 76, 0.98));
}

:root[data-theme="dark"] .public-footer {
  color: #b6cde9;
}

.update-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 15000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 13, 30, 0.78);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.update-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.update-modal-card {
  width: min(520px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(145, 194, 246, 0.34);
  background:
    radial-gradient(circle at 100% 0%, rgba(73, 154, 238, 0.2), transparent 44%),
    linear-gradient(150deg, rgba(9, 29, 58, 0.96), rgba(7, 20, 41, 0.95));
  color: #eaf3ff;
  box-shadow: 0 26px 60px rgba(2, 10, 24, 0.5);
  padding: 18px;
}

.update-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.update-modal-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(151, 197, 248, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(50, 124, 209, 0.34);
}

.update-modal-badge svg {
  width: 22px;
  height: 22px;
  stroke: #dcecff;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.update-modal-title-wrap {
  min-width: 0;
}

.update-modal-title {
  margin: 0;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.25rem;
}

.update-modal-subtitle {
  margin: 3px 0 0;
  color: #b9d2ef;
  font-size: 0.86rem;
}

.update-modal-body {
  margin-top: 12px;
}

.update-modal-message {
  margin: 0;
  line-height: 1.5;
  color: #d7e8ff;
}

.update-modal-status {
  min-height: 1.2rem;
  margin: 8px 0 0;
  font-size: 0.86rem;
  color: #acd0f6;
}

.update-modal-progress {
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(128, 172, 222, 0.24);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.update-modal-card.is-busy .update-modal-progress {
  opacity: 1;
}

.update-modal-progress::before {
  content: "";
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5eb4ff, #2f7de0);
  animation: updateProgressMove 1.2s linear infinite;
}

.update-modal-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.update-modal-btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.update-modal-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

.update-modal-btn-secondary {
  background: rgba(65, 109, 166, 0.34);
  border-color: rgba(125, 170, 228, 0.4);
  color: #dfecfc;
}

.update-modal-btn-primary {
  background: linear-gradient(140deg, #2d81de, #1f6cc7);
  border-color: rgba(137, 185, 243, 0.46);
  color: #f4f9ff;
}

.update-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 15050;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 24px));
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(140, 193, 248, 0.44);
  background: linear-gradient(140deg, rgba(9, 29, 58, 0.94), rgba(8, 20, 41, 0.95));
  color: #eaf3ff;
  box-shadow: 0 18px 36px rgba(2, 10, 24, 0.44);
  transform: translateY(14px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.update-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.update-toast.update-toast-success {
  border-color: rgba(110, 224, 165, 0.42);
}

.update-toast.update-toast-error {
  border-color: rgba(240, 127, 142, 0.42);
}

:root:not([data-theme="dark"]) .update-modal-overlay {
  background: rgba(10, 28, 54, 0.6);
}

:root:not([data-theme="dark"]) .update-modal-card {
  border-color: #c6dcf3;
  background:
    radial-gradient(circle at 100% 0%, rgba(81, 157, 236, 0.14), transparent 44%),
    linear-gradient(150deg, #f9fcff, #ecf4ff 75%);
  color: #16345f;
  box-shadow: 0 22px 46px rgba(14, 40, 75, 0.22);
}

:root:not([data-theme="dark"]) .update-modal-badge {
  border-color: #b7d1f0;
  background: rgba(77, 142, 221, 0.2);
}

:root:not([data-theme="dark"]) .update-modal-badge svg {
  stroke: #1f5daa;
}

:root:not([data-theme="dark"]) .update-modal-subtitle,
:root:not([data-theme="dark"]) .update-modal-message,
:root:not([data-theme="dark"]) .update-modal-status {
  color: #4d6890;
}

:root:not([data-theme="dark"]) .update-modal-btn-secondary {
  background: #e8f0fb;
  border-color: #c6d9ef;
  color: #2e507c;
}

:root:not([data-theme="dark"]) .update-modal-btn-primary {
  background: linear-gradient(140deg, #2f84e2, #1f6cc7);
}

:root:not([data-theme="dark"]) .update-toast {
  border-color: #bdd6f2;
  background: #f7fbff;
  color: #1f3e67;
  box-shadow: 0 18px 34px rgba(14, 40, 75, 0.2);
}

.financeiro-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.financial-report-modal {
  z-index: 13000;
}

.financial-report-card {
  width: min(1240px, calc(100vw - 34px));
  max-height: 92vh;
  overflow: auto;
  background:
    radial-gradient(circle at 100% 0%, rgba(61, 149, 242, 0.12), transparent 43%),
    var(--surface);
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 26px 64px rgba(4, 18, 39, 0.4);
  padding: 18px;
}

.financial-report-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.financial-report-head h3 {
  margin: 0;
  color: #10284d;
  font-size: clamp(1.16rem, 2vw, 1.48rem);
  font-family: "Sora", "Manrope", sans-serif;
}

.financial-report-head p {
  margin: 7px 0 0;
  color: #5d789a;
  font-size: 0.9rem;
}

.financial-report-head-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.financial-report-filters {
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(238, 246, 255, 0.74));
}

.financial-report-filter-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.financial-report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-bottom: 13px;
}

.financial-kpi {
  border: 1px solid #d4e1f1;
  border-radius: 14px;
  padding: 11px 12px;
  background: linear-gradient(150deg, #fbfdff, #f1f7ff 78%);
}

.financial-kpi span {
  display: block;
  color: #557194;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.financial-kpi strong {
  display: block;
  margin-top: 5px;
  color: #12305c;
  font-size: 1.28rem;
  line-height: 1.05;
}

.financial-report-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px;
  margin-top: 10px;
}

.financial-report-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.financial-report-section-head h4 {
  margin: 0;
  color: #183a68;
  font-size: 0.96rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.financial-report-table th,
.financial-report-table td {
  font-size: 0.81rem;
}

.financial-report-table td:nth-child(5),
.financial-report-table td:nth-child(6),
.financial-report-table td:nth-child(7),
.financial-report-table td:nth-child(8),
.financial-report-table td:nth-child(9) {
  white-space: nowrap;
}

.financial-report-pagination {
  justify-content: center;
}

:root[data-theme="dark"] .financial-report-head h3 {
  color: #edf4ff;
}

:root[data-theme="dark"] .financial-report-head p {
  color: #adc2de;
}

:root[data-theme="dark"] .financial-report-filters {
  background: linear-gradient(145deg, rgba(11, 28, 54, 0.92), rgba(15, 37, 69, 0.9));
  border-color: #2c4b72;
}

:root[data-theme="dark"] .financial-kpi {
  background: linear-gradient(145deg, rgba(12, 33, 62, 0.95), rgba(14, 40, 73, 0.95));
  border-color: #2f537e;
}

:root[data-theme="dark"] .financial-kpi span {
  color: #9bb4d6;
}

:root[data-theme="dark"] .financial-kpi strong {
  color: #e5f0ff;
}

:root[data-theme="dark"] .financial-report-section-head h4 {
  color: #cfe2ff;
}

:root[data-theme="dark"] .financial-report-section {
  border-color: #2d4d74;
  background: rgba(11, 27, 52, 0.9);
}

@keyframes updateProgressMove {
  0% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(360%);
  }
}

/* Responsivo */
@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(175, 208, 255, 0.2);
  }

  .content {
    height: auto;
    overflow: visible;
  }

  .sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .logout-link {
    margin-top: 0;
  }
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-showcase {
    display: none;
  }

  .login-card {
    width: 100%;
    margin: 0;
    min-height: auto;
    height: auto;
  }

  .login-card-shell {
    width: min(500px, 100%);
    margin: 0 auto;
    justify-self: stretch;
    display: grid;
    gap: 8px;
  }

  .login-theme-toggle {
    position: static;
    margin: 0;
  }

  .settings-logo-wrap {
    grid-template-columns: 1fr;
  }

  .dashboard-hero,
  .dashboard-split {
    grid-template-columns: 1fr;
  }

  .financial-report-card {
    width: min(100%, calc(100vw - 22px));
    padding: 14px;
  }

  .financial-report-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .financial-report-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .financial-report-filters {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 700px) {
  .content {
    padding: 14px 12px 18px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .theme-toggle {
    padding: 6px 9px 6px 7px;
    font-size: 0.72rem;
  }

  .topbar-user {
    width: 100%;
    justify-content: flex-start;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 9px 8px;
    font-size: 0.82rem;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .welcome-modal-card {
    padding: 16px;
  }

  .license-detail-table td:first-child {
    width: 150px;
  }

  .financeiro-toolbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .financial-report-card {
    padding: 12px;
    border-radius: 16px;
  }

  .financial-report-filters {
    grid-template-columns: 1fr;
  }

  .financial-report-head-actions .btn,
  .financial-report-head-actions button {
    width: 100%;
    text-align: center;
  }

  .financial-kpi strong {
    font-size: 1.08rem;
  }
}

/* Login (apenas tela de login) */
.enterprise-login-page .container-fluid {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
}

.enterprise-login-page .row {
  display: flex;
  flex-wrap: wrap;
}

.enterprise-login-page .h-100 {
  height: 100%;
}

.enterprise-login-page .g-0 {
  --enterprise-gutter-x: 0;
  --enterprise-gutter-y: 0;
}

.enterprise-login-page .g-0 > [class*="col-"] {
  padding-right: 0;
  padding-left: 0;
}

.enterprise-login-page .col-lg-5,
.enterprise-login-page .col-lg-7 {
  flex: 0 0 100%;
  max-width: 100%;
}

@media (min-width: 992px) {
  .enterprise-login-page .col-lg-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }

  .enterprise-login-page .col-lg-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }
}

.enterprise-login-page {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Manrope", Tahoma, sans-serif;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 12%, rgba(88, 157, 245, 0.22), transparent 36%),
    radial-gradient(circle at 12% 86%, rgba(38, 97, 194, 0.2), transparent 38%),
    linear-gradient(145deg, #e8f0fb, #f6f9ff 58%, #edf3fd);
}

.enterprise-login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(24, 79, 159, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 79, 159, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at center, #000 52%, transparent 100%);
}

.enterprise-login-page .login-container {
  min-height: 100vh;
  padding: 0;
}

.enterprise-login-page .login-container .row {
  min-height: 100vh;
}

.enterprise-login-page .branding {
  position: relative;
  background:
    radial-gradient(circle at 88% 8%, rgba(74, 170, 255, 0.26), transparent 36%),
    linear-gradient(145deg, #112b56, #1a4384 54%, #12325f);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 36px;
}

.enterprise-login-page .branding::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(164, 202, 248, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164, 202, 248, 0.11) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.48;
}

.enterprise-login-page .branding-content {
  max-width: 500px;
  position: relative;
  z-index: 1;
}

.enterprise-login-page .branding-logo-wrap {
  width: clamp(170px, 22vw, 240px);
  aspect-ratio: 1 / 1;
  margin-bottom: 26px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(220, 233, 251, 0.9);
  box-shadow: 0 18px 38px rgba(3, 18, 42, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.enterprise-login-page .branding-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}

.enterprise-login-page .branding h1 {
  margin: 0 0 12px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(2rem, 3.3vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.enterprise-login-page .branding p {
  margin: 0 0 24px;
  max-width: 430px;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.5;
  opacity: 0.95;
}

.enterprise-login-page .features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.enterprise-login-page .features span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(194, 220, 251, 0.45);
  background: rgba(255, 255, 255, 0.16);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  backdrop-filter: blur(2px);
}

.enterprise-login-page .login-area {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: 24px;
}

.enterprise-login-page .login-panel {
  width: min(430px, 100%);
  display: grid;
  gap: 10px;
}

.enterprise-login-page .login-theme-toggle {
  position: static;
  justify-self: end;
  margin: 0;
  z-index: 2;
}

.enterprise-login-page .login-card {
  width: 100%;
  padding: 38px 34px 30px;
  background: linear-gradient(180deg, #fcfdff, #f1f6fd 78%);
  border-radius: 20px;
  border: 1px solid #dbe7f7;
  box-shadow: 0 20px 46px rgba(18, 37, 72, 0.16);
  animation: enterprise-login-fade-up 0.6s ease;
  position: relative;
  overflow: hidden;
}

.enterprise-login-page .login-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #2d87ea, #48b8ff, #da5aac);
}

.enterprise-login-page .login-brand-logo {
  display: none;
  margin-bottom: 14px;
  text-align: center;
}

.enterprise-login-page .login-brand-logo img {
  max-width: 120px;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.enterprise-login-page .login-card h3 {
  margin: 0 0 22px;
  font-family: "Sora", "Manrope", sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  color: #142945;
}

.enterprise-login-page .mb-3 {
  margin-bottom: 0.95rem;
}

.enterprise-login-page .login-input-wrap {
  position: relative;
}

.enterprise-login-page label {
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #304562;
}

.enterprise-login-page input.form-control {
  border-radius: 8px;
  padding: 12px 12px 12px 42px;
  border: 1px solid #cfd9e8;
  background: #f8fbff;
  color: #16263b;
}

.enterprise-login-page .login-input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7085a2;
  pointer-events: none;
  transform: translateY(-50%);
}

.enterprise-login-page .login-input-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.enterprise-login-page input.form-control::placeholder {
  color: #7a8ca4;
}

.enterprise-login-page input.form-control:focus {
  border-color: #5b8ee6;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.enterprise-login-page .btn-login {
  width: min(100%, 190px);
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #ffffff;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px auto 0;
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.enterprise-login-page .btn-login:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 12px 24px rgba(26, 80, 172, 0.26);
}

.enterprise-login-page .btn-login:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.enterprise-login-page .footer {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: #777;
}

.enterprise-login-page .alert.error {
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid rgba(198, 44, 57, 0.28);
  background: rgba(221, 56, 70, 0.08);
  color: #9f2230;
  padding: 9px 11px;
  font-size: 0.88rem;
}

:root {
  --enterprise-login-compact-scale: 0.9;
}

@media (min-width: 901px) {
  .enterprise-login-page::before {
    background-size: 58px 58px;
  }

  .enterprise-login-page .branding {
    padding: 38px 30px;
  }

  .enterprise-login-page .branding-content {
    max-width: 455px;
  }

  .enterprise-login-page .branding-logo-wrap {
    width: clamp(155px, 20vw, 216px);
    margin-bottom: 22px;
    border-radius: 20px;
    padding: 14px;
  }

  .enterprise-login-page .branding-logo-wrap img {
    border-radius: 12px;
  }

  .enterprise-login-page .branding h1 {
    margin-bottom: 10px;
    font-size: clamp(1.82rem, 3vw, 2.72rem);
  }

  .enterprise-login-page .branding p {
    margin-bottom: 20px;
    max-width: 390px;
    font-size: clamp(0.92rem, 1.22vw, 1.05rem);
  }

  .enterprise-login-page .features {
    gap: 6px;
  }

  .enterprise-login-page .features span {
    padding: 6px 11px;
    font-size: 12px;
  }

  .enterprise-login-page .login-area {
    padding: 18px;
  }

  .enterprise-login-page .login-panel {
    width: min(388px, 100%);
    gap: 8px;
  }

  .enterprise-login-page .login-theme-toggle {
    transform: scale(var(--enterprise-login-compact-scale));
    transform-origin: right center;
  }

  .enterprise-login-page .login-card {
    padding: 32px 28px 24px;
    border-radius: 17px;
  }

  .enterprise-login-page .login-card::before {
    height: 3px;
  }

  .enterprise-login-page .login-card h3 {
    margin: 0 0 18px;
    font-size: 1.26rem;
  }

  .enterprise-login-page .mb-3 {
    margin-bottom: 0.8rem;
  }

  .enterprise-login-page label {
    margin-bottom: 5px;
    font-size: 0.79rem;
  }

  .enterprise-login-page input.form-control {
    border-radius: 7px;
    padding: 10px 11px 10px 39px;
  }

  .enterprise-login-page .login-input-icon {
    left: 12px;
    width: 16px;
    height: 16px;
  }

  .enterprise-login-page .login-input-icon svg {
    width: 16px;
    height: 16px;
  }

  .enterprise-login-page .btn-login {
    width: min(100%, 208px);
    padding: 9px 14px;
    border-radius: 7px;
  }

  .enterprise-login-page .footer {
    margin-top: 12px;
    font-size: 12px;
  }

  .enterprise-login-page .alert.error {
    margin-bottom: 11px;
    padding: 8px 10px;
    font-size: 0.82rem;
  }
}

:root[data-theme="dark"] .enterprise-login-page {
  background:
    radial-gradient(circle at 86% 12%, rgba(88, 157, 245, 0.22), transparent 36%),
    radial-gradient(circle at 12% 86%, rgba(38, 97, 194, 0.2), transparent 38%),
    linear-gradient(145deg, #e8f0fb, #f6f9ff 58%, #edf3fd);
}

:root[data-theme="dark"] .enterprise-login-page .login-area {
  background: transparent;
}

:root[data-theme="dark"] .enterprise-login-page .login-card {
  background: #ffffff;
  border-color: #dbe7f7;
}

:root[data-theme="dark"] .enterprise-login-page label {
  color: #304562;
}

:root[data-theme="dark"] .enterprise-login-page input.form-control {
  background: #ffffff;
  color: #16263b;
  border-color: #cfd9e8;
}

:root[data-theme="dark"] .enterprise-login-page .footer {
  color: #777;
}

@keyframes enterprise-login-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .enterprise-login-page .branding {
    display: none;
  }

  .enterprise-login-page .login-area {
    padding: 18px 14px;
  }

  .enterprise-login-page .login-card {
    width: 100%;
    padding: 30px 22px 24px;
    border-radius: 16px;
  }

  .enterprise-login-page .login-brand-logo {
    display: block;
  }

  .enterprise-login-page .login-theme-toggle {
    justify-self: center;
  }
}

@media (max-width: 980px) {
  body.enterprise-mobile-nav-open {
    overflow: hidden;
  }

  body.enterprise-mobile-nav-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  body:not(.enterprise-login-page) .app-shell {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  body:not(.enterprise-login-page) .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 80;
    width: min(320px, 86vw);
    height: 100dvh;
    padding: 18px 14px 18px;
    border-right: 1px solid rgba(175, 208, 255, 0.2);
    border-bottom: 0;
    transform: translateX(-108%);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
    box-shadow: 0 30px 54px rgba(3, 16, 35, 0.38);
    overscroll-behavior: contain;
  }

  body.enterprise-mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  body:not(.enterprise-login-page) .sidebar-mobile-head {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 6px;
  }

  body:not(.enterprise-login-page) .sidebar-close,
  body:not(.enterprise-login-page) .mobile-nav-toggle {
    display: inline-flex;
  }

  body:not(.enterprise-login-page) .sidebar-nav {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body:not(.enterprise-login-page) .logout-link {
    margin-top: 0;
  }

  body:not(.enterprise-login-page) .content {
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding: 16px 14px 22px;
  }

  body:not(.enterprise-login-page) .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    align-items: flex-start;
    padding: 4px 0 12px;
    margin-bottom: 14px;
    background: linear-gradient(180deg, rgba(232, 238, 247, 0.95), rgba(232, 238, 247, 0.78));
    backdrop-filter: blur(12px);
  }

  :root[data-theme="dark"] body:not(.enterprise-login-page) .topbar {
    background: linear-gradient(180deg, rgba(7, 19, 39, 0.96), rgba(7, 19, 39, 0.8));
  }

  body:not(.enterprise-login-page) .topbar-leading,
  body:not(.enterprise-login-page) .topbar-actions {
    width: 100%;
  }

  body:not(.enterprise-login-page) .topbar-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  body:not(.enterprise-login-page) .topbar-user {
    max-width: 100%;
  }

  body:not(.enterprise-login-page) .topbar-user > div,
  body:not(.enterprise-login-page) .topbar-title-group {
    min-width: 0;
  }

  body:not(.enterprise-login-page) .topbar-user strong,
  body:not(.enterprise-login-page) .topbar-user small {
    overflow-wrap: anywhere;
  }

  body:not(.enterprise-login-page) .theme-toggle {
    max-width: 100%;
  }

  body:not(.enterprise-login-page) .dashboard-hero,
  body:not(.enterprise-login-page) .dashboard-split,
  body:not(.enterprise-login-page) .settings-logo-wrap {
    grid-template-columns: 1fr;
  }

  body:not(.enterprise-login-page) .table-toolbar,
  body:not(.enterprise-login-page) .search-form,
  body:not(.enterprise-login-page) .portal-notas-modal-head,
  body:not(.enterprise-login-page) .financeiro-toolbar-actions,
  body:not(.enterprise-login-page) .financial-report-head {
    flex-direction: column;
    align-items: stretch;
  }

  body:not(.enterprise-login-page) .search-form input {
    min-width: 0;
  }

  body:not(.enterprise-login-page) .search-form > *,
  body:not(.enterprise-login-page) .table-toolbar > *,
  body:not(.enterprise-login-page) .financeiro-toolbar-actions > * {
    width: 100%;
  }

  body:not(.enterprise-login-page) .modal-card {
    width: min(100%, calc(100vw - 20px));
    padding: 16px;
  }

  body:not(.enterprise-login-page) .portal-notas-modal-card {
    width: min(100%, calc(100vw - 20px));
    max-height: min(88vh, 760px);
  }

  body:not(.enterprise-login-page) .update-modal-card {
    width: min(100%, calc(100vw - 20px));
    padding: 18px 16px;
  }

  body:not(.enterprise-login-page) .related-actions-modal-card {
    width: min(100%, calc(100vw - 20px));
    padding: 16px;
  }

  body:not(.enterprise-login-page) .update-modal-actions {
    grid-template-columns: 1fr;
  }

  body:not(.enterprise-login-page) .financial-report-card {
    width: min(100%, calc(100vw - 18px));
    max-height: 90vh;
    padding: 16px;
    border-radius: 18px;
  }

  body:not(.enterprise-login-page) .financial-report-head-actions,
  body:not(.enterprise-login-page) .financial-report-filter-actions {
    width: 100%;
    justify-content: stretch;
  }

  body:not(.enterprise-login-page) .financial-report-head-actions > *,
  body:not(.enterprise-login-page) .financial-report-filter-actions > * {
    width: 100%;
  }

  body:not(.enterprise-login-page) .financial-report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not(.enterprise-login-page) .settings-inline-btn,
  body:not(.enterprise-login-page) .upload-proof-form .upload-proof-btn {
    width: 100%;
    justify-self: stretch;
  }

  body:not(.enterprise-login-page) .settings-field-compact,
  body:not(.enterprise-login-page) .settings-field-tight {
    width: 100%;
    justify-self: stretch;
  }

  body:not(.enterprise-login-page) .pagination {
    justify-content: center;
  }

  :root[data-theme="dark"] body:not(.enterprise-login-page) .table-wrap {
    border-color: #33567f;
    background: linear-gradient(180deg, rgba(13, 31, 56, 0.96), rgba(10, 24, 45, 0.98));
  }

  :root[data-theme="dark"] body:not(.enterprise-login-page) .table-wrap table {
    background: transparent;
  }

  :root[data-theme="dark"] body:not(.enterprise-login-page) .table-wrap thead th {
    color: #d8e7fb;
    background: #132a49;
  }

  :root[data-theme="dark"] body:not(.enterprise-login-page) .table-wrap tbody td {
    color: #edf5ff;
    background: rgba(10, 25, 46, 0.92);
  }

  :root[data-theme="dark"] body:not(.enterprise-login-page) .table-wrap tbody tr:nth-child(even) td {
    background: rgba(13, 29, 53, 0.98);
  }

  :root[data-theme="dark"] body:not(.enterprise-login-page) .table-wrap tbody tr:hover td {
    background: #11233f;
  }

  :root[data-theme="dark"] body:not(.enterprise-login-page) .table-summary {
    color: #c8dbf3;
  }
}

@media (max-width: 700px) {
  body:not(.enterprise-login-page) .content {
    padding: 12px 10px 20px;
  }

  body:not(.enterprise-login-page) .topbar {
    gap: 10px;
  }

  body:not(.enterprise-login-page) .topbar-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  body:not(.enterprise-login-page) .theme-toggle {
    width: 100%;
    justify-content: center;
  }

  body:not(.enterprise-login-page) .topbar-user {
    width: 100%;
    justify-content: flex-start;
  }

  body:not(.enterprise-login-page) .card,
  body:not(.enterprise-login-page) .dashboard-panel,
  body:not(.enterprise-login-page) .stat-card {
    padding: 14px;
  }

  body:not(.enterprise-login-page) .grid.cards,
  body:not(.enterprise-login-page) .dashboard-grid,
  body:not(.enterprise-login-page) .license-kpi-grid,
  body:not(.enterprise-login-page) .financial-report-kpis {
    grid-template-columns: 1fr;
  }

  body:not(.enterprise-login-page) .dashboard-chart-wrap,
  body:not(.enterprise-login-page) .dashboard-panel canvas {
    height: 220px !important;
    max-height: 220px;
  }

  body:not(.enterprise-login-page) .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  body:not(.enterprise-login-page) .section-head h2 {
    font-size: 1rem;
  }

  body:not(.enterprise-login-page) .table-wrap table {
    min-width: 640px;
  }

  body:not(.enterprise-login-page) th,
  body:not(.enterprise-login-page) td {
    padding: 9px 8px;
    font-size: 0.82rem;
  }

  body:not(.enterprise-login-page) .search-form button,
  body:not(.enterprise-login-page) .search-form .btn,
  body:not(.enterprise-login-page) .table-toolbar button,
  body:not(.enterprise-login-page) .table-toolbar .btn,
  body:not(.enterprise-login-page) .portal-notas-trigger,
  body:not(.enterprise-login-page) .portal-notas-close,
  body:not(.enterprise-login-page) .financial-report-head-actions button,
  body:not(.enterprise-login-page) .financial-report-head-actions .btn,
  body:not(.enterprise-login-page) .financial-report-filter-actions button,
  body:not(.enterprise-login-page) .financial-report-filter-actions .btn {
    width: 100%;
    text-align: center;
  }

  body:not(.enterprise-login-page) .financial-report-filters {
    grid-template-columns: 1fr;
  }

  body:not(.enterprise-login-page) .welcome-modal-card {
    width: min(100%, calc(100vw - 20px));
    padding: 16px;
  }

  body:not(.enterprise-login-page) .modal-card h3,
  body:not(.enterprise-login-page) .update-modal-title {
    font-size: 1.12rem;
  }

  body:not(.enterprise-login-page) .related-actions-head {
    align-items: flex-start;
  }

  .enterprise-login-page .login-area {
    min-height: 100dvh;
    padding: 16px 12px;
  }

  .enterprise-login-page .login-panel {
    width: 100%;
    gap: 8px;
  }

  .enterprise-login-page .login-card {
    padding: 26px 18px 20px;
    border-radius: 16px;
  }

  .enterprise-login-page .login-card h3 {
    margin-bottom: 18px;
    font-size: 1.2rem;
  }

  .enterprise-login-page .login-theme-toggle {
    width: 100%;
    justify-content: center;
  }

  .enterprise-login-page .btn-login {
    width: 100%;
    max-width: none;
    margin-top: 8px;
  }
}

@media (max-width: 540px) {
  body:not(.enterprise-login-page) .mobile-nav-toggle,
  body:not(.enterprise-login-page) .sidebar-close {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  body:not(.enterprise-login-page) .topbar h1 {
    font-size: 1.25rem;
  }

  body:not(.enterprise-login-page) .topbar-kicker {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  body:not(.enterprise-login-page) .dashboard-chips {
    gap: 6px;
  }

  body:not(.enterprise-login-page) .dashboard-chips span {
    width: 100%;
    text-align: center;
  }

  body:not(.enterprise-login-page) .stat-card {
    flex-direction: column;
    align-items: flex-start;
  }

  body:not(.enterprise-login-page) .stat-card strong {
    font-size: 1.45rem;
  }

  .enterprise-login-page .login-card {
    padding: 24px 16px 18px;
  }

  .enterprise-login-page .footer {
    font-size: 12px;
    line-height: 1.45;
  }
}

/* Compactacao desktop (web + app .exe) */
:root {
  --enterprise-compact-scale: 0.85;
}

@media (min-width: 981px) {
  html {
    font-size: calc(16px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .app-shell {
    grid-template-columns: calc(278px * var(--enterprise-compact-scale)) minmax(0, 1fr);
  }

  body:not(.enterprise-login-page) .sidebar {
    padding: calc(22px * var(--enterprise-compact-scale))
      calc(16px * var(--enterprise-compact-scale))
      calc(18px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .sidebar-brand {
    grid-template-columns: calc(34px * var(--enterprise-compact-scale)) 1fr;
    gap: calc(10px * var(--enterprise-compact-scale));
    margin-bottom: calc(20px * var(--enterprise-compact-scale));
    padding-bottom: calc(15px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .brand-symbol {
    width: calc(34px * var(--enterprise-compact-scale));
    height: calc(34px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .nav-label {
    margin: calc(16px * var(--enterprise-compact-scale))
      calc(10px * var(--enterprise-compact-scale))
      calc(8px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .sidebar-nav {
    gap: calc(6px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .nav-link {
    gap: calc(11px * var(--enterprise-compact-scale));
    padding: calc(10px * var(--enterprise-compact-scale))
      calc(11px * var(--enterprise-compact-scale));
    border-radius: calc(11px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .nav-icon {
    width: calc(30px * var(--enterprise-compact-scale));
    height: calc(30px * var(--enterprise-compact-scale));
    flex: 0 0 calc(30px * var(--enterprise-compact-scale));
    border-radius: calc(9px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .nav-icon svg {
    width: calc(17px * var(--enterprise-compact-scale));
    height: calc(17px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .logout-link {
    margin-top: calc(14px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .content {
    padding: calc(24px * var(--enterprise-compact-scale))
      clamp(calc(16px * var(--enterprise-compact-scale)), 3vw, calc(34px * var(--enterprise-compact-scale)))
      calc(30px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .topbar {
    gap: calc(12px * var(--enterprise-compact-scale));
    margin-bottom: calc(18px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .topbar-actions {
    gap: calc(10px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .topbar-user {
    gap: calc(10px * var(--enterprise-compact-scale));
    padding: calc(8px * var(--enterprise-compact-scale))
      calc(11px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .topbar-avatar {
    width: calc(34px * var(--enterprise-compact-scale));
    height: calc(34px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .theme-toggle {
    padding: calc(6px * var(--enterprise-compact-scale))
      calc(11px * var(--enterprise-compact-scale))
      calc(6px * var(--enterprise-compact-scale))
      calc(8px * var(--enterprise-compact-scale));
    gap: calc(9px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .theme-toggle-dot {
    width: calc(20px * var(--enterprise-compact-scale));
    height: calc(20px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .card {
    padding: calc(18px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .grid {
    gap: calc(14px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .grid.cards {
    grid-template-columns: repeat(auto-fit, minmax(calc(200px * var(--enterprise-compact-scale)), 1fr));
  }

  body:not(.enterprise-login-page) input,
  body:not(.enterprise-login-page) select,
  body:not(.enterprise-login-page) textarea {
    padding: calc(10px * var(--enterprise-compact-scale))
      calc(11px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) button,
  body:not(.enterprise-login-page) .btn {
    padding: calc(10px * var(--enterprise-compact-scale))
      calc(14px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) th,
  body:not(.enterprise-login-page) td {
    padding: calc(11px * var(--enterprise-compact-scale))
      calc(12px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .dashboard-hero {
    gap: calc(18px * var(--enterprise-compact-scale));
    margin-bottom: calc(14px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .dashboard-chips {
    gap: calc(8px * var(--enterprise-compact-scale));
    margin-top: calc(12px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .dashboard-chips span {
    padding: calc(6px * var(--enterprise-compact-scale))
      calc(9px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .dashboard-health {
    padding: calc(10px * var(--enterprise-compact-scale));
    gap: calc(9px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .health-row {
    border-radius: calc(11px * var(--enterprise-compact-scale));
    padding: calc(10px * var(--enterprise-compact-scale))
      calc(11px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(calc(210px * var(--enterprise-compact-scale)), 1fr));
    gap: calc(12px * var(--enterprise-compact-scale));
    margin-bottom: calc(14px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .stat-card {
    gap: calc(12px * var(--enterprise-compact-scale));
    padding: calc(14px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .stat-card-icon {
    width: calc(42px * var(--enterprise-compact-scale));
    height: calc(42px * var(--enterprise-compact-scale));
    flex: 0 0 calc(42px * var(--enterprise-compact-scale));
    border-radius: calc(13px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .stat-card-icon svg {
    width: calc(21px * var(--enterprise-compact-scale));
    height: calc(21px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .dashboard-split {
    grid-template-columns:
      minmax(calc(350px * var(--enterprise-compact-scale)), 1.8fr)
      minmax(calc(290px * var(--enterprise-compact-scale)), 1fr);
    gap: calc(14px * var(--enterprise-compact-scale));
    margin-bottom: calc(14px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .dashboard-panel {
    padding: calc(16px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .section-head {
    gap: calc(10px * var(--enterprise-compact-scale));
    margin-bottom: calc(10px * var(--enterprise-compact-scale));
  }

  body:not(.enterprise-login-page) .dashboard-chart-wrap,
  body:not(.enterprise-login-page) .dashboard-panel canvas {
    height: calc(260px * var(--enterprise-compact-scale)) !important;
    max-height: calc(260px * var(--enterprise-compact-scale));
  }
}
