/*
 * AFServiceMap · AF Modern site preset
 * Applies only to normal application shells explicitly marked with
 * data-site-shell="app". Map/CAD keep their own interface.
 * Structural project scope/group/project selectors are intentionally preserved.
 */

/* ---------- semantic palette ---------- */
html[data-site-shell="app"] {
  --afm-brand: var(--af-site-effective-primary, var(--company-brand, #2f81f7));
  --afm-brand-soft: color-mix(in srgb, var(--afm-brand) 14%, transparent);
  --afm-brand-faint: color-mix(in srgb, var(--afm-brand) 7%, transparent);
  --afm-success: var(--af-site-success, #22c55e);
  --afm-warning: var(--af-site-warning, #f59e0b);
  --afm-danger: var(--af-site-danger, #ef4444);
  --afm-info: var(--af-site-info, #3b82f6);
  --afm-radius: max(12px, var(--af-site-card-radius, 12px));
  --afm-control-radius: max(8px, var(--af-site-input-radius, 9px));
  --afm-font: var(--af-site-font, "Inter","Segoe UI",Arial,sans-serif);
}

html[data-site-shell="app"][data-theme="dark"] {
  --afm-bg: #080b10;
  --afm-bg-2: #0b0f15;
  --afm-surface: #10151d;
  --afm-surface-2: #141a24;
  --afm-surface-3: #191f2a;
  --afm-sidebar: #090c12;
  --afm-sidebar-2: #0d1118;
  --afm-text: #f4f7fb;
  --afm-muted: #8f9bab;
  --afm-soft-text: #b8c1ce;
  --afm-border: rgba(255,255,255,.08);
  --afm-border-strong: rgba(255,255,255,.13);
  --afm-shadow: 0 18px 48px rgba(0,0,0,.26);
  --afm-shadow-soft: 0 8px 26px rgba(0,0,0,.18);
  --afm-grid: rgba(255,255,255,.025);
}

html[data-site-shell="app"][data-theme="light"] {
  --afm-bg: #f4f6f9;
  --afm-bg-2: #eef1f5;
  --afm-surface: #ffffff;
  --afm-surface-2: #f8fafc;
  --afm-surface-3: #f0f3f7;
  --afm-sidebar: #11151c;
  --afm-sidebar-2: #171c25;
  --afm-text: #151b26;
  --afm-muted: #697586;
  --afm-soft-text: #475569;
  --afm-border: rgba(15,23,42,.09);
  --afm-border-strong: rgba(15,23,42,.14);
  --afm-shadow: 0 16px 42px rgba(15,23,42,.08);
  --afm-shadow-soft: 0 7px 24px rgba(15,23,42,.06);
  --afm-grid: rgba(15,23,42,.025);
}

/* ---------- page canvas ---------- */
html[data-site-shell="app"],
html[data-site-shell="app"] body {
  font-family: var(--afm-font) !important;
  background:
    radial-gradient(circle at 82% -10%, var(--afm-brand-faint), transparent 28rem),
    linear-gradient(180deg, var(--afm-bg), var(--afm-bg-2)) !important;
  color: var(--afm-text);
}

html[data-site-shell="app"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--afm-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--afm-grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.36), transparent 72%);
}

html[data-site-shell="app"] .af-workspace,
html[data-site-shell="app"] .app-shell,
html[data-site-shell="app"] .af-page-stage,
html[data-site-shell="app"] .page-content,
html[data-site-shell="app"] .content {
  background: transparent !important;
}

/* ---------- top bar: visual only, keep functional geometry ---------- */
html[data-site-shell="app"] .af-topbar,
html[data-site-shell="app"] .app-topbar,
html[data-site-shell="app"] .topbar {
  background: color-mix(in srgb, var(--afm-surface) 91%, transparent) !important;
  border-color: var(--afm-border) !important;
  box-shadow: 0 1px 0 var(--afm-border), 0 12px 32px rgba(0,0,0,.06) !important;
  backdrop-filter: blur(18px) saturate(125%);
}

html[data-site-shell="app"] .af-main-project-picker,
html[data-site-shell="app"] .af-main-project-selectors {
  /* Do not change width, height, ordering or selector logic. */
  border-color: color-mix(in srgb, var(--afm-brand) 26%, var(--afm-border)) !important;
  background: color-mix(in srgb, var(--afm-brand) 8%, var(--afm-surface)) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--afm-brand) 7%, transparent);
}

html[data-site-shell="app"] .af-main-project-selectors select,
html[data-site-shell="app"] .af-project select,
html[data-site-shell="app"] .tenant-picker-copy select {
  color: var(--afm-text) !important;
  background: color-mix(in srgb, var(--afm-surface-2) 94%, var(--afm-brand) 6%) !important;
  border-color: var(--afm-border-strong) !important;
}

html[data-site-shell="app"] .tenant-picker-copy small {
  color: var(--afm-muted) !important;
}

html[data-site-shell="app"] .af-platform-search,
html[data-site-shell="app"] .global-search,
html[data-site-shell="app"] .app-topbar input[type="search"] {
  background: var(--afm-surface-2) !important;
  border-color: var(--afm-border) !important;
  color: var(--afm-text) !important;
  box-shadow: none !important;
}

html[data-site-shell="app"] .af-icon-button,
html[data-site-shell="app"] .topbar-alert-bell,
html[data-site-shell="app"] .menu-toggle {
  background: var(--afm-surface-2) !important;
  color: var(--afm-soft-text) !important;
  border-color: var(--afm-border) !important;
}
html[data-site-shell="app"] .af-icon-button:hover,
html[data-site-shell="app"] .topbar-alert-bell:hover,
html[data-site-shell="app"] .menu-toggle:hover {
  background: var(--afm-brand-soft) !important;
  color: var(--afm-brand) !important;
  border-color: color-mix(in srgb, var(--afm-brand) 36%, var(--afm-border)) !important;
}

/* ---------- navigation ---------- */
html[data-site-shell="app"] .af-nav,
html[data-site-shell="app"] .app-sidebar,
html[data-site-shell="app"] .sidebar {
  background: linear-gradient(180deg, var(--afm-sidebar), var(--afm-sidebar-2)) !important;
  border-color: rgba(255,255,255,.06) !important;
  box-shadow: 14px 0 44px rgba(0,0,0,.12);
}

html[data-site-shell="app"] .af-nav a,
html[data-site-shell="app"] .main-nav a,
html[data-site-shell="app"] .nav a {
  border: 1px solid transparent !important;
  color: #a9b3c1 !important;
  border-radius: 10px !important;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
html[data-site-shell="app"] .af-nav a:hover,
html[data-site-shell="app"] .main-nav a:hover,
html[data-site-shell="app"] .nav a:hover {
  background: rgba(255,255,255,.045) !important;
  color: #f3f6fa !important;
  transform: translateX(2px);
}
html[data-site-shell="app"] .af-nav a.active,
html[data-site-shell="app"] .main-nav a.active,
html[data-site-shell="app"] .nav a.active {
  background: linear-gradient(90deg, var(--afm-brand-soft), color-mix(in srgb, var(--afm-brand) 5%, transparent)) !important;
  border-color: color-mix(in srgb, var(--afm-brand) 28%, transparent) !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 var(--afm-brand);
}
html[data-site-shell="app"] .af-nav a.active .nav-icon,
html[data-site-shell="app"] .main-nav a.active .nav-icon {
  color: var(--afm-brand) !important;
}

/* ---------- headings ---------- */
html[data-site-shell="app"] .heading-row h1,
html[data-site-shell="app"] .v1-page-heading h1,
html[data-site-shell="app"] .page-heading h1,
html[data-site-shell="app"] .content h1,
html[data-site-shell="app"] .page-content h1 {
  color: var(--afm-text) !important;
  letter-spacing: -.035em;
  font-weight: 720;
}
html[data-site-shell="app"] .heading-row > div > p,
html[data-site-shell="app"] .v1-page-heading p,
html[data-site-shell="app"] .page-heading p,
html[data-site-shell="app"] .content > p {
  color: var(--afm-muted) !important;
}
html[data-site-shell="app"] .dashboard-profile-kicker {
  color: var(--afm-brand) !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------- cards / panels ---------- */
html[data-site-shell="app"] .card,
html[data-site-shell="app"] .kpi,
html[data-site-shell="app"] .v1-panel,
html[data-site-shell="app"] .v1-card,
html[data-site-shell="app"] .v1-kpi,
html[data-site-shell="app"] .settings-card,
html[data-site-shell="app"] .billing-card,
html[data-site-shell="app"] .project-card,
html[data-site-shell="app"] .network-site-card {
  background: linear-gradient(145deg, var(--afm-surface), color-mix(in srgb, var(--afm-surface-2) 94%, var(--afm-brand) 6%)) !important;
  border: 1px solid var(--afm-border) !important;
  border-radius: var(--afm-radius) !important;
  box-shadow: var(--afm-shadow-soft) !important;
  color: var(--afm-text) !important;
}

html[data-site-shell="app"] .card:hover,
html[data-site-shell="app"] .kpi:hover,
html[data-site-shell="app"] .v1-card:hover {
  border-color: color-mix(in srgb, var(--afm-brand) 24%, var(--afm-border)) !important;
}

html[data-site-shell="app"] .kpi {
  position: relative;
  overflow: hidden;
}
html[data-site-shell="app"] .kpi::after {
  content: "";
  position: absolute;
  inset: auto -24px -44px auto;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--afm-brand-faint);
  filter: blur(2px);
  pointer-events: none;
}
html[data-site-shell="app"] .kpi > i,
html[data-site-shell="app"] .title-icon,
html[data-site-shell="app"] .kpi .icon {
  background: var(--afm-brand-soft) !important;
  color: var(--afm-brand) !important;
  border-color: color-mix(in srgb, var(--afm-brand) 22%, transparent) !important;
}
html[data-site-shell="app"] .kpi strong,
html[data-site-shell="app"] .card h2,
html[data-site-shell="app"] .v1-panel h2,
html[data-site-shell="app"] .v1-panel h3 {
  color: var(--afm-text) !important;
}
html[data-site-shell="app"] .kpi small,
html[data-site-shell="app"] .card p,
html[data-site-shell="app"] .card small,
html[data-site-shell="app"] .v1-kpi-note {
  color: var(--afm-muted) !important;
}

/* ---------- tables ---------- */
html[data-site-shell="app"] table {
  color: var(--afm-text) !important;
}
html[data-site-shell="app"] table thead th {
  background: var(--afm-surface-2) !important;
  color: var(--afm-muted) !important;
  border-color: var(--afm-border) !important;
  font-size: 11px;
  letter-spacing: .035em;
  text-transform: uppercase;
}
html[data-site-shell="app"] table tbody td {
  border-color: var(--afm-border) !important;
  color: var(--afm-soft-text) !important;
}
html[data-site-shell="app"] table tbody tr:hover td {
  background: var(--afm-brand-faint) !important;
  color: var(--afm-text) !important;
}

/* ---------- inputs / buttons ---------- */
html[data-site-shell="app"] input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
html[data-site-shell="app"] select,
html[data-site-shell="app"] textarea {
  background: var(--afm-surface-2) !important;
  border-color: var(--afm-border-strong) !important;
  color: var(--afm-text) !important;
  border-radius: var(--afm-control-radius) !important;
  box-shadow: none !important;
}
html[data-site-shell="app"] input:focus,
html[data-site-shell="app"] select:focus,
html[data-site-shell="app"] textarea:focus {
  outline: none !important;
  border-color: color-mix(in srgb, var(--afm-brand) 65%, var(--afm-border)) !important;
  box-shadow: 0 0 0 3px var(--afm-brand-soft) !important;
}

html[data-site-shell="app"] .v1-button,
html[data-site-shell="app"] .btn,
html[data-site-shell="app"] button[type="submit"],
html[data-site-shell="app"] a[class*="action-primary"] {
  border-radius: max(8px, var(--af-site-button-radius, 9px)) !important;
}
html[data-site-shell="app"] .v1-button.primary,
html[data-site-shell="app"] .btn-primary,
html[data-site-shell="app"] button[type="submit"]:not(.logout-button),
html[data-site-shell="app"] a[class*="action-primary"] {
  background: var(--afm-brand) !important;
  border-color: var(--afm-brand) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--afm-brand) 22%, transparent) !important;
}
html[data-site-shell="app"] .v1-button:not(.primary),
html[data-site-shell="app"] .btn-secondary,
html[data-site-shell="app"] a[class*="action-secondary"] {
  background: var(--afm-surface-2) !important;
  border-color: var(--afm-border) !important;
  color: var(--afm-soft-text) !important;
}

/* ---------- dropdowns / popups / modals ---------- */
html[data-site-shell="app"] .profile-dropdown,
html[data-site-shell="app"] .topbar-alert-dropdown,
html[data-site-shell="app"] .search-results,
html[data-site-shell="app"] .af-global-search-results,
html[data-site-shell="app"] .modal-content,
html[data-site-shell="app"] .v1-modal,
html[data-site-shell="app"] .v1-modal-card,
html[data-site-shell="app"] [role="dialog"]:not(.af-map-attribution-panel) {
  background: color-mix(in srgb, var(--afm-surface) 96%, transparent) !important;
  color: var(--afm-text) !important;
  border: 1px solid var(--afm-border-strong) !important;
  box-shadow: var(--afm-shadow) !important;
  backdrop-filter: blur(22px) saturate(130%);
}
html[data-site-shell="app"] .profile-dropdown a,
html[data-site-shell="app"] .profile-dropdown button {
  color: var(--afm-soft-text) !important;
}
html[data-site-shell="app"] .profile-dropdown a:hover,
html[data-site-shell="app"] .profile-dropdown button:hover {
  background: var(--afm-brand-soft) !important;
  color: var(--afm-text) !important;
}

/* ---------- statuses ---------- */
html[data-site-shell="app"] .v1-status,
html[data-site-shell="app"] .badge,
html[data-site-shell="app"] [class*="status-"] {
  border-radius: 999px;
}
html[data-site-shell="app"] .realtime,
html[data-site-shell="app"] .status-ok,
html[data-site-shell="app"] .badge-success {
  color: var(--afm-success) !important;
}
html[data-site-shell="app"] .status-warning,
html[data-site-shell="app"] .badge-warning {
  color: var(--afm-warning) !important;
}
html[data-site-shell="app"] .status-danger,
html[data-site-shell="app"] .badge-danger {
  color: var(--afm-danger) !important;
}

/* ---------- dashboard-specific polish ---------- */
html[data-site-shell="app"] .dashboard-grid {
  gap: clamp(14px, 1.4vw, 22px) !important;
}
html[data-site-shell="app"] .status-bar {
  background: var(--afm-surface-3) !important;
}
html[data-site-shell="app"] .project-focus-meta,
html[data-site-shell="app"] .financial-plan,
html[data-site-shell="app"] .ops-summary,
html[data-site-shell="app"] .workflow-summary,
html[data-site-shell="app"] .sales-summary {
  background: var(--afm-surface-2) !important;
  border-color: var(--afm-border) !important;
}
html[data-site-shell="app"] .events-list li,
html[data-site-shell="app"] .equip-list li,
html[data-site-shell="app"] .dashboard-work-list li {
  border-color: var(--afm-border) !important;
}
html[data-site-shell="app"] .events-list li:hover,
html[data-site-shell="app"] .equip-list li:hover,
html[data-site-shell="app"] .dashboard-work-list li:hover {
  background: var(--afm-brand-faint) !important;
}

/* ---------- base.html pages ---------- */
html[data-site-shell="app"] .app-main {
  background: transparent !important;
}
html[data-site-shell="app"] .page-messages > *,
html[data-site-shell="app"] .page-message {
  border-radius: 10px !important;
  border-color: var(--afm-border) !important;
  background: var(--afm-surface) !important;
  color: var(--afm-text) !important;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  html[data-site-shell="app"] .card,
  html[data-site-shell="app"] .kpi,
  html[data-site-shell="app"] .v1-panel {
    box-shadow: none !important;
  }
}

/* ================= AF MODERN DASHBOARD ================= */
html[data-site-shell="app"] .afm-dashboard{display:grid;gap:18px;max-width:1680px;margin:0 auto;color:var(--afm-text)}
html[data-site-shell="app"] .afm-hero{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;padding:4px 2px 0}
html[data-site-shell="app"] .afm-eyebrow,.afm-panel-kicker{display:block;margin:0 0 7px;color:var(--afm-brand);font-size:10px;font-weight:800;letter-spacing:.13em}
html[data-site-shell="app"] .afm-hero h1{margin:0;color:var(--afm-text)!important;font-size:clamp(27px,2.2vw,38px);line-height:1.08;letter-spacing:-.045em}
html[data-site-shell="app"] .afm-hero p:not(.afm-eyebrow){margin:8px 0 0;color:var(--afm-muted);font-size:13px}
html[data-site-shell="app"] .afm-hero-meta{display:flex;align-items:center;gap:9px;padding:9px 12px;border:1px solid var(--afm-border);border-radius:10px;background:var(--afm-surface);box-shadow:var(--afm-shadow-soft)}
html[data-site-shell="app"] .afm-hero-meta span,.afm-hero-meta small{color:var(--afm-muted);font-size:11px}
html[data-site-shell="app"] .afm-hero-meta strong{font-size:15px}
html[data-site-shell="app"] .afm-hero-meta i{width:7px;height:7px;border-radius:50%;background:var(--afm-success);box-shadow:0 0 0 4px color-mix(in srgb,var(--afm-success) 13%,transparent)}

html[data-site-shell="app"] .afm-scope-empty{padding:13px 15px;border:1px solid color-mix(in srgb,var(--afm-brand) 22%,var(--afm-border));border-radius:12px;background:var(--afm-brand-faint)}
html[data-site-shell="app"] .afm-scope-empty div{display:flex;gap:8px 18px;align-items:center;flex-wrap:wrap}.afm-scope-empty span{color:var(--afm-muted);font-size:12px}

html[data-site-shell="app"] .afm-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
html[data-site-shell="app"] .afm-kpis article{position:relative;min-height:118px;padding:16px 16px 14px 58px;border:1px solid var(--afm-border);border-radius:14px;background:linear-gradient(145deg,var(--afm-surface),var(--afm-surface-2));box-shadow:var(--afm-shadow-soft);overflow:hidden}
html[data-site-shell="app"] .afm-kpis article:after{content:"";position:absolute;width:110px;height:110px;right:-48px;bottom:-55px;border-radius:50%;background:var(--afm-brand-faint)}
html[data-site-shell="app"] .afm-kpis article.is-danger:after{background:color-mix(in srgb,var(--afm-danger) 10%,transparent)}
html[data-site-shell="app"] .afm-kpi-icon{position:absolute;left:15px;top:16px;display:grid;place-items:center;min-width:31px;height:31px;padding:0 5px;border:1px solid color-mix(in srgb,var(--afm-brand) 24%,transparent);border-radius:9px;background:var(--afm-brand-soft);color:var(--afm-brand);font-size:10px;font-weight:900}
html[data-site-shell="app"] .afm-kpis small{display:block;color:var(--afm-muted);font-size:11px;font-weight:650}
html[data-site-shell="app"] .afm-kpis strong{display:block;margin-top:8px;color:var(--afm-text);font-size:25px;line-height:1;font-weight:780;letter-spacing:-.035em}
html[data-site-shell="app"] .afm-kpis em{display:block;margin-top:10px;color:var(--afm-muted);font-size:10px;font-style:normal}

html[data-site-shell="app"] .afm-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(320px,.9fr);gap:14px;align-items:start}
html[data-site-shell="app"] .afm-panel{min-width:0;padding:17px;border:1px solid var(--afm-border);border-radius:14px;background:linear-gradient(145deg,var(--afm-surface),color-mix(in srgb,var(--afm-surface-2) 96%,var(--afm-brand) 4%));box-shadow:var(--afm-shadow-soft)}
html[data-site-shell="app"] .afm-panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:15px}
html[data-site-shell="app"] .afm-panel-head h2{margin:0;color:var(--afm-text)!important;font-size:17px;line-height:1.2;letter-spacing:-.025em}
html[data-site-shell="app"] .afm-panel-head a{flex:0 0 auto;padding:7px 9px;border:1px solid var(--afm-border);border-radius:8px;background:var(--afm-surface-2);color:var(--afm-soft-text)!important;font-size:10px;font-weight:750;text-decoration:none}
html[data-site-shell="app"] .afm-panel-head a:hover{border-color:color-mix(in srgb,var(--afm-brand) 35%,var(--afm-border));background:var(--afm-brand-soft);color:var(--afm-brand)!important}

html[data-site-shell="app"] .afm-project-panel{grid-row:span 2;min-height:330px}
html[data-site-shell="app"] .afm-project-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:19px 0}
html[data-site-shell="app"] .afm-project-stats>div{padding:13px;border:1px solid var(--afm-border);border-radius:10px;background:var(--afm-surface-2)}
html[data-site-shell="app"] .afm-project-stats small,.afm-cost-meta small,.afm-ops-stats small{display:block;color:var(--afm-muted);font-size:10px}
html[data-site-shell="app"] .afm-project-stats strong{display:block;margin-top:5px;font-size:20px;color:var(--afm-text)}
html[data-site-shell="app"] .afm-project-actions{display:flex;gap:8px;flex-wrap:wrap}
html[data-site-shell="app"] .afm-project-actions a{padding:8px 10px;border-radius:8px;background:var(--afm-brand-soft);color:var(--afm-brand)!important;font-size:10px;font-weight:760;text-decoration:none}
html[data-site-shell="app"] .afm-project-track{margin-top:22px;padding:14px;border-top:1px solid var(--afm-border)}
html[data-site-shell="app"] .afm-project-track>div{height:5px;border-radius:999px;background:var(--afm-surface-3);overflow:hidden}
html[data-site-shell="app"] .afm-project-track>div span{display:block;width:var(--afm-progress);height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--afm-brand),color-mix(in srgb,var(--afm-brand) 55%,#7c3aed))}
html[data-site-shell="app"] .afm-project-track small{display:block;margin-top:8px;color:var(--afm-muted);font-size:10px}

html[data-site-shell="app"] .afm-health-row{display:grid;grid-template-columns:104px 1fr;gap:13px;align-items:stretch}
html[data-site-shell="app"] .afm-health-score{display:grid;place-content:center;text-align:center;min-height:100px;border:1px solid var(--afm-border);border-radius:12px;background:var(--afm-surface-2)}
html[data-site-shell="app"] .afm-health-score strong{font-size:25px;color:var(--afm-success)}.afm-health-score small{color:var(--afm-muted);font-size:9px}
html[data-site-shell="app"] .afm-health-bars{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}
html[data-site-shell="app"] .afm-health-bars span{padding:10px;border:1px solid var(--afm-border);border-radius:9px;background:var(--afm-surface-2)}
html[data-site-shell="app"] .afm-health-bars b{display:block;font-size:17px}.afm-health-bars small{font-size:9px;color:var(--afm-muted)}
html[data-site-shell="app"] .afm-health-bars .up b{color:var(--afm-success)}.afm-health-bars .warning b{color:var(--afm-warning)}.afm-health-bars .down b{color:var(--afm-danger)}

html[data-site-shell="app"] .afm-incidents{margin-top:14px;border-top:1px solid var(--afm-border);padding-top:11px}
html[data-site-shell="app"] .afm-subhead{display:flex;justify-content:space-between;margin-bottom:6px}.afm-subhead strong{font-size:11px}.afm-subhead span{color:var(--afm-muted);font-size:9px}
html[data-site-shell="app"] .afm-incident{display:grid;grid-template-columns:7px 1fr auto;gap:9px;align-items:center;padding:8px 2px;border-bottom:1px solid var(--afm-border)}
html[data-site-shell="app"] .afm-incident>i{width:7px;height:7px;border-radius:50%;background:var(--afm-warning)}.afm-incident>i.severity-critical,.afm-incident>i.severity-high,.afm-incident>i.severity-disaster{background:var(--afm-danger)}
html[data-site-shell="app"] .afm-incident span strong{display:block;font-size:10px;color:var(--afm-text)}.afm-incident span small{display:block;margin-top:2px;font-size:9px;color:var(--afm-muted)}
html[data-site-shell="app"] .afm-incident time{font-size:9px;color:var(--afm-muted)}

html[data-site-shell="app"] .afm-cost-value{padding:16px 0 18px}.afm-cost-value strong{display:block;font-size:27px;letter-spacing:-.04em}.afm-cost-value span{color:var(--afm-muted);font-size:10px}
html[data-site-shell="app"] .afm-cost-meta,.afm-ops-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}
html[data-site-shell="app"] .afm-cost-meta>span,.afm-ops-stats>span{padding:10px;border:1px solid var(--afm-border);border-radius:9px;background:var(--afm-surface-2)}
html[data-site-shell="app"] .afm-cost-meta b,.afm-ops-stats strong{display:block;margin-top:4px;font-size:14px;color:var(--afm-text)}
html[data-site-shell="app"] .afm-task-list{margin-top:10px}.afm-task-list>div{display:flex;justify-content:space-between;gap:10px;padding:8px 2px;border-bottom:1px solid var(--afm-border)}.afm-task-list strong{font-size:10px}.afm-task-list small{display:block;color:var(--afm-muted);font-size:9px}.afm-task-list b{font-size:9px;color:var(--afm-brand)}
html[data-site-shell="app"] .afm-unavailable,.afm-module-copy{padding:18px;border:1px dashed var(--afm-border-strong);border-radius:10px;background:var(--afm-surface-2)}.afm-unavailable strong,.afm-module-copy strong{display:block;font-size:12px}.afm-unavailable span,.afm-module-copy p{display:block;margin:5px 0 0;color:var(--afm-muted);font-size:10px;line-height:1.5}.afm-empty{padding:13px;color:var(--afm-muted);font-size:10px;text-align:center}

html[data-site-shell="app"] .afm-integrations{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:9px;border:1px solid var(--afm-border);border-radius:12px;background:color-mix(in srgb,var(--afm-surface) 92%,transparent)}
html[data-site-shell="app"] .afm-integrations>div{display:grid;grid-template-columns:9px auto 1fr;align-items:center;gap:7px;padding:8px 10px;border-radius:8px;background:var(--afm-surface-2);opacity:.52}
html[data-site-shell="app"] .afm-integrations>div:first-child,.afm-integrations>div.active{opacity:1}.afm-integrations span{width:7px;height:7px;border-radius:50%;background:var(--afm-muted)}.afm-integrations>div:first-child span,.afm-integrations>div.active span{background:var(--afm-success);box-shadow:0 0 0 3px color-mix(in srgb,var(--afm-success) 12%,transparent)}.afm-integrations b{font-size:10px}.afm-integrations small{justify-self:end;color:var(--afm-muted);font-size:9px}

@media(max-width:1180px){html[data-site-shell="app"] .afm-kpis{grid-template-columns:repeat(2,1fr)}html[data-site-shell="app"] .afm-layout{grid-template-columns:1fr}html[data-site-shell="app"] .afm-project-panel{grid-row:auto}}
@media(max-width:700px){html[data-site-shell="app"] .afm-kpis{grid-template-columns:1fr}html[data-site-shell="app"] .afm-project-stats{grid-template-columns:repeat(2,1fr)}html[data-site-shell="app"] .afm-hero{align-items:flex-start;flex-direction:column}html[data-site-shell="app"] .afm-integrations{grid-template-columns:1fr 1fr}.afm-health-row{grid-template-columns:1fr!important}}

/* =====================================================================
   AF MODERN · INTERNAL PAGES
   One visual language for the non-map / non-CAD application surfaces.
   ===================================================================== */

/* ---------- common page frame ---------- */
html[data-site-shell="app"] .v1-redesign,
html[data-site-shell="app"] .pw-page,
html[data-site-shell="app"] .main-column,
html[data-site-shell="app"] .help-page {
  color: var(--afm-text);
}

html[data-site-shell="app"] .v1-page-head,
html[data-site-shell="app"] .page-heading,
html[data-site-shell="app"] .pw-hero,
html[data-site-shell="app"] .pw-page-heading {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 2px 2px 16px;
  border-bottom: 1px solid var(--afm-border);
  background: transparent !important;
}

html[data-site-shell="app"] .v1-page-head::after,
html[data-site-shell="app"] .page-heading::after,
html[data-site-shell="app"] .pw-hero::after,
html[data-site-shell="app"] .pw-page-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 1px;
  background: var(--afm-brand);
  box-shadow: 0 0 16px color-mix(in srgb, var(--afm-brand) 38%, transparent);
}

html[data-site-shell="app"] .v1-page-head h1,
html[data-site-shell="app"] .page-heading h1,
html[data-site-shell="app"] .pw-hero h1,
html[data-site-shell="app"] .pw-page-heading h1 {
  margin: 0;
  color: var(--afm-text) !important;
  font-size: clamp(24px, 2vw, 34px) !important;
  line-height: 1.08;
  letter-spacing: -.04em;
}

html[data-site-shell="app"] .v1-page-head p,
html[data-site-shell="app"] .page-heading p,
html[data-site-shell="app"] .pw-hero p,
html[data-site-shell="app"] .pw-page-heading p {
  color: var(--afm-muted) !important;
}

html[data-site-shell="app"] .v1-overline,
html[data-site-shell="app"] .settings-section-eyebrow,
html[data-site-shell="app"] .help-eyebrow,
html[data-site-shell="app"] .pw-eyebrow {
  color: var(--afm-brand) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase;
}

html[data-site-shell="app"] .detail-back-link {
  color: var(--afm-muted) !important;
  text-decoration: none !important;
}
html[data-site-shell="app"] .detail-back-link:hover {
  color: var(--afm-brand) !important;
}

/* ---------- actions ---------- */
html[data-site-shell="app"] .v1-page-actions,
html[data-site-shell="app"] .page-actions,
html[data-site-shell="app"] .pw-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

html[data-site-shell="app"] .v1-button,
html[data-site-shell="app"] .pw-button,
html[data-site-shell="app"] .field-manager-primary {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--afm-border) !important;
  border-radius: 9px !important;
  background: var(--afm-surface-2) !important;
  color: var(--afm-soft-text) !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 720 !important;
  text-decoration: none !important;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}
html[data-site-shell="app"] .v1-button:hover,
html[data-site-shell="app"] .pw-button:hover,
html[data-site-shell="app"] .field-manager-primary:hover {
  border-color: color-mix(in srgb, var(--afm-brand) 36%, var(--afm-border)) !important;
  background: var(--afm-brand-soft) !important;
  color: var(--afm-brand) !important;
  transform: translateY(-1px);
}
html[data-site-shell="app"] .v1-button.primary,
html[data-site-shell="app"] .pw-button:not(.pw-button--ghost),
html[data-site-shell="app"] .field-manager-primary {
  border-color: var(--afm-brand) !important;
  background: var(--afm-brand) !important;
  color: #fff !important;
  box-shadow: 0 7px 20px color-mix(in srgb, var(--afm-brand) 20%, transparent) !important;
}
html[data-site-shell="app"] .v1-button.danger {
  border-color: color-mix(in srgb, var(--afm-danger) 24%, var(--afm-border)) !important;
  background: color-mix(in srgb, var(--afm-danger) 8%, var(--afm-surface-2)) !important;
  color: var(--afm-danger) !important;
}

/* ---------- stats ---------- */
html[data-site-shell="app"] .v1-stat-grid,
html[data-site-shell="app"] .kpi-grid,
html[data-site-shell="app"] .pw-metrics {
  display: grid;
  gap: 10px !important;
}

html[data-site-shell="app"] .v1-stat,
html[data-site-shell="app"] .kpi-grid .kpi,
html[data-site-shell="app"] .pw-metric,
html[data-site-shell="app"] .settings-stat-tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--afm-border) !important;
  border-radius: 12px !important;
  background: linear-gradient(145deg, var(--afm-surface), var(--afm-surface-2)) !important;
  color: var(--afm-text) !important;
  box-shadow: var(--afm-shadow-soft) !important;
}
html[data-site-shell="app"] .v1-stat::after,
html[data-site-shell="app"] .pw-metric::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 80px;
  right: -38px;
  bottom: -42px;
  border-radius: 50%;
  background: var(--afm-brand-faint);
}
html[data-site-shell="app"] .v1-stat strong,
html[data-site-shell="app"] .pw-metric strong,
html[data-site-shell="app"] .settings-stat-tile strong {
  color: var(--afm-text) !important;
}
html[data-site-shell="app"] .v1-stat small,
html[data-site-shell="app"] .pw-metric small,
html[data-site-shell="app"] .settings-stat-tile small {
  color: var(--afm-muted) !important;
}
html[data-site-shell="app"] .v1-stat-icon,
html[data-site-shell="app"] .pw-metric-icon,
html[data-site-shell="app"] .settings-heading-icon-box,
html[data-site-shell="app"] .help-heading-icon-box {
  border: 1px solid color-mix(in srgb, var(--afm-brand) 22%, transparent) !important;
  border-radius: 9px !important;
  background: var(--afm-brand-soft) !important;
  color: var(--afm-brand) !important;
}

/* ---------- panels ---------- */
html[data-site-shell="app"] .v1-panel,
html[data-site-shell="app"] .panel,
html[data-site-shell="app"] .table-panel,
html[data-site-shell="app"] .pw-project-card,
html[data-site-shell="app"] .pw-kanban-column,
html[data-site-shell="app"] .pw-kanban-card {
  border: 1px solid var(--afm-border) !important;
  border-radius: 13px !important;
  background: linear-gradient(145deg, var(--afm-surface), color-mix(in srgb, var(--afm-surface-2) 97%, var(--afm-brand) 3%)) !important;
  color: var(--afm-text) !important;
  box-shadow: var(--afm-shadow-soft) !important;
}

html[data-site-shell="app"] .v1-panel-head,
html[data-site-shell="app"] .panel-title,
html[data-site-shell="app"] .pw-section-heading {
  border-color: var(--afm-border) !important;
}

html[data-site-shell="app"] .v1-panel-head h2,
html[data-site-shell="app"] .v1-panel-head h3,
html[data-site-shell="app"] .panel-title,
html[data-site-shell="app"] .pw-section-heading h2,
html[data-site-shell="app"] .pw-section-heading h3 {
  color: var(--afm-text) !important;
  letter-spacing: -.02em;
}
html[data-site-shell="app"] .v1-panel-head p,
html[data-site-shell="app"] .pw-section-heading p {
  color: var(--afm-muted) !important;
}

html[data-site-shell="app"] .v1-layout {
  gap: 14px !important;
}

/* ---------- toolbar and filters ---------- */
html[data-site-shell="app"] .v1-toolbar,
html[data-site-shell="app"] .filters,
html[data-site-shell="app"] .pw-filters {
  border: 1px solid var(--afm-border) !important;
  border-radius: 10px !important;
  background: var(--afm-surface-2) !important;
  color: var(--afm-text) !important;
  box-shadow: none !important;
}

html[data-site-shell="app"] .v1-toolbar label,
html[data-site-shell="app"] .filters label,
html[data-site-shell="app"] .pw-filters label {
  color: var(--afm-muted) !important;
}

/* ---------- status / pills ---------- */
html[data-site-shell="app"] .v1-status,
html[data-site-shell="app"] .team-role-pill,
html[data-site-shell="app"] .pw-chip,
html[data-site-shell="app"] .pw-health {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--afm-border) !important;
  border-radius: 999px !important;
  background: var(--afm-surface-2) !important;
  color: var(--afm-soft-text) !important;
  font-size: 9px !important;
  font-weight: 760 !important;
}
html[data-site-shell="app"] .v1-status.info {
  border-color: color-mix(in srgb, var(--afm-info) 24%, var(--afm-border)) !important;
  background: color-mix(in srgb, var(--afm-info) 9%, var(--afm-surface-2)) !important;
  color: var(--afm-info) !important;
}
html[data-site-shell="app"] .v1-status.warn {
  border-color: color-mix(in srgb, var(--afm-warning) 24%, var(--afm-border)) !important;
  background: color-mix(in srgb, var(--afm-warning) 9%, var(--afm-surface-2)) !important;
  color: var(--afm-warning) !important;
}
html[data-site-shell="app"] .v1-status.danger {
  border-color: color-mix(in srgb, var(--afm-danger) 24%, var(--afm-border)) !important;
  background: color-mix(in srgb, var(--afm-danger) 9%, var(--afm-surface-2)) !important;
  color: var(--afm-danger) !important;
}

/* ---------- tables ---------- */
html[data-site-shell="app"] .v1-table-wrap,
html[data-site-shell="app"] .table-panel {
  overflow: hidden;
  border: 1px solid var(--afm-border) !important;
  border-radius: 11px !important;
  background: var(--afm-surface) !important;
}

html[data-site-shell="app"] .v1-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
html[data-site-shell="app"] .v1-table thead th {
  height: 39px;
  background: var(--afm-surface-2) !important;
  border-bottom: 1px solid var(--afm-border) !important;
  color: var(--afm-muted) !important;
  font-size: 9px !important;
  letter-spacing: .06em;
  text-transform: uppercase;
}
html[data-site-shell="app"] .v1-table tbody td {
  border-bottom: 1px solid var(--afm-border) !important;
  background: transparent !important;
  color: var(--afm-soft-text) !important;
}
html[data-site-shell="app"] .v1-table tbody tr:last-child td {
  border-bottom: 0 !important;
}
html[data-site-shell="app"] .v1-table tbody tr:hover td {
  background: var(--afm-brand-faint) !important;
}
html[data-site-shell="app"] .v1-pagination,
html[data-site-shell="app"] .pagination {
  color: var(--afm-muted) !important;
}
html[data-site-shell="app"] .v1-pagination a,
html[data-site-shell="app"] .pagination a,
html[data-site-shell="app"] .v1-pagination .current {
  border: 1px solid var(--afm-border) !important;
  background: var(--afm-surface-2) !important;
  color: var(--afm-soft-text) !important;
  border-radius: 7px !important;
}

/* ---------- modals / popups ---------- */
html[data-site-shell="app"] .v1-modal-overlay,
html[data-site-shell="app"] .pw-modal-backdrop {
  background: rgba(3, 6, 10, .70) !important;
  backdrop-filter: blur(7px);
}
html[data-site-shell="app"] .v1-modal,
html[data-site-shell="app"] .pw-modal-card {
  border: 1px solid var(--afm-border-strong) !important;
  border-radius: 15px !important;
  background: linear-gradient(145deg, var(--afm-surface), var(--afm-surface-2)) !important;
  color: var(--afm-text) !important;
  box-shadow: 0 28px 90px rgba(0,0,0,.38) !important;
}
html[data-site-shell="app"] .v1-modal h2,
html[data-site-shell="app"] .v1-modal h3,
html[data-site-shell="app"] .pw-modal-card h2,
html[data-site-shell="app"] .pw-modal-card h3 {
  color: var(--afm-text) !important;
}
html[data-site-shell="app"] .v1-modal p,
html[data-site-shell="app"] .pw-modal-card p {
  color: var(--afm-muted) !important;
}

/* =====================================================================
   EQUIPMENT
   ===================================================================== */
html[data-site-shell="app"] .equipment-workbench {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px) !important;
  align-items: start !important;
}
html[data-site-shell="app"] .equipment-inventory-panel,
html[data-site-shell="app"] .equipment-selection-card,
html[data-site-shell="app"] .equipment-hero-panel {
  border-color: var(--afm-border) !important;
  background: var(--afm-surface) !important;
}
html[data-site-shell="app"] .equipment-list-table tr.is-selected td {
  background: var(--afm-brand-soft) !important;
}
html[data-site-shell="app"] .equipment-list-table tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--afm-brand);
}
html[data-site-shell="app"] .equipment-list-photo,
html[data-site-shell="app"] .equipment-hero-media,
html[data-site-shell="app"] .equipment-visual {
  border: 1px solid var(--afm-border) !important;
  border-radius: 11px !important;
  background: var(--afm-surface-2) !important;
  overflow: hidden;
}
html[data-site-shell="app"] .equipment-row-actions {
  gap: 6px !important;
}
html[data-site-shell="app"] .equipment-quick-grid > *,
html[data-site-shell="app"] .equipment-info-grid > *,
html[data-site-shell="app"] .v1-detail-row {
  border-color: var(--afm-border) !important;
  background: var(--afm-surface-2) !important;
  color: var(--afm-soft-text) !important;
}
html[data-site-shell="app"] .cto-splitter-row {
  border-color: var(--afm-border) !important;
  background: var(--afm-surface-2) !important;
}

/* =====================================================================
   QUANTITIES + BOM / COSTS
   ===================================================================== */
html[data-site-shell="app"] .charts-grid {
  gap: 12px !important;
}
html[data-site-shell="app"] .donut-panel,
html[data-site-shell="app"] .bars-panel,
html[data-site-shell="app"] .project-summary {
  border-color: var(--afm-border) !important;
  background: var(--afm-surface) !important;
}
html[data-site-shell="app"] .tabs,
html[data-site-shell="app"] .v1-tabs,
html[data-site-shell="app"] .pw-tabs {
  border: 1px solid var(--afm-border) !important;
  border-radius: 9px !important;
  background: var(--afm-surface-2) !important;
  padding: 3px !important;
}
html[data-site-shell="app"] .tabs button,
html[data-site-shell="app"] .v1-tabs button,
html[data-site-shell="app"] .pw-tabs a {
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: var(--afm-muted) !important;
}
html[data-site-shell="app"] .tabs .active,
html[data-site-shell="app"] .v1-tabs .active,
html[data-site-shell="app"] .pw-tabs .is-active {
  background: var(--afm-brand-soft) !important;
  color: var(--afm-brand) !important;
}
html[data-site-shell="app"] .bar-chart > *,
html[data-site-shell="app"] .donut {
  filter: saturate(.86);
}
html[data-site-shell="app"] .bom-project-context {
  position: relative;
  overflow: hidden;
}
html[data-site-shell="app"] .bom-project-context::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -110px;
  top: -130px;
  border-radius: 50%;
  background: var(--afm-brand-faint);
  pointer-events: none;
}
html[data-site-shell="app"] .bom-project-scope-stats > *,
html[data-site-shell="app"] .bom-price-guide,
html[data-site-shell="app"] .bom-price-footer {
  border-color: var(--afm-border) !important;
  background: var(--afm-surface-2) !important;
}

/* =====================================================================
   FINANCE
   ===================================================================== */
html[data-site-shell="app"] .finance-redesign .v1-stat-grid {
  grid-template-columns: repeat(5, minmax(0,1fr)) !important;
}
html[data-site-shell="app"] .finance-invoice-row:hover td {
  background: var(--afm-brand-faint) !important;
}
html[data-site-shell="app"] .v1-usage-row {
  border-color: var(--afm-border) !important;
}
html[data-site-shell="app"] .v1-usage-bar {
  background: var(--afm-surface-3) !important;
  border-radius: 999px !important;
  overflow: hidden;
}
html[data-site-shell="app"] .v1-usage-bar > * {
  background: var(--afm-brand) !important;
}
html[data-site-shell="app"] .v1-cost-summary {
  border-color: var(--afm-border) !important;
  background: var(--afm-surface-2) !important;
}

/* =====================================================================
   SETTINGS
   ===================================================================== */
html[data-site-shell="app"] .settings-section-layout {
  grid-template-columns: 250px minmax(0,1fr) !important;
  gap: 14px !important;
  align-items: start;
}
html[data-site-shell="app"] .v1-settings-nav {
  position: sticky;
  top: calc(var(--af-site-topbar-height, 70px) + 16px);
  padding: 8px !important;
  border-radius: 12px !important;
}
html[data-site-shell="app"] .v1-settings-nav a {
  min-height: 40px;
  margin: 2px 0;
  padding: 8px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  color: var(--afm-muted) !important;
  text-decoration: none !important;
}
html[data-site-shell="app"] .v1-settings-nav a:hover {
  background: var(--afm-surface-2) !important;
  color: var(--afm-text) !important;
}
html[data-site-shell="app"] .v1-settings-nav a.active {
  border-color: color-mix(in srgb,var(--afm-brand) 22%,transparent) !important;
  background: var(--afm-brand-soft) !important;
  color: var(--afm-brand) !important;
}
html[data-site-shell="app"] .settings-nav-icon {
  color: currentColor !important;
}
html[data-site-shell="app"] .settings-company-id,
html[data-site-shell="app"] .settings-info-card,
html[data-site-shell="app"] .settings-shortcut,
html[data-site-shell="app"] .settings-theme-compact,
html[data-site-shell="app"] .settings-toggle-field {
  border-color: var(--afm-border) !important;
  background: var(--afm-surface-2) !important;
}
html[data-site-shell="app"] .settings-shortcut:hover {
  border-color: color-mix(in srgb,var(--afm-brand) 28%,var(--afm-border)) !important;
  background: var(--afm-brand-faint) !important;
}
html[data-site-shell="app"] .settings-company-logo,
html[data-site-shell="app"] .settings-app-brand-logo {
  border-color: var(--afm-border) !important;
  background: var(--afm-surface-3) !important;
}

/* =====================================================================
   USERS / TEAM
   ===================================================================== */
html[data-site-shell="app"] .team-member-list {
  display: grid;
  gap: 7px;
}
html[data-site-shell="app"] .team-member-row {
  border: 1px solid var(--afm-border) !important;
  border-radius: 10px !important;
  background: var(--afm-surface-2) !important;
  transition: border-color .16s ease, background .16s ease;
}
html[data-site-shell="app"] .team-member-row:hover {
  border-color: color-mix(in srgb,var(--afm-brand) 28%,var(--afm-border)) !important;
  background: var(--afm-brand-faint) !important;
}
html[data-site-shell="app"] .team-avatar {
  border: 1px solid color-mix(in srgb,var(--afm-brand) 20%,var(--afm-border)) !important;
  background: var(--afm-brand-soft) !important;
  color: var(--afm-brand) !important;
}
html[data-site-shell="app"] .team-modal-card-section,
html[data-site-shell="app"] .team-form-grid > label {
  border-color: var(--afm-border) !important;
}
html[data-site-shell="app"] .team-section-index {
  background: var(--afm-brand-soft) !important;
  color: var(--afm-brand) !important;
}

/* =====================================================================
   HELP / WIKI
   ===================================================================== */
html[data-site-shell="app"] .help-layout {
  grid-template-columns: 250px minmax(0,1fr) !important;
  gap: 14px !important;
  align-items: start;
}
html[data-site-shell="app"] .help-nav {
  position: sticky;
  top: calc(var(--af-site-topbar-height,70px) + 16px);
  padding: 8px !important;
}
html[data-site-shell="app"] .help-nav a {
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  color: var(--afm-muted) !important;
}
html[data-site-shell="app"] .help-nav a:hover {
  background: var(--afm-surface-2) !important;
  color: var(--afm-text) !important;
}
html[data-site-shell="app"] .help-nav a.active {
  border-color: color-mix(in srgb,var(--afm-brand) 22%,transparent) !important;
  background: var(--afm-brand-soft) !important;
  color: var(--afm-brand) !important;
}
html[data-site-shell="app"] .help-article {
  padding: clamp(18px,2.2vw,30px) !important;
}
html[data-site-shell="app"] .help-lead,
html[data-site-shell="app"] .help-list,
html[data-site-shell="app"] .help-steps {
  color: var(--afm-soft-text) !important;
}
html[data-site-shell="app"] .help-note {
  border-color: color-mix(in srgb,var(--afm-info) 22%,var(--afm-border)) !important;
  border-radius: 10px !important;
  background: color-mix(in srgb,var(--afm-info) 6%,var(--afm-surface-2)) !important;
  color: var(--afm-soft-text) !important;
}
html[data-site-shell="app"] .help-figure {
  border: 1px solid var(--afm-border) !important;
  border-radius: 12px !important;
  background: var(--afm-surface-2) !important;
  overflow: hidden;
}
html[data-site-shell="app"] .help-figure img {
  display: block;
  width: 100%;
}

/* =====================================================================
   PROFILE
   ===================================================================== */
html[data-site-shell="app"] .profile-page {
  max-width: 1080px;
  margin-inline: auto;
}
html[data-site-shell="app"] .profile-editor-card {
  overflow: hidden;
}
html[data-site-shell="app"] .profile-editor-body {
  display: grid;
  grid-template-columns: minmax(180px,260px) minmax(0,1fr);
  gap: 28px !important;
  align-items: start;
}
html[data-site-shell="app"] .profile-preview-wrap {
  border-right: 1px solid var(--afm-border);
  padding-right: 28px;
}
html[data-site-shell="app"] .profile-preview-avatar {
  border: 1px solid color-mix(in srgb,var(--afm-brand) 24%,var(--afm-border)) !important;
  background: var(--afm-brand-soft) !important;
  box-shadow: 0 14px 34px color-mix(in srgb,var(--afm-brand) 12%,transparent);
}
html[data-site-shell="app"] .profile-file-row,
html[data-site-shell="app"] .profile-remove-option {
  border-color: var(--afm-border) !important;
  background: var(--afm-surface-2) !important;
}

/* =====================================================================
   PROJECT MANAGEMENT / WORKFLOW
   ===================================================================== */
html[data-site-shell="app"] .pw-page {
  --pw-bg: transparent;
  --pw-surface: var(--afm-surface);
  --pw-border: var(--afm-border);
  --pw-text: var(--afm-text);
  --pw-muted: var(--afm-muted);
  max-width: 1680px;
  margin: 0 auto;
}
html[data-site-shell="app"] .pw-hero {
  border-radius: 0 !important;
  box-shadow: none !important;
}
html[data-site-shell="app"] .pw-project-grid {
  gap: 11px !important;
}
html[data-site-shell="app"] .pw-project-card,
html[data-site-shell="app"] .pw-kanban-card {
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
html[data-site-shell="app"] .pw-project-card:hover,
html[data-site-shell="app"] .pw-kanban-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb,var(--afm-brand) 25%,var(--afm-border)) !important;
  box-shadow: var(--afm-shadow) !important;
}
html[data-site-shell="app"] .pw-card-description,
html[data-site-shell="app"] .pw-card-meta,
html[data-site-shell="app"] .pw-card-footer {
  color: var(--afm-muted) !important;
  border-color: var(--afm-border) !important;
}
html[data-site-shell="app"] .pw-progress {
  background: var(--afm-surface-3) !important;
}
html[data-site-shell="app"] .pw-progress > * {
  background: var(--afm-brand) !important;
}
html[data-site-shell="app"] .pw-kanban {
  gap: 10px !important;
}
html[data-site-shell="app"] .pw-kanban-column {
  padding: 10px !important;
  background: color-mix(in srgb,var(--afm-surface-2) 96%,var(--afm-brand) 4%) !important;
}
html[data-site-shell="app"] .pw-column-heading {
  color: var(--afm-text) !important;
}
html[data-site-shell="app"] .pw-column-count {
  border-color: var(--afm-border) !important;
  background: var(--afm-surface-3) !important;
  color: var(--afm-muted) !important;
}

/* =====================================================================
   RESPONSIVE INTERNAL PAGES
   ===================================================================== */
@media (max-width: 1180px) {
  html[data-site-shell="app"] .finance-redesign .v1-stat-grid {
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  }
  html[data-site-shell="app"] .equipment-workbench {
    grid-template-columns: 1fr !important;
  }
  html[data-site-shell="app"] .settings-section-layout,
  html[data-site-shell="app"] .help-layout {
    grid-template-columns: 220px minmax(0,1fr) !important;
  }
}

@media (max-width: 820px) {
  html[data-site-shell="app"] .v1-page-head,
  html[data-site-shell="app"] .page-heading,
  html[data-site-shell="app"] .pw-hero,
  html[data-site-shell="app"] .pw-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  html[data-site-shell="app"] .settings-section-layout,
  html[data-site-shell="app"] .help-layout {
    grid-template-columns: 1fr !important;
  }
  html[data-site-shell="app"] .v1-settings-nav,
  html[data-site-shell="app"] .help-nav {
    position: static !important;
  }
  html[data-site-shell="app"] .profile-editor-body {
    grid-template-columns: 1fr;
  }
  html[data-site-shell="app"] .profile-preview-wrap {
    border-right: 0;
    border-bottom: 1px solid var(--afm-border);
    padding-right: 0;
    padding-bottom: 22px;
  }
  html[data-site-shell="app"] .finance-redesign .v1-stat-grid {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
}

@media (max-width: 560px) {
  html[data-site-shell="app"] .finance-redesign .v1-stat-grid,
  html[data-site-shell="app"] .v1-stat-grid,
  html[data-site-shell="app"] .kpi-grid,
  html[data-site-shell="app"] .pw-metrics {
    grid-template-columns: 1fr !important;
  }
}

/* =====================================================================
   AF MODERN V3 · REDESIGN GERAL 2026
   Neutral application chrome. Company color is accent only.
   Mapa/CAD do not use data-site-shell="app", so they stay untouched.
   ===================================================================== */

html[data-site-shell="app"][data-theme="dark"] {
  --afm-bg: #0b0d10;
  --afm-bg-2: #0e1014;
  --afm-surface: #14171c;
  --afm-surface-2: #181c22;
  --afm-surface-3: #1d2229;
  --afm-sidebar: #0d0f12;
  --afm-sidebar-2: #101216;
  --afm-text: #f5f7fa;
  --afm-muted: #8b939f;
  --afm-soft-text: #c5cbd3;
  --afm-border: #262b33;
  --afm-border-strong: #323843;
  --afm-shadow: 0 18px 48px rgba(0,0,0,.30);
  --afm-shadow-soft: 0 7px 22px rgba(0,0,0,.16);

  /* Neutralize legacy shell tokens that used the old navy palette. */
  --v1-bg: var(--afm-bg);
  --v1-surface: var(--afm-surface);
  --v1-surface-soft: var(--afm-surface-2);
  --v1-line: var(--afm-border);
  --v1-text: var(--afm-text);
  --v1-muted: var(--afm-muted);
  --map-bg: var(--afm-bg);
  --map-panel: var(--afm-surface);
  --map-panel-2: var(--afm-surface-2);
  --map-line: var(--afm-border);
  --map-ink: var(--afm-text);
  --map-muted: var(--afm-muted);
}

html[data-site-shell="app"][data-theme="light"] {
  --afm-bg: #f3f4f6;
  --afm-bg-2: #eef0f3;
  --afm-surface: #ffffff;
  --afm-surface-2: #f8f9fb;
  --afm-surface-3: #f0f2f5;
  --afm-sidebar: #121419;
  --afm-sidebar-2: #0e1014;
  --afm-text: #171a20;
  --afm-muted: #707784;
  --afm-soft-text: #4d5561;
  --afm-border: #e0e3e8;
  --afm-border-strong: #d2d6dd;
  --afm-shadow: 0 18px 48px rgba(20,24,32,.08);
  --afm-shadow-soft: 0 6px 20px rgba(20,24,32,.05);

  --v1-bg: var(--afm-bg);
  --v1-surface: var(--afm-surface);
  --v1-surface-soft: var(--afm-surface-2);
  --v1-line: var(--afm-border);
  --v1-text: var(--afm-text);
  --v1-muted: var(--afm-muted);
  --map-bg: var(--afm-bg);
  --map-panel: var(--afm-surface);
  --map-panel-2: var(--afm-surface-2);
  --map-line: var(--afm-border);
  --map-ink: var(--afm-text);
  --map-muted: var(--afm-muted);
}

/* ----- kill the old blue shell ----- */
html[data-site-shell="app"],
html[data-site-shell="app"] body {
  background: var(--afm-bg) !important;
  color: var(--afm-text) !important;
}
html[data-site-shell="app"] body::before {
  display: none !important;
  content: none !important;
}
html[data-site-shell="app"] .af-workspace.app-shell {
  background: var(--afm-bg) !important;
}
html[data-site-shell="app"] .af-workspace.app-shell .af-body {
  background: var(--afm-bg) !important;
}
html[data-site-shell="app"] .af-workspace.app-shell .af-page-stage,
html[data-site-shell="app"] .af-workspace.app-shell .af-page-stage.content,
html[data-site-shell="app"] .app-shell > .workspace > .content,
html[data-site-shell="app"] .content {
  background: var(--afm-bg) !important;
  background-image: none !important;
}
html[data-site-shell="app"] .af-workspace.app-shell .af-shell-footer,
html[data-site-shell="app"] .af-nav-foot,
html[data-site-shell="app"] .sidebar-footer {
  background: var(--afm-sidebar) !important;
  border-color: var(--afm-border) !important;
  color: var(--afm-muted) !important;
}

/* ----- topbar: quieter, product-like ----- */
html[data-site-shell="app"] .af-workspace.app-shell .af-topbar,
html[data-site-shell="app"] .af-topbar,
html[data-site-shell="app"] .topbar {
  height: 66px !important;
  min-height: 66px !important;
  padding: 0 16px 0 18px !important;
  background: color-mix(in srgb, var(--afm-surface) 97%, transparent) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--afm-border) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px);
}
html[data-site-shell="app"] .topbar-brand-fixed {
  width: 150px !important;
  min-width: 150px !important;
  padding-right: 16px !important;
}
html[data-site-shell="app"] .topbar-brand-fixed img {
  max-width: 132px !important;
  max-height: 42px !important;
}
html[data-site-shell="app"] .af-main-project-picker {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html[data-site-shell="app"] .af-main-project-selectors {
  gap: 4px !important;
  padding: 4px !important;
  border: 1px solid var(--afm-border) !important;
  border-radius: 10px !important;
  background: var(--afm-surface-2) !important;
  box-shadow: none !important;
}
html[data-site-shell="app"] .tenant-picker-copy {
  border-right: 1px solid var(--afm-border) !important;
}
html[data-site-shell="app"] .tenant-picker-copy:last-child {
  border-right: 0 !important;
}
html[data-site-shell="app"] .tenant-picker-copy small {
  color: var(--afm-muted) !important;
  font-size: 8px !important;
  font-weight: 780 !important;
  letter-spacing: .07em !important;
}
html[data-site-shell="app"] .af-main-project-selectors select,
html[data-site-shell="app"] .af-project select,
html[data-site-shell="app"] .tenant-picker-copy select {
  background: transparent !important;
  border: 0 !important;
  color: var(--afm-soft-text) !important;
  box-shadow: none !important;
  font-size: 10px !important;
}
html[data-site-shell="app"] .af-platform-search {
  height: 38px !important;
  border: 1px solid var(--afm-border) !important;
  border-radius: 10px !important;
  background: var(--afm-surface-2) !important;
  box-shadow: none !important;
}
html[data-site-shell="app"] .af-platform-search:focus-within {
  border-color: color-mix(in srgb,var(--afm-brand) 42%,var(--afm-border)) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb,var(--afm-brand) 8%,transparent) !important;
}
html[data-site-shell="app"] .af-icon-button {
  border: 1px solid var(--afm-border) !important;
  background: var(--afm-surface-2) !important;
  color: var(--afm-muted) !important;
  box-shadow: none !important;
}
html[data-site-shell="app"] .profile {
  min-height: 40px !important;
  padding: 4px 6px 4px 8px !important;
  border: 1px solid var(--afm-border) !important;
  border-radius: 10px !important;
  background: var(--afm-surface-2) !important;
}
html[data-site-shell="app"] .profile .avatar {
  background: var(--afm-brand) !important;
  box-shadow: none !important;
}
html[data-site-shell="app"] .profile strong {
  color: var(--afm-text) !important;
}
html[data-site-shell="app"] .profile small {
  color: var(--afm-muted) !important;
}

/* ----- sidebar: neutral, narrow, accent only on selected item ----- */
html[data-site-shell="app"] .af-workspace.app-shell .af-body {
  grid-template-columns: 220px minmax(0,1fr) !important;
}
html[data-site-shell="app"] .af-workspace.app-shell .af-nav,
html[data-site-shell="app"] .af-nav,
html[data-site-shell="app"] .sidebar {
  width: auto !important;
  background: linear-gradient(180deg,var(--afm-sidebar),var(--afm-sidebar-2)) !important;
  border-right: 1px solid var(--afm-border) !important;
  box-shadow: none !important;
}
html[data-site-shell="app"] .v1-global-nav {
  padding: 10px 9px !important;
}
html[data-site-shell="app"] .v1-global-nav > a,
html[data-site-shell="app"] .af-nav a,
html[data-site-shell="app"] .nav a {
  position: relative;
  min-height: 40px !important;
  margin: 2px 0 !important;
  padding: 0 11px !important;
  gap: 10px !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #a9b0ba !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 620 !important;
}
html[data-site-shell="app"] .v1-global-nav > a:hover,
html[data-site-shell="app"] .af-nav a:hover,
html[data-site-shell="app"] .nav a:hover {
  background: rgba(255,255,255,.035) !important;
  color: #eef1f5 !important;
}
html[data-site-shell="app"] .v1-global-nav > a.is-active,
html[data-site-shell="app"] .v1-global-nav > a.active,
html[data-site-shell="app"] .af-nav a.is-active,
html[data-site-shell="app"] .af-nav a.active,
html[data-site-shell="app"] .nav a.is-active,
html[data-site-shell="app"] .nav a.active {
  border-color: color-mix(in srgb,var(--afm-brand) 22%,var(--afm-border)) !important;
  background: color-mix(in srgb,var(--afm-brand) 9%,#171a1f) !important;
  color: #fff !important;
  box-shadow: inset 2px 0 0 var(--afm-brand) !important;
}
html[data-site-shell="app"] .v1-global-nav > a.is-active::before,
html[data-site-shell="app"] .v1-global-nav > a.active::before {
  display: none !important;
}
html[data-site-shell="app"] .v1-nav-icon,
html[data-site-shell="app"] .nav-icon {
  color: #828b98 !important;
}
html[data-site-shell="app"] .v1-global-nav > a.is-active .v1-nav-icon,
html[data-site-shell="app"] .v1-global-nav > a.active .v1-nav-icon {
  color: var(--afm-brand) !important;
}
html[data-site-shell="app"] .af-workspace.app-shell .af-shell-collapse {
  left: 220px !important;
  width: 30px !important;
  height: 30px !important;
  top: 15px !important;
  border: 1px solid var(--afm-border-strong) !important;
  background: var(--afm-surface-2) !important;
  color: var(--afm-muted) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.24) !important;
}
html[data-site-shell="app"] .af-workspace.app-shell .af-shell-collapse:hover {
  border-color: var(--afm-brand) !important;
  color: var(--afm-brand) !important;
}

/* ----- content frame ----- */
html[data-site-shell="app"] .af-workspace.app-shell .af-page-stage.content {
  padding: 28px clamp(22px,2.6vw,44px) 46px !important;
}
html[data-site-shell="app"] .afm3-dashboard {
  max-width: 1520px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}
html[data-site-shell="app"] .afm3-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 2px 4px;
}
html[data-site-shell="app"] .afm3-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--afm-brand);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .13em;
}
html[data-site-shell="app"] .afm3-title h1 {
  margin: 0;
  color: var(--afm-text) !important;
  font-size: clamp(28px,2.1vw,36px);
  line-height: 1.05;
  letter-spacing: -.045em;
}
html[data-site-shell="app"] .afm3-title p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--afm-muted);
  font-size: 12px;
}
html[data-site-shell="app"] .afm3-now {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--afm-border);
  border-radius: 9px;
  background: var(--afm-surface);
}
html[data-site-shell="app"] .afm3-now span,
html[data-site-shell="app"] .afm3-now small {
  color: var(--afm-muted);
  font-size: 9px;
}
html[data-site-shell="app"] .afm3-now strong {
  color: var(--afm-text);
  font-size: 13px;
}
html[data-site-shell="app"] .afm3-now i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--afm-success);
  box-shadow: 0 0 0 4px color-mix(in srgb,var(--afm-success) 10%,transparent);
}

html[data-site-shell="app"] .afm3-context-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px dashed color-mix(in srgb,var(--afm-brand) 26%,var(--afm-border));
  border-radius: 11px;
  background: color-mix(in srgb,var(--afm-brand) 4%,var(--afm-surface));
}
html[data-site-shell="app"] .afm3-context-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  border-radius: 8px;
  background: var(--afm-brand-soft);
  color: var(--afm-brand);
}
html[data-site-shell="app"] .afm3-context-icon svg {
  width: 17px;
  stroke: currentColor;
  stroke-width: 1.7;
}
html[data-site-shell="app"] .afm3-context-callout strong {
  display: block;
  color: var(--afm-text);
  font-size: 11px;
}
html[data-site-shell="app"] .afm3-context-callout span {
  display: block;
  margin-top: 2px;
  color: var(--afm-muted);
  font-size: 10px;
}

/* ----- KPI row ----- */
html[data-site-shell="app"] .afm3-kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 10px;
}
html[data-site-shell="app"] .afm3-kpi {
  position: relative;
  min-height: 105px;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid var(--afm-border);
  border-radius: 12px;
  background: var(--afm-surface);
  box-shadow: none;
}
html[data-site-shell="app"] .afm3-kpi-mark {
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  background: linear-gradient(90deg,var(--afm-brand),transparent 74%);
  opacity: .72;
}
html[data-site-shell="app"] .afm3-kpi-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb,var(--afm-brand) 20%,var(--afm-border));
  border-radius: 9px;
  background: color-mix(in srgb,var(--afm-brand) 7%,var(--afm-surface-2));
  color: var(--afm-brand);
}
html[data-site-shell="app"] .afm3-kpi-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html[data-site-shell="app"] .afm3-kpi small {
  display: block;
  color: var(--afm-muted);
  font-size: 9px;
  font-weight: 650;
}
html[data-site-shell="app"] .afm3-kpi strong {
  display: block;
  margin-top: 5px;
  color: var(--afm-text);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.035em;
}
html[data-site-shell="app"] .afm3-kpi strong.afm3-money {
  font-size: 17px;
}
html[data-site-shell="app"] .afm3-kpi em {
  display: block;
  margin-top: 7px;
  color: var(--afm-muted);
  font-size: 9px;
  font-style: normal;
}
html[data-site-shell="app"] .afm3-kpi.is-alert .afm3-kpi-mark {
  background: linear-gradient(90deg,var(--afm-danger),transparent 74%);
}
html[data-site-shell="app"] .afm3-kpi.is-alert .afm3-kpi-icon {
  border-color: color-mix(in srgb,var(--afm-danger) 24%,var(--afm-border));
  background: color-mix(in srgb,var(--afm-danger) 7%,var(--afm-surface-2));
  color: var(--afm-danger);
}

/* ----- main grid ----- */
html[data-site-shell="app"] .afm3-grid {
  display: grid;
  grid-template-columns: repeat(12,minmax(0,1fr));
  gap: 12px;
  align-items: start;
}
html[data-site-shell="app"] .afm3-card {
  min-width: 0;
  border: 1px solid var(--afm-border);
  border-radius: 13px;
  background: var(--afm-surface);
  box-shadow: none;
}
html[data-site-shell="app"] .afm3-project-card {
  grid-column: span 8;
  min-height: 328px;
  padding: 19px;
}
html[data-site-shell="app"] .afm3-network-card {
  grid-column: span 4;
  min-height: 328px;
  padding: 19px;
}
html[data-site-shell="app"] .afm3-mini-card {
  grid-column: span 4;
  min-height: 190px;
  padding: 17px;
}
html[data-site-shell="app"] .afm3-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
html[data-site-shell="app"] .afm3-card-head.compact {
  align-items: center;
}
html[data-site-shell="app"] .afm3-card-head h2 {
  margin: 0;
  color: var(--afm-text) !important;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -.025em;
}
html[data-site-shell="app"] .afm3-card-head p {
  margin: 5px 0 0;
  color: var(--afm-muted);
  font-size: 9px;
}
html[data-site-shell="app"] .afm3-link-button {
  min-height: 33px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb,var(--afm-brand) 28%,var(--afm-border));
  border-radius: 8px;
  background: var(--afm-brand-soft);
  color: var(--afm-brand) !important;
  font-size: 9px;
  font-weight: 780;
  text-decoration: none;
}
html[data-site-shell="app"] .afm3-text-link {
  color: var(--afm-muted) !important;
  font-size: 9px;
  font-weight: 720;
  text-decoration: none;
}
html[data-site-shell="app"] .afm3-text-link:hover {
  color: var(--afm-brand) !important;
}

/* ----- current project hero ----- */
html[data-site-shell="app"] .afm3-project-body {
  display: grid;
  grid-template-columns: 205px minmax(0,1fr);
  gap: 22px;
  align-items: center;
  min-height: 235px;
  margin-top: 17px;
  padding-top: 17px;
  border-top: 1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm3-project-visual {
  min-height: 206px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  border-radius: 11px;
  background:
    radial-gradient(circle at 50% 45%, color-mix(in srgb,var(--afm-brand) 8%,transparent), transparent 55%),
    var(--afm-surface-2);
}
html[data-site-shell="app"] .afm3-project-orbit {
  position: relative;
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
}
html[data-site-shell="app"] .afm3-project-orbit::before,
html[data-site-shell="app"] .afm3-project-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb,var(--afm-brand) 22%,var(--afm-border));
}
html[data-site-shell="app"] .afm3-project-orbit::before { inset: 4px; }
html[data-site-shell="app"] .afm3-project-orbit::after { inset: 20px; opacity: .65; }
html[data-site-shell="app"] .afm3-project-orbit > span {
  position: absolute;
  z-index: 2;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--afm-brand);
  box-shadow: 0 0 0 4px color-mix(in srgb,var(--afm-brand) 10%,transparent);
}
html[data-site-shell="app"] .afm3-project-orbit > span:nth-child(1) { top: 4px; left: 59px; }
html[data-site-shell="app"] .afm3-project-orbit > span:nth-child(2) { right: 12px; bottom: 25px; }
html[data-site-shell="app"] .afm3-project-orbit > span:nth-child(3) { left: 13px; bottom: 25px; }
html[data-site-shell="app"] .afm3-project-orbit > div {
  position: relative;
  z-index: 3;
  text-align: center;
}
html[data-site-shell="app"] .afm3-project-orbit strong {
  display: block;
  color: var(--afm-text);
  font-size: 25px;
}
html[data-site-shell="app"] .afm3-project-orbit small {
  color: var(--afm-muted);
  font-size: 8px;
}
html[data-site-shell="app"] .afm3-project-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--afm-muted);
  font-size: 8px;
}
html[data-site-shell="app"] .afm3-project-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--afm-success);
}
html[data-site-shell="app"] .afm3-project-details {
  display: grid;
  gap: 18px;
}
html[data-site-shell="app"] .afm3-stat-row {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
}
html[data-site-shell="app"] .afm3-stat-row > div {
  padding: 13px;
  border: 1px solid var(--afm-border);
  border-radius: 9px;
  background: var(--afm-surface-2);
}
html[data-site-shell="app"] .afm3-stat-row span,
html[data-site-shell="app"] .afm3-mini-stats span {
  display: block;
  color: var(--afm-muted);
  font-size: 8px;
}
html[data-site-shell="app"] .afm3-stat-row strong {
  display: block;
  margin-top: 5px;
  color: var(--afm-text);
  font-size: 20px;
}
html[data-site-shell="app"] .afm3-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--afm-muted);
  font-size: 8px;
}
html[data-site-shell="app"] .afm3-progress-label b {
  color: var(--afm-soft-text);
  font-size: 8px;
  font-weight: 700;
}
html[data-site-shell="app"] .afm3-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--afm-surface-3);
}
html[data-site-shell="app"] .afm3-progress-track i {
  display: block;
  width: var(--afm3-progress);
  height: 100%;
  border-radius: inherit;
  background: var(--afm-brand);
}
html[data-site-shell="app"] .afm3-quick-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
html[data-site-shell="app"] .afm3-quick-actions a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--afm-border);
  border-radius: 8px;
  background: var(--afm-surface-2);
  color: var(--afm-soft-text) !important;
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}
html[data-site-shell="app"] .afm3-quick-actions a:hover {
  border-color: color-mix(in srgb,var(--afm-brand) 30%,var(--afm-border));
  color: var(--afm-brand) !important;
}

/* ----- network health ----- */
html[data-site-shell="app"] .afm3-health {
  display: grid;
  grid-template-columns: 115px minmax(0,1fr);
  gap: 10px;
  margin-top: 15px;
}
html[data-site-shell="app"] .afm3-health-main {
  min-height: 106px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 10px;
  background: var(--afm-surface-2);
}
html[data-site-shell="app"] .afm3-health-main strong {
  color: var(--afm-success);
  font-size: 24px;
  letter-spacing: -.04em;
}
html[data-site-shell="app"] .afm3-health-main span {
  margin-top: 2px;
  color: var(--afm-muted);
  font-size: 8px;
}
html[data-site-shell="app"] .afm3-health-list {
  display: grid;
  gap: 5px;
}
html[data-site-shell="app"] .afm3-health-list > div {
  display: grid;
  grid-template-columns: 7px 1fr auto;
  align-items: center;
  gap: 7px;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--afm-surface-2);
}
html[data-site-shell="app"] .afm3-health-list i,
html[data-site-shell="app"] .afm3-empty-line i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--afm-muted);
}
html[data-site-shell="app"] .afm3-health-list i.ok,
html[data-site-shell="app"] .afm3-empty-line i.ok { background: var(--afm-success); }
html[data-site-shell="app"] .afm3-health-list i.warn { background: var(--afm-warning); }
html[data-site-shell="app"] .afm3-health-list i.down { background: var(--afm-danger); }
html[data-site-shell="app"] .afm3-health-list span {
  color: var(--afm-muted);
  font-size: 8px;
}
html[data-site-shell="app"] .afm3-health-list b {
  color: var(--afm-text);
  font-size: 9px;
}
html[data-site-shell="app"] .afm3-incident-head {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid var(--afm-border);
  color: var(--afm-muted);
  font-size: 8px;
}
html[data-site-shell="app"] .afm3-incident-head b {
  color: var(--afm-soft-text);
}
html[data-site-shell="app"] .afm3-incident-list {
  margin-top: 4px;
}
html[data-site-shell="app"] .afm3-incident-list > div {
  min-height: 38px;
  display: grid;
  grid-template-columns: 7px 1fr auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm3-incident-list > div:last-child { border-bottom: 0; }
html[data-site-shell="app"] .afm3-incident-list > div > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--afm-warning);
}
html[data-site-shell="app"] .afm3-incident-list > div > i.severity-high,
html[data-site-shell="app"] .afm3-incident-list > div > i.severity-critical,
html[data-site-shell="app"] .afm3-incident-list > div > i.severity-disaster { background: var(--afm-danger); }
html[data-site-shell="app"] .afm3-incident-list strong {
  display: block;
  color: var(--afm-soft-text);
  font-size: 8px;
}
html[data-site-shell="app"] .afm3-incident-list small,
html[data-site-shell="app"] .afm3-incident-list time {
  color: var(--afm-muted);
  font-size: 7px;
}
html[data-site-shell="app"] .afm3-module-empty {
  min-height: 235px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 22px;
}
html[data-site-shell="app"] .afm3-module-empty.small { min-height: 115px; }
html[data-site-shell="app"] .afm3-module-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 11px;
  border-radius: 12px;
  background: var(--afm-surface-2);
  color: var(--afm-muted);
}
html[data-site-shell="app"] .afm3-module-icon svg {
  width: 22px;
  stroke: currentColor;
  stroke-width: 1.6;
}
html[data-site-shell="app"] .afm3-module-empty strong {
  color: var(--afm-text);
  font-size: 11px;
}
html[data-site-shell="app"] .afm3-module-empty p {
  max-width: 280px;
  margin: 6px 0 0;
  color: var(--afm-muted);
  font-size: 8px;
  line-height: 1.55;
}
html[data-site-shell="app"] .afm3-module-empty a {
  margin-top: 10px;
  color: var(--afm-brand) !important;
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}

/* ----- lower cards ----- */
html[data-site-shell="app"] .afm3-value-block {
  padding: 18px 0 14px;
}
html[data-site-shell="app"] .afm3-value-block strong {
  display: block;
  color: var(--afm-text);
  font-size: 22px;
  letter-spacing: -.04em;
}
html[data-site-shell="app"] .afm3-value-block span {
  color: var(--afm-muted);
  font-size: 8px;
}
html[data-site-shell="app"] .afm3-mini-stats {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 6px;
}
html[data-site-shell="app"] .afm3-mini-stats > div {
  min-width: 0;
  padding: 9px;
  border-radius: 8px;
  background: var(--afm-surface-2);
}
html[data-site-shell="app"] .afm3-mini-stats b {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--afm-soft-text);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-site-shell="app"] .afm3-small-list {
  margin-top: 8px;
}
html[data-site-shell="app"] .afm3-small-list > div {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm3-small-list strong {
  display: block;
  color: var(--afm-soft-text);
  font-size: 8px;
}
html[data-site-shell="app"] .afm3-small-list small {
  display: block;
  color: var(--afm-muted);
  font-size: 7px;
}
html[data-site-shell="app"] .afm3-small-list > div > b {
  color: var(--afm-brand);
  font-size: 7px;
}
html[data-site-shell="app"] .afm3-empty-line {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 7px !important;
  color: var(--afm-muted);
  font-size: 8px;
}

/* ----- connected modules strip ----- */
html[data-site-shell="app"] .afm3-module-strip {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--afm-border);
  border-radius: 10px;
  background: var(--afm-border);
}
html[data-site-shell="app"] .afm3-module-strip > span {
  min-height: 42px;
  display: grid;
  grid-template-columns: 7px auto 1fr;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  background: var(--afm-surface);
  opacity: .50;
}
html[data-site-shell="app"] .afm3-module-strip > span:first-child,
html[data-site-shell="app"] .afm3-module-strip > span.is-on {
  opacity: 1;
}
html[data-site-shell="app"] .afm3-module-strip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--afm-muted);
}
html[data-site-shell="app"] .afm3-module-strip > span:first-child i,
html[data-site-shell="app"] .afm3-module-strip > span.is-on i {
  background: var(--afm-success);
}
html[data-site-shell="app"] .afm3-module-strip b {
  color: var(--afm-soft-text);
  font-size: 8px;
}
html[data-site-shell="app"] .afm3-module-strip small {
  justify-self: end;
  color: var(--afm-muted);
  font-size: 7px;
}

/* ----- internal pages: neutralize remaining old navy fills ----- */
html[data-site-shell="app"] .v1-redesign,
html[data-site-shell="app"] .pw-page,
html[data-site-shell="app"] .settings-section-main,
html[data-site-shell="app"] .help-main,
html[data-site-shell="app"] body[data-quantitativos] .content,
html[data-site-shell="app"] body[data-field-team] .content {
  background: transparent !important;
}
html[data-site-shell="app"] .v1-panel,
html[data-site-shell="app"] .v1-stat,
html[data-site-shell="app"] .v1-modal,
html[data-site-shell="app"] .team-member-row,
html[data-site-shell="app"] .settings-section-card,
html[data-site-shell="app"] .help-article,
html[data-site-shell="app"] .pw-project-card,
html[data-site-shell="app"] .pw-kanban-column,
html[data-site-shell="app"] .pw-kanban-card {
  background-image: none !important;
}
html[data-site-shell="app"][data-theme="dark"] .team-member-row,
html[data-site-shell="app"][data-theme="dark"] .team-modal-card-section,
html[data-site-shell="app"][data-theme="dark"] .team-all-projects-toggle,
html[data-site-shell="app"][data-theme="dark"] .team-wide-field select,
html[data-site-shell="app"][data-theme="dark"] .team-modal-card-section select,
html[data-site-shell="app"][data-theme="dark"] .profile-preview-wrap,
html[data-site-shell="app"][data-theme="dark"] .app-shell .profile,
html[data-site-shell="app"][data-theme="dark"] .profile-dropdown,
html[data-site-shell="app"][data-theme="dark"] .tech-project-picker,
html[data-site-shell="app"][data-theme="dark"] .tech-project-picker-search {
  border-color: var(--afm-border) !important;
  background: var(--afm-surface-2) !important;
  color: var(--afm-soft-text) !important;
}

/* responsive */
@media (max-width: 1280px) {
  html[data-site-shell="app"] .afm3-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  html[data-site-shell="app"] .afm3-project-card,
  html[data-site-shell="app"] .afm3-network-card { grid-column: span 12; }
  html[data-site-shell="app"] .afm3-mini-card { grid-column: span 6; }
}
@media (max-width: 900px) {
  html[data-site-shell="app"] .af-workspace.app-shell .af-body { grid-template-columns: 76px minmax(0,1fr) !important; }
  html[data-site-shell="app"] .af-workspace.app-shell .af-shell-collapse { left: 76px !important; }
  html[data-site-shell="app"] .afm3-project-body { grid-template-columns: 1fr; }
  html[data-site-shell="app"] .afm3-project-visual { min-height: 170px; }
}
@media (max-width: 720px) {
  html[data-site-shell="app"] .afm3-page-head { align-items: flex-start; flex-direction: column; }
  html[data-site-shell="app"] .afm3-kpis { grid-template-columns: 1fr; }
  html[data-site-shell="app"] .afm3-mini-card { grid-column: span 12; }
  html[data-site-shell="app"] .afm3-module-strip { grid-template-columns: 1fr 1fr; }
  html[data-site-shell="app"] .afm3-stat-row,
  html[data-site-shell="app"] .afm3-mini-stats { grid-template-columns: 1fr 1fr 1fr; }
}

/* =====================================================================
   AF MODERN V4 · DASHBOARD DENSO (mockups gerados na conversa)
   ===================================================================== */

html[data-site-shell="app"] .afm-nav-section {
  display: block;
  padding: 14px 12px 5px;
  color: color-mix(in srgb, var(--afm-brand) 72%, #8f98a6);
  font-size: 8px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
html[data-site-shell="app"] .v1-global-nav {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--afm-border) transparent;
}
html[data-site-shell="app"] .v1-global-nav > a {
  min-height: 36px !important;
  margin: 1px 0 !important;
  font-size: 10px !important;
}
html[data-site-shell="app"] .v1-global-nav > a .v1-nav-icon {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px;
}
html[data-site-shell="app"] .v1-global-nav > a .v1-nav-icon svg {
  width: 17px;
  height: 17px;
}

/* main canvas */
html[data-site-shell="app"] .af-workspace.app-shell .af-page-stage.content {
  padding: 18px 18px 34px !important;
}
html[data-site-shell="app"] .afm4-dashboard {
  max-width: 1700px;
  margin: 0 auto;
  display: grid;
  gap: 10px;
}
html[data-site-shell="app"] .afm4-dashboard a {
  text-decoration: none;
}

/* hero + KPI strip */
html[data-site-shell="app"] .afm4-top {
  display: grid;
  grid-template-columns: minmax(360px, 5fr) minmax(560px, 7fr);
  gap: 10px;
}
html[data-site-shell="app"] .afm4-hero {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid var(--afm-border);
  border-radius: 12px;
  background:
    radial-gradient(circle at 82% 16%, color-mix(in srgb,var(--afm-brand) 24%,transparent), transparent 32%),
    linear-gradient(135deg, color-mix(in srgb,var(--afm-brand) 10%,var(--afm-surface)), var(--afm-surface) 58%, var(--afm-surface-2));
}
html[data-site-shell="app"] .afm4-hero::before {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.48;
  background:
    linear-gradient(115deg,transparent 0 39%,color-mix(in srgb,var(--afm-brand) 12%,transparent) 39.5% 40%,transparent 40.5%),
    linear-gradient(25deg,transparent 0 46%,color-mix(in srgb,var(--afm-brand) 9%,transparent) 46.4% 46.8%,transparent 47.2%),
    linear-gradient(90deg,transparent 0 56%,color-mix(in srgb,var(--afm-brand) 8%,transparent) 56.4% 56.8%,transparent 57.2%);
}
html[data-site-shell="app"] .afm4-hero-grid {
  position:absolute;
  inset:0;
  pointer-events:none;
}
html[data-site-shell="app"] .afm4-hero-grid i {
  position:absolute;
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--afm-brand);
  box-shadow:0 0 0 4px color-mix(in srgb,var(--afm-brand) 10%,transparent);
}
html[data-site-shell="app"] .afm4-hero-grid i:nth-child(1){left:60%;top:25%}
html[data-site-shell="app"] .afm4-hero-grid i:nth-child(2){left:74%;top:46%}
html[data-site-shell="app"] .afm4-hero-grid i:nth-child(3){left:84%;top:72%}
html[data-site-shell="app"] .afm4-hero-grid i:nth-child(4){left:55%;top:76%}
html[data-site-shell="app"] .afm4-hero-grid i:nth-child(5){left:91%;top:24%}
html[data-site-shell="app"] .afm4-hero-grid i:nth-child(6){left:68%;top:82%}
html[data-site-shell="app"] .afm4-hero-content {
  position:relative;
  z-index:2;
  width:min(78%,520px);
  padding:21px;
}
html[data-site-shell="app"] .afm4-kicker {
  display:block;
  color:var(--afm-brand);
  font-size:8px;
  font-weight:850;
  letter-spacing:.13em;
}
html[data-site-shell="app"] .afm4-hero h1 {
  margin:7px 0 0;
  color:var(--afm-text) !important;
  font-size:clamp(27px,2.25vw,36px);
  line-height:1;
  letter-spacing:-.045em;
}
html[data-site-shell="app"] .afm4-hero p {
  max-width:390px;
  margin:9px 0 0;
  color:var(--afm-soft-text);
  font-size:11px;
  line-height:1.45;
}
html[data-site-shell="app"] .afm4-hero-actions {
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:16px;
}
html[data-site-shell="app"] .afm4-primary-action {
  min-height:34px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:0 11px;
  border:1px solid color-mix(in srgb,var(--afm-brand) 38%,var(--afm-border));
  border-radius:8px;
  background:var(--afm-brand);
  color:#fff !important;
  font-size:9px;
  font-weight:780;
  box-shadow:0 8px 22px color-mix(in srgb,var(--afm-brand) 20%,transparent);
}
html[data-site-shell="app"] .afm4-primary-action svg {
  width:15px;height:15px;stroke:currentColor;stroke-width:1.8;
}
html[data-site-shell="app"] .afm4-primary-action.is-disabled {
  background:var(--afm-surface-3);
  border-color:var(--afm-border);
  color:var(--afm-muted) !important;
  box-shadow:none;
}
html[data-site-shell="app"] .afm4-hero-actions small {
  color:var(--afm-muted);
  font-size:8px;
}
html[data-site-shell="app"] .afm4-hero-logo {
  position:absolute;
  right:14px;
  bottom:12px;
  z-index:2;
  max-width:94px;
  max-height:34px;
  object-fit:contain;
  opacity:.52;
  filter:saturate(.85);
}

html[data-site-shell="app"] .afm4-kpi-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  grid-template-rows:repeat(2,minmax(0,1fr));
  gap:8px;
}
html[data-site-shell="app"] .afm4-kpi {
  min-width:0;
  min-height:91px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  border:1px solid var(--afm-border);
  border-radius:11px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm4-kpi-icon {
  width:34px;height:34px;flex:0 0 34px;
  display:grid;place-items:center;
  border-radius:8px;
}
html[data-site-shell="app"] .afm4-kpi-icon svg {
  width:18px;height:18px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}
html[data-site-shell="app"] .afm4-kpi-icon.blue{background:color-mix(in srgb,#258cff 12%,transparent);color:#4aa0ff}
html[data-site-shell="app"] .afm4-kpi-icon.green{background:color-mix(in srgb,#17c77a 12%,transparent);color:#21cf83}
html[data-site-shell="app"] .afm4-kpi-icon.purple{background:color-mix(in srgb,#a866ff 13%,transparent);color:#b77aff}
html[data-site-shell="app"] .afm4-kpi small {
  display:block;color:var(--afm-muted);font-size:8px;
}
html[data-site-shell="app"] .afm4-kpi strong {
  display:block;margin-top:4px;color:var(--afm-text);font-size:19px;line-height:1;letter-spacing:-.03em;
}
html[data-site-shell="app"] .afm4-kpi em {
  display:block;margin-top:5px;color:var(--afm-success);font-size:7px;font-style:normal;
}
html[data-site-shell="app"] .afm4-kpi-wide {
  display:block;
}
html[data-site-shell="app"] .afm4-meter-head {
  display:flex;align-items:flex-end;justify-content:space-between;gap:8px;
}
html[data-site-shell="app"] .afm4-meter-head strong {
  font-size:18px;
}
html[data-site-shell="app"] .afm4-meter-head em {
  color:var(--afm-muted);
  text-align:right;
}
html[data-site-shell="app"] .afm4-meter {
  height:5px;
  margin-top:8px;
  overflow:hidden;
  border-radius:999px;
  background:var(--afm-surface-3);
}
html[data-site-shell="app"] .afm4-meter i {
  display:block;
  width:var(--p);
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--afm-brand),#3e9cff);
}
html[data-site-shell="app"] .afm4-meter.alert i { background:linear-gradient(90deg,var(--afm-danger),var(--afm-warning)); }
html[data-site-shell="app"] .afm4-meter.success i { background:linear-gradient(90deg,var(--afm-success),#42dfa0); }
html[data-site-shell="app"] .afm4-spark {
  display:flex;align-items:flex-end;gap:2px;height:18px;margin-top:6px;
}
html[data-site-shell="app"] .afm4-spark i {
  flex:1;
  border-radius:2px 2px 0 0;
  background:linear-gradient(180deg,var(--afm-brand),color-mix(in srgb,var(--afm-brand) 18%,transparent));
}
html[data-site-shell="app"] .afm4-spark i:nth-child(1){height:20%}
html[data-site-shell="app"] .afm4-spark i:nth-child(2){height:42%}
html[data-site-shell="app"] .afm4-spark i:nth-child(3){height:37%}
html[data-site-shell="app"] .afm4-spark i:nth-child(4){height:65%}
html[data-site-shell="app"] .afm4-spark i:nth-child(5){height:72%}
html[data-site-shell="app"] .afm4-spark i:nth-child(6){height:92%}

/* four dense main panels */
html[data-site-shell="app"] .afm4-main-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
html[data-site-shell="app"] .afm4-card,
html[data-site-shell="app"] .afm4-mini {
  min-width:0;
  overflow:hidden;
  border:1px solid var(--afm-border);
  border-radius:11px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm4-card {
  min-height:245px;
  padding:12px;
}
html[data-site-shell="app"] .afm4-card > header,
html[data-site-shell="app"] .afm4-mini > header {
  display:flex;align-items:center;justify-content:space-between;gap:10px;
}
html[data-site-shell="app"] .afm4-card h2,
html[data-site-shell="app"] .afm4-mini h3 {
  margin:0;color:var(--afm-text) !important;font-size:12px;letter-spacing:-.015em;
}
html[data-site-shell="app"] .afm4-card header a,
html[data-site-shell="app"] .afm4-card header span,
html[data-site-shell="app"] .afm4-mini header a {
  color:var(--afm-brand) !important;font-size:8px;font-weight:720;
}

html[data-site-shell="app"] .afm4-project-list {
  display:grid;
  gap:5px;
  margin-top:10px;
}
html[data-site-shell="app"] .afm4-project-list > a {
  min-height:58px;
  display:grid;
  grid-template-columns:48px minmax(0,1fr) auto;
  align-items:center;
  gap:9px;
  padding:6px;
  border:1px solid transparent;
  border-radius:8px;
  color:inherit;
}
html[data-site-shell="app"] .afm4-project-list > a:hover,
html[data-site-shell="app"] .afm4-project-list > a.is-current {
  border-color:color-mix(in srgb,var(--afm-brand) 23%,var(--afm-border));
  background:var(--afm-brand-faint);
}
html[data-site-shell="app"] .afm4-project-thumb {
  position:relative;
  width:48px;height:48px;
  overflow:hidden;
  border-radius:7px;
  background:
    linear-gradient(34deg,transparent 47%,color-mix(in srgb,var(--afm-brand) 55%,transparent) 48% 51%,transparent 52%),
    linear-gradient(115deg,transparent 37%,color-mix(in srgb,#54d297 45%,transparent) 38% 41%,transparent 42%),
    repeating-linear-gradient(0deg,var(--afm-surface-3) 0 8px,color-mix(in srgb,var(--afm-border) 80%,transparent) 9px 10px),
    repeating-linear-gradient(90deg,transparent 0 9px,color-mix(in srgb,var(--afm-border) 75%,transparent) 10px 11px);
}
html[data-site-shell="app"] .afm4-project-thumb i {
  position:absolute;width:5px;height:5px;border-radius:50%;background:var(--afm-brand);
}
html[data-site-shell="app"] .afm4-project-thumb i:nth-child(1){left:9px;top:12px}
html[data-site-shell="app"] .afm4-project-thumb i:nth-child(2){right:8px;top:20px}
html[data-site-shell="app"] .afm4-project-thumb i:nth-child(3){left:21px;bottom:8px}
html[data-site-shell="app"] .afm4-project-copy {
  min-width:0;
}
html[data-site-shell="app"] .afm4-project-copy strong {
  display:block;overflow:hidden;color:var(--afm-text);font-size:9px;text-overflow:ellipsis;white-space:nowrap;
}
html[data-site-shell="app"] .afm4-project-copy small {
  display:block;margin-top:2px;color:var(--afm-muted);font-size:7px;
}
html[data-site-shell="app"] .afm4-project-copy em {
  display:block;margin-top:6px;color:var(--afm-soft-text);font-size:7px;font-style:normal;
}
html[data-site-shell="app"] .afm4-project-list > a > b {
  align-self:start;
  display:flex;align-items:center;gap:4px;
  color:var(--afm-success);font-size:7px;font-weight:700;
}
html[data-site-shell="app"] .afm4-project-list > a > b i {
  width:5px;height:5px;border-radius:50%;background:currentColor;
}

/* distribution */
html[data-site-shell="app"] .afm4-donut-wrap {
  display:grid;
  grid-template-columns:118px minmax(0,1fr);
  gap:12px;
  align-items:center;
  min-height:205px;
}
html[data-site-shell="app"] .afm4-donut {
  width:112px;height:112px;
  display:grid;place-items:center;
  border-radius:50%;
  background:conic-gradient(
    var(--afm-brand) 0 44%,
    #6a5cff 44% 65%,
    #ffb341 65% 79%,
    #42c78a 79% 91%,
    var(--afm-surface-3) 91% 100%
  );
  position:relative;
}
html[data-site-shell="app"] .afm4-donut::after {
  content:"";
  position:absolute;
  inset:15px;
  border-radius:50%;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm4-donut > div {
  position:relative;z-index:2;text-align:center;
}
html[data-site-shell="app"] .afm4-donut strong {
  display:block;color:var(--afm-text);font-size:15px;
}
html[data-site-shell="app"] .afm4-donut small {
  color:var(--afm-muted);font-size:7px;
}
html[data-site-shell="app"] .afm4-donut-wrap ul {
  list-style:none;margin:0;padding:0;display:grid;gap:8px;
}
html[data-site-shell="app"] .afm4-donut-wrap li {
  display:grid;grid-template-columns:7px 1fr auto;gap:6px;align-items:center;
  color:var(--afm-muted);font-size:7px;
}
html[data-site-shell="app"] .afm4-donut-wrap li i {
  width:6px;height:6px;border-radius:50%;background:var(--afm-brand);
}
html[data-site-shell="app"] .afm4-donut-wrap li i.mix-2{background:#6a5cff}
html[data-site-shell="app"] .afm4-donut-wrap li i.mix-3{background:#ffb341}
html[data-site-shell="app"] .afm4-donut-wrap li i.mix-4{background:#42c78a}
html[data-site-shell="app"] .afm4-donut-wrap li i.mix-5{background:#e05b74}
html[data-site-shell="app"] .afm4-donut-wrap li b {
  color:var(--afm-soft-text);font-size:8px;
}

/* activity */
html[data-site-shell="app"] .afm4-activity-list {
  display:grid;
  margin-top:7px;
}
html[data-site-shell="app"] .afm4-activity-list > a {
  min-height:39px;
  display:grid;
  grid-template-columns:27px minmax(0,1fr) auto;
  gap:7px;
  align-items:center;
  border-bottom:1px solid var(--afm-border);
  color:inherit;
}
html[data-site-shell="app"] .afm4-activity-list > a:last-child { border-bottom:0; }
html[data-site-shell="app"] .afm4-event-icon {
  width:26px;height:26px;
  display:grid;place-items:center;
  border-radius:7px;
  background:var(--afm-brand-soft);
  color:var(--afm-brand);
  font-size:8px;font-style:normal;font-weight:800;
}
html[data-site-shell="app"] .afm4-activity-list strong {
  display:block;color:var(--afm-soft-text);font-size:8px;
}
html[data-site-shell="app"] .afm4-activity-list small {
  display:block;margin-top:2px;color:var(--afm-muted);font-size:7px;
}
html[data-site-shell="app"] .afm4-activity-list time {
  color:var(--afm-muted);font-size:7px;
}

/* quick map */
html[data-site-shell="app"] .afm4-map-card {
  padding-bottom:8px;
}
html[data-site-shell="app"] .afm4-map {
  height:190px !important;
  margin:9px 0 6px !important;
  border:1px solid var(--afm-border);
  border-radius:8px !important;
}
html[data-site-shell="app"] .afm4-map-card footer {
  display:flex;gap:6px;
}
html[data-site-shell="app"] .afm4-map-card footer span {
  flex:1;padding:5px 6px;border-radius:6px;background:var(--afm-surface-2);
  color:var(--afm-muted);font-size:7px;text-align:center;
}

/* lower compact row */
html[data-site-shell="app"] .afm4-lower-grid {
  display:grid;
  grid-template-columns:repeat(7,minmax(150px,1fr));
  gap:8px;
}
html[data-site-shell="app"] .afm4-mini {
  min-height:180px;
  padding:10px;
}
html[data-site-shell="app"] .afm4-equipment-table {
  margin-top:7px;
}
html[data-site-shell="app"] .afm4-equipment-table > div {
  min-height:27px;
  display:grid;grid-template-columns:1fr auto auto;gap:7px;align-items:center;
  border-bottom:1px solid var(--afm-border);
  color:var(--afm-muted);font-size:7px;
}
html[data-site-shell="app"] .afm4-equipment-table b {
  color:var(--afm-text);font-size:8px;
}
html[data-site-shell="app"] .afm4-equipment-table em {
  color:var(--afm-success);font-size:6px;font-style:normal;
}
html[data-site-shell="app"] .afm4-quant-summary,
html[data-site-shell="app"] .afm4-workflow-cols,
html[data-site-shell="app"] .afm4-finance {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
  margin-top:9px;
}
html[data-site-shell="app"] .afm4-quant-summary > div,
html[data-site-shell="app"] .afm4-workflow-cols > span,
html[data-site-shell="app"] .afm4-finance > span {
  min-width:0;
  padding:8px 6px;
  border-radius:7px;
  background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm4-quant-summary strong,
html[data-site-shell="app"] .afm4-workflow-cols b,
html[data-site-shell="app"] .afm4-finance strong {
  display:block;overflow:hidden;color:var(--afm-text);font-size:10px;text-overflow:ellipsis;white-space:nowrap;
}
html[data-site-shell="app"] .afm4-quant-summary small,
html[data-site-shell="app"] .afm4-workflow-cols small,
html[data-site-shell="app"] .afm4-finance small {
  display:block;margin-top:3px;color:var(--afm-muted);font-size:6px;
}
html[data-site-shell="app"] .afm4-mini-bars {
  display:grid;gap:5px;margin-top:10px;
}
html[data-site-shell="app"] .afm4-mini-bars i {
  display:block;width:var(--v);height:5px;border-radius:999px;background:var(--afm-brand);
}
html[data-site-shell="app"] .afm4-integration-list {
  display:grid;gap:6px;margin-top:10px;
}
html[data-site-shell="app"] .afm4-integration-list > span {
  min-height:28px;
  display:grid;grid-template-columns:6px 1fr auto;align-items:center;gap:6px;
  padding:0 7px;border-radius:7px;background:var(--afm-surface-2);
  color:var(--afm-muted);font-size:7px;
}
html[data-site-shell="app"] .afm4-integration-list i {
  width:5px;height:5px;border-radius:50%;background:var(--afm-muted);
}
html[data-site-shell="app"] .afm4-integration-list .on i { background:var(--afm-success); }
html[data-site-shell="app"] .afm4-integration-list b {
  color:var(--afm-soft-text);font-size:6px;
}
html[data-site-shell="app"] .afm4-links {
  display:grid;gap:5px;margin-top:9px;
}
html[data-site-shell="app"] .afm4-links a {
  min-height:29px;
  display:flex;align-items:center;
  padding:0 8px;border-radius:7px;background:var(--afm-surface-2);
  color:var(--afm-soft-text) !important;font-size:7px;
}
html[data-site-shell="app"] .afm4-links a::after {
  content:"›";margin-left:auto;color:var(--afm-muted);font-size:12px;
}
html[data-site-shell="app"] .afm4-empty {
  min-height:120px;display:grid;place-items:center;
  color:var(--afm-muted);font-size:8px;text-align:center;
}

/* light mode keeps the same architecture, only surfaces change */
html[data-site-shell="app"][data-theme="light"] .afm4-hero {
  background:
    radial-gradient(circle at 82% 16%, color-mix(in srgb,var(--afm-brand) 17%,transparent), transparent 32%),
    linear-gradient(135deg,#edf2f7,#ffffff 56%,#f5f7fa);
}
html[data-site-shell="app"][data-theme="light"] .afm4-project-thumb {
  background:
    linear-gradient(34deg,transparent 47%,color-mix(in srgb,var(--afm-brand) 42%,transparent) 48% 51%,transparent 52%),
    linear-gradient(115deg,transparent 37%,#63c99680 38% 41%,transparent 42%),
    repeating-linear-gradient(0deg,#e9edf2 0 8px,#d5dae1 9px 10px),
    repeating-linear-gradient(90deg,transparent 0 9px,#d5dae1 10px 11px);
}

/* responsive */
@media (max-width:1450px) {
  html[data-site-shell="app"] .afm4-top { grid-template-columns:minmax(340px,4.5fr) minmax(520px,7.5fr); }
  html[data-site-shell="app"] .afm4-lower-grid { grid-template-columns:repeat(4,minmax(160px,1fr)); }
}
@media (max-width:1180px) {
  html[data-site-shell="app"] .afm4-top { grid-template-columns:1fr; }
  html[data-site-shell="app"] .afm4-main-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  html[data-site-shell="app"] .afm4-lower-grid { grid-template-columns:repeat(3,minmax(160px,1fr)); }
}
@media (max-width:760px) {
  html[data-site-shell="app"] .afm4-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  html[data-site-shell="app"] .afm4-main-grid { grid-template-columns:1fr; }
  html[data-site-shell="app"] .afm4-lower-grid { grid-template-columns:1fr 1fr; }
}
@media (max-width:520px) {
  html[data-site-shell="app"] .afm4-kpi-grid,
  html[data-site-shell="app"] .afm4-lower-grid { grid-template-columns:1fr; }
  html[data-site-shell="app"] .afm4-hero-content { width:100%; }
}

/* =====================================================================
   AF MODERN · EQUIPMENT WORKSPACE
   ===================================================================== */
html[data-site-shell="app"] .afm-eq-page {
  max-width: 1700px;
  margin: 0 auto;
}
html[data-site-shell="app"] .afm-eq-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  padding:2px 0 15px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-eq-head h1 {
  margin:5px 0 0;
  color:var(--afm-text)!important;
  font-size:29px;
  line-height:1;
  letter-spacing:-.04em;
}
html[data-site-shell="app"] .afm-eq-head p {
  margin:6px 0 0;
  color:var(--afm-muted);
  font-size:10px;
}
html[data-site-shell="app"] .afm-eq-head-actions {
  display:flex;align-items:center;gap:10px;
}
html[data-site-shell="app"] .afm-eq-live {
  display:inline-flex;align-items:center;gap:6px;
  color:var(--afm-muted);font-size:8px;
}
html[data-site-shell="app"] .afm-eq-live i {
  width:6px;height:6px;border-radius:50%;background:var(--afm-success);
}
html[data-site-shell="app"] .afm-eq-add {
  min-height:36px;display:inline-flex;align-items:center;padding:0 12px;
  border-radius:8px;background:var(--afm-brand);color:#fff!important;
  font-size:9px;font-weight:780;
  box-shadow:0 8px 20px color-mix(in srgb,var(--afm-brand) 18%,transparent);
}

html[data-site-shell="app"] .afm-eq-filters {
  display:grid;
  grid-template-columns:minmax(240px,1.7fr) repeat(4,minmax(118px,.72fr)) auto;
  gap:7px;
  margin-top:10px;
  padding:8px;
  border:1px solid var(--afm-border);
  border-radius:10px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm-eq-filters label {
  min-width:0;
  height:38px;
  display:flex;align-items:center;gap:7px;
  padding:0 9px;
  border:1px solid var(--afm-border);
  border-radius:8px;
  background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm-eq-filters label > span {
  color:var(--afm-muted);font-size:7px;font-weight:700;white-space:nowrap;
}
html[data-site-shell="app"] .afm-eq-filters input,
html[data-site-shell="app"] .afm-eq-filters select {
  min-width:0;width:100%;height:100%;
  padding:0!important;border:0!important;background:transparent!important;
  color:var(--afm-soft-text)!important;font-size:9px!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .afm-eq-search svg {
  width:15px;height:15px;flex:0 0 15px;
  stroke:var(--afm-muted);stroke-width:1.8;
}
html[data-site-shell="app"] .afm-eq-filter-btn {
  min-width:68px;border:0;border-radius:8px;background:var(--afm-surface-3);
  color:var(--afm-soft-text);font-size:8px;font-weight:760;cursor:pointer;
}
html[data-site-shell="app"] .afm-eq-filter-btn:hover {
  background:var(--afm-brand-soft);color:var(--afm-brand);
}

html[data-site-shell="app"] .afm-eq-kpis {
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:8px;
  margin-top:9px;
}
html[data-site-shell="app"] .afm-eq-kpis article {
  min-height:82px;
  display:grid;
  grid-template-columns:36px minmax(0,1fr);
  gap:9px;align-items:center;
  padding:10px;
  border:1px solid var(--afm-border);
  border-radius:10px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm-eq-type-icon,
html[data-site-shell="app"] .afm-eq-row-icon,
html[data-site-shell="app"] .afm-eq-selected-icon {
  display:grid;place-items:center;
  border-radius:8px;
  background:var(--afm-brand-soft);
  color:var(--afm-brand);
}
html[data-site-shell="app"] .afm-eq-type-icon {
  width:36px;height:36px;
}
html[data-site-shell="app"] .afm-eq-type-icon svg,
html[data-site-shell="app"] .afm-eq-row-icon svg,
html[data-site-shell="app"] .afm-eq-selected-icon svg {
  width:18px;height:18px;
}
html[data-site-shell="app"] .afm-eq-type-icon.tower,
html[data-site-shell="app"] .afm-eq-type-icon.ptp {
  background:color-mix(in srgb,#8a62ff 12%,transparent);color:#9d7cff;
}
html[data-site-shell="app"] .afm-eq-type-icon.switch,
html[data-site-shell="app"] .afm-eq-type-icon.olt,
html[data-site-shell="app"] .afm-eq-type-icon.dio {
  background:color-mix(in srgb,#288dff 12%,transparent);color:#4ba1ff;
}
/* EQUIPMENT_TAXONOMY_ICONS_20261003 (GPTmap Afservice) */
html[data-site-shell="app"] .afm-eq-type-icon.inventory,
html[data-site-shell="app"] .afm-eq-type-icon.equipment,
html[data-site-shell="app"] .afm-eq-type-icon.rack {
  background:var(--afm-brand-soft);color:var(--afm-brand);
}
html[data-site-shell="app"] .afm-eq-type-icon.field_asset {
  background:color-mix(in srgb,var(--afm-success) 11%,var(--afm-surface-2));color:var(--afm-success);
}
html[data-site-shell="app"] .afm-eq-class.field,
html[data-site-shell="app"] .afm-eq-class.installed,
html[data-site-shell="app"] .afm-eq-class.passive {
  display:inline-flex;min-height:20px;align-items:center;padding:0 6px;border-radius:999px;
  font-size:7px;font-weight:760;
}
html[data-site-shell="app"] .afm-eq-class.field {
  background:var(--afm-brand-soft);color:var(--afm-brand);
}
html[data-site-shell="app"] .afm-eq-class.installed {
  background:color-mix(in srgb,var(--afm-success) 10%,var(--afm-surface-2));color:var(--afm-success);
}
html[data-site-shell="app"] .afm-eq-class.passive {
  background:color-mix(in srgb,var(--afm-warning) 10%,var(--afm-surface-2));color:var(--afm-warning);
}
html[data-site-shell="app"] .afm-eq-row-icon.tower,
html[data-site-shell="app"] .afm-eq-row-icon.ptp,
html[data-site-shell="app"] .afm-eq-row-icon.radio,
html[data-site-shell="app"] .afm-eq-row-icon.radio_cpe,
html[data-site-shell="app"] .afm-eq-row-icon.setor,
html[data-site-shell="app"] .afm-eq-row-icon.omni,
html[data-site-shell="app"] .afm-eq-row-icon.ap,
html[data-site-shell="app"] .afm-eq-row-icon.access_point,
html[data-site-shell="app"] .afm-eq-selected-icon.tower,
html[data-site-shell="app"] .afm-eq-selected-icon.ptp,
html[data-site-shell="app"] .afm-eq-selected-icon.radio,
html[data-site-shell="app"] .afm-eq-selected-icon.radio_cpe,
html[data-site-shell="app"] .afm-eq-selected-icon.setor,
html[data-site-shell="app"] .afm-eq-selected-icon.omni,
html[data-site-shell="app"] .afm-eq-selected-icon.ap,
html[data-site-shell="app"] .afm-eq-selected-icon.access_point {
  background:color-mix(in srgb,#8a62ff 12%,var(--afm-surface-2));color:#9d7cff;
}
html[data-site-shell="app"] .afm-eq-row-icon.dio,
html[data-site-shell="app"] .afm-eq-row-icon.patch,
html[data-site-shell="app"] .afm-eq-row-icon.pto,
html[data-site-shell="app"] .afm-eq-selected-icon.dio,
html[data-site-shell="app"] .afm-eq-selected-icon.patch,
html[data-site-shell="app"] .afm-eq-selected-icon.pto {
  background:color-mix(in srgb,var(--afm-warning) 10%,var(--afm-surface-2));color:var(--afm-warning);
}
html[data-site-shell="app"] .afm-eq-kpis small {
  display:block;color:var(--afm-muted);font-size:8px;
}
html[data-site-shell="app"] .afm-eq-kpis strong {
  display:block;margin-top:4px;color:var(--afm-text);font-size:19px;line-height:1;
}
html[data-site-shell="app"] .afm-eq-kpis em {
  display:block;margin-top:5px;color:var(--afm-success);font-size:7px;font-style:normal;
}

html[data-site-shell="app"] .afm-eq-workbench {
  display:grid;
  grid-template-columns:minmax(0,1fr) 360px;
  gap:10px;
  margin-top:10px;
  align-items:start;
}
html[data-site-shell="app"] .afm-eq-list,
html[data-site-shell="app"] .afm-eq-detail {
  min-width:0;
  border:1px solid var(--afm-border);
  border-radius:11px;
  background:var(--afm-surface);
  overflow:hidden;
}
html[data-site-shell="app"] .afm-eq-panel-head {
  min-height:58px;
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;padding:10px 12px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-eq-panel-head h2,
html[data-site-shell="app"] .afm-eq-detail-head h2 {
  margin:0;color:var(--afm-text)!important;font-size:13px;
}
html[data-site-shell="app"] .afm-eq-panel-head p,
html[data-site-shell="app"] .afm-eq-detail-head p {
  margin:3px 0 0;color:var(--afm-muted);font-size:7px;
}
html[data-site-shell="app"] .afm-eq-panel-head > span {
  padding:5px 7px;border-radius:999px;background:var(--afm-brand-soft);
  color:var(--afm-brand);font-size:7px;font-weight:700;
}
html[data-site-shell="app"] .afm-eq-bulk {
  min-height:39px;display:flex;align-items:center;gap:8px;
  padding:5px 9px;border-bottom:1px solid var(--afm-border);background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm-eq-bulk button {
  min-height:27px;border:1px solid color-mix(in srgb,var(--afm-danger) 24%,var(--afm-border));
  border-radius:7px;background:color-mix(in srgb,var(--afm-danger) 7%,var(--afm-surface));
  color:var(--afm-danger);font-size:7px;font-weight:700;
}
html[data-site-shell="app"] .afm-eq-bulk span {
  color:var(--afm-muted);font-size:7px;
}

html[data-site-shell="app"] .afm-eq-table-wrap {
  overflow:auto;
  max-height:530px;
}
html[data-site-shell="app"] .afm-eq-table {
  width:100%;border-collapse:collapse;table-layout:auto;
}
html[data-site-shell="app"] .afm-eq-table th {
  position:sticky;top:0;z-index:2;
  height:34px;padding:0 8px;
  border-bottom:1px solid var(--afm-border);
  background:var(--afm-surface-2)!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;font-weight:720!important;letter-spacing:.03em;text-transform:uppercase;
  text-align:left;white-space:nowrap;
}
html[data-site-shell="app"] .afm-eq-table td {
  height:45px;padding:0 8px;
  border-bottom:1px solid var(--afm-border);
  color:var(--afm-soft-text)!important;
  font-size:8px;white-space:nowrap;
}
html[data-site-shell="app"] .afm-eq-table tr:hover td,
html[data-site-shell="app"] .afm-eq-table tr.is-selected td {
  background:var(--afm-brand-faint)!important;
}
html[data-site-shell="app"] .afm-eq-table tr.is-selected td:first-child {
  box-shadow:inset 2px 0 0 var(--afm-brand);
}
html[data-site-shell="app"] .afm-eq-name {
  display:flex;align-items:center;gap:7px;color:inherit!important;
}
html[data-site-shell="app"] .afm-eq-row-icon {
  width:28px;height:28px;flex:0 0 28px;
}
html[data-site-shell="app"] .afm-eq-name strong {
  display:block;max-width:190px;overflow:hidden;text-overflow:ellipsis;
  color:var(--afm-text);font-size:8px;
}
html[data-site-shell="app"] .afm-eq-name small,
html[data-site-shell="app"] .afm-eq-table td small {
  display:block;margin-top:2px;color:var(--afm-muted);font-size:6px;
}
html[data-site-shell="app"] .afm-eq-status {
  display:inline-flex;align-items:center;gap:5px;min-height:22px;padding:0 7px;
  border-radius:999px;background:var(--afm-surface-3);
  color:var(--afm-muted);font-size:7px;font-weight:700;
}
html[data-site-shell="app"] .afm-eq-status i {
  width:5px;height:5px;border-radius:50%;background:currentColor;
}
html[data-site-shell="app"] .afm-eq-status.ok { color:var(--afm-success);background:color-mix(in srgb,var(--afm-success) 8%,var(--afm-surface-2)); }
html[data-site-shell="app"] .afm-eq-status.down { color:var(--afm-danger);background:color-mix(in srgb,var(--afm-danger) 8%,var(--afm-surface-2)); }
html[data-site-shell="app"] .afm-eq-status.warn { color:var(--afm-warning);background:color-mix(in srgb,var(--afm-warning) 8%,var(--afm-surface-2)); }
html[data-site-shell="app"] .afm-eq-status.muted { color:var(--afm-muted); }
html[data-site-shell="app"] .afm-eq-more {
  color:var(--afm-muted)!important;font-size:10px;font-weight:800;
}
html[data-site-shell="app"] .afm-eq-pagination {
  min-height:43px;display:flex;align-items:center;justify-content:space-between;
  gap:10px;padding:0 10px;border-top:1px solid var(--afm-border);
  color:var(--afm-muted);font-size:7px;
}
html[data-site-shell="app"] .afm-eq-pagination nav {
  display:flex;gap:4px;
}
html[data-site-shell="app"] .afm-eq-pagination a,
html[data-site-shell="app"] .afm-eq-pagination b {
  width:26px;height:26px;display:grid;place-items:center;border-radius:6px;
  border:1px solid var(--afm-border);background:var(--afm-surface-2);
  color:var(--afm-soft-text)!important;
}

html[data-site-shell="app"] .afm-eq-detail {
  position:sticky;
  top:calc(var(--af-site-topbar-height,66px) + 12px);
}
html[data-site-shell="app"] .afm-eq-detail-head {
  min-height:62px;
  display:grid;
  grid-template-columns:34px minmax(0,1fr) auto;
  gap:8px;align-items:center;padding:10px 11px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-eq-selected-icon {
  width:34px;height:34px;
}
html[data-site-shell="app"] .afm-eq-tabs {
  min-height:35px;display:flex;align-items:center;gap:18px;padding:0 11px;
  border-bottom:1px solid var(--afm-border);color:var(--afm-muted);font-size:7px;
}
html[data-site-shell="app"] .afm-eq-tabs b {
  height:35px;display:flex;align-items:center;border-bottom:2px solid var(--afm-brand);
  color:var(--afm-brand);font-weight:750;
}
html[data-site-shell="app"] .afm-eq-detail-body {
  display:grid;
  grid-template-columns:125px minmax(0,1fr);
  gap:10px;padding:10px;
}
html[data-site-shell="app"] .afm-eq-photo {
  min-height:130px;overflow:hidden;border-radius:8px;background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm-eq-photo img {
  width:100%;height:100%;object-fit:cover;
}
html[data-site-shell="app"] .afm-eq-photo-placeholder {
  width:100%;height:130px;display:grid;place-items:center;color:var(--afm-muted);
}
html[data-site-shell="app"] .afm-eq-photo-placeholder svg { width:42px;height:42px; }
html[data-site-shell="app"] .afm-eq-properties {
  margin:0;display:grid;gap:0;
}
html[data-site-shell="app"] .afm-eq-properties > div {
  min-height:25px;display:grid;grid-template-columns:74px 1fr;align-items:center;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-eq-properties dt {
  color:var(--afm-muted);font-size:6px;
}
html[data-site-shell="app"] .afm-eq-properties dd {
  margin:0;overflow:hidden;color:var(--afm-soft-text);font-size:7px;text-overflow:ellipsis;white-space:nowrap;
}
html[data-site-shell="app"] .afm-eq-detail-cards {
  display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:0 10px 10px;
}
html[data-site-shell="app"] .afm-eq-detail-cards article {
  min-height:82px;padding:9px;border:1px solid var(--afm-border);border-radius:8px;background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm-eq-detail-cards small {
  display:block;color:var(--afm-muted);font-size:6px;
}
html[data-site-shell="app"] .afm-eq-detail-cards strong {
  display:block;margin-top:7px;color:var(--afm-text);font-size:14px;
}
html[data-site-shell="app"] .afm-eq-detail-cards span {
  display:block;margin-top:5px;color:var(--afm-muted);font-size:6px;
}
html[data-site-shell="app"] .afm-eq-actions {
  display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:0 10px 10px;
}
html[data-site-shell="app"] .afm-eq-actions a {
  min-height:30px;display:grid;place-items:center;border:1px solid var(--afm-border);
  border-radius:7px;background:var(--afm-surface-2);color:var(--afm-soft-text)!important;font-size:7px;font-weight:700;
}
html[data-site-shell="app"] .afm-eq-actions a:first-child {
  border-color:var(--afm-brand);background:var(--afm-brand);color:#fff!important;
}
html[data-site-shell="app"] .afm-eq-detail-empty {
  min-height:480px;display:grid;place-content:center;text-align:center;padding:20px;
}
html[data-site-shell="app"] .afm-eq-detail-empty strong { color:var(--afm-text);font-size:11px; }
html[data-site-shell="app"] .afm-eq-detail-empty p { color:var(--afm-muted);font-size:8px; }

@media(max-width:1300px){
  html[data-site-shell="app"] .afm-eq-kpis{grid-template-columns:repeat(3,1fr)}
  html[data-site-shell="app"] .afm-eq-workbench{grid-template-columns:minmax(0,1fr) 320px}
}
@media(max-width:980px){
  html[data-site-shell="app"] .afm-eq-workbench{grid-template-columns:1fr}
  html[data-site-shell="app"] .afm-eq-detail{position:static}
  html[data-site-shell="app"] .afm-eq-filters{grid-template-columns:1fr 1fr}
}
@media(max-width:640px){
  html[data-site-shell="app"] .afm-eq-kpis{grid-template-columns:repeat(2,1fr)}
  html[data-site-shell="app"] .afm-eq-head{align-items:flex-start;flex-direction:column}
  html[data-site-shell="app"] .afm-eq-filters{grid-template-columns:1fr}
}

html[data-site-shell="app"] .afm4-real-meta {
  display:flex;
  align-items:center;
  gap:5px;
  margin-top:8px;
}
html[data-site-shell="app"] .afm4-real-meta span {
  min-height:20px;
  display:inline-flex;
  align-items:center;
  padding:0 7px;
  border-radius:6px;
  background:var(--afm-surface-3);
  color:var(--afm-muted);
  font-size:7px;
  font-weight:650;
}

html[data-site-shell="app"] .afm-eq-type-icon svg,
html[data-site-shell="app"] .afm-eq-row-icon svg,
html[data-site-shell="app"] .afm-eq-selected-icon svg,
html[data-site-shell="app"] .afm-eq-photo-placeholder svg {
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =====================================================================
   AF MODERN · QUANTITATIVOS
   ===================================================================== */
html[data-site-shell="app"] body[data-quantitativos] .af-page-stage.content {
  display:block !important;
  grid-template-columns:none !important;
}
html[data-site-shell="app"] .afm-quant-page {
  max-width:1700px;
  margin:0 auto;
  color:var(--afm-text);
}
html[data-site-shell="app"] .afm-quant-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  padding:2px 0 14px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-quant-head h1 {
  margin:5px 0 0;
  color:var(--afm-text)!important;
  font-size:29px;
  line-height:1;
  letter-spacing:-.04em;
}
html[data-site-shell="app"] .afm-quant-head p {
  margin:6px 0 0;
  color:var(--afm-muted);
  font-size:10px;
}
html[data-site-shell="app"] .afm-quant-project-meta {
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:9px;
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-quant-project-meta strong {
  color:var(--afm-soft-text);
  font-size:8px;
}
html[data-site-shell="app"] .afm-quant-project-meta span {
  padding-left:8px;
  border-left:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-quant-project-meta b {
  color:var(--afm-soft-text);
}
html[data-site-shell="app"] .afm-quant-project-meta i {
  min-height:20px;
  display:inline-flex;
  align-items:center;
  padding:0 7px;
  border-radius:999px;
  background:color-mix(in srgb,var(--afm-success) 9%,var(--afm-surface-2));
  color:var(--afm-success);
  font-style:normal;
  font-size:7px;
  font-weight:700;
}
html[data-site-shell="app"] .afm-quant-project-meta i.is-stale {
  background:color-mix(in srgb,var(--afm-warning) 9%,var(--afm-surface-2));
  color:var(--afm-warning);
}
html[data-site-shell="app"] .afm-quant-actions {
  display:flex;
  align-items:center;
  gap:7px;
}
html[data-site-shell="app"] .afm-quant-actions button {
  min-height:34px;
  padding:0 10px;
  border:1px solid var(--afm-border);
  border-radius:8px;
  background:var(--afm-surface-2);
  color:var(--afm-soft-text);
  font-size:8px;
  font-weight:720;
  cursor:pointer;
}
html[data-site-shell="app"] .afm-quant-actions button.primary {
  border-color:var(--afm-brand);
  background:var(--afm-brand);
  color:#fff;
  box-shadow:0 7px 18px color-mix(in srgb,var(--afm-brand) 18%,transparent);
}

html[data-site-shell="app"] .afm-quant-kpis {
  display:grid;
  grid-template-columns:repeat(7,minmax(0,1fr));
  gap:8px;
  margin-top:10px;
}
html[data-site-shell="app"] .afm-quant-kpis article {
  min-height:92px;
  display:grid;
  grid-template-columns:40px minmax(0,1fr);
  align-items:center;
  gap:9px;
  padding:10px;
  border:1px solid var(--afm-border);
  border-radius:10px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm-quant-kpis .icon {
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  border-radius:9px;
  color:var(--tone,var(--afm-brand));
  background:color-mix(in srgb,var(--tone,var(--afm-brand)) 11%,var(--afm-surface-2));
}
html[data-site-shell="app"] .afm-quant-kpis .icon svg {
  width:20px;
  height:20px;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
html[data-site-shell="app"] .afm-quant-kpis article.blue{--tone:#3d9cff}
html[data-site-shell="app"] .afm-quant-kpis article.gold{--tone:#e5b52f}
html[data-site-shell="app"] .afm-quant-kpis article.green{--tone:#28d692}
html[data-site-shell="app"] .afm-quant-kpis article.orange{--tone:#ff8f32}
html[data-site-shell="app"] .afm-quant-kpis article.purple{--tone:#9a67ff}
html[data-site-shell="app"] .afm-quant-kpis article.red{--tone:#ef5470}
html[data-site-shell="app"] .afm-quant-kpis article.teal{--tone:#22c7b8}
html[data-site-shell="app"] .afm-quant-kpis article[hidden]{display:none!important}
html[data-site-shell="app"] .afm-quant-kpis.is-board{grid-template-columns:repeat(6,minmax(0,1fr))}
html[data-site-shell="app"] .afm-quant-kpis small {
  display:block;
  color:var(--afm-muted);
  font-size:8px;
}
html[data-site-shell="app"] .afm-quant-kpis strong {
  display:block;
  margin-top:5px;
  overflow:hidden;
  color:var(--afm-text);
  font-size:20px;
  line-height:1;
  letter-spacing:-.03em;
  text-overflow:ellipsis;
  white-space:nowrap;
}
html[data-site-shell="app"] .afm-quant-kpis em {
  display:block;
  margin-top:6px;
  color:var(--afm-success);
  font-size:7px;
  font-style:normal;
}

html[data-site-shell="app"] .afm-quant-analytics {
  display:grid;
  grid-template-columns:1fr 1.2fr .9fr;
  gap:9px;
  margin-top:9px;
}
html[data-site-shell="app"] .afm-quant-card {
  min-width:0;
  height:235px;
  padding:11px;
  overflow:hidden;
  border:1px solid var(--afm-border);
  border-radius:10px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm-quant-card > header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
html[data-site-shell="app"] .afm-quant-card h2 {
  margin:0;
  color:var(--afm-text)!important;
  font-size:11px;
}
html[data-site-shell="app"] .afm-quant-card header > span {
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-quant-card header select {
  height:29px!important;
  min-width:120px;
  padding:0 26px 0 8px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:7px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-soft-text)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .afm-quant-donut-wrap {
  height:192px;
  display:grid;
  grid-template-columns:145px minmax(0,1fr);
  align-items:center;
  gap:11px;
}
html[data-site-shell="app"] .afm-quant-card .donut {
  width:130px;
  height:130px;
  margin:auto;
}
html[data-site-shell="app"] .afm-quant-card .donut::after {
  inset:20px;
  background:var(--afm-surface)!important;
}
html[data-site-shell="app"] .afm-quant-card .donut strong {
  color:var(--afm-text);
  font-size:16px;
}
html[data-site-shell="app"] .afm-quant-card .donut small {
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-quant-card .legend {
  min-width:0;
  gap:7px;
}
html[data-site-shell="app"] .afm-quant-card .legend li {
  grid-template-columns:7px 1fr auto;
  gap:6px;
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-quant-card .legend i {
  width:6px;
  height:6px;
}
html[data-site-shell="app"] .afm-quant-card .legend b {
  color:var(--afm-soft-text);
  font-size:7px;
}
html[data-site-shell="app"] .afm-quant-card .bar-chart {
  height:190px;
  margin-top:6px;
}
html[data-site-shell="app"] .afm-quant-card .plot {
  height:150px;
  margin-top:7px;
  padding:0 13px;
  border-color:var(--afm-border);
  background:repeating-linear-gradient(to bottom,var(--afm-border) 0 1px,transparent 1px 31px);
}
html[data-site-shell="app"] .afm-quant-card .bar {
  width:40px;
  box-shadow:none;
}
html[data-site-shell="app"] .afm-quant-card .bar b,
html[data-site-shell="app"] .afm-quant-card .bar span,
html[data-site-shell="app"] .afm-quant-card .y-axis {
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-quant-cost-total {
  margin-top:18px;
  padding-bottom:13px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-quant-cost-total small {
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-quant-cost-total strong {
  display:block;
  margin-top:5px;
  color:var(--afm-text);
  font-size:22px;
  letter-spacing:-.035em;
}
html[data-site-shell="app"] .afm-quant-cost-total p {
  min-height:22px;
  margin:5px 0 0;
  color:var(--afm-muted);
  font-size:7px;
  line-height:1.4;
}
/* MARCADOR_20261001 (GPTmap Afservice): mantém as 4 métricas de custo na mesma linha, sem recortar Cordoalhas/CTA. */
html[data-site-shell="app"] .afm-quant-cost-stats {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:5px;
  margin-top:9px;
}
html[data-site-shell="app"] .afm-quant-cost-stats > span {
  min-width:0;
  padding:7px 5px;
  border-radius:7px;
  background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm-quant-cost-stats small {
  color:var(--afm-muted);
  font-size:6px;
}
html[data-site-shell="app"] .afm-quant-cost-stats b {
  display:block;
  margin-top:3px;
  overflow:hidden;
  color:var(--afm-soft-text);
  font-size:9px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
html[data-site-shell="app"] .afm-quant-card.costs > a {
  min-height:29px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top:9px;
  border-radius:7px;
  background:var(--afm-brand-soft);
  color:var(--afm-brand)!important;
  font-size:7px;
  font-weight:750;
}

html[data-site-shell="app"] .afm-quant-materials {
  margin-top:9px;
  overflow:hidden;
  border:1px solid var(--afm-border);
  border-radius:10px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm-quant-material-head {
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 10px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-quant-material-head h2 {
  margin:0;
  color:var(--afm-text)!important;
  font-size:12px;
}
html[data-site-shell="app"] .afm-quant-material-head > div > span {
  display:block;
  margin-top:3px;
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-quant-search {
  width:min(350px,34vw);
  height:34px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:0 9px;
  border:1px solid var(--afm-border);
  border-radius:8px;
  background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm-quant-search svg {
  width:14px;
  height:14px;
  stroke:var(--afm-muted);
  stroke-width:1.8;
}
html[data-site-shell="app"] .afm-quant-search input {
  width:100%;
  height:100%;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .afm-quant-materials .tabs {
  height:40px;
  padding:4px 7px!important;
  gap:4px;
  border:0!important;
  border-bottom:1px solid var(--afm-border)!important;
  border-radius:0!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] .afm-quant-materials .tabs button {
  min-height:30px;
  padding:0 10px!important;
  border:0!important;
  border-radius:7px!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .afm-quant-materials .tabs button.active {
  background:var(--afm-brand-soft)!important;
  color:var(--afm-brand)!important;
}
html[data-site-shell="app"] .afm-quant-filter-row {
  min-height:45px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:5px 9px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-quant-filter-row label {
  height:32px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:0 8px;
  border:1px solid var(--afm-border);
  border-radius:7px;
  background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm-quant-filter-row label span {
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-quant-filter-row select {
  min-width:120px;
  height:100%;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:var(--afm-soft-text)!important;
  font-size:7px!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .afm-quant-filter-row button {
  min-height:32px;
  margin-left:auto;
  padding:0 9px;
  border:1px solid var(--afm-border);
  border-radius:7px;
  background:var(--afm-surface-2);
  color:var(--afm-muted);
  font-size:7px;
  cursor:pointer;
}
html[data-site-shell="app"] .afm-quant-table-wrap {
  overflow:auto;
  max-height:365px;
}
html[data-site-shell="app"] .afm-quant-table-wrap table {
  width:100%;
  border-collapse:collapse;
  font-size:8px;
}
html[data-site-shell="app"] .afm-quant-table-wrap th {
  position:sticky;
  top:0;
  z-index:2;
  height:32px;
  padding:0 9px;
  border-bottom:1px solid var(--afm-border);
  background:var(--afm-surface-2)!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
  font-weight:700!important;
  text-align:left;
  text-transform:uppercase;
}
html[data-site-shell="app"] .afm-quant-table-wrap td {
  height:31px;
  padding:0 9px;
  border-bottom:1px solid var(--afm-border);
  background:transparent!important;
  color:var(--afm-soft-text)!important;
  font-size:8px;
}
html[data-site-shell="app"] .afm-quant-table-wrap tr:hover td {
  background:var(--afm-brand-faint)!important;
}
html[data-site-shell="app"] .afm-quant-table-wrap .category-pill {
  border-radius:999px!important;
}
html[data-site-shell="app"] .afm-quant-pagination {
  min-height:42px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:8px;
  padding:5px 9px;
  border-top:1px solid var(--afm-border);
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-quant-pagination .pagination {
  justify-content:center;
}
html[data-site-shell="app"] .afm-quant-pagination select {
  justify-self:end;
  height:30px!important;
  padding:0 24px 0 8px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:7px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-soft-text)!important;
  font-size:7px!important;
}

@media(max-width:1280px){
  html[data-site-shell="app"] .afm-quant-kpis{grid-template-columns:repeat(4,1fr)}
  html[data-site-shell="app"] .afm-quant-kpis.is-board{grid-template-columns:repeat(3,1fr)}
  html[data-site-shell="app"] .afm-quant-analytics{grid-template-columns:1fr 1fr}
  html[data-site-shell="app"] .afm-quant-card.costs{grid-column:span 2;height:auto}
}
@media(max-width:820px){
  html[data-site-shell="app"] .afm-quant-head{align-items:flex-start;flex-direction:column}
  html[data-site-shell="app"] .afm-quant-kpis,html[data-site-shell="app"] .afm-quant-kpis.is-board{grid-template-columns:repeat(2,1fr)}
  html[data-site-shell="app"] .afm-quant-analytics{grid-template-columns:1fr}
  html[data-site-shell="app"] .afm-quant-card.costs{grid-column:auto}
  html[data-site-shell="app"] .afm-quant-filter-row{flex-wrap:wrap}
}

/* =====================================================================
   AF MODERN · USUÁRIOS
   ===================================================================== */
html[data-site-shell="app"] .afm-team-page{max-width:1700px;margin:0 auto}
html[data-site-shell="app"] .afm-team-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding:2px 0 14px;border-bottom:1px solid var(--afm-border)}
html[data-site-shell="app"] .afm-team-head h1{margin:5px 0 0;color:var(--afm-text)!important;font-size:29px;line-height:1;letter-spacing:-.04em}
html[data-site-shell="app"] .afm-team-head p{margin:6px 0 0;color:var(--afm-muted);font-size:10px}
html[data-site-shell="app"] .afm-team-add{min-height:36px;padding:0 12px;border:1px solid var(--afm-brand);border-radius:8px;background:var(--afm-brand);color:#fff;font-size:9px;font-weight:780;box-shadow:0 8px 20px color-mix(in srgb,var(--afm-brand) 18%,transparent);cursor:pointer}
html[data-site-shell="app"] .afm-team-toolbar{display:grid;grid-template-columns:minmax(260px,1.6fr) repeat(3,minmax(145px,.7fr));gap:7px;margin-top:10px;padding:8px;border:1px solid var(--afm-border);border-radius:10px;background:var(--afm-surface)}
html[data-site-shell="app"] .afm-team-toolbar label{height:38px;display:flex;align-items:center;gap:7px;padding:0 9px;border:1px solid var(--afm-border);border-radius:8px;background:var(--afm-surface-2)}
html[data-site-shell="app"] .afm-team-toolbar label>span{color:var(--afm-muted);font-size:7px;white-space:nowrap}
html[data-site-shell="app"] .afm-team-toolbar input,html[data-site-shell="app"] .afm-team-toolbar select{width:100%;height:100%;min-width:0;padding:0!important;border:0!important;background:transparent!important;color:var(--afm-soft-text)!important;font-size:8px!important;box-shadow:none!important}
html[data-site-shell="app"] .afm-team-search svg{width:14px;height:14px;stroke:var(--afm-muted);stroke-width:1.8}
html[data-site-shell="app"] .afm-team-stats{display:flex;gap:6px;margin:8px 0}
html[data-site-shell="app"] .afm-team-stats>span{min-width:105px;display:flex;align-items:baseline;gap:5px;padding:6px 9px;border-radius:7px;background:var(--afm-surface-2);color:var(--afm-muted)}
html[data-site-shell="app"] .afm-team-stats b{color:var(--afm-text);font-size:11px}
html[data-site-shell="app"] .afm-team-stats small{font-size:7px}
html[data-site-shell="app"] .afm-team-table-card{overflow:hidden;border:1px solid var(--afm-border);border-radius:10px;background:var(--afm-surface)}
html[data-site-shell="app"] .afm-team-table-card>header{min-height:55px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 11px;border-bottom:1px solid var(--afm-border)}
html[data-site-shell="app"] .afm-team-table-card h2{margin:0;color:var(--afm-text)!important;font-size:12px}
html[data-site-shell="app"] .afm-team-table-card p{margin:3px 0 0;color:var(--afm-muted);font-size:7px}
html[data-site-shell="app"] .afm-team-table-card>header>span{padding:5px 7px;border-radius:999px;background:var(--afm-brand-soft);color:var(--afm-brand);font-size:7px}
html[data-site-shell="app"] .afm-team-table-wrap{overflow:auto;max-height:560px}
html[data-site-shell="app"] .afm-team-table{width:100%;border-collapse:collapse}
html[data-site-shell="app"] .afm-team-table th{height:34px;padding:0 10px;background:var(--afm-surface-2)!important;border-bottom:1px solid var(--afm-border);color:var(--afm-muted)!important;font-size:7px!important;font-weight:700!important;text-align:left;text-transform:uppercase}
html[data-site-shell="app"] .afm-team-table td{height:55px;padding:0 10px;border-bottom:1px solid var(--afm-border);background:transparent!important;color:var(--afm-soft-text)!important;font-size:8px}
html[data-site-shell="app"] .afm-team-table tr:hover td{background:var(--afm-brand-faint)!important}
html[data-site-shell="app"] .afm-team-user{display:flex;align-items:center;gap:8px}
html[data-site-shell="app"] .afm-team-user .team-avatar{width:32px;height:32px;flex:0 0 32px;border-radius:50%!important}
html[data-site-shell="app"] .afm-team-user strong{display:block;color:var(--afm-text);font-size:9px}
html[data-site-shell="app"] .afm-team-user small{display:block;margin-top:2px;color:var(--afm-muted);font-size:7px}
html[data-site-shell="app"] .afm-team-status{display:inline-flex;align-items:center;gap:5px;min-height:22px;padding:0 7px;border-radius:999px;background:var(--afm-surface-3);color:var(--afm-muted);font-size:7px;font-weight:700}
html[data-site-shell="app"] .afm-team-status i{width:5px;height:5px;border-radius:50%;background:currentColor}
html[data-site-shell="app"] .afm-team-status.active{background:color-mix(in srgb,var(--afm-success) 9%,var(--afm-surface-2));color:var(--afm-success)}
html[data-site-shell="app"] .afm-team-status.inactive{background:color-mix(in srgb,var(--afm-danger) 7%,var(--afm-surface-2));color:var(--afm-danger)}
html[data-site-shell="app"] .afm-team-role,html[data-site-shell="app"] .afm-team-project-all{display:inline-flex;min-height:22px;align-items:center;padding:0 7px;border-radius:999px;background:var(--afm-surface-2);color:var(--afm-soft-text);font-size:7px}
html[data-site-shell="app"] .afm-team-more{width:31px;height:29px;border:1px solid var(--afm-border);border-radius:7px;background:var(--afm-surface-2);color:var(--afm-muted);font-weight:800;cursor:pointer}
html[data-site-shell="app"] .afm-team-table-card>footer{min-height:40px;display:flex;align-items:center;padding:0 10px;color:var(--afm-muted);font-size:7px}
html[data-site-shell="app"] .afm-team-table-card>footer b{color:var(--afm-soft-text)}

html[data-site-shell="app"] #team-member-modal .team-member-modal-card{width:min(760px,calc(100vw - 30px))!important;max-width:760px!important;padding:0!important;overflow:hidden;border-radius:14px!important}
html[data-site-shell="app"] #team-member-modal .team-modal-profile{padding:17px 19px!important;border-bottom:1px solid var(--afm-border)!important;background:linear-gradient(135deg,color-mix(in srgb,var(--afm-brand) 6%,var(--afm-surface)),var(--afm-surface))}
html[data-site-shell="app"] #team-member-modal .team-modal-avatar{width:58px!important;height:58px!important;border:2px solid color-mix(in srgb,var(--afm-brand) 35%,var(--afm-border))!important}
html[data-site-shell="app"] #team-member-modal .team-modal-profile-copy h3{font-size:17px!important;margin:3px 0!important;color:var(--afm-text)!important}
html[data-site-shell="app"] #team-member-modal .team-modal-profile-copy p{margin:3px 0 0!important;color:var(--afm-muted)!important;font-size:8px!important}
html[data-site-shell="app"] .afm-team-modal-tabs{height:44px;display:grid;grid-template-columns:repeat(4,1fr);border-bottom:1px solid var(--afm-border);background:var(--afm-surface-2)}
html[data-site-shell="app"] .afm-team-modal-tabs button{position:relative;border:0;background:transparent;color:var(--afm-muted);font-size:8px;font-weight:700;cursor:pointer}
html[data-site-shell="app"] .afm-team-modal-tabs button.is-active{color:var(--afm-brand);background:var(--afm-brand-faint)}
html[data-site-shell="app"] .afm-team-modal-tabs button.is-active:after{content:"";position:absolute;left:18px;right:18px;bottom:0;height:2px;background:var(--afm-brand)}
html[data-site-shell="app"] #team-member-modal .team-manage-grid{display:block!important;padding:14px!important}
html[data-site-shell="app"] #team-member-modal .team-modal-card-section{margin:0!important;padding:13px!important;border:1px solid var(--afm-border)!important;border-radius:9px!important;background:var(--afm-surface-2)!important}
html[data-site-shell="app"] #team-member-modal .team-modal-card-section[hidden]{display:none!important}
html[data-site-shell="app"] #team-member-modal .team-form-grid{grid-template-columns:1fr 1fr!important;gap:10px!important}
html[data-site-shell="app"] #team-member-modal .team-form-grid label{color:var(--afm-soft-text)!important;font-size:8px!important}
html[data-site-shell="app"] #team-member-modal input,html[data-site-shell="app"] #team-member-modal select{height:36px!important;margin-top:4px!important;font-size:8px!important}
html[data-site-shell="app"] #team-member-modal .v1-modal-actions{padding:10px 14px!important;border-top:1px solid var(--afm-border)!important;background:var(--afm-surface-2)!important}
html[data-site-shell="app"] #team-create-modal .team-create-modal-card{width:min(920px,calc(100vw - 30px))!important;max-width:920px!important;border-radius:14px!important}
html[data-site-shell="app"] #team-create-modal .team-modal-grid{grid-template-columns:1fr 1fr!important;gap:8px!important}
html[data-site-shell="app"] #team-create-modal .team-modal-card-section{border:1px solid var(--afm-border)!important;border-radius:9px!important;background:var(--afm-surface-2)!important}
@media(max-width:900px){
 html[data-site-shell="app"] .afm-team-toolbar{grid-template-columns:1fr 1fr}
 html[data-site-shell="app"] #team-create-modal .team-modal-grid{grid-template-columns:1fr!important}
}
@media(max-width:620px){
 html[data-site-shell="app"] .afm-team-head{align-items:flex-start;flex-direction:column}
 html[data-site-shell="app"] .afm-team-toolbar{grid-template-columns:1fr}
 html[data-site-shell="app"] .afm-team-stats{flex-wrap:wrap}
 html[data-site-shell="app"] #team-member-modal .team-form-grid{grid-template-columns:1fr!important}
}

/* =====================================================================
   AF MODERN · USUÁRIOS
   ===================================================================== */
html[data-site-shell="app"] .afm-team-page {
  max-width:1700px;
  margin:0 auto;
}
html[data-site-shell="app"] .afm-team-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  padding:2px 0 15px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-team-head h1 {
  margin:5px 0 0;
  color:var(--afm-text)!important;
  font-size:29px;
  line-height:1;
  letter-spacing:-.04em;
}
html[data-site-shell="app"] .afm-team-head p {
  margin:6px 0 0;
  color:var(--afm-muted);
  font-size:10px;
}
html[data-site-shell="app"] .afm-team-add {
  min-height:36px;
  display:inline-flex;
  align-items:center;
  padding:0 13px;
  border:1px solid var(--afm-brand);
  border-radius:8px;
  background:var(--afm-brand);
  color:#fff;
  font-size:9px;
  font-weight:780;
  cursor:pointer;
  box-shadow:0 8px 20px color-mix(in srgb,var(--afm-brand) 18%,transparent);
}
html[data-site-shell="app"] .afm-team-toolbar {
  display:grid;
  grid-template-columns:minmax(260px,1.5fr) repeat(3,minmax(145px,.7fr));
  gap:8px;
  margin-top:10px;
}
html[data-site-shell="app"] .afm-team-toolbar label {
  min-width:0;
  height:38px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:0 9px;
  border:1px solid var(--afm-border);
  border-radius:8px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm-team-toolbar label > span {
  color:var(--afm-muted);
  font-size:7px;
  font-weight:700;
  white-space:nowrap;
}
html[data-site-shell="app"] .afm-team-toolbar input,
html[data-site-shell="app"] .afm-team-toolbar select {
  min-width:0;
  width:100%;
  height:100%;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .afm-team-search svg {
  width:14px;
  height:14px;
  flex:0 0 14px;
  stroke:var(--afm-muted);
  stroke-width:1.8;
}
html[data-site-shell="app"] .afm-team-stats {
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:8px;
}
html[data-site-shell="app"] .afm-team-stats > span {
  min-height:28px;
  display:inline-flex;
  align-items:baseline;
  gap:5px;
  padding:0 9px;
  border:1px solid var(--afm-border);
  border-radius:7px;
  background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm-team-stats b {
  color:var(--afm-text);
  font-size:10px;
}
html[data-site-shell="app"] .afm-team-stats small {
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-team-table-card {
  margin-top:8px;
  overflow:hidden;
  border:1px solid var(--afm-border);
  border-radius:10px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm-team-table-card > header {
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:9px 11px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-team-table-card > header h2 {
  margin:0;
  color:var(--afm-text)!important;
  font-size:12px;
}
html[data-site-shell="app"] .afm-team-table-card > header p {
  margin:3px 0 0;
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-team-table-card > header > span {
  padding:5px 7px;
  border-radius:999px;
  background:var(--afm-brand-soft);
  color:var(--afm-brand);
  font-size:7px;
  font-weight:700;
}
html[data-site-shell="app"] .afm-team-table-wrap {
  overflow:auto;
}
html[data-site-shell="app"] .afm-team-table {
  width:100%;
  border-collapse:collapse;
}
html[data-site-shell="app"] .afm-team-table th {
  height:34px;
  padding:0 10px;
  border-bottom:1px solid var(--afm-border);
  background:var(--afm-surface-2)!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
  font-weight:720!important;
  text-align:left;
  text-transform:uppercase;
  white-space:nowrap;
}
html[data-site-shell="app"] .afm-team-table td {
  height:58px;
  padding:0 10px;
  border-bottom:1px solid var(--afm-border);
  background:transparent!important;
  color:var(--afm-soft-text)!important;
  font-size:8px;
  white-space:nowrap;
}
html[data-site-shell="app"] .afm-team-table tr:hover td {
  background:var(--afm-brand-faint)!important;
}
html[data-site-shell="app"] .afm-team-user {
  display:flex;
  align-items:center;
  gap:9px;
}
html[data-site-shell="app"] .afm-team-user .team-avatar {
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid color-mix(in srgb,var(--afm-brand) 30%,var(--afm-border));
  border-radius:50%;
  background:var(--afm-brand-soft);
  color:var(--afm-brand);
  font-size:9px;
  font-weight:800;
}
html[data-site-shell="app"] .afm-team-user .team-avatar img {
  width:100%;
  height:100%;
  object-fit:cover;
}
html[data-site-shell="app"] .afm-team-user strong {
  display:block;
  color:var(--afm-text);
  font-size:8px;
}
html[data-site-shell="app"] .afm-team-user small {
  display:block;
  margin-top:3px;
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-team-status {
  display:inline-flex;
  align-items:center;
  gap:5px;
  min-height:22px;
  padding:0 7px;
  border-radius:999px;
  font-size:7px;
  font-weight:700;
}
html[data-site-shell="app"] .afm-team-status i {
  width:5px;
  height:5px;
  border-radius:50%;
  background:currentColor;
}
html[data-site-shell="app"] .afm-team-status.active {
  background:color-mix(in srgb,var(--afm-success) 9%,var(--afm-surface-2));
  color:var(--afm-success);
}
html[data-site-shell="app"] .afm-team-status.inactive {
  background:var(--afm-surface-3);
  color:var(--afm-muted);
}
html[data-site-shell="app"] .afm-team-role,
html[data-site-shell="app"] .afm-team-project-all {
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:0 7px;
  border:1px solid var(--afm-border);
  border-radius:999px;
  background:var(--afm-surface-2);
  color:var(--afm-soft-text);
  font-size:7px;
}
html[data-site-shell="app"] .afm-team-project-all {
  color:var(--afm-brand);
  background:var(--afm-brand-faint);
}
html[data-site-shell="app"] .afm-team-more {
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border:1px solid var(--afm-border);
  border-radius:7px;
  background:var(--afm-surface-2);
  color:var(--afm-muted);
  font-size:9px;
  cursor:pointer;
}
html[data-site-shell="app"] .afm-team-table-card > footer {
  min-height:40px;
  display:flex;
  align-items:center;
  padding:0 11px;
  border-top:1px solid var(--afm-border);
  color:var(--afm-muted);
  font-size:7px;
}

/* Modal de gestão inspirado no mockup, mantendo os forms reais existentes. */
html[data-site-shell="app"] #team-member-modal.v1-modal-overlay {
  padding:18px;
  background:rgba(1,7,12,.72)!important;
  backdrop-filter:blur(5px);
}
html[data-site-shell="app"] #team-member-modal .team-member-modal-card {
  width:min(760px,calc(100vw - 30px))!important;
  max-width:760px!important;
  max-height:min(88vh,760px)!important;
  overflow:auto;
  padding:0!important;
  border:1px solid color-mix(in srgb,var(--afm-brand) 22%,var(--afm-border))!important;
  border-radius:12px!important;
  background:var(--afm-surface)!important;
  box-shadow:0 30px 80px rgba(0,0,0,.48)!important;
}
html[data-site-shell="app"] #team-member-modal .team-modal-profile {
  min-height:112px;
  display:grid!important;
  grid-template-columns:64px minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  margin:0!important;
  padding:16px 18px!important;
  border-bottom:1px solid var(--afm-border);
  background:
    radial-gradient(circle at 85% 15%,color-mix(in srgb,var(--afm-brand) 12%,transparent),transparent 35%),
    var(--afm-surface);
}
html[data-site-shell="app"] #team-member-modal .team-modal-avatar {
  width:60px;
  height:60px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:2px solid color-mix(in srgb,var(--afm-brand) 35%,var(--afm-border));
  border-radius:50%;
  background:var(--afm-brand-soft);
  color:var(--afm-brand);
  font-size:16px;
  font-weight:800;
}
html[data-site-shell="app"] #team-member-modal .team-modal-avatar img {
  width:100%;
  height:100%;
  object-fit:cover;
}
html[data-site-shell="app"] #team-member-modal .team-modal-profile-copy .settings-section-eyebrow {
  color:var(--afm-brand)!important;
  font-size:8px!important;
  letter-spacing:.08em;
  text-transform:uppercase;
}
html[data-site-shell="app"] #team-member-modal .team-modal-profile-copy h3 {
  margin:4px 0 0!important;
  color:var(--afm-text)!important;
  font-size:18px!important;
  letter-spacing:-.025em;
}
html[data-site-shell="app"] #team-member-modal .team-modal-profile-copy p {
  margin:5px 0 0!important;
  color:var(--afm-muted)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] #team-member-modal .team-modal-close {
  align-self:start;
  width:30px;
  height:30px;
  border:1px solid var(--afm-border)!important;
  border-radius:7px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-muted)!important;
}
html[data-site-shell="app"] .afm-team-modal-tabs {
  min-height:44px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  padding:0 12px;
  border-bottom:1px solid var(--afm-border);
  background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm-team-modal-tabs button {
  position:relative;
  border:0;
  background:transparent;
  color:var(--afm-muted);
  font-size:8px;
  font-weight:700;
  cursor:pointer;
}
html[data-site-shell="app"] .afm-team-modal-tabs button.is-active {
  color:var(--afm-brand);
}
html[data-site-shell="app"] .afm-team-modal-tabs button.is-active::after {
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  bottom:0;
  height:2px;
  border-radius:999px 999px 0 0;
  background:var(--afm-brand);
}
html[data-site-shell="app"] #team-member-modal .team-manage-grid {
  display:block!important;
  padding:14px 16px 4px;
}
html[data-site-shell="app"] #team-member-modal .team-manage-grid > .team-modal-card-section {
  grid-column:auto!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
html[data-site-shell="app"] #team-member-modal .team-manage-grid > .team-modal-card-section[hidden] {
  display:none!important;
}
html[data-site-shell="app"] #team-member-modal .field-caption {
  display:block;
  margin:0 0 10px!important;
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
  font-weight:800;
  letter-spacing:.02em;
  text-transform:none!important;
}
html[data-site-shell="app"] #team-member-modal .team-form-grid {
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
}
html[data-site-shell="app"] #team-member-modal label {
  display:grid!important;
  gap:5px!important;
  color:var(--afm-soft-text)!important;
  font-size:7px!important;
  font-weight:650!important;
}
html[data-site-shell="app"] #team-member-modal input,
html[data-site-shell="app"] #team-member-modal select {
  width:100%!important;
  min-height:38px!important;
  padding:0 10px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:8px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-text)!important;
  font-size:8px!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] #team-member-modal .team-details-form .v1-button {
  min-height:36px;
  align-self:end;
  grid-column:1 / -1;
  justify-self:end;
}
html[data-site-shell="app"] #team-member-modal .team-access-section .team-modal-row-actions {
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:10px!important;
}
html[data-site-shell="app"] #team-member-modal .team-access-section .team-modal-row-actions form {
  display:grid!important;
  grid-template-columns:1fr auto!important;
  gap:8px!important;
  align-items:end!important;
}
html[data-site-shell="app"] #team-member-modal .team-project-access-hint {
  margin:0 0 10px;
  color:var(--afm-muted);
  font-size:7px;
  line-height:1.5;
}
html[data-site-shell="app"] #team-member-modal .team-all-projects-toggle {
  margin:0 0 10px!important;
  padding:9px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:8px!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] #team-member-modal .tech-project-picker {
  padding:9px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:8px!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] #team-member-modal .team-password-form {
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:10px!important;
}
html[data-site-shell="app"] #team-member-modal .team-password-form button {
  grid-column:1 / -1!important;
  justify-self:end;
}
html[data-site-shell="app"] #team-member-modal > .team-member-modal-card > .v1-modal-actions {
  min-height:54px;
  margin:8px 0 0!important;
  padding:9px 16px!important;
  border-top:1px solid var(--afm-border);
  background:var(--afm-surface-2);
}
html[data-site-shell="app"] #team-member-modal > .team-member-modal-card > .v1-modal-actions .v1-button {
  min-height:34px;
  padding:0 12px;
  border-radius:8px;
}

@media(max-width:900px){
  html[data-site-shell="app"] .afm-team-toolbar{grid-template-columns:1fr 1fr}
  html[data-site-shell="app"] #team-member-modal .team-form-grid,
  html[data-site-shell="app"] #team-member-modal .team-password-form{grid-template-columns:1fr!important}
}
@media(max-width:600px){
  html[data-site-shell="app"] .afm-team-head{align-items:flex-start;flex-direction:column}
  html[data-site-shell="app"] .afm-team-toolbar{grid-template-columns:1fr}
  html[data-site-shell="app"] .afm-team-stats{flex-wrap:wrap}
}
html[data-site-shell="app"] .afm-team-table tr.team-member-row {
  display:table-row!important;
  grid-template-columns:none!important;
  min-height:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
html[data-site-shell="app"] .afm-team-table tr.team-member-row td {
  display:table-cell!important;
}
html[data-site-shell="app"] #team-member-modal .afm-team-modal-titlebar {
  min-height:58px;
  display:flex;
  align-items:center;
  padding:12px 18px 9px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] #team-member-modal .afm-team-modal-titlebar strong {
  display:block;
  color:var(--afm-text);
  font-size:16px;
  letter-spacing:-.025em;
}
html[data-site-shell="app"] #team-member-modal .afm-team-modal-titlebar span {
  display:block;
  margin-top:3px;
  color:var(--afm-muted);
  font-size:8px;
}
html[data-site-shell="app"] #team-member-modal .team-modal-profile {
  min-height:88px!important;
}
html[data-site-shell="app"] #team-member-modal .team-modal-profile-copy .settings-section-eyebrow {
  display:none!important;
}

/* =====================================================================
   AF MODERN · CUSTOS E ORÇAMENTO
   ===================================================================== */
html[data-site-shell="app"] .afm-bom-page {
  max-width:1700px;
  margin:0 auto;
}
html[data-site-shell="app"] .afm-bom-head {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  padding:2px 0 14px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-bom-head h1 {
  margin:5px 0 0;
  color:var(--afm-text)!important;
  font-size:29px;
  line-height:1;
  letter-spacing:-.04em;
}
html[data-site-shell="app"] .afm-bom-head p {
  margin:6px 0 0;
  color:var(--afm-muted);
  font-size:10px;
}
html[data-site-shell="app"] .afm-bom-project-meta {
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:9px;
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-bom-project-meta strong {
  color:var(--afm-soft-text);
  font-size:8px;
}
html[data-site-shell="app"] .afm-bom-project-meta span {
  padding-left:8px;
  border-left:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-bom-project-meta i {
  min-height:20px;
  display:inline-flex;
  align-items:center;
  padding:0 7px;
  border-radius:999px;
  background:var(--afm-brand-soft);
  color:var(--afm-brand);
  font-style:normal;
  font-weight:700;
}
html[data-site-shell="app"] .afm-bom-actions {
  display:flex;
  gap:7px;
}
html[data-site-shell="app"] .afm-bom-actions button {
  min-height:35px;
  padding:0 11px;
  border:1px solid var(--afm-border);
  border-radius:8px;
  background:var(--afm-surface-2);
  color:var(--afm-soft-text);
  font-size:8px;
  font-weight:720;
  cursor:pointer;
}
html[data-site-shell="app"] .afm-bom-actions button.primary {
  border-color:var(--afm-brand);
  background:var(--afm-brand);
  color:#fff;
  box-shadow:0 8px 20px color-mix(in srgb,var(--afm-brand) 18%,transparent);
}
html[data-site-shell="app"] .afm-bom-actions button:disabled {
  opacity:.45;
  cursor:not-allowed;
}
html[data-site-shell="app"] .afm-bom-context {
  min-height:84px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-top:9px;
  padding:11px 12px;
  border:1px solid var(--afm-border);
  border-radius:10px;
  background:
    radial-gradient(circle at 94% 10%,color-mix(in srgb,var(--afm-brand) 9%,transparent),transparent 28%),
    var(--afm-surface);
}
html[data-site-shell="app"] .afm-bom-context small {
  color:var(--afm-brand);
  font-size:7px;
  font-weight:780;
  letter-spacing:.06em;
  text-transform:uppercase;
}
html[data-site-shell="app"] .afm-bom-context h2 {
  margin:4px 0 0;
  color:var(--afm-text)!important;
  font-size:17px;
}
html[data-site-shell="app"] .afm-bom-context p {
  margin:4px 0 0;
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-bom-scope-stats {
  display:grid;
  grid-template-columns:repeat(4,minmax(76px,1fr));
  gap:6px;
}
html[data-site-shell="app"] .afm-bom-scope-stats span {
  min-width:78px;
  min-height:53px;
  display:grid;
  align-content:center;
  padding:6px 9px;
  border:1px solid var(--afm-border);
  border-radius:8px;
  background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm-bom-scope-stats strong {
  color:var(--afm-text);
  font-size:15px;
  line-height:1;
}
html[data-site-shell="app"] .afm-bom-scope-stats small {
  margin-top:5px;
  color:var(--afm-muted);
  font-size:6px;
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
}
html[data-site-shell="app"] .afm-bom-kpis {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:9px;
}
html[data-site-shell="app"] .afm-bom-kpis article {
  min-height:88px;
  display:grid;
  grid-template-columns:38px minmax(0,1fr);
  align-items:center;
  gap:9px;
  padding:10px;
  border:1px solid var(--afm-border);
  border-radius:10px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm-bom-kpis .icon {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:8px;
  color:var(--tone,var(--afm-brand));
  background:color-mix(in srgb,var(--tone,var(--afm-brand)) 11%,var(--afm-surface-2));
  font-size:9px;
  font-weight:800;
}
html[data-site-shell="app"] .afm-bom-kpis article.blue{--tone:#378fff}
html[data-site-shell="app"] .afm-bom-kpis article.purple{--tone:#9e69ff}
html[data-site-shell="app"] .afm-bom-kpis article.green{--tone:#28d693}
html[data-site-shell="app"] .afm-bom-kpis article.orange{--tone:#ff9c2e}
html[data-site-shell="app"] .afm-bom-kpis small {
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-bom-kpis strong {
  display:block;
  margin-top:4px;
  color:var(--afm-text);
  font-size:17px;
  line-height:1;
}
html[data-site-shell="app"] .afm-bom-kpis em {
  display:block;
  margin-top:6px;
  color:var(--afm-success);
  font-size:7px;
  font-style:normal;
}
html[data-site-shell="app"] .afm-bom-grid {
  display:grid;
  grid-template-columns:.8fr 1.2fr;
  gap:8px;
  margin-top:9px;
}
html[data-site-shell="app"] .afm-bom-card {
  min-width:0;
  min-height:178px;
  padding:11px;
  border:1px solid var(--afm-border);
  border-radius:10px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm-bom-card > header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:9px;
  padding-bottom:9px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-bom-card h2 {
  margin:0;
  color:var(--afm-text)!important;
  font-size:11px;
}
html[data-site-shell="app"] .afm-bom-card header p {
  margin:3px 0 0;
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] #bom-price-status {
  padding:5px 7px;
  border-radius:999px;
  background:var(--afm-surface-2);
  color:var(--afm-muted);
  font-size:7px;
  font-weight:700;
}
html[data-site-shell="app"] #bom-price-status.success {
  color:var(--afm-success);
  background:color-mix(in srgb,var(--afm-success) 8%,var(--afm-surface-2));
}
html[data-site-shell="app"] #bom-price-status.warn {
  color:var(--afm-warning);
  background:color-mix(in srgb,var(--afm-warning) 8%,var(--afm-surface-2));
}
html[data-site-shell="app"] .afm-bom-total {
  padding:13px 0 9px;
}
html[data-site-shell="app"] .afm-bom-total small {
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-bom-total strong {
  display:block;
  margin-top:4px;
  color:var(--afm-text);
  font-size:24px;
  letter-spacing:-.035em;
}
html[data-site-shell="app"] .afm-bom-total p {
  margin:5px 0 0;
  color:var(--afm-muted);
  font-size:7px;
  line-height:1.45;
}
html[data-site-shell="app"] .afm-bom-guide {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:5px;
}
html[data-site-shell="app"] .afm-bom-guide span {
  min-height:36px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:5px 7px;
  border-radius:7px;
  background:var(--afm-surface-2);
  color:var(--afm-muted);
  font-size:6px;
}
html[data-site-shell="app"] .afm-bom-guide b {
  width:17px;
  height:17px;
  display:grid;
  place-items:center;
  flex:0 0 17px;
  border-radius:50%;
  background:var(--afm-brand-soft);
  color:var(--afm-brand);
  font-size:6px;
}
html[data-site-shell="app"] .afm-bom-manual-form {
  display:grid;
  grid-template-columns:minmax(180px,1.5fr) minmax(130px,.8fr) 90px 90px auto;
  gap:7px;
  align-items:end;
  padding-top:10px;
}
html[data-site-shell="app"] .afm-bom-manual-form label {
  min-width:0;
  display:grid;
  gap:5px;
  color:var(--afm-muted);
  font-size:7px;
  font-weight:700;
}
html[data-site-shell="app"] .afm-bom-manual-form input,
html[data-site-shell="app"] .afm-bom-manual-form select {
  width:100%;
  min-height:35px;
  padding:0 9px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:7px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .afm-bom-manual-form button {
  min-height:35px;
  padding:0 10px;
  border:1px solid var(--afm-brand);
  border-radius:7px;
  background:var(--afm-brand);
  color:#fff;
  font-size:7px;
  font-weight:750;
}
html[data-site-shell="app"] .afm-bom-table-card {
  margin-top:9px;
  overflow:hidden;
  border:1px solid var(--afm-border);
  border-radius:10px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm-bom-table-card > header {
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 11px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-bom-table-card > header h2 {
  margin:0;
  color:var(--afm-text)!important;
  font-size:12px;
}
html[data-site-shell="app"] .afm-bom-table-card > header p {
  margin:3px 0 0;
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-bom-table-card > header > span {
  padding:5px 7px;
  border-radius:999px;
  background:var(--afm-brand-soft);
  color:var(--afm-brand);
  font-size:7px;
}
html[data-site-shell="app"] .afm-bom-table-wrap {
  max-height:390px;
  overflow:auto;
}
html[data-site-shell="app"] .afm-bom-table-wrap table {
  width:100%;
  border-collapse:collapse;
}
html[data-site-shell="app"] .afm-bom-table-wrap th {
  position:sticky;
  top:0;
  z-index:2;
  height:33px;
  padding:0 9px;
  border-bottom:1px solid var(--afm-border);
  background:var(--afm-surface-2)!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
  font-weight:700!important;
  text-align:left;
  text-transform:uppercase;
}
html[data-site-shell="app"] .afm-bom-table-wrap td {
  min-height:38px;
  padding:7px 9px;
  border-bottom:1px solid var(--afm-border);
  background:transparent!important;
  color:var(--afm-soft-text)!important;
  font-size:8px;
}
html[data-site-shell="app"] .afm-bom-table-wrap td strong {
  display:block;
  color:var(--afm-text);
  font-size:8px;
}
html[data-site-shell="app"] .afm-bom-table-wrap td small {
  display:block;
  margin-top:2px;
  color:var(--afm-muted);
  font-size:6px;
}
html[data-site-shell="app"] .afm-bom-table-wrap .bom-unit-price {
  width:92px!important;
  min-height:30px!important;
  padding:0 8px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:7px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .afm-bom-table-wrap .bom-row-total {
  color:var(--afm-success)!important;
  font-weight:700;
}
html[data-site-shell="app"] .afm-bom-table-wrap .bom-row-total.pending {
  color:var(--afm-warning)!important;
}
html[data-site-shell="app"] .afm-bom-table-card > footer {
  min-height:40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 10px;
  border-top:1px solid var(--afm-border);
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-bom-feedback {
  min-height:20px;
  margin:6px 0 0;
  color:var(--afm-brand);
  font-size:7px;
}

@media(max-width:1050px){
  html[data-site-shell="app"] .afm-bom-grid{grid-template-columns:1fr}
  html[data-site-shell="app"] .afm-bom-manual-form{grid-template-columns:1fr 1fr 1fr}
  html[data-site-shell="app"] .afm-bom-manual-form .wide{grid-column:span 2}
}
@media(max-width:760px){
  html[data-site-shell="app"] .afm-bom-head{align-items:flex-start;flex-direction:column}
  html[data-site-shell="app"] .afm-bom-context{align-items:flex-start;flex-direction:column}
  html[data-site-shell="app"] .afm-bom-kpis{grid-template-columns:1fr 1fr}
  html[data-site-shell="app"] .afm-bom-scope-stats{grid-template-columns:1fr 1fr}
}

/* =====================================================================
   AF MODERN · FINANCEIRO
   ===================================================================== */
html[data-site-shell="app"] .finance-redesign {
  max-width:1700px;
  margin:0 auto;
}
html[data-site-shell="app"] .finance-redesign > .v1-page-head {
  min-height:78px;
  align-items:flex-end!important;
  padding:2px 0 14px!important;
  border-bottom:1px solid var(--afm-border)!important;
}
html[data-site-shell="app"] .finance-redesign > .v1-page-head h1 {
  margin:5px 0 0!important;
  color:var(--afm-text)!important;
  font-size:29px!important;
  line-height:1!important;
  letter-spacing:-.04em!important;
}
html[data-site-shell="app"] .finance-redesign > .v1-page-head p {
  margin:6px 0 0!important;
  color:var(--afm-muted)!important;
  font-size:9px!important;
}
html[data-site-shell="app"] .finance-redesign > .v1-page-head .v1-button {
  min-height:35px;
  padding:0 11px;
  border-radius:8px;
  font-size:8px;
}
html[data-site-shell="app"] .finance-redesign > .v1-stat-grid {
  gap:8px!important;
  margin-top:10px!important;
}
html[data-site-shell="app"] .finance-redesign > .v1-stat-grid .v1-stat {
  min-height:92px!important;
  height:auto!important;
  padding:10px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:10px!important;
  background:var(--afm-surface)!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .finance-redesign > .v1-stat-grid .v1-stat-icon {
  width:36px!important;
  height:36px!important;
  border-radius:8px!important;
  background:color-mix(in srgb,var(--stat-color) 10%,var(--afm-surface-2))!important;
}
html[data-site-shell="app"] .finance-redesign > .v1-stat-grid .v1-stat-icon svg {
  width:18px!important;
  height:18px!important;
}
html[data-site-shell="app"] .finance-redesign > .v1-stat-grid .v1-stat small {
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .finance-redesign > .v1-stat-grid .v1-stat strong {
  margin-top:4px!important;
  color:var(--afm-text)!important;
  font-size:18px!important;
  line-height:1.05!important;
  letter-spacing:-.025em;
}
html[data-site-shell="app"] .finance-redesign > .v1-stat-grid .v1-stat em {
  margin-top:5px!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .finance-redesign .v1-layout {
  grid-template-columns:minmax(0,1fr) 330px!important;
  gap:9px!important;
  margin-top:9px!important;
}
html[data-site-shell="app"] .finance-redesign .v1-panel {
  border:1px solid var(--afm-border)!important;
  border-radius:10px!important;
  background:var(--afm-surface)!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .finance-redesign .v1-panel-head {
  min-height:54px!important;
  padding:9px 11px!important;
  border-bottom:1px solid var(--afm-border)!important;
}
html[data-site-shell="app"] .finance-redesign .v1-panel-head h2 {
  color:var(--afm-text)!important;
  font-size:12px!important;
}
html[data-site-shell="app"] .finance-redesign .v1-panel-head p {
  margin-top:3px!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .finance-redesign .v1-tabs {
  min-height:40px!important;
  padding:4px 7px!important;
  gap:4px!important;
  border-bottom:1px solid var(--afm-border)!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] .finance-redesign .v1-tabs button {
  min-height:30px!important;
  padding:0 10px!important;
  border:0!important;
  border-radius:7px!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .finance-redesign .v1-tabs button.active {
  background:var(--afm-brand-soft)!important;
  color:var(--afm-brand)!important;
}
html[data-site-shell="app"] .finance-redesign .v1-toolbar {
  min-height:45px!important;
  padding:5px 9px!important;
  border-bottom:1px solid var(--afm-border)!important;
  background:transparent!important;
}
html[data-site-shell="app"] .finance-redesign .v1-toolbar input {
  width:100%!important;
  min-height:34px!important;
  padding:0 10px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:8px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .finance-redesign .v1-table-wrap {
  max-height:420px;
  overflow:auto;
}
html[data-site-shell="app"] .finance-redesign .v1-table th {
  height:33px!important;
  padding:0 9px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
  font-weight:700!important;
}
html[data-site-shell="app"] .finance-redesign .v1-table td {
  height:39px!important;
  padding:0 9px!important;
  border-bottom:1px solid var(--afm-border)!important;
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .finance-redesign .v1-pagination {
  min-height:40px!important;
  padding:0 10px!important;
  border-top:1px solid var(--afm-border)!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .finance-redesign .v1-detail {
  gap:9px!important;
}
html[data-site-shell="app"] .finance-redesign .v1-detail .v1-panel {
  margin-bottom:0!important;
}
html[data-site-shell="app"] .finance-redesign .v1-panel-body {
  padding:11px!important;
}
html[data-site-shell="app"] .finance-redesign .v1-usage-row {
  padding:9px 0!important;
}
html[data-site-shell="app"] .finance-redesign .v1-usage-head strong {
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .finance-redesign .v1-usage-head span {
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .finance-redesign .v1-usage-bar {
  height:6px!important;
  margin-top:6px!important;
  border-radius:999px!important;
  background:var(--afm-surface-3)!important;
}
html[data-site-shell="app"] .finance-redesign .v1-usage-bar span {
  border-radius:999px!important;
  background:var(--afm-brand)!important;
}
html[data-site-shell="app"] .finance-redesign > article.v1-panel {
  margin-top:9px!important;
}
html[data-site-shell="app"] .finance-redesign .finance-plan-change select {
  border-color:var(--afm-border)!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-text)!important;
  font-size:8px!important;
}
@media(max-width:1050px){
  html[data-site-shell="app"] .finance-redesign > .v1-stat-grid{grid-template-columns:repeat(3,1fr)!important}
  html[data-site-shell="app"] .finance-redesign .v1-layout{grid-template-columns:1fr!important}
}
@media(max-width:700px){
  html[data-site-shell="app"] .finance-redesign > .v1-stat-grid{grid-template-columns:1fr 1fr!important}
}

/* =====================================================================
   AF MODERN · AJUDA / WIKI
   ===================================================================== */
html[data-site-shell="app"] .help-redesign {
  max-width:1700px;
  margin:0 auto;
}
html[data-site-shell="app"] .help-redesign .help-page-heading {
  min-height:78px;
  padding:2px 0 14px!important;
  border-bottom:1px solid var(--afm-border)!important;
}
html[data-site-shell="app"] .help-redesign .help-page-heading h1 {
  margin-top:5px!important;
  color:var(--afm-text)!important;
  font-size:29px!important;
  line-height:1!important;
  letter-spacing:-.04em!important;
}
html[data-site-shell="app"] .help-redesign .help-page-heading p {
  margin-top:6px!important;
  color:var(--afm-muted)!important;
  font-size:9px!important;
}
html[data-site-shell="app"] .help-redesign .help-layout {
  grid-template-columns:250px minmax(0,1fr)!important;
  gap:10px!important;
  margin-top:9px!important;
}
html[data-site-shell="app"] .help-redesign .help-nav {
  position:sticky;
  top:calc(var(--af-site-topbar-height,66px) + 12px);
  max-height:calc(100vh - var(--af-site-topbar-height,66px) - 30px);
  overflow:auto;
  padding:7px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:10px!important;
  background:var(--afm-surface)!important;
  scrollbar-width:thin;
}
html[data-site-shell="app"] .afm-help-search {
  min-height:34px;
  display:flex;
  align-items:center;
  gap:6px;
  margin-bottom:6px;
  padding:0 8px;
  border:1px solid var(--afm-border);
  border-radius:7px;
  background:var(--afm-surface-2);
  color:var(--afm-muted);
}
html[data-site-shell="app"] .afm-help-search > span {
  font-size:13px;
  line-height:1;
}
html[data-site-shell="app"] .afm-help-search input {
  min-width:0;
  width:100%;
  height:32px;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .afm-help-search input::placeholder {
  color:var(--afm-muted);
}
html[data-site-shell="app"] .help-redesign .help-nav > a {
  min-height:48px!important;
  margin:2px 0!important;
  padding:7px 8px!important;
  border:1px solid transparent!important;
  border-radius:8px!important;
  background:transparent!important;
}
html[data-site-shell="app"] .help-redesign .help-nav > a:hover {
  border-color:var(--afm-border)!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] .help-redesign .help-nav > a.active {
  border-color:color-mix(in srgb,var(--afm-brand) 30%,var(--afm-border))!important;
  background:var(--afm-brand-soft)!important;
}
html[data-site-shell="app"] .help-redesign .help-nav > a > span:last-child {
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
  font-weight:700!important;
}
html[data-site-shell="app"] .help-redesign .help-nav > a small {
  margin-top:2px!important;
  color:var(--afm-muted)!important;
  font-size:6px!important;
  line-height:1.25!important;
}
html[data-site-shell="app"] .afm-help-empty {
  margin:8px;
  color:var(--afm-muted);
  font-size:8px;
  text-align:center;
}
html[data-site-shell="app"] .help-redesign .help-article {
  padding:18px 22px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:10px!important;
  background:var(--afm-surface)!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .help-redesign .help-article > .help-lead {
  color:var(--afm-soft-text)!important;
  font-size:13px!important;
  line-height:1.62!important;
}
html[data-site-shell="app"] .help-redesign .help-article h2 {
  margin-top:22px!important;
  color:var(--afm-text)!important;
  font-size:15px!important;
}
html[data-site-shell="app"] .help-redesign .help-article h3 {
  margin-top:16px!important;
  color:var(--afm-soft-text)!important;
  font-size:11px!important;
}
html[data-site-shell="app"] .help-redesign .help-article p,
html[data-site-shell="app"] .help-redesign .help-article li {
  color:var(--afm-soft-text)!important;
  font-size:10px!important;
  line-height:1.65!important;
}
html[data-site-shell="app"] .help-redesign .help-figure {
  margin:14px 0!important;
  padding:6px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:9px!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] .help-redesign .help-figure img {
  display:block;
  width:100%;
  border-radius:6px;
}
html[data-site-shell="app"] .help-redesign .help-figure figcaption {
  padding:6px 4px 2px;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .help-redesign .help-next {
  margin-top:20px!important;
  padding-top:12px!important;
  border-top:1px solid var(--afm-border)!important;
}
html[data-site-shell="app"] .help-redesign .help-next .v1-button {
  min-height:34px;
  border-radius:8px;
  font-size:8px;
}
@media(max-width:900px){
  html[data-site-shell="app"] .help-redesign .help-layout{grid-template-columns:1fr!important}
  html[data-site-shell="app"] .help-redesign .help-nav{position:static;max-height:none}
}

/* =====================================================================
   AF MODERN · GESTÃO DE PROJETOS
   ===================================================================== */
html[data-site-shell="app"] .pw-page {
  max-width:1700px!important;
  margin:0 auto!important;
  padding:0!important;
}
html[data-site-shell="app"] .pw-hero,
html[data-site-shell="app"] .pw-page-heading,
html[data-site-shell="app"] .pw-detail-hero {
  min-height:82px;
  align-items:flex-end!important;
  padding:2px 0 14px!important;
  border-bottom:1px solid var(--afm-border)!important;
}
html[data-site-shell="app"] .pw-eyebrow {
  margin:0 0 5px!important;
  color:var(--afm-brand)!important;
  font-size:8px!important;
  font-weight:800!important;
  letter-spacing:.11em!important;
}
html[data-site-shell="app"] .pw-hero h1,
html[data-site-shell="app"] .pw-page-heading h1,
html[data-site-shell="app"] .pw-detail-hero h1 {
  margin:0!important;
  color:var(--afm-text)!important;
  font-size:29px!important;
  line-height:1!important;
  letter-spacing:-.04em!important;
}
html[data-site-shell="app"] .pw-hero p,
html[data-site-shell="app"] .pw-page-heading p,
html[data-site-shell="app"] .pw-detail-hero p {
  margin:6px 0 0!important;
  color:var(--afm-muted)!important;
  font-size:9px!important;
  line-height:1.4!important;
}
html[data-site-shell="app"] .pw-hero-actions,
html[data-site-shell="app"] .pw-detail-actions {
  align-items:center!important;
  gap:7px!important;
}
html[data-site-shell="app"] .pw-button {
  min-height:35px!important;
  padding:0 11px!important;
  border:1px solid var(--afm-brand)!important;
  border-radius:8px!important;
  background:var(--afm-brand)!important;
  color:#fff!important;
  font-size:8px!important;
  font-weight:760!important;
  box-shadow:0 8px 20px color-mix(in srgb,var(--afm-brand) 18%,transparent)!important;
}
html[data-site-shell="app"] .pw-button--ghost {
  border-color:var(--afm-border)!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-soft-text)!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .pw-button--danger {
  border-color:var(--afm-danger)!important;
  background:var(--afm-danger)!important;
  color:#fff!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .pw-button--danger:hover {
  filter:brightness(.92);
  background:var(--afm-danger)!important;
  color:#fff!important;
}

html[data-site-shell="app"] .pw-tabs {
  min-height:40px;
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  margin:9px 0!important;
  padding:4px!important;
  overflow:auto;
  border:1px solid var(--afm-border)!important;
  border-radius:9px!important;
  background:var(--afm-surface)!important;
}
html[data-site-shell="app"] .pw-tabs a {
  min-height:30px;
  display:inline-flex;
  align-items:center;
  padding:0 10px!important;
  border:0!important;
  border-radius:7px!important;
  color:var(--afm-muted)!important;
  font-size:8px!important;
  font-weight:730!important;
}
html[data-site-shell="app"] .pw-tabs a:hover {
  background:var(--afm-surface-2)!important;
  color:var(--afm-soft-text)!important;
}
html[data-site-shell="app"] .pw-tabs a.is-active {
  background:var(--afm-brand-soft)!important;
  color:var(--afm-brand)!important;
}

html[data-site-shell="app"] .pw-metrics {
  gap:8px!important;
  margin:9px 0 13px!important;
}
html[data-site-shell="app"] .pw-metric {
  min-height:82px!important;
  gap:9px!important;
  padding:9px 10px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:10px!important;
  background:var(--afm-surface)!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .pw-metric-icon {
  width:36px!important;
  height:36px!important;
  border-radius:8px!important;
  font-size:9px!important;
}
html[data-site-shell="app"] .pw-metric small {
  margin:0!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .pw-metric strong {
  margin-top:4px!important;
  color:var(--afm-text)!important;
  font-size:18px!important;
  line-height:1!important;
}

html[data-site-shell="app"] .pw-section-heading {
  min-height:48px;
  align-items:center!important;
  margin:0 0 7px!important;
}
html[data-site-shell="app"] .pw-section-heading h2 {
  color:var(--afm-text)!important;
  font-size:13px!important;
}
html[data-site-shell="app"] .pw-section-heading p {
  margin-top:3px!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .pw-filters {
  gap:6px!important;
}
html[data-site-shell="app"] .pw-filters input,
html[data-site-shell="app"] .pw-filters select,
html[data-site-shell="app"] .pw-filter-button {
  min-height:34px!important;
  padding:0 9px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:7px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-soft-text)!important;
  font-size:7px!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .pw-filters input {
  width:190px!important;
}
html[data-site-shell="app"] .pw-filter-button {
  border-color:var(--afm-brand)!important;
  background:var(--afm-brand)!important;
  color:#fff!important;
}
html[data-site-shell="app"] .pw-project-grid {
  grid-template-columns:repeat(auto-fill,minmax(280px,340px))!important;
  gap:8px!important;
}
html[data-site-shell="app"] .pw-project-card {
  min-height:196px!important;
  padding:12px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:10px!important;
  background:var(--afm-surface)!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .pw-project-card:hover {
  transform:translateY(-1px)!important;
  border-color:color-mix(in srgb,var(--afm-brand) 35%,var(--afm-border))!important;
  box-shadow:0 10px 24px rgba(0,0,0,.12)!important;
}
html[data-site-shell="app"] .pw-project-card h3,
html[data-site-shell="app"] .pw-kanban-card h3 {
  margin:11px 0 5px!important;
  color:var(--afm-text)!important;
  font-size:12px!important;
  letter-spacing:-.01em;
}
html[data-site-shell="app"] .pw-card-description,
html[data-site-shell="app"] .pw-kanban-card p {
  min-height:28px!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
  line-height:1.45!important;
}
html[data-site-shell="app"] .pw-chip,
html[data-site-shell="app"] .pw-health {
  min-height:20px;
  display:inline-flex;
  align-items:center;
  padding:0 6px!important;
  border-radius:999px!important;
  font-size:6px!important;
}
html[data-site-shell="app"] .pw-card-meta {
  padding-top:10px!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .pw-progress {
  height:4px!important;
  margin-top:9px!important;
  background:var(--afm-surface-3)!important;
}
html[data-site-shell="app"] .pw-progress span {
  background:var(--afm-brand)!important;
}
html[data-site-shell="app"] .pw-card-footer {
  margin-top:9px!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .pw-avatar {
  width:20px!important;
  height:20px!important;
  background:var(--afm-brand-soft)!important;
  color:var(--afm-brand)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .pw-card-arrow {
  color:var(--afm-brand)!important;
  font-size:13px!important;
}

/* Kanban */
html[data-site-shell="app"] .pw-kanban {
  gap:8px!important;
  padding:9px 0 12px!important;
}
html[data-site-shell="app"] .pw-kanban-column {
  min-width:210px!important;
  padding:9px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:10px!important;
  background:var(--afm-surface)!important;
}
html[data-site-shell="app"] .pw-column-heading {
  min-height:28px;
  margin:0 0 8px!important;
}
html[data-site-shell="app"] .pw-column-heading h2 {
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .pw-column-count {
  background:var(--afm-surface-2)!important;
  color:var(--afm-muted)!important;
  font-size:6px!important;
}
html[data-site-shell="app"] .pw-column-list {
  gap:7px!important;
}
html[data-site-shell="app"] .pw-kanban-card {
  padding:10px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:9px!important;
  background:var(--afm-surface-2)!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .pw-column-empty {
  padding:20px 8px!important;
  border-color:var(--afm-border)!important;
  background:transparent!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}

/* Detalhe */
html[data-site-shell="app"] .pw-back-link {
  margin:0 0 8px!important;
  color:var(--afm-brand)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .pw-detail-hero {
  align-items:center!important;
}
html[data-site-shell="app"] .pw-detail-hero .pw-card-top {
  margin-top:4px;
}
html[data-site-shell="app"] .pw-detail-grid {
  grid-template-columns:minmax(0,1fr) 275px!important;
  gap:8px!important;
  margin-top:9px!important;
}
html[data-site-shell="app"] .pw-detail-main,
html[data-site-shell="app"] .pw-detail-side {
  gap:8px!important;
}
html[data-site-shell="app"] .pw-panel {
  padding:12px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:10px!important;
  background:var(--afm-surface)!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .pw-panel-heading h2,
html[data-site-shell="app"] .pw-panel h2 {
  color:var(--afm-text)!important;
  font-size:12px!important;
}
html[data-site-shell="app"] .pw-panel-heading p {
  margin-top:3px!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .pw-big-number {
  color:var(--afm-text)!important;
  font-size:21px!important;
}
html[data-site-shell="app"] .pw-progress--large {
  height:5px!important;
  margin:13px 0!important;
}
html[data-site-shell="app"] .pw-detail-facts {
  gap:8px!important;
}
html[data-site-shell="app"] .pw-detail-facts small,
html[data-site-shell="app"] .pw-definition-list dt {
  color:var(--afm-muted)!important;
  font-size:6px!important;
}
html[data-site-shell="app"] .pw-detail-facts strong,
html[data-site-shell="app"] .pw-definition-list dd {
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .pw-task-list {
  margin-top:10px!important;
}
html[data-site-shell="app"] .pw-task-row {
  min-height:44px;
  padding:7px 0!important;
  border-color:var(--afm-border)!important;
}
html[data-site-shell="app"] .pw-task-content strong {
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .pw-task-content small,
html[data-site-shell="app"] .pw-task-date {
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .pw-callout {
  background:linear-gradient(135deg,color-mix(in srgb,var(--afm-brand) 8%,var(--afm-surface)),var(--afm-surface))!important;
}
html[data-site-shell="app"] .pw-small-link {
  color:var(--afm-brand)!important;
  font-size:7px!important;
}

/* Timeline */
html[data-site-shell="app"] .pw-timeline {
  margin-top:9px;
  padding:10px 12px!important;
}
html[data-site-shell="app"] .pw-timeline-scale {
  margin:0 0 7px 205px!important;
  color:var(--afm-muted)!important;
  font-size:6px!important;
}
html[data-site-shell="app"] .pw-timeline-row {
  grid-template-columns:195px 1fr!important;
  min-height:54px!important;
  border-color:var(--afm-border)!important;
}
html[data-site-shell="app"] .pw-timeline-label strong {
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .pw-timeline-label small {
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .pw-timeline-track {
  height:24px!important;
  background:repeating-linear-gradient(90deg,var(--afm-border) 0,var(--afm-border) 1px,transparent 1px,transparent 16.66%)!important;
}
html[data-site-shell="app"] .pw-timeline-bar {
  top:5px!important;
  height:14px!important;
  border-radius:999px!important;
}

/* Calendário */
html[data-site-shell="app"] .pw-calendar-nav {
  gap:8px!important;
}
html[data-site-shell="app"] .pw-calendar-nav strong {
  color:var(--afm-text)!important;
  font-size:11px!important;
}
html[data-site-shell="app"] .pw-calendar-nav a {
  width:30px!important;
  height:30px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:7px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-brand)!important;
}
html[data-site-shell="app"] .pw-calendar {
  margin-top:9px;
  border:1px solid var(--afm-border)!important;
  border-radius:10px!important;
  background:var(--afm-surface)!important;
}
html[data-site-shell="app"] .pw-calendar-weekdays {
  background:var(--afm-surface-2)!important;
  border-color:var(--afm-border)!important;
}
html[data-site-shell="app"] .pw-calendar-weekdays span {
  padding:9px 10px!important;
  color:var(--afm-muted)!important;
  font-size:6px!important;
}
html[data-site-shell="app"] .pw-calendar-day {
  min-height:92px!important;
  padding:7px!important;
  border-color:var(--afm-border)!important;
}
html[data-site-shell="app"] .pw-calendar-day.is-outside {
  background:color-mix(in srgb,var(--afm-surface-2) 70%,transparent)!important;
}
html[data-site-shell="app"] .pw-calendar-day.is-today {
  background:color-mix(in srgb,var(--afm-brand) 7%,var(--afm-surface))!important;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--afm-brand) 40%,transparent);
}
html[data-site-shell="app"] .pw-day-number {
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .pw-calendar-item {
  padding:4px 6px!important;
  border-radius:6px!important;
  background:var(--afm-brand)!important;
  color:#fff!important;
  font-size:6px!important;
}

/* Modais do workflow */
html[data-site-shell="app"] .pw-modal {
  padding:18px!important;
}
html[data-site-shell="app"] .pw-modal-backdrop {
  background:rgba(1,7,12,.72)!important;
  backdrop-filter:blur(5px);
}
html[data-site-shell="app"] .pw-modal-card {
  max-width:720px!important;
  padding:18px!important;
  border:1px solid color-mix(in srgb,var(--afm-brand) 22%,var(--afm-border))!important;
  border-radius:12px!important;
  background:var(--afm-surface)!important;
  color:var(--afm-text)!important;
  box-shadow:0 30px 80px rgba(0,0,0,.48)!important;
}
html[data-site-shell="app"] .pw-modal-card h2 {
  margin:0 0 5px!important;
  color:var(--afm-text)!important;
  font-size:18px!important;
  letter-spacing:-.025em;
}
html[data-site-shell="app"] .pw-modal-card > p {
  margin:0 0 14px!important;
  color:var(--afm-muted)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .pw-modal-close {
  right:12px!important;
  top:10px!important;
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border:1px solid var(--afm-border)!important;
  border-radius:7px;
  background:var(--afm-surface-2)!important;
  color:var(--afm-muted)!important;
  font-size:18px!important;
}
html[data-site-shell="app"] .pw-form {
  gap:10px!important;
}
html[data-site-shell="app"] .pw-form-grid {
  gap:9px!important;
}
html[data-site-shell="app"] .pw-form label {
  gap:5px!important;
  color:var(--afm-soft-text)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .pw-form input,
html[data-site-shell="app"] .pw-form select,
html[data-site-shell="app"] .pw-form textarea {
  min-height:36px!important;
  padding:0 9px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:7px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-text)!important;
  font-size:8px!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .pw-form textarea {
  min-height:72px!important;
  padding:8px 9px!important;
}
html[data-site-shell="app"] .pw-form-actions {
  gap:7px!important;
  margin-top:3px!important;
  padding-top:10px;
  border-top:1px solid var(--afm-border);
}

@media(max-width:1100px){
  html[data-site-shell="app"] .pw-detail-grid{grid-template-columns:1fr!important}
  html[data-site-shell="app"] .pw-detail-side{display:grid!important;grid-template-columns:1fr 1fr!important}
}
@media(max-width:760px){
  html[data-site-shell="app"] .pw-hero,
  html[data-site-shell="app"] .pw-page-heading,
  html[data-site-shell="app"] .pw-detail-hero{align-items:flex-start!important;display:block!important}
  html[data-site-shell="app"] .pw-hero-actions,
  html[data-site-shell="app"] .pw-detail-actions{margin-top:10px!important;flex-wrap:wrap}
  html[data-site-shell="app"] .pw-metrics{grid-template-columns:1fr 1fr!important}
  html[data-site-shell="app"] .pw-section-heading{display:block!important}
  html[data-site-shell="app"] .pw-filters{display:grid!important;grid-template-columns:1fr 1fr!important;margin-top:8px!important}
  html[data-site-shell="app"] .pw-filters input{width:100%!important}
  html[data-site-shell="app"] .pw-detail-side{display:flex!important}
  html[data-site-shell="app"] .pw-calendar-day{min-height:72px!important}
}

/* Workflow destructive action: beats the generic .pw-button:not(.pw-button--ghost). */
html[data-site-shell="app"] .pw-button.pw-button--danger {
  border-color:var(--afm-danger)!important;
  background:var(--afm-danger)!important;
  color:#fff!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .pw-button.pw-button--danger:hover {
  border-color:var(--afm-danger)!important;
  background:var(--afm-danger)!important;
  color:#fff!important;
  filter:brightness(.92);
}

/* =====================================================================
   AF MODERN · MEU PERFIL
   ===================================================================== */
html[data-site-shell="app"] .afm-profile-page {
  max-width:1500px;
  margin:0 auto;
}
html[data-site-shell="app"] .afm-profile-head {
  min-height:82px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  padding:2px 0 14px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-profile-head h1 {
  margin:5px 0 0;
  color:var(--afm-text)!important;
  font-size:29px;
  line-height:1;
  letter-spacing:-.04em;
}
html[data-site-shell="app"] .afm-profile-head p {
  margin:6px 0 0;
  color:var(--afm-muted);
  font-size:9px;
}
html[data-site-shell="app"] .afm-profile-security-link {
  min-height:35px;
  display:inline-flex;
  align-items:center;
  padding:0 11px;
  border:1px solid var(--afm-border);
  border-radius:8px;
  background:var(--afm-surface-2);
  color:var(--afm-soft-text)!important;
  font-size:8px;
  font-weight:740;
  text-decoration:none!important;
}
html[data-site-shell="app"] .afm-profile-security-link:hover {
  border-color:color-mix(in srgb,var(--afm-brand) 35%,var(--afm-border));
  color:var(--afm-brand)!important;
}
html[data-site-shell="app"] .afm-profile-hero {
  min-height:118px;
  display:flex;
  align-items:center;
  gap:14px;
  margin-top:9px;
  padding:14px;
  border:1px solid var(--afm-border);
  border-radius:10px;
  background:
    radial-gradient(circle at 92% 15%,color-mix(in srgb,var(--afm-brand) 10%,transparent),transparent 30%),
    var(--afm-surface);
}
html[data-site-shell="app"] .afm-profile-avatar {
  width:72px;
  height:72px;
  flex:0 0 72px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:2px solid color-mix(in srgb,var(--afm-brand) 35%,var(--afm-border));
  border-radius:50%;
  background:var(--afm-brand-soft);
  color:var(--afm-brand);
  font-size:22px;
  font-weight:800;
}
html[data-site-shell="app"] .afm-profile-avatar img {
  width:100%;
  height:100%;
  object-fit:cover;
}
html[data-site-shell="app"] .afm-profile-identity small {
  color:var(--afm-brand);
  font-size:7px;
  font-weight:800;
  letter-spacing:.08em;
}
html[data-site-shell="app"] .afm-profile-identity h2 {
  margin:4px 0 0;
  color:var(--afm-text)!important;
  font-size:18px;
  letter-spacing:-.025em;
}
html[data-site-shell="app"] .afm-profile-identity p {
  margin:4px 0 0;
  color:var(--afm-muted);
  font-size:8px;
}
html[data-site-shell="app"] .afm-profile-badges {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  margin-top:8px;
}
html[data-site-shell="app"] .afm-profile-badges span {
  min-height:22px;
  display:inline-flex;
  align-items:center;
  padding:0 7px;
  border:1px solid var(--afm-border);
  border-radius:999px;
  background:var(--afm-surface-2);
  color:var(--afm-soft-text);
  font-size:7px;
}
html[data-site-shell="app"] .afm-profile-grid {
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:9px;
  margin-top:9px;
}
html[data-site-shell="app"] .afm-profile-card {
  overflow:hidden;
  border:1px solid var(--afm-border);
  border-radius:10px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm-profile-card > header {
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:9px 11px;
  border-bottom:1px solid var(--afm-border);
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm-profile-card > header h2 {
  margin:0;
  color:var(--afm-text)!important;
  font-size:12px;
}
html[data-site-shell="app"] .afm-profile-card > header p {
  margin:3px 0 0;
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-profile-private {
  min-height:22px;
  display:inline-flex;
  align-items:center;
  padding:0 7px;
  border-radius:999px;
  background:var(--afm-brand-soft);
  color:var(--afm-brand);
  font-size:7px;
  font-weight:700;
}
html[data-site-shell="app"] .afm-profile-info-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
}
html[data-site-shell="app"] .afm-profile-info-grid > div {
  min-height:70px;
  display:grid;
  align-content:center;
  padding:10px 11px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-profile-info-grid > div:nth-child(odd) {
  border-right:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-profile-info-grid > div:nth-last-child(-n+2) {
  border-bottom:0;
}
html[data-site-shell="app"] .afm-profile-info-grid small {
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-profile-info-grid strong {
  margin-top:5px;
  overflow:hidden;
  color:var(--afm-soft-text);
  font-size:9px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
html[data-site-shell="app"] .afm-profile-card > footer {
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 11px;
  border-top:1px solid var(--afm-border);
  background:var(--afm-surface-2);
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-profile-card > footer a {
  color:var(--afm-brand)!important;
  font-weight:740;
  text-decoration:none!important;
  white-space:nowrap;
}
html[data-site-shell="app"] .afm-profile-photo-form {
  padding:12px;
}
html[data-site-shell="app"] .afm-profile-file-label {
  display:block;
  margin-bottom:6px;
  color:var(--afm-soft-text);
  font-size:7px;
  font-weight:720;
}
html[data-site-shell="app"] .afm-profile-file-row {
  min-height:38px;
  display:flex;
  align-items:center;
  overflow:hidden;
  border:1px solid var(--afm-border);
  border-radius:8px;
  background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm-profile-file-button {
  min-height:36px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0 10px;
  border-right:1px solid var(--afm-border);
  color:var(--afm-soft-text);
  font-size:8px;
  font-weight:720;
  cursor:pointer;
}
html[data-site-shell="app"] .afm-profile-file-button svg {
  width:14px;
  height:14px;
  stroke:var(--afm-brand);
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
html[data-site-shell="app"] .afm-profile-file-row input[type=file] {
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  clip:rect(0 0 0 0)!important;
  white-space:nowrap!important;
}
html[data-site-shell="app"] .afm-profile-file-row > span {
  min-width:0;
  flex:1;
  overflow:hidden;
  padding:0 9px;
  color:var(--afm-muted);
  font-size:7px;
  text-overflow:ellipsis;
  white-space:nowrap;
}
html[data-site-shell="app"] .afm-profile-photo-form > small {
  display:block;
  margin-top:5px;
  color:var(--afm-muted);
  font-size:6px;
}
html[data-site-shell="app"] .afm-profile-remove {
  min-height:54px;
  display:flex!important;
  align-items:center;
  gap:10px;
  margin-top:12px;
  padding:9px 10px;
  border:1px solid var(--afm-border);
  border-radius:8px;
  background:var(--afm-surface-2);
  cursor:pointer;
}
html[data-site-shell="app"] .afm-profile-remove > span {
  min-width:0;
  flex:1;
}
html[data-site-shell="app"] .afm-profile-remove strong {
  display:block;
  color:var(--afm-soft-text);
  font-size:8px;
}
html[data-site-shell="app"] .afm-profile-remove small {
  display:block;
  margin-top:3px;
  color:var(--afm-muted);
  font-size:6px;
}
html[data-site-shell="app"] .afm-profile-remove input {
  position:absolute;
  opacity:0;
  pointer-events:none;
}
html[data-site-shell="app"] .afm-profile-remove > i {
  width:34px;
  height:19px;
  position:relative;
  flex:0 0 34px;
  border-radius:999px;
  background:var(--afm-surface-3);
  transition:.16s ease;
}
html[data-site-shell="app"] .afm-profile-remove > i b {
  width:13px;
  height:13px;
  position:absolute;
  top:3px;
  left:3px;
  border-radius:50%;
  background:var(--afm-muted);
  transition:.16s ease;
}
html[data-site-shell="app"] .afm-profile-remove input:checked + i {
  background:color-mix(in srgb,var(--afm-danger) 35%,var(--afm-surface-3));
}
html[data-site-shell="app"] .afm-profile-remove input:checked + i b {
  left:18px;
  background:var(--afm-danger);
}
html[data-site-shell="app"] .afm-profile-actions {
  display:flex;
  justify-content:flex-end;
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-profile-save {
  min-height:35px;
  padding:0 12px;
  border:1px solid var(--afm-brand);
  border-radius:8px;
  background:var(--afm-brand);
  color:#fff;
  font-size:8px;
  font-weight:760;
  cursor:pointer;
  box-shadow:0 8px 20px color-mix(in srgb,var(--afm-brand) 18%,transparent);
}
@media(max-width:900px){
  html[data-site-shell="app"] .afm-profile-grid{grid-template-columns:1fr}
}
@media(max-width:620px){
  html[data-site-shell="app"] .afm-profile-head{align-items:flex-start;flex-direction:column}
  html[data-site-shell="app"] .afm-profile-info-grid{grid-template-columns:1fr}
  html[data-site-shell="app"] .afm-profile-info-grid > div{border-right:0!important}
  html[data-site-shell="app"] .afm-profile-info-grid > div:nth-last-child(-n+2){border-bottom:1px solid var(--afm-border)}
  html[data-site-shell="app"] .afm-profile-info-grid > div:last-child{border-bottom:0}
}

/* =====================================================================
   AF MODERN · ADMIN PAGES: INTEGRAÇÕES / DADOS / SEGURANÇA
   ===================================================================== */
html[data-site-shell="app"] .settings-section-integracoes,
html[data-site-shell="app"] .settings-section-dados,
html[data-site-shell="app"] .settings-section-seguranca {
  max-width:1700px;
  margin:0 auto;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-section-layout,
html[data-site-shell="app"] .settings-section-dados .settings-section-layout,
html[data-site-shell="app"] .settings-section-seguranca .settings-section-layout {
  display:block!important;
}
html[data-site-shell="app"] .settings-section-integracoes .v1-settings-nav,
html[data-site-shell="app"] .settings-section-dados .v1-settings-nav,
html[data-site-shell="app"] .settings-section-seguranca .v1-settings-nav {
  display:none!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-section-main,
html[data-site-shell="app"] .settings-section-dados .settings-section-main,
html[data-site-shell="app"] .settings-section-seguranca .settings-section-main {
  width:100%!important;
  max-width:none!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-page-heading,
html[data-site-shell="app"] .settings-section-dados .settings-page-heading,
html[data-site-shell="app"] .settings-section-seguranca .settings-page-heading {
  min-height:82px;
  align-items:flex-end!important;
  padding:2px 0 14px!important;
  border-bottom:1px solid var(--afm-border)!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-page-heading .v1-page-actions > a,
html[data-site-shell="app"] .settings-section-dados .settings-page-heading .v1-page-actions > a,
html[data-site-shell="app"] .settings-section-seguranca .settings-page-heading .v1-page-actions > a {
  display:none!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-page-heading h1,
html[data-site-shell="app"] .settings-section-dados .settings-page-heading h1,
html[data-site-shell="app"] .settings-section-seguranca .settings-page-heading h1 {
  margin:4px 0 0!important;
  color:var(--afm-text)!important;
  font-size:29px!important;
  line-height:1!important;
  letter-spacing:-.04em!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-page-heading p,
html[data-site-shell="app"] .settings-section-dados .settings-page-heading p,
html[data-site-shell="app"] .settings-section-seguranca .settings-page-heading p {
  margin:6px 0 0!important;
  color:var(--afm-muted)!important;
  font-size:9px!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-heading-icon-box,
html[data-site-shell="app"] .settings-section-dados .settings-heading-icon-box,
html[data-site-shell="app"] .settings-section-seguranca .settings-heading-icon-box {
  width:32px!important;
  height:32px!important;
  margin-right:8px!important;
  border-radius:8px!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-section-main,
html[data-site-shell="app"] .settings-section-dados .settings-section-main,
html[data-site-shell="app"] .settings-section-seguranca .settings-section-main {
  margin-top:9px!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-section-card,
html[data-site-shell="app"] .settings-section-dados .settings-section-card,
html[data-site-shell="app"] .settings-section-seguranca .settings-section-card {
  border:1px solid var(--afm-border)!important;
  border-radius:10px!important;
  background:var(--afm-surface)!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-section-card + .settings-section-card,
html[data-site-shell="app"] .settings-section-dados .settings-section-card + .settings-section-card,
html[data-site-shell="app"] .settings-section-seguranca .settings-section-card + .settings-section-card {
  margin-top:9px!important;
}
html[data-site-shell="app"] .settings-section-integracoes .v1-panel-head,
html[data-site-shell="app"] .settings-section-dados .v1-panel-head,
html[data-site-shell="app"] .settings-section-seguranca .v1-panel-head {
  min-height:54px!important;
  padding:9px 12px!important;
  border-bottom:1px solid var(--afm-border)!important;
}
html[data-site-shell="app"] .settings-section-integracoes .v1-panel-head h2,
html[data-site-shell="app"] .settings-section-dados .v1-panel-head h2,
html[data-site-shell="app"] .settings-section-seguranca .v1-panel-head h2 {
  color:var(--afm-text)!important;
  font-size:12px!important;
}
html[data-site-shell="app"] .settings-section-integracoes .v1-panel-head p,
html[data-site-shell="app"] .settings-section-dados .v1-panel-head p,
html[data-site-shell="app"] .settings-section-seguranca .v1-panel-head p {
  margin-top:3px!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .settings-section-integracoes .v1-panel-body,
html[data-site-shell="app"] .settings-section-dados .v1-panel-body,
html[data-site-shell="app"] .settings-section-seguranca .v1-panel-body {
  padding:11px!important;
}

/* Integrações */
html[data-site-shell="app"] .settings-section-integracoes .settings-mode-grid {
  gap:8px!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-mode-choice {
  min-height:76px!important;
  padding:10px 12px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:9px!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-mode-choice.is-active {
  border-color:var(--afm-brand)!important;
  background:var(--afm-brand-faint)!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-map-provider-card {
  margin-top:9px!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-map-provider-tabs {
  border-color:var(--afm-border)!important;
  border-radius:8px!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] .settings-section-integracoes .settings-erp-provider-tabs,
html[data-site-shell="app"] .settings-section-integracoes .settings-erp-form-grid,
html[data-site-shell="app"] .settings-section-integracoes .settings-erp-report {
  border-color:var(--afm-border)!important;
}

/* Dados e uso */
html[data-site-shell="app"] .settings-section-dados .afm-admin-data-summary .v1-stat-grid {
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:8px!important;
}
html[data-site-shell="app"] .settings-section-dados .settings-stat-tile {
  min-height:92px!important;
  display:flex!important;
  flex-direction:column;
  justify-content:center;
  padding:11px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:9px!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] .settings-section-dados .settings-stat-tile small {
  color:var(--afm-muted)!important;
  font-size:7px!important;
  letter-spacing:.04em;
  text-transform:uppercase;
}
html[data-site-shell="app"] .settings-section-dados .settings-stat-tile strong {
  margin-top:5px!important;
  color:var(--afm-text)!important;
  font-size:21px!important;
  line-height:1!important;
}
html[data-site-shell="app"] .settings-section-dados .settings-note {
  margin-top:9px!important;
  padding:9px 10px!important;
  border:1px solid color-mix(in srgb,var(--afm-brand) 18%,var(--afm-border));
  border-radius:8px!important;
  background:var(--afm-brand-faint)!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}

/* Segurança */
html[data-site-shell="app"] .settings-section-seguranca .afm-admin-security-card .v1-panel-body {
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
html[data-site-shell="app"] .settings-section-seguranca .settings-check-row {
  min-height:105px!important;
  display:grid!important;
  grid-template-columns:28px minmax(0,1fr)!important;
  align-content:center;
  gap:7px 9px!important;
  margin:0!important;
  padding:11px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:9px!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] .settings-section-seguranca .settings-check-row + .settings-check-row {
  border-top:1px solid var(--afm-border)!important;
}
html[data-site-shell="app"] .settings-section-seguranca .settings-check-dot {
  width:28px!important;
  height:28px!important;
  align-self:start;
}
html[data-site-shell="app"] .settings-section-seguranca .settings-check-copy strong {
  color:var(--afm-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .settings-section-seguranca .settings-check-copy small {
  display:block;
  margin-top:4px!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
  line-height:1.4;
}
html[data-site-shell="app"] .settings-section-seguranca .settings-check-row > .v1-button {
  grid-column:2;
  justify-self:start;
  min-height:29px!important;
  margin-top:3px;
  padding:0 9px!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .settings-section-seguranca .settings-toggle-field-row {
  min-height:62px!important;
  padding:9px 11px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:9px!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] .settings-section-seguranca .settings-toggle-field-copy strong {
  color:var(--afm-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .settings-section-seguranca .settings-toggle-field-copy small {
  color:var(--afm-muted)!important;
  font-size:7px!important;
}

@media(max-width:900px){
  html[data-site-shell="app"] .settings-section-dados .afm-admin-data-summary .v1-stat-grid,
  html[data-site-shell="app"] .settings-section-seguranca .afm-admin-security-card .v1-panel-body {
    grid-template-columns:1fr 1fr!important;
  }
}
@media(max-width:620px){
  html[data-site-shell="app"] .settings-section-dados .afm-admin-data-summary .v1-stat-grid,
  html[data-site-shell="app"] .settings-section-seguranca .afm-admin-security-card .v1-panel-body {
    grid-template-columns:1fr!important;
  }
}

/* =====================================================================
   AF MODERN · SIDEBAR SCROLL SAFETY
   Não altera o Mapa Operacional nem CAD/Pranchas.
   ===================================================================== */
html[data-site-shell="app"] body:not(.operational-map-page):not(.cad-project-board):not([data-maplibre-workspace="true"]) .af-nav.sidebar {
  display:flex!important;
  flex-direction:column!important;
  min-height:0!important;
  overflow:hidden!important;
}
html[data-site-shell="app"] body:not(.operational-map-page):not(.cad-project-board):not([data-maplibre-workspace="true"]) .af-nav.sidebar .v1-global-nav {
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding-bottom:8px!important;
}
html[data-site-shell="app"] body:not(.operational-map-page):not(.cad-project-board):not([data-maplibre-workspace="true"]) .af-nav.sidebar .sidebar-footer {
  position:static!important;
  left:auto!important;
  bottom:auto!important;
  flex:0 0 auto!important;
  margin:2px 9px 10px!important;
  padding:9px 10px 0!important;
  border-top:1px solid var(--afm-border)!important;
  background:transparent!important;
}

/* =====================================================================
   AF MODERN · EQUIPAMENTOS · DETALHE / EDIÇÃO / EXCLUSÃO
   ===================================================================== */
html[data-site-shell="app"] .equipment-detail-redesign,
html[data-site-shell="app"] .equipment-form-redesign,
html[data-site-shell="app"] .afm-equipment-delete {
  max-width:1700px;
  margin:0 auto;
}
html[data-site-shell="app"] .equipment-detail-redesign > .v1-page-head,
html[data-site-shell="app"] .equipment-form-redesign > .v1-page-head,
html[data-site-shell="app"] .afm-equipment-delete-head {
  min-height:86px;
  align-items:flex-end!important;
  padding:2px 0 14px!important;
  border-bottom:1px solid var(--afm-border)!important;
}
html[data-site-shell="app"] .equipment-detail-redesign > .v1-page-head h1,
html[data-site-shell="app"] .equipment-form-redesign > .v1-page-head h1,
html[data-site-shell="app"] .afm-equipment-delete-head h1 {
  margin:4px 0 0!important;
  color:var(--afm-text)!important;
  font-size:29px!important;
  line-height:1!important;
  letter-spacing:-.04em!important;
}
html[data-site-shell="app"] .equipment-detail-redesign > .v1-page-head p,
html[data-site-shell="app"] .equipment-form-redesign > .v1-page-head p,
html[data-site-shell="app"] .afm-equipment-delete-head p {
  margin:6px 0 0!important;
  color:var(--afm-muted)!important;
  font-size:9px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .detail-back-link,
html[data-site-shell="app"] .equipment-form-redesign .detail-back-link,
html[data-site-shell="app"] .afm-equipment-delete .detail-back-link {
  display:inline-flex;
  margin:0 0 6px!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
  font-weight:700!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .page-actions,
html[data-site-shell="app"] .equipment-form-redesign .page-actions {
  gap:7px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .page-actions .v1-button,
html[data-site-shell="app"] .equipment-form-redesign .page-actions .v1-button {
  min-height:34px!important;
  padding:0 11px!important;
  border-radius:8px!important;
  font-size:8px!important;
}

/* Detalhes */
html[data-site-shell="app"] .equipment-detail-redesign .equipment-detail-layout {
  grid-template-columns:minmax(0,1fr) 330px!important;
  gap:9px!important;
  margin-top:9px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-detail-main {
  gap:9px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .v1-panel,
html[data-site-shell="app"] .equipment-form-redesign .v1-panel {
  border:1px solid var(--afm-border)!important;
  border-radius:10px!important;
  background:var(--afm-surface)!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-hero-panel {
  grid-template-columns:250px minmax(0,1fr)!important;
  gap:16px!important;
  padding:11px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-hero-media {
  min-height:185px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:9px!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-hero-media img {
  min-height:185px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-photo-empty {
  color:var(--afm-muted)!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-photo-empty span {
  color:var(--afm-brand)!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-title-line h2 {
  color:var(--afm-text)!important;
  font-size:18px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-hero-copy > p {
  color:var(--afm-muted)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-quick-grid,
html[data-site-shell="app"] .equipment-detail-redesign .equipment-info-grid {
  gap:7px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-quick-grid div,
html[data-site-shell="app"] .equipment-detail-redesign .equipment-info-grid > div {
  padding:8px 9px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:8px!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-quick-grid small,
html[data-site-shell="app"] .equipment-detail-redesign .equipment-info-grid span {
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-quick-grid strong,
html[data-site-shell="app"] .equipment-detail-redesign .equipment-info-grid strong {
  margin-top:3px!important;
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .v1-panel-head {
  min-height:54px!important;
  padding:9px 11px!important;
  border-bottom:1px solid var(--afm-border)!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .v1-panel-head h2,
html[data-site-shell="app"] .equipment-detail-redesign .v1-panel-head h3 {
  color:var(--afm-text)!important;
  font-size:12px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .v1-panel-head p {
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-info-grid {
  padding:11px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .v1-detail {
  gap:9px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .v1-detail-row {
  min-height:30px!important;
  padding:6px 0!important;
  border-color:var(--afm-border)!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .v1-detail-row span {
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .v1-detail-row strong {
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-help-panel .v1-panel-body {
  display:grid;
  gap:7px;
}
html[data-site-shell="app"] .equipment-detail-redesign .equipment-help-panel a {
  min-height:34px;
  display:flex;
  align-items:center;
  padding:0 9px;
  border:1px solid var(--afm-border);
  border-radius:8px;
  background:var(--afm-surface-2);
  color:var(--afm-brand)!important;
  font-size:7px;
  font-weight:720;
}

/* Formulário */
html[data-site-shell="app"] .equipment-form-redesign .equipment-edit-form {
  gap:9px!important;
  margin-top:9px;
}
html[data-site-shell="app"] .equipment-form-redesign .equipment-edit-form > .v1-layout {
  grid-template-columns:minmax(0,1.45fr) minmax(280px,.55fr)!important;
  gap:9px!important;
}
html[data-site-shell="app"] .equipment-form-redesign .v1-panel-head {
  min-height:54px!important;
  padding:9px 11px!important;
  border-bottom:1px solid var(--afm-border)!important;
}
html[data-site-shell="app"] .equipment-form-redesign .v1-panel-head h2 {
  color:var(--afm-text)!important;
  font-size:12px!important;
}
html[data-site-shell="app"] .equipment-form-redesign .v1-panel-head p {
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .equipment-form-redesign .equipment-form-grid {
  gap:9px!important;
  padding:11px!important;
}
html[data-site-shell="app"] .equipment-form-redesign .equipment-form-grid label {
  gap:5px!important;
  color:var(--afm-soft-text)!important;
  font-size:7px!important;
  font-weight:700!important;
}
html[data-site-shell="app"] .equipment-form-redesign .equipment-form-grid label input,
html[data-site-shell="app"] .equipment-form-redesign .equipment-form-grid label select,
html[data-site-shell="app"] .equipment-form-redesign .equipment-form-grid label textarea {
  min-height:36px!important;
  padding:0 9px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:8px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-text)!important;
  font-size:8px!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .equipment-form-redesign .equipment-form-grid label textarea {
  min-height:92px!important;
  padding:8px 9px!important;
}
html[data-site-shell="app"] .equipment-form-redesign .equipment-form-grid label input:focus,
html[data-site-shell="app"] .equipment-form-redesign .equipment-form-grid label select:focus,
html[data-site-shell="app"] .equipment-form-redesign .equipment-form-grid label textarea:focus {
  border-color:var(--afm-brand)!important;
  box-shadow:0 0 0 2px var(--afm-brand-faint)!important;
}
html[data-site-shell="app"] .equipment-form-redesign .check-field {
  min-height:48px;
  padding:8px 9px;
  border:1px solid var(--afm-border);
  border-radius:8px;
  background:var(--afm-surface-2);
}
html[data-site-shell="app"] .equipment-form-redesign .check-field strong {
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .equipment-form-redesign .check-field small,
html[data-site-shell="app"] .equipment-form-redesign .equipment-form-grid small {
  color:var(--afm-muted)!important;
  font-size:6px!important;
}
html[data-site-shell="app"] .equipment-form-redesign .equipment-photo-gallery-edit {
  gap:8px!important;
}
html[data-site-shell="app"] .equipment-form-redesign .equipment-photo-slot {
  gap:6px!important;
  padding:9px!important;
  border:1px dashed color-mix(in srgb,var(--afm-brand) 26%,var(--afm-border))!important;
  border-radius:9px!important;
  background:var(--afm-surface-2)!important;
}
html[data-site-shell="app"] .equipment-form-redesign .equipment-photo-upload-field {
  min-height:96px!important;
  align-content:center!important;
}
html[data-site-shell="app"] .equipment-form-redesign .equipment-photo-upload-field > span {
  color:var(--afm-soft-text)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .equipment-form-redesign .equipment-photo-upload-field input[type="file"] {
  padding:5px!important;
  min-height:36px!important;
  background:var(--afm-surface)!important;
}
html[data-site-shell="app"] .equipment-form-redesign .equipment-photo-upload-field input[type="file"]::file-selector-button {
  min-height:26px;
  margin-right:7px;
  padding:0 9px;
  border:0;
  border-radius:6px;
  background:var(--afm-brand);
  color:#fff;
  font:inherit;
  font-size:7px;
  font-weight:750;
  cursor:pointer;
}
html[data-site-shell="app"] .equipment-form-redesign .form-actions {
  position:sticky;
  bottom:0;
  z-index:6;
  min-height:56px;
  display:flex!important;
  align-items:center;
  justify-content:flex-end!important;
  gap:7px!important;
  padding:9px 0 0;
  border-top:1px solid var(--afm-border);
  background:linear-gradient(180deg,transparent,var(--afm-page-bg) 24%);
}
html[data-site-shell="app"] .equipment-form-redesign .form-actions .v1-button {
  min-height:35px!important;
  padding:0 12px!important;
  border-radius:8px!important;
  font-size:8px!important;
}

/* Exclusão */
html[data-site-shell="app"] .afm-equipment-delete {
  max-width:980px;
}
html[data-site-shell="app"] .afm-danger-zone {
  margin-top:14px;
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  gap:12px;
  padding:18px;
  border:1px solid color-mix(in srgb,var(--afm-danger) 28%,var(--afm-border));
  border-radius:12px;
  background:
    radial-gradient(circle at 95% 10%,color-mix(in srgb,var(--afm-danger) 7%,transparent),transparent 32%),
    var(--afm-surface);
}
html[data-site-shell="app"] .afm-danger-icon {
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:color-mix(in srgb,var(--afm-danger) 11%,var(--afm-surface-2));
  color:var(--afm-danger);
}
html[data-site-shell="app"] .afm-danger-icon svg {
  width:24px;
  height:24px;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
html[data-site-shell="app"] .afm-danger-copy > span {
  color:var(--afm-danger);
  font-size:7px;
  font-weight:820;
  letter-spacing:.11em;
}
html[data-site-shell="app"] .afm-danger-copy h2 {
  margin:5px 0 0;
  color:var(--afm-text)!important;
  font-size:18px;
  letter-spacing:-.025em;
}
html[data-site-shell="app"] .afm-danger-copy p {
  margin:7px 0 0;
  max-width:700px;
  color:var(--afm-muted);
  font-size:8px;
  line-height:1.55;
}
html[data-site-shell="app"] .afm-danger-meta {
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px;
  margin:4px 0 0;
}
html[data-site-shell="app"] .afm-danger-meta > div {
  min-width:0;
  padding:9px;
  border:1px solid var(--afm-border);
  border-radius:8px;
  background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm-danger-meta dt {
  color:var(--afm-muted);
  font-size:6px;
  text-transform:uppercase;
  letter-spacing:.06em;
}
html[data-site-shell="app"] .afm-danger-meta dd {
  margin:4px 0 0;
  overflow:hidden;
  color:var(--afm-soft-text);
  font-size:8px;
  font-weight:720;
  text-overflow:ellipsis;
  white-space:nowrap;
}
html[data-site-shell="app"] .afm-danger-actions {
  grid-column:1 / -1;
  display:flex;
  justify-content:flex-end;
  gap:7px;
  margin-top:4px;
  padding-top:12px;
  border-top:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-danger-actions .v1-button,
html[data-site-shell="app"] .afm-danger-confirm {
  min-height:35px;
  padding:0 12px;
  border-radius:8px;
  font-size:8px;
  font-weight:750;
}
html[data-site-shell="app"] .afm-danger-confirm {
  border:1px solid var(--afm-danger);
  background:var(--afm-danger);
  color:#fff;
  cursor:pointer;
}
html[data-site-shell="app"] .afm-danger-confirm:hover {
  filter:brightness(1.05);
}

@media(max-width:900px) {
  html[data-site-shell="app"] .equipment-detail-redesign .equipment-detail-layout,
  html[data-site-shell="app"] .equipment-form-redesign .equipment-edit-form > .v1-layout {
    grid-template-columns:1fr!important;
  }
  html[data-site-shell="app"] .afm-danger-meta {
    grid-template-columns:1fr 1fr;
  }
}
@media(max-width:600px) {
  html[data-site-shell="app"] .equipment-detail-redesign .equipment-hero-panel {
    grid-template-columns:1fr!important;
  }
  html[data-site-shell="app"] .afm-danger-zone {
    grid-template-columns:1fr;
  }
  html[data-site-shell="app"] .afm-danger-meta {
    grid-template-columns:1fr;
  }
  html[data-site-shell="app"] .afm-danger-actions {
    flex-direction:column-reverse;
  }
  html[data-site-shell="app"] .afm-danger-actions > * {
    width:100%;
    justify-content:center;
  }
}

/* Ajustes finais das subpáginas de equipamentos. */
html[data-site-shell="app"] .equipment-form-redesign .equipment-photo-upload-field {
  padding:9px!important;
  border:0!important;
  border-radius:7px!important;
  background:var(--afm-surface)!important;
}
html[data-site-shell="app"] .equipment-form-redesign .equipment-photo-upload-field input[type="file"] {
  background:var(--afm-surface-2)!important;
  color:var(--afm-muted)!important;
}
html[data-site-shell="app"] .afm-danger-zone .afm-danger-actions .afm-danger-confirm[type="submit"] {
  background:var(--afm-danger)!important;
  border-color:var(--afm-danger)!important;
  color:#fff!important;
  box-shadow:0 8px 20px color-mix(in srgb,var(--afm-danger) 18%,transparent)!important;
}

/* =====================================================================
   AF MODERN · ACESSO TEMPORÁRIO DE SUPORTE ON-PREMISE
   ===================================================================== */
html[data-site-shell="app"] .afm-support-page {
  max-width:1700px;
  margin:0 auto;
}
html[data-site-shell="app"] .afm-support-head {
  min-height:86px;
  display:flex;
  align-items:flex-end;
  padding:2px 0 14px;
  border-bottom:1px solid var(--afm-border);
}
html[data-site-shell="app"] .afm-support-head h1 {
  margin:4px 0 0;
  color:var(--afm-text);
  font-size:29px;
  line-height:1;
  letter-spacing:-.04em;
}
html[data-site-shell="app"] .afm-support-head p {
  max-width:820px;
  margin:6px 0 0;
  color:var(--afm-muted);
  font-size:9px;
  line-height:1.5;
}
html[data-site-shell="app"] .afm-support-safety {
  min-height:82px;
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  margin-top:9px;
  padding:11px 12px;
  border:1px solid color-mix(in srgb,var(--afm-success) 22%,var(--afm-border));
  border-radius:10px;
  background:
    radial-gradient(circle at 92% 10%,color-mix(in srgb,var(--afm-success) 8%,transparent),transparent 28%),
    var(--afm-surface);
}
html[data-site-shell="app"] .afm-support-safety .icon {
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:color-mix(in srgb,var(--afm-success) 10%,var(--afm-surface-2));
  color:var(--afm-success);
}
html[data-site-shell="app"] .afm-support-safety .icon svg {
  width:20px;
  height:20px;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
html[data-site-shell="app"] .afm-support-safety strong {
  color:var(--afm-text);
  font-size:9px;
}
html[data-site-shell="app"] .afm-support-safety p {
  margin:4px 0 0;
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-support-safety-badges {
  display:flex;
  align-items:center;
  gap:5px;
}
html[data-site-shell="app"] .afm-support-safety-badges span {
  min-height:22px;
  display:inline-flex;
  align-items:center;
  padding:0 7px;
  border-radius:999px;
  background:color-mix(in srgb,var(--afm-success) 8%,var(--afm-surface-2));
  color:var(--afm-success);
  font-size:6px;
  font-weight:720;
}
html[data-site-shell="app"] .afm-support-generated {
  margin-top:9px;
  padding:12px;
  border:1px solid color-mix(in srgb,var(--afm-success) 30%,var(--afm-border));
  border-radius:10px;
  background:var(--afm-surface);
}
html[data-site-shell="app"] .afm-support-generated header span {
  color:var(--afm-success);
  font-size:7px;
  font-weight:800;
  letter-spacing:.09em;
}
html[data-site-shell="app"] .afm-support-generated h2 {
  margin:4px 0 0;
  color:var(--afm-text);
  font-size:13px;
}
html[data-site-shell="app"] .afm-support-generated p {
  margin:4px 0 0;
  color:var(--afm-muted);
  font-size:7px;
}
html[data-site-shell="app"] .afm-support-link-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:7px;
  margin-top:10px;
}
html[data-site-shell="app"] .afm-support-link-row input {
  min-height:36px!important;
  padding:0 9px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:8px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-soft-text)!important;
  font:500 8px ui-monospace,SFMono-Regular,Consolas,monospace!important;
}
html[data-site-shell="app"] .afm-support-link-row .v1-button {
  min-height:36px!important;
  padding:0 12px!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .afm-support-generated > small {
  display:block;
  min-height:14px;
  margin-top:5px;
  color:var(--afm-success);
  font-size:7px;
}
html[data-site-shell="app"] .afm-support-grid {
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(280px,.6fr);
  gap:9px;
  margin-top:9px;
}
html[data-site-shell="app"] .afm-support-grid .v1-panel,
html[data-site-shell="app"] .afm-support-history {
  border:1px solid var(--afm-border)!important;
  border-radius:10px!important;
  background:var(--afm-surface)!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] .afm-support-page .v1-panel-head {
  min-height:54px!important;
  padding:9px 11px!important;
  border-bottom:1px solid var(--afm-border)!important;
}
html[data-site-shell="app"] .afm-support-page .v1-panel-head h2 {
  color:var(--afm-text)!important;
  font-size:12px!important;
}
html[data-site-shell="app"] .afm-support-page .v1-panel-head p {
  margin-top:3px!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
}
html[data-site-shell="app"] .afm-support-page .v1-panel-body {
  padding:11px!important;
}
html[data-site-shell="app"] .afm-support-form {
  display:grid;
  grid-template-columns:1fr 1fr auto;
  gap:8px;
  align-items:end;
}
html[data-site-shell="app"] .afm-support-form label {
  display:grid;
  gap:5px;
  color:var(--afm-soft-text);
  font-size:7px;
  font-weight:720;
}
html[data-site-shell="app"] .afm-support-form label > span {
  color:var(--afm-soft-text);
}
html[data-site-shell="app"] .afm-support-form select {
  min-height:36px!important;
  padding:0 9px!important;
  border:1px solid var(--afm-border)!important;
  border-radius:8px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .afm-support-form small {
  color:var(--afm-muted);
  font-size:6px;
  font-weight:500;
}
html[data-site-shell="app"] .afm-support-form .v1-button {
  min-height:36px!important;
  padding:0 12px!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .afm-support-how ol {
  display:grid;
  gap:6px;
  margin:0;
  padding:0;
  list-style:none;
}
html[data-site-shell="app"] .afm-support-how li {
  min-height:45px;
  display:grid;
  grid-template-columns:24px minmax(0,1fr);
  align-items:center;
  gap:8px;
  padding:7px 8px;
  border:1px solid var(--afm-border);
  border-radius:8px;
  background:var(--afm-surface-2);
}
html[data-site-shell="app"] .afm-support-how li > b {
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:var(--afm-brand-soft);
  color:var(--afm-brand);
  font-size:7px;
}
html[data-site-shell="app"] .afm-support-how li strong,
html[data-site-shell="app"] .afm-support-how li small {
  display:block;
}
html[data-site-shell="app"] .afm-support-how li strong {
  color:var(--afm-soft-text);
  font-size:7px;
}
html[data-site-shell="app"] .afm-support-how li small {
  margin-top:2px;
  color:var(--afm-muted);
  font-size:6px;
}
html[data-site-shell="app"] .afm-support-history {
  margin-top:9px;
  overflow:hidden;
}
html[data-site-shell="app"] .afm-support-history .v1-panel-head > span {
  padding:5px 7px;
  border-radius:999px;
  background:var(--afm-surface-2);
  color:var(--afm-muted);
  font-size:6px;
}
html[data-site-shell="app"] .afm-support-history .v1-table th {
  height:33px!important;
  padding:0 9px!important;
  background:var(--afm-surface-2)!important;
  color:var(--afm-muted)!important;
  font-size:7px!important;
  text-transform:uppercase;
}
html[data-site-shell="app"] .afm-support-history .v1-table td {
  min-height:38px!important;
  padding:7px 9px!important;
  border-bottom:1px solid var(--afm-border)!important;
  color:var(--afm-soft-text)!important;
  font-size:8px!important;
}
html[data-site-shell="app"] .afm-support-revoke[type="submit"] {
  min-height:27px!important;
  padding:0 8px!important;
  border:1px solid color-mix(in srgb,var(--afm-danger) 35%,var(--afm-border))!important;
  border-radius:7px!important;
  background:color-mix(in srgb,var(--afm-danger) 9%,var(--afm-surface-2))!important;
  color:var(--afm-danger)!important;
  box-shadow:none!important;
  font-size:7px!important;
  font-weight:720;
}
html[data-site-shell="app"] .afm-support-no-action {
  color:var(--afm-muted);
}
@media(max-width:950px) {
  html[data-site-shell="app"] .afm-support-grid {
    grid-template-columns:1fr;
  }
  html[data-site-shell="app"] .afm-support-form {
    grid-template-columns:1fr 1fr;
  }
  html[data-site-shell="app"] .afm-support-form .v1-button {
    grid-column:1 / -1;
    justify-self:end;
  }
}
@media(max-width:650px) {
  html[data-site-shell="app"] .afm-support-safety {
    grid-template-columns:38px 1fr;
  }
  html[data-site-shell="app"] .afm-support-safety-badges {
    grid-column:1 / -1;
    flex-wrap:wrap;
  }
  html[data-site-shell="app"] .afm-support-form,
  html[data-site-shell="app"] .afm-support-link-row {
    grid-template-columns:1fr;
  }
  html[data-site-shell="app"] .afm-support-form .v1-button {
    grid-column:auto;
    width:100%;
  }
}

/* AF Modern admin/navigation cleanup · 2026-09-24 */
html[data-site-shell="app"] {
  --afm-nav-accent: color-mix(in srgb, var(--afm-brand) 72%, #334155);
}
html[data-site-shell="app"] .afm-nav-group {
  display: block;
  height: auto;
  min-height: 0;
  align-self: start;
}
html[data-site-shell="app"] .v1-global-nav {
  align-content: start !important;
  grid-auto-rows: max-content;
}
html[data-site-shell="app"] .afm-nav-group-items {
  display: grid;
  gap: 1px;
}
html[data-site-shell="app"] .afm-nav-section {
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
html[data-site-shell="app"] .afm-nav-section svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: transform .16s ease;
}
html[data-site-shell="app"] .afm-nav-group.is-collapsed .afm-nav-section svg {
  transform: rotate(-90deg);
}
html[data-site-shell="app"] .afm-nav-group.is-collapsed .afm-nav-group-items {
  display: none;
}
html[data-site-shell="app"][data-theme="light"] .af-nav,
html[data-site-shell="app"][data-theme="light"] .app-sidebar,
html[data-site-shell="app"][data-theme="light"] .sidebar {
  background: linear-gradient(180deg, #ffffff, #f8fafc) !important;
  border-color: #e2e8f0 !important;
  box-shadow: 12px 0 30px rgba(15,23,42,.06) !important;
}
html[data-site-shell="app"][data-theme="light"] .af-nav a,
html[data-site-shell="app"][data-theme="light"] .main-nav a,
html[data-site-shell="app"][data-theme="light"] .nav a {
  color: #475569 !important;
}
html[data-site-shell="app"][data-theme="light"] .af-nav a:hover,
html[data-site-shell="app"][data-theme="light"] .main-nav a:hover,
html[data-site-shell="app"][data-theme="light"] .nav a:hover {
  background: color-mix(in srgb, var(--afm-brand) 7%, #f8fafc) !important;
  color: #0f172a !important;
}
html[data-site-shell="app"][data-theme="light"] .af-nav a.active,
html[data-site-shell="app"][data-theme="light"] .nav a.active {
  background: color-mix(in srgb, var(--afm-brand) 10%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--afm-brand) 24%, #dbe3ed) !important;
  color: #0f172a !important;
  box-shadow: inset 3px 0 0 var(--afm-nav-accent) !important;
}
html[data-site-shell="app"][data-theme="light"] .af-nav a.active .nav-icon,
html[data-site-shell="app"][data-theme="light"] .main-nav a.active .nav-icon {
  color: var(--afm-nav-accent) !important;
}
html[data-site-shell="app"][data-theme="light"] .afm-nav-section {
  color: color-mix(in srgb, var(--afm-nav-accent) 72%, #475569) !important;
}
html[data-site-shell="app"][data-theme="light"] .af-nav-foot,
html[data-site-shell="app"][data-theme="light"] .sidebar-footer {
  color: #64748b !important;
  border-color: #e2e8f0 !important;
}
html[data-site-shell="app"] .sidebar.collapsed .afm-nav-section,
html[data-site-shell="app"] .sidebar-collapsed .sidebar .afm-nav-section {
  display: none;
}
html[data-site-shell="app"] .sidebar.collapsed .afm-nav-group.is-collapsed .afm-nav-group-items,
html[data-site-shell="app"] .sidebar-collapsed .sidebar .afm-nav-group.is-collapsed .afm-nav-group-items {
  display: block;
}
html[data-site-shell="app"][data-theme="dark"] .afm-nav-section {
  color: color-mix(in srgb, var(--afm-brand) 62%, #aab6c4) !important;
}

/* Light navigation specificity guard.
   The older AF Modern shell intentionally used a dark sidebar even in light
   mode and has a more specific selector, so keep this block equally specific. */
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .af-nav,
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .sidebar {
  background: linear-gradient(180deg,#ffffff,#f8fafc) !important;
  border-right-color: #e2e8f0 !important;
  box-shadow: 12px 0 30px rgba(15,23,42,.06) !important;
}
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .v1-global-nav > a,
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .af-nav a,
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .nav a {
  background: transparent !important;
  color: #475569 !important;
}
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .v1-global-nav > a:hover,
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .af-nav a:hover,
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .nav a:hover {
  background: color-mix(in srgb,var(--afm-brand) 7%,#f8fafc) !important;
  color: #0f172a !important;
}
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .v1-global-nav > a.is-active,
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .v1-global-nav > a.active,
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .af-nav a.is-active,
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .af-nav a.active {
  border-color: color-mix(in srgb,var(--afm-brand) 24%,#dbe3ed) !important;
  background: color-mix(in srgb,var(--afm-brand) 10%,#ffffff) !important;
  color: #0f172a !important;
  box-shadow: inset 3px 0 0 var(--afm-nav-accent) !important;
}
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .v1-nav-icon,
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .nav-icon {
  color: #64748b !important;
}
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .v1-global-nav > a.is-active .v1-nav-icon,
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .v1-global-nav > a.active .v1-nav-icon {
  color: var(--afm-nav-accent) !important;
}
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .af-nav-foot,
html[data-site-shell="app"][data-theme="light"] .af-workspace.app-shell .sidebar-footer {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}

/* AF MODERN V21 · project context controls */
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-picker{
  height:54px!important;
  min-height:54px!important;
  padding:5px 9px!important;
}
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors{
  height:44px!important;
  align-items:stretch!important;
}
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors>.tenant-picker-copy{
  position:relative!important;
  display:block!important;
  height:44px!important;
  min-height:44px!important;
}
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors .project-select-control,
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors .project-select-trigger{
  height:44px!important;
  min-height:44px!important;
}

html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors>.tenant-picker-copy>small{
  position:absolute!important;
  z-index:3!important;
  top:7px!important;
  left:11px!important;
  max-width:calc(100% - 40px)!important;
  height:9px!important;
  padding:0!important;
  background:transparent!important;
  color:var(--afm-muted)!important;
  font-size:8px!important;
  line-height:9px!important;
  letter-spacing:.07em!important;
  opacity:.62!important;
  pointer-events:none!important;
}
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors .project-select-trigger{
  align-items:flex-end!important;
  padding:15px 31px 4px 10px!important;
  border-radius:10px!important;
}

html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors>.tenant-picker-copy:has(select:disabled)>small,
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors>.tenant-picker-copy:has(select option:checked[value=""])>small{
  opacity:0!important;
}
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors>.tenant-picker-copy:has(select:disabled) .project-select-trigger,
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors>.tenant-picker-copy:has(select option:checked[value=""]) .project-select-trigger{
  align-items:center!important;
  padding:0 31px 0 10px!important;
}
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors .project-select-trigger{
  background:color-mix(in srgb,var(--afm-surface-2) 94%,var(--afm-brand) 6%)!important;
  border-color:var(--afm-border-strong)!important;
  color:var(--afm-text)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.035)!important;
}

/* AF MODERN V22 · overview project picker cleanup */
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-picker{
  display:block!important;
  width:min(700px,56vw)!important;
  min-width:620px!important;
  max-width:700px!important;
  flex:0 1 700px!important;
  height:44px!important;
  min-height:44px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-picker::before,
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-picker::after{
  content:none!important;
  display:none!important;
}

html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors{
  display:grid!important;
  width:100%!important;
  height:44px!important;
  min-height:44px!important;
  gap:10px!important;
  padding:0!important;
  margin:0!important;
  align-items:stretch!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors.designer-project-context:not(.has-board-sheet){
  grid-template-columns:180px 200px minmax(250px,1fr)!important;
}
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors.designer-project-context.has-board-sheet{
  grid-template-columns:140px 180px minmax(210px,1fr) minmax(210px,1fr)!important;
}

html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors>.tenant-picker-copy{
  height:44px!important;
  min-height:44px!important;
  align-self:stretch!important;
}
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors .project-select-control,
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors .project-select-trigger{
  height:44px!important;
  min-height:44px!important;
}
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors .project-select-trigger{
  display:flex!important;
  align-items:center!important;
  padding:0 32px 0 11px!important;
  border-radius:11px!important;
}
html[data-site-shell="app"] #af-main-workspace[data-dashboard-v1] .af-main-project-selectors>.tenant-picker-copy>small{
  top:4px!important;
  left:11px!important;
  height:8px!important;
  line-height:8px!important;
  font-size:7px!important;
  opacity:.54!important;
}

/* VISAO_GERAL_20261009 (Claude AF Service Map, pedido do Adrian: "os ícones, os pontos da visão geral parecem errados") */
/* topo: sem as linhas diagonais soltas; a redezinha (OLT → CTOs) fica à direita, discreta */
html[data-site-shell="app"] .afm4-hero::before { background:none !important; }
html[data-site-shell="app"] .afm4-hero-net {
  position:absolute; right:22px; top:50%; translate:0 -50%;
  width:min(46%,380px); height:78%; pointer-events:none; overflow:visible;
}
html[data-site-shell="app"] .afm4-net-lines path {
  fill:none; stroke:color-mix(in srgb,var(--afm-brand) 42%,transparent); stroke-width:1.6;
  stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:1 0;
}
html[data-site-shell="app"] .afm4-net-nodes circle {
  fill:var(--afm-surface); stroke:var(--afm-brand); stroke-width:2;
}
html[data-site-shell="app"] .afm4-net-core {
  fill:color-mix(in srgb,var(--afm-brand) 16%,var(--afm-surface)); stroke:var(--afm-brand); stroke-width:2;
}
/* miniatura do projeto com a mesma redezinha */
html[data-site-shell="app"] .afm4-project-thumb { display:grid !important; place-items:center; background:var(--afm-brand-soft) !important; }
html[data-site-shell="app"] .afm4-project-thumb > i { display:none !important; }
html[data-site-shell="app"] .afm4-project-thumb svg { width:78%; height:78%; }
html[data-site-shell="app"] .afm4-project-thumb svg path { stroke:color-mix(in srgb,var(--afm-brand) 55%,transparent); stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
html[data-site-shell="app"] .afm4-project-thumb svg circle,
html[data-site-shell="app"] .afm4-project-thumb svg rect { fill:var(--afm-surface); stroke:var(--afm-brand); stroke-width:2; }

/* títulos dos cartões com ícone, numa linha só */
html[data-site-shell="app"] .afm4-card h2,
html[data-site-shell="app"] .afm4-mini h3 {
  display:flex; align-items:center; gap:7px; min-width:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
html[data-site-shell="app"] .afm4-card > header > a,
html[data-site-shell="app"] .afm4-card > header > span,
html[data-site-shell="app"] .afm4-mini > header > a { flex:0 0 auto; white-space:nowrap; }
html[data-site-shell="app"] .afm4-title-ico {
  flex:0 0 auto; width:16px; height:16px; padding:4px; box-sizing:content-box;
  border-radius:7px; background:var(--afm-brand-soft); color:var(--afm-brand);
  stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;
}

/* atividades e alertas: ícone do tipo no lugar da letra */
html[data-site-shell="app"] .afm4-event-icon svg {
  width:15px; height:15px; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round;
}

/* cartões de baixo: todos no mesmo padrão de linhas (rótulo | valor) */
html[data-site-shell="app"] .afm4-equipment-table > div { grid-template-columns:minmax(0,1fr) auto; }
html[data-site-shell="app"] .afm4-equipment-table > div > span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
html[data-site-shell="app"] .afm4-equipment-table b {
  max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:right; font-variant-numeric:tabular-nums;
}
html[data-site-shell="app"] .afm4-equipment-table b.is-zero { color:var(--afm-muted); font-weight:600; }
html[data-site-shell="app"] .afm4-equipment-table b.is-warn { color:#d99a12; }
html[data-site-shell="app"] .afm4-equipment-table b.is-bad { color:#e5484d; }
html[data-site-shell="app"] .afm4-equipment-table > div:last-child { border-bottom:0; }
html[data-site-shell="app"] .afm4-hero-net { right:24px !important; width:min(30%,210px) !important; height:80% !important; }
html[data-site-shell="app"] .afm4-mini > header { gap:6px; }
html[data-site-shell="app"] .afm4-mini .afm4-title-ico { width:13px; height:13px; padding:3px; border-radius:6px; }
html[data-site-shell="app"] .afm4-mini h3 { gap:6px; }
