/* ============================================================
   ModularReports · Chrome do App
   Design system = ModularHub REAL (tokens exatos, sem inventar).
   Fonte: Rajdhani (display) + Rubik (corpo) + JetBrains Mono (dados).
   ============================================================ */

@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/rajdhani-600.woff2") format("woff2");
}
@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/rajdhani-700.woff2") format("woff2");
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/rubik-400.woff2") format("woff2");
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/rubik-500.woff2") format("woff2");
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/rubik-600.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-500.woff2") format("woff2");
}

:root {
  --font-display: "Rajdhani", system-ui, sans-serif;
  --font-sans: "Rubik", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius-sm: 0px;
  --radius-md: 2px;
  --radius-lg: 2px;
  --radius-xl: 3px;

  --sidebar-w: 256px;
  --header-h: 56px;

  --shadow-card: 0 1px 2px 0 rgb(15 24 37 / 0.04), 0 1px 3px 0 rgb(15 24 37 / 0.06);
  --shadow-pop: 0 4px 6px -1px rgb(15 24 37 / 0.08), 0 10px 15px -3px rgb(15 24 37 / 0.06);

  --background: #fafaf9;
  --foreground: #1c1917;
  --card: #ffffff;
  --primary: #0062d1;
  --primary-foreground: #ffffff;
  --primary-hover: #004fa8;
  --secondary: #f5f5f4;
  --muted: #f5f5f4;
  --muted-foreground: #57534e;
  --accent: #f5f5f4;
  --border: #e7e5e4;
  --ring: #0062d1;
  --success: #15803d;
  --success-bg: rgb(21 128 61 / 0.12);
  --warning: #b45309;
  --warning-bg: rgb(180 83 9 / 0.12);
  --destructive: #dc2626;
  --destructive-bg: rgb(220 38 38 / 0.12);
  --chart-1: #0062d1;
  --chart-2: #15803d;
  --chart-3: #b45309;
  --chart-4: #7c3aed;
  --chart-5: #db2777;
}

/* Dark mode — paleta dark real do ModularHub (apps/web/src/index.css) */
.dark {
  --background: #0c0a09;
  --foreground: #e7e5e4;
  --card: #1c1917;
  --primary: #3b8ef0;
  --primary-foreground: #06111f;
  --primary-hover: #63a6f3;
  --secondary: #292524;
  --muted: #292524;
  --muted-foreground: #a8a29e;
  --accent: #292524;
  --border: #292524;
  --ring: #3b8ef0;
  --success: #34d27a;
  --success-bg: rgb(52 210 122 / 0.14);
  --warning: #f0a83b;
  --warning-bg: rgb(240 168 59 / 0.14);
  --destructive: #f4685f;
  --destructive-bg: rgb(244 104 95 / 0.14);
  --chart-1: #3b8ef0;
  --chart-2: #34d27a;
  --chart-3: #f0a83b;
  --chart-4: #a78bfa;
  --chart-5: #f472b6;
  --shadow-card: 0 1px 2px 0 rgb(0 0 0 / 0.35), 0 1px 3px 0 rgb(0 0 0 / 0.4);
  --shadow-pop: 0 4px 6px -1px rgb(0 0 0 / 0.45), 0 10px 15px -3px rgb(0 0 0 / 0.4);
}

/* Alinhamento canônico de ícones: todo slot de ícone é flex centrado */
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 0; }
svg.mr-icon { display: block; flex-shrink: 0; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.mr-icon { display: inline-flex; flex-shrink: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
  font-weight: 700;
  margin: 0;
  color: var(--foreground);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }

/* ---------- Shell layout ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
}
.sidebar-brand {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-brand .mark {
  width: 26px; height: 26px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
}
.sidebar-brand .word { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 0.01em; }
.sidebar-brand .word em { font-style: normal; color: var(--primary); }

.sidebar-agency {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  margin: 12px 12px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--muted);
}
.sidebar-agency .logo-chip {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 12px; color: #fff;
  flex-shrink: 0;
}
.sidebar-agency .meta { min-width: 0; }
.sidebar-agency .meta b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-agency .meta span { display: block; font-size: 10.5px; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.04em; }

.nav-group-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgb(87 83 78 / 0.7);
  padding: 16px 20px 6px;
}
.nav { display: flex; flex-direction: column; padding: 0 12px; gap: 1px; }
.nav a, .nav .navlink {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
}
.nav a:hover, .nav .navlink:hover { background: var(--muted); }
.nav a.active, .nav .navlink.active { background: var(--accent); color: var(--primary); font-weight: 600; }
.nav a .mr-icon, .nav .navlink .mr-icon { color: var(--muted-foreground); }
.nav a.active .mr-icon, .nav .navlink.active .mr-icon { color: var(--primary); }

.sidebar-foot {
  margin-top: auto;
  /* padding-bottom alto: a flag fixa "MOCKUP" (nav.js, bottom:16px) não pode cobrir o texto */
  padding: 14px 20px 52px;
  font-size: 11px;
  color: var(--muted-foreground);
  border-top: 1px solid var(--border);
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--header-h);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
  font-family: var(--font-sans);
  letter-spacing: 0;
}
.topbar .crumb { font-size: 11.5px; color: var(--muted-foreground); margin-top: 1px; }
.topbar .spacer { flex: 1; }
.searchbox {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--card);
  color: var(--muted-foreground); font-size: 13px;
  width: 240px;
}
.topbar .searchbox { background: var(--background); }
.searchbox input { border: 0; outline: 0; background: transparent; font: inherit; color: var(--foreground); width: 100%; min-width: 0; }
.topbar .icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--muted-foreground);
  border: 1px solid transparent;
  position: relative;
  flex-shrink: 0;
}
.topbar .icon-btn:hover { background: var(--muted); }
.topbar .icon-btn .dot {
  position: absolute; top: 6px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--destructive); border: 1.5px solid var(--card);
}
.topbar .icon-btn .badge-count {
  position: absolute; top: 2px; right: 2px;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 999px; background: var(--destructive); color: #fff;
  font-size: 9.5px; font-weight: 700; line-height: 15px; text-align: center;
  border: 1.5px solid var(--card);
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600; flex-shrink: 0;
}
.agency-switch {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--card); color: var(--foreground); font-size: 13px; font-weight: 500;
  white-space: nowrap; flex-shrink: 0;
}
.agency-switch:hover { background: var(--muted); }
.agency-switch .mr-icon:first-child { color: var(--muted-foreground); }
.agency-switch .mr-icon:last-child { color: var(--muted-foreground); }
.topbar-user { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.topbar-user .who { line-height: 1.25; }
.topbar-user .who b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.topbar-user .who span { display: block; font-size: 10.5px; color: var(--muted-foreground); white-space: nowrap; }
@media (max-width: 760px) {
  .agency-switch span:not(.mr-icon) { display: none; }
  .agency-switch { padding: 0 8px; }
  .topbar-user .who { display: none; }
}

.content { padding: 28px 32px 80px; max-width: 1360px; }
.content.full { max-width: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px; font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; gap: 6px; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-card); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--secondary); color: var(--foreground); }
.btn-secondary:hover { background: var(--border); }
.btn-outline { background: var(--card); color: var(--foreground); border-color: var(--border); }
.btn-outline:hover { background: var(--muted); }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--muted); }
.btn-destructive { background: var(--destructive); color: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.card-header {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-header h2, .card-header h3 { font-size: 18px; }
.card-header p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted-foreground); }
.card-body { padding: 22px; }
.card-body.tight { padding: 0; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; padding: 2px 10px;
  font-size: 11px; font-weight: 500;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-destructive { background: var(--destructive-bg); color: var(--destructive); }
.badge-muted { background: var(--muted); color: var(--muted-foreground); }
.badge-primary { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--muted-foreground); }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 500; color: var(--foreground); }
.field .hint { font-size: 11.5px; color: var(--muted-foreground); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], input[type="number"], select, textarea {
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  padding: 0 12px;
  font: inherit; font-size: 13.5px;
  color: var(--foreground);
  width: 100%;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 22%, transparent);
}
::placeholder { color: rgb(87 83 78 / 0.55); }

/* ---------- Page header (título grande + subtítulo + ação, padrão MHub) ---------- */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-head .titles h1 {
  font-size: 26px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-head .titles h1 .mr-icon { color: var(--primary); }
.page-head .titles p { margin: 5px 0 0; font-size: 13.5px; color: var(--muted-foreground); }
.page-head .actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ---------- Stat strip pequeno (padrão MHub Contas: bolinha + label + número) ---------- */
.stat-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.stat-chip {
  flex: 1; min-width: 118px;
  display: flex; flex-direction: column; gap: 8px;
  padding: 13px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--card);
}
.stat-chip .lbl { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-foreground); }
.stat-chip .lbl .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.stat-chip b { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- Tabs segmentadas (ativa = pill azul sólido, padrão MHub) ---------- */
.seg-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.seg-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--muted-foreground);
  border: 1px solid transparent;
}
.seg-tab.active { background: var(--primary); color: #fff; }
.seg-tab:not(.active):hover { background: var(--muted); }

/* ---------- KPI card grande (ícone tintado + número Rajdhani, padrão MHub Painel) ---------- */
.kpi-card { padding: 20px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kpi-card .meta span { display: block; font-size: 13px; color: var(--muted-foreground); margin-bottom: 10px; }
.kpi-card .meta b { font-family: var(--font-display); font-weight: 700; font-size: 30px; line-height: 1; display: block; font-variant-numeric: tabular-nums; }
.kpi-card .meta .foot { display: block; font-size: 11.5px; color: var(--muted-foreground); margin-top: 8px; font-weight: 400; font-family: var(--font-sans); }
.kpi-card .ico { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.kpi-card .ico.warn { background: var(--warning-bg); color: var(--warning); }
.kpi-card .ico.danger { background: var(--destructive-bg); color: var(--destructive); }
.kpi-card .ico.ok { background: var(--success-bg); color: var(--success); }

/* ---------- Toolbar de lista (busca + selects, sem pill preta) ---------- */
.list-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.list-toolbar .searchbox { width: 260px; }
.list-toolbar select { width: auto; min-width: 148px; height: 36px; font-size: 12.5px; }

/* ---------- Célula de entidade (avatar quadrado + nome + sub, padrão MHub) ---------- */
.entity-cell { display: flex; align-items: center; gap: 10px; }
.entity-cell .chip {
  width: 34px; height: 34px; border-radius: var(--radius-md);
  background: var(--muted); border: 1px solid var(--border);
  color: var(--muted-foreground);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700; flex-shrink: 0;
}
.entity-cell .name { font-weight: 600; font-size: 13.5px; }
.entity-cell .sub { font-size: 11.5px; color: var(--muted-foreground); }

/* ---------- Ações de linha (botão outline + kebab, padrão MHub) ---------- */
.row-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.row-actions .icon-btn { width: 30px; height: 30px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--muted-foreground); flex-shrink: 0; }
.row-actions .icon-btn:hover { background: var(--muted); color: var(--foreground); }

/* ---------- Tables ---------- */
.card-body.tight:has(table) { overflow-x: auto; }
.table-clean { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.table-clean th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted-foreground); font-weight: 600;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
}
.table-clean th.num, .table-clean td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-clean td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table-clean tr:last-child td { border-bottom: none; }
.table-clean tr:hover td { background: var(--muted); }

/* ---------- Misc ---------- */
.hairline { border: none; border-top: 1px solid var(--border); margin: 0; }
.muted { color: var(--muted-foreground); }
.mono { font-family: var(--font-mono); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tab {
  padding: 10px 4px; margin-right: 20px;
  font-size: 13.5px; font-weight: 500; color: var(--muted-foreground);
  border-bottom: 2px solid transparent;
}
.tab.active { color: var(--foreground); border-bottom-color: var(--primary); }
.empty-block {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 60px 20px; text-align: center; color: var(--muted-foreground);
}
.empty-block .mr-icon { color: var(--border); }
.kbd {
  font-family: var(--font-mono); font-size: 10.5px;
  border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 5px; color: var(--muted-foreground); background: var(--muted);
}
.divider-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-foreground);
  margin: 6px 0;
}
.divider-label::before, .divider-label::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Toggle switch ---------- */
.mr-toggle { position: relative; display: inline-flex; align-items: center; width: 40px; height: 22px; flex-shrink: 0; }
.mr-toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 2; }
.mr-toggle .track { position: absolute; inset: 0; background: var(--border); border-radius: 999px; transition: background .15s ease; pointer-events: none; }
.mr-toggle .thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-card); transition: transform .15s ease; pointer-events: none; }
.mr-toggle input:checked ~ .track { background: var(--primary); }
.mr-toggle input:checked ~ .thumb { transform: translateX(18px); }
.mr-toggle input:focus-visible ~ .track { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ---------- Toggle row (label + descrição + switch) ---------- */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.toggle-row + .toggle-row { border-top: 1px solid var(--border); }
.toggle-row .info b { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; }
.toggle-row .info b .mr-icon { color: var(--muted-foreground); }
.toggle-row .info span { display: block; font-size: 11.5px; color: var(--muted-foreground); margin-top: 2px; }
.toggle-extra { padding: 2px 0 14px; }
.toggle-extra:not(:last-child) { border-bottom: 1px solid var(--border); }

/* ---------- Nota informativa inline ---------- */
.info-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; background: var(--muted); border-radius: var(--radius-md); font-size: 11.5px; color: var(--muted-foreground); line-height: 1.5; }
.info-note .mr-icon { flex-shrink: 0; margin-top: 1px; color: var(--muted-foreground); }

/* ---------- Item de histórico (timeline simples) ---------- */
.history-item { display: flex; gap: 12px; padding: 12px 0; }
.history-item + .history-item { border-top: 1px solid var(--border); }
.history-item .av { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.history-item .body { flex: 1; font-size: 12.5px; line-height: 1.5; min-width: 0; }
.history-item .body b { font-weight: 600; }
.history-item .time { font-size: 11px; color: var(--muted-foreground); margin-top: 2px; }

/* ---------- Link display (URL + ações inline) ---------- */
.link-display { display: flex; align-items: center; gap: 8px; }
.link-display input { font-family: var(--font-mono); font-size: 12px; background: var(--muted); }
.link-display .btn { flex-shrink: 0; }

/* ---------- Passphrase (senha de acesso em palavras) ---------- */
.passphrase { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.passphrase span { font-family: var(--font-mono); font-size: 13px; font-weight: 600; background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px; }

/* ---------- Mobile ---------- */
.menu-toggle { display: none; }
@media (max-width: 980px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-pop); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--radius-md); border: 1px solid var(--border);
    background: var(--card); flex-shrink: 0;
  }
  .topbar .searchbox { display: none; }
  .content { padding: 20px 16px 64px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .scrim { position: fixed; inset: 0; background: rgb(0 0 0 / .35); z-index: 39; display: none; }
  .scrim.show { display: block; }
}
