/* Base comun de todas las pantallas del panel interno: colores, tipografia,
   barra superior con pestañas y encabezado de pagina. Tambien la usan las
   pantallas de profesionales (que extienden provider_base.html). */
:root {
  --ink: #1c1917;
  --ink-2: #44403c;
  --muted: #78716c;
  --line: #e7e5e4;
  --line-2: #d6d3d1;
  --bg: #f5f5f4;
  --card: #ffffff;
  --orange: #ff7a30;
  --orange-deep: #ea580c;
  --orange-soft: #fff4ec;
  --green: #16a34a;
  --green-soft: #ecfdf3;
  --red: #b91c1c;
  --red-soft: #fef2f2;
  --amber: #a16207;
  --amber-soft: #fefce8;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.45;
}

/* ---------- Barra superior ---------- */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.appbar-inner { max-width: 1080px; margin: 0 auto; padding: 12px 16px 0; }
.appbar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand img { display: block; height: 32px; width: auto; }
.brand small { color: var(--muted); font-weight: 500; font-size: 13px; }
.account { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); min-width: 0; }
.account .email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.account a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  white-space: nowrap;
}
.account a:hover { border-color: var(--line-2); background: #fafaf9; }
.appnav {
  display: flex;
  gap: 4px;
  margin: 10px -16px 0;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.appnav::-webkit-scrollbar { display: none; }
.appnav a {
  flex: none;
  padding: 10px 12px 11px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.appnav a:hover { color: var(--ink); }
.appnav-group {
  flex: none;
  align-self: center;
  margin: 0 4px 0 10px;
  padding-left: 14px;
  border-left: 1px solid var(--line-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a8a29e;
}
.appnav a.active { color: var(--ink); border-bottom-color: var(--orange); }

/* ---------- Pagina ---------- */
/* Dos anchos para todo el panel: listados (ancho) y formularios (angosto). */
.page { max-width: 1080px; margin: 0 auto; padding: 24px 16px 80px; }
.page.narrow { max-width: 680px; }
.page-head { margin-bottom: 20px; }
.page-head.with-action { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.page-head h1 {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.page-head p { margin: 0; color: var(--muted); font-size: 14px; }
.page-head p a { color: var(--orange-deep); font-weight: 600; text-decoration: none; }

@media (max-width: 520px) {
  .account .email { display: none; }
  .appnav-group { font-size: 0; margin: 0 2px 0 6px; padding-left: 0; height: 18px; }
  .page-head h1 { font-size: 22px; }
}
