:root {
  --primary: #ff7a00;      /* laranja */
  --primary-dark: #e06600;
  --accent: #009fe3;       /* azul do modelo */
  --bg: #f5f7fb;
  --text: #1d1d1d;
  --muted: #6b6b6b;
  --card-bg: #ffffff;
  --border: #dde3f0;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
}

/* ---------- LOGIN ---------- */

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.auth-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.logo-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
}

.logo-circle.small {
  width: 32px;
  height: 32px;
  font-size: 14px;
}

.tabs {
  display: flex;
  margin: 16px 0;
  background: #eef2ff;
  border-radius: 999px;
  padding: 4px;
}

.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
}

.tab-btn.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  font-size: 14px;
}

textarea { resize: vertical; }

.btn-primary,
.btn-secondary {
  border-radius: 999px;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
}

.btn-secondary {
  background: #eef2ff;
  color: var(--text);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.message {
  min-height: 18px;
  font-size: 13px;
  margin-top: 8px;
}

.message.error { color: #d9534f; }
.message.success { color: #28a745; }

.small-text {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- DASHBOARD ---------- */

.dashboard-body {
  min-height: 100vh;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: #0b163b;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}

.brand-sidebar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.sidebar nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-item {
  border: none;
  background: transparent;
  color: #b8c5ff;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.menu-item.active,
.menu-item:hover {
  background: rgba(0,159,227,0.18);
  color: #fff;
}

.logout {
  margin-top: 12px;
  width: 100%;
}

.main-content {
  flex: 1;
  padding: 22px;
}

.view { display: none; }
.view.active { display: block; }

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 15px;
  margin-bottom: 4px;
}

.card p {
  font-size: 24px;
  font-weight: 700;
}

.list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.hidden { display: none !important; }

/* Items de pet */

.pet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  padding: 10px 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pet-photo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #e7ecf8;
}

.pet-info { flex: 1; }

.pet-info h4 { margin-bottom: 4px; }

.pet-info span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.pet-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  position: relative;
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 6px;
  cursor: pointer;
  font-size: 20px;
}

/* ---------- PÁGINA DO PET (cartão) ---------- */

.pet-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf4ff;
}

.pet-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.pet-card {
  background: #fff;
  border-radius: 24px;
  padding: 24px 18px;
  box-shadow: var(--shadow);
  border: 2px solid #d4e2ff;
}

.pet-card-title {
  text-align: center;
  margin-bottom: 14px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pet-photo-box {
  border-radius: 14px;
  border: 2px solid #d4e2ff;
  width: 160px;
  height: 160px;
  margin: 0 auto 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pet-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.info-block-label {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
}

.info-block-value {
  font-size: 16px;
  font-weight: 700;
}

.pet-section-title {
  margin-top: 10px;
  margin-bottom: 6px;
  color: var(--accent);
  text-align: center;
  font-weight: 700;
}

.pet-owner-name {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.pet-help-btn {
  display: block;
  width: 100%;
  text-align: center;
  border-radius: 999px;
  padding: 12px;
  border: none;
  background: #7fd0ff;
  color: #003a5f;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

/* Responsivo */

@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
  }
  .logout { max-width: 120px; }
}
