/* ==========================================================================
   Prov · Aprovação — admin.css (agency panel)
   Loaded after base.css. Uses only the tokens defined there.
   ========================================================================== */

/* ---------- Shell ---------- */
.adm-app {
  min-height: 100vh;
  background:
    radial-gradient(900px 360px at 100% -80px, var(--rose-50), transparent 70%),
    var(--bg);
}
.adm-locked { overflow: hidden; }

.adm-skip {
  position: absolute; left: 12px; top: -60px; z-index: 1100;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--petrol); color: #fff; font-weight: 600; text-decoration: none;
  transition: top var(--t) var(--ease);
}
.adm-skip:focus { top: 12px; color: #fff; }

.adm-top {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.adm-top-inner {
  max-width: 1440px; margin: 0 auto; height: 64px;
  padding: 0 clamp(16px, 3vw, 32px);
  display: flex; align-items: center; gap: clamp(12px, 3vw, 32px);
}
.adm-brand { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none; color: var(--petrol); }
.adm-brand:hover { color: var(--petrol); }
.adm-brand .prov-logo { width: 38px; height: 38px; }
.adm-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.adm-brand-name { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--petrol); letter-spacing: .01em; }
.adm-brand-sub { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rose-600); }

.adm-nav { flex: 1; display: flex; align-items: center; gap: 4px; min-width: 0; }
.adm-nav a {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px; border-radius: var(--r-pill);
  color: var(--text-2); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.adm-nav a:hover { background: var(--surface-2); color: var(--petrol); }
.adm-nav a.is-active { background: var(--petrol); color: #fff; }
.adm-nav a.is-active .icon { color: var(--rose-300); }

.adm-user { display: flex; align-items: center; gap: 10px; flex: none; min-width: 0; }
.adm-user-name { max-width: 180px; font-size: 14px; font-weight: 600; color: var(--petrol); }
.adm-logout { color: var(--text-2); }

.adm-main {
  position: relative; max-width: 1440px; margin: 0 auto;
  padding: 32px clamp(16px, 3vw, 32px) 96px;
  outline: none;
}
.adm-main:focus-visible { box-shadow: none; }
.adm-boot { display: grid; place-items: center; min-height: 40vh; }
.adm-noscript { max-width: 520px; margin: 24px auto; padding: 14px 18px; border-radius: var(--r); background: var(--warn-bg); color: var(--warn-text); font-weight: 600; text-align: center; }

/* Page head with an organic blob behind the title */
.adm-head {
  position: relative; isolation: isolate;
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  margin-bottom: 26px;
}
.adm-head::before {
  content: ""; position: absolute; z-index: -1; left: -34px; top: -30px; width: 140px; height: 120px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='48 24 128 132'%3E%3Cpath d='M62 152C54 116 60 62 98 38C130 20 170 34 170 72C170 110 134 140 62 152Z' fill='%23F5E6EA'/%3E%3C/svg%3E");
  opacity: .9; pointer-events: none;
}
.adm-title { font-size: clamp(28px, 3.2vw, 38px); }
.adm-sub { margin-top: 6px; max-width: 62ch; color: var(--text-2); }
.adm-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Search field with icon */
.adm-search { position: relative; display: flex; align-items: center; width: min(360px, 100%); }
.adm-search > .icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.adm-search .input { min-height: 40px; padding-left: 42px; border-radius: var(--r-pill); }

/* Empty states */
.adm-empty { padding: 56px 24px; }
.adm-empty.is-compact { padding: 32px 16px; }
.adm-empty-art {
  width: 76px; height: 70px; display: grid; place-items: center; margin-bottom: 4px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='48 24 128 132'%3E%3Cpath d='M62 152C54 116 60 62 98 38C130 20 170 34 170 72C170 110 134 140 62 152Z' fill='%23F5E6EA'/%3E%3C/svg%3E");
}
.adm-empty-art .icon { width: 30px; height: 30px; transform: translate(4px, -2px); }
.adm-empty.is-compact .adm-empty-art { width: 60px; height: 56px; }
.adm-empty.is-compact .adm-empty-art .icon { width: 24px; height: 24px; }
.adm-empty.is-compact .empty-title { font-size: var(--fs-md); }
.adm-empty-text { max-width: 46ch; color: var(--text-2); }
.adm-empty-actions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* Skeleton shapes */
.skeleton { display: block; }
.skel-line { height: 12px; border-radius: 6px; }
.skel-title { height: 22px; }
.skel-avatar { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.skel-avatar-lg { width: 64px; height: 64px; }
.skel-avatar-sm { width: 34px; height: 34px; }
.skel-pill { width: 84px; height: 26px; border-radius: 99px; }
.skel-input { height: 42px; }
.skel-area { height: 110px; }
.w-20 { width: 20%; } .w-30 { width: 30%; } .w-40 { width: 40%; } .w-50 { width: 50%; }
.w-60 { width: 60%; } .w-70 { width: 70%; } .w-80 { width: 80%; }

/* Responsive button labels (icon-only on narrow screens, name kept for screen readers) */
@media (max-width: 1180px) {
  .ws-actions .btn-collapse { width: 40px; padding: 0; }
  .ws-actions .btn-collapse .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Login ---------- */
.adm-login-page { min-height: 100vh; background: var(--bg); }
.adm-login {
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; padding: 40px 16px;
}
.adm-login-blob { position: absolute; pointer-events: none; background-repeat: no-repeat; background-size: contain; background-position: center; }
.adm-login-blob--petrol {
  width: 560px; height: 520px; right: -190px; top: -170px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='48 24 128 132'%3E%3Cpath d='M62 152C54 116 60 62 98 38C130 20 170 34 170 72C170 110 134 140 62 152Z' fill='%23012B39'/%3E%3C/svg%3E");
}
.adm-login-blob--rose {
  width: 340px; height: 320px; left: -130px; bottom: -120px; transform: rotate(160deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='48 24 128 132'%3E%3Cpath d='M62 152C54 116 60 62 98 38C130 20 170 34 170 72C170 110 134 140 62 152Z' fill='%23F5E6EA'/%3E%3C/svg%3E");
}
.adm-login-card {
  position: relative; z-index: 1; width: min(420px, 100%);
  padding: 36px 32px 26px; border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
}
.adm-login-logo { align-self: flex-start; margin-bottom: 22px; }
.adm-login-logo .prov-logo { height: 64px; }
.adm-login-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rose-600); }
.adm-login-title { margin-top: 6px; font-size: 30px; }
.adm-login-lead { margin-top: 6px; color: var(--text-2); }
.adm-login-form { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.adm-login-form .btn { margin-top: 4px; }
.adm-pass { position: relative; }
.adm-pass .input { padding-right: 48px; }
.adm-pass-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted);
}
.adm-pass-toggle:hover { color: var(--petrol); background: var(--surface-2); }
.adm-login-error { padding: 10px 12px; border-radius: var(--r-sm); background: var(--bad-bg); color: var(--bad-text); font-size: 13.5px; font-weight: 500; }
.adm-login-back { align-self: center; margin-top: 20px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.adm-login-back:hover { color: var(--rose-700); }

/* ---------- Clients ---------- */
.cl-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.cl-count { font-size: 13.5px; color: var(--muted); }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr)); gap: 18px; }
.cl-grid.is-empty { display: block; }
.cl-grid.is-empty > .adm-empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }

.cl-card {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
.cl-card:not(.is-skeleton):hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.cl-card:focus-within { border-color: var(--rose-300); }
.cl-card.is-inactive { background: var(--surface-2); }
.cl-card.is-inactive .cl-avatar { filter: grayscale(.6); opacity: .8; }
.cl-card.is-skeleton { gap: 16px; }
.cl-card.is-skeleton .cl-card-id { display: flex; flex-direction: column; gap: 8px; }
.cl-card-top { display: flex; align-items: center; gap: 14px; }
.cl-card-id { flex: 1; min-width: 0; }
.cl-avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line); }
.cl-name { font-size: 21px; line-height: 1.2; overflow-wrap: anywhere; }
.cl-link { color: var(--petrol); text-decoration: none; }
.cl-link:hover { color: var(--petrol); }
.cl-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.cl-link:focus-visible { box-shadow: none; }
.cl-link:focus-visible::after { box-shadow: var(--focus); }
.cl-handle { margin-top: 2px; font-size: 13.5px; color: var(--muted); }
.cl-emails { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13.5px; color: var(--text-2); }
.cl-emails > .icon { color: var(--muted); }
.cl-more { flex: none; padding: 1px 8px; border-radius: 99px; background: var(--rose-50); color: var(--rose-700); font-size: 12px; font-weight: 700; }
.cl-warn { color: var(--warn-text); font-weight: 600; }
.cl-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-stat {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 99px; background: var(--surface-2); color: var(--text-2);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.cl-stat.is-draft { color: var(--muted); }
.cl-nostats { font-size: 13.5px; color: var(--muted); font-style: italic; }
.cl-progress { display: flex; align-items: center; gap: 10px; }
.cl-progress .progress { flex: 1; }
.cl-progress-txt { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cl-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--text-2); }
.cl-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.cl-meta-item .icon { color: var(--rose-600); }
.cl-meta strong { color: var(--petrol); }
.cl-actions {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 4px;
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line);
}
.cl-actions .btn-primary .icon { width: 16px; height: 16px; }

/* ---------- Client form (modal) ---------- */
.cf { display: flex; flex-direction: column; gap: 18px; }
.cf-avatar-row { display: flex; align-items: center; gap: 18px; }
.cf-avatar { width: 76px; height: 76px; font-size: 24px; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line); }
.cf-avatar-ctl { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cf-avatar-ctl .row { flex-wrap: wrap; }
.cf-avatar-ctl .hint { font-size: 12.5px; color: var(--muted); }
.cf-prefix { display: flex; align-items: stretch; }
.cf-prefix > span {
  display: grid; place-items: center; padding: 0 12px;
  border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm);
  background: var(--surface-2); color: var(--muted); font-weight: 600;
}
.cf-prefix .input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.cf-emails { min-height: 84px; font-size: 14px; }
.cf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 100%;
  height: 26px; padding: 0 10px; border-radius: 99px;
  background: var(--petrol-100); color: var(--petrol); font-size: 12.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cf-chip .icon { width: 13px; height: 13px; }
.cf-chip.is-invalid { background: var(--bad-bg); color: var(--bad-text); }
.cf-chip.is-empty { background: var(--warn-bg); color: var(--warn-text); }
.cf-switch { display: flex; flex-direction: column; gap: 6px; }
.cf-switch .hint { font-size: 12.5px; color: var(--muted); }
.cf-error { padding: 10px 12px; border-radius: var(--r-sm); background: var(--bad-bg); color: var(--bad-text); font-size: 13.5px; font-weight: 500; }
.cf-del { gap: 14px; }

/* Destructive action on the left of a modal footer (only when it is not the confirm button) */
.modal-foot .btn-danger:first-child:not(:last-child) { margin-right: auto; }

/* Checkbox card */
.adm-check {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  cursor: pointer; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.adm-check:hover { border-color: var(--line-strong); background: var(--surface-2); }
.adm-check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--petrol); }
.adm-check strong { font-weight: 600; color: var(--petrol); }
.adm-check-hint { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }

/* Notes / hints */
.ed-note {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--text-2); font-size: 13.5px; line-height: 1.45;
}
.ed-note > .icon { margin-top: 2px; color: var(--petrol-400); }
.ed-note.is-warn { background: var(--warn-bg); color: #7A5410; }
.ed-note.is-warn > .icon { color: var(--warn); }
.ed-note.is-quiet { background: transparent; padding: 4px 0; color: var(--muted); font-size: 12.5px; }

/* Access links modal */
.lk { display: flex; flex-direction: column; gap: 14px; }
.lk-row { display: flex; flex-direction: column; gap: 6px; }
.lk-email { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--petrol); }
.lk-ctl { display: flex; gap: 8px; align-items: center; }
.lk-input { min-height: 36px; padding: 6px 12px; font-size: 13px; color: var(--text-2); background: var(--surface-2); }

/* Notify modal */
.nt { display: flex; flex-direction: column; gap: 16px; }
.nt-block { display: flex; flex-direction: column; gap: 8px; }
.nt-to { display: flex; flex-wrap: wrap; gap: 6px; }
.nt-email { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 99px; background: var(--petrol-100); color: var(--petrol); font-size: 13px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.nt-summary { padding: 14px; border-radius: var(--r); background: var(--surface-2); }
.nt-count { font-size: 14px; color: var(--text-2); }
.nt-count strong { color: var(--petrol); }
.nt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nt-list li { display: flex; align-items: baseline; gap: 10px; font-size: 13.5px; min-width: 0; }
.nt-date { flex: none; width: 92px; font-weight: 600; color: var(--petrol); }
.nt-fmt { flex: none; color: var(--muted); font-size: 12.5px; }
.nt-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.nt-drafts { display: inline-flex; align-items: center; gap: 6px; }
.nt-done { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding-top: 6px; }
.nt-done-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.nt-done-ic .icon { width: 26px; height: 26px; stroke-width: 2.2; }
.nt-done-list { list-style: none; margin: 0; padding: 0; font-weight: 600; color: var(--petrol); overflow-wrap: anywhere; }
.nt-failed { width: 100%; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bad-bg); color: var(--bad-text); text-align: left; font-size: 13px; }
.nt-failed ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- Workspace ---------- */
.ws-head { min-height: 92px; }
.ws-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.ws-back:hover { color: var(--rose-700); }
.ws-head-row { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.ws-avatar { width: 68px; height: 68px; font-size: 22px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 4px var(--rose-300); }
.ws-id { flex: 1; min-width: min(260px, 100%); display: flex; flex-direction: column; gap: 6px; }
.ws-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ws-name { font-size: clamp(26px, 3vw, 34px); overflow-wrap: anywhere; }
.ws-sub { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--text-2); }
.ws-sub-item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ws-sub-item .icon { color: var(--muted); }
.ws-sub-item.is-warn { color: var(--warn-text); font-weight: 600; }
.ws-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; color: var(--text-2); }
.ws-stats.is-empty { color: var(--muted); font-style: italic; }
.ws-stat { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ws-stat strong { color: var(--petrol); }
.ws-stat .icon { color: var(--muted); width: 15px; height: 15px; }
.ws-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.ws-tabs {
  display: flex; gap: 4px; margin: 26px 0 22px;
  border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
}
.ws-tabs::-webkit-scrollbar { display: none; }
.ws-tab {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: -1px;
  padding: 12px 16px; border-bottom: 2px solid transparent;
  color: var(--muted); font-size: 14.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.ws-tab:hover { color: var(--petrol); }
.ws-tab.is-active { color: var(--petrol); border-bottom-color: var(--rose); }
.ws-tab.is-active .icon { color: var(--rose-600); }
.ws-tab:focus-visible { border-radius: var(--r-xs) var(--r-xs) 0 0; }

/* ---------- Calendar ---------- */
.cal-wrap { display: flex; flex-direction: column; gap: 16px; }
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-title { min-width: 200px; text-align: center; font-size: 26px; }
.cal-today { margin-left: 8px; }
.cal-sum { font-size: 14px; color: var(--text-2); }
.cal-side { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.cal-export { background: var(--surface); }
.cal-prod-add { background: var(--surface); }
.cal-prod-add .icon { color: var(--petrol-600); }
/* Production bars (base.css .prod-*): a piece reaches the next cell over the 8px padding + the 1px right border. */
.cal-grid { isolation: isolate; }
.cal-day { --prod-ext-l: 8px; --prod-ext-r: 9px; }
.pr-preview { font-style: italic; }

/* Export PDF modal */
.ex { display: flex; flex-direction: column; gap: 14px; }
.ex-month { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; border-radius: var(--r); background: var(--surface-2); }
.ex-month-nav { display: flex; align-items: center; gap: 2px; }
.ex-month-label { min-width: 150px; text-align: center; font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--petrol); }
.ex-count { margin-top: -6px; font-size: 13px; color: var(--text-2); }
.ex-opts { display: flex; flex-direction: column; gap: 8px; }
.ex-opts .adm-check { padding: 10px 14px; }
.adm-check.is-disabled { opacity: .55; cursor: not-allowed; }
.adm-check.is-disabled:hover { border-color: var(--line); background: var(--surface); }
@media (max-width: 420px) { .ex-month-label { min-width: 0; font-size: 16px; } }

.cal-hint {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border-radius: var(--r); background: var(--rose-50); border: 1px solid var(--rose-100);
  color: var(--text-2); font-size: 14px;
}
.cal-hint > .icon { margin-top: 2px; color: var(--rose-600); }
.cal-hint strong { color: var(--petrol); }

.cal { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.cal-head { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-wd { padding: 10px 12px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cal-wd.is-weekend { color: var(--rose-600); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-day {
  position: relative; min-width: 0; min-height: 138px;
  display: flex; flex-direction: column; gap: 6px; padding: 8px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.cal-day:nth-child(7n) { border-right: 0; }
.cal-grid > .cal-day:nth-last-child(-n + 7) { border-bottom: 0; }
.cal-day.is-weekend { background: color-mix(in srgb, var(--surface-2) 45%, white); }
.cal-day.is-out { background: var(--surface-2); }
.cal-day.is-out .cal-num { color: var(--muted); opacity: .7; }
.cal-day.is-out .mc { opacity: .72; }
.cal-day:hover { background: var(--rose-50); }
.cal-day.is-drop { background: var(--rose-50); box-shadow: inset 0 0 0 2px var(--rose); }
.is-dragging-post .cal-day { cursor: copy; }
.cal-day-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 26px; }
.cal-num {
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 99px;
  display: inline-grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.cal-day.is-today .cal-num { background: var(--petrol); color: #fff; box-shadow: 0 0 0 3px var(--rose-100); }
.cal-add {
  width: 26px; height: 26px; padding: 0; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  border: 1px dashed var(--rose-300); background: var(--surface); color: var(--rose-700);
  opacity: 0; transform: scale(.85);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.cal-add .icon { width: 14px; height: 14px; }
.cal-add:hover { background: var(--rose); border-color: var(--rose); color: #fff; }
.cal-day:hover .cal-add, .cal-add:focus-visible { opacity: 1; transform: none; }
.is-dragging-post .cal-add { display: none; }
@media (hover: none) { .cal-add { opacity: 1; transform: none; } }
.cal-items { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

/* Mini card */
.mc {
  --st: var(--wait);
  position: relative; min-width: 0;
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 6px 6px 7px;
  background-color: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--st); border-radius: 9px;
  box-shadow: var(--shadow-sm); text-align: left; cursor: pointer; user-select: none;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.mc[draggable="true"] { cursor: grab; }
.mc:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.mc:focus-visible { box-shadow: var(--focus); border-radius: 9px; }
.mc.is-dragging { opacity: .35; transform: none; box-shadow: none; }
.mc.st-pendente  { --st: var(--wait); --st-bg: var(--wait-bg); }
.mc.st-aprovado  { --st: var(--ok);   --st-bg: var(--ok-bg); }
.mc.st-revisar   { --st: var(--warn); --st-bg: var(--warn-bg); }
.mc.st-reprovado { --st: var(--bad);  --st-bg: var(--bad-bg); }
.mc.st-revisar, .mc.st-reprovado { background-color: var(--st-bg); border-color: color-mix(in srgb, var(--st) 35%, var(--line)); border-left-color: var(--st); }
.mc-thumb {
  position: relative; flex: none; width: 34px; height: 42px; overflow: hidden;
  display: grid; place-items: center; border-radius: 6px;
  background: var(--petrol-100); color: var(--petrol-600);
}
.mc-thumb img, .mc-thumb video { width: 100%; height: 100%; object-fit: cover; }
.mc-thumb > .icon { width: 16px; height: 16px; }
.mc-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(1, 43, 57, .28); color: #fff; }
.mc-play .icon { width: 12px; height: 12px; }
.mc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mc-meta { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mc-meta .icon { width: 12px; height: 12px; }
.mc-meta .dot { width: 7px; height: 7px; margin-right: 1px; }
.dot.is-draft { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.mc-cm { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--petrol-600); }
.mc-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--text); overflow-wrap: anywhere;
}
.mc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.mc-tag {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  background: var(--surface-3); color: var(--text-2);
}
.mc-tag.is-draft { background: var(--petrol); color: #fff; }
.mc-tag.is-pauta { background: transparent; border: 1px dashed var(--rose-300); color: var(--rose-700); }
.mc.is-pauta {
  background-color: var(--rose-50); box-shadow: none;
  border: 1px dashed var(--rose-300); border-left: 3px solid var(--st);
}
.mc.is-pauta .mc-thumb { background: var(--surface); border: 1px dashed var(--rose-300); color: var(--rose-700); }
.mc.is-draft {
  background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(1, 43, 57, .05) 6px 12px);
  opacity: .82;
}
.mc.is-draft:hover { opacity: 1; }
.mc.is-flash { animation: mc-flash 1.4s var(--ease); }
@keyframes mc-flash {
  0% { box-shadow: 0 0 0 0 rgba(192, 122, 140, .55); }
  100% { box-shadow: 0 0 0 12px rgba(192, 122, 140, 0); }
}

/* Large card (agenda) */
.mc-lg { gap: 12px; padding: 10px 12px 10px 10px; border-radius: var(--r); }
.mc-lg .mc-thumb { width: 60px; height: 75px; border-radius: 8px; }
.mc-lg .mc-thumb > .icon { width: 22px; height: 22px; }
.mc-lg .mc-meta { font-size: 12px; }
.mc-lg .mc-title { font-size: 15px; line-height: 1.35; }
.mc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mc-badges .mc-tag { height: 22px; font-size: 10px; }

/* Agenda (mobile calendar) */
.ag { display: flex; flex-direction: column; gap: 12px; }
.ag-day { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: start; }
.ag-date {
  position: sticky; top: 76px;
  display: flex; flex-direction: column; align-items: center; padding: 8px 0;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
}
.ag-wd { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ag-dn { font-family: var(--font-display); font-size: 22px; font-weight: 600; line-height: 1.15; color: var(--petrol); }
.ag-day.is-today .ag-date { background: var(--petrol); border-color: var(--petrol); }
.ag-day.is-today .ag-wd { color: var(--rose-300); }
.ag-day.is-today .ag-dn { color: #fff; }
.ag-day.is-past .ag-date { opacity: .7; }
.ag-items { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* Legend */
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 12.5px; color: var(--text-2); }
.cal-leg { display: inline-flex; align-items: center; gap: 7px; }
.cal-leg-edge { width: 4px; height: 14px; border-radius: 2px; background: var(--st); }
.cal-leg-pauta { width: 18px; height: 14px; border-radius: 4px; border: 1px dashed var(--rose-300); background: var(--rose-50); }
.cal-leg-draft { width: 18px; height: 14px; border-radius: 4px; border: 1px solid var(--line-strong); background: repeating-linear-gradient(135deg, var(--surface) 0 3px, var(--surface-3) 3px 6px); }
.cal-leg-hint { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }

/* Calendar skeleton */
.cal-skel { display: flex; flex-direction: column; gap: 16px; }
.cal-skel-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-skel-cell { height: 120px; border-radius: var(--r-sm); opacity: .7; }

/* ---------- List ---------- */
.lt-wrap { display: flex; flex-direction: column; }
.lt-toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.lt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lt-chips .chip { cursor: pointer; }
.lt-chips .chip.is-active .dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.lt-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lt-search { width: min(280px, 100%); }
.lt-select { width: auto; min-width: 168px; min-height: 40px; padding-top: 8px; padding-bottom: 8px; font-size: 14px; border-radius: var(--r-pill); }
.lt-count { margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.lt-box > .adm-empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.lt-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.lt { width: 100%; border-collapse: collapse; font-size: 14px; }
.lt th { padding: 0; text-align: left; white-space: nowrap; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.lt-sort {
  display: inline-flex; align-items: center; gap: 4px; width: 100%;
  padding: 11px 14px; border: 0; background: none;
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.lt-sort .icon { opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.lt-sort:hover { color: var(--petrol); }
.lt-sort:hover .icon { opacity: .45; }
.lt-sort.is-active { color: var(--petrol); }
.lt-sort.is-active .icon { opacity: 1; color: var(--rose-600); }
.lt-sort:focus-visible { border-radius: 0; box-shadow: inset 0 0 0 2px var(--rose); }
.lt td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.lt tbody tr:last-child td { border-bottom: 0; }
.lt-row { cursor: pointer; transition: background var(--t-fast) var(--ease); }
.lt-row:hover { background: var(--rose-50); }
.lt-row:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--rose); border-radius: 0; }
.lt-row.is-draft { background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(1, 43, 57, .025) 8px 16px); }
.lt-row.is-draft .lt-title-txt { color: var(--text-2); }
.col-title { min-width: 240px; white-space: normal !important; }
.lt-title { display: flex; align-items: center; gap: 10px; }
.lt-thumb {
  flex: none; width: 32px; height: 40px; overflow: hidden;
  display: grid; place-items: center; border-radius: 6px;
  background: var(--petrol-100); color: var(--petrol-600);
}
.lt-thumb img, .lt-thumb video { width: 100%; height: 100%; object-fit: cover; }
.lt-thumb .icon { width: 15px; height: 15px; }
.lt-thumb.is-pauta { background: var(--rose-50); border: 1px dashed var(--rose-300); color: var(--rose-700); }
.lt-title-txt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; color: var(--text); }
.lt-date { font-weight: 600; color: var(--petrol); }
.lt-year { margin-left: 4px; font-size: 12px; color: var(--muted); }
.lt-date-time { display: none; }
.lt-ver { display: inline-flex; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); font-size: 12.5px; font-weight: 700; color: var(--petrol-600); }
.lt-vis { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ok-text); }
.lt-vis.is-off { color: var(--muted); }
.lt-cm { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--petrol-600); }

/* ---------- Activity ---------- */
.act { display: flex; flex-direction: column; gap: 18px; max-width: 900px; }
.act-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.act-filters .chip { cursor: pointer; }
.act-list { display: flex; flex-direction: column; gap: 22px; }
.act-list > .adm-empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.act-day-title { margin: 0 0 8px 4px; font-family: var(--font-sans); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.act-items { list-style: none; margin: 0; padding: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.act-items > li + li { border-top: 1px solid var(--line); }
.act-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; color: inherit; text-decoration: none; transition: background var(--t-fast) var(--ease); }
.act-item:hover { background: var(--rose-50); color: inherit; }
.act-item:focus-visible { border-radius: 0; box-shadow: inset 0 0 0 2px var(--rose); }
.tone-ok     { --tone: var(--ok);       --tone-bg: var(--ok-bg); }
.tone-warn   { --tone: var(--warn);     --tone-bg: var(--warn-bg); }
.tone-bad    { --tone: var(--bad);      --tone-bg: var(--bad-bg); }
.tone-rose   { --tone: var(--rose-700); --tone-bg: var(--rose-100); }
.tone-petrol { --tone: var(--petrol-600); --tone-bg: var(--petrol-100); }
.tone-muted  { --tone: var(--muted);    --tone-bg: var(--surface-2); }
.act-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--tone-bg); color: var(--tone); }
.act-ic .icon { width: 17px; height: 17px; stroke-width: 2; }
.act-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.act-text { display: block; font-size: 14.5px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.act-role { font-size: 13px; color: var(--muted); }
.act-post { font-weight: 600; color: var(--petrol); }
.act-quote {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  padding: 7px 11px; border-left: 2px solid var(--line-strong); border-radius: 0 8px 8px 0;
  background: var(--surface-2); color: var(--text-2); font-size: 13.5px; white-space: pre-line; overflow-wrap: anywhere;
}
.act-quote.is-comment { border-left-color: var(--rose-300); background: var(--rose-50); }
.act-meta { display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 12.5px; color: var(--muted); }
.act-meta > * + *::before { content: "·"; margin: 0 7px; color: var(--line-strong); }
.act-client { font-weight: 700; color: var(--rose-700); }
.act-go { align-self: center; color: var(--line-strong); transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.act-item:hover .act-go { color: var(--rose); transform: translateX(2px); }
.act-more { display: flex; justify-content: center; }
.act-more:empty { display: none; }
.act-skel { display: flex; flex-direction: column; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.act-skel-row { display: flex; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); }
.act-skel-row:last-child { border-bottom: 0; }

/* ---------- Settings ---------- */
.set-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.set-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.set-card { padding: 24px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.set-card-head { display: flex; flex-direction: column; gap: 4px; }
.set-title { font-size: 22px; }
.set-sub { font-size: 13.5px; color: var(--muted); }
.set-actions { display: flex; justify-content: flex-end; }
.set-test-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.set-test-row .field { flex: 1 1 220px; }
.set-test-row > .btn { min-height: 42px; }
.set-result { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r); font-size: 14px; }
.set-result > .icon { margin-top: 2px; flex: none; }
.set-result.is-ok { background: var(--ok-bg); color: #1F6B53; }
.set-result.is-err { background: var(--bad-bg); color: var(--bad-text); }
.set-result .small { margin-top: 2px; opacity: .9; }
.set-err-pre { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.set-dl { margin: 0; }
.set-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.set-row:first-child { padding-top: 0; }
.set-row:last-child { border-bottom: 0; }
.set-row dt { color: var(--text-2); }
.set-row dd { margin: 0; min-width: 0; text-align: right; font-weight: 600; color: var(--petrol); overflow-wrap: anywhere; }
.set-code { display: block; margin-top: 2px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.set-ok, .set-warn { display: inline-flex; align-items: center; gap: 6px; }
.set-ok { color: var(--ok-text); }
.set-warn { color: var(--warn-text); }
.set-tip { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.set-tip > .icon { margin-top: 2px; color: var(--petrol-400); }
.set-tip code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--petrol); }

/* ---------- Drawer (post editor) ---------- */
.drw-backdrop {
  position: fixed; inset: 0; z-index: 800;
  display: flex; justify-content: flex-end;
  background: rgba(0, 26, 36, .4); -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px);
  animation: fade-in var(--t) var(--ease);
}
.drw-backdrop.is-closing { animation: drw-fade-out .22s var(--ease) forwards; pointer-events: none; }
.drw {
  width: min(780px, 100%); height: 100%; height: 100dvh;
  display: flex; flex-direction: column; outline: none;
  background: var(--bg); box-shadow: var(--shadow-lg);
  animation: drw-in .28s var(--ease);
}
.drw:focus-visible { box-shadow: var(--shadow-lg); }
.drw-backdrop.is-closing .drw { animation: drw-out .22s var(--ease) forwards; }
@keyframes drw-in { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drw-out { to { transform: translateX(48px); opacity: 0; } }
@keyframes drw-fade-out { to { opacity: 0; } }

.drw-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.drw-head-main { flex: 1; min-width: 0; }
.drw-head-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.drw-eyebrow { min-height: 18px; font-size: 12.5px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drw-title { margin-top: 2px; font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.2; color: var(--petrol); overflow-wrap: anywhere; }
.drw-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.drw-meta .pill .icon { width: 13px; height: 13px; }
.drw-meta .pill.is-draft::before { display: none; }
.drw-ver { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: var(--r-pill); background: var(--surface-2); font-size: 12.5px; font-weight: 700; color: var(--petrol-600); }
.drw-meta-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.drw-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px 36px; display: flex; flex-direction: column; gap: 16px; overscroll-behavior: contain; }
.drw-foot { display: flex; align-items: center; gap: 8px; padding: 12px 24px; padding-bottom: max(12px, env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.drw-dirty { display: inline-flex; align-items: center; gap: 7px; margin-right: 4px; font-size: 13px; font-weight: 600; color: var(--warn-text); white-space: nowrap; }
.drw-dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); animation: dirty-pulse 1.6s ease-in-out infinite; }
@keyframes dirty-pulse { 50% { opacity: .35; } }
.drw-save { min-width: 112px; }
/* While the editor is open, toasts sit above its footer, centred on the drawer */
.adm-locked .toast-wrap { bottom: 84px; left: calc(100% - min(780px, 100%) / 2); }

/* Editor sections */
.ed-sec { padding: 18px 20px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.ed-sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ed-sec-heading { min-width: 0; }
.ed-sec-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--petrol); }
.ed-sec-sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.ed-count { flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 99px; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--text-2); }
.ed-skel { display: flex; flex-direction: column; gap: 16px; }
.ed-skel .ed-sec { display: flex; flex-direction: column; gap: 14px; }

.ed-intro { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--petrol); color: #E7EFF1; }
.ed-intro-ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--rose-300); }
.ed-intro-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: #fff; }
.ed-intro-text { margin-top: 3px; font-size: 13.5px; line-height: 1.5; color: #C9D8DC; }

.ed-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.ed-full { grid-column: 1 / -1; }
.ed-opt { font-weight: 400; color: var(--muted); }
.ed-seg { display: flex; width: 100%; padding: 4px; border-radius: var(--r); }
.ed-seg > button { flex: 1 1 0; justify-content: center; padding: 9px 10px; border-radius: 9px; white-space: nowrap; }
.ed-seg > button .icon { width: 16px; height: 16px; }
.ed-seg > button.is-active .icon { color: var(--rose-600); }
.ed-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ed-label-row label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.ed-counter { font-size: 12.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; transition: color var(--t-fast) var(--ease); }
.ed-counter.is-near { color: var(--warn-text); }
.ed-counter.is-over { color: var(--bad-text); }
.ed-caption { min-height: 150px; }
.ed-brief { min-height: 84px; }
.ed-vis { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.ed-vis-hint { font-size: 12.5px; color: var(--muted); }
.input.is-invalid:focus, .textarea.is-invalid:focus { box-shadow: 0 0 0 3px rgba(185, 68, 59, .22); }

/* Status */
.ed-sec-status { padding: 16px 18px; }
.ed-status { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.ed-status-now { flex: 1 1 260px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.ed-status-ic { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--st-bg); color: var(--st); }
.ed-status-ic .icon { width: 20px; height: 20px; stroke-width: 2.1; }
.ed-status-txt { min-width: 0; }
.ed-status-label { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--st); }
.ed-status-sub { font-size: 13px; color: var(--text-2); }
.ed-status-field { flex: 0 1 230px; }
.ed-status-field label { font-size: 12px; }
.ed-status-field .select { min-height: 38px; padding-top: 7px; padding-bottom: 7px; font-size: 14px; }
.ed-status-hint { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.ed-feedback { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--st); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--st-bg); }
.ed-feedback-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--st); }
.ed-feedback-body { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }

/* Media */
.ed-sec-media { transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease); }
.ed-sec-media.is-file-over { border-color: var(--rose); box-shadow: 0 0 0 4px var(--rose-100); }
.ed-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 22px 18px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r);
  background: var(--surface-2);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.ed-drop:hover, .ed-sec-media.is-file-over .ed-drop { border-color: var(--rose); background: var(--rose-50); }
.ed-drop:focus-visible { border-color: var(--rose); box-shadow: var(--focus); border-radius: var(--r); }
.ed-drop-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--rose-600); box-shadow: var(--shadow-sm); }
.ed-drop-title { font-size: 14.5px; color: var(--text-2); }
.ed-drop-title strong { color: var(--petrol); }
.ed-drop-link { color: var(--rose-700); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ed-drop-hint { font-size: 12.5px; color: var(--muted); }
.ed-hints { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ed-hints:empty { display: none; }

.up-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.up-list:empty { display: none; }
.up-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.up-item.is-error { align-items: flex-start; border-color: var(--bad-line); background: var(--bad-bg); }
.up-item.is-leaving { opacity: 0; transform: translateY(-4px); }
.up-thumb { flex: none; width: 42px; height: 42px; overflow: hidden; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); color: var(--muted); }
.up-thumb img { width: 100%; height: 100%; object-fit: cover; }
.up-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.up-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.up-name { font-weight: 600; color: var(--text); }
.up-status { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.up-item.is-done .up-status { color: var(--ok-text); font-weight: 600; }
.up-item.is-error .up-status { color: var(--bad-text); font-weight: 600; }
.up-bar { height: 5px; }
.up-bar > span { width: 0; background: var(--rose); }
.up-item.is-done .up-bar > span { background: var(--ok); }
.up-item.is-error .up-bar { display: none; }
.up-size { font-size: 12px; color: var(--muted); }
.up-err { font-size: 12.5px; color: var(--bad-text); }

.md-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; margin-top: 14px; }
.md-tile {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  cursor: grab; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.md-tile:hover { box-shadow: var(--shadow); }
.md-tile.is-dragging { opacity: .35; }
.md-frame { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; overflow: hidden; background: var(--petrol-100); cursor: zoom-in; }
.md-grid.is-vertical .md-frame { aspect-ratio: 9 / 16; }
.md-frame img, .md-frame video { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t) var(--ease); }
.md-frame:hover img, .md-frame:hover video { transform: scale(1.03); }
.md-frame:focus-visible { border-radius: 0; box-shadow: inset 0 0 0 3px var(--rose); }
.md-play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.md-play .icon { width: 34px; height: 34px; padding: 9px; border-radius: 50%; background: rgba(1, 43, 57, .62); color: #fff; }
.md-num {
  position: absolute; top: 7px; left: 7px;
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px;
  background: rgba(1, 43, 57, .8); color: #fff; font-size: 11.5px; font-weight: 700; pointer-events: none;
}
.md-handle { position: absolute; top: 7px; right: 7px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: rgba(255, 255, 255, .88); color: var(--petrol); pointer-events: none; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.md-tile:hover .md-handle { opacity: 1; }
@media (hover: none) { .md-handle { display: none; } }
.md-actions { display: flex; align-items: center; gap: 2px; padding: 4px; border-top: 1px solid var(--line); }
.md-actions .btn { width: 30px; min-height: 30px; }
.md-actions .md-del:hover { color: var(--bad); background: var(--bad-bg); }
.md-lightbox { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.md-lightbox img, .md-lightbox video { max-height: min(70vh, 760px); width: auto; max-width: 100%; border-radius: var(--r); background: var(--petrol-100); }

/* Versions */
.vr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.vr-item { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.vr-item.is-current { border-color: var(--rose-300); background: var(--rose-50); }
.vr-head { display: flex; align-items: center; gap: 12px; }
.vr-no { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--petrol); }
.vr-item.is-current .vr-no { background: var(--petrol); color: var(--rose-300); }
.vr-main { flex: 1; min-width: 0; }
.vr-title { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-weight: 600; color: var(--petrol); }
.vr-current { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 99px; background: var(--rose); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.vr-sub { font-size: 12.5px; color: var(--muted); }
.vr-hint { flex: none; font-size: 12.5px; color: var(--rose-700); font-weight: 600; }
.vr-toggle .icon { transition: transform var(--t) var(--ease); }
.vr-toggle.is-open .icon { transform: rotate(180deg); }
.vr-note { margin-top: 8px; padding-left: 50px; font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.vr-note-label { font-weight: 600; color: var(--text); }
.vr-detail { margin-top: 12px; padding-left: 50px; display: flex; flex-direction: column; gap: 12px; }
.vr-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.vr-thumb { position: relative; width: 72px; aspect-ratio: 4 / 5; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--petrol-100); cursor: zoom-in; }
.vr-thumb img, .vr-thumb video { width: 100%; height: 100%; object-fit: cover; }
.vr-thumb .md-play .icon { width: 24px; height: 24px; padding: 6px; }
.vr-caption { padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 13.5px; }
.vr-caption .label { display: block; margin-bottom: 4px; font-size: 12px; }

.ed-locked { display: flex; align-items: center; gap: 14px; color: var(--muted); }
.ed-locked > .icon { width: 28px; height: 28px; flex: none; color: var(--rose-300); stroke-width: 1.5; }
.ed-locked-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--petrol); }
.ed-locked-text { font-size: 13.5px; }

/* Comments */
.cm-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cm-item { display: flex; align-items: flex-start; gap: 10px; }
.cm-bubble { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: var(--surface-2); }
.cm-item.is-agency .cm-bubble { background: var(--petrol-100); }
.cm-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin-bottom: 3px; }
.cm-name { font-size: 13.5px; color: var(--petrol); }
.cm-email { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.cm-badge { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 99px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.cm-badge.is-agency { background: var(--petrol); color: var(--rose-300); }
.cm-badge.is-client { background: var(--rose-100); color: var(--rose-700); }
.cm-tag { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.cm-time { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.cm-body { font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.cm-empty { margin-bottom: 14px; font-size: 13.5px; color: var(--muted); }
.cm-reply { display: flex; flex-direction: column; gap: 8px; }
.cm-input { min-height: 64px; }
.cm-reply-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* History */
.ed-sec-history { padding: 0; }
.ev-wrap > summary { list-style: none; }
.ev-wrap > summary::-webkit-details-marker { display: none; }
.ev-summary { display: flex; align-items: center; gap: 10px; padding: 16px 20px; cursor: pointer; border-radius: var(--r-lg); }
.ev-summary:hover .ed-sec-title { color: var(--rose-700); }
.ev-summary .ed-count { margin-left: auto; }
.ev-chevron { color: var(--muted); transition: transform var(--t) var(--ease); }
.ev-wrap[open] .ev-chevron { transform: rotate(180deg); }
.ev-list { list-style: none; margin: 0; padding: 0 20px 18px; position: relative; }
.ev-item { position: relative; display: flex; gap: 12px; padding: 0 0 14px; }
.ev-item:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.ev-dot { flex: none; width: 11px; height: 11px; margin-top: 5px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px var(--tone-bg); }
.ev-main { min-width: 0; }
.ev-text { font-size: 13.5px; color: var(--text-2); }
.ev-text strong { color: var(--text); }
.ev-email { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.ev-tag { margin-left: 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.ev-note { margin-top: 2px; font-size: 13px; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.ev-time { display: block; font-size: 12px; color: var(--muted); }

/* ==========================================================================
   SPEC-v3 — Drive media, client images, suggestions, per-client permissions
   ========================================================================== */

/* ---------- Drive image that does not load (not public / removed) ---------- */
.dv-fb {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 8px; text-align: center;
  background: repeating-linear-gradient(135deg, var(--warn-bg) 0 8px, #FDF6E8 8px 16px);
  color: var(--warn-text);
}
.dv-fb > .icon { width: 18px; height: 18px; flex: none; }
.dv-fb.is-compact > .icon { width: 14px; height: 14px; }
.dv-fb-txt { font-size: 11.5px; font-weight: 700; line-height: 1.25; }
.dv-fb-sub { font-size: 10.5px; line-height: 1.25; color: #7A5410; }
.dv-fb-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 11.5px; font-weight: 700; color: var(--petrol-600); }
.md-lb-img .dv-fb, .att-thumb .dv-fb { position: absolute; }
.md-lb-img { position: relative; display: grid; place-items: center; min-height: 220px; min-width: min(320px, 100%); }
.md-lb-img .dv-fb { border-radius: var(--r); }
.md-lb-img .dv-fb-txt { font-size: 14px; }
.md-lb-img .dv-fb-sub, .md-lb-img .dv-fb-link { font-size: 13px; }

/* Drive video in the lightbox: Drive's own player, 9:16 */
.md-embed { width: min(100%, 380px); aspect-ratio: 9 / 16; max-height: min(70vh, 720px); border-radius: var(--r); overflow: hidden; background: var(--petrol); }
.md-embed iframe { display: block; width: 100%; height: 100%; border: 0; }

/* ---------- Client cards: what waits for the agency + permissions ---------- */
.cl-alerts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.cl-alert {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px;
  border-radius: var(--r-pill); background: var(--rose-700); color: #fff;
  font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 14px -8px rgba(169, 100, 122, .9);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.cl-alert:hover { background: var(--petrol); color: #fff; transform: translateY(-1px); }
.cl-alert .icon { width: 14px; height: 14px; }
.cl-perms { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-perm {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px;
  border-radius: var(--r-pill); border: 1px solid var(--petrol-100); background: #fff;
  font-size: 12px; font-weight: 600; color: var(--petrol-600); white-space: nowrap;
}
.cl-perm .icon { width: 13px; height: 13px; color: var(--rose-600); }

/* ---------- Client modal: permissions ---------- */
.cf-perms { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cf-perms-title { float: left; width: 100%; padding: 0; font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--petrol); }
.cf-perms-sub { clear: both; margin-top: -4px; font-size: 13px; color: var(--text-2); }
.switch.cf-perm {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: start; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  font-weight: 400; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.switch.cf-perm > span { margin-top: 1px; }
.switch.cf-perm:hover { border-color: var(--line-strong); }
.switch.cf-perm.is-on { border-color: var(--rose-300); background: var(--rose-50); }
.switch.cf-perm.is-flash { animation: cf-perm-flash 1.8s var(--ease); }
@keyframes cf-perm-flash {
  0%, 35% { border-color: var(--rose); box-shadow: 0 0 0 4px var(--rose-100); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.cf-perm-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cf-perm-title { display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; font-weight: 600; color: var(--petrol); }
.cf-perm-title .icon { color: var(--rose-600); }
.cf-perm-hint { font-size: 12.5px; line-height: 1.45; color: var(--muted); }

/* ---------- Workspace head: alerts, permissions, tab counters ---------- */
.ws-extras { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 2px; }
.ws-perms { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.ws-perms-label { color: var(--muted); }
.ws-perms-edit {
  padding: 2px 4px; border: 0; background: none; border-radius: var(--r-xs);
  font-size: 13px; font-weight: 600; color: var(--rose-700); text-decoration: underline; text-underline-offset: 2px;
}
.ws-perms-edit:hover { color: var(--petrol); }
.ws-tab-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: -2px;
  border-radius: var(--r-pill); background: var(--rose-700); color: #fff; font-size: 11.5px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ---------- Calendar: client suggestions, client images ---------- */
.sg-chip {
  display: flex; align-items: flex-start; gap: 6px; width: 100%; min-width: 0;
  padding: 5px 7px; text-align: left;
  border: 1.5px dashed var(--rose); border-radius: 9px;
  background: repeating-linear-gradient(135deg, var(--rose-50) 0 7px, #fff 7px 14px);
  color: var(--rose-700); cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.sg-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow); background: var(--rose-100); }
.sg-chip:focus-visible { box-shadow: var(--focus); border-radius: 9px; }
.sg-chip-ic { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--rose); color: #fff; }
.sg-chip-ic .icon { width: 12px; height: 12px; stroke-width: 2.2; }
.sg-chip-body { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sg-chip-kicker { font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rose-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-chip-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--petrol); overflow-wrap: anywhere; }
.sg-chip.is-large { padding: 10px 12px; gap: 10px; border-radius: var(--r); }
.sg-chip.is-large .sg-chip-ic { width: 30px; height: 30px; }
.sg-chip.is-large .sg-chip-ic .icon { width: 16px; height: 16px; }
.sg-chip.is-large .sg-chip-kicker { font-size: 10.5px; }
.sg-chip.is-large .sg-chip-title { font-size: 14.5px; }
.cal-sum-sg { color: var(--rose-700); font-weight: 600; }
.cal-leg-sg { width: 18px; height: 14px; display: grid; place-items: center; border-radius: 4px; border: 1.5px dashed var(--rose); background: var(--rose-50); color: var(--rose-700); }
.cal-leg-sg .icon { width: 10px; height: 10px; stroke-width: 2.4; }

.mc-att {
  margin-left: auto; display: inline-flex; align-items: center; gap: 2px; padding: 0 5px; height: 16px;
  border-radius: var(--r-pill); background: var(--rose-700); color: #fff; font-size: 10.5px; font-weight: 700;
}
.mc-att .icon { width: 11px; height: 11px; stroke-width: 2.2; }
.mc-cm.is-after { margin-left: 4px; }
.mc.has-att { box-shadow: 0 0 0 1.5px var(--rose-300), var(--shadow-sm); }
.mc-tag.is-att { background: var(--rose-700); color: #fff; }

/* ---------- List: client images ---------- */
.lt-chips .chip-att .icon { color: var(--rose-600); }
.lt-chips .chip-att.is-active { background: var(--rose-700); border-color: var(--rose-700); }
.lt-chips .chip-att.is-active .icon { color: #fff; }
.lt-thumb { position: relative; }
.lt-thumb .mc-play .icon { width: 11px; height: 11px; }
.lt-title-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lt-att { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; height: 20px; padding: 0 8px; border-radius: var(--r-pill); background: var(--rose-100); color: var(--rose-700); font-size: 11.5px; font-weight: 700; white-space: nowrap; }

/* ---------- Suggestions tab ---------- */
.sg-wrap { display: flex; flex-direction: column; gap: 16px; }
.sg-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; }
.sg-head-title { font-size: 24px; }
.sg-head-sub { margin-top: 4px; max-width: 64ch; font-size: 14px; color: var(--text-2); }
.sg-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-filters .chip { cursor: pointer; }
.sg-filters .chip .icon { color: var(--rose-600); }
.sg-filters .chip.is-active .icon { color: var(--rose-300); }
.sg-notice:empty { display: none; }
.sg-perm-note { align-items: center; flex-wrap: wrap; }
.sg-perm-note > span { flex: 1 1 280px; }
.sg-list > .adm-empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 16px; align-items: start; }

.sg-card {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  padding: 18px 18px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.sg-card.is-nova { border-color: var(--rose-300); box-shadow: 0 0 0 1px var(--rose-100), var(--shadow-sm); }
.sg-card.is-nova::before { content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: var(--rose); }
.sg-card.is-aceita, .sg-card.is-recusada { background: color-mix(in srgb, var(--surface-2) 40%, white); }
.sg-card.is-skeleton { gap: 12px; min-height: 180px; }
.sg-card.is-flash { animation: sg-flash 1.8s var(--ease); }
@keyframes sg-flash {
  0%, 30% { box-shadow: 0 0 0 4px var(--rose-300), var(--shadow); }
  100% { box-shadow: 0 0 0 1px var(--rose-100), var(--shadow-sm); }
}
.sg-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sg-status { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; white-space: nowrap; }
.sg-status.is-nova { background: var(--rose-700); color: #fff; }
.sg-status.is-aceita { background: var(--ok-bg); color: var(--ok-text); }
.sg-status.is-recusada { background: var(--surface-3); color: var(--text-2); }
.sg-when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.sg-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 1.25; color: var(--petrol); overflow-wrap: anywhere; }
.sg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.sg-any { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.sg-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text-2); }
.sg-date .icon { color: var(--rose-600); }
.sg-date strong { color: var(--petrol); }
.sg-date.is-none { color: var(--muted); }
.sg-date.is-past { color: var(--warn-text); }
.sg-date.is-past strong { color: var(--warn-text); }
.sg-desc { font-size: 14px; line-height: 1.55; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.sg-atts { display: flex; flex-direction: column; gap: 6px; }
.sg-atts-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sg-atts-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-by { font-size: 12.5px; color: var(--muted); }
.sg-by strong { color: var(--text-2); }
.sg-email { overflow-wrap: anywhere; }
.sg-outcome { display: flex; align-items: flex-start; gap: 7px; padding: 9px 11px; border-radius: var(--r-sm); font-size: 13.5px; }
.sg-outcome .icon { margin-top: 2px; flex: none; }
.sg-outcome.is-ok { background: var(--ok-bg); color: var(--ok-text); }
.sg-outcome strong { font-weight: 700; }
.sg-reply { padding: 9px 12px; border-left: 3px solid var(--petrol-400); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--petrol-100); }
.sg-reply-label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--petrol-600); }
.sg-reply-body { margin-top: 2px; font-size: 13.5px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.sg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.sg-actions .sg-decline:hover { color: var(--bad-text); background: var(--bad-bg); }

/* Square thumbnail of a client image (suggestions, editor, comments) */
.att-thumb {
  position: relative; flex: none; width: 64px; height: 64px; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: var(--petrol-100); cursor: zoom-in;
}
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-thumb:hover { border-color: var(--rose-300); }
.att-thumb .md-play .icon { width: 22px; height: 22px; padding: 6px; }
.att-src { position: absolute; right: 3px; bottom: 3px; z-index: 1; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 5px; background: rgba(255, 255, 255, .92); color: var(--petrol); }
.att-src .icon { width: 12px; height: 12px; }

/* Convert / decline modals */
.cv { display: flex; flex-direction: column; gap: 16px; }
.cv-from { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); border: 1.5px dashed var(--rose-300); background: var(--rose-50); }
.cv-from-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--rose); color: #fff; }
.cv-from-label { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rose-700); }
.cv-from-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; line-height: 1.25; color: var(--petrol); overflow-wrap: anywhere; }
.cv .field .hint { font-size: 12.5px; color: var(--muted); }
.cv-atts { display: flex; flex-direction: column; gap: 6px; }
.cv-atts .hint { font-size: 12.5px; color: var(--muted); }
.cv-vis-hint { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.dc { gap: 14px; }

/* ---------- Activity: client images and suggestions ---------- */
.tone-idea { --tone: #fff; --tone-bg: var(--rose); }
.act-move { font-weight: 700; color: var(--petrol); white-space: nowrap; }
.act-state { font-weight: 700; color: var(--text-2); }
.act-state.is-ok { color: var(--ok-text); }
.act-state.is-new { color: var(--rose-700); }
.act-thumb { flex: none; position: relative; width: 48px; height: 60px; overflow: hidden; border-radius: 8px; background: var(--petrol-100); align-self: center; }
.act-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Editor: head pill, media sources ---------- */
.drw-att {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border: 0; border-radius: var(--r-pill); background: var(--rose-700); color: #fff;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.drw-att:hover { background: var(--petrol); }

.ed-sources { display: flex; flex-direction: column; gap: 10px; }
.ed-sources .ed-drop { padding: 18px; }

.dl {
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface);
  transition: border-color var(--t-fast) var(--ease);
}
.dl:focus-within { border-color: var(--rose-300); }
.dl.is-busy { opacity: .85; }
.dl-head { display: flex; align-items: center; gap: 8px; }
.dl-ic { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--petrol-100); color: var(--petrol-600); }
.dl-ic .icon { width: 16px; height: 16px; }
.dl-title { font-size: 14px; font-weight: 700; color: var(--petrol); }
.dl-input { min-height: 46px; font-size: 13px; line-height: 1.5; resize: vertical; white-space: pre; overflow-wrap: normal; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.dl-input::placeholder { font-family: var(--font-sans); font-size: 13.5px; }
@media (max-width: 1023.98px), (pointer: coarse) { .dl-input { font-size: 16px; } }
.dl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow-y: auto; }
.dl-row { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: var(--r-sm); font-size: 12px; background: var(--surface-2); }
.dl-row.is-more { justify-content: center; color: var(--muted); }
.dl-thumb { flex: none; width: 28px; height: 28px; overflow: hidden; display: grid; place-items: center; border-radius: 6px; background: var(--surface-3); color: var(--muted); }
.dl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dl-row-txt { min-width: 0; display: flex; flex-direction: column; }
.dl-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }
.dl-state { font-weight: 600; line-height: 1.3; }
.dl-row.is-ok .dl-state { color: var(--ok-text); }
.dl-row.is-warn { background: var(--warn-bg); }
.dl-row.is-warn .dl-state, .dl-row.is-warn .dl-thumb { color: var(--warn-text); }
.dl-row.is-bad { background: var(--bad-bg); }
.dl-row.is-bad .dl-state, .dl-row.is-bad .dl-thumb { color: var(--bad-text); }
.dl-row.is-dup .dl-state { color: var(--muted); }
.dl-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.dl-kind > button { padding: 5px 11px; font-size: 12.5px; }
.dl-kind > button .icon { width: 14px; height: 14px; }
.dl-kind > button.is-active .icon { color: var(--rose-600); }
.dl-help { font-size: 12px; line-height: 1.45; color: var(--muted); }

.up-name .icon { display: inline-block; vertical-align: -2px; margin-right: 5px; color: var(--petrol-400); }
.up-item.is-link .up-size { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }
.up-item.is-link.is-active .up-bar > span { width: 40% !important; animation: up-indet 1.1s ease-in-out infinite; }
@keyframes up-indet { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.up-item.is-warn { align-items: flex-start; border-color: var(--warn-line); background: var(--warn-bg); }
.up-item.is-warn .up-status { color: var(--warn-text); font-weight: 600; }
.up-item.is-warn .up-err { color: #7A5410; }
.up-item.is-warn .up-bar > span { background: var(--warn); }

/* Media tiles: Drive badge (link) and "troca pedida" */
.md-media { position: relative; }
.md-src {
  position: absolute; left: 6px; bottom: 6px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px;
  border-radius: var(--r-pill); background: rgba(255, 255, 255, .94); box-shadow: var(--shadow-sm);
  font-size: 11px; font-weight: 700; color: var(--petrol); text-decoration: none;
}
.md-src .icon { width: 12px; height: 12px; }
.md-src-ext { color: var(--muted); }
a.md-src:hover { background: var(--petrol); color: #fff; }
a.md-src:hover .icon { color: #fff; }
.md-flag {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center; gap: 5px; height: 26px; padding: 0 6px;
  border: 0; background: var(--rose-700); color: #fff; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.md-flag:hover { background: var(--petrol); }
.md-tile.has-troca { border-color: var(--rose); box-shadow: 0 0 0 2px var(--rose-100); }
.md-tile.has-troca .md-src { bottom: 32px; }
.md-frame .dv-fb { border-radius: 0; }

/* ---------- Editor: "Imagens do cliente" ---------- */
.ed-sec-attachments.has-pending { border-color: var(--rose-300); box-shadow: 0 0 0 3px var(--rose-50), var(--shadow-sm); }
.ed-sec-attachments.is-flash, .att-item.is-flash { animation: sg-flash 1.8s var(--ease); }
.ed-count.is-alert { background: var(--rose-700); color: #fff; }
.att-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.att-item {
  display: flex; align-items: flex-start; gap: 14px; padding: 12px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.att-item.is-pendente { border-color: var(--rose-300); background: var(--rose-50); }
.att-list.is-done .att-item { background: var(--surface-2); }
.att-visual { flex: none; }
.att-visual .att-thumb { width: 84px; height: 104px; }
.att-compare { flex: none; display: flex; align-items: center; gap: 6px; }
.att-cur, .att-newwrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.att-cur > img, .att-cur > video { width: 64px; height: 80px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); background: var(--petrol-100); opacity: .8; }
.att-cur { width: 64px; }
.att-cur .dv-fb { position: relative; width: 64px; height: 80px; border-radius: 9px; }
.att-newwrap .att-thumb { width: 84px; height: 104px; border: 2px solid var(--rose); }
.att-cap { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.att-cap.is-new { color: var(--rose-700); }
.att-arrow { color: var(--rose-600); margin-bottom: 18px; }
.att-arrow .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.att-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.att-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.att-status { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.att-status .icon { width: 12px; height: 12px; stroke-width: 2.2; }
.att-status.is-pendente { background: var(--rose-700); color: #fff; }
.att-status.is-aplicada { background: var(--ok-bg); color: var(--ok-text); }
.att-status.is-arquivada { background: var(--surface-3); color: var(--text-2); }
.att-status.is-sugestao { background: var(--rose-50); color: var(--rose-700); box-shadow: inset 0 0 0 1px var(--rose-100); }
.att-list.is-refs.is-after { margin-top: 10px; }
.att-purpose { font-size: 14.5px; color: var(--petrol); }
.att-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.att-tag .icon { width: 12px; height: 12px; }
.att-note { padding: 7px 11px; border-left: 2px solid var(--rose-300); border-radius: 0 8px 8px 0; background: var(--surface); font-size: 13.5px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.att-by { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.att-by strong { color: var(--text-2); }
.att-hint { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.att-hint .icon { margin-top: 2px; flex: none; color: var(--petrol-400); }
.att-hint.is-warn { color: var(--warn-text); }
.att-hint.is-warn .icon { color: var(--warn); }
.att-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.att-actions .att-archive:hover { color: var(--bad-text); background: var(--bad-bg); }
.att-open { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--petrol-600); white-space: nowrap; }
.att-open:hover { color: var(--rose-700); }
.att-open .icon { width: 13px; height: 13px; }
.att-done { margin-top: 10px; }
.att-done > summary {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.att-done > summary::-webkit-details-marker { display: none; }
.att-done > summary .icon { transition: transform var(--t) var(--ease); }
.att-done[open] > summary .icon { transform: rotate(180deg); }
.att-done > .att-list { margin-top: 8px; }
.att-list.is-done .att-visual .att-thumb { width: 56px; height: 70px; }

/* Comment with a client image */
.cm-att { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.cm-att-thumb { width: 52px; height: 52px; }
.cm-att-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.cm-att-go { display: inline-flex; align-items: center; gap: 3px; padding: 0; border: 0; background: none; font-size: 13.5px; font-weight: 700; color: var(--petrol); text-align: left; }
.cm-att-go:hover { color: var(--rose-700); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .cal-day { min-height: 124px; padding: 6px; }
  .mc { gap: 6px; padding: 5px 5px 5px 6px; }
  .mc-thumb { width: 28px; height: 35px; }
  .cal-leg-hint { margin-left: 0; }
  .sg-chip { padding: 4px 5px; gap: 4px; }
  .sg-chip-ic { width: 16px; height: 16px; }
  .sg-chip-ic .icon { width: 10px; height: 10px; }
}

@media (max-width: 900px) {
  .adm-brand-text { display: none; }
  .set-grid { grid-template-columns: minmax(0, 1fr); }
  .col-version, .col-stage, .col-comments { display: none; }
  .mc-thumb { display: none; }
  .mc.mc-lg .mc-thumb { display: grid; }
}

@media (max-width: 767px) {
  .adm-top-inner { height: 58px; gap: 10px; }
  .adm-nav { gap: 2px; justify-content: center; }
  .adm-nav a { padding: 0 12px; }
  .adm-user-name { display: none; }
  .adm-main { padding-top: 22px; }
  .adm-head { margin-bottom: 20px; }
  .adm-head::before { left: -24px; top: -22px; width: 104px; height: 90px; }
  .cal-title { min-width: 0; font-size: 22px; }
  .cal-toolbar { flex-direction: column; align-items: flex-start; }
  .ws-head-row { align-items: flex-start; }
  .ws-avatar { width: 56px; height: 56px; font-size: 19px; }
  .ws-actions { width: 100%; }
  .ws-actions .btn-primary { flex: 1; }
  .ws-tabs { margin: 20px 0 18px; }
  .ws-tab { padding: 11px 12px; }

  .drw { width: 100%; }
  .drw-backdrop { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .drw-head { padding: 14px 16px 12px; padding-top: max(14px, env(safe-area-inset-top)); }
  .drw-title { font-size: 22px; }
  .drw-body { padding: 14px 12px 28px; gap: 12px; }
  .drw-foot { padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .drw-foot .btn-collapse, .drw-head .btn-collapse { width: 36px; padding: 0; }
  .drw-foot .btn-collapse .btn-label, .drw-head .btn-collapse .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .drw-close-foot { display: none; }
  .ed-sec { padding: 16px 14px 16px; }
  .ed-sec-history { padding: 0; }
  .ev-summary { padding: 14px; }
  .ev-list { padding: 0 14px 14px; }
  .ed-seg { display: grid; grid-template-columns: 1fr 1fr; }
  .vr-note, .vr-detail { padding-left: 0; }
  .sg-head-title { font-size: 21px; }
  .sg-card { padding: 16px 14px 14px; }
  .sg-title { font-size: 18px; }
}

@media (max-width: 640px) {
  .col-time, .col-format, .col-visible { display: none; }
  .lt-date-time { display: block; font-size: 12px; color: var(--muted); }
  .lt td { padding: 10px; }
  .lt-sort { padding: 10px; }
  .col-title { min-width: 150px; }
  .lt-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .lt-filters .lt-search { grid-column: 1 / -1; width: 100%; }
  .lt-select { min-width: 0; width: 100%; }
  .lt-filters .lt-select:last-child { grid-column: 1 / -1; }
  .act-item { gap: 10px; padding: 12px; }
  .act-ic { width: 30px; height: 30px; }
  .act-ic .icon { width: 15px; height: 15px; }
  .act-go { display: none; }
  .act-thumb { width: 40px; height: 50px; }
  .cl-card { padding: 16px; }
  .set-card { padding: 18px; }
  .set-row { flex-direction: column; gap: 4px; }
  .set-row dd { text-align: left; }
  .adm-login-card { padding: 28px 22px 22px; border-radius: var(--r-lg); }
  .adm-login-blob--petrol { width: 380px; height: 350px; right: -190px; top: -150px; }
}

@media (max-width: 560px) {
  /* List rows become stacked cards: title on top, date + status below */
  .lt thead { display: none; }
  .lt, .lt tbody { display: block; }
  .lt-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title title" "date status";
    align-items: center; gap: 8px 10px; padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }
  .lt tbody .lt-row:last-child { border-bottom: 0; }
  .lt td { display: block; padding: 0 !important; border: 0; white-space: normal; }
  .lt td.col-title { grid-area: title; min-width: 0; }
  .lt td.col-date { grid-area: date; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
  .lt td.col-status { grid-area: status; justify-self: end; }
  .lt td.col-time, .lt td.col-format, .lt td.col-stage, .lt td.col-version, .lt td.col-visible, .lt td.col-comments { display: none; }
  .lt-date-time { display: inline; font-size: 12.5px; }
  .lt-date-time:not(:empty)::before { content: "· "; }
  .lt-row.is-draft .col-date::after { content: "Rascunho"; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

  .lt-filters { grid-template-columns: minmax(0, 1fr); }
  .lt-filters .lt-search, .lt-filters .lt-select:last-child { grid-column: auto; }
  .vr-hint { display: none; }
  .vr-head { align-items: flex-start; }

  .adm-nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .adm-nav a { width: 42px; padding: 0; justify-content: center; }
  .adm-logout-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .adm-logout { width: 36px; padding: 0; }
  .ed-grid { grid-template-columns: minmax(0, 1fr); }
  .ed-status-field { flex: 1 1 100%; }
  .md-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
  .drw-dirty { font-size: 0; gap: 0; }
  .drw-dirty-dot { width: 10px; height: 10px; }
  .cm-time { margin-left: 0; width: 100%; }
  .nt-list li { flex-wrap: wrap; gap: 2px 10px; }
  .nt-date { width: auto; }
  .lk-ctl { flex-direction: column; align-items: stretch; }
  /* Modal footers with three actions (e.g. Excluir · Cancelar · Salvar) wrap instead of widening the modal */
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .btn { flex: 1 1 auto; }
  .modal-foot .btn-danger:first-child:not(:last-child) { order: 3; flex-basis: 100%; margin-right: 0; }
  .att-item { flex-direction: column; gap: 10px; }
  .att-list.is-done .att-item { flex-direction: row; }
  .switch.cf-perm { padding: 11px 12px; gap: 10px; }
  .cf-perms { padding: 14px 12px; }
  .sg-actions .btn { flex: 1 1 auto; }
  .dl-foot .dl-add { flex: 1 1 auto; }
}

@media (max-width: 400px) {
  .adm-main { padding-left: 12px; padding-right: 12px; }
  .adm-brand .prov-logo { width: 34px; height: 34px; }
  .ag-day { grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
  .mc-lg .mc-thumb { width: 50px; height: 62px; }
  .ed-seg > button { padding: 8px 6px; font-size: 13px; }
}

/* ==========================================================================
   Propostas (assets/js/proposals.js): list, catalog of services and the proposal builder
   ========================================================================== */
.pr-tabs { margin-bottom: 22px; }
.pr-tip { margin-bottom: 18px; }
.pr-tip a { color: var(--rose-700); font-weight: 600; }
.pr-num { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* State pills (base.css .pill) */
.pill.pr-state.is-rascunho    { --c: var(--muted); --c-bg: var(--surface-3); --c-text: #52696F; }
.pill.pr-state.is-enviada     { --c: var(--wait); --c-bg: var(--wait-bg); --c-text: var(--wait-text); }
.pill.pr-state.is-visualizada { --c: var(--petrol-600); --c-bg: var(--petrol-100); --c-text: var(--petrol); }
.pill.pr-state.is-aceita      { --c: var(--ok); --c-bg: var(--ok-bg); --c-text: var(--ok-text); }
.pill.pr-state.is-expirada    { --c: var(--warn); --c-bg: var(--warn-bg); --c-text: var(--warn-text); }

/* List */
.pr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 18px; }
.pr-card {
  display: flex; flex-direction: column; gap: 6px; padding: 20px; min-width: 0;
  color: inherit; text-decoration: none;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}
a.pr-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); color: inherit; }
.pr-card.is-skeleton { gap: 12px; }
.pr-card.is-aceita { border-color: var(--ok-line); }
.pr-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.pr-card-title { font-size: 21px; line-height: 1.2; overflow-wrap: anywhere; }
.pr-card-sub { font-size: 13.5px; color: var(--muted); }
.pr-card-total { margin-top: 8px; font-size: 16px; font-weight: 700; color: var(--petrol); font-variant-numeric: tabular-nums; }
.pr-card-svcs { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-card-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.pr-card-foot.is-ok { color: var(--ok-text); font-weight: 600; }
.pr-card-foot.is-late { color: var(--warn-text); font-weight: 600; }

/* Catalog */
.pr-svc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pr-svc-intro { max-width: 62ch; color: var(--text-2); }
.pr-svc-list { display: flex; flex-direction: column; gap: 12px; }
.pr-svc-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px; }
.pr-svc-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pr-svc-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.pr-svc-name { font-size: 20px; line-height: 1.2; }
.pr-svc-desc { font-size: 14px; color: var(--text-2); }
.pr-svc-price { font-size: 14.5px; font-weight: 700; color: var(--petrol); font-variant-numeric: tabular-nums; }
.pr-svc-price.is-empty { font-weight: 600; color: var(--rose-700); font-style: italic; }
.pr-svc-actions { flex: none; display: flex; align-items: center; gap: 2px; }
.pr-svc-actions .btn:first-child { margin-right: 6px; }
.pr-bill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--text-2); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.pr-bill.is-month { background: var(--rose-50); color: var(--rose-700); }
.pr-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 0; padding: 0; list-style: none; }
.pr-chips li { list-style: none; }
.pr-chips li { padding: 2px 9px; border-radius: var(--r-pill); background: var(--rose-50); border: 1px solid var(--rose-100); font-size: 12.5px; font-weight: 600; color: var(--petrol); }

/* Forms (catalog modal) */
.pr-form { display: flex; flex-direction: column; gap: 16px; }
.pr-form-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pr-seg { display: flex; width: 100%; padding: 4px; border-radius: var(--r); }
.pr-seg > button { flex: 1 1 0; justify-content: center; padding: 8px 10px; border-radius: 9px; white-space: nowrap; }
.pr-seg > button .icon { width: 15px; height: 15px; }
.pr-seg > button.is-active .icon { color: var(--rose-600); }
.pr-seg > button:disabled { cursor: default; }
.pr-money { position: relative; display: block; }
.pr-money-sym { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; font-weight: 700; color: var(--muted); pointer-events: none; }
.pr-money .input { padding-left: 38px; font-variant-numeric: tabular-nums; }

/* Builder */
.pe-head .ws-back { margin-bottom: 8px; }
.pe-head .adm-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 22px; align-items: start; }
.pe-main { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.pe-card { padding: 22px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pe-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pe-card-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--petrol); }
.pe-card-link { font-size: 13px; font-weight: 600; color: var(--rose-700); }
.pe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pe-full { grid-column: 1 / -1; }
.pe-loading { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }

.pe-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 8px; }
.pe-pick {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 8px; row-gap: 1px;
  padding: 10px 12px; text-align: left; border-radius: var(--r);
  border: 1px dashed var(--rose-300); background: var(--rose-50); color: var(--petrol);
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.pe-pick:hover { background: var(--rose-100); border-color: var(--rose); transform: translateY(-1px); }
.pe-pick > .icon { grid-row: span 2; width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--rose); color: #fff; stroke-width: 2.4; }
.pe-pick-name { font-size: 14px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.pe-pick-name b { color: var(--rose-700); }
.pe-pick-price { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pe-pick.is-added { border-style: solid; border-color: var(--ok-line); background: #F3FAF7; }
.pe-pick.is-added > .icon { background: var(--ok); }
.pe-pick.is-custom { border-color: var(--line-strong); background: var(--surface); }
.pe-pick.is-custom > .icon { background: var(--petrol); }

.pe-items { display: flex; flex-direction: column; gap: 12px; }
.pe-empty { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: var(--r); border: 1px dashed var(--line-strong); color: var(--muted); font-size: 14px; }
.pe-empty > .icon { flex: none; color: var(--rose-600); }
.pe-item {
  display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--bg);
}
.pe-item.is-new { animation: mc-flash 1.4s var(--ease); }
.pe-item-top { display: flex; align-items: center; gap: 10px; }
.pe-item-n { flex: none; font-family: var(--font-display); font-style: italic; font-size: 24px; line-height: 1; color: var(--rose-300); }
.pe-item-name { flex: 1; min-width: 0; font-weight: 700; font-size: 15.5px; }
.pe-item-actions { flex: none; display: flex; }
.pe-item-inc { min-height: 76px; }
.pe-item-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; }

/* Summary column */
.pe-side { position: sticky; top: 86px; min-width: 0; }
.pe-sum { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.pe-sum-cfg { display: flex; flex-direction: column; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.pe-sum-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pe-sum-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 14px; }
.pe-sum-name { min-width: 0; color: var(--text-2); overflow-wrap: anywhere; }
.pe-sum-price { flex: none; font-weight: 700; color: var(--petrol); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pe-sum-price.is-empty { color: var(--rose-700); font-weight: 600; font-style: italic; }
.pe-sum-empty { color: var(--muted); font-style: italic; }
.pe-sum-totals { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--r); background: var(--petrol); color: #fff; }
.pe-sum-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pe-sum-row span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rose-300); }
.pe-sum-row b { font-family: var(--font-display); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pe-sum-row small { margin-left: 2px; font-family: var(--font-sans); font-size: 13px; color: rgba(255, 255, 255, .72); }
.pe-sum-row.is-zero b { font-size: 16px; color: rgba(255, 255, 255, .6); }
.pe-dirty { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--warn-text); }
.pe-actions { display: flex; flex-direction: column; gap: 8px; }
.pe-actions-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pe-status { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.pe-status-msg { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.pe-status-msg > .icon { flex: none; margin-top: 2px; color: var(--muted); }
.pe-status-msg.is-aceita { color: var(--ok-text); font-weight: 600; }
.pe-status-msg.is-aceita > .icon { color: var(--ok); }
.pe-status-msg.is-expirada { color: var(--warn-text); }
.pe-status-msg.is-expirada > .icon { color: var(--warn); }
.pe-link { display: flex; flex-direction: column; gap: 6px; }
.pe-link label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.pe-link-row { display: flex; gap: 6px; }
.pe-link-row .input { min-width: 0; font-size: 13px; color: var(--text-2); }

/* Observações, optional services, "Sob consulta" and the discount */
.pr-svc-notes {
  font-size: 13.5px; line-height: 1.5; color: var(--text-2); white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pe-item-notes { min-height: 56px; }
.pe-opt-tag {
  flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  background: var(--rose-100); color: var(--rose-700); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.pe-opt-tag.is-chosen { background: var(--ok-bg); color: var(--ok-text); }
.pe-item.is-optional { border-style: dashed; border-color: var(--rose-300); background: var(--rose-50); }
.pe-opt { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pe-opt .switch { font-size: 14px; font-weight: 600; color: var(--petrol); }
.pe-opt .hint { flex: 1 1 260px; font-size: 12.5px; color: var(--muted); }
.pe-card-note { font-size: 13px; color: var(--muted); }
.pe-disc-body { display: flex; flex-direction: column; gap: 14px; }
.pe-disc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 12px; align-items: end; }
.pe-pct .pr-money-sym { left: auto; right: 12px; }
.pe-pct .input { padding-left: 12px; padding-right: 34px; }
.pe-disc-info { font-size: 13.5px; font-weight: 600; color: var(--ok-text); font-variant-numeric: tabular-nums; }
.pe-disc-info:empty { display: none; }
.pe-disc-info.is-warn { color: var(--warn-text); }
.pe-sum-disc { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 8px; margin-bottom: 2px; border-bottom: 1px solid rgba(255, 255, 255, .16); font-size: 13px; }
.pe-sum-disc span { display: inline-flex; align-items: center; gap: 6px; color: rgba(255, 255, 255, .85); }
.pe-sum-disc .icon { color: var(--rose-300); }
.pe-sum-disc b { font-weight: 700; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pe-sum-row b.is-consult { font-size: 18px; }
.pe-sum-totals .pe-sum-note { margin-top: 4px; font-size: 12.5px; color: rgba(255, 255, 255, .72); }
.pe-sum-opt { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--r); border: 1px dashed var(--rose-300); background: var(--rose-50); }
.pe-sum-sub { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rose-700); }
.pe-sum-opt .pe-sum-note { font-size: 12.5px; color: var(--muted); }
.pe-sum-list li.is-chosen .pe-sum-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ok-text); }
.pe-sum-list li.is-chosen .icon { flex: none; color: var(--ok); }
.pe-sum-list li.is-off { opacity: .6; }

@media (max-width: 1180px) {
  .pe-item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .pe { grid-template-columns: minmax(0, 1fr); }
  .pe-side { position: static; }
}
@media (max-width: 640px) {
  .pe-grid, .pr-form-2 { grid-template-columns: minmax(0, 1fr); }
  .pe-card { padding: 16px; }
  .pe-item { padding: 12px; }
  .pe-item-grid, .pe-disc-grid { grid-template-columns: minmax(0, 1fr); }
  .pr-svc-row { flex-direction: column; }
  /* Number and buttons on the first row, the service name gets the whole width below */
  .pe-item-top { flex-wrap: wrap; justify-content: space-between; row-gap: 8px; }
  .pe-item-name { order: 3; flex-basis: 100%; }
}

/* ==========================================================================
   Documentos (assets/js/documents.js) + documents inside the production window
   ========================================================================== */
.pr-docs-field .doc-rows { margin-bottom: 2px; }
.pr-doc-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.pr-doc-bar .hint { font-size: 12.5px; color: var(--muted); }

.dc-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.dc-toolbar .select { width: auto; min-width: 170px; }
.dc-search { flex: 1 1 220px; max-width: 340px; }
.dc-count { margin-left: auto; font-size: 13.5px; color: var(--muted); }
.dc-list { display: flex; flex-direction: column; gap: 10px; }
.dc-none { padding: 24px; text-align: center; color: var(--muted); }
.dc-row { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; }
.dc-row.is-skeleton { flex-direction: column; gap: 10px; }
.dc-row > .doc-badge { margin-top: 3px; }
.dc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dc-title { font-size: 16px; font-weight: 700; color: var(--petrol); text-decoration: none; overflow-wrap: anywhere; }
.dc-title:hover { color: var(--rose-700); text-decoration: underline; }
.dc-meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.dc-where {
  align-self: flex-start; display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 2px;
  padding: 3px 10px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600;
}
.dc-where .icon { width: 13px; height: 13px; }
.dc-where b { font-weight: 700; }
.dc-where.is-shared { background: var(--petrol-100); color: var(--petrol); }
.dc-where.is-shared b { color: var(--ok-text); }
.dc-where.is-draft { background: var(--surface-3); color: var(--text-2); }
.dc-where.is-loose { background: var(--surface-2); color: var(--muted); }
.dc-actions { flex: none; display: flex; align-items: center; gap: 4px; }
.dc-form-file { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .dc-toolbar .select, .dc-search { flex: 1 1 100%; max-width: none; min-width: 0; width: 100%; }
  .dc-count { margin-left: 0; }
  .dc-row { flex-wrap: wrap; }
  .dc-actions { width: 100%; justify-content: flex-end; }
  /* Long production names wrap as text (icon inline), not as a lumpy pill. */
  .dc-where { display: block; border-radius: 10px; line-height: 1.5; }
  .dc-where .icon { vertical-align: -2px; margin-right: 4px; }
  .dc-where b { margin-left: 4px; }
}

/* ==========================================================================
   Resultados (assets/js/results.js): Instagram + calendar numbers per client; instagram.php (connect page)
   ========================================================================== */
.rs-body { display: flex; flex-direction: column; gap: 18px; transition: opacity var(--t-fast) var(--ease); }
.rs-body.is-refreshing { opacity: .55; }
.rs-skel { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.rs-tip-box b { color: var(--petrol); }
.rs-sync { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--petrol-600); }
.rs-sync::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--petrol-100); border-top-color: var(--petrol-600); animation: rs-spin .8s linear infinite; }
.rs-sync[hidden] { display: none; }
@keyframes rs-spin { to { transform: rotate(360deg); } }
.rs-muted { color: var(--muted); }
.rs-flag {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 1px 8px; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--text-2); font-size: 11.5px; font-weight: 700; vertical-align: 1px;
}
.rs-flag .icon { width: 12px; height: 12px; }
.rs-flag.is-bad { background: var(--bad-bg); color: var(--bad-text); }
.rs-avatar { width: 28px; height: 28px; font-size: 11px; position: relative; overflow: hidden; flex: none; }
.rs-avatar img { position: absolute; inset: 0; }
.rs-foot { font-size: 12.5px; color: var(--muted); max-width: 90ch; }

/* Overview table (cards on phones) */
.rs-table-card { padding: 0; overflow: hidden; }
.rs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rs-table th, .rs-table td { padding: 12px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.rs-table thead th { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.rs-table tbody tr:last-child > * { border-bottom: 0; }
.rs-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.rs-overview tbody tr { cursor: pointer; transition: background var(--t-fast) var(--ease); }
.rs-overview tbody tr:hover { background: var(--rose-50); }
.rs-overview td:nth-child(n+3):nth-child(-n+6) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rs-val { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rs-client { color: var(--petrol); text-decoration: none; }
.rs-client b { font-size: 15px; }
.rs-client:hover b { color: var(--rose-700); text-decoration: underline; }
.rs-ig { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--petrol); }
.rs-month { display: inline-flex; flex-direction: column; gap: 5px; min-width: 120px; font-size: 13.5px; color: var(--text-2); }
.rs-month b { color: var(--petrol); }
.rs-mini { display: block; height: 6px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.rs-mini > span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--ok); }

/* Changes against the period before: arrow + text; the colour says whether it is good */
.rs-delta { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 3px; font-size: 12.5px; color: var(--muted); }
.rs-delta b { font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rs-delta-arrow { font-size: 9px; }
.rs-delta.is-good b, .rs-delta.is-good .rs-delta-arrow { color: var(--ok-text); }
.rs-delta.is-bad b, .rs-delta.is-bad .rs-delta-arrow { color: var(--bad-text); }

/* One client */
.rs-head { margin-bottom: 0; }
.rs-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.rs-sub b { color: var(--petrol); }
.rs-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.rs-range { font-size: 13px; color: var(--muted); }
.rs-section { display: flex; flex-direction: column; gap: 16px; margin-top: 10px; }
.rs-h2 { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--petrol); }
.rs-h2 .icon { width: 22px; height: 22px; color: var(--rose-600); }
.rs-h3 { font-size: 17px; font-weight: 700; color: var(--petrol); }
.rs-ig-block { display: flex; flex-direction: column; gap: 16px; }
.rs-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px; }
.rs-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.rs-tile.is-skeleton { gap: 12px; }
.rs-tile-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.rs-tile-value { font-size: 30px; font-weight: 700; line-height: 1.15; color: var(--petrol); letter-spacing: -.01em; }
.rs-tile.is-hero .rs-tile-value { font-size: 40px; }
.rs-tile-note { font-size: 12.5px; color: var(--muted); }
.rs-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 12px; }
.rs-chart-card { margin: 0; padding: 16px 18px 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rs-chart-title { font-size: 15px; font-weight: 700; color: var(--petrol); }
.rs-chart-sub { font-size: 12.5px; color: var(--muted); }
.rs-empty-chart { display: flex; align-items: flex-start; gap: 10px; min-height: 120px; padding: 16px; border-radius: var(--r); background: var(--surface-2); font-size: 13.5px; color: var(--text-2); }
.rs-empty-chart .icon { flex: none; margin-top: 2px; color: var(--rose-600); }

/* Charts: one series, thin marks, hairline grid, hover crosshair + tooltip */
.rs-chart { position: relative; min-width: 0; border-radius: var(--r-sm); }
.rs-svg { display: block; overflow: visible; }
.rs-grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.rs-axis { fill: var(--muted); font-size: 11px; font-family: var(--font-sans); font-variant-numeric: tabular-nums; }
.rs-line { fill: none; stroke: var(--petrol-600); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rs-area { fill: var(--petrol-600); opacity: .1; }
.rs-dot { fill: var(--petrol-600); stroke: var(--surface); stroke-width: 2; }
.rs-endlabel, .rs-peak { fill: var(--text); font-size: 12px; font-weight: 700; font-family: var(--font-sans); }
.rs-col { fill: var(--petrol-600); }
.rs-col.is-hover { fill: var(--rose-600); }
.rs-cross { stroke: var(--line-strong); stroke-width: 1; shape-rendering: crispEdges; pointer-events: none; }
.rs-tip {
  position: absolute; top: 0; z-index: 2; display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; pointer-events: none;
  background: var(--petrol); color: #fff; border-radius: var(--r-sm); box-shadow: var(--shadow); white-space: nowrap;
}
.rs-tip[hidden] { display: none; }
.rs-tip b { font-size: 15px; font-weight: 700; }
.rs-tip span { font-size: 12px; color: rgba(255, 255, 255, .78); }

.rs-details { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.rs-details > summary { padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--petrol); cursor: pointer; }
.rs-details[open] > summary { border-bottom: 1px solid var(--line); }
.rs-scroll { overflow: auto; max-height: 420px; }
.rs-days th[scope="row"], .rs-all-posts th[scope="row"] { font-weight: 600; color: var(--text-2); white-space: nowrap; }
.rs-days td, .rs-all-posts td { font-size: 13.5px; }

/* Posts */
.rs-posts { display: flex; flex-direction: column; gap: 10px; }
.rs-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.rs-post { display: flex; flex-direction: column; overflow: hidden; }
.rs-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--surface-2); color: var(--muted); overflow: hidden; }
.rs-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rs-post-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.rs-post-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.rs-kind { padding: 1px 8px; border-radius: var(--r-pill); background: var(--petrol-100); color: var(--petrol); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rs-post-cap { font-size: 13.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rs-post-main { font-size: 13.5px; color: var(--text-2); }
.rs-post-main b { color: var(--petrol); }
.rs-post-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.rs-post-stats li { display: inline-flex; align-items: center; gap: 4px; }
.rs-post-stats .icon { width: 14px; height: 14px; color: var(--muted); }
.rs-post-link { margin-top: auto; padding-top: 4px; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--rose-700); }

/* Calendar status: thin segmented bar + legend (status colours, always with their names) */
.rs-status-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.rs-status { display: flex; flex-direction: column; gap: 10px; }
.rs-status-bar { display: flex; gap: 2px; height: 8px; }
.rs-status-bar > span { display: block; min-width: 4px; border-radius: var(--r-pill); }
.rs-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-2); }
.rs-legend li { display: inline-flex; align-items: center; gap: 6px; }
.rs-legend b { color: var(--petrol); }
.rs-key { width: 10px; height: 10px; border-radius: 3px; }
.rs-key.is-ok, .rs-status-bar .is-ok { background: var(--ok); }
.rs-key.is-wait, .rs-status-bar .is-wait { background: var(--wait); }
.rs-key.is-warn, .rs-status-bar .is-warn { background: var(--warn); }
.rs-key.is-bad, .rs-status-bar .is-bad { background: var(--bad); }

/* Connection */
.rs-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--warn-bg); border: 1px solid var(--warn-line); font-size: 14px; color: var(--text); }
.rs-alert > .icon { flex: none; margin-top: 2px; color: var(--warn); }
.rs-alert p + p { margin-top: 2px; font-size: 12.5px; }
.rs-connect { display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px; }
.rs-connect-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--rose-50); color: var(--rose-700); }
.rs-connect-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rs-connect-text h3 { font-size: 18px; color: var(--petrol); }
.rs-connect-text > p { font-size: 14px; color: var(--text-2); }
.rs-connect-text > p.rs-connect-note { font-size: 12.5px; color: var(--muted); }
.rs-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--text-2); }
.rs-connect-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.rs-link { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--r); background: var(--surface-2); }
.rs-link[hidden] { display: none; }
.rs-link label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.rs-link .pe-link-row .input { min-width: 0; font-size: 13px; }
.rs-modal-lead { font-size: 14px; color: var(--text-2); }

/* instagram.php */
.igc-card .adm-login-title { font-size: 26px; }
.igc-list { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-2); }
.igc-list li { padding: 10px 12px 10px 36px; border-radius: var(--r-sm); background: var(--surface-2); position: relative; }
.igc-list li::before { position: absolute; left: 13px; top: 10px; font-weight: 800; }
.igc-list li.is-yes::before { content: "✓"; color: var(--ok-text); }
.igc-list li.is-no::before { content: "✕"; color: var(--bad-text); }
.igc-list b { color: var(--petrol); }
.igc-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
.igc-go { margin-top: 18px; }
.igc-picks { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.igc-picks .btn { justify-content: flex-start; }
.igc-ok { margin-top: 16px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--ok-bg); color: var(--ok-text); font-weight: 600; font-size: 14px; }

@media (max-width: 980px) {
  /* Overview: each client becomes a card */
  .rs-overview thead { display: none; }
  .rs-overview, .rs-overview tbody, .rs-overview tr, .rs-overview th, .rs-overview td { display: block; }
  .rs-overview tbody tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .rs-overview tbody tr:last-child { border-bottom: 0; }
  .rs-overview th, .rs-overview td { padding: 4px 0; border: 0; }
  .rs-overview td, .rs-overview td:nth-child(n+3):nth-child(-n+6) { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; text-align: right; white-space: normal; }
  .rs-overview td::before { content: attr(data-label); flex: none; font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: left; }
  .rs-overview .rs-val { flex-direction: row; align-items: baseline; gap: 8px; }
  .rs-overview th[scope="row"] { padding-bottom: 6px; }
  .rs-month { align-items: flex-end; }
}
@media (max-width: 640px) {
  .rs-tile { padding: 14px; }
  .rs-tile-value { font-size: 26px; }
  .rs-tile.is-hero .rs-tile-value { font-size: 32px; }
  .rs-h2 { font-size: 22px; }
  .rs-connect { flex-direction: column; padding: 16px; }
  .rs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-tiles .is-hero { grid-column: 1 / -1; }
  /* Posts as compact rows: small square image beside the numbers */
  .rs-post { flex-direction: row; }
  .rs-thumb { flex: none; width: 92px; aspect-ratio: auto; min-height: 92px; }
  .rs-post-body { padding: 10px 12px; gap: 4px; }
  .rs-post-cap { -webkit-line-clamp: 1; }
}
