/* Grafic Suite — t43u: access by e-mail (login/forgot), user invitations, access panel, Seguimiento period chip.
   Uses the v4 tokens so light and dark "Grafito" stay in sync. Desktop-first. */

/* ---------- Login: forgot password ---------- */
html body[data-theme] .auth-forgot-copy { margin: -4px 0 14px; color: var(--v4-muted); font-size: 14px; line-height: 1.5; }
html body[data-theme] .auth-forgot-copy.small { font-size: 13px; color: var(--v4-subtle); }
html body[data-theme] .auth-forgot-link { justify-self: center; margin-top: 6px; border: 0; background: transparent; color: var(--v4-accent-text); font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; }
html body[data-theme] .auth-forgot-link:hover { text-decoration: underline; }

/* ---------- Users: head actions + create user ---------- */
html body[data-theme] .users-head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
html body[data-theme] .users-head-actions .secondary { display: inline-flex; gap: 8px; align-items: center; }
html body[data-theme] .create-user-modal { width: min(760px, calc(100vw - 48px)) !important; max-width: none !important; }
html body[data-theme] .create-user-form { gap: 14px; }
html body[data-theme] .create-user-form .field small { display: block; margin-top: 5px; color: var(--v4-subtle); font-size: 12.5px; line-height: 1.4; }
html body[data-theme] .create-user-form .required-mark { color: var(--v4-bad); }
html body[data-theme] .create-user-form [aria-invalid="true"] { border-color: var(--v4-bad) !important; box-shadow: 0 0 0 3px var(--v4-bad-bg) !important; }
html body[data-theme] .create-user-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--v4-r-md); background: var(--v4-accent-soft); color: var(--v4-text); font-size: 13.5px; line-height: 1.45; }
html body[data-theme] .create-user-note svg { flex: 0 0 auto; color: var(--v4-accent); margin-top: 1px; }
html body[data-theme] .create-user-error:empty { display: none; }
html body[data-theme] .create-user-error { color: var(--v4-bad); font-size: 13.5px; font-weight: 650; }
html body[data-theme] .create-user-result { display: grid; gap: 16px; }
html body[data-theme] .create-user-result-head { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--v4-border); border-radius: var(--v4-r-lg); background: var(--v4-nested); }
html body[data-theme] .create-user-result-head > div { flex: 1; min-width: 0; }
html body[data-theme] .create-user-result-head h4 { margin: 0; font-size: 16px; }
html body[data-theme] .create-user-result-head p { margin: 2px 0 0; color: var(--v4-muted); font-size: 13.5px; }
html body[data-theme] .create-user-result-avatar { width: 46px; height: 46px; }
html body[data-theme] .create-user-result-copy { margin: 0; font-size: 14px; line-height: 1.5; color: var(--v4-text); }
html body[data-theme] .create-user-result-copy.warn { padding: 10px 12px; border-radius: var(--v4-r-md); background: var(--v4-warn-bg); color: var(--v4-warn); font-weight: 600; }
html body[data-theme] .create-user-result .toolbar { justify-content: flex-end; gap: 10px; }

/* ---------- Copyable link ---------- */
html body[data-theme] .copy-link-box { display: grid; gap: 6px; }
html body[data-theme] .copy-link-box label { font-size: 12.5px; font-weight: 700; color: var(--v4-muted); }
html body[data-theme] .copy-link-box > div { display: flex; gap: 8px; }
html body[data-theme] .copy-link-box input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
html body[data-theme] .copy-link-box small { color: var(--v4-subtle); font-size: 12px; }

/* ---------- Access & invitations panel ---------- */
html body[data-theme] .access-panel-modal { width: min(1180px, calc(100vw - 48px)) !important; max-width: none !important; max-height: calc(100vh - 64px); display: grid; grid-template-rows: auto auto auto auto minmax(0, 1fr); gap: 14px; overflow: hidden; }
html body[data-theme] .access-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
html body[data-theme] .access-mail-state { padding: 8px 12px; border-radius: var(--v4-r-pill); font-size: 13px; font-weight: 650; }
html body[data-theme] .access-mail-state.ok { background: var(--v4-ok-bg); color: var(--v4-ok); }
html body[data-theme] .access-mail-state.warn { background: var(--v4-warn-bg); color: var(--v4-warn); }
html body[data-theme] .access-counts { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; }
html body[data-theme] .access-counts span { display: inline-flex; align-items: center; gap: 6px; }
html body[data-theme] .access-counts b { font-size: 15px; }
html body[data-theme] .access-flagged { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--v4-r-md); background: var(--v4-bad-bg); color: var(--v4-text); font-size: 13.5px; }
html body[data-theme] .access-flagged strong { color: var(--v4-bad); }
html body[data-theme] .access-flagged > div { display: flex; flex-wrap: wrap; gap: 6px; }
html body[data-theme] .access-bulk-result { padding: 12px 14px; border-radius: var(--v4-r-md); background: var(--v4-info-bg); font-size: 13.5px; display: grid; gap: 8px; }
html body[data-theme] .access-bulk-result details { display: grid; gap: 8px; }
html body[data-theme] .access-bulk-result summary { cursor: pointer; font-weight: 700; }
html body[data-theme] .access-table-wrap { min-height: 0; overflow: auto; border: 1px solid var(--v4-border); border-radius: var(--v4-r-lg); }
html body[data-theme] .access-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
html body[data-theme] .access-table th { position: sticky; top: 0; z-index: 1; padding: 10px 14px; background: var(--v4-surface-solid); color: var(--v4-muted); font-size: 12px; font-weight: 750; text-align: left; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--v4-border); }
html body[data-theme] .access-table td { padding: 10px 14px; border-bottom: 1px solid var(--v4-border); vertical-align: middle; }
html body[data-theme] .access-table tr:last-child td { border-bottom: 0; }
html body[data-theme] .access-person { display: flex; align-items: center; gap: 10px; min-width: 220px; }
html body[data-theme] .access-person span { display: grid; gap: 2px; }
html body[data-theme] .access-person small { color: var(--v4-subtle); font-size: 12px; }
html body[data-theme] .access-avatar { width: 34px; height: 34px; font-size: 13px; }
html body[data-theme] .access-email { word-break: break-all; }
html body[data-theme] .access-link-row td { background: var(--v4-nested); }

/* ---------- Seguimiento: active period chip ---------- */
html body[data-theme] .rh-period-chip { align-self: center; white-space: nowrap; }
html body[data-theme] :is(.access-avatar, .create-user-result-avatar) { display: grid; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 50%; background: var(--v4-accent-soft); color: var(--v4-accent-text); font-weight: 800; letter-spacing: 0; }
html body[data-theme] :is(.access-avatar, .create-user-result-avatar) img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Campaign board: running timer (t43u) ---------- */
html body[data-theme] .campaign-board-card footer strong.is-running { color: var(--v4-ok); }
html body[data-theme] .campaign-board-card footer strong.is-running::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: middle; animation: gs-t43-pulse 1.2s ease-in-out infinite; }
@keyframes gs-t43-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { html body[data-theme] .campaign-board-card footer strong.is-running::before { animation: none; } }
