/* ==========================================================================
   Grafic Suite · t47u — toast stack above every layer, requirement detail (2 cols),
   safe delete, campaign modal contrast, Marketing side panel, Grafito UI batch
   (avatars, status badge, animated icons, heatmap, voice note), productivity index.
   Loaded last; uses refined-v4 tokens (--v4-*) for light + dark Grafito.
   ========================================================================== */
:root {
  --t47-ring: rgba(18, 20, 32, .78);
  --t47-glass: color-mix(in srgb, var(--v4-surface-solid, #fff) 84%, transparent);
  --t47-glass-strong: color-mix(in srgb, var(--v4-surface-solid, #fff) 94%, transparent);
  --t47-border: var(--v4-border, rgba(24, 26, 44, .085));
  --t47-text: var(--v4-text, #1a1c26);
  --t47-muted: var(--v4-muted, #555b6c);
  --t47-accent: var(--v4-accent, #6b3fb0);
  --t47-accent-soft: var(--v4-accent-soft, rgba(107, 63, 176, .10));
}
body[data-theme="dark"] { --t47-ring: rgba(0, 0, 0, .85); }

/* ---------- 1. Toast stack: last child of <body>, top of every layer ---------- */
#gs-toast-island { display: none !important; }
.gt-toast-stack {
  position: fixed; top: 76px; right: 18px; z-index: 2147483000; display: grid; gap: 10px;
  width: min(380px, calc(100vw - 32px)); pointer-events: none;
}
.gt-toast {
  position: relative; pointer-events: auto; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; align-items: start; gap: 10px;
  padding: 12px 12px 14px 12px; border-radius: 16px; overflow: hidden;
  background: var(--t47-glass-strong); color: var(--t47-text);
  border: 1px solid color-mix(in srgb, var(--t47-border) 100%, transparent);
  box-shadow: 0 18px 44px rgba(20, 22, 40, .20), inset 0 1px 0 rgba(255, 255, 255, .7);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  animation: gt-in .32s cubic-bezier(.2, .9, .25, 1.15) both;
}
body[data-theme="dark"] .gt-toast { background: rgba(28, 29, 42, .92); box-shadow: 0 18px 44px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .1); }
.gt-text { margin: 3px 0 0; font-size: 13.5px; line-height: 1.42; font-weight: 600; overflow-wrap: anywhere; white-space: normal; }
.gt-icon { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--t47-accent-soft); color: var(--t47-accent); }
.gt-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gt-success .gt-icon { background: var(--v4-ok-bg, rgba(16,150,100,.11)); color: var(--v4-ok, #0f8a5f); }
.gt-error .gt-icon { background: var(--v4-bad-bg, rgba(220,50,80,.1)); color: var(--v4-bad, #b4233c); }
.gt-warning .gt-icon { background: var(--v4-warn-bg); color: var(--v4-warn); }
.gt-message .gt-icon { background: var(--v4-info-bg); color: var(--v4-info); }
.gt-ring { opacity: .25; }
.gt-draw { stroke-dasharray: 40; stroke-dashoffset: 40; animation: gt-draw .5s .12s ease-out forwards; }
.gt-late { animation-delay: .38s; }
.gt-swing { transform-origin: 12px 4px; animation: gt-draw .5s ease-out forwards, ai-swing .9s .4s ease-in-out 1; }
.gt-count { align-self: center; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--t47-accent-soft); color: var(--t47-accent); }
.gt-close { border: 0; background: transparent; color: var(--t47-muted); width: 24px; height: 24px; border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; min-height: 0 !important; padding: 0 !important; box-shadow: none !important; }
.gt-close:hover { background: var(--v4-nested-hover, rgba(0,0,0,.05)); color: var(--t47-text); }
.gt-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: currentColor; opacity: .18; transform-origin: left; animation: gt-progress var(--gt-duration, 4200ms) linear forwards; }
.gt-success .gt-progress { color: var(--v4-ok); } .gt-error .gt-progress { color: var(--v4-bad); } .gt-info .gt-progress, .gt-message .gt-progress { color: var(--t47-accent); }
.gt-hold .gt-progress { animation-play-state: paused; }
.gt-leave { animation: gt-out .24s ease-in forwards; }
@keyframes gt-in { from { opacity: 0; transform: translateY(-10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes gt-out { to { opacity: 0; transform: translateX(24px) scale(.97); } }
@keyframes gt-draw { to { stroke-dashoffset: 0; } }
@keyframes gt-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ---------- 2. Grafito UI: avatars (borderless, thin dark outline, presence) ---------- */
.gs-av { --av: 32px; position: relative; display: inline-grid; place-items: center; flex: none; width: var(--av); height: var(--av); border-radius: 50%;
  background: linear-gradient(135deg, #ece4ff, #ffe9cc); color: #4b2a86; font-size: calc(var(--av) * .38); font-weight: 800; letter-spacing: -.02em;
  box-shadow: 0 0 0 1.5px var(--t47-ring); border: 0 !important; }
.gs-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
body[data-theme="dark"] .gs-av { background: linear-gradient(135deg, #3a2a5c, #4a3720); color: #efe4ff; }
.gs-av-presence { position: absolute; right: -1px; bottom: -1px; width: calc(var(--av) * .3); height: calc(var(--av) * .3); min-width: 8px; min-height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 2px var(--v4-surface-solid, #fff); }
.gs-av-presence.is-online::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: gs-pulse 2s ease-out infinite; }
.gs-av-presence.is-away { background: #f59e0b; } .gs-av-presence.is-busy { background: #ef4444; }
@keyframes gs-pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(2.4); opacity: 0; } }
.gs-av-group { display: inline-flex; align-items: center; padding-left: 6px; }
.gs-av-group .gs-av { margin-left: calc(var(--av) * -.28); transition: transform .18s var(--v4-ease, ease); }
.gs-av-group .gs-av:hover { transform: translateY(-2px); z-index: 2; }
.gs-av-more { background: var(--v4-nested-hover, #eee) !important; color: var(--t47-muted) !important; font-size: 11px !important; }
.person-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 650; color: var(--t47-text); min-width: 0; }
.person-chip > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Replace framed profile photos everywhere with the borderless outline treatment */
html body[data-theme] :is(.profile-photo, .campaign-card-avatar, .presence-img, .rh-person-avatar, .access-avatar, .team-card-avatar, .gs-chat-avatar, .gs-notification-avatar, .profile-avatar, .user-avatar, .sidebar-user-avatar, .avatar) {
  border: 0 !important; outline: 0 !important; box-shadow: 0 0 0 1.5px var(--t47-ring) !important; border-radius: 50% !important;
}
html body[data-theme] .profile-avatar { box-shadow: 0 0 0 2px var(--t47-ring), 0 10px 26px rgba(20, 22, 40, .18) !important; }

/* ---------- 3. Animated status badge (Spanish async states) ---------- */
.gs-status-badge { display: inline-flex; align-items: center; gap: 8px; padding: 0; font-weight: 700; font-size: inherit; color: inherit; white-space: nowrap; }
.gs-sb-glyph { position: relative; width: 16px; height: 16px; display: inline-grid; place-items: center; flex: none; }
.gs-sb-orbit { position: absolute; inset: 0; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; border-bottom-color: transparent; opacity: .9; animation: gs-spin .8s linear infinite; }
.gs-sb-orbit::after { content: ""; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: currentColor; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: gs-breathe 1.2s ease-in-out infinite; }
.is-wait .gs-sb-orbit { animation-duration: 1.6s; border-style: dotted; }
.gs-sb-text { background: linear-gradient(90deg, currentColor 0 40%, color-mix(in srgb, currentColor 45%, transparent) 50%, currentColor 60% 100%); background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; animation: gs-shimmer 1.6s linear infinite; }
.is-ok .gs-sb-text, .is-error .gs-sb-text { animation: none; background: none; -webkit-text-fill-color: currentColor; }
.is-busy .gs-sb-text, .is-wait .gs-sb-text { -webkit-text-fill-color: transparent; }
.gs-sb-glyph svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.gs-sb-draw { stroke-dasharray: 24; stroke-dashoffset: 24; animation: gt-draw .45s ease-out forwards; }
.gs-status-badge.is-ok { color: var(--v4-ok); } .gs-status-badge.is-error { color: var(--v4-bad); animation: gs-shake .38s ease-in-out 1; }
.auth-status-error { display: block; margin-top: 8px; font-size: 13px; }
@keyframes gs-spin { to { transform: rotate(360deg); } }
@keyframes gs-breathe { 50% { transform: translate(-50%, -50%) scale(.4); } }
@keyframes gs-shimmer { from { background-position: 100% 0; } to { background-position: -140% 0; } }
@keyframes gs-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* ---------- 4. Animated icons (hugeicons-style, recreated) ---------- */
.gs-anim-icon { flex: none; overflow: visible; }
.gs-anim-icon :is(.ai-a, .ai-b) { stroke-dasharray: 80; stroke-dashoffset: 0; }
.gs-anim-host:hover .gs-anim-icon .ai-a, .gs-anim-host:focus-visible .gs-anim-icon .ai-a, .gs-anim-icon.ai-check .ai-a, .gs-anim-icon.ai-check-double :is(.ai-a, .ai-b) { animation: ai-draw .6s ease-out both; }
.gs-anim-host:hover .gs-anim-icon .ai-b, .gs-anim-host:focus-visible .gs-anim-icon .ai-b { animation: ai-draw .6s .15s ease-out both; }
.gs-anim-icon.ai-check-double .ai-b { animation-delay: .18s; }
.gs-anim-host:hover .ai-bell .ai-swing, .notification-button:hover .ai-swing, .gs-notification-trigger:hover .ai-swing { transform-origin: 12px 3px; animation: ai-swing .8s ease-in-out; }
.gs-anim-host:hover .ai-cloud .ai-b { animation: ai-lift .7s ease-in-out; }
.gs-anim-host:hover .ai-copy .ai-a { animation: ai-nudge .5s ease-out; }
.gs-anim-host:hover .ai-mail .ai-b { animation: ai-draw .6s ease-out both; }
.gs-anim-host.is-done { color: var(--v4-ok) !important; }
@keyframes ai-draw { from { stroke-dashoffset: 80; } to { stroke-dashoffset: 0; } }
@keyframes ai-swing { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-11deg); } 60% { transform: rotate(7deg); } 80% { transform: rotate(-4deg); } }
@keyframes ai-lift { 50% { transform: translateY(-2.5px); } }
@keyframes ai-nudge { 50% { transform: translate(1.5px, 1.5px); } }
/* Chat read receipts */
.gs-read-receipt { display: inline-flex; vertical-align: -3px; margin-left: 5px; width: 18px; height: 13px; }
.gs-read-receipt svg { width: 18px; height: 13px; }
.gs-read-receipt path { stroke-dasharray: 22; stroke-dashoffset: 22; animation: ai-draw-short .4s ease-out forwards; }
.gs-read-receipt .gs-receipt-b { animation-delay: .16s; }
.gs-read-receipt.is-read { color: #8fe3ff; opacity: 1 !important; }
@keyframes ai-draw-short { to { stroke-dashoffset: 0; } }

/* ---------- 5. Voice-note waveform player ---------- */
.gs-voice-note { display: grid; grid-template-columns: 34px minmax(150px, 230px) auto; align-items: center; gap: 10px; padding: 4px 2px; }
.gs-voice-play { width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--t47-accent); color: #fff; padding: 0; min-height: 0 !important; box-shadow: 0 4px 12px rgba(107, 63, 176, .3) !important; }
.gs-voice-play svg { width: 16px; height: 16px; fill: currentColor; }
.gs-chat-bubble.mine .gs-voice-play { background: #fff; color: var(--t47-accent); }
.gs-voice-wave { height: 30px; display: flex; align-items: center; gap: 2px; cursor: pointer; outline: none; }
.gs-voice-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: currentColor; opacity: .32; transition: opacity .12s, transform .12s; }
.gs-voice-wave i.played { opacity: .95; }
.gs-voice-note.is-playing .gs-voice-wave i.played:last-of-type { transform: scaleY(1.15); }
.gs-voice-note time { font-size: 11.5px; font-variant-numeric: tabular-nums; opacity: .8; }

/* ---------- 6. Activity heatmap ---------- */
.gs-heatmap { --hm-cell: 12px; --hm-gap: 3px; display: grid; gap: 8px; }
.gs-heatmap header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.gs-heatmap header strong { font-size: 14px; } .gs-heatmap header small { color: var(--t47-muted); font-size: 12px; }
.hm-scroll { overflow-x: auto; padding-bottom: 2px; }
.hm-months { display: grid; gap: var(--hm-gap); margin-left: 22px; font-size: 10.5px; color: var(--t47-muted); min-height: 14px; }
.hm-body { display: flex; gap: 6px; }
.hm-days { display: grid; grid-template-rows: repeat(7, var(--hm-cell)); gap: var(--hm-gap); font-size: 9.5px; color: var(--t47-muted); width: 16px; }
.hm-days i { font-style: normal; line-height: var(--hm-cell); }
.hm-grid { display: flex; gap: var(--hm-gap); }
.hm-week { display: grid; grid-template-rows: repeat(7, var(--hm-cell)); gap: var(--hm-gap); }
.hm-cell { display: block; width: var(--hm-cell); height: var(--hm-cell); border-radius: 3px; background: var(--v4-nested-hover, rgba(24,26,44,.06)); box-shadow: inset 0 0 0 1px rgba(24, 26, 44, .04); }
.hm-cell.l1 { background: color-mix(in srgb, var(--t47-accent) 26%, transparent); }
.hm-cell.l2 { background: color-mix(in srgb, var(--t47-accent) 48%, transparent); }
.hm-cell.l3 { background: color-mix(in srgb, var(--t47-accent) 72%, transparent); }
.hm-cell.l4 { background: var(--t47-accent); }
.hm-cell.is-future { background: transparent; box-shadow: none; }
body[data-theme="dark"] .hm-cell { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04); }
body[data-theme="dark"] .hm-cell.l4 { background: #b48cff; }
.gs-heatmap footer { display: flex; align-items: center; gap: 4px; justify-content: flex-end; color: var(--t47-muted); font-size: 11px; }
.gs-heatmap footer small { margin: 0 4px; }
.profile-heatmap-panel { margin: 14px 0; padding: 16px 18px !important; }

/* ---------- 7. Crear campaña: budget field + footer contrast ---------- */
html body[data-theme] .campaign-form-metrics-4 > .field { min-width: 0; }
html body[data-theme] .campaign-form-metrics-4 :is(input, select) { min-width: 0; width: 100%; }
html body[data-theme] .campaign-form-metrics-4 input[type="datetime-local"] { font-size: 13px; padding-right: 6px !important; }
@media (max-width: 1500px) { html body[data-theme] .campaign-form-metrics-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
html body[data-theme] .campaign-money-input { display: grid !important; grid-template-columns: 40px minmax(0, 1fr) !important; align-items: stretch; min-height: 40px; overflow: hidden; padding: 0 !important; }
html body[data-theme] .campaign-money-input span { display: grid; place-items: center; border-right: 1px solid var(--v4-border-strong) !important; background: var(--v4-nested) !important; color: var(--t47-muted); font-size: 12px; font-weight: 800; }
html body[data-theme] .campaign-money-input input { padding: 0 12px !important; min-height: 38px !important; font-variant-numeric: tabular-nums; }
html body[data-theme] .field > label { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
html body[data-theme] .campaign-create-footer {
  background: var(--t47-glass-strong) !important; color: var(--t47-text) !important; border-top: 1px solid var(--t47-border) !important;
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
html body[data-theme] .campaign-create-footer > span { color: var(--t47-muted) !important; font-size: 12.5px; }
html body[data-theme] .campaign-create-footer .secondary { background: var(--v4-surface-solid) !important; color: var(--t47-text) !important; border: 1px solid var(--v4-border-strong) !important; }
body[data-theme="dark"] .campaign-create-footer { background: rgba(24, 25, 37, .94) !important; }
body[data-theme="dark"] .campaign-create-footer .secondary { background: rgba(255, 255, 255, .06) !important; color: #f1eef8 !important; border-color: rgba(255, 255, 255, .18) !important; }

/* ---------- 8. Safe delete: danger zone + confirmation ---------- */
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 12px 14px; border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--v4-bad) 45%, transparent); background: color-mix(in srgb, var(--v4-bad) 5%, transparent); }
.danger-zone > div { display: grid; gap: 2px; } .danger-zone strong { color: var(--v4-bad); font-size: 13px; } .danger-zone span { color: var(--t47-muted); font-size: 12px; }
.danger-zone .danger { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.archive-dialog .confirm-name { font-size: 12.5px; padding: 2px 7px; border-radius: 6px; background: var(--v4-bad-bg); color: var(--v4-bad); font-weight: 700; user-select: all; }
.archive-dialog .field-required { color: var(--v4-bad); font-weight: 700; font-size: 11px; }
.archive-dialog .field-helper { color: var(--t47-muted); font-size: 11.5px; }
.archive-dialog [data-archive-submit]:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 9. Requirement detail: wide, two columns ---------- */
html body[data-theme] .req-detail-modal { width: min(1180px, calc(100vw - 48px)) !important; max-width: none !important; padding: 0 !important; display: flex; flex-direction: column; }
.req-detail-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; background: var(--t47-glass-strong); border-bottom: 1px solid var(--t47-border); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
body[data-theme="dark"] .req-detail-head { background: rgba(24, 25, 37, .94); }
.req-detail-eyebrow { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--t47-muted); font-weight: 700; }
.req-detail-title h3 { margin: 2px 0 0; font-size: 19px; }
.req-detail-head .toolbar { flex-wrap: nowrap; gap: 8px; }
.req-detail-head .toolbar .mini-action { display: inline-flex; align-items: center; gap: 6px; }
.req-detail-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 18px; padding: 18px 22px 22px; align-items: start; }
.req-detail-left, .req-detail-right { display: grid; gap: 14px; min-width: 0; }
.req-block { padding: 14px 16px; border-radius: 16px; background: var(--v4-nested); border: 1px solid var(--t47-border); display: grid; gap: 10px; }
.req-block h4 { margin: 0; font-size: 13.5px; display: flex; align-items: baseline; gap: 8px; }
.req-block h4 small { color: var(--t47-muted); font-weight: 600; font-size: 11.5px; }
.req-facts dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.req-facts dl > div { display: grid; gap: 4px; min-width: 0; }
.req-facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--t47-muted); font-weight: 700; }
.req-facts dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.req-platform-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--t47-border); }
.req-platform-row > span { font-size: 11.5px; font-weight: 700; color: var(--t47-muted); min-width: 92px; }
.req-launch-icons .campaign-tool-token img { width: 20px; height: 20px; }
.req-brief { margin: 0; white-space: pre-wrap; line-height: 1.5; font-size: 13.5px; }
.req-links { display: flex; flex-wrap: wrap; gap: 6px; }
.req-signoffs .signoff-row { display: grid; gap: 6px; padding-top: 8px; border-top: 1px solid var(--t47-border); }
.req-signoffs .signoff-row:first-of-type { border-top: 0; padding-top: 0; }
.signoff-label { font-size: 12px; font-weight: 700; color: var(--t47-muted); }
.signoff-record { display: inline-flex; align-items: center; gap: 10px; } .signoff-record small, .signoff-note { color: var(--t47-muted); font-size: 12px; }
.signoff-form summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--v4-accent-text); width: fit-content; }
.signoff-form form { display: grid; gap: 8px; margin-top: 8px; }
.signoff-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.signoff-checks label { display: flex; gap: 7px; align-items: center; font-size: 12.5px; padding: 6px 8px; border-radius: 10px; background: var(--v4-surface-solid); border: 1px solid var(--t47-border); cursor: pointer; }
.req-actions .toolbar { gap: 8px; flex-wrap: wrap; }
.delivery-toggle { display: inline-grid; grid-auto-flow: column; gap: 4px; padding: 4px; border-radius: 12px; background: var(--v4-nested-hover); width: fit-content; }
.delivery-toggle label { position: relative; cursor: pointer; }
.delivery-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.delivery-toggle span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--t47-muted); transition: background .15s, color .15s; }
.delivery-toggle input:checked + span { background: var(--v4-surface-solid); color: var(--t47-text); box-shadow: 0 1px 3px rgba(20, 22, 40, .12); }
.delivery-toggle input:focus-visible + span { outline: 2px solid var(--v4-accent-ring); }
.delivery-panes { min-height: 96px; display: grid; }
.delivery-panes .delivery-pane { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity .15s; }
.req-delivery form:has(input[value="link"]:checked) .delivery-pane[data-pane="link"],
.req-delivery form:has(input[value="library"]:checked) .delivery-pane[data-pane="library"] { visibility: visible; opacity: 1; }
.req-comments { display: grid; gap: 8px; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; }
.req-comments .comment-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 12px; border-radius: 12px; background: var(--v4-surface-solid); border: 1px solid var(--t47-border); }
.req-comments .comment-item.is-mine { background: color-mix(in srgb, var(--t47-accent) 7%, var(--v4-surface-solid)); }
.req-comments .comment-item time { color: var(--t47-muted); font-size: 11px; }
.req-comments .comment-item p { grid-column: 1 / -1; margin: 0; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; }
.req-comment-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.req-comment-form textarea { min-height: 44px !important; resize: vertical; }
.compact-empty { padding: 14px !important; font-size: 12.5px; }
@media (max-width: 1100px) { .req-detail-grid { grid-template-columns: 1fr; } }

/* Media library: static layout, fixed grid height, stable empty state */
html body[data-theme] .media-library-modal { width: min(980px, calc(100vw - 48px)) !important; }
html body[data-theme] .media-library-grid { height: min(52vh, 460px); overflow-y: auto; align-content: start; scrollbar-gutter: stable; }
.media-library-filters .is-active { background: var(--t47-accent) !important; color: #fff !important; border-color: transparent !important; }
.media-library-state { grid-column: 1 / -1; display: grid; justify-items: center; align-content: center; gap: 8px; height: 100%; min-height: 240px; text-align: center; color: var(--t47-muted); }
.media-library-state strong { color: var(--t47-text); font-size: 15px; }
.media-library-state p { margin: 0; font-size: 13px; }
.media-library-preview img { aspect-ratio: 16 / 11; object-fit: cover; }

/* ---------- 10. Marketing: compact channel card + side panel ---------- */
.marketing-insights-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 14px; }
.marketing-insights-row .calendar-legend { margin: 0 !important; }
.channel-mini-card { display: inline-flex; align-items: center; gap: 14px; padding: 8px 14px; border-radius: 14px; background: var(--t47-glass); border: 1px solid var(--t47-border); box-shadow: var(--v4-shadow); }
.channel-mini-card header { display: grid; line-height: 1.15; }
.channel-mini-card header strong { font-size: 12.5px; } .channel-mini-card header small { font-size: 11px; color: var(--t47-muted); }
.channel-mini-list { display: flex; gap: 6px; flex-wrap: wrap; }
.channel-mini-item { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px 0 6px; border-radius: 999px; background: var(--v4-surface-solid); border: 1px solid var(--t47-border); font-size: 12px; }
html body[data-theme] .channel-mini-item img { width: 18px !important; height: 18px !important; max-width: 18px !important; object-fit: contain; border-radius: 4px; }
.channel-mini-item b { font-variant-numeric: tabular-nums; }
.platform-volume-panel { display: none !important; }
.marketing-side-panel { display: grid; gap: 10px; align-content: start; }
.side-section-title { display: flex; align-items: center; gap: 7px; margin: 6px 0 0 !important; font-size: 13.5px; }
.side-section-title:first-child { margin-top: 0 !important; }
.side-section-title small { margin-left: auto; font-size: 11px; color: var(--t47-muted); background: var(--v4-nested-hover); padding: 1px 8px; border-radius: 999px; }
.side-list { display: grid; gap: 6px; }
.side-item { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 9px; row-gap: 1px; align-items: center; text-align: left; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--t47-border); background: var(--v4-surface-solid); color: var(--t47-text); cursor: pointer; min-height: 0 !important; box-shadow: none !important; }
.side-item > :first-child { grid-row: 1 / 3; }
.side-item strong { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item small { font-size: 11.5px; color: var(--t47-muted); }
.side-item > i { width: 8px; height: 8px; border-radius: 50%; background: var(--v4-warn); }
.side-item.tone-red > i { background: var(--v4-bad); }
.side-item:hover { border-color: color-mix(in srgb, var(--t47-accent) 35%, transparent); }
.side-item:disabled { cursor: default; }
.side-empty { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--t47-muted); padding: 8px 10px; border-radius: 10px; background: var(--v4-nested); }

/* ---------- 11. Assignees (Publicidad 1–3) ---------- */
.assignee-picker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.assignee-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--t47-border); background: var(--v4-surface-solid); cursor: pointer; font-size: 12.5px; font-weight: 650; }
.assignee-chip input { position: absolute; opacity: 0; pointer-events: none; }
.assignee-chip:has(input:checked) { border-color: var(--t47-accent); background: var(--t47-accent-soft); color: var(--v4-accent-text); }
.assignee-chip:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.assignee-chip:has(input:focus-visible) { outline: 2px solid var(--v4-accent-ring); }
.assignee-picker.is-compact .assignee-chip span { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.campaign-board-card footer .gs-av-group { padding-left: 4px; }

/* ---------- 12. Productivity index ---------- */
.rh-ip-cell { min-width: 150px; }
.ip-breakdown { display: inline-flex; gap: 3px; align-items: flex-end; height: 26px; margin-left: 8px; vertical-align: middle; }
.ip-breakdown i { position: relative; width: 10px; height: 22px; border-radius: 3px; background: var(--v4-nested-hover); display: flex; align-items: flex-end; overflow: hidden; }
.ip-breakdown i b { width: 100%; background: var(--t47-accent); border-radius: 3px; }
.ip-breakdown i.is-null { opacity: .35; }
.ip-breakdown em { position: absolute; bottom: -12px; left: 0; right: 0; text-align: center; font-size: 8px; font-style: normal; color: var(--t47-muted); }
.ip-breakdown.is-empty { color: var(--t47-muted); font-size: 11px; margin-left: 8px; }
.ip-formula { margin-top: 18px; padding: 0 !important; overflow: hidden; }
.ip-formula > summary { display: flex; align-items: center; gap: 10px; padding: 14px 18px; cursor: pointer; list-style: none; }
.ip-formula > summary::-webkit-details-marker { display: none; }
.ip-formula > summary small { margin-left: auto; color: var(--t47-muted); }
.ip-formula > :not(summary) { margin: 0 18px 16px; }
.ip-equation code { padding: 3px 8px; border-radius: 8px; background: var(--t47-accent-soft); color: var(--v4-accent-text); font-weight: 700; }
.ip-components { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.ip-components li { display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--v4-nested); border: 1px solid var(--t47-border); font-size: 12.5px; }
.ip-components li span { color: var(--t47-muted); line-height: 1.4; }
.ip-weights table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ip-weights th, .ip-weights td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--t47-border); }
.ip-weights input { width: 68px; min-height: 30px !important; padding: 4px 8px !important; }
.ip-weights .toolbar { justify-content: flex-end; margin-top: 10px; }

/* ---------- 13. E-mail banner + mail diagnostics ---------- */
.email-verify-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; margin: 0 0 16px; padding: 12px 14px 12px 16px; border-radius: 16px;
  background: linear-gradient(110deg, color-mix(in srgb, var(--v4-info) 10%, var(--v4-surface-solid)), color-mix(in srgb, var(--t47-accent) 8%, var(--v4-surface-solid)));
  border: 1px solid color-mix(in srgb, var(--v4-info) 22%, transparent); box-shadow: var(--v4-shadow); animation: gt-in .35s ease-out both; }
.evb-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--v4-info-bg); color: var(--v4-info); }
.evb-copy { display: grid; gap: 2px; } .evb-copy strong { font-size: 14px; } .evb-copy span { font-size: 12.5px; color: var(--t47-muted); }
.evb-form { display: flex; gap: 8px; align-items: center; }
.evb-form input { width: 240px; min-height: 34px !important; }
.evb-close { width: 30px; height: 30px; padding: 0 !important; font-size: 18px; }
.mail-diagnostics { margin: 12px 0; padding: 14px 16px; border-radius: 16px; background: var(--v4-nested); border: 1px solid var(--t47-border); display: grid; gap: 10px; }
.mail-diagnostics header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mail-diagnostics header small { color: var(--t47-muted); }
.mail-diagnostics header .toolbar { margin-left: auto; gap: 8px; }
.mail-diag-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mail-diag-grid span { display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--v4-surface-solid); border: 1px solid var(--t47-border); min-width: 0; }
.mail-diag-grid small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--t47-muted); }
.mail-diag-grid b { font-size: 12.5px; overflow-wrap: anywhere; } .mail-diag-grid b.ok { color: var(--v4-ok); } .mail-diag-grid b.bad { color: var(--v4-bad); }
.mail-diag-issues { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 12.5px; }
.mail-diag-result { margin: 0; font-size: 13px; } .mail-diag-result.is-failed { color: var(--v4-bad); } .mail-diag-result.is-sent { color: var(--v4-ok); }
@media (prefers-reduced-motion: reduce) {
  .gt-toast, .gt-leave, .gs-sb-orbit, .gs-sb-text, .gs-av-presence.is-online::after, .gs-anim-icon *, .gs-read-receipt path, .email-verify-banner { animation: none !important; }
  .gs-read-receipt path, .gs-anim-icon * { stroke-dashoffset: 0 !important; }
}

/* t47u: multi-assignee avatar group must not be squeezed into the old single-avatar 18px column */
html body[data-theme] .campaign-board-card :has(> .gs-av-group) { grid-template-columns: auto minmax(0, 1fr) auto !important; }
html body[data-theme] .campaign-board-card .gs-av-group { overflow: visible; flex: none; width: auto; }
