/* Visual system measured from the user's read-only Social Sellers session.
   Layout, spacing and color are recreated; the Trama identity and all records stay original. */
:root {
  --ground: #fdfcf9;
  --surface: #fffefa;
  --raised: #f5f1ea;
  --border: #e8e3da;
  --rule: #efebe5;
  --control: #e4ded5;
  --text: #191719;
  --muted: #77716e;
  --accent: #b71f48;
  --accent-soft: #f8ecee;
  --accent-track: #eee7df;
  --accent-ink: #ac2046;
  --positive: #287b57;
  --sidebar-width: 232px;
  --font: "DM Sans", Helvetica, Arial, sans-serif;
}
html, body { background: var(--ground); color: var(--text); font-size: 14px; }
h1 { font-size: 30px; font-weight: 650; letter-spacing: -.035em; }
h2 { font-size: 20px; font-weight: 650; letter-spacing: -.025em; }
button, .button { min-height: 38px; border-color: var(--border); background: var(--surface); border-radius: 7px; box-shadow: 0 1px 2px #24180b06; }
button:hover, .button:hover { background: #f8f5f0; }
button:disabled { cursor: not-allowed; opacity: .64; }
.primary-button, .button.primary-button { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 5px 10px #aa173029; }
.primary-button:hover, .button.primary-button:hover { background: #9c193d; }
input, textarea, select { background: var(--surface); border-color: var(--border); border-radius: 7px; min-height: 42px; }
input::placeholder, textarea::placeholder { color: #a6a19d; }
.panel, .table-wrap { background: var(--surface); border-color: var(--border); border-radius: 11px; box-shadow: 0 2px 4px #24180b0b; }
.status { border-radius: 20px; padding: 4px 9px; }
.status.neutral { background: #f4f0e9; color: #746c66; }
.status.positive { background: #e5f2e9; color: #21734d; }
.app-layout { background: var(--ground); }
.sidebar { width: var(--sidebar-width); padding: 0 14px 16px; background: #fffefb; border-color: var(--border); }
.brand { min-height: 63px; padding: 0 9px; gap: 11px; font-size: 17px; letter-spacing: -.02em; }
.brand strong { font-weight: 750; }
.brand-mark { width: 27px; height: 27px; place-content: center; transform: rotate(-19deg); }
.brand-mark i { height: 3px; background: var(--accent); }
.sidebar-search { display: flex; align-items: center; gap: 9px; height: 34px; border-radius: 7px; margin: 5px 0 17px; padding: 0 11px; color: #8a847f; background: #f4f0e9; font-size: 13px; }
.sidebar-search svg { width: 14px; height: 14px; }
.sidebar nav { flex: 1; }
.nav-group { margin: 0 0 17px; }
.nav-group-title { margin: 0 9px 8px; font-size: 11px; color: #9b968e; text-transform: uppercase; letter-spacing: .025em; font-weight: 600; }
.nav-link { height: 34px; padding: 0 9px; gap: 10px; margin: 1px 0 2px; color: #575453; font-size: 14px; font-weight: 450; }
.nav-link svg { width: 14px; height: 14px; stroke-width: 1.5; }
.nav-link.active { background: rgba(190,35,72,.08); color: #be2348; font-weight: 650; }
.nav-link.active svg { color: #be2348; }
.sidebar-settings { margin-top: auto; flex: none; }
.topbar { height: 62px; padding: 0 32px; gap: 23px; background: #fffefb; border-color: var(--border); }
.topbar-calendar { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; white-space: nowrap; }
.topbar-calendar svg { width: 15px; height: 15px; }
.topbar-date { color: var(--text); font-size: 14px; }
.topbar-chevron { color: #a29a92; }
.language-pill { display: inline-flex; gap: 5px; align-items: center; border-radius: 20px; padding: 3px; background: #f4f1eb; font-size: 11px; }
.language-pill strong { padding: 3px 6px; background: #fff; border-radius: 14px; }
.language-pill span { padding: 3px 5px; color: #9c9790; }
.topbar-bell { position: relative; border: 0; box-shadow: none; color: #4b4744; font-size: 18px; }
.topbar-bell i { position: absolute; right: 7px; top: 6px; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.topbar-account { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; }
.topbar-account strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.topbar-account>span:last-child { color: #aaa; }
.topbar-avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #eae5dc; color: #6e6860; font-size: 9px; font-weight: 700; }
.content-column { width: calc(100% - var(--sidebar-width)); }
main { padding: 30px 32px 48px; max-width: none; }
.page-header { margin-bottom: 24px; }
.page-header h1 { margin: 0 0 5px; }
.page-header p { font-size: 14px; color: #8d8782; }
.page-actions { gap: 8px; }
.demo-footer { display: flex; align-items: center; gap: 15px; max-width: 1060px; margin: 35px auto 30px; font-size: 11px; color: #aba39b; }
.demo-footer>span { display: flex; align-items: center; gap: 6px; }
.demo-footer .text-button { min-height: 20px; padding: 0; font-size: 11px; color: #a09a92; box-shadow: none; }
.demo-footer .demo-dot { width: 5px; height: 5px; }

/* Home */
.home-page { max-width: 1060px; margin: 18px auto 0; }
.home-hero { min-height: 255px; padding: 31px 33px 0; border-radius: 12px; background: linear-gradient(113deg, #bd244c, #9d1b40); color: white; box-shadow: 0 7px 16px #a71c3820; overflow: hidden; }
.home-greeting { display: flex; align-items: center; gap: 15px; }
.home-portrait { display: grid; place-items: center; width: 58px; height: 58px; flex: none; border-radius: 50%; background: #f8e9e3; color: #9c1d42; font-size: 17px; font-weight: 750; border: 3px solid #ffffff73; }
.home-hero-kicker { color: #fff9; font-size: 10px; letter-spacing: .09em; font-weight: 700; }
.home-greeting h1 { margin: 2px 0 4px; color: white; font-size: 26px; }
.home-greeting p { margin: 0; color: #fffbd9; font-size: 14px; }
.home-hero-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 0; margin-top: 38px; border-top: 1px solid #ffffff40; }
.home-hero-metrics>div { padding: 21px 11px 23px 0; border-right: 1px solid #ffffff35; }
.home-hero-metrics>div+div { padding-left: 20px; }
.home-hero-metrics>div:last-child { border-right: 0; }
.home-hero-metrics span { display: block; margin-bottom: 8px; color: #ffe1e8; font-size: 12px; }
.home-hero-metrics strong { font-size: 22px; letter-spacing: -.04em; font-weight: 650; white-space: nowrap; }
.home-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 15px; }
.home-section-title h2 { margin: 0; }
.home-section-title p { color: var(--muted); font-size: 13px; margin: 3px 0 0; }
.home-section-title a, .home-grid .section-head a { color: var(--accent); font-weight: 650; font-size: 13px; }
.home-goals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.home-goals .panel { min-height: 150px; padding: 20px 23px; }
.home-goals .panel>span { display: block; font-size: 14px; font-weight: 650; }
.home-goals strong { display: block; margin: 9px 0; font-size: 24px; font-weight: 650; }
.home-goals .bar-track { background: #eae5dc; height: 7px; margin: 8px 0; }
.home-goals small { color: var(--muted); font-size: 12px; }
.home-grid { gap: 20px; grid-template-columns: 1fr 1fr; margin: 22px 0 0; }
.home-grid .panel { min-height: 260px; padding: 21px 23px; }
.home-grid .section-head p { font-size: 12px; }
.home-grid .list-row { min-height: 61px; }
.home-rank { font-size: 12px; color: #ab9478; font-weight: 750; }
.home-grid .list-row>.num { color: var(--accent); font-size: 13px; }
.home-appointments { padding: 5px 22px; }

/* Centered content and cards */
.app-layout[data-route="/produtos"] main, .app-layout[data-route="/contatos"] main, .app-layout[data-route="/settings"] main, .app-layout[data-route="/ai-agent"] main { max-width: 1124px; margin: 0 auto; }
.app-layout[data-route="/produtos"] .page-header { margin-top: 19px; }
.metric-strip.compact { gap: 18px; border: 0; background: none; }
.metric-strip.compact>div { border: 1px solid var(--border); border-radius: 11px; background: var(--surface); min-height: 105px; padding: 19px 23px; box-shadow: 0 2px 4px #24180b0b; }
.metric-strip.compact strong { font-size: 24px; }
.list-toolbar { gap: 12px; }
.app-layout[data-route="/produtos"] .list-toolbar input { width: min(560px,100%); }
.product-toolbar { flex-wrap: wrap; }
.product-toolbar input { flex: 1; min-width: 220px; }
.product-categories { display: flex; align-items: center; gap: 4px; overflow-x: auto; }
.product-categories button { flex: none; border: 0; min-height: 34px; padding: 6px 11px; color: var(--muted); background: transparent; box-shadow: none; font-size: 12px; }
.product-categories button.selected { color: var(--accent); background: var(--accent-soft); }
.product-grid { gap: 17px; }
.product-card { min-height: 230px; padding: 19px 20px; }
.product-card h2 { font-size: 17px; margin-bottom: 13px; }
.product-card .product-price { color: #26774e; font-size: 22px; }
.product-card p { line-height: 1.5; }
.product-category { border-radius: 20px; font-weight: 650; }
.product-card-actions { margin: 3px -20px -19px; padding: 8px 18px; }
.app-layout[data-route="/contatos"] .tabs, .automation-page .tabs { display: inline-flex; width: max-content; gap: 3px; padding: 4px; margin: 1px 0 21px; border: 0; border-radius: 9px; background: #f3efe8; }
.app-layout[data-route="/contatos"] .tabs button, .automation-page .tabs button { border: 0; border-radius: 7px; padding: 9px 15px; color: #6f6963; }
.app-layout[data-route="/contatos"] .tabs button.selected, .automation-page .tabs button.selected { background: white; color: var(--accent); box-shadow: 0 2px 5px #4c372215; }
.app-layout[data-route="/contatos"] .list-toolbar input { width: 100%; flex: 1; }
.data-table th { color: #9a938d; font-size: 11px; text-transform: uppercase; font-weight: 700; letter-spacing: .02em; }
.data-table td { font-size: 13px; }
.contact-detail-page { max-width: 1240px; margin: 6px auto 0; }
.contact-detail-page .detail-back { display: inline-block; margin-bottom: 22px; font-size: 13px; font-weight: 650; }
.contact-overview { min-height: 164px; padding: 30px 34px; margin-bottom: 22px; }
.contact-overview-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.contact-overview h1 { display: flex; align-items: center; gap: 12px; margin: 2px 0 18px; font-size: 28px; font-weight: 550; }
.contact-overview h1 .status { font-size: 12px; letter-spacing: 0; }
.contact-overview p { display: flex; gap: 20px; margin: 0; color: var(--muted); font-size: 13px; }
.contact-overview p strong { color: var(--text); }
.contact-actions { justify-content: flex-end; }
.contact-actions button { min-height: 38px; font-size: 12px; }
.contact-detail-columns { display: grid; grid-template-columns: 382px minmax(0,1fr); gap: 22px; }
.contact-data-card { padding: 31px; }
.contact-data-card h2 { font-size: 22px; margin-bottom: 24px; }
.contact-data-card .detail-form { display: flex; flex-direction: column; gap: 18px; }
.contact-data-card .detail-form label { font-size: 13px; font-weight: 650; }
.contact-data-card .detail-form input { width: 100%; }
.contact-readonly-field { margin-bottom: 19px; }
.contact-readonly-field>span { display: block; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.contact-readonly-field>strong { display: block; border: 1px solid var(--border); background: #fff; min-height: 40px; padding: 10px 11px; border-radius: 7px; font-size: 13px; font-weight: 500; }
.contact-handoff { display: flex; align-items: center; justify-content: space-between; gap: 9px; font-size: 12px; color: var(--muted); }
.contact-handoff span { display: grid; place-items: center; width: 28px; height: 16px; flex: none; border-radius: 10px; background: #ded8ce; color: #fff; }
.contact-side-col { display: flex; flex-direction: column; gap: 22px; }
.contact-ai-card { min-height: 80px; padding: 26px 30px; }
.contact-ai-card span { color: var(--accent); font-size: 12px; letter-spacing: .05em; font-weight: 700; }
.contact-ai-card p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.contact-notes-card { padding: 31px; }
.contact-notes-card .section-head { align-items: flex-start; }
.contact-notes-card .section-head h2, .contact-agenda-card h2 { font-size: 22px; }
.contact-notes-card .section-head p { font-size: 13px; }
.contact-note-tabs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; font-weight: 650; }
.contact-note-tabs span { padding: 7px 10px; }
.contact-note-tabs span:first-child { background: var(--accent-soft); color: var(--accent); border-radius: 20px; }
.contact-notes-card textarea { width: 100%; min-height: 68px; background: #fff; resize: none; }
.contact-note-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0 18px; }
.contact-note-actions span { color: var(--accent); font-size: 12px; font-weight: 700; }
.contact-note-actions button { background: #eee9e1; color: #aea69d; }
.contact-note-empty { display: grid; place-items: center; min-height: 64px; border: 1px dashed var(--border); border-radius: 9px; color: var(--muted); font-size: 12px; text-align: center; padding: 12px; }
.contact-agenda-card { min-height: 132px; padding: 28px 30px; }
.contact-agenda-card p { color: var(--muted); font-size: 13px; }
.settings-page { max-width: 1060px; }
.settings-page>.page-header { margin: 22px 0 36px; }
.settings-page>.page-header p { display: none; }
.settings-group-heading { display: flex; align-items: baseline; gap: 12px; margin: 0 0 17px; font-size: 20px; }
.settings-group-heading small { font-size: 12px; font-weight: 400; color: var(--muted); }
.settings-section { padding: 24px; margin-bottom: 24px; }
.settings-section h2 { margin-bottom: 18px; }
.settings-profile { margin: 0 0 8px; }
.settings-profile-card { min-height: 414px; }
.settings-profile-card .settings-profile { margin-bottom: 17px; }
.settings-profile-card .avatar { width: 47px; height: 47px; background: var(--accent); color: white; font-size: 17px; }
.settings-profile-card .settings-profile>div { flex: 1; }
.settings-profile-card .status { margin-right: 5px; }
.settings-profile-form { display: flex; flex-direction: column; gap: 15px; }
.settings-profile-form>label { font-size: 13px; font-weight: 650; }
.settings-profile-form input { display: block; width: 100%; margin-top: 7px; font-weight: 450; }
.settings-profile-actions { display: flex; gap: 10px; margin-top: 3px; }
.settings-plan { min-height: 104px; }
.settings-plan strong { font-size: 16px; }
.settings-plan .status { margin-left: 9px; }
.settings-plan p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.settings-section>h3 { margin-top: 24px; }
.agent-page { max-width: 1120px; margin: 0 auto; }
.app-layout[data-route="/ai-agent"] main { max-width: 1188px; }
.agent-page>.page-header { display: none; }
.agent-identity { margin: 0 0 18px; padding: 0; border: 0; box-shadow: none; background: transparent; }
.agent-identity h2 { font-size: 23px; }
.agent-identity .eyebrow { display: none; }
.agent-portrait { width: 54px; height: 54px; border: 2px solid #f2e5d9; font-size: 25px; }
.agent-page .agent-layout { min-height: 710px; border-radius: 12px; }
.agent-page .agent-nav { padding: 25px 14px; background: #fbfaf6; }
.agent-nav button { font-size: 14px; padding: 11px 15px; box-shadow: none; }
.agent-nav button.selected { border: 1px solid var(--border); background: var(--surface); border-left: 3px solid var(--accent); box-shadow: 0 2px 4px #24180b0b; }
.agent-page .agent-content { padding: 31px 34px; }
.agent-page .agent-content .section-head { border: 0; padding: 0; }
.agent-page .agent-content .section-head h2 { font-size: 23px; }
.agent-page .agent-content .section-head p { display: none; }
.agent-nav-group { display: block; padding: 12px 13px 5px; color: var(--text); font-weight: 700; font-size: 14px; }
.agent-nav-group:not(:first-child) { margin-top: 20px; }
.agent-page .agent-content .form-grid:has(.agent-form-portrait) { grid-template-columns: 132px minmax(0,1fr); gap: 16px 24px; }
.agent-form-portrait { grid-column: 1; display: grid; place-items: center; width: 132px; height: 132px; border: 1px solid #e7dfd3; border-radius: 11px; background: #f4ede3; }
.agent-form-portrait span { width: 89px; height: 89px; display: grid; place-items: center; border-radius: 50%; background: #bc644f; color: #172d74; font-size: 65px; line-height: 1; box-shadow: inset 0 20px #2459bf; }
.agent-personality-fields { display: flex; flex-direction: column; gap: 17px; }
.agent-personality-fields>label:not(.checkbox-label) { font-size: 14px; font-weight: 650; }
.agent-personality-fields .checkbox-label, .agent-fine-tuning .checkbox-label { font-size: 14px; color: var(--text); }
.agent-personality-fields input:not([type="checkbox"]), .agent-personality-fields select { width: 100%; }
.agent-fine-tuning { grid-column: 1/-1; display: grid; gap: 13px; }
.agent-fine-tuning h3 { margin: 2px 0; font-size: 15px; }
.agent-fine-tuning>label { font-size: 14px; font-weight: 650; }
.agent-fine-tuning textarea { min-height: 80px; }
.agent-fine-tuning .checkbox-label { min-height: 28px; font-weight: 500; }
.agent-page .agent-content .form-grid:has(.agent-form-portrait)>.full:last-child { grid-column: 1/-1; }

/* Reports */
.report-page { max-width: 1060px; margin: 0 auto; }
.report-banner, .automation-page>.page-header { min-height: 129px; padding: 29px 33px; margin: 0 0 24px; background: linear-gradient(105deg,#be244d,#9e1c40); border: 0; border-radius: 11px; color: white; box-shadow: none; }
.report-banner h1, .automation-page>.page-header h1 { margin: 0 0 6px; color: white; font-size: 29px; font-weight: 550; }
.report-banner p, .automation-page>.page-header p { color: #ffe2e8; font-size: 14px; margin: 0; }
.report-banner-button, .automation-page>.page-header button { border: 1px solid #ffffff29; color: #fff; background: #ffffff2b; box-shadow: none; font-size: 12px; }
.report-banner-button:hover, .automation-page>.page-header button:hover { background: #ffffff3a; }
.report-banner-button.light, .automation-page>.page-header .primary-button { color: var(--accent); background: #fffefb; border-color: #fffefb; }
.report-panel { padding: 24px; margin-top: 24px; }
.report-panel .section-head h2 { font-size: 20px; font-weight: 550; }
.report-two { gap: 19px; }
.analytics-page>.metric-strip { display: none; }
.analytics-posts { margin: 43px 0 48px; }
.analytics-posts .section-head h2, .analytics-stories .section-head h2 { font-size: 20px; font-weight: 500; }
.analytics-posts .section-head a, .analytics-stories .section-head a { font-size: 12px; color: var(--text); }
.analytics-post-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.analytics-post-card { height: 500px; display: flex; flex-direction: column; justify-content: flex-end; padding: 17px; }
.analytics-post-media { flex: 1; min-height: 250px; margin: -17px -17px 18px; border-radius: 11px 11px 0 0; background: #fffefa; }
.analytics-post-card .status { align-self: flex-start; font-size: 10px; }
.analytics-post-card strong { margin-top: 9px; font-size: 14px; }
.analytics-post-card small { color: var(--muted); margin: 8px 0 5px; line-height: 1.4; }
.analytics-post-stats { display: grid; gap: 4px; margin-top: 8px; }
.analytics-post-stats span { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.analytics-post-stats b { color: var(--text); }
.analytics-stories { margin-bottom: 30px; }
.analytics-stories .report-empty { background: var(--surface); border: 1px solid var(--border); }
.goals-page .goal-grid { gap: 20px; }
.goal-grid .panel { min-height: 197px; }
.goal-grid .eyebrow { color: var(--text); font-size: 14px; text-transform: none; }
.goal-grid h2 { font-size: 23px; margin: 15px 0; }
.goal-grid .bar-track { background: #e8e3db; }
.goals-page .report-panel { border: 0; box-shadow: none; padding: 0; background: transparent; margin-top: 27px; }
.goals-page .report-panel>.table-wrap, .goals-page .report-panel>.goal-chart { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 15px; box-shadow: 0 2px 4px #24180b0b; }
.team-tabs { display: flex; align-items: center; gap: 8px; margin: 0 0 22px; }
.team-tabs span { padding: 9px 13px; border-radius: 7px; background: #f3eee6; font-size: 12px; font-weight: 650; }
.team-tabs .selected { background: var(--accent); color: white; }
.team-dashboard { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; }
.team-dashboard .panel { padding: 25px; }
.team-revenue { min-height: 323px; }
.team-dashboard .eyebrow, .team-lower .eyebrow { font-size: 11px; letter-spacing: .05em; color: #9b918a; }
.team-dashboard strong { display: block; font-size: 27px; font-weight: 500; margin-top: 18px; }
.team-revenue strong { color: var(--accent); }
.team-side { display: grid; gap: 21px; }
.team-side .panel:first-child { background: #f8eef0; border-color: transparent; }
.team-side .panel:last-child { background: #f2f5f5; border-color: transparent; }
.team-side .panel { min-height: 151px; }
.team-side strong { margin-top: 12px; }
.team-side small { display: block; color: var(--muted); }
.team-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.team-lower .panel { min-height: 190px; padding: 23px; }
.team-donut { width: 99px; height: 99px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-top: 15px; border: 12px solid #e6e0d6; border-radius: 50%; font-size: 20px; }
.team-donut small { font-size: 10px; color: var(--muted); }
.team-no-data { display: grid; place-items: center; color: var(--muted); }
.team-table { margin-top: 22px; }

/* Automations list and editor */
.automation-page { max-width: none; margin: 0 auto; }
.automation-page>.page-header { min-height: 130px; }
.automation-page>.page-header .page-actions { align-self: center; }
.automation-page>.metric-strip { display: none; }
.automation-page .tabs { margin-bottom: 28px; }
.automation-section-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.automation-section-title h2 { margin: 0; }
.automation-section-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.automation-page .automation-filters { margin: 0; }
.automation-page .automation-filters button { border-radius: 7px; padding: 7px 12px; box-shadow: none; }
.automation-page .automation-filters button.selected { color: var(--accent); background: var(--accent-soft); }
.automation-toolbar { justify-content: flex-start; margin-top: 18px; padding-bottom: 15px; }
.automation-toolbar input { width: 340px; }
.automation-toolbar select { min-height: 42px; }
.automation-list-panel { padding: 0 20px; }
.automation-row { min-height: 111px; padding: 17px 7px; }
.automation-row:first-child { border-top: 0; }
.automation-row-icon { width: 46px; height: 46px; border-radius: 10px; background: #f6e8ed; border: 0; font-size: 19px; }
.automation-row .row-main strong { font-size: 15px; }
.automation-row .row-main small { font-size: 12px; }
.automation-templates { margin-top: 31px; }
.template-card { border-radius: 10px; }
.editor-page { height: 100vh; overflow: hidden; background: #fff; }
.editor-page main { padding: 0; margin: 0; max-width: none; height: 100vh; }
.editor-heading { height: 69px; display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; padding: 0 20px; margin: 0; background: #fffefb; border-bottom: 1px solid var(--border); }
.editor-back { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; background: #f7f3ed; color: var(--text); font-size: 18px; }
.editor-heading-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #f5e8ed; color: var(--accent); font-size: 20px; }
.editor-heading>div:nth-of-type(1) { flex: 1; min-width: 0; }
.editor-heading h1 { display: block; margin: 0 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 700; }
.editor-heading small { display: block; margin: 0; color: var(--muted); font-size: 12px; }
.editor-heading-actions { align-items: center; }
.editor-heading-actions button { min-height: 37px; font-size: 12px; }
.editor-draft-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 20px; color: #795f59; background: #f8f4ed; font-size: 12px; font-weight: 700; }
.editor-draft-pill i { width: 9px; height: 9px; border-radius: 50%; background: #b6a49e; }
.editor-saved { color: var(--muted); font-size: 11px; }
.editor-toolbar { height: 43px; margin-left: 276px; border: 0; border-bottom: 1px solid var(--border); background: #fff; }
.editor-toolbar strong { font-size: 12px; }
.editor-toolbar button { box-shadow: none; }
.editor-layout { display: grid; grid-template-columns: 276px minmax(0,1fr); height: calc(100vh - 112px); min-height: 0; border: 0; border-radius: 0; position: relative; overflow: hidden; }
.editor-metrics { grid-column: 1; grid-row: 1; overflow-y: auto; padding: 25px 19px; border-right: 1px solid var(--border); background: #fffefb; }
.editor-metrics h2 { margin: 0 0 4px; font-size: 20px; }
.editor-metrics>p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.editor-metric { display: flex; flex-direction: column; justify-content: center; min-height: 105px; margin-bottom: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 7px; }
.editor-metric span { color: var(--muted); font-size: 12px; }
.editor-metric strong { margin: 8px 0 1px; font-size: 25px; line-height: 1; }
.editor-metric small, .editor-metric-footer small { color: #928b85; font-size: 11px; }
.editor-metric-footer { display: flex; flex-direction: column; gap: 7px; border-top: 1px solid var(--border); padding-top: 20px; }
.editor-metric-footer span { color: #aa8a45; font-size: 11px; font-weight: 750; }
.editor-canvas-scroll { grid-column: 2; grid-row: 1; background-color: #fdfcfa; background-image: radial-gradient(#ded9d1 1.2px,transparent 1.2px); background-size: 36px 36px; }
.editor-add-block { position: absolute; top: 18px; right: 19px; z-index: 3; min-height: 44px; background: var(--accent); color: #fff; border: 0; padding: 0 22px; box-shadow: 0 6px 12px #9c1d4033; }
.editor-add-block:hover { background: #9e1c40; }
.editor-palette { display: none; position: absolute; right: 18px; top: 72px; bottom: 18px; width: 285px; z-index: 4; border: 1px solid var(--border); border-radius: 11px; box-shadow: 0 12px 30px #24180b20; }
.palette-open .editor-palette { display: block; }
.editor-palette-head { position: relative; }
.editor-palette-head>button { position: absolute; right: 8px; top: 9px; border: 0; box-shadow: none; font-size: 22px; }
.editor-inspector { display: none; position: absolute; top: 72px; right: 18px; bottom: 18px; width: 300px; z-index: 3; border: 1px solid var(--border); border-radius: 11px; box-shadow: 0 12px 30px #24180b20; }
.inspector-open .editor-inspector { display: block; }
.palette-open .editor-inspector { display: none; }
.graph-card { width: 360px; min-height: 206px; border-radius: 22px; border-color: #ddd9d3; box-shadow: 0 5px 12px #24180b17; }
.graph-card.trigger, .graph-card.condition, .graph-card.action, .graph-card.wait, .graph-card.loop { border-top: 1px solid #ddd9d3; }
.graph-card-main { padding: 19px 22px 7px; width: 100%; gap: 11px; }
.graph-card-heading { display: flex; align-items: center; width: 100%; gap: 11px; }
.graph-card-heading strong { font-size: 17px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.graph-card-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(130deg,#6b45ce,#d52d76,#ee7941); color: #fff; font-size: 27px; line-height: 1; }
.graph-card-category { color: #315aba; font-size: 12px; font-weight: 700; }
.graph-card-preview { display: block; width: 100%; max-height: 75px; overflow: hidden; padding: 12px 15px; border-radius: 16px; background: #f0eef0; color: #3f3b3d; font-size: 14px; line-height: 1.4; text-align: left; }
.graph-card-main small { color: #9b9290; font-size: 10px; }
.graph-ports { padding: 4px 0 12px; }
.graph-line { stroke: #c73a63; stroke-width: 3; }
.graph-line-end { fill: #c73a63; }
.editor-message, .editor-errors { position: absolute; z-index: 10; top: 116px; left: 295px; right: 20px; border: 1px solid var(--border); border-radius: 7px; box-shadow: 0 4px 12px #24180b18; }

/* Wide operation views */
.app-layout[data-route="/pipeline"] main, .app-layout[data-route="/agenda"] main, .app-layout[data-route="/conversations"] main { padding-top: 29px; }
.pipeline-stats { font-size: 13px; margin: -5px 0 20px; }
.pipeline-stats input { min-width: 240px; }
.pipeline-board { grid-template-columns: repeat(6,minmax(190px,1fr)); gap: 12px; }
.stage-column { min-height: calc(100vh - 245px); border: 0; background: #f7f3ed; padding: 17px 12px; }
.stage-column header strong { font-size: 13px; }
.stage-count { background: #eae4dc; }
.stage-value { color: #9a9188; }
.lead-card { border-left: 0; border-top: 3px solid var(--stage-color); background: #fffefa; }
.stage-empty { margin-top: 14px; border-color: #dbd4c9; min-height: 102px; }
.calendar-panel { background: #fffefa; }
.calendar-top { padding: 19px 22px; }
.calendar-top h2 { font-size: 18px; }
.calendar-weekday { font-size: 12px; padding: 16px; text-transform: uppercase; }
.calendar-day { min-height: 115px; background: #fffefa; }
.calendar-day.outside { background: #fbf9f5; }
.calendar-day.today { background: #fef3f4; }
.inbox-layout { border-radius: 11px; background: #fffefa; }
.inbox-layout>.panel { box-shadow: none; }
.inbox-filters, .conversation-list, .conversation-detail { background: #fffefa; }
.conversation-row { background: #fffefa; }
.conversation-row.selected { background: #f8eef0; }
.message.incoming { background: #f4f0ea; }
.message.outgoing { background: #f8e9ee; }
.app-layout[data-route="/conversations"] .topbar-calendar { display: none; }
.app-layout[data-route="/conversations"] main { padding: 0; }
.app-layout[data-route="/conversations"] .demo-footer { display: none; }
.inbox-layout { display: grid; grid-template-columns: 238px minmax(0,1fr); height: calc(100vh - 62px); min-height: 520px; border: 0; border-radius: 0; overflow: hidden; box-shadow: none; }
.inbox-filters { display: flex; flex-direction: column; min-height: 0; padding: 25px 18px 20px; border-right: 1px solid var(--border); background: #fffefb; }
.inbox-filter-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 21px; }
.inbox-filter-title h1 { font-size: 26px; font-weight: 500; margin: 0; }
.inbox-filter-title>span { font-size: 18px; color: #a9a29b; }
.inbox-filters input { width: 100%; height: 35px; min-height: 35px; margin-bottom: 13px; background: #f5f1ea; border: 0; font-size: 13px; }
.inbox-filter-toggle { width: 100%; display: flex; justify-content: space-between; min-height: 35px; padding: 8px 10px; text-align: left; border: 0; background: #f5f1ea; box-shadow: none; font-size: 13px; }
.inbox-filters>select { width: 100%; min-height: 32px; margin: 10px 0 12px; background: #f5f1ea; border: 0; font-size: 12px; }
.inbox-filters>select:disabled, .inbox-filter-toggle:disabled { opacity: 1; color: #5e5955; }
.filter-stack { display: grid; gap: 2px; }
.filter-button { min-height: 36px; border-radius: 6px; font-size: 13px; }
.filter-button.selected { color: var(--accent); background: var(--accent-soft); }
.filter-button>.num { color: #9b958f; font-weight: 450; }
.inbox-uploads { margin-top: auto; border-top: 1px solid var(--border); padding: 17px 8px 0; color: #6d6762; font-size: 13px; }
.conversation-list { overflow-y: auto; background: #fffefb; }
.conversation-row { min-height: 97px; align-items: center; padding: 15px 22px; border-top: 0; border-bottom: 1px solid var(--border); background: #fffefb; }
.conversation-row .avatar { width: 40px; height: 40px; background: #eee9df; color: #71695f; font-size: 12px; }
.conversation-row .row-main strong { font-size: 14px; }
.conversation-row .row-main small { font-size: 13px; color: #393432; margin-top: 4px; }
.conversation-row-foot { display: block; margin-top: 6px; color: #9c958d; font-size: 11px; }
.conversation-row .row-meta { min-width: 44px; height: 62px; justify-content: space-between; }
.conversation-detail { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 0; background: #fffefb; }
.conversation-person { min-height: 74px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.conversation-person h2 { font-size: 14px; }
.conversation-person p { font-size: 12px; }
.conversation-person-spacer { flex: 1; }
.conversation-person .button { min-height: 36px; font-size: 12px; color: var(--accent); }
.conversation-back { display: none; border: 0; box-shadow: none; }
.conversation-detail .messages { flex: 1; min-height: 0; overflow-y: auto; padding: 28px; }
.conversation-detail .message { max-width: min(70%,620px); }
.conversation-detail .reply-form { position: relative; display: flex; align-items: center; gap: 11px; padding: 15px 18px 27px; border-top: 1px solid var(--border); background: #fffefb; }
.conversation-detail .reply-form textarea { min-height: 44px; height: 44px; flex: 1; resize: none; }
.conversation-detail .reply-form button { min-width: 39px; min-height: 39px; padding: 5px; }
.conversation-detail .reply-form small { position: absolute; right: 19px; bottom: 5px; font-size: 10px; color: var(--muted); }

@media(max-width: 900px) {
  .sidebar { position: fixed; z-index: 30; }
  .content-column { width: 100%; }
  .topbar { padding: 0 18px; }
  .topbar-account strong { max-width: 130px; }
  .editor-layout { grid-template-columns: 185px minmax(0,1fr); }
  .editor-toolbar { margin-left: 185px; }
  .editor-metrics { padding: 17px 10px; }
  .editor-metric { min-height: 89px; }
  .editor-page .editor-palette { order: initial; }
  .home-hero-metrics strong { font-size: 18px; }
}
@media(max-width: 650px) {
  main { padding: 20px 14px 32px; }
  .topbar { gap: 10px; }
  .topbar-calendar, .topbar-bell, .language-pill { display: none; }
  .topbar-account { margin-left: auto; }
  .page-header h1 { font-size: 26px; }
  .home-page { margin-top: 0; }
  .home-hero { padding: 22px 18px 0; min-height: 0; }
  .home-greeting h1 { font-size: 20px; }
  .home-greeting p { font-size: 12px; }
  .home-portrait { width: 44px; height: 44px; font-size: 12px; }
  .home-hero-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 24px; }
  .home-hero-metrics>div, .home-hero-metrics>div+div { padding: 12px 8px; border-bottom: 1px solid #ffffff35; }
  .home-hero-metrics span { font-size: 10px; }
  .home-hero-metrics strong { font-size: 15px; }
  .home-goals, .home-grid, .team-dashboard, .team-lower { grid-template-columns: 1fr; }
  .metric-strip.compact { grid-template-columns: 1fr; }
  .metric-strip.compact>div { min-height: 88px; }
  .pipeline-viewport { width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
  .pipeline-board { display: grid; grid-template-columns: repeat(6,220px); width: max-content; max-width: none; }
  .stage-column { min-width: 0; min-height: 560px; }
  .analytics-post-grid { grid-template-columns: 1fr; }
  .analytics-post-card { height: 370px; }
  .report-banner, .automation-page>.page-header { padding: 22px; min-height: 105px; flex-wrap: wrap; }
  .automation-page>.page-header .page-actions { flex-wrap: wrap; }
  .automation-section-title { display: block; }
  .automation-filters { margin-top: 10px !important; }
  .automation-toolbar { flex-direction: column; align-items: stretch; }
  .automation-toolbar input { width: 100%; }
  .editor-heading { gap: 6px; padding: 0 8px; }
  .editor-heading>div:nth-of-type(1) { flex: 1; min-width: 0; }
  .editor-heading h1 { font-size: 13px; }
  .editor-heading-actions { width: auto; margin-left: auto; flex: none; }
  .editor-heading-actions button:not(:first-of-type), .editor-saved { display: none; }
  .editor-draft-pill { font-size: 0; padding: 7px; }
  .editor-draft-pill i { display: block; }
  .editor-toolbar { margin-left: 0; padding: 4px 8px; }
  .editor-toolbar>span, .editor-toolbar strong { display: none; }
  .editor-layout { display: block; height: calc(100vh - 112px); }
  .editor-metrics { display: none; }
  .editor-canvas-scroll { display: block; width: 100%; height: 100%; }
  .editor-palette, .editor-inspector { left: 9px; right: 9px; width: auto; }
  .editor-add-block { right: 12px; top: 12px; }
  .agent-page .agent-nav { display: flex; flex-direction: row; overflow-x: auto; padding: 10px; }
  .agent-nav button { white-space: nowrap; }
  .agent-page .agent-content { padding: 20px; }
  .agent-page .agent-content .form-grid:has(.agent-form-portrait) { grid-template-columns: 1fr; }
  .agent-form-portrait, .agent-personality-fields, .agent-fine-tuning { grid-column: 1; }
  .contact-detail-columns { grid-template-columns: 1fr; }
  .contact-overview { padding: 20px; }
  .contact-overview-top { flex-direction: column; }
  .contact-overview h1 { font-size: 21px; flex-wrap: wrap; }
  .contact-overview p { flex-wrap: wrap; gap: 8px 13px; }
  .contact-actions { justify-content: flex-start; }
  .contact-data-card, .contact-notes-card, .contact-agenda-card { padding: 20px; }
  .demo-footer { flex-wrap: wrap; padding: 0 14px; }
  .inbox-layout { display: block; position: relative; height: calc(100vh - 62px); }
  .inbox-filters { height: 100%; width: 100%; border-right: 0; }
  .inbox-layout.show-list .inbox-filters { display: block; height: auto; padding: 15px; border-bottom: 1px solid var(--border); }
  .inbox-layout.show-list .inbox-uploads { display: none; }
  .inbox-layout.show-list .conversation-list { height: calc(100vh - 395px); }
  .inbox-layout.show-detail .inbox-filters { display: none; }
  .inbox-layout.show-detail .conversation-detail { height: 100%; }
  .conversation-back { display: inline-grid; place-items: center; }
  .conversation-person .status { display: none; }
  .conversation-person .button { padding: 6px; }
  .conversation-detail .message { max-width: 90%; }
}
