@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700&display=swap");

:root {
  --cactus-green-950: #0c121a;
  --cactus-green-900: #131d2b;
  --cactus-green-800: #1f2e42;
  --cactus-green-700: #30455f;
  --cactus-green-600: #3d5d7f;
  --cactus-gold-500: #efc24a;
  --cactus-gold-600: #dca92d;

  --bg: #e9ecef;
  --bg-soft: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --line: #d5dbe2;
  --line-strong: #b4bec9;
  --text: #151b22;
  --muted: #5f666f;

  --brand: #1f395f;
  --brand-2: #2c4e7d;
  --ok: #1f488a;
  --warn: #996210;
  --danger: #9c2840;

  --radius: 14px;
  --shadow-sm: 0 6px 18px rgba(12, 18, 26, 0.06);
  --shadow-md: 0 10px 28px rgba(12, 18, 26, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", "Plus Jakarta Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 700px at 82% -5%, rgba(61, 94, 127, 0.2), transparent 55%),
    linear-gradient(180deg, #eef1f4 0%, #edeff2 45%, #f6f7f8 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("/static/brand/endor-bg-v2.png");
  background-position: right -220px top -130px;
  background-repeat: no-repeat;
  background-size: min(760px, 52vw);
  opacity: 0.08;
  z-index: -1;
}

a {
  color: var(--brand-2);
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
}

.topbar-shell {
  display: grid;
  grid-template-columns: minmax(260px, 390px) minmax(330px, 1fr) auto;
  align-items: center;
  gap: 1rem;
  width: min(1720px, calc(100% - 1.5rem));
  margin: 0.6rem auto;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(31, 44, 62, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(247, 249, 252, 0.78), rgba(243, 246, 250, 0.68));
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  box-shadow: 0 10px 24px rgba(13, 21, 32, 0.08);
}

.brand-panel {
  display: flex;
  align-items: center;
  gap: 0.68rem;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
}

.brand-logo {
  width: auto;
  height: auto;
  max-height: 54px;
  max-width: 200px;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  opacity: 0.98;
  mix-blend-mode: normal;
  filter: none;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-company {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #243144;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.brand-product {
  margin: 0.1rem 0 0;
  color: #455264;
  font-size: 0.83rem;
  font-weight: 650;
}

.search-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
}

.search-bar input,
.search-bar select {
  border: 1px solid rgba(159, 171, 185, 0.7);
  background: rgba(255, 255, 255, 0.86);
  color: #1e2837;
  border-radius: 12px;
  padding: 0.58rem 0.75rem;
}

.search-bar input::placeholder {
  color: #626c78;
}

.search-bar select {
  width: 160px;
}

.search-bar button {
  border: 1px solid rgba(58, 92, 126, 0.5);
  border-radius: 14px;
  padding: 0.6rem 1rem;
  background: linear-gradient(180deg, var(--cactus-gold-500), var(--cactus-gold-600));
  color: #1f220f;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(161, 125, 33, 0.22);
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem;
}

.side-nav {
  position: sticky;
  top: 98px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow: auto;
  background:
    linear-gradient(165deg, rgba(10, 15, 22, 0.94), rgba(21, 32, 49, 0.94)),
    url("/static/brand/endor-bg-v2.png") center / cover no-repeat;
  border: 1px solid rgba(236, 241, 246, 0.12);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 0.75rem;
}

.side-nav-head p {
  margin: 0 0 0.55rem;
  color: rgba(233, 238, 244, 0.82);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.side-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.26rem;
}

.side-nav-list a {
  display: block;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.5rem 0.62rem;
  color: rgba(236, 241, 246, 0.91);
  font-size: 0.89rem;
  font-weight: 650;
  transition: all 0.16s ease;
}

.side-nav-list a:hover {
  border-color: rgba(239, 194, 74, 0.32);
  background: rgba(239, 194, 74, 0.12);
  color: #fff8df;
}

.side-nav-list a.active {
  border-color: rgba(239, 194, 74, 0.52);
  background: rgba(239, 194, 74, 0.2);
  color: #fff5cc;
}

.user-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  min-width: 190px;
}

.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.06rem;
}

.user-meta strong {
  color: #283342;
  font-size: 0.86rem;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta span {
  color: #5b6674;
  font-size: 0.72rem;
}

.container {
  max-width: 100%;
  margin: 0;
  padding: 0.3rem 0.35rem 1.2rem 0.15rem;
}

h1,
h2,
h3 {
  font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
  letter-spacing: -0.01em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.95rem;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 1rem;
  align-items: start;
}

.dashboard-main {
  min-width: 0;
}

.dashboard-sidebar {
  min-width: 0;
}

.ticket-quick-panel {
  position: sticky;
  top: 118px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 249, 252, 0.97));
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}

.ticket-quick-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.8rem;
}

.ticket-quick-header h3 {
  margin: 0;
}

.ticket-quick-header p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.ticket-quick-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.ticket-stat-card {
  border: 1px solid #dbe1e7;
  border-radius: 12px;
  background: #f8f9fb;
  padding: 0.65rem;
}

.ticket-stat-card span {
  display: block;
  color: #555f6d;
  font-size: 0.8rem;
  font-weight: 600;
}

.ticket-stat-card strong {
  display: block;
  margin-top: 0.18rem;
  font-size: 1.35rem;
  color: #1a2433;
}

.ticket-quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.ticket-quick-panel h4 {
  margin: 0 0 0.55rem;
}

.ticket-quick-list {
  display: grid;
  gap: 0.55rem;
}

.ticket-quick-item {
  display: block;
  border: 1px solid #dae0e8;
  border-radius: 12px;
  background: #f7f9fb;
  padding: 0.62rem;
  transition: all 0.15s ease;
}

.ticket-quick-item:hover {
  border-color: #c5cfdb;
  background: #f2f6fa;
}

.ticket-quick-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ticket-quick-item p {
  margin: 0.32rem 0 0.45rem;
  color: #2a3543;
  font-size: 0.9rem;
  line-height: 1.3;
}

.ticket-quick-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  color: #5a636f;
  font-size: 0.81rem;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(249, 250, 252, 0.97));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.card p {
  margin: 0;
  color: #525a64;
  font-weight: 600;
}

.card strong {
  display: block;
  font-size: 1.82rem;
  margin-top: 0.44rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.status-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem;
}

.status-item span {
  color: var(--muted);
  font-weight: 600;
}

.status-item strong {
  display: block;
  font-size: 1.35rem;
  margin-top: 0.35rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.ticket-filter-form {
  margin: 0.85rem 0 1rem;
  display: grid;
  gap: 0.52rem;
}

.ticket-filter-main {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) repeat(2, minmax(160px, 220px)) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.ticket-filter-main .btn {
  white-space: nowrap;
}

.ticket-filter-advanced {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.2rem 0.5rem 0.55rem;
}

.ticket-filter-advanced summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: #344357;
  padding: 0.3rem 0.2rem;
}

.ticket-filter-advanced summary::-webkit-details-marker {
  display: none;
}

.ticket-filter-advanced[open] summary {
  margin-bottom: 0.4rem;
}

.ticket-filter-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.55rem;
}

.ticket-filter-advanced-grid label {
  display: grid;
  gap: 0.25rem;
  color: #4e5866;
  font-size: 0.84rem;
  font-weight: 650;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.57rem 0.72rem;
  background: #fff;
  color: #1b232f;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(61, 94, 127, 0.2);
  border-color: #778ba0;
}

button,
.btn {
  background: linear-gradient(180deg, #2c4e7d, #1f395f);
  color: #f6f8fb;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: linear-gradient(180deg, #666f7c, #4f5763);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.full-width {
  grid-column: 1 / -1;
}

.inline-check {
  flex-direction: row !important;
  align-items: center;
}

.inline-check input {
  width: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

th,
td {
  text-align: left;
  padding: 0.73rem;
  border-bottom: 1px solid #e8ebef;
  vertical-align: top;
}

th {
  background: #edf0f4;
  color: #333d4c;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8rem;
  max-width: 560px;
}

.badge {
  border-radius: 999px;
  padding: 0.21rem 0.58rem;
  font-size: 0.77rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.badge-available {
  background: #dfe8f4;
  color: #193d77;
}

.badge-allocated {
  background: #d8e0eb;
  color: #1f395f;
}

.badge-maintenance {
  background: #fff1ce;
  color: #88580a;
}

.badge-retired {
  background: #f8dfe4;
  color: #8e3042;
}

.badge-alocado {
  background: #d8e0eb;
  color: #1f395f;
}

.badge-em_estoque {
  background: #dfe8f4;
  color: #193d77;
}

.badge-onboarding {
  background: #e4efff;
  color: #1f4f98;
}

.badge-defeito {
  background: #ffe6dd;
  color: #954322;
}

.badge-nao_devolvido {
  background: #ffe4e4;
  color: #8f2f2f;
}

.badge-extraviado {
  background: #ffe0e0;
  color: #8b1f3e;
}

.badge-em_transito {
  background: #efe8ff;
  color: #5b3d96;
}

.alert {
  border-radius: 10px;
  padding: 0.78rem;
  border: 1px solid #d3dbe4;
  background: #edf1f5;
  color: #2b323b;
}

.alert.error {
  border-color: #f1b9c6;
  background: #ffeef2;
  color: var(--danger);
}

.alert.success {
  border-color: #b7cbeb;
  background: #eaf0f9;
  color: var(--ok);
}

.inline-form {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.inline-form a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c7cfd8;
  border-radius: 10px;
  padding: 0.5rem 0.68rem;
  background: #f4f7fa;
  color: #324053;
  font-weight: 700;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  margin-bottom: 1rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.ticket-priority {
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.ticket-priority-baixa {
  background: #e7edf8;
  color: #0f326b;
}

.ticket-priority-media {
  background: #e7f0ff;
  color: #1f4e9a;
}

.ticket-priority-alta {
  background: #fff2da;
  color: #905d0f;
}

.ticket-priority-critica {
  background: #ffe5ea;
  color: #9b223d;
}

.sla-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.sla-no_prazo {
  background: #e6edf7;
  color: #0f326b;
}

.sla-alerta {
  background: #fff3da;
  color: #8f5d15;
}

.sla-violado {
  background: #ffe5ea;
  color: #9b223d;
}

.sla-encerrado {
  background: #e8ecf0;
  color: #42576a;
}

.sla-sem_sla {
  background: #f1f4f5;
  color: #51616f;
}

.ticket-layout {
  display: grid;
  grid-template-columns: minmax(460px, 1.2fr) minmax(320px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.ticket-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
}

.ticket-panel h3 {
  margin-top: 0;
  margin-bottom: 0.65rem;
}

.ticket-summary-grid {
  background: var(--surface-soft);
  border: 1px solid #e4e9ee;
  box-shadow: none;
}

.ticket-summary-grid strong {
  color: #313b4a;
}

.ticket-description {
  background: #f8f9fb;
  border: 1px solid #e0e5eb;
  border-radius: 12px;
  padding: 0.75rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 1rem;
}

.ticket-timeline {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.ticket-comment {
  border: 1px solid #dce2e8;
  border-radius: 12px;
  background: #f8f9fb;
  padding: 0.72rem;
}

.ticket-comment-internal {
  border-color: #f0d79f;
  background: #fff8e8;
}

.ticket-comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  color: #323e4f;
  margin-bottom: 0.4rem;
}

.ticket-comment-meta span {
  color: #606976;
  font-size: 0.82rem;
}

.ticket-private-tag {
  display: inline-flex;
  border-radius: 999px;
  background: #f4d58a;
  color: #6b4709;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.16rem 0.5rem;
  margin-bottom: 0.36rem;
}

.ticket-comment p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #eef2f8 100%);
}

.auth-stage {
  position: relative;
  z-index: 1;
  width: min(540px, 96vw);
  text-align: center;
}

.auth-brandmark {
  display: block;
  margin: 0 auto 0.9rem;
}

.auth-brandmark img {
  height: 76px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.auth-overline {
  margin: 0;
  font-size: clamp(0.82rem, 1.4vw, 1rem);
  line-height: 1.3;
  letter-spacing: 0.2em;
  font-weight: 700;
  text-transform: uppercase;
  color: #6b7891;
}

.auth-title {
  margin: 0.35rem 0 0.3rem;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1;
  letter-spacing: 0.04em;
  font-weight: 900;
  color: #16233a;
  text-transform: uppercase;
}

.auth-title-accent {
  color: #2f6bff;
}

.auth-subtitle {
  margin: 0 0 1.5rem;
  font-size: clamp(0.95rem, 1.6vw, 1.12rem);
  font-weight: 500;
  color: #6b7891;
}

.auth-card {
  width: min(520px, 94vw);
  margin: 0 auto;
  text-align: left;
  background: linear-gradient(165deg, #0c121a 0%, #182840 100%);
  border: 1px solid rgba(120, 160, 235, 0.22);
  border-radius: 22px;
  box-shadow:
    0 24px 50px rgba(12, 18, 26, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 1.6rem 1.6rem 1.5rem;
}

.auth-card-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.3rem;
}

.auth-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: rgba(45, 99, 235, 0.18);
  border: 1px solid rgba(90, 140, 240, 0.3);
  color: #6ea2ff;
}

.auth-card-icon svg {
  width: 22px;
  height: 22px;
}

.auth-card-subtitle {
  margin: 0;
  color: #eaf0fb;
  font-size: 1.04rem;
  font-weight: 600;
}

.muted-text {
  color: var(--muted);
}

.auth-card .alert.error {
  margin: 0 0 1rem;
  color: #ffd7de;
  background: rgba(156, 40, 64, 0.32);
  border: 1px solid rgba(220, 90, 110, 0.45);
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  font-size: 0.92rem;
}

.auth-form {
  display: grid;
  gap: 0.95rem;
}

.auth-field-group {
  display: grid;
  gap: 0.42rem;
}

.auth-field-group > label {
  color: #d7e1f5;
  font-size: 0.98rem;
  font-weight: 600;
}

.auth-field {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-field-icon {
  position: absolute;
  left: 0.95rem;
  display: inline-flex;
  color: #7e93bd;
  pointer-events: none;
}

.auth-field-icon svg {
  width: 18px;
  height: 18px;
}

.auth-field input {
  width: 100%;
  height: 52px;
  border: 1px solid rgba(125, 160, 230, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #f3f7ff;
  padding: 0 2.9rem;
  font-size: 1.02rem;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.auth-field input::placeholder {
  color: #8493b5;
}

.auth-field input:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.auth-eye {
  position: absolute;
  right: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #8493b5;
  cursor: pointer;
  border-radius: 8px;
}

.auth-eye:hover {
  color: #cdd9f0;
}

.auth-eye svg {
  width: 19px;
  height: 19px;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin: 0.1rem 0 0.25rem;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #d7e1f5;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.auth-remember input {
  width: 18px;
  height: 18px;
  accent-color: #2f6bff;
  cursor: pointer;
}

.auth-forgot {
  color: #6ea2ff;
  font-size: 0.95rem;
  font-weight: 600;
}

.auth-forgot:hover {
  text-decoration: underline;
}

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #2f74ff, #1b53e0);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 1.04rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(27, 83, 224, 0.4);
  transition: filter 0.15s, transform 0.05s;
}

.auth-submit svg {
  width: 20px;
  height: 20px;
}

.auth-submit:hover {
  filter: brightness(1.07);
}

.auth-submit:active {
  transform: translateY(1px);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.2rem 0;
  color: #8493b5;
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(125, 160, 230, 0.22);
}

.auth-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  height: 52px;
  border: 1px solid rgba(125, 160, 230, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: #dbe6fb;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.auth-secondary svg {
  width: 18px;
  height: 18px;
  color: #6ea2ff;
}

.auth-secondary:hover {
  background: rgba(120, 160, 235, 0.12);
  border-color: rgba(125, 160, 230, 0.6);
}

.auth-restricted {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(125, 160, 230, 0.16);
}

.auth-restricted-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: rgba(45, 99, 235, 0.16);
  color: #6ea2ff;
}

.auth-restricted-icon svg {
  width: 20px;
  height: 20px;
}

.auth-restricted-title {
  margin: 0;
  color: #eaf0fb;
  font-size: 0.98rem;
  font-weight: 700;
}

.auth-restricted-text {
  margin: 0.1rem 0 0;
  color: #9fb0d2;
  font-size: 0.86rem;
}

.auth-hint {
  margin: 1.3rem 0 0;
  font-size: 0.88rem;
  color: #aec0e2;
  text-align: center;
  text-shadow: 0 1px 6px rgba(3, 9, 22, 0.6);
}

.auth-hint strong {
  color: #dbe6fb;
}

@media (max-width: 640px) {
  .auth-wrap {
    padding: 0.8rem;
  }

  .auth-title {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }

  .auth-card {
    width: min(96vw, 520px);
    padding: 1.2rem 1.05rem;
  }
}

.filter-block {
  margin: 0.9rem 0;
  padding: 0.9rem;
  border: 1px solid #dae0e7;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdfe, #f3f6f9);
  box-shadow: var(--shadow-sm);
}

.filter-block h4 {
  margin: 0 0 0.58rem;
  color: #283342;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c8d0da;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: #354153;
  background: #f3f6fa;
  font-size: 0.84rem;
  font-weight: 700;
  transition: all 0.14s ease;
}

.chip:hover {
  border-color: #aab7c8;
  background: #ebf1f7;
}

.chip.active {
  border-color: rgba(239, 194, 74, 0.55);
  background: rgba(239, 194, 74, 0.22);
  color: #52400f;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.asset-card {
  border: 1px solid #d5dce4;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.asset-photo-wrap {
  display: block;
  background:
    radial-gradient(circle at 18% 18%, rgba(239, 194, 74, 0.2), transparent 54%),
    linear-gradient(140deg, #1f2e43, #2f4766);
  padding: 0.8rem;
  min-height: 150px;
}

.asset-photo {
  width: 100%;
  height: 130px;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.asset-body {
  padding: 0.85rem;
  display: grid;
  gap: 0.42rem;
}

.asset-body p {
  margin: 0;
  color: #4a535f;
  font-weight: 620;
}

.asset-title {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  align-items: center;
}

.asset-title strong {
  color: #192433;
}

.asset-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.asset-meta span {
  border-radius: 999px;
  border: 1px solid #d2d9e2;
  background: #f4f7fa;
  padding: 0.2rem 0.48rem;
  font-size: 0.76rem;
  color: #445060;
  font-weight: 700;
}

.asset-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.2rem;
}

.asset-actions a {
  font-size: 0.84rem;
  font-weight: 700;
}

.company-branch {
  border: 1px solid #dae0e8;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-sm);
  padding: 0.92rem;
  margin-bottom: 0.9rem;
}

.employee-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 0.7rem;
}

.employee-card {
  border: 1px solid #d4dbe4;
  border-radius: 12px;
  padding: 0.75rem;
  background: #f8fafc;
}

.employee-card strong {
  display: block;
  color: #1d2837;
  margin-bottom: 0.16rem;
}

.employee-card p {
  margin: 0;
  font-size: 0.86rem;
  color: #505965;
}

.employee-meta {
  margin: 0.42rem 0;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.employee-meta span {
  border: 1px solid #ced5de;
  background: #f1f4f8;
  color: #444e5d;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
}

.employee-list-table th,
.employee-list-table td {
  padding: 0.55rem 0.6rem;
  font-size: 0.86rem;
}

.employee-list-table td strong {
  color: #1d2837;
}

.employee-company-inline {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.employee-company-inline select {
  min-width: 170px;
  max-width: 230px;
}

.employee-company-inline button {
  padding: 0.38rem 0.62rem;
  border-radius: 8px;
  font-size: 0.78rem;
}

.maintenance-dashboard {
  margin-bottom: 1rem;
}

.maintenance-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(330px, 1fr));
  gap: 0.9rem;
}

.maintenance-chart-card {
  border: 1px solid #d4dbe3;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f6f8fb);
  box-shadow: var(--shadow-sm);
  padding: 0.95rem;
}

.maintenance-chart-card h3 {
  margin: 0 0 0.7rem;
}

.maintenance-chart-wrap {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.maintenance-donut {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(30, 40, 53, 0.12), 0 12px 22px rgba(21, 32, 46, 0.12);
}

.maintenance-donut::after {
  content: "";
  position: absolute;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: #ffffff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 0 1px #dbe0e6;
}

.maintenance-legend {
  display: grid;
  gap: 0.5rem;
  min-width: 240px;
}

.maintenance-legend-item {
  display: flex;
  align-items: center;
  gap: 0.58rem;
}

.maintenance-legend-item p {
  margin: 0.1rem 0 0;
  color: #5b6470;
  font-size: 0.83rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.kanban-board {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(6, minmax(250px, 1fr));
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
}

.kanban-column {
  background: linear-gradient(180deg, #f8fafd, #f2f4f7);
  border: 1px solid #d6dce4;
  border-radius: 14px;
  padding: 0.65rem;
  min-height: 240px;
}

.kanban-column header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.kanban-column h3 {
  margin: 0;
  font-size: 0.95rem;
}

.kanban-column header span {
  border-radius: 999px;
  border: 1px solid #ced5dd;
  background: #ecf0f5;
  color: #354253;
  min-width: 1.8rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.16rem 0.42rem;
}

.kanban-list {
  display: grid;
  gap: 0.45rem;
}

.kanban-card {
  display: block;
  border: 1px solid #d2d9e2;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.58rem;
  box-shadow: 0 3px 10px rgba(16, 24, 35, 0.05);
}

.kanban-card:hover {
  border-color: #bcc6d3;
  background: #f7f9fc;
}

.kanban-card p {
  margin: 0.3rem 0 0.42rem;
  color: #283343;
  font-size: 0.87rem;
  font-weight: 620;
}

.kanban-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
}

.kanban-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  color: #5d6571;
  font-size: 0.76rem;
}

.sheet-table th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.sheet-table tbody tr:hover {
  background: #f6f8fb;
}

.company-button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.68rem;
  margin: 0.85rem 0;
}

.company-button {
  border: 1px solid #d1d8e1;
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(17, 29, 46, 0.95), rgba(33, 53, 80, 0.93)),
    url("/static/brand/endor-bg-v2.png") center / cover no-repeat;
  color: #eff5fa;
  padding: 0.72rem 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-sm);
}

.company-button:hover {
  border-color: rgba(239, 194, 74, 0.44);
  color: #fff9e8;
}

.company-head-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.org-chart-shell {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.org-root-card,
.org-level-card {
  border: 1px solid #d1d8e1;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7f9fb);
  box-shadow: var(--shadow-sm);
  padding: 0.9rem;
}

.org-root-card p {
  margin: 0;
  color: #4f5967;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.org-root-card h3 {
  margin: 0.25rem 0 0.1rem;
  color: #182333;
  font-size: 1.35rem;
}

.org-root-card span {
  color: #5f6874;
  font-weight: 620;
  font-size: 0.87rem;
}

.org-level-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
}

.org-level-card header h3 {
  margin: 0;
}

.org-level-card header span {
  color: #555e6b;
  font-size: 0.83rem;
  font-weight: 650;
}

.org-node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.7rem;
}

.org-person-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.55rem;
}

.org-department-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 0.75rem;
}

.org-department-card {
  border: 1px solid #d0d7e0;
  border-radius: 14px;
  background: #fbfcfe;
  padding: 0.72rem;
}

.org-department-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}

.org-department-head h4 {
  margin: 0;
  color: #1d2838;
}

.org-department-head span {
  border: 1px solid #cacfda;
  border-radius: 999px;
  background: #ecf0f5;
  color: #3f4a5a;
  font-size: 0.74rem;
  font-weight: 750;
  padding: 0.17rem 0.5rem;
}

.org-subtitle {
  margin: 0.55rem 0 0.4rem;
  color: #4e5867;
  font-size: 0.77rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.org-person {
  border: 1px solid #d5dce4;
  border-radius: 11px;
  background: #ffffff;
  padding: 0.56rem;
}

.org-person strong {
  display: block;
  color: #202b3b;
  font-size: 0.88rem;
}

.org-person p {
  margin: 0.16rem 0 0.25rem;
  color: #505b69;
  font-size: 0.8rem;
  font-weight: 600;
}

.org-person span {
  color: #647080;
  font-size: 0.75rem;
  font-weight: 620;
}

.org-person-lead {
  border-color: #c8d2df;
  background: linear-gradient(180deg, #f8fafd, #f2f5f9);
}

.org-person-exec {
  border-color: rgba(38, 64, 103, 0.35);
  background: linear-gradient(160deg, rgba(24, 37, 56, 0.96), rgba(39, 59, 88, 0.95));
}

.org-person-exec strong,
.org-person-exec p,
.org-person-exec span {
  color: #eef2f8;
}

.department-folder-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0.9rem;
}

.department-folder-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfd7e1;
  border-radius: 999px;
  background: #f5f8fb;
  color: #2f3c4e;
  font-size: 0.82rem;
  font-weight: 740;
  padding: 0.3rem 0.7rem;
}

.department-folder-link:hover {
  border-color: #8fa1b5;
}

.department-folder-grid {
  display: grid;
  gap: 0.75rem;
}

.department-folder-card {
  border: 1px solid #d0d8e1;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.department-folder-card > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.82rem 0.9rem;
  background: #f1f4f8;
  border-bottom: 1px solid #dbe3eb;
}

.department-folder-card > summary::-webkit-details-marker {
  display: none;
}

.department-folder-card > summary strong {
  display: block;
  color: #182334;
  font-size: 1rem;
}

.department-folder-card > summary p {
  margin: 0.14rem 0 0;
  color: #5a636f;
  font-size: 0.8rem;
  font-weight: 620;
}

.department-folder-card > summary span {
  border: 1px solid #c8d0da;
  border-radius: 999px;
  background: #ffffff;
  color: #3e4a5a;
  font-size: 0.74rem;
  font-weight: 730;
  padding: 0.18rem 0.56rem;
}

.department-folder-content {
  display: grid;
  gap: 0.55rem;
  padding: 0.72rem 0.8rem 0.8rem;
}

.department-subfolder {
  border: 1px solid #d7dee6;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.department-subfolder > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.58rem 0.68rem;
  font-size: 0.87rem;
  font-weight: 760;
  color: #253040;
  background: #f4f7fa;
  border-bottom: 1px solid #e5eaef;
}

.department-subfolder > summary::-webkit-details-marker {
  display: none;
}

.department-subfolder-note {
  margin: 0.55rem 0.65rem 0.45rem;
  color: #5a6370;
  font-size: 0.79rem;
}

.department-hierarchy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 0.62rem;
  padding: 0 0.62rem 0.62rem;
}

.department-hierarchy-tier {
  border: 1px solid #d7dee6;
  border-radius: 12px;
  background: #fbfcfe;
  padding: 0.56rem;
}

.department-hierarchy-tier h4 {
  margin: 0 0 0.5rem;
  color: #2a3647;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.department-location-list {
  margin: 0;
  padding: 0.62rem 1.3rem 0.68rem;
  color: #313d4f;
}

.department-location-list li + li {
  margin-top: 0.38rem;
}

.department-tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  padding: 0.62rem;
}

.department-catalog-card {
  margin-top: 0.95rem;
}

.department-catalog-card h3 {
  margin: 0 0 0.6rem;
}

.notes-grid {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.7rem;
}

.note-card {
  border: 1px solid #d4dbe3;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-sm);
  padding: 0.78rem;
}

.note-card.done {
  border-color: #c8d2de;
  background: linear-gradient(180deg, #f5f8fb, #eef2f7);
  opacity: 0.9;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.4rem;
}

.note-header span {
  font-size: 0.78rem;
  color: #616a76;
}

.note-card p {
  margin: 0 0 0.45rem;
  white-space: pre-wrap;
}

.note-meta {
  display: grid;
  gap: 0.14rem;
  margin-bottom: 0.45rem;
  color: #515a66;
  font-size: 0.81rem;
}

.knowledge-grid {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.7rem;
}

.knowledge-card {
  border: 1px solid #d6dde5;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7f9fb);
  box-shadow: var(--shadow-sm);
  padding: 0.82rem;
}

.knowledge-card strong {
  color: #1f2a3b;
}

.knowledge-card p {
  margin: 0.35rem 0 0.42rem;
}

.knowledge-card small {
  color: #5e6671;
}

.asset-mgmt-shell {
  border: 1px solid #d5dce4;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7f9fb);
  box-shadow: var(--shadow-sm);
  padding: 0.9rem;
}

.asset-mgmt-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.asset-mgmt-kicker {
  margin: 0 0 0.2rem;
  color: #4c5765;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.asset-mgmt-head h2 {
  margin: 0;
}

.asset-mgmt-actions {
  display: flex;
  gap: 0.5rem;
}

.asset-column-editor {
  border: 1px solid #d3dae2;
  border-radius: 14px;
  background: #f7f9fb;
  padding: 0.8rem;
  margin-bottom: 0.7rem;
}

.asset-column-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.asset-column-editor-head h3 {
  margin: 0;
}

.asset-column-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.55rem;
  margin: 0.6rem 0;
}

.asset-column-config-item {
  border: 1px solid #d7dee6;
  border-radius: 10px;
  background: #fff;
  padding: 0.55rem;
  display: grid;
  gap: 0.38rem;
}

.asset-column-config-item > label:first-child {
  color: #263242;
  font-weight: 700;
}

.asset-column-config-item input[type="number"] {
  max-width: 90px;
}

.asset-mgmt-toolbar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 180px 190px 220px auto;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.7rem;
}

.asset-search-wrap input {
  width: 100%;
}

.asset-mgmt-toolbar button {
  white-space: nowrap;
}

.asset-mgmt-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.asset-mgmt-stats article {
  border: 1px solid #d5dce5;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.6rem 0.7rem;
}

.asset-mgmt-stats span {
  display: block;
  color: #5c6470;
  font-size: 0.79rem;
  font-weight: 600;
}

.asset-mgmt-stats strong {
  display: block;
  margin-top: 0.2rem;
  color: #162130;
  font-size: 1.35rem;
}

.asset-table-wrap {
  border: 1px solid #d4dbe4;
  border-radius: 14px;
  overflow: auto;
  background: #fff;
}

.asset-management-table {
  min-width: 1220px;
  border: 0;
  box-shadow: none;
}

.asset-management-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f0f3f6;
}

.asset-management-table tbody tr:hover {
  background: #f6f8fb;
}

.asset-name-link {
  font-weight: 800;
  color: #2b5f9f;
}

.asset-subline {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #646c77;
}

.asset-row-actions {
  display: flex;
  gap: 0.45rem;
  white-space: nowrap;
}

.asset-row-actions a {
  font-size: 0.83rem;
  font-weight: 700;
}

.asset-status-inline {
  min-width: 210px;
}

.asset-status-inline select {
  border-radius: 8px;
  padding: 0.32rem 0.48rem;
  font-size: 0.8rem;
}

.asset-status-select.status-alocado {
  background: #d8e0eb;
  color: #1f395f;
}

.asset-status-select.status-em_estoque {
  background: #dfe8f4;
  color: #193d77;
}

.asset-status-select.status-onboarding {
  background: #e4efff;
  color: #1f4f98;
}

.asset-status-select.status-defeito {
  background: #ffe6dd;
  color: #954322;
}

.asset-status-select.status-nao_devolvido {
  background: #ffe4e4;
  color: #8f2f2f;
}

.asset-status-select.status-extraviado {
  background: #ffe0e0;
  color: #8b1f3e;
}

.asset-status-select.status-em_transito {
  background: #efe8ff;
  color: #5b3d96;
}

.asset-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 0.95rem;
  align-items: start;
}

.asset-detail-main {
  display: grid;
  gap: 0.8rem;
}

.asset-overview-card,
.asset-detail-card,
.asset-history-card {
  border: 1px solid #d7dde5;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-sm);
  padding: 0.82rem;
}

.asset-overview-card {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 0.8rem;
}

.asset-overview-media {
  border: 1px solid #ced6e0;
  border-radius: 12px;
  padding: 0.45rem;
  background:
    radial-gradient(circle at 20% 12%, rgba(239, 194, 74, 0.22), transparent 56%),
    linear-gradient(155deg, #1b283c, #2a3f5e);
}

.asset-overview-media img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.asset-overview-summary h3,
.asset-detail-card h3,
.asset-history-card h3 {
  margin: 0 0 0.58rem;
}

.asset-summary-grid {
  margin: 0;
}

.asset-kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.52rem;
}

.asset-kv-grid div {
  border: 1px solid #dbe1e9;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.55rem;
}

.asset-kv-grid span {
  display: block;
  color: #606975;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.asset-kv-grid strong {
  display: block;
  margin-top: 0.18rem;
}

.asset-detail-side {
  display: grid;
  gap: 0.8rem;
  position: sticky;
  top: 105px;
}

.asset-history-list {
  display: grid;
  gap: 0.45rem;
  max-height: 510px;
  overflow: auto;
}

.asset-history-item {
  border: 1px solid #dbe1e8;
  border-radius: 10px;
  background: #f7f9fb;
  padding: 0.55rem;
}

.asset-history-date {
  display: block;
  color: #616974;
  font-size: 0.74rem;
  margin-bottom: 0.24rem;
}

.asset-history-item strong {
  display: block;
  color: #1f2a3a;
}

.asset-history-item p {
  margin: 0.2rem 0 0;
  color: #525b66;
  font-size: 0.83rem;
}

@media (max-width: 1280px) {
  .topbar-shell {
    grid-template-columns: minmax(250px, 1fr) minmax(290px, 1fr);
    grid-template-areas:
      "brand user"
      "search search";
    width: min(1720px, calc(100% - 1rem));
    margin: 0.45rem auto;
  }

  .brand-panel {
    grid-area: brand;
  }

  .search-bar {
    grid-area: search;
  }

  .user-menu {
    grid-area: user;
  }

  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .ticket-quick-panel {
    position: relative;
    top: 0;
  }

  .kanban-board {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
  }

  .asset-mgmt-toolbar {
    grid-template-columns: minmax(230px, 1fr) 1fr 1fr;
  }

  .asset-mgmt-toolbar button {
    grid-column: span 3;
  }

  .asset-mgmt-stats {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .asset-detail-layout {
    grid-template-columns: 1fr;
  }

  .asset-detail-side {
    position: relative;
    top: 0;
  }

  .org-department-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .side-nav {
    position: relative;
    top: 0;
    max-height: none;
    overflow: visible;
  }

  .side-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.42rem;
  }

  .side-nav-list a {
    border-radius: 999px;
    padding: 0.38rem 0.68rem;
    font-size: 0.84rem;
  }

  .company-head-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 860px) {
  .topbar-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "search"
      "user";
    padding: 0.65rem 0.75rem;
  }

  .user-menu {
    justify-content: space-between;
  }

  .user-meta {
    align-items: flex-start;
  }

  .search-bar {
    grid-template-columns: 1fr;
  }

  .search-bar select,
  .search-bar button {
    width: 100%;
  }

  .kanban-board {
    grid-template-columns: minmax(270px, 1fr);
  }

  .asset-overview-card {
    grid-template-columns: 1fr;
  }

  .asset-mgmt-toolbar {
    grid-template-columns: 1fr;
  }

  .asset-mgmt-toolbar button {
    grid-column: auto;
  }

  .asset-mgmt-stats {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .maintenance-chart-grid {
    grid-template-columns: 1fr;
  }

  .maintenance-chart-wrap {
    justify-content: center;
  }

  .maintenance-donut {
    width: 180px;
    height: 180px;
  }

  .maintenance-donut::after {
    width: 78px;
    height: 78px;
  }

  .container {
    padding: 0 0 0.65rem;
  }

  th,
  td {
    font-size: 0.88rem;
    padding: 0.58rem;
  }

  .ticket-layout {
    grid-template-columns: 1fr;
  }

  .org-department-grid,
  .org-node-grid,
  .org-person-list {
    grid-template-columns: 1fr;
  }

  .department-folder-card > summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .department-hierarchy-grid {
    grid-template-columns: 1fr;
  }

  .ticket-filter-main {
    grid-template-columns: 1fr;
  }
}

.theme-toggle-form {
  margin: 0;
}

.theme-toggle-form .btn {
  padding: 0.45rem 0.68rem;
  font-size: 0.79rem;
}

.vault-modal-shell {
  margin-top: 1rem;
  display: grid;
  place-items: center;
}

.vault-modal-card {
  width: min(540px, 96vw);
  border: 1px solid #d3dae3;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7f9fb);
  box-shadow: var(--shadow-md);
  padding: 1rem;
}

.vault-modal-card h3 {
  margin: 0 0 0.35rem;
}

.vault-secret {
  border: 1px solid #d3dae2;
  border-radius: 8px;
  background: #f5f7fa;
  padding: 0.2rem 0.45rem;
}

.vault-toggle-secret {
  margin-left: 0.45rem;
  padding: 0.25rem 0.42rem;
  border-radius: 8px;
  font-size: 0.75rem;
}

.ticket-charts-grid {
  margin: 0.9rem 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 0.8rem;
}

.ticket-bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.55rem;
  min-height: 220px;
}

.ticket-bar-item {
  flex: 1;
  min-width: 60px;
  display: grid;
  justify-items: center;
  gap: 0.22rem;
}

.ticket-bar-track {
  width: 100%;
  max-width: 52px;
  height: 148px;
  border: 1px solid #d5dce5;
  border-radius: 12px;
  background: #f2f5f8;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.ticket-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #2f548d, #1f3d6b);
  min-height: 8px;
}

.ticket-bar-item strong {
  color: #1e2938;
}

.ticket-bar-item span {
  color: #5d6672;
  font-size: 0.76rem;
}

.kanban-column.kanban-droppable {
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.kanban-column.kanban-droppable.kanban-drop-over {
  border-color: #6f839c;
  box-shadow: 0 0 0 2px rgba(72, 97, 128, 0.18);
  background: linear-gradient(180deg, #f2f6fa, #ecf1f6);
}

.employee-360-shell {
  margin-bottom: 1rem;
}

.employee-360-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0.7rem;
}

.employee-360-card {
  border: 1px solid #d4dbe4;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-sm);
  padding: 0.75rem;
}

.employee-360-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.55rem;
}

.employee-360-card h4 {
  margin: 0;
}

.employee-360-card header p {
  margin: 0.15rem 0 0;
  color: #5e6774;
  font-size: 0.82rem;
}

.employee-360-meta {
  margin: 0.45rem 0 0.6rem;
  display: grid;
  gap: 0.15rem;
  color: #505966;
  font-size: 0.82rem;
}

.employee-360-card details {
  border: 1px solid #dae0e8;
  border-radius: 10px;
  background: #f7f9fb;
  padding: 0.45rem 0.55rem;
  margin-bottom: 0.45rem;
}

.employee-360-card details summary {
  cursor: pointer;
  font-weight: 740;
  color: #273241;
}

.employee-360-card ul {
  margin: 0.45rem 0 0;
  padding-left: 1.05rem;
  color: #364151;
}

.employee-360-card li + li {
  margin-top: 0.24rem;
}

.license-folder-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.license-folder-card {
  border: 1px solid #d3dae3;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.license-folder-card > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.85rem;
  background: #f0f3f7;
  border-bottom: 1px solid #dce3eb;
}

.license-folder-card > summary::-webkit-details-marker {
  display: none;
}

.license-folder-card > summary strong {
  color: #1b2636;
}

.license-folder-card > summary p {
  margin: 0.2rem 0 0;
  color: #5a6370;
  font-size: 0.82rem;
  font-weight: 640;
}

.license-folder-card > summary span {
  border: 1px solid #d0d8e2;
  border-radius: 999px;
  background: #ffffff;
  color: #394555;
  font-size: 0.78rem;
  font-weight: 750;
  padding: 0.18rem 0.52rem;
}

.license-folder-content {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem;
}

.future-board {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(6, minmax(240px, 1fr));
  gap: 0.7rem;
  overflow-x: auto;
}

.future-column {
  border: 1px solid #d6dde5;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fafd, #f2f4f7);
  padding: 0.62rem;
}

.future-column header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.future-column header h3 {
  margin: 0;
  font-size: 0.92rem;
}

.future-column header span {
  border: 1px solid #cfd6df;
  border-radius: 999px;
  background: #ecf0f5;
  color: #3b4656;
  font-size: 0.76rem;
  font-weight: 780;
  padding: 0.16rem 0.48rem;
}

.future-column-list {
  display: grid;
  gap: 0.45rem;
}

.future-project-card {
  border: 1px solid #d6dde5;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.55rem;
}

.future-project-card > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
}

.future-project-card > summary::-webkit-details-marker {
  display: none;
}

.future-project-card p {
  margin: 0.45rem 0;
  color: #354050;
  font-size: 0.84rem;
}

.note-card.pinned {
  border-width: 2px;
}

.note-color-verde {
  border-left: 6px solid #2c528b;
}

.note-color-amarelo {
  border-left: 6px solid #d7ab3f;
}

.note-color-vermelho {
  border-left: 6px solid #bd3b4b;
}

.note-color-azul {
  border-left: 6px solid #2d5fae;
}

.note-color-roxo {
  border-left: 6px solid #6f4ca1;
}

body[data-theme="dark"] {
  --bg: #0d1118;
  --bg-soft: #131820;
  --surface: #171d26;
  --surface-soft: #1f2530;
  --line: #2b3443;
  --line-strong: #394557;
  --text: #e6ebf2;
  --muted: #a5adb9;
  --brand: #5d79a3;
  --brand-2: #809bc0;
  --ok: #6a8ec5;
  --warn: #dfbe72;
  --danger: #ef8da0;
  color-scheme: dark;
  background:
    radial-gradient(1200px 700px at 82% -5%, rgba(61, 94, 127, 0.3), transparent 55%),
    linear-gradient(180deg, #0d1118 0%, #10151d 45%, #131922 100%);
}

body[data-theme="dark"]::before {
  opacity: 0.12;
}

body[data-theme="dark"] .topbar-shell {
  background: linear-gradient(180deg, rgba(24, 30, 40, 0.86), rgba(20, 26, 35, 0.8));
  border-color: rgba(121, 136, 157, 0.24);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .brand-company {
  color: #d8e0ea;
}

body[data-theme="dark"] .brand-product {
  color: #a7b2c0;
}

body[data-theme="dark"] .search-bar input,
body[data-theme="dark"] .search-bar select {
  border-color: #3b485a;
  background: #131922;
  color: #e6eaf1;
}

body[data-theme="dark"] .search-bar input::placeholder {
  color: #949fad;
}

body[data-theme="dark"] .user-meta strong {
  color: #d8e0ea;
}

body[data-theme="dark"] .user-meta span {
  color: #a3acb8;
}

body[data-theme="dark"] .card,
body[data-theme="dark"] .ticket-panel,
body[data-theme="dark"] .form-grid,
body[data-theme="dark"] .details-grid,
body[data-theme="dark"] .maintenance-chart-card,
body[data-theme="dark"] .asset-mgmt-shell,
body[data-theme="dark"] .asset-column-editor,
body[data-theme="dark"] .company-branch,
body[data-theme="dark"] .department-folder-card,
body[data-theme="dark"] .license-folder-card,
body[data-theme="dark"] .future-column,
body[data-theme="dark"] .note-card,
body[data-theme="dark"] .knowledge-card,
body[data-theme="dark"] .employee-360-card,
body[data-theme="dark"] .vault-modal-card {
  background: linear-gradient(180deg, #181e28, #131922);
  border-color: #2d3645;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .ticket-quick-panel,
body[data-theme="dark"] .ticket-stat-card,
body[data-theme="dark"] .ticket-quick-item,
body[data-theme="dark"] .status-item,
body[data-theme="dark"] .asset-mgmt-stats article,
body[data-theme="dark"] .asset-table-wrap,
body[data-theme="dark"] .department-subfolder,
body[data-theme="dark"] .employee-360-card details {
  background: #161c26;
  border-color: #2d3645;
}

body[data-theme="dark"] .asset-mgmt-stats span {
  color: #a7afbb !important;
}

body[data-theme="dark"] .asset-mgmt-stats strong {
  color: #a7afbb !important;
}

body[data-theme="dark"] .kanban-column {
  background: linear-gradient(180deg, #171d27, #151a23);
  border-color: #303a49;
}

body[data-theme="dark"] .kanban-card,
body[data-theme="dark"] .future-project-card {
  background: #1b212b;
  border-color: #354152;
}

body[data-theme="dark"] table,
body[data-theme="dark"] th,
body[data-theme="dark"] td {
  background: #171d27;
  border-color: #2e3746;
  color: #e6ebf2;
}

body[data-theme="dark"] th {
  background: #1d2530;
  color: #d9e0e9;
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea {
  background: #111721;
  border-color: #343f50;
  color: #e6ebf2;
}

body[data-theme="dark"] .muted-text,
body[data-theme="dark"] .note-meta,
body[data-theme="dark"] .note-header span,
body[data-theme="dark"] .ticket-quick-item-meta,
body[data-theme="dark"] .employee-360-meta,
body[data-theme="dark"] .department-subfolder-note {
  color: #a7afbb;
}

body[data-theme="dark"] .alert {
  background: #1a212c;
  border-color: #344051;
  color: #d7dfea;
}

body[data-theme="dark"] .alert.error {
  background: #3a1f27;
  border-color: #8a4657;
  color: #ffcad5;
}

body[data-theme="dark"] .alert.success {
  background: #1b2431;
  border-color: #3f506b;
  color: #bfcfe8;
}

@media (max-width: 1120px) {
  .ticket-charts-grid {
    grid-template-columns: 1fr;
  }

  .future-board {
    grid-template-columns: repeat(3, minmax(260px, 1fr));
  }
}

@media (max-width: 860px) {
  .employee-360-grid {
    grid-template-columns: 1fr;
  }

  .future-board {
    grid-template-columns: 1fr;
  }
}

/* UX refinement overrides (V1 final) */

.skip-link {
  position: fixed;
  left: 0.8rem;
  top: -120px;
  z-index: 100;
  border-radius: 10px;
  border: 1px solid #c6cfdb;
  background: #ffffff;
  color: #1e2a3a;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  transition: top 0.16s ease;
}

.skip-link:focus {
  top: 0.8rem;
}

.search-bar-actions {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}

.side-nav-head input {
  margin-bottom: 0.6rem;
  border-radius: 9px;
  border: 1px solid rgba(236, 241, 246, 0.25);
  background: rgba(9, 13, 19, 0.55);
  color: #eaeef4;
  padding: 0.42rem 0.58rem;
  font-size: 0.82rem;
}

.side-nav-head input::placeholder {
  color: rgba(223, 229, 236, 0.66);
}

.side-nav-list {
  gap: 0.5rem;
}

.side-nav-group {
  display: grid;
  gap: 0.23rem;
}

.side-nav-group-title {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(215, 221, 230, 0.7);
  text-transform: uppercase;
  font-weight: 750;
  padding: 0.18rem 0.45rem;
}

.page-subtitle {
  margin: -0.55rem 0 1rem;
  color: #5a636f;
  font-size: 0.9rem;
  max-width: 880px;
}

.section-head {
  border-bottom: 1px solid rgba(154, 164, 177, 0.35);
  padding-bottom: 0.62rem;
}

.section-head h2,
.section-head h3 {
  margin: 0;
}

.section-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.integration-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.integration-sync-form label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #4a5463;
  font-size: 0.82rem;
  font-weight: 650;
}

.integration-sync-form input {
  width: 88px;
}

.integration-cards .card strong {
  font-size: 1.45rem;
}

.integration-result-grid p {
  margin: 0.28rem 0;
}

.integration-form textarea {
  min-height: 90px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.81rem;
  line-height: 1.38;
}

.integration-map-help {
  border: 1px solid #d7dde5;
  border-radius: 12px;
  background: linear-gradient(180deg, #fdfdfe, #f5f7fa);
  padding: 0.7rem;
  display: grid;
  gap: 0.7rem;
}

.integration-map-help h4 {
  margin: 0 0 0.45rem;
  color: #293546;
}

.integration-map-help .chip code {
  font-size: 0.75rem;
}

.filter-row {
  align-items: center;
  border: 1px solid #d6dde5;
  border-radius: 12px;
  background: linear-gradient(180deg, #fdfdfe, #f4f6f9);
  padding: 0.55rem;
}

.filter-active-badge {
  margin-left: auto;
  border: 1px solid #cdd5df;
  border-radius: 999px;
  background: #eef2f6;
  color: #354253;
  font-size: 0.74rem;
  font-weight: 760;
  padding: 0.16rem 0.48rem;
  min-width: 0;
  white-space: nowrap;
}

button,
.btn {
  white-space: nowrap;
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.btn-danger {
  background: linear-gradient(180deg, #b73f53, #8e2c3f);
}

input[readonly],
select[disabled],
textarea[readonly] {
  opacity: 0.82;
  cursor: not-allowed;
}

tbody tr:hover {
  background: #f6f8fb;
}

.inline-form {
  align-items: center;
}

.ticket-charts-grid .maintenance-chart-card h3 {
  margin-top: 0;
}

body[data-theme="dark"] .skip-link {
  background: #1a222e;
  border-color: #384558;
  color: #d8dfe9;
}

body[data-theme="dark"] .side-nav-head input {
  background: rgba(9, 13, 19, 0.58);
  border-color: rgba(185, 197, 214, 0.2);
  color: #e1e7ef;
}

body[data-theme="dark"] .filter-row {
  background: linear-gradient(180deg, #1a212c, #151c26);
  border-color: #2f3a4a;
}

body[data-theme="dark"] .integration-sync-form label {
  color: #bac4d1;
}

body[data-theme="dark"] .integration-map-help {
  border-color: #333e4f;
  background: linear-gradient(180deg, #1b222d, #151c26);
}

body[data-theme="dark"] .integration-map-help h4 {
  color: #d8dfe8;
}

body[data-theme="dark"] .filter-active-badge {
  background: #212a37;
  border-color: #354152;
  color: #c8d2df;
}

@media (max-width: 1280px) {
  .search-bar {
    grid-template-columns: 1fr minmax(150px, 210px) auto;
  }
}

@media (max-width: 1120px) {
  .side-nav-group {
    border: 1px solid rgba(239, 194, 74, 0.16);
    border-radius: 10px;
    padding: 0.3rem;
  }

  .side-nav-group-title {
    font-size: 0.66rem;
  }
}

@media (max-width: 860px) {
  .search-bar-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .search-bar-actions .btn,
  .search-bar-actions button {
    width: 100%;
  }

  .filter-row {
    padding: 0.48rem;
  }
}

.search-group-card {
  margin-bottom: 0.7rem;
}

.workspace-tools-panel {
  margin-top: 1rem;
  border: 1px solid #d4dbe3;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfe, #f2f4f7);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.workspace-tools-panel > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.75rem 0.9rem;
  font-weight: 760;
  color: #273243;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.workspace-tools-panel > summary::-webkit-details-marker {
  display: none;
}

.workspace-tools-panel > summary::before {
  content: "▸";
  color: #475263;
  transition: transform 0.16s ease;
}

.workspace-tools-panel[open] > summary::before {
  transform: rotate(90deg);
}

.workspace-tools-panel[open] > summary {
  border-bottom: 1px solid #dae1e8;
}

.workspace-tools-content {
  padding: 0.8rem;
  display: grid;
  gap: 0.75rem;
}

.license-tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}

.license-button-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  margin: 0.5rem 0 0.95rem;
}

.license-button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  min-height: 80px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.license-button strong {
  color: #eff5fa;
  font-size: 0.92rem;
  line-height: 1.22;
}

.license-button span {
  color: rgba(228, 235, 242, 0.86);
  font-size: 0.75rem;
  font-weight: 620;
}

.license-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(11, 19, 30, 0.26);
}

.license-button.active {
  border-color: rgba(239, 194, 74, 0.72);
  box-shadow: 0 0 0 1px rgba(239, 194, 74, 0.28), 0 12px 20px rgba(11, 19, 30, 0.3);
}

.license-detail-shell {
  border: 1px solid #d1d8e1;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 0.95rem;
}

.license-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.82rem 0.9rem;
  background: linear-gradient(180deg, #f3f6fa, #ecf1f6);
  border-bottom: 1px solid #dbe2ea;
}

.license-detail-head h3 {
  margin: 0;
  color: #1a2535;
}

.license-detail-head p {
  margin: 0.22rem 0 0;
  color: #4f5968;
  font-size: 0.84rem;
  font-weight: 620;
}

.license-detail-badge {
  border: 1px solid #cfd7e0;
  border-radius: 999px;
  background: #ffffff;
  color: #323f51;
  font-size: 0.77rem;
  font-weight: 760;
  padding: 0.22rem 0.62rem;
  white-space: nowrap;
}

.license-workspace-panel {
  margin-bottom: 0.75rem;
}

.portal-ticket-list {
  display: grid;
  gap: 0.72rem;
}

.service-portal-wrap {
  width: min(1180px, calc(100% - 1.4rem));
  margin: 1rem auto 1.2rem;
}

.service-portal-shell {
  border: 1px solid #d5dce4;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 251, 0.94));
  box-shadow: var(--shadow-md);
  padding: 0.95rem;
}

.service-portal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.9rem;
  border-bottom: 1px solid #dce2e9;
  padding-bottom: 0.72rem;
  margin-bottom: 0.8rem;
}

.service-portal-overline {
  margin: 0;
  color: #4f5967;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 780;
}

.service-portal-head h1 {
  margin: 0.2rem 0 0.25rem;
  color: #1b2533;
  font-size: 1.6rem;
}

.service-portal-head p {
  margin: 0;
  max-width: 760px;
  color: #566170;
  font-size: 0.9rem;
}

.service-portal-form-shell {
  margin-top: 1rem;
  border: 1px solid #d6dce4;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f5f7fa);
  padding: 0.75rem;
}

.service-portal-form-shell h2 {
  margin: 0 0 0.58rem;
  font-size: 1.08rem;
}

.portal-ticket-card {
  display: block;
  border: 1px solid #d4dbe3;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 0.74rem 0.8rem;
  box-shadow: var(--shadow-sm);
  color: #202630;
}

.portal-ticket-card:hover {
  border-color: rgba(239, 194, 74, 0.52);
  transform: translateY(-1px);
}

.portal-ticket-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.portal-ticket-card-head h3 {
  margin: 0;
  font-size: 0.98rem;
  color: #1c2532;
}

.portal-ticket-card-head span {
  color: #4f5968;
  font-size: 1.12rem;
  font-weight: 800;
}

.portal-ticket-card p {
  margin: 0.35rem 0 0;
  font-size: 0.77rem;
  color: #4f5764;
  line-height: 1.4;
}

.section-head-compact {
  margin-top: 0.35rem;
  margin-bottom: 0.45rem;
  border-bottom: none;
  padding-bottom: 0;
}

.section-head-compact h3 {
  font-size: 1.02rem;
}

body[data-theme="dark"] .workspace-tools-panel {
  border-color: #333e4d;
  background: linear-gradient(180deg, #1a212b, #151b24);
}

body[data-theme="dark"] .workspace-tools-panel > summary {
  color: #d5dce5;
}

body[data-theme="dark"] .workspace-tools-panel[open] > summary {
  border-bottom-color: #2d3745;
}

body[data-theme="dark"] .section-head-compact h3 {
  color: #dbe1e8;
}

body[data-theme="dark"] .license-button span {
  color: rgba(219, 225, 234, 0.84);
}

body[data-theme="dark"] .license-button.active {
  border-color: rgba(239, 194, 74, 0.78);
  box-shadow: 0 0 0 1px rgba(239, 194, 74, 0.36), 0 12px 24px rgba(0, 0, 0, 0.4);
}

body[data-theme="dark"] .license-detail-shell {
  border-color: #2f3a4a;
  background: linear-gradient(180deg, #171d26, #131821);
}

body[data-theme="dark"] .license-detail-head {
  background: linear-gradient(180deg, #1e2530, #181e28);
  border-bottom-color: #303a4a;
}

body[data-theme="dark"] .license-detail-head h3 {
  color: #dce2ea;
}

body[data-theme="dark"] .license-detail-head p {
  color: #9fa7b4;
}

body[data-theme="dark"] .license-detail-badge {
  border-color: #384457;
  background: #1e2632;
  color: #d5dde7;
}

body[data-theme="dark"] .portal-ticket-card {
  border-color: #323c4c;
  background: linear-gradient(180deg, #1a212b, #141a22);
  color: #dce2e9;
}

body[data-theme="dark"] .portal-ticket-card-head h3 {
  color: #d9dfe8;
}

body[data-theme="dark"] .portal-ticket-card-head span {
  color: #afb9c7;
}

body[data-theme="dark"] .portal-ticket-card p {
  color: #a7afbc;
}

body[data-theme="dark"] .service-portal-shell {
  border-color: #313b4a;
  background: linear-gradient(180deg, rgba(26, 33, 43, 0.96), rgba(20, 25, 34, 0.94));
}

body[data-theme="dark"] .service-portal-head {
  border-bottom-color: #354050;
}

body[data-theme="dark"] .service-portal-overline {
  color: #adb6c3;
}

body[data-theme="dark"] .service-portal-head h1 {
  color: #d8dfe8;
}

body[data-theme="dark"] .service-portal-head p {
  color: #9ba4b2;
}

body[data-theme="dark"] .service-portal-form-shell {
  border-color: #354051;
  background: linear-gradient(180deg, #1c232d, #161c26);
}

.service-v2-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Plus Jakarta Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 540px at 20% 10%, rgba(47, 112, 171, 0.2), transparent 60%),
    linear-gradient(rgba(9, 19, 34, 0.7), rgba(9, 19, 34, 0.7)),
    url("/static/brand/v1-bg.png") left center/cover no-repeat,
    linear-gradient(165deg, #041c34 0%, #062b4f 48%, #051e36 100%);
  color: #f6f8e9;
}

.service-v2-wrap {
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 2rem;
}

.service-v2-shell {
  border: 1px solid rgba(255, 233, 160, 0.18);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(8, 20, 33, 0.65), rgba(10, 24, 40, 0.72));
  box-shadow: 0 20px 48px rgba(5, 11, 18, 0.36);
  overflow: hidden;
}

.service-v2-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.82rem 1rem;
  background: rgba(7, 16, 26, 0.7);
  border-bottom: 1px solid rgba(255, 233, 160, 0.16);
}

.service-v2-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: #e7f0f7;
}

.service-v2-brand img {
  width: 22px;
  height: auto;
  opacity: 0.95;
}

.service-v2-brand span {
  display: inline-flex;
  flex-direction: column;
  gap: 0.08rem;
}

.service-v2-brand strong {
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.service-v2-brand small {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.service-v2-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
}

.service-v2-actions a {
  color: #e7f0f7;
  font-size: 0.82rem;
  font-weight: 700;
}

.service-v2-actions button {
  border: 0;
  background: transparent;
  padding: 0.2rem 0.12rem;
  display: inline-grid;
  gap: 0.18rem;
  cursor: pointer;
}

.service-v2-actions button span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #d8ad2d;
}

.service-v2-hero {
  text-align: center;
  padding: 3rem 1rem 1.5rem;
}

.service-v2-overline {
  margin: 0;
  color: #e5bb41;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 760;
}

.service-v2-hero h1 {
  margin: 0.45rem 0 0.55rem;
  font-size: clamp(2.1rem, 4.2vw, 3rem);
  letter-spacing: -0.02em;
  color: #e9f1f8;
}

.service-v2-hero p {
  max-width: 640px;
  margin: 0 auto;
  color: rgba(229, 237, 244, 0.92);
  line-height: 1.5;
}

.service-v2-hero-btn {
  display: inline-flex;
  margin-top: 1rem;
  border-radius: 999px;
  border: 1px solid rgba(239, 194, 74, 0.62);
  background: linear-gradient(180deg, #efc24a, #dba72e);
  color: #101f2b;
  font-weight: 800;
  padding: 0.55rem 1.2rem;
}

.service-v2-services {
  padding: 0 1rem 1.2rem;
}

.service-v2-services h2 {
  margin: 0 0 0.7rem;
  text-align: center;
  font-size: 2rem;
  color: #e7f0f7;
}

.service-v2-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.service-v2-topic-row {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.service-v2-topic-row a {
  border: 1px solid rgba(239, 194, 74, 0.42);
  border-radius: 999px;
  background: rgba(8, 19, 34, 0.44);
  color: #eaf2f8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
}

.service-v2-card {
  border: 1px solid #f2d06c;
  border-radius: 12px;
  background: linear-gradient(180deg, #e8b733, #e0aa2d);
  padding: 0.92rem;
  color: #132331;
  box-shadow: 0 10px 20px rgba(4, 10, 16, 0.25);
}

.service-v2-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
}

.service-v2-card h3 {
  margin: 0.7rem 0 0.38rem;
  color: #fffef8;
  font-size: 1.14rem;
}

.service-v2-card p {
  margin: 0;
  color: rgba(20, 32, 43, 0.9);
  font-size: 0.86rem;
  line-height: 1.45;
}

.service-v2-card a {
  display: inline-flex;
  margin-top: 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(17, 31, 49, 0.48);
  background: linear-gradient(180deg, #0f284c, #0c1e37);
  color: #eaf2f8;
  font-weight: 760;
  font-size: 0.83rem;
  padding: 0.4rem 0.9rem;
}

.service-v2-form-shell {
  margin: 0.2rem 1rem 1rem;
  border: 1px solid rgba(243, 218, 140, 0.42);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(235, 242, 247, 0.96), rgba(223, 232, 240, 0.95));
  padding: 0.9rem;
  color: #1f2731;
}

.service-v2-form-shell h2 {
  margin: 0 0 0.55rem;
  font-size: 1.16rem;
}

.service-v2-form-page {
  margin-top: 1rem;
}

.service-v2-topic-row-form {
  margin-top: 0.2rem;
  margin-bottom: 0.7rem;
}

.service-v2-topic-row-form a {
  background: rgba(17, 41, 77, 0.14);
  color: #1e2b3d;
  border-color: rgba(35, 60, 95, 0.35);
}

.service-v2-form-shell input,
.service-v2-form-shell textarea,
.service-v2-form-shell select {
  background: #ffffff;
}

.service-v2-form-shell button[type="submit"] {
  border-radius: 999px;
  padding: 0.56rem 1.2rem;
}

@media (max-width: 900px) {
  .service-v2-grid {
    grid-template-columns: 1fr;
  }

  .service-v2-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .service-v2-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* Dark theme typography hardening (Full IT) */
body[data-theme="dark"] .topbar-shell *,
body[data-theme="dark"] .side-nav *,
body[data-theme="dark"] .container * {
  color: #a7afbb !important;
}

body[data-theme="dark"] .search-bar input::placeholder,
body[data-theme="dark"] .side-nav-head input::placeholder,
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder {
  color: rgba(167, 175, 187, 0.78) !important;
}

/* Departamentos - dark mode cleanup */
body[data-theme="dark"] .department-folder-link {
  background: rgba(19, 24, 32, 0.92) !important;
  border-color: #354152 !important;
  color: #ffffff !important;
}

body[data-theme="dark"] .department-folder-card > summary,
body[data-theme="dark"] .department-subfolder > summary,
body[data-theme="dark"] .department-hierarchy-tier,
body[data-theme="dark"] .org-person,
body[data-theme="dark"] .org-person-lead,
body[data-theme="dark"] .department-location-list,
body[data-theme="dark"] .department-tools-grid {
  background: #131820 !important;
  border-color: #2f3a4a !important;
}

body[data-theme="dark"] .department-folder-card > summary span {
  background: transparent !important;
  border-color: #3a475a !important;
  color: #ffffff !important;
}

body[data-theme="dark"] .department-folder-card > summary strong,
body[data-theme="dark"] .department-folder-card > summary p,
body[data-theme="dark"] .department-subfolder > summary,
body[data-theme="dark"] .department-subfolder-note,
body[data-theme="dark"] .department-hierarchy-tier h4,
body[data-theme="dark"] .org-person strong,
body[data-theme="dark"] .org-person p,
body[data-theme="dark"] .org-person span,
body[data-theme="dark"] .department-location-list li {
  color: #ffffff !important;
}

/* -------------------- Portal de chamados (perfil Solicitante) -------------------- */
.portal-topbar-shell {
  grid-template-columns: auto 1fr auto;
}

.portal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.portal-nav a {
  padding: 0.5rem 0.95rem;
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
}

.portal-nav a:not(.btn):hover {
  background: rgba(125, 160, 230, 0.14);
}

.portal-nav a:not(.btn).active {
  color: var(--brand);
  background: rgba(125, 160, 230, 0.14);
}

.portal-container {
  width: min(1100px, calc(100% - 1.5rem));
  margin: 1.4rem auto;
}

.detail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.1rem;
}

.detail-card h3 {
  margin: 0 0 0.7rem;
}

.detail-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.detail-list > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.4rem;
}

.detail-list > div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.detail-list dt {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.detail-list dd {
  margin: 0;
  color: var(--text);
  text-align: right;
}

.detail-text {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
}

.comment-list {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.comment-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 0.8rem 1rem;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.comment-meta strong {
  color: var(--text);
}

.comment-item p {
  margin: 0;
  white-space: pre-wrap;
}

body[data-theme="dark"] .portal-nav a:not(.btn) {
  color: #e8eef7;
}

body[data-theme="dark"] .detail-card,
body[data-theme="dark"] .comment-item {
  background: linear-gradient(180deg, #181e28, #131922);
  border-color: #2d3645;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}
