:root {
  --auna-primary: #2563eb;
  --auna-primary-hover: #1d4ed8;
  --auna-deep: #1e3a8a;
  --bg-dash: #0b1220;
  --card: #ffffff;
  --muted: #64748b;
  --text: #0f172a;
  --header: #2563eb;
  --font: "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: var(--font); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

/* —— LOGIN (estilo auna.app) —— */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: var(--auna-primary);
}
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.22), transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(37,99,235,.45), transparent 50%),
    linear-gradient(155deg, var(--auna-primary) 0%, var(--auna-primary-hover) 58%, #1d4ed8 100%);
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  padding: 32px 28px 24px;
}
.login-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.login-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.login-logo .fallback {
  font-weight: 700;
  font-size: 22px;
  color: #0d9488;
  letter-spacing: -0.03em;
}
.login-card h1 {
  margin: 0;
  text-align: center;
  font-size: 1.35rem;
  color: var(--text);
}
.login-card .sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 6px 0 22px;
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 6px;
}
.field label .req { color: #ef4444; }
.input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
}
.input-wrap:focus-within {
  border-color: var(--auna-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.input-wrap .ico { color: #94a3b8; width: 18px; text-align: center; flex-shrink: 0; }
.input-wrap input {
  border: 0;
  outline: 0;
  width: 100%;
  padding: 12px 0;
  background: transparent;
  color: var(--text);
}
.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.captcha-q {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.captcha-row input {
  width: 72px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.btn-refresh {
  border: 0;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  color: #475569;
}
.btn-primary {
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  background: #93c5fd;
  color: #1e3a8a;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s;
}
.btn-primary:hover { background: #60a5fa; color: #fff; }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-ghost {
  width: 100%;
  margin-top: 10px;
  border: 1px dashed #cbd5e1;
  background: transparent;
  border-radius: 10px;
  padding: 10px;
  color: #64748b;
  cursor: pointer;
  font-size: 0.85rem;
}
.login-error {
  display: none;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.85rem;
}
.login-error.show { display: block; }
.powered {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: #94a3b8;
}

/* —— DASHBOARD (tickzend layout + auna blues) —— */
.dash {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-dash);
  color: #e2e8f0;
}
.dash-header {
  sticky: top;
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25);
}
.dash-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand img, .brand .mark {
  height: 40px;
  width: 40px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}
.brand .mark {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0d9488;
  font-size: 11px;
}
.brand span {
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}
.search-wrap {
  flex: 1;
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}
.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .45;
}
.search-wrap input {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px 10px 38px;
  outline: 0;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: rgba(255,255,255,.9);
  font-size: 12px;
}
.user-chip button {
  border: 0;
  background: rgba(255,255,255,.12);
  color: #fff;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
}
.user-chip button:hover { background: rgba(255,255,255,.2); }

.dash-main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 16px 48px;
}
.hint {
  color: #64748b;
  font-size: 12px;
  margin: 0 0 16px;
}

.fav-section {
  border-radius: 16px;
  padding: 4px;
  transition: .15s;
  margin-bottom: 28px;
}
.fav-section.over {
  outline: 2px solid rgba(96, 165, 250, .5);
  background: rgba(37, 99, 235, .08);
}
.fav-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}
.fav-head h2 {
  margin: 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.fav-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: 140px;
}
@media (min-width: 640px) { .fav-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .fav-grid { grid-template-columns: repeat(5, 1fr); } }

.fav-tile {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.08);
  cursor: grab;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.fav-tile:active { cursor: grabbing; }
.fav-tile .grip {
  position: absolute;
  top: 8px;
  left: 8px;
  opacity: .5;
}
.fav-tile .star-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border: 0;
  background: rgba(0,0,0,.2);
  color: #fff;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}
.fav-tile .body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  color: inherit;
}
.fav-tile .icon-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 22px;
}
.fav-tile .icon-wrap svg { width: 40px; height: 40px; }
.fav-tile .meta {
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(2px);
  padding: 10px 12px;
}
.fav-tile .meta .t { font-weight: 700; font-size: 14px; }
.fav-tile .meta .s {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .7;
  margin-top: 2px;
}
.fav-empty {
  grid-column: 1 / -1;
  border: 1px dashed #334155;
  border-radius: 12px;
  padding: 36px 12px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 18px;
}
.tabs button {
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 10px 16px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-weight: 600;
}
.tabs button.active {
  color: #fff;
  border-bottom-color: var(--auna-primary);
}

.mod-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
}
@media (min-width: 640px) { .mod-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .mod-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .mod-grid { grid-template-columns: repeat(5, 1fr); } }

.mod-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  cursor: grab;
}
.mod-item .star {
  position: absolute;
  top: -4px;
  right: 8px;
  border: 0;
  background: transparent;
  color: #475569;
  cursor: pointer;
  opacity: 0;
  transition: .15s;
}
.mod-item:hover .star, .mod-item .star.on { opacity: 1; }
.mod-item .star.on { color: #fbbf24; }
.hex {
  width: 72px;
  height: 72px;
  clip-path: polygon(25% 6.7%, 75% 6.7%, 100% 50%, 75% 93.3%, 25% 93.3%, 0% 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 10px 20px rgba(0,0,0,.3);
  transition: transform .15s;
}
.mod-item:hover .hex { transform: scale(1.06); }
.hex svg { width: 30px; height: 30px; }
.mod-item .title {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.25;
}
.mod-item .sub {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.mod-item .status {
  font-size: 11px;
  color: #475569;
}

.bg-\[\#2563eb\] { background: #2563eb; }
.bg-\[\#0d9488\] { background: #0d9488; }
.bg-\[\#7c3aed\] { background: #7c3aed; }
.bg-\[\#ea580c\] { background: #ea580c; }
.bg-\[\#64748b\] { background: #64748b; }

/* construction pages */
.build-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(90% 70% at 0% 0%, rgba(255,255,255,.18), transparent 50%),
    linear-gradient(155deg, var(--auna-primary), var(--auna-primary-hover) 55%, #1d4ed8);
  color: #fff;
  text-align: center;
}
.build-card {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 18px;
  padding: 36px 28px;
  max-width: 480px;
  width: 100%;
}
.build-card h1 { margin: 0 0 8px; font-size: 1.6rem; }
.build-card p { margin: 0; opacity: .9; }
.build-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}
.build-card .tags span {
  background: rgba(255,255,255,.15);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}
