:root {
  --teal-50:#eff7fd; --teal-100:#dceef9; --teal-200:#c2e1f5; --teal-300:#92caed;
  --teal-400:#6fb9e7; --teal-500:#3b9fde; --teal-600:#2492d6; --teal-700:#1f7db7;
  --emerald-600:#2492d6; --emerald-700:#1b6ea1;
  --accent:#f8e327; --accent-600:#e5d119;
  --ink:#0f172a; --ink-2:#334155; --muted:#64748b; --line:#dde8f2; --bg:#eef4fa; --card:#ffffff;
  --danger:#dc2626; --danger-bg:#fef2f2; --amber:#b45309; --amber-bg:#fffbeb;
  --info:#1b6ea1; --info-bg:#eff7fd; --success:#15803d; --success-bg:#f0fdf4;
  --shadow:0 1px 2px rgba(15,23,42,.06), 0 8px 24px -12px rgba(15,23,42,.18);
  --radius:14px;
}
* { box-sizing:border-box; }
html,body { margin:0; padding:0; height:100%; }
body {
  font-family:'Inter','Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color:var(--ink); background:var(--bg); -webkit-font-smoothing:antialiased;
}
a { color:var(--teal-700); text-decoration:none; }
a:hover { text-decoration:underline; }
button { font:inherit; cursor:pointer; }
input,select,textarea { font:inherit; }
.pv-boot { min-height:100vh; display:grid; place-items:center; }
.pv-spinner {
  width:38px; height:38px; border-radius:50%;
  border:3px solid var(--teal-100); border-top-color:var(--teal-600);
  animation:pv-spin .8s linear infinite;
}
@keyframes pv-spin { to { transform:rotate(360deg); } }

/* ── Auth screens ── */
.pv-auth {
  min-height:100vh; display:grid; grid-template-columns:1fr 1fr;
}
.pv-auth-aside {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(88,172,226,.4), transparent 60%),
    linear-gradient(160deg, var(--teal-600), var(--teal-700) 55%, var(--emerald-700));
  color:#eaf5fd; padding:48px; display:flex; flex-direction:column; justify-content:space-between;
}
.pv-auth-aside h1 { font-size:30px; line-height:1.25; margin:0 0 10px; }
.pv-auth-aside p { font-size:15px; opacity:.9; max-width:38ch; line-height:1.6; }
.pv-auth-brand { display:flex; align-items:center; gap:12px; font-weight:700; font-size:18px; }
.pv-auth-brand img { width:38px; height:38px; border-radius:10px; object-fit:contain; background:#fff; }
.pv-auth-features { list-style:none; padding:0; margin:28px 0 0; display:grid; gap:14px; }
.pv-auth-features li { display:flex; gap:10px; align-items:flex-start; font-size:14.5px; opacity:.96; }
.pv-auth-features .ic { flex:none; width:22px; height:22px; }
.pv-auth-main { display:grid; place-items:center; padding:32px; background:var(--card); }
.pv-auth-card { width:100%; max-width:400px; }
.pv-auth-card h2 { margin:0 0 6px; font-size:24px; }
.pv-auth-card .sub { color:var(--muted); margin:0 0 22px; font-size:14px; }

/* ── Forms ── */
.pv-field { margin-bottom:14px; }
.pv-field label { display:block; font-size:13px; font-weight:600; color:var(--ink-2); margin-bottom:6px; }
.pv-field input, .pv-field select, .pv-field textarea {
  width:100%; padding:11px 13px; border:1px solid var(--line); border-radius:10px;
  background:#fff; color:var(--ink); transition:border-color .15s, box-shadow .15s;
}
.pv-field input:focus, .pv-field select:focus, .pv-field textarea:focus {
  outline:none; border-color:var(--teal-500); box-shadow:0 0 0 3px rgba(36,146,214,.18);
}
.pv-field .hint { font-size:12px; color:var(--muted); margin-top:5px; }
.pv-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

.pv-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:11px 18px; border-radius:10px; border:1px solid transparent;
  font-weight:600; font-size:14.5px; transition:background .15s, border-color .15s, opacity .15s;
}
.pv-btn-primary { background:var(--teal-600); color:#fff; }
.pv-btn-primary:hover { background:var(--teal-700); }
.pv-btn-block { width:100%; }
.pv-btn-ghost { background:#fff; border-color:var(--line); color:var(--ink-2); }
.pv-btn-ghost:hover { background:var(--teal-50); border-color:var(--teal-200); }
.pv-btn-danger { background:var(--danger-bg); color:var(--danger); border-color:#fecaca; }
.pv-btn-danger:hover { background:#fee2e2; }
.pv-btn-sm { padding:7px 12px; font-size:13px; border-radius:8px; }
.pv-btn:disabled { opacity:.6; cursor:not-allowed; }

.pv-alert { padding:11px 13px; border-radius:10px; font-size:13.5px; margin-bottom:14px; }
.pv-alert-error { background:var(--danger-bg); color:var(--danger); border:1px solid #fecaca; }
.pv-alert-ok { background:var(--success-bg); color:var(--success); border:1px solid #bbf7d0; }
.pv-auth-switch { text-align:center; margin-top:18px; font-size:14px; color:var(--muted); }

/* ── Shell ── */
.pv-shell { min-height:100vh; display:grid; grid-template-columns:248px 1fr; }
.pv-sidebar {
  background:#0c2b40; color:#d6e6f4; display:flex; flex-direction:column; padding:18px 14px; gap:6px;
  position:sticky; top:0; height:100vh;
}
.pv-side-brand { display:flex; align-items:center; gap:10px; padding:6px 8px 16px; font-weight:700; color:#fff; }
.pv-side-brand img { width:34px; height:34px; border-radius:9px; object-fit:contain; background:#fff; }
.pv-side-brand small { display:block; font-weight:400; font-size:11.5px; opacity:.7; }
.pv-nav { display:flex; flex-direction:column; gap:2px; overflow-y:auto; }
.pv-nav a {
  display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:9px;
  color:#cfe0f0; font-size:14px; font-weight:500;
}
.pv-nav a:hover { background:rgba(255,255,255,.08); text-decoration:none; }
.pv-nav a.active { background:var(--teal-600); color:#fff; font-weight:600; }
.pv-nav a .ic { width:18px; height:18px; flex:none; }
.pv-nav .badge { margin-left:auto; background:#ef4444; color:#fff; font-size:11px; font-weight:700; padding:1px 7px; border-radius:999px; }
.pv-side-foot { margin-top:auto; padding-top:12px; border-top:1px solid rgba(255,255,255,.12); }
.pv-side-foot button { width:100%; }

.pv-main { display:flex; flex-direction:column; min-width:0; }
.pv-topbar {
  height:62px; background:#fff; border-bottom:1px solid var(--line); display:flex; align-items:center;
  gap:14px; padding:0 20px; position:sticky; top:0; z-index:30;
}
.pv-topbar h2 { font-size:18px; margin:0; flex:1; }
.pv-menu-btn { display:none; background:#fff; border:1px solid var(--line); border-radius:9px; padding:7px 9px; }
.pv-iconbtn { position:relative; background:#fff; border:1px solid var(--line); border-radius:9px; padding:7px 9px; display:inline-flex; }
.pv-iconbtn:hover { background:var(--teal-50); }
.pv-iconbtn .dot {
  position:absolute; top:-5px; right:-5px; min-width:17px; height:17px; padding:0 4px;
  background:#ef4444; color:#fff; border-radius:999px; font-size:10.5px; font-weight:700;
  display:flex; align-items:center; justify-content:center; border:2px solid #fff;
}
.pv-content { padding:24px; max-width:1200px; width:100%; margin:0 auto; }

/* ── Bell dropdown ── */
.pv-bell-wrap { position:relative; }
.pv-bell-panel {
  position:absolute; right:0; top:calc(100% + 10px); width:360px; max-width:88vw; background:#fff;
  border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow); overflow:hidden; z-index:60;
}
.pv-bell-head { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid var(--line); }
.pv-bell-head strong { font-size:14px; }
.pv-bell-list { max-height:380px; overflow-y:auto; }
.pv-bell-foot { padding:10px 14px; border-top:1px solid var(--line); text-align:center; }

/* ── Cards / grids ── */
.pv-grid { display:grid; gap:16px; }
.pv-grid-4 { grid-template-columns:repeat(4,1fr); }
.pv-grid-3 { grid-template-columns:repeat(3,1fr); }
.pv-grid-2 { grid-template-columns:repeat(2,1fr); }
.pv-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.pv-card-pad { padding:18px; }
.pv-stat { display:flex; flex-direction:column; gap:6px; }
.pv-stat .n { font-size:26px; font-weight:700; }
.pv-stat .l { font-size:13px; color:var(--muted); }
.pv-stat .ic { width:36px; height:36px; border-radius:10px; display:grid; place-items:center; margin-bottom:6px; }
.pv-stat .ic.teal { background:var(--teal-50); color:var(--teal-700); }
.pv-stat .ic.amber { background:var(--amber-bg); color:var(--amber); }
.pv-stat .ic.blue { background:var(--info-bg); color:var(--info); }
.pv-stat .ic.red { background:var(--danger-bg); color:var(--danger); }
.pv-section-title { font-size:16px; font-weight:700; margin:0 0 12px; }
.pv-page-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; flex-wrap:wrap; }
.pv-page-head h1 { font-size:22px; margin:0; }
.pv-page-head p { margin:3px 0 0; color:var(--muted); font-size:14px; }

/* ── Lists / tables ── */
.pv-list { display:flex; flex-direction:column; }
.pv-list-item { display:flex; gap:12px; align-items:flex-start; padding:14px; border-bottom:1px solid var(--line); }
.pv-list-item:last-child { border-bottom:none; }
.pv-list-item .ic { width:34px; height:34px; border-radius:9px; display:grid; place-items:center; flex:none; background:var(--teal-50); color:var(--teal-700); }
.pv-list-item.unread { background:var(--teal-50); }
.pv-list-item .body { flex:1; min-width:0; }
.pv-list-item .title { font-weight:600; font-size:14px; }
.pv-list-item .msg { color:var(--ink-2); font-size:13.5px; margin-top:2px; }
.pv-list-item .meta { color:var(--muted); font-size:12px; margin-top:5px; }

.pv-table { width:100%; border-collapse:collapse; }
.pv-table th, .pv-table td { text-align:left; padding:11px 14px; border-bottom:1px solid var(--line); font-size:13.5px; }
.pv-table th { color:var(--muted); font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.03em; background:#f8fafc; }
.pv-table tr:last-child td { border-bottom:none; }

.pv-pill { display:inline-flex; align-items:center; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:600; }
.pv-pill.grey { background:#f1f5f9; color:var(--ink-2); }
.pv-pill.green { background:var(--success-bg); color:var(--success); }
.pv-pill.red { background:var(--danger-bg); color:var(--danger); }
.pv-pill.amber { background:var(--amber-bg); color:var(--amber); }
.pv-pill.blue { background:var(--info-bg); color:var(--info); }
.pv-pill.teal { background:var(--teal-50); color:var(--teal-700); }

.pv-empty { text-align:center; padding:44px 20px; color:var(--muted); }
.pv-empty .ic { margin:0 auto 12px; width:46px; height:46px; opacity:.5; }
.pv-empty h3 { margin:0 0 4px; color:var(--ink-2); font-size:16px; }
.pv-skeleton { height:14px; border-radius:6px; background:linear-gradient(90deg,#eef2f6,#e2e8f0,#eef2f6); background-size:200% 100%; animation:pv-sk 1.2s infinite; }
@keyframes pv-sk { to { background-position:-200% 0; } }

.pv-pet-card { display:flex; gap:14px; align-items:center; }
.pv-avatar { width:52px; height:52px; border-radius:14px; object-fit:cover; background:var(--teal-50); display:grid; place-items:center; color:var(--teal-700); font-weight:700; font-size:20px; flex:none; }

/* ── Modal ── */
.pv-modal-backdrop { position:fixed; inset:0; background:rgba(15,23,42,.5); display:grid; place-items:center; padding:20px; z-index:100; }
.pv-modal-backdrop[hidden] { display:none !important; }
.pv-modal { background:#fff; border-radius:16px; width:100%; max-width:520px; max-height:90vh; overflow:auto; box-shadow:0 24px 60px -20px rgba(15,23,42,.5); }
.pv-modal-head { display:flex; align-items:center; justify-content:space-between; padding:18px 20px; border-bottom:1px solid var(--line); position:sticky; top:0; background:#fff; }
.pv-modal-head h3 { margin:0; font-size:18px; }
.pv-modal-body { padding:20px; }
.pv-modal-foot { padding:16px 20px; border-top:1px solid var(--line); display:flex; gap:10px; justify-content:flex-end; position:sticky; bottom:0; background:#fff; }
.pv-x { background:transparent; border:none; font-size:22px; line-height:1; color:var(--muted); }

.pv-toast-wrap { position:fixed; bottom:20px; right:20px; display:flex; flex-direction:column; gap:10px; z-index:200; }
.pv-toast { background:#0f172a; color:#fff; padding:12px 16px; border-radius:10px; font-size:14px; box-shadow:var(--shadow); max-width:340px; }
.pv-toast.ok { background:var(--success); }
.pv-toast.err { background:var(--danger); }

.pv-muted { color:var(--muted); }
.pv-mt-16 { margin-top:16px; }
.pv-flex { display:flex; align-items:center; gap:10px; }
.pv-between { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.pv-wrap { flex-wrap:wrap; }

@media (max-width:1000px) {
  .pv-grid-4 { grid-template-columns:repeat(2,1fr); }
  .pv-grid-3 { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:820px) {
  .pv-auth { grid-template-columns:1fr; }
  .pv-auth-aside { display:none; }
  .pv-shell { grid-template-columns:1fr; }
  .pv-sidebar {
    position:fixed; z-index:80; width:262px; left:0; top:0; transform:translateX(-100%);
    transition:transform .22s ease; box-shadow:0 0 0 100vmax rgba(0,0,0,.0);
  }
  .pv-shell.nav-open .pv-sidebar { transform:translateX(0); box-shadow:0 0 60px rgba(0,0,0,.45); }
  .pv-menu-btn { display:inline-flex; }
  .pv-grid-4, .pv-grid-3, .pv-grid-2 { grid-template-columns:1fr; }
  .pv-content { padding:16px; }
  .pv-row { grid-template-columns:1fr; }
}
