/*
 * Proyecto ART internal tools: one look for ART Bot, Medical Records and the web editor.
 * Canonical copy: proyectoart-site/brand/tools.css. The other repos get it with `make sync-brand`
 * (run from proyectoart-site) - do not edit the copies.
 *
 * - Palette and font (Rubik) from proyectoart.com.
 * - The header is inverted (brand green, white text) so a tool never looks like the public site.
 * - Light only: the people using these tools are not technical, a dark theme confuses more than it helps.
 * - Each app keeps its own app.css for layout; it uses the tokens below.
 */
@font-face { font-family: Rubik; font-style: normal; font-weight: 400; font-display: swap; src: url(rubik-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Rubik; font-style: normal; font-weight: 400; font-display: swap; src: url(rubik-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Rubik; font-style: normal; font-weight: 500; font-display: swap; src: url(rubik-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Rubik; font-style: normal; font-weight: 500; font-display: swap; src: url(rubik-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* brand (proyectoart.com) */
  --brand: #2f855a;        /* header and primary buttons: the site's green-strong, white text on it passes WCAG AA */
  --brand-bright: #38a169; /* the logo green: accents, focus rings, meters */
  --brand-deep: #22543d;
  --mist: #eef6f1;
  /* surfaces and text */
  --bg: #f5f8f6; --panel: #ffffff; --ink: #1d1d1b; --muted: #5f5f5d; --line: #dde7e1; --sel: #e6f1ea;
  --accent: var(--brand);
  /* states */
  --warn: #b4441c; --note: #8a6d1a; --blue: #2b5fb4;
  --add: #e3f4e8; --add-ink: #1d5c35; --del: #fbe7e2; --del-ink: #8f2c13;
  --font: Rubik, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

body { font-family: var(--font); background: var(--bg); color: var(--ink); }
input, select, button, textarea { font-family: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 2px; }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover:not(:disabled), .btn.primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }

/* ---------- header: inverted brand bar ---------- */
.topbar { display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap; padding: 8px 16px; min-height: 52px; background: var(--brand); color: #fff; border: 0; }
.topbar h1 { margin: 0; font-size: 17px; font-weight: 500; }
.topbar .brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; white-space: nowrap; }
.topbar .brand img { height: 26px; width: auto; border-radius: 0; box-shadow: none; }
.topbar .brand small { font-size: 13px; font-weight: 400; opacity: .8; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav button, .topbar nav a { background: none; border: 1px solid transparent; border-radius: 6px; padding: 5px 10px; color: #fff; text-decoration: none; opacity: .9; }
.topbar nav button:hover:not(:disabled), .topbar nav a:hover { background: rgba(255, 255, 255, .14); border-color: transparent; opacity: 1; }
.topbar nav button.active, .topbar nav a.active { background: #fff; border-color: #fff; color: var(--brand-deep); font-weight: 500; opacity: 1; }
.topbar .count { background: #fff; color: var(--warn); font-weight: 500; }
.topbar nav .active .count { background: var(--warn); color: #fff; }
.topbar .who { margin-left: auto; display: flex; gap: 12px; align-items: center; min-width: 0; color: #fff; }
.topbar .who .muted { color: rgba(255, 255, 255, .85); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .who form { margin: 0; }
.topbar .badge { background: rgba(255, 255, 255, .14); border-color: transparent; color: #fff; }
.topbar .who button { background: none; border: 1px solid rgba(255, 255, 255, .6); border-radius: 6px; padding: 4px 10px; color: #fff; cursor: pointer; }
.topbar .who button:hover { background: rgba(255, 255, 255, .14); border-color: #fff; }
.topbar :focus-visible { outline-color: #fff; }
@media (max-width: 640px) {
  .topbar { gap: 8px; }
  .topbar .who { margin-left: 0; }
}
