.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--ds-radius-pill);
  font-family: var(--ds-sans); font-weight: 600; font-size: 14px;
  cursor: pointer; border: none; transition: all .2s ease;
}
.btn-primary { background: var(--mi-cobalto); color: #fff; }
.btn-primary:hover { background: #0091e0; transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,0.06); color: var(--ds-text); border: 1px solid var(--ds-line); }
.btn-secondary:hover { background: rgba(255,255,255,0.12); }
.btn-accent { background: var(--mi-limao); color: var(--mi-carvao); }
.btn-accent:hover { background: #e6c423; }
.btn-ghost { background: transparent; color: var(--ds-text-soft); padding: 10px 16px; }
.btn-ghost:hover { color: var(--mi-celeste); background: rgba(0,161,249,0.08); }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn.is-loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.is-loading::after {
  content: ''; position: absolute; width: 16px; height: 16px;
  border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: btnspin .6s linear infinite;
  color: #fff;
}
.btn-accent.is-loading::after, .btn-secondary.is-loading::after { color: var(--ds-text); }
@keyframes btnspin { to { transform: rotate(360deg); } }

.card {
  background: var(--ds-surface); border: 1px solid var(--ds-line);
  border-radius: var(--ds-radius-xl); padding: 28px;
  box-shadow: var(--ds-shadow);
}
.card-glass {
  background: rgba(26,26,42,0.7);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
}

.input-group { margin-bottom: 20px; }
.input-label {
  display: block; font-family: var(--ds-sans); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ds-text-soft); margin-bottom: 8px;
}
.input {
  width: 100%; padding: 14px 18px; border-radius: var(--ds-radius-pill);
  background: rgba(7,7,13,0.8); border: 1px solid var(--ds-line);
  color: var(--ds-text); font-size: 14px; font-family: var(--ds-sans);
  font-weight: 300; transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--ds-text-mute); }
.input:focus { outline: none; border-color: var(--mi-cobalto); box-shadow: 0 0 0 3px rgba(0,161,249,0.2); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238888A0' stroke-width='2' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; padding-right: 44px; }

.error-msg {
  background: rgba(244,67,54,0.1); border: 1px solid rgba(244,67,54,0.3);
  color: #F44336; padding: 12px 18px; border-radius: var(--ds-radius-m);
  font-size: 14px; margin-bottom: 20px;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--ds-radius-pill);
  font-size: 12px; font-weight: 600; font-family: var(--ds-sans);
}
.badge-blue { background: rgba(0,161,249,0.15); color: var(--mi-celeste); border: 1px solid rgba(0,161,249,0.25); }
.badge-green { background: rgba(76,175,80,0.15); color: #66BB6A; border: 1px solid rgba(76,175,80,0.25); }
.badge-amber { background: rgba(244,179,51,0.15); color: var(--mi-ambar); border: 1px solid rgba(244,179,51,0.25); }
.badge-red { background: rgba(244,67,54,0.15); color: #EF5350; border: 1px solid rgba(244,67,54,0.25); }
.badge-gold { background: rgba(245,210,58,0.15); color: var(--mi-limao); border: 1px solid rgba(245,210,58,0.25); }

.progress-bar {
  width: 100%; height: 6px; background: var(--ds-surface-hi);
  border-radius: 3px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--mi-cobalto), var(--mi-celeste));
  transition: width .4s ease;
}

.nav-top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,11,20,0.85);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--ds-line);
}
.nav-top-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
}
.nav-top-inner img { height: 56px; width: auto; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-user { font-size: 13px; color: var(--ds-text-soft); }
.nav-user-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ds-text-soft); text-decoration: none;
  padding: 5px 10px 5px 5px; border-radius: var(--ds-radius-pill);
  transition: all .2s ease;
}
.nav-user-link:hover {
  color: var(--mi-celeste); background: rgba(0,161,249,0.08);
}
.nav-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--mi-cobalto), var(--mi-abismo));
  font-size: 13px; font-weight: 700; color: #fff;
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nav-user-name { white-space: nowrap; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.seal-card {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px; border-radius: var(--ds-radius-l);
  background: var(--ds-surface); border: 1px solid var(--ds-line);
  transition: all .25s ease;
}
.seal-card.unlocked {
  border-color: rgba(245,210,58,0.25);
  background: linear-gradient(135deg, rgba(245,210,58,0.06), transparent 60%);
}
.seal-card.unlocked:hover {
  border-color: rgba(245,210,58,0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.seal-card.locked {
  opacity: 0.35;
}
.seal-icon-wrap {
  position: relative; flex-shrink: 0;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
}
.seal-card.unlocked .seal-icon-wrap {
  background: rgba(245,210,58,0.1);
}
.seal-card.locked .seal-icon-wrap {
  background: rgba(255,255,255,0.04);
}
.seal-svg {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
}
.seal-svg svg { width: 32px; height: 32px; }
.seal-card.unlocked .seal-svg { color: var(--mi-limao); }
.seal-card.locked .seal-svg { color: var(--ds-text-mute); }
.seal-lock {
  position: absolute; bottom: -4px; right: -4px;
  font-size: 12px; line-height: 1;
}
.seal-name {
  font-size: 14px; font-weight: 600; display: block; margin-bottom: 4px;
}
.seal-card.unlocked .seal-name { color: var(--mi-limao); }
.seal-card.locked .seal-name { color: var(--ds-text-mute); }
.seal-desc {
  font-size: 12px; line-height: 1.45; display: block;
}
.seal-card.unlocked .seal-desc { color: var(--ds-text-soft); }
.seal-card.locked .seal-desc { color: var(--ds-text-mute); }
.seal-card .seal-info { flex: 1; min-width: 0; }

.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--ds-line); }
th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ds-text-mute); }
td { font-size: 14px; }
tr:hover td { background: rgba(255,255,255,0.02); }

.alert-card {
  padding: 16px 20px; border-radius: var(--ds-radius-m);
  border-left: 3px solid var(--mi-ambar);
  background: rgba(244,179,51,0.06);
  font-size: 14px; color: var(--ds-text-soft);
  margin-bottom: 12px;
}
.alert-card.critical { border-left-color: #F44336; background: rgba(244,67,54,0.06); }
