/* ══ DASHBOARD.CSS — TrovaMyPet Playful ════════════════════════════════════ */

/* ── HEADER ────────────────────────────────────────────── */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 68px;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(255, 107, 53, 0.08);
}

.dash-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.dash-logo-icon {
  font-size: 32px;
  animation: logo-wag 3s ease-in-out infinite;
  filter: drop-shadow(0 3px 8px rgba(255, 107, 53, 0.35));
}
@keyframes logo-wag {
  0%, 70%, 100% { transform: rotate(0deg) scale(1); }
  78%           { transform: rotate(-15deg) scale(1.1); }
  86%           { transform: rotate(10deg) scale(1.05); }
  93%           { transform: rotate(-5deg) scale(1.02); }
}

.dash-logo-text {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dash-logo-sub {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
  margin-left: 2px;
}

.dash-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── VIEWS ─────────────────────────────────────────────── */
.vista        { display: none; }
.vista.active { display: block; }

/* ── AUTH ──────────────────────────────────────────────── */
.auth-wrap {
  min-height: calc(100dvh - 68px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  background:
    radial-gradient(ellipse 70% 60% at 5% 70%, rgba(255,107,53,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 95% 15%, rgba(124,107,255,0.09) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 50% 100%, rgba(0,200,150,0.06) 0%, transparent 60%),
    var(--bg);
}

.auth-brand { text-align: center; margin-bottom: 32px; }

.auth-brand-icon {
  font-size: 68px;
  display: block;
  margin-bottom: 14px;
  filter: drop-shadow(0 8px 20px rgba(255,107,53,0.30));
  animation: icon-float 2.5s ease-in-out infinite;
}
@keyframes icon-float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50%       { transform: translateY(-12px) rotate(5deg); }
}

.auth-brand-title {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.auth-brand-sub {
  font-size: 15px;
  color: var(--muted);
  font-weight: 600;
}

.auth-box {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.auth-tabs {
  display: flex;
  background: var(--bg-alt);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: 28px;
  gap: 4px;
}

.auth-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: var(--radius-full);
  transition: all var(--fast) var(--spring);
}
.auth-tab.active {
  background: linear-gradient(135deg, var(--accent), #FF8C5A);
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* ── DASHBOARD LAYOUT ──────────────────────────────────── */
.dash-wrap {
  display: grid;
  grid-template-columns: 268px 1fr;
  min-height: calc(100dvh - 68px);
}

/* ── SIDEBAR ───────────────────────────────────────────── */
.dash-sidebar {
  background: var(--surface);
  border-right: 2px solid var(--border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: 68px;
  height: calc(100dvh - 68px);
  overflow-y: auto;
}

.dash-user {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), var(--purple-soft));
  border: 2px solid var(--border);
  margin-bottom: 12px;
}

.dash-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.dash-user-nome {
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-user-piano {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent);
  margin-top: 2px;
  display: block;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-full);
  border: none;
  background: none;
  color: var(--muted);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all var(--fast) var(--ease);
}
.dash-nav-item:hover {
  background: var(--bg-alt);
  color: var(--text);
  transform: translateX(4px);
}
.dash-nav-item.active {
  background: linear-gradient(135deg, var(--accent-soft), var(--purple-soft));
  color: var(--accent);
  border: 2px solid var(--border);
}

/* ── MAIN CONTENT ──────────────────────────────────────── */
.dash-content {
  padding: 36px;
  background: var(--bg);
  overflow-y: auto;
}

/* ── PET CARDS ─────────────────────────────────────────── */
.pet-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  margin-bottom: 16px;
  transition: all var(--normal) var(--spring);
  box-shadow: var(--shadow-card);
}
.pet-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-4px) scale(1.005);
}

.pet-card-foto {
  width: 120px;
  min-height: 110px;
  background: linear-gradient(135deg, var(--bg-alt), var(--surface2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  flex-shrink: 0;
  overflow: hidden;
}
.pet-card-foto img { width: 100%; height: 100%; object-fit: cover; }

.pet-card-body {
  padding: 18px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.pet-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pet-card-nome {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
}

.pet-card-info {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.pet-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

/* ── PILLS ─────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.pill-green {
  background: var(--green-soft);
  border: 2px solid rgba(0,200,150,0.25);
  color: var(--green-dark);
}
.pill-red {
  background: var(--red-soft);
  border: 2px solid rgba(255,71,87,0.25);
  color: var(--red-dark);
}
.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill-red .pill-dot { animation: dot-blink 1s ease-in-out infinite; }
@keyframes dot-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.2; transform: scale(0.7); }
}

/* ── ACTION BUTTONS ────────────────────────────────────── */
.action-btn {
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-mid);
  cursor: pointer;
  transition: all var(--fast) var(--spring);
  white-space: nowrap;
}
.action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xs);
}
.action-btn.danger:hover {
  border-color: var(--red);
  color: var(--red-dark);
  background: var(--red-soft);
}
.action-btn.smarrito {
  border-color: rgba(255,71,87,0.35);
  color: var(--red-dark);
  background: var(--red-soft);
}
.action-btn.casa {
  border-color: rgba(0,200,150,0.35);
  color: var(--green-dark);
  background: var(--green-soft);
}

/* ── NFC BOX ───────────────────────────────────────────── */
.nfc-box {
  background: linear-gradient(135deg, var(--accent-soft), var(--purple-soft));
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.nfc-url {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nfc-copy {
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 14px;
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-full);
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--fast) var(--spring);
}
.nfc-copy:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* ── FORM CARD ─────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  max-width: 660px;
  box-shadow: var(--shadow-card);
}

.form-title {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 28px;
  color: var(--text);
}

.form-divider {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 26px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── SCAN HISTORY ──────────────────────────────────────── */
.scan-list {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 20px;
  box-shadow: var(--shadow-card);
}

.scan-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 2px solid var(--border-soft);
  font-size: 13px;
}
.scan-row:last-child { border-bottom: none; }

.scan-icon {
  font-size: 18px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-soft), var(--purple-soft));
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.scan-loc        { flex: 1; min-width: 0; }
.scan-loc strong { display: block; font-weight: 800; }
.scan-loc span   { font-size: 11px; color: var(--muted); font-weight: 600; }
.scan-time {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.scan-gps {
  font-size: 10px;
  font-weight: 800;
  color: var(--green-dark);
  background: var(--green-soft);
  border: 2px solid rgba(0,200,150,0.22);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* ── EMPTY STATE ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 90px 24px;
  max-width: 400px;
  margin: 0 auto;
}
.empty-icon {
  font-size: 80px;
  display: block;
  margin-bottom: 20px;
  animation: icon-float 2.5s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(255,107,53,0.22));
}
.empty-title {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 10px;
  color: var(--text);
}
.empty-desc {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 28px;
  line-height: 1.7;
}

/* ── SUCCESS STATE ─────────────────────────────────────── */
.success-box {
  text-align: center;
  padding: 64px 24px 48px;
  max-width: 520px;
  margin: 0 auto;
}
.success-icon {
  font-size: 72px;
  display: block;
  margin-bottom: 20px;
  animation: success-pop 0.6s var(--spring);
}
@keyframes success-pop {
  0%  { transform: scale(0) rotate(-30deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(5deg); }
  100%{ transform: scale(1)   rotate(0);    opacity: 1; }
}
.success-title {
  font-size: 40px;
  font-weight: 900;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--green), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.success-desc {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 32px;
  line-height: 1.7;
}

/* ── PREMIUM BOX ───────────────────────────────────────── */
.premium-box {
  border: 2px solid rgba(255,184,0,0.35);
  border-radius: var(--radius-lg);
  padding: 26px;
  margin-top: 16px;
  background: linear-gradient(135deg, var(--gold-soft), rgba(255,107,53,0.04));
}
.premium-title {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 12px;
  color: var(--gold);
}
.premium-list {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding-left: 20px;
  margin-bottom: 20px;
  line-height: 2.2;
}
.premium-price {
  font-size: 40px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  line-height: 1;
}
.premium-active {
  border: 2px solid rgba(0,200,150,0.30);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 12px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 760px) {
  .dash-header { padding: 0 16px; }
  .dash-logo-sub { display: none; }

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

  .dash-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 10px 12px;
    border-right: none;
    border-bottom: 2px solid var(--border);
    overflow-x: auto;
    flex-wrap: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .dash-sidebar::-webkit-scrollbar { display: none; }
  .dash-user   { display: none; }
  .dash-nav    { flex-direction: row; flex-wrap: nowrap; gap: 4px; }

  .dash-nav-item {
    font-size: 12px;
    padding: 8px 14px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .dash-nav-item:hover { transform: none; }

  .dash-content  { padding: 20px 16px; }
  .form-card     { padding: 24px 20px; border-radius: var(--radius-lg); }
  .auth-box      { padding: 28px 22px; border-radius: var(--radius-lg); }
  .pet-card-foto { width: 90px; font-size: 42px; }
}
