/* Identidade visual Tripla (tripla.com.br): space #152454, tang #0059d6,
   sky #00a2ff, celestial #38d7ff; Montserrat nos títulos, Poppins no texto. */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Poppins:wght@400;500;600&display=swap");

:root {
  --space: #152454; --tang: #0059d6; --sky: #00a2ff; --celestial: #38d7ff;
  --bg: #f5f7fb; --card: #fff; --line: #e2e8f0; --text: #0c1531; --muted: #56657a;
  --brand: var(--tang); --brand-soft: #e6f4ff; --ok: #1f8a4c; --warn: #b26a00; --bad: #d4001a;
  --grad: linear-gradient(135deg, var(--tang) 0%, var(--sky) 100%);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(15, 23, 42, 0.06);
  --head: Montserrat, Poppins, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.5 Poppins, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .brand { font-family: var(--head); }

/* Lightning shell (plano-salesforce, fase 1): cabeçalho global + barra do app */
.gheader { display: flex; align-items: center; gap: 1rem; padding: 0 1.25rem; height: 56px; background: var(--space); color: #fff; position: sticky; top: 0; z-index: 6; }
.brand { display: flex; align-items: center; gap: 0.45rem; font-weight: 800; font-size: 1.2rem; color: #fff; letter-spacing: -0.01em; min-width: 120px; }
.brand::before { content: ""; width: 22px; height: 22px; border-radius: 6px 6px 6px 2px; background: linear-gradient(135deg, var(--sky), var(--celestial)); }
.brand:hover { text-decoration: none; }
.gsearch { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.search input { width: 100%; background: rgba(255, 255, 255, 0.1); border-color: rgba(148, 163, 184, 0.35); color: #fff; border-radius: 99px; padding-left: 1rem; }
.search input::placeholder { color: rgba(255, 255, 255, 0.6); }
.search input:focus { background: #fff; color: var(--text); }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; color: var(--text); border-radius: 12px; box-shadow: 0 12px 32px rgba(8, 15, 35, 0.25); padding: 0.35rem; z-index: 30; max-height: 70vh; overflow: auto; }
.sg { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem; border-radius: 8px; color: var(--text); }
.sg:hover, .sg:focus { background: var(--brand-soft); text-decoration: none; outline: none; }
.sg b { display: block; font-weight: 500; }
.sg small { display: block; color: var(--muted); font-size: 0.75rem; }
.sg.all { color: var(--brand); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 0.25rem; }
.gactions { display: flex; align-items: center; gap: 0.5rem; min-width: 120px; justify-content: flex-end; }
.pop { position: relative; }
button.round { width: 34px; height: 34px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.1); border-color: transparent; color: #fff; font-weight: 700; position: relative; }
button.round:hover { background: rgba(255, 255, 255, 0.2); border-color: transparent; }
.dot { position: absolute; top: -3px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 99px; background: #eb6834; color: #fff; font-size: 0.68rem; line-height: 18px; text-align: center; }
.avatar { width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.6); background: var(--grad); color: #fff; font-weight: 700; font-size: 0.78rem; }
.avatar:hover { border-color: #fff; }

.appbar { display: flex; align-items: stretch; gap: 0.25rem; height: 46px; padding: 0 1.25rem; background: #fff; border-bottom: 3px solid var(--tang); position: sticky; top: 56px; z-index: 5; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06); }
.waffle { align-self: center; width: 34px; height: 34px; padding: 8px; border-radius: 8px; border: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: none; }
.waffle i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); margin: auto; }
.waffle:hover { background: var(--brand-soft); }
.waffle:hover i { background: var(--tang); }
.appname { align-self: center; font-family: var(--head); font-weight: 700; font-size: 1.05rem; color: var(--space); padding: 0 1rem 0 0.35rem; white-space: nowrap; border-right: 1px solid var(--line); margin-right: 0.25rem; }
.tabs { display: flex; flex: 1; min-width: 0; overflow: hidden; }
.tab { display: flex; align-items: center; padding: 0 0.85rem; color: var(--text); font-weight: 500; font-size: 0.88rem; white-space: nowrap; border: 0; border-bottom: 3px solid transparent; margin-bottom: -3px; border-radius: 0; background: none; }
.tab:hover { background: var(--brand-soft); text-decoration: none; }
.tab.active { border-bottom-color: var(--sky); color: var(--tang); font-weight: 600; background: #f3f8ff; }
.appbar .pop { display: flex; }
.appbar .pop[hidden] { display: none; }

.menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(8, 15, 35, 0.2); padding: 0.35rem; z-index: 30; }
.menu.right { left: auto; right: 0; }
.menu.notif { width: 320px; }
.menu-title { padding: 0.5rem 0.65rem; border-bottom: 1px solid var(--line); margin-bottom: 0.25rem; font-family: var(--head); font-weight: 700; }
.menu-title small { display: block; font-family: Poppins, system-ui, sans-serif; font-weight: 400; color: var(--muted); font-size: 0.75rem; }
.menu-item { display: block; width: 100%; text-align: left; padding: 0.45rem 0.65rem; border: 0; border-radius: 8px; background: none; color: var(--text); font-weight: 400; }
.menu-item:hover { background: var(--brand-soft); text-decoration: none; border-color: transparent; }
.menu-item b { display: block; font-weight: 500; }
.menu-item small { display: block; color: var(--muted); font-size: 0.75rem; }
.menu-item.all { color: var(--brand); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 0.25rem; }

main { max-width: 1280px; margin: 1.5rem auto; padding: 0 1.5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.35rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.head h1 { font-size: 1.5rem; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.head .kind { color: var(--tang); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; }
.head .actions { margin-left: auto; display: flex; gap: 0.5rem; }
h2 { font-size: 1.02rem; font-weight: 700; margin: 0 0 0.75rem; }

button, .btn { font: inherit; font-weight: 500; padding: 0.42rem 1rem; border-radius: 99px; border: 1px solid var(--line); background: #fff; color: var(--brand); cursor: pointer; transition: background 0.15s, box-shadow 0.15s, border-color 0.15s; }
button:hover, .btn:hover { border-color: var(--brand); text-decoration: none; }
button.primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 4px 12px rgba(0, 89, 214, 0.25); }
button.primary:hover { background: #004bb5; }
button.danger { color: var(--bad); }
button.danger:hover { border-color: var(--bad); }
button.link { border: 0; background: none; padding: 0; color: var(--brand); box-shadow: none; }
button:disabled { opacity: 0.55; cursor: default; }
input, select, textarea { font: inherit; padding: 0.42rem 0.6rem; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.2); }
textarea { min-height: 70px; resize: vertical; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.6rem 0.65rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer; user-select: none; white-space: nowrap; background: #f8fafc; }
tbody tr:hover { background: #f3f9ff; }
.empty { color: var(--muted); padding: 1rem 0; }
.toolbar { display: flex; gap: 0.5rem; margin-bottom: 0.85rem; align-items: center; }
.toolbar input { flex: 1; max-width: 320px; }
.count { color: var(--muted); }

.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.85rem 1rem; }
.form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.78rem; font-weight: 500; color: var(--muted); }
.form label.wide { grid-column: 1 / -1; }
.form .buttons { grid-column: 1 / -1; display: flex; gap: 0.5rem; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.85rem 1.5rem; }
.fields div > span { display: block; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.fields div b { font-weight: 500; word-break: break-word; }

.cols { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

.badge { display: inline-block; padding: 0.12rem 0.6rem; border-radius: 99px; font-size: 0.74rem; font-weight: 500; background: var(--brand-soft); color: var(--tang); }
.badge.won { background: #e3f6ea; color: var(--ok); }
.badge.lost { background: #ffe9ec; color: var(--bad); }


.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 0.6rem; padding: 0.65rem 0; border-bottom: 1px solid var(--line); }
.timeline li.is-done .subj { text-decoration: line-through; color: var(--muted); }
.timeline .meta { color: var(--muted); font-size: 0.8rem; }
.timeline .body { white-space: pre-wrap; margin-top: 0.2rem; }
.overdue { color: var(--bad); font-weight: 600; }

.kanban { display: grid; grid-template-columns: repeat(6, minmax(190px, 1fr)); gap: 0.75rem; overflow-x: auto; align-items: start; }
.lane { background: #eaf0f7; border-radius: 12px; padding: 0.55rem; min-height: 300px; border-top: 3px solid var(--tang); }
.lane:last-child { border-top-color: var(--sky); }
.lane.over { outline: 2px dashed var(--sky); }
.lane h3 { font-size: 0.85rem; font-weight: 700; margin: 0.25rem 0.3rem 0.1rem; }
.lane .sum { font-size: 0.75rem; color: var(--muted); margin: 0 0.3rem 0.5rem; }
.opp { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0.55rem 0.65rem; margin-bottom: 0.5rem; cursor: grab; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06); transition: box-shadow 0.15s, transform 0.15s; }
.opp:hover { box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1); transform: translateY(-1px); }
.opp .amt { font-weight: 600; color: var(--space); }
.opp .sub { font-size: 0.78rem; color: var(--muted); }

/* números em destaque, no estilo "Tripla em números" */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.stat { background: var(--grad); color: #fff; border-radius: 12px; padding: 0.9rem 1.1rem; box-shadow: 0 8px 24px rgba(0, 89, 214, 0.22); }
.stat span { display: block; color: rgba(255, 255, 255, 0.85); font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; }
.stat b { font-family: var(--head); font-weight: 800; font-size: 1.6rem; }
.stat small { display: block; color: rgba(255, 255, 255, 0.8); font-size: 0.75rem; }
.stat a { color: #fff; }

.results h3 { font-size: 0.72rem; color: var(--tang); text-transform: uppercase; letter-spacing: 0.15em; margin: 1rem 0 0.4rem; }
.results ul { margin: 0; padding-left: 1.1rem; }

.toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); background: var(--space); color: #fff; padding: 0.65rem 1.1rem; border-radius: 10px; z-index: 10; box-shadow: 0 8px 24px rgba(8, 15, 35, 0.35); }
.toast.error { background: var(--bad); }

/* phase 3: nav overflow, charts (dataviz reference palette), report grid */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.viz { width: 100%; height: auto; display: block; overflow: visible; }
.viz text { font: 12px Poppins, system-ui, sans-serif; }
.viz .viz-label { fill: #56657a; }
.viz .viz-value { fill: #0c1531; }
.viz .viz-grid { stroke: #e9eef5; stroke-width: 1; }
.viz .viz-axis { stroke: #cbd5e1; stroke-width: 1; }
.viz .viz-row:hover rect[fill="transparent"] { fill: rgba(0, 89, 214, 0.05); }
.viz-legend { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.5rem; }
.viz-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.35rem; vertical-align: -1px; }
.viz-table { margin-top: 0.5rem; font-size: 0.85rem; }
.viz-table summary { cursor: pointer; color: var(--brand); }
.viztip { position: fixed; display: none; pointer-events: none; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 0.4rem 0.6rem; font-size: 0.8rem; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12); }
.viztip-title { font-weight: 600; }
.toolbar input[type="number"] { flex: 0 0 90px; }

/* Assistant card */
.assistant input[type=text] { width: 100%; }
.assistant .answer { white-space: pre-wrap; line-height: 1.55; font-size: 0.9rem; margin-top: 0.75rem; padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(0, 89, 214, 0.06), rgba(0, 162, 255, 0.06)); border-left: 3px solid var(--sky, #00a2ff); border-radius: 10px; }
.assistant .meta { margin-top: 0.4rem; font-size: 0.75rem; color: var(--muted); }

/* Lightning pages (plano-salesforce, fase 1) */
.oicon { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 8px; color: #fff; font-family: var(--head); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.02em; }
.oicon.sm { width: 26px; height: 26px; border-radius: 6px; font-size: 0.6rem; }
.oicon.xs { width: 22px; height: 22px; border-radius: 5px; font-size: 0.55rem; }
.card-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.65rem; }
.card-head h2 { margin: 0; }
.card-head > a, .card-head > button { margin-left: auto; font-size: 0.85rem; }
button.sm { padding: 0.2rem 0.8rem; font-size: 0.8rem; }
button.icon { border: 0; background: none; padding: 0.15rem 0.35rem; border-radius: 6px; color: var(--muted); box-shadow: none; }
button.icon:hover { background: var(--brand-soft); color: var(--tang); }
.kind { color: var(--tang); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.18em; }

.highlights { padding: 1rem 1.35rem; border-top: 4px solid var(--tang); }
.hl-top { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; }
.hl-title h1 { font-size: 1.35rem; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.hl-top .actions { margin-left: auto; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.hl-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.5rem 1.5rem; margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.hl-fields span { display: block; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.hl-fields div > div { font-weight: 500; word-break: break-word; }
.notice { background: #e3f6ea; border-color: #bfe6cd; }

.path-card { padding: 0.9rem 1.35rem; }
.path-row { display: flex; gap: 0.75rem; align-items: center; }
.path { display: flex; flex: 1; min-width: 0; margin: 0; gap: 3px; }
.path .step { flex: 1; min-width: 0; height: 34px; padding: 0 0.5rem 0 1.2rem; border: 0; border-radius: 0; background: #e8edf4; color: var(--muted); font-size: 0.8rem; box-shadow: none;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.path .step span { overflow: hidden; text-overflow: ellipsis; }
.path .step:first-child { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); border-radius: 99px 0 0 99px; padding-left: 0.8rem; }
.path .step:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 12px 50%); border-radius: 0 99px 99px 0; }
.path .step:hover { background: #d6e2f1; color: var(--text); }
.path .step.done { background: var(--brand-soft); color: var(--tang); }
.path .step.current { background: var(--grad); color: #fff; font-weight: 600; }
.path .step.picked { background: var(--space); color: #fff; }
.path-row > button { flex: none; }
.path-guide details { margin-top: 0.7rem; font-size: 0.85rem; }
.path-guide summary { cursor: pointer; color: var(--tang); font-weight: 600; }
.path-guide ul { margin: 0.4rem 0 0; padding-left: 1.2rem; color: var(--text); }

.rec-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .rec-cols { grid-template-columns: 1fr; } }
.tabs-card { padding-top: 0.25rem; }
.rtabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); margin: 0 -1.35rem 1rem; padding: 0 1.35rem; }
.rtabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--muted); padding: 0.7rem 0.9rem; box-shadow: none; }
.rtabs button:hover { color: var(--text); }
.rtabs button.on { color: var(--tang); border-bottom-color: var(--tang); font-weight: 600; }
.tab-body .card { box-shadow: none; border-radius: 12px; }

.section { margin-bottom: 1rem; }
.section-title { font-family: Poppins, system-ui, sans-serif; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--tang); background: #f3f8ff; border-radius: 8px; padding: 0.4rem 0.65rem; margin: 0 0 0.6rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.15rem 1.5rem; }
@media (max-width: 700px) { .grid-2 { grid-template-columns: 1fr; } }
.fld { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.35rem 0.25rem; border-bottom: 1px solid var(--line); }
.fld.wide { grid-column: 1 / -1; }
.fld > span { font-size: 0.74rem; color: var(--muted); }
.fld .val { display: flex; align-items: flex-start; gap: 0.5rem; min-height: 1.5rem; word-break: break-word; white-space: pre-wrap; }
.fld .val > div { flex: 1; }
.fld .pencil { opacity: 0; transition: opacity 0.1s; }
.fld:hover .pencil, .fld .pencil:focus { opacity: 1; }
.fld:hover { background: #fafcff; }
.fld.editing { border-bottom: 0; }
.fld input, .fld select, .fld textarea { width: 100%; }
.req { color: var(--bad); text-decoration: none; margin-right: 0.2rem; border: 0; }
.edit-bar { position: sticky; bottom: 0; display: flex; justify-content: center; gap: 0.5rem; padding: 0.75rem; margin: 0 -1.35rem -1.1rem; background: #f3f6fa; border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }

.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 1rem; }
.related { padding: 0.85rem 1rem; }
.related .card-head h2 { font-size: 0.95rem; }
.rl-item { padding: 0.5rem 0; border-top: 1px solid var(--line); font-size: 0.85rem; }
.rl-item dl { display: grid; grid-template-columns: auto 1fr; gap: 0 0.5rem; margin: 0.2rem 0 0; }
.rl-item dt { color: var(--muted); }
.rl-item dd { margin: 0; }
.rl-all { display: block; text-align: center; border-top: 1px solid var(--line); padding-top: 0.5rem; font-size: 0.85rem; }

.quick { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.composer { border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem 1rem; margin-bottom: 1rem; background: #fafcff; }
.composer-title { font-weight: 600; margin-bottom: 0.4rem; }
.composer-foot { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.6rem; }

.lv-card { padding: 0; overflow: hidden; }
.lv-head { display: flex; align-items: center; gap: 0.8rem; padding: 1rem 1.35rem 0.5rem; flex-wrap: wrap; }
.lv-head .actions { margin-left: auto; display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.lv-select { border: 0; padding: 0 1.4rem 0 0; font-family: var(--head); font-size: 1.3rem; font-weight: 800; color: var(--text); background-color: transparent; cursor: pointer; }
.lv-select:focus { box-shadow: none; }
.lv-bar { display: flex; align-items: center; gap: 0.75rem; padding: 0 1.35rem 0.75rem; flex-wrap: wrap; }
.lv-meta { color: var(--muted); font-size: 0.8rem; }
.lv-bar input[type="search"] { margin-left: auto; width: 260px; border-radius: 99px; }
.chip { font-size: 0.78rem; background: var(--brand-soft); color: var(--tang); padding: 0.15rem 0.6rem; border-radius: 99px; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table.lv th:first-child, table.lv td:first-child { padding-left: 1.35rem; }
table.lv th.sel, table.lv td.sel { width: 2.5rem; }
table.lv th.sorted { color: var(--tang); }
table.lv tr.picked { background: #eef6ff; }
.lv-card > div > .kanban { padding: 0.75rem 1.35rem 1.1rem; border-top: 1px solid var(--line); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; padding: 0.35rem 0.85rem; box-shadow: none; }
.seg button.on { background: var(--tang); color: #fff; }

.hello h1 { font-size: 1.5rem; font-weight: 800; margin: 0; }
.hello p { margin: 0.15rem 0 0; color: var(--muted); }
.hello { background: linear-gradient(120deg, #fff 55%, #e6f4ff); }
.meter { margin-top: 0.9rem; }
.meter-bar { height: 10px; background: #e8edf4; border-radius: 99px; overflow: hidden; }
.meter-bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.meter small { color: var(--muted); }
.recent { list-style: none; margin: 0; padding: 0; }
.recent li { display: flex; align-items: center; gap: 0.55rem; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.recent li small { margin-left: auto; color: var(--muted); font-size: 0.75rem; }

.modal-back { position: fixed; inset: 0; background: rgba(12, 21, 49, 0.55); z-index: 40; display: grid; place-items: start center; padding: 4vh 1rem; overflow: auto; }
.modal { width: min(820px, 100%); background: #fff; border-radius: 14px; box-shadow: 0 24px 64px rgba(8, 15, 35, 0.4); display: flex; flex-direction: column; max-height: 92vh; }
.modal-head { position: relative; padding: 1rem 3rem; text-align: center; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.2rem; }
.modal-head .close { position: absolute; right: 0.75rem; top: 0.8rem; font-size: 1rem; }
.modal-body { padding: 1rem 1.5rem; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.8rem 1.25rem; background: #f3f6fa; border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }
.modal-form .fld { border-bottom: 0; }
.confirm-text { margin: 0.25rem 0 0.5rem; text-align: center; }
button.danger-fill { background: var(--bad); border-color: var(--bad); box-shadow: none; }
button.danger-fill:hover { background: #b00016; }
.launch-filter { width: 100%; margin-bottom: 0.75rem; border-radius: 99px; }
.launch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.5rem; margin-bottom: 1rem; }
.launch { display: flex; align-items: center; gap: 0.6rem; padding: 0.6rem; border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-weight: 500; }
.launch:hover { border-color: var(--tang); background: var(--brand-soft); text-decoration: none; }
.rl-all[hidden] { display: none; }

/* Plano Salesforce, fase 2 — produtividade */
a.button { display: inline-flex; align-items: center; padding: 0.4rem 0.95rem; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--text); font-weight: 500; }
a.button:hover { text-decoration: none; border-color: var(--tang); color: var(--tang); }
.seg a { padding: 0.35rem 0.85rem; color: var(--text); }
.seg a.on { background: var(--tang); color: #fff; }
.seg a:hover { text-decoration: none; }
.danger-text { color: var(--bad) !important; }
.tag { display: inline-block; margin-left: 0.4rem; font-size: 0.72rem; color: var(--muted); background: #eef2f8; border-radius: 99px; padding: 0 0.45rem; font-weight: 500; }
.avatar-sm { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; font-size: 0.7rem; font-weight: 700; }

/* favoritos e seguir */
.icon.star { font-size: 1.15rem; color: var(--muted); margin-left: 0.4rem; vertical-align: middle; border: 0; background: none; box-shadow: none; padding: 0 0.2rem; }
.icon.star.on { color: #f5a623; }
button.following { background: var(--brand-soft); color: var(--tang); border-color: var(--tang); }
.fav-item { display: flex; gap: 0.5rem; align-items: center; }

/* list views salvos e ações em massa */
.lv-rules { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.bulk { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.5rem 0.75rem; margin: 0 0 0.5rem; background: var(--brand-soft); border-radius: 12px; }
.bulk-n { font-weight: 600; margin-right: 0.25rem; }
.icon.gear { font-size: 1.05rem; }
.rules { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.5rem; }
.rule { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.rule select, .rule input { max-width: 13rem; }
.col-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.25rem 0.75rem; }
.check { display: flex; align-items: center; gap: 0.3rem; font-weight: 400; }
.pair { display: flex; gap: 0.4rem; }
.pair select { flex: 1; }

/* notificações */
.menu-title.row { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.notif-list { max-height: 60vh; overflow: auto; }
.notif-item { display: flex; gap: 0.55rem; align-items: flex-start; }
.notif-item.unread { background: #f2f8ff; }
.notif-item.unread b { font-weight: 700; }
.notif-ico { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; background: #eef2f8; color: var(--tang); }
.notif-ico.sla { background: #fde7e9; color: var(--bad); }
.notif-ico.mention { background: var(--brand-soft); font-weight: 700; }

/* calendário */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-top: 0.75rem; }
.cal-wd { padding: 0.35rem 0.5rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fafcff; }
.cal-day { min-height: 104px; padding: 0.3rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.cal.week .cal-day { min-height: 320px; }
.cal-day.other { background: #f8fafc; }
.cal-day.other .cal-num { color: #a0aec0; }
.cal-day.today .cal-num { background: var(--tang); color: #fff; }
.cal-num { align-self: flex-start; border: 0; background: none; box-shadow: none; padding: 0.05rem 0.45rem; border-radius: 99px; font-weight: 600; font-size: 0.8rem; color: var(--text); }
.cal-num:hover { background: var(--brand-soft); }
.cal-item { display: block; width: 100%; text-align: left; border: 0; box-shadow: none; border-left: 3px solid var(--tang); border-radius: 6px; background: var(--brand-soft); padding: 0.15rem 0.4rem; font-size: 0.75rem; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.cal-item.meeting { border-left-color: #eb6834; background: #fdeee7; }
.cal-item.call { border-left-color: var(--ok); background: #e8f5ee; }
.cal-item.done { opacity: 0.55; text-decoration: line-through; }
.cal-more { font-size: 0.72rem; padding-left: 0.3rem; }
.cal-title { text-transform: capitalize; margin: 0; font-size: 1.2rem; }

/* Chatter */
.feed-compose { border: 1px solid var(--line); border-radius: 12px; padding: 0.75rem; margin-bottom: 1rem; background: #fafcff; }
.feed-input { width: 100%; resize: vertical; }
.mention-wrap { position: relative; }
.mention-list { position: absolute; left: 0; top: 100%; z-index: 20; min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(8, 15, 35, 0.18); padding: 0.25rem; }
.mention-list .menu-item { display: flex; align-items: center; gap: 0.4rem; }
.mention { color: var(--tang); background: var(--brand-soft); border-radius: 4px; padding: 0 0.2rem; font-weight: 500; }
.post { border-bottom: 1px solid var(--line); padding: 0.85rem 0; }
.post-head { display: flex; align-items: center; gap: 0.55rem; }
.post-head > div { flex: 1; }
.post-head small, .comment small { display: block; color: var(--muted); font-size: 0.75rem; }
.comment small { display: inline; }
.post-body { white-space: pre-wrap; margin: 0.35rem 0 0; }
.comments { margin: 0.5rem 0 0 2.4rem; display: flex; flex-direction: column; gap: 0.45rem; }
.comment { display: flex; gap: 0.5rem; background: #f6f8fc; border-radius: 10px; padding: 0.45rem 0.6rem; }
.feed-reply { width: 100%; }

/* ---- Fase 3: vendas ---- */
.hint { color: var(--muted, #56657a); font-size: 0.85rem; margin: 0.25rem 0 0.75rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.75rem; margin: 0.5rem 0; }
.kpi { border-radius: 12px; padding: 0.7rem 0.9rem; color: #fff; background: linear-gradient(135deg, var(--tang, #0059d6), var(--sky, #00a2ff)); }
.kpi span { display: block; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.kpi b { font: 700 1.25rem Montserrat, Poppins, sans-serif; }
.notice.dup { border-left: 4px solid #eb6834; background: #fff6f1; padding: 0.7rem 1rem; border-radius: 10px; margin: 0.5rem 0; }
.notice.dup .btn.sm, a.btn.sm { padding: 0.15rem 0.7rem; font-size: 0.8rem; }
label.check { display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.checks { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; padding: 0.4rem 0; }
tr.muted, .card.muted { opacity: 0.6; }
.row-actions { white-space: nowrap; }
.row-actions .link { margin-right: 0.6rem; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0.5rem 0; }
dl.kv dt { color: var(--muted, #56657a); }
dl.kv dd { margin: 0; word-break: break-all; }
pre.code { background: #0c1531; color: #cfe3ff; padding: 0.9rem; border-radius: 10px; overflow-x: auto; font-size: 0.78rem; }
table.merge td, table.merge th { vertical-align: top; }
table.merge tr.differ td { background: #f3f8ff; }
table.forecast td.num, table.forecast th.num { text-align: right; }
table.forecast td.editable { cursor: pointer; }
table.forecast td.editable:hover { background: #f3f8ff; }
table.forecast td.adjusted { color: var(--tang, #0059d6); font-weight: 600; }
table.forecast .was { font-size: 0.75rem; color: #eb6834; font-weight: 400; text-decoration: line-through; }
table.forecast .meta { font-size: 0.72rem; color: var(--muted, #56657a); font-weight: 400; }
.quote-doc { background: #fff; max-width: 860px; margin: 0 auto 1rem; padding: 2.5rem; border-radius: 14px; box-shadow: var(--shadow); }
.quote-doc header { display: flex; justify-content: space-between; gap: 2rem; border-bottom: 3px solid var(--tang, #0059d6); padding-bottom: 1rem; margin-bottom: 1.25rem; }
.quote-doc header h1 { margin: 0.2rem 0 0; font-family: Montserrat, Poppins, sans-serif; }
.quote-doc header dl { display: grid; grid-template-columns: max-content max-content; gap: 0.2rem 0.8rem; margin: 0; font-size: 0.9rem; }
.quote-doc header dd { margin: 0; }
.quote-doc .kind { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem; color: var(--tang, #0059d6); font-weight: 600; }
.quote-doc table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.quote-doc th, .quote-doc td { padding: 0.45rem 0.5rem; border-bottom: 1px solid #e3e8f0; text-align: left; }
.quote-doc tfoot td { font-weight: 700; font-size: 1.05rem; border-bottom: 0; }
.quote-doc footer { margin-top: 2rem; font-size: 0.8rem; color: var(--muted, #56657a); }
.print-bar { max-width: 860px; margin: 0 auto 0.75rem; }
@media print {
    .gheader, .appbar, .no-print, .toast, #toast { display: none !important; }
    body, main { background: #fff !important; margin: 0; padding: 0; }
    .quote-doc { box-shadow: none; padding: 0; max-width: none; }
}

/* ---- plano Salesforce, fase 4: atendimento ---- */
.badge.warn { background: #fff3e0; color: #b45309; }
.badge.sla { white-space: nowrap; }
.ms-card .milestones { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; }
.ms { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.7rem 0.9rem; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--tang); }
.ms.done { border-left-color: var(--ok); opacity: 0.85; }
.ms .badge { align-self: flex-start; }
.rl-item.kb { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 0.75rem; align-items: center; }
.rl-item.kb .meta { grid-column: 1; }
.rl-item.kb button { grid-column: 2; grid-row: 1 / span 2; }
.kb-found { margin-top: 0.5rem; }
.console { display: grid; grid-template-columns: 300px 1fr; gap: 1rem; align-items: start; }
.con-side { position: sticky; top: 1rem; max-height: calc(100vh - 9rem); display: flex; flex-direction: column; gap: 0.6rem; }
.con-side select { width: 100%; }
.con-list { overflow-y: auto; display: flex; flex-direction: column; gap: 0.4rem; }
.con-item { display: flex; flex-direction: column; align-items: stretch; gap: 0.2rem; text-align: left; padding: 0.6rem 0.75rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: none; font-weight: 400; color: var(--text); }
.con-item:hover { border-color: var(--sky); }
.con-item.on { border-color: var(--tang); background: var(--brand-soft); }
.con-item small { color: var(--muted); }
.con-item-top { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.con-tabs { display: flex; gap: 0.25rem; overflow-x: auto; border-bottom: 2px solid var(--line); margin-bottom: 0.75rem; }
.con-tab { display: flex; align-items: center; border-radius: 10px 10px 0 0; background: #eef2f8; margin-bottom: -2px; border-bottom: 2px solid transparent; }
.con-tab.on { background: #fff; border-bottom-color: var(--tang); }
.con-tab button { border: 0; background: none; box-shadow: none; padding: 0.45rem 0.6rem; font-weight: 500; color: var(--text); border-radius: 0; }
.con-tab-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 0.3rem; }
.con-tab-x { padding: 0.45rem 0.55rem 0.45rem 0 !important; color: var(--muted) !important; }
.con-case { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.con-context { display: flex; flex-direction: column; gap: 1rem; }
.con-context .card { margin: 0; }
.ctx-title { font-weight: 600; display: block; margin-bottom: 0.4rem; }
@media (max-width: 1100px) { .console, .con-case { grid-template-columns: 1fr; } .con-side { position: static; max-height: none; } }

/* ---- plano Salesforce, fase 6: insights, e-mail, conexões de API ---- */
.rec-side > .card { margin-bottom: 1rem; }
.insights .score { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 0.6rem; }
.insights .score > b { font-family: var(--head); font-size: 2rem; font-weight: 800; line-height: 1; min-width: 3.2rem; text-align: center; padding: 0.45rem 0; border-radius: 12px; color: #fff; background: var(--grad); }
.insights .score.mid > b { background: linear-gradient(135deg, #b26a00, #eb6834); }
.insights .score.low > b { background: linear-gradient(135deg, #8a1c2c, var(--bad)); }
.insights .score > div { flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }
.insights .score span { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.factors { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
.factors li { display: flex; gap: 0.55rem; align-items: baseline; padding: 0.3rem 0; border-bottom: 1px solid var(--line); }
.factors li > span { flex: none; min-width: 2.1rem; text-align: center; font-size: 0.72rem; font-weight: 600; border-radius: 99px; padding: 0.05rem 0.4rem; background: #eef2f7; color: var(--muted); }
.factors li.up > span, .factors li.ok > span { background: #e3f6ea; color: var(--ok); }
.factors li.down > span, .factors li.bad > span { background: #ffe9ec; color: var(--bad); }
.factors li.warn > span { background: #fff3e0; color: #b45309; }
.factors li.info > span { background: var(--brand-soft); color: var(--tang); }
.chip { display: inline-block; min-width: 2rem; text-align: center; font-size: 0.72rem; font-weight: 700; border-radius: 99px; padding: 0.05rem 0.4rem; color: #fff; background: var(--grad); }
.chip.score-B { background: linear-gradient(135deg, #b26a00, #eb6834); }
.chip.score-C { background: var(--bad); }
.email-body { min-height: 220px; }
.warn-note { background: #fff3e0; color: #8a4b00; border-radius: 10px; padding: 0.55rem 0.8rem; }
code.token { display: block; padding: 0.7rem 0.9rem; border-radius: 10px; background: var(--space); color: var(--celestial); font-size: 0.9rem; word-break: break-all; user-select: all; }
pre.snippet { background: #f3f6fa; border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.9rem; font-size: 0.78rem; overflow: auto; }
.card-head .actions { margin-left: auto; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.tool { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.tool:hover { border-color: var(--tang); text-decoration: none; background: #f3f8ff; }
.tool small { color: var(--muted); }

/* Layout responsivo (celular e tablet estreito) */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .gheader { gap: 0.5rem; padding: 0 0.75rem; }
  .brand { min-width: 0; font-size: 0; gap: 0; }
  .brand::before { width: 26px; height: 26px; }
  .gactions { min-width: 0; gap: 0.3rem; }
  #help { display: none; }
  .gsearch { min-width: 0; }
  .search input { padding: 0.4rem 0.75rem; }
  .menu.notif, .menu { max-width: calc(100vw - 1rem); }
  .menu.notif { position: fixed; left: 0.5rem; right: 0.5rem; top: 60px; width: auto; }
  .appbar { padding: 0 0.5rem; }
  .appname { display: none; }
  main { margin: 0.75rem auto; padding: 0 0.6rem; }
  .card { padding: 0.9rem 0.9rem; border-radius: 12px; }
  .card-head { flex-wrap: wrap; }
  h1 { font-size: 1.25rem; }
  .stats { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .card table, .tab-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-wrap table { display: table; }
  table.lv th:first-child, table.lv td:first-child { padding-left: 0.65rem; }
  .toolbar { flex-wrap: wrap; }
  .toolbar input { max-width: none; min-width: 0; }
  .lv-head { padding: 0.8rem 0.9rem 0.5rem; }
  .lv-bar { padding: 0 0.9rem 0.75rem; }
  .lv-bar input[type="search"] { margin-left: 0; width: 100%; }
  .highlights { padding: 0.9rem; }
  .hl-top .actions { margin-left: 0; width: 100%; }
  .hl-top .actions > * { flex: 1 1 auto; }
  .hl-fields { grid-template-columns: 1fr 1fr; }
  .path-row { flex-wrap: wrap; }
  .path { overflow-x: auto; }
  .path .step { min-width: 96px; }
  .path-row > button { width: 100%; }
  .rtabs { margin: 0 -0.9rem 1rem; padding: 0 0.6rem; overflow-x: auto; }
  .rtabs button { white-space: nowrap; }
  .edit-bar { margin: 0 -0.9rem -0.9rem; }
  .modal-back { padding: 0; place-items: stretch; }
  .modal { width: 100%; max-height: 100vh; min-height: 100vh; border-radius: 0; }
  .modal-head { padding: 0.85rem 2.75rem; }
  .modal-body { padding: 0.85rem 1rem; flex: 1; }
  .modal-foot { border-radius: 0; flex-wrap: wrap; }
  .modal-foot > button { flex: 1 1 auto; }
  .cal-day { min-height: 64px; }
  .cal-item { font-size: 0.68rem; }
  .cal.week { grid-template-columns: 1fr; }
  .cal.week .cal-wd { display: none; }
  .cal.week .cal-day { min-height: 0; }
  .kanban { grid-template-columns: repeat(6, 78vw); scroll-snap-type: x mandatory; }
  .kanban > * { scroll-snap-align: start; }
  .console { grid-template-columns: 1fr; }
  button, .btn { padding: 0.5rem 0.95rem; }
  .fld .pencil { opacity: 1; }
}
