/* ============================================
   KOBU — Design System & Global Styles
   ============================================ */

:root {
  --bg-primary: #FDF8F9;
  --bg-secondary: #F7EEF5;
  --card: #FFFFFF;
  --gradient-main: linear-gradient(135deg, #F8D9D9 0%, #F7D9E7 50%, #E8D8F5 100%);
  --primary: #F3A6A6;
  --primary-hover: #EA9292;
  --accent: #D8B4F8;
  --accent-pink: #F8C4D8;
  --text: #4B5563;
  --text-light: #9CA3AF;
  --border: #F1E5EA;
  --shadow: 0 10px 30px rgba(240, 180, 200, 0.15);
  --shadow-lg: 0 15px 40px rgba(231, 179, 197, 0.18);
  --radius: 24px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --sidebar-width: 260px;
  --topbar-height: 70px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #FBE4E4, #F7D7E9, #E7D8F8);
  min-height: 100vh;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ============ LANDING PAGE ============ */
body.landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.landing-container {
  text-align: center;
}

.landing-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  max-width: 480px;
  width: 100%;
}

.landing-logo {
  margin-bottom: 16px;
}

.logo-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 8px;
}

.landing-logo h1 {
  font-size: 42px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-subtitle {
  color: var(--text-light);
  margin-bottom: 32px;
  font-size: 16px;
}

.landing-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 32px;
}

.feature-item {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text);
}

.landing-version {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-light);
}

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-block;
}

/* ============ APP LAYOUT ============ */
.app-body {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, #FBE4E4, #F7D7E9, #E7D8F8);
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-right: 1px solid #F3E5EC;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 32px;
  padding: 0 8px;
}

.sidebar-logo span {
  font-size: 32px;
}

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

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: var(--transition);
  font-size: 15px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--gradient-main);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(216, 180, 248, 0.2);
}

.sidebar-nav a .nav-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
}

.sidebar-footer {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left var(--transition);
}

/* TOPBAR */
.topbar {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.greeting {
  color: var(--text-light);
  font-size: 14px;
}

/* CONTENT AREA */
.content-area {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ============ CARDS ============ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 20px 50px rgba(231, 179, 197, 0.25);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

/* ============ BUTTONS ============ */
.btn-primary {
  background: linear-gradient(135deg, #F3A6A6, #D8B4F8);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(216, 180, 248, 0.35);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  background: #F0E6F5;
}

.btn-danger {
  background: #FEE2E2;
  color: #DC2626;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-family: inherit;
}

.btn-danger:hover {
  background: #FECACA;
}

.btn-icon {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-xs);
  color: var(--text);
  display: none;
}

.btn-icon:hover {
  background: var(--bg-secondary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 8px;
}

/* ============ FORMS ============ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 14px;
}

.input-text,
.input-search,
.input-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--card);
  transition: var(--transition);
}

.input-text:focus,
.input-search:focus,
.input-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(216, 180, 248, 0.15);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

/* ============ SEARCH & FILTER BAR ============ */
.search-filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.input-search {
  flex: 1;
  min-width: 200px;
}

.input-select {
  width: auto;
  min-width: 160px;
}

/* ============ PETS GRID ============ */
.pets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.pet-card {
  cursor: pointer;
}

.pet-card-image {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  margin-bottom: 16px;
}

.pet-card-info h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.pet-card-info p {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 2px;
}

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

/* ============ AGENDAMENTOS LISTA ============ */
.agendamentos-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.agendamento-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
}

.agendamento-data {
  text-align: center;
  min-width: 60px;
}

.agendamento-data .dia {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.agendamento-data .mes {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
}

.agendamento-info {
  flex: 1;
}

.agendamento-info h4 {
  font-size: 15px;
  margin-bottom: 2px;
}

.agendamento-info p {
  font-size: 13px;
  color: var(--text-light);
}

.status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-pendente {
  background: #FEF3C7;
  color: #92400E;
}

.status-concluido {
  background: #D1FAE5;
  color: #065F46;
}

.status-cancelado {
  background: #FEE2E2;
  color: #991B1B;
}

/* ============ CALENDARIO SIMPLES ============ */
.calendario-simples {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.calendario-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendario-header h3 {
  font-size: 18px;
}

.calendario-dias {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.calendario-dia-nome {
  font-size: 12px;
  color: var(--text-light);
  font-weight: 600;
  padding: 8px 0;
}

.calendario-dia {
  padding: 10px 4px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
  position: relative;
}

.calendario-dia:hover {
  background: var(--bg-secondary);
}

.calendario-dia.tem-agendamento::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.calendario-dia.hoje {
  background: var(--primary);
  color: white;
  font-weight: 700;
}

.calendario-dia.outro-mes {
  color: var(--text-light);
  opacity: 0.4;
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 560px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
}

.modal h2 {
  margin-bottom: 20px;
  font-size: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ============ TOAST ============ */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  font-weight: 500;
  animation: slideInRight 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid transparent;
}

.toast-success {
  border-left-color: #10B981;
}

.toast-error {
  border-left-color: #EF4444;
}

.toast-warning {
  border-left-color: #F59E0B;
}

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.empty-state .empty-icon {
  font-size: 72px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.7;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-state p {
  margin-bottom: 20px;
}

/* ============ LOADING ============ */
.loading-spinner {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
}

.loading-spinner::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

/* ============ CONFIG CARD ============ */
.config-card {
  max-width: 600px;
}

.config-card h2 {
  font-size: 18px;
  margin-bottom: 20px;
}

/* ============ PERFIL PET ============ */
.perfil-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.perfil-foto {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 100px;
}

.perfil-dados {
  flex: 1;
  min-width: 250px;
}

.perfil-dados h2 {
  font-size: 28px;
  margin-bottom: 8px;
}

.perfil-dados .info-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.perfil-dados .info-item {
  font-size: 14px;
  color: var(--text-light);
}

.perfil-dados .info-item strong {
  color: var(--text);
}

.historico-section {
  margin-top: 32px;
}

.historico-section h3 {
  font-size: 18px;
  margin-bottom: 16px;
}

.historico-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.historico-item {
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-xs);
  font-size: 14px;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ PHOTO UPLOAD ============ */
.foto-upload-area {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 3px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-secondary);
  font-size: 40px;
  overflow: hidden;
  position: relative;
}

.foto-upload-area:hover {
  border-color: var(--accent);
}

.foto-upload-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.foto-upload-area input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.voltar-portfolio {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.voltar-portfolio:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
}