/* ============================================
   PetAdvisor AI - Main Stylesheet
   ============================================ */

:root {
  --green-50:  #E1F5EE;
  --green-100: #9FE1CB;
  --green-500: #1D9E75;
  --green-600: #0F6E56;
  --green-800: #085041;
  --green-900: #04342C;
  --gray-50:   #F8F9FA;
  --gray-100:  #F1F3F4;
  --gray-200:  #E8EAED;
  --gray-400:  #9AA0A6;
  --gray-600:  #5F6368;
  --gray-800:  #3C4043;
  --gray-900:  #202124;
  --white:     #FFFFFF;
  --danger:    #D93025;
  --warning:   #F29900;
  --success:   #1D9E75;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --sidebar-w: 260px;
  --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--gray-50); color: var(--gray-900); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
input, textarea, select, button { font-family: var(--font); }

/* ---- TYPOGRAPHY ---- */
h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.15; }
h2 { font-size: 2rem; font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.25rem; font-weight: 600; }
p  { color: var(--gray-600); }

/* ---- UTILITIES ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.text-center { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.hidden { display: none; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-full);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
  border: none; transition: all var(--transition); white-space: nowrap;
}
.btn-primary   { background: var(--green-600); color: white; }
.btn-primary:hover { background: var(--green-800); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline   { background: transparent; color: var(--green-600); border: 1.5px solid var(--green-600); }
.btn-outline:hover { background: var(--green-600); color: white; }
.btn-white     { background: white; color: var(--green-600); }
.btn-white:hover { background: var(--green-50); }
.btn-danger    { background: var(--danger); color: white; }
.btn-sm        { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg        { padding: 14px 32px; font-size: 1rem; }
.btn-icon      { padding: 9px; border-radius: 50%; }
.btn-google {
  background: white; color: var(--gray-800); border: 1.5px solid var(--gray-200);
  padding: 12px 22px; border-radius: var(--radius-full);
  display: flex; align-items: center; gap: 10px; width: 100%;
  justify-content: center; font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: all var(--transition);
}
.btn-google:hover { background: var(--gray-50); box-shadow: var(--shadow-sm); }

/* ---- FORMS ---- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--gray-800); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 11px 15px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 0.9rem; background: white;
  color: var(--gray-900); transition: border-color var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(29,158,117,0.12); }
.form-control::placeholder { color: var(--gray-400); }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 5px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 42px; }
.input-icon-wrap .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 18px; }

/* ---- CARDS ---- */
.card {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200); padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* ---- BADGE ---- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600;
}
.badge-success { background: var(--green-50); color: var(--green-800); }
.badge-warning { background: #FFF3E0; color: #E65100; }
.badge-danger  { background: #FDECEA; color: var(--danger); }
.badge-gray    { background: var(--gray-100); color: var(--gray-600); }
.badge-pro     { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  background: white; border-bottom: 1px solid var(--gray-200);
  padding: 0 32px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.navbar-logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--green-600); display: flex; align-items: center; justify-content: center;
}
.logo-mark svg { width: 20px; height: 20px; fill: white; }
.logo-text { font-size: 1.1rem; font-weight: 800; color: var(--gray-900); }
.logo-text span { color: var(--green-600); }
.navbar-links { display: flex; align-items: center; gap: 28px; }
.navbar-links a { font-size: 0.9rem; color: var(--gray-600); font-weight: 500; transition: color var(--transition); }
.navbar-links a:hover { color: var(--green-600); }
.navbar-actions { display: flex; align-items: center; gap: 12px; }

/* ============================================
   LANDING PAGE
   ============================================ */
.hero-section {
  background: linear-gradient(160deg, var(--green-900) 0%, var(--green-600) 60%, var(--green-500) 100%);
  padding: 96px 24px 80px; text-align: center; position: relative; overflow: hidden;
}
.hero-section::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15); color: white;
  padding: 6px 18px; border-radius: var(--radius-full);
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em;
  margin-bottom: 24px; backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
}
.hero-section h1 { color: white; margin-bottom: 20px; max-width: 700px; margin-left: auto; margin-right: auto; }
.hero-section h1 span { color: var(--green-100); }
.hero-section .lead { font-size: 1.15rem; color: rgba(255,255,255,0.8); max-width: 520px; margin: 0 auto 36px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-pets {
  display: flex; justify-content: center; gap: 12px; margin-top: 40px; flex-wrap: wrap;
}
.pet-pill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12); color: white;
  padding: 8px 18px; border-radius: var(--radius-full);
  font-size: 0.85rem; font-weight: 500; backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
}
.pet-pill .emoji { font-size: 1.1rem; }

/* Stats */
.stats-section { background: var(--green-900); padding: 28px 24px; }
.stats-grid { display: flex; justify-content: center; gap: 56px; flex-wrap: wrap; max-width: 700px; margin: 0 auto; }
.stat-item { text-align: center; }
.stat-number { font-size: 2rem; font-weight: 800; color: var(--green-100); }
.stat-label  { font-size: 0.78rem; color: rgba(255,255,255,0.6); letter-spacing: 0.05em; text-transform: uppercase; margin-top: 2px; }

/* Section headers */
.section-header { text-align: center; margin-bottom: 48px; }
.section-eyebrow { font-size: 0.78rem; font-weight: 700; color: var(--green-600); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px; }
.section-header h2 { color: var(--gray-900); }
.section-header p  { max-width: 520px; margin: 12px auto 0; font-size: 1rem; }

/* Features */
.features-section { padding: 80px 24px; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.feature-card {
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg); padding: 28px 22px;
  transition: all var(--transition);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--green-100); }
.feature-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md);
  background: var(--green-50); display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; font-size: 1.5rem;
}
.feature-card h3 { font-size: 1rem; color: var(--gray-900); margin-bottom: 8px; }
.feature-card p  { font-size: 0.88rem; line-height: 1.6; }

/* Pricing */
.pricing-section { padding: 80px 24px; background: var(--gray-50); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 860px; margin: 0 auto; }
.price-card {
  background: white; border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl); padding: 32px 28px;
  position: relative;
}
.price-card.featured { border: 2px solid var(--green-500); }
.popular-tag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--green-600); color: white;
  font-size: 0.75rem; font-weight: 700; padding: 5px 18px;
  border-radius: var(--radius-full); white-space: nowrap;
}
.plan-label { font-size: 0.78rem; font-weight: 700; color: var(--gray-400); letter-spacing: 0.1em; text-transform: uppercase; }
.plan-price { font-size: 3rem; font-weight: 800; color: var(--gray-900); margin: 10px 0 4px; }
.plan-price sup { font-size: 1.4rem; vertical-align: super; }
.plan-price sub { font-size: 1rem; color: var(--gray-400); }
.plan-desc { font-size: 0.88rem; color: var(--gray-500); margin-bottom: 22px; }
.plan-features { list-style: none; margin-bottom: 24px; }
.plan-features li { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; padding: 6px 0; color: var(--gray-700); }
.plan-features li .check { color: var(--green-500); font-size: 1rem; }
.plan-features li .cross { color: var(--gray-300); font-size: 1rem; }

/* Testimonials */
.testimonials-section { padding: 80px 24px; }
.testi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto; }
.testi-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 24px; }
.testi-stars { color: #F59E0B; font-size: 0.9rem; margin-bottom: 12px; }
.testi-text { font-size: 0.9rem; color: var(--gray-700); line-height: 1.7; margin-bottom: 18px; }
.testi-author { display: flex; align-items: center; gap: 12px; }
.testi-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--green-50); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; color: var(--green-600); flex-shrink: 0; }
.testi-name { font-size: 0.88rem; font-weight: 600; color: var(--gray-900); }
.testi-sub  { font-size: 0.78rem; color: var(--gray-400); }

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--green-900), var(--green-600));
  padding: 80px 24px; text-align: center;
}
.cta-section h2 { color: white; margin-bottom: 14px; }
.cta-section p  { color: rgba(255,255,255,0.75); margin-bottom: 32px; font-size: 1.05rem; }

/* Footer */
.footer { background: var(--gray-900); padding: 48px 24px 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; max-width: 1000px; margin: 0 auto 40px; }
.footer-brand .logo-text { color: white; font-size: 1.2rem; }
.footer-brand p { font-size: 0.88rem; color: var(--gray-400); margin-top: 12px; max-width: 240px; line-height: 1.6; }
.footer-col h4 { font-size: 0.82rem; font-weight: 700; color: white; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 0.88rem; color: var(--gray-400); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--green-100); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; text-align: center; }
.footer-bottom p { font-size: 0.82rem; color: var(--gray-400); }

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-page { min-height: 100vh; display: flex; }
.auth-left {
  width: 45%; background: linear-gradient(160deg, var(--green-900), var(--green-600));
  padding: 48px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-left::after {
  content: ''; position: absolute; right: -80px; bottom: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.auth-left-content { position: relative; z-index: 1; }
.auth-left h2 { color: white; font-size: 1.8rem; margin-bottom: 12px; }
.auth-left p  { color: rgba(255,255,255,0.75); font-size: 0.95rem; line-height: 1.7; }
.auth-testimonial {
  background: rgba(255,255,255,0.12); border-radius: var(--radius-lg);
  padding: 20px; margin-top: 36px; border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
}
.auth-testimonial p { color: rgba(255,255,255,0.9); font-size: 0.9rem; font-style: italic; }
.auth-testimonial .author { color: rgba(255,255,255,0.6); font-size: 0.8rem; margin-top: 10px; }
.auth-features { margin-top: 32px; }
.auth-features li { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.85); font-size: 0.88rem; margin-bottom: 12px; list-style: none; }
.auth-features li .check { width: 20px; height: 20px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0; }

.auth-right { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 32px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box h1 { font-size: 1.8rem; color: var(--gray-900); margin-bottom: 6px; }
.auth-box .subtitle { color: var(--gray-500); font-size: 0.92rem; margin-bottom: 32px; }
.divider-or { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.divider-or span { font-size: 0.82rem; color: var(--gray-400); white-space: nowrap; }
.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }
.auth-footer-text { text-align: center; font-size: 0.88rem; color: var(--gray-500); margin-top: 20px; }
.auth-footer-text a { color: var(--green-600); font-weight: 600; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.88rem; margin-bottom: 16px; }
.alert-danger  { background: #FDECEA; color: #C62828; border: 1px solid #FFCDD2; }
.alert-success { background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-100); }

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.dash-layout { display: flex; min-height: 100vh; background: var(--gray-50); }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w); background: white;
  border-right: 1px solid var(--gray-200);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
  overflow-y: auto;
}
.sidebar-header { padding: 20px 20px 16px; border-bottom: 1px solid var(--gray-100); }
.sidebar-logo { display: flex; align-items: center; gap: 10px; }
.sidebar-logo .logo-text { font-size: 1rem; }
.sidebar-user { padding: 16px 20px; border-bottom: 1px solid var(--gray-100); }
.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--green-50); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; color: var(--green-600); flex-shrink: 0; }
.user-name { font-size: 0.88rem; font-weight: 600; color: var(--gray-900); }
.user-plan { font-size: 0.75rem; color: var(--gray-400); }

.sidebar-nav { padding: 12px 12px; flex: 1; }
.nav-section-label { font-size: 0.7rem; font-weight: 700; color: var(--gray-400); letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 8px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--gray-600); font-size: 0.88rem; font-weight: 500;
  transition: all var(--transition); margin-bottom: 2px; cursor: pointer;
  text-decoration: none;
}
.nav-item:hover { background: var(--gray-50); color: var(--gray-900); }
.nav-item.active { background: var(--green-50); color: var(--green-700); font-weight: 600; }
.nav-item .icon { font-size: 1.1rem; width: 20px; text-align: center; }
.nav-item .count { margin-left: auto; background: var(--green-100); color: var(--green-800); font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-full); }

.sidebar-footer { padding: 12px; border-top: 1px solid var(--gray-100); }
.upgrade-box { background: var(--green-50); border-radius: var(--radius-md); padding: 16px; border: 1px solid var(--green-100); }
.upgrade-box h4 { font-size: 0.85rem; color: var(--green-800); margin-bottom: 4px; }
.upgrade-box p  { font-size: 0.78rem; color: var(--green-600); margin-bottom: 12px; }

/* Main content */
.dash-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.dash-topbar {
  background: white; border-bottom: 1px solid var(--gray-200);
  padding: 14px 28px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 40;
}
.page-title { font-size: 1.15rem; font-weight: 700; color: var(--gray-900); }
.dash-content { padding: 28px; flex: 1; }

/* ============================================
   CHAT INTERFACE
   ============================================ */
.chat-layout { display: flex; height: calc(100vh - 64px); }

/* Conversations sidebar */
.conv-sidebar {
  width: 280px; border-right: 1px solid var(--gray-200);
  display: flex; flex-direction: column; background: white; flex-shrink: 0;
}
.conv-sidebar-header { padding: 16px; border-bottom: 1px solid var(--gray-200); }
.conv-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}
.conv-item:hover { background: var(--gray-50); }
.conv-item.active { background: var(--green-50); }
.conv-item-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--green-50); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.conv-item-title { font-size: 0.85rem; font-weight: 600; color: var(--gray-900); }
.conv-item-meta  { font-size: 0.75rem; color: var(--gray-400); }

/* Chat main area */
.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-header {
  padding: 16px 24px; border-bottom: 1px solid var(--gray-200);
  background: white; display: flex; align-items: center; justify-content: space-between;
}
.chat-pet-info { display: flex; align-items: center; gap: 12px; }
.chat-pet-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--green-50); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.chat-pet-name { font-size: 0.95rem; font-weight: 600; color: var(--gray-900); }
.chat-pet-breed { font-size: 0.8rem; color: var(--gray-400); }

.chat-messages { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.msg-row { display: flex; gap: 12px; max-width: 80%; }
.msg-row.user { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar-sm { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; }
.msg-row.bot .msg-avatar-sm { background: var(--green-50); color: var(--green-600); }
.msg-row.user .msg-avatar-sm { background: var(--green-600); color: white; }
.msg-bubble { padding: 12px 16px; border-radius: var(--radius-lg); font-size: 0.9rem; line-height: 1.6; }
.msg-row.bot  .msg-bubble { background: white; border: 1px solid var(--gray-200); color: var(--gray-800); border-bottom-left-radius: 4px; }
.msg-row.user .msg-bubble { background: var(--green-600); color: white; border-bottom-right-radius: 4px; }
.msg-image { max-width: 200px; border-radius: var(--radius-md); margin-bottom: 8px; display: block; }
.msg-time { font-size: 0.72rem; color: var(--gray-400); margin-top: 4px; }
.msg-row.user .msg-time { text-align: right; }

.severity-tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; margin-top: 8px; }
.sev-low  { background: var(--green-50); color: var(--green-800); }
.sev-med  { background: #FFF3E0; color: #E65100; }
.sev-high { background: #FDECEA; color: var(--danger); }

.typing-indicator { display: flex; align-items: center; gap: 5px; padding: 8px 12px; }
.typing-dot { width: 7px; height: 7px; background: var(--gray-400); border-radius: 50%; animation: bounce 1.2s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }

.free-limit-banner {
  background: #FFF3E0; border: 1px solid #FFE0B2; border-radius: var(--radius-md);
  padding: 12px 16px; margin: 0 24px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.free-limit-banner p { font-size: 0.85rem; color: #E65100; margin: 0; }

/* Chat input */
.chat-input-area { padding: 16px 24px; border-top: 1px solid var(--gray-200); background: white; }
.chat-input-box { background: var(--gray-50); border: 1.5px solid var(--gray-200); border-radius: var(--radius-xl); padding: 12px 16px; transition: border-color var(--transition); }
.chat-input-box:focus-within { border-color: var(--green-500); background: white; }
.chat-input-inner { display: flex; align-items: flex-end; gap: 12px; }
.chat-textarea { flex: 1; border: none; background: transparent; resize: none; font-size: 0.92rem; color: var(--gray-900); outline: none; max-height: 120px; line-height: 1.5; }
.chat-textarea::placeholder { color: var(--gray-400); }
.chat-actions { display: flex; align-items: center; gap: 8px; }
.upload-preview { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--gray-200); margin-bottom: 8px; }
.upload-preview img { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; }
.upload-preview .remove-btn { font-size: 0.75rem; color: var(--danger); cursor: pointer; }
.send-btn { width: 38px; height: 38px; background: var(--green-600); border: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background var(--transition); flex-shrink: 0; }
.send-btn:hover { background: var(--green-800); }
.send-btn svg { width: 18px; height: 18px; fill: white; }
.attach-btn { width: 32px; height: 32px; background: transparent; border: none; cursor: pointer; color: var(--gray-400); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.attach-btn:hover { background: var(--gray-100); color: var(--green-600); }
.chat-disclaimer { text-align: center; font-size: 0.75rem; color: var(--gray-400); margin-top: 8px; }

/* ============================================
   PETS PAGE
   ============================================ */
.pets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.pet-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-xl); overflow: hidden; cursor: pointer; transition: all var(--transition); }
.pet-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pet-card-img { width: 100%; height: 160px; object-fit: cover; background: var(--gray-100); display: flex; align-items: center; justify-content: center; font-size: 3.5rem; }
.pet-card-img img { width: 100%; height: 100%; object-fit: cover; }
.pet-card-body { padding: 16px; }
.pet-card-name { font-size: 1rem; font-weight: 700; color: var(--gray-900); }
.pet-card-meta { font-size: 0.82rem; color: var(--gray-400); margin-top: 4px; }
.pet-card-actions { display: flex; gap: 8px; margin-top: 14px; }
.add-pet-card {
  background: var(--gray-50); border: 2px dashed var(--gray-300);
  border-radius: var(--radius-xl); display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 40px 20px;
  cursor: pointer; transition: all var(--transition); min-height: 280px;
}
.add-pet-card:hover { border-color: var(--green-500); background: var(--green-50); }
.add-pet-card .icon { font-size: 2.5rem; margin-bottom: 12px; }
.add-pet-card p { font-size: 0.9rem; color: var(--gray-500); text-align: center; }

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); padding: 20px; }
.stat-card-label { font-size: 0.78rem; font-weight: 600; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; }
.stat-card-value { font-size: 2rem; font-weight: 800; color: var(--gray-900); margin: 6px 0; }
.stat-card-change { font-size: 0.8rem; color: var(--green-600); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--gray-50); font-size: 0.78rem; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--gray-200); }
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--gray-100); font-size: 0.88rem; color: var(--gray-700); vertical-align: middle; }
.data-table tr:hover td { background: var(--gray-50); }
.table-wrap { background: white; border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.modal { background: white; border-radius: var(--radius-xl); max-width: 480px; width: 100%; padding: 32px; box-shadow: var(--shadow-lg); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-title { font-size: 1.15rem; font-weight: 700; color: var(--gray-900); }
.modal-close { background: none; border: none; font-size: 1.4rem; color: var(--gray-400); cursor: pointer; padding: 4px; border-radius: 50%; transition: all var(--transition); }
.modal-close:hover { background: var(--gray-100); color: var(--gray-800); }

/* Image upload */
.photo-upload { border: 2px dashed var(--gray-300); border-radius: var(--radius-lg); padding: 32px; text-align: center; cursor: pointer; transition: all var(--transition); }
.photo-upload:hover { border-color: var(--green-500); background: var(--green-50); }
.photo-upload-preview { width: 100%; height: 180px; object-fit: cover; border-radius: var(--radius-md); }
.photo-upload p { font-size: 0.88rem; color: var(--gray-500); margin-top: 8px; }

/* Toast */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--gray-900); color: white; padding: 12px 18px; border-radius: var(--radius-md); font-size: 0.88rem; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); animation: slideIn 0.3s ease; }
.toast.success { background: var(--green-800); }
.toast.error   { background: var(--danger); }
@keyframes slideIn { from{transform:translateX(100%);opacity:0} to{transform:translateX(0);opacity:1} }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* Responsive */
@media (max-width: 900px) {
  .auth-left { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sidebar { transform: translateX(-100%); }
  .dash-main { margin-left: 0; }
  .conv-sidebar { display: none; }
}
@media (max-width: 600px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .navbar-links { display: none; }
  .hero-section { padding: 60px 16px 48px; }
  .footer-grid { grid-template-columns: 1fr; }
  .chat-layout { flex-direction: column; }
}
