/* ObraRitmo UI 2.0 · inspired by the supplied planning screenshots.
   All resources are local. The ObraRitmo identity remains independent. */
:root{--ink:#273144;--muted:#778091;--line:#e0e1e8;--bg:#fafafa;--brand:#4b39f1;--teal:#5040f3;--orange:#fb8622;--sidebar:296px;--violet-light:#e6e2ff}
body{font-family:Arial,Helvetica,system-ui,sans-serif;color:#3f4b5f;background:var(--bg);font-size:14px;line-height:1.5}
button,input,select,textarea{font-family:inherit}
button,.btn,a.btn{border-radius:4px;border-color:#e4e4e9;background:#fff;color:#647080;padding:9px 13px;transition:background .14s,border-color .14s,color .14s}
button:hover,.btn:hover{background:#f1efff;border-color:#bbb3ff;color:#4535eb}
button:disabled{color:#a4a7ad;background:#ececec;opacity:1}
input,select,textarea{border:1px solid #d2d3dd;border-radius:4px;min-height:38px;padding:9px;color:#48566b;background:white}
input:focus,select:focus,textarea:focus,button:focus-visible,a:focus-visible{outline:2px solid #aaa2ff;outline-offset:1px}
.primary{background:var(--brand)!important;border:1px solid var(--brand)!important;color:white!important;font-weight:600}
.primary:hover{background:#3d28d7!important}
h1,h2,h3{font-weight:600;color:#23314a;letter-spacing:0}
h1{font-size:22px}h2{font-size:19px}h3{font-size:16px}
a{color:#4b39f1}
.shell{grid-template-columns:var(--sidebar) minmax(0,1fr)}
.shell.collapsed{--sidebar:78px}
.sidebar{background:#f1f0f6;color:#586477;border-right:1px solid #e1e0e9;padding:0 0 17px;gap:0;box-shadow:none;z-index:8}
.sidebar .brand{height:66px;padding:13px 17px;background:#fff;color:#252b3c;font-size:21px;gap:12px;border-bottom:1px solid #f0eff5;flex-shrink:0}
.brand-icon{width:34px;height:34px;min-width:34px;border-radius:8px;background:linear-gradient(132deg,#547cff 0%,#5b42eb 55%,#3c2bd7 100%);position:relative;overflow:hidden;display:flex;gap:0;align-items:center;justify-content:center}
.brand-icon i:first-child{width:9px;height:29px;background:linear-gradient(#c2b9ff,#849fff);transform:skewY(-26deg);margin-left:1px}
.brand-icon i:last-child{width:9px;height:29px;background:linear-gradient(#eff0ff,#8194ff);transform:skewY(26deg);margin-right:1px}
.sidebar .brand span{font-weight:650;letter-spacing:-.7px}
.sidebar .brand span small{color:#777e8c;font-size:8px;letter-spacing:.9px;font-weight:500}
.side-project{height:68px;display:flex;align-items:center;gap:12px;padding:10px 15px;min-height:68px;flex-shrink:0}
.avatar{display:grid;place-items:center;border-radius:50%;background:#5041e9;color:white;width:38px;height:38px;min-width:38px;font-weight:700;font-size:15px}
.side-project-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:650;color:#202839}
.side-chevron{margin-left:auto;color:#808697}
.sidebar nav{display:flex;flex-direction:column;gap:0;padding-top:2px;overflow:auto}
.nav-label{color:#555f71;margin:13px 15px 9px;font-size:11px;letter-spacing:.1px;text-transform:none}
.nav-item{color:#626e81;min-height:55px;padding:12px 16px;border-radius:0;font-size:14px;display:flex;gap:20px;align-items:center;overflow:hidden}
.nav-item:hover{background:#e8e5f8;color:#4937e3}
.nav-item.active{background:#dcd7f6;color:#4e36f0}
.nav-icon{flex:0 0 21px;display:grid;place-items:center;color:inherit}
.sidebar .user{margin-top:auto;border-color:#e1e0e7;padding:15px;color:#677186;margin-inline:12px;font-size:12px}
.sidebar .user small{color:#9699a3}
.sidebar .user button{color:#4d3aeb;border-color:#dcd9f7}
.collapsed .sidebar{padding:0 0 15px}
.collapsed .sidebar .brand{padding:12px 21px;justify-content:center}
.collapsed .side-project{padding:10px 19px}
.collapsed .side-project-name,.collapsed .side-chevron,.collapsed .sidebar .label,.collapsed .nav-label,.collapsed .user span,.collapsed .brand span{display:none}
.collapsed .nav-item{padding:14px 28px;justify-content:center}
.collapsed .sidebar .user{padding:10px 4px;margin:0 8px}
.collapsed .sidebar .user button{font-size:9px;padding:6px}
.main{background:#fbfbfc}
.topbar{height:66px;background:#fff;border-color:#ececf1;padding:0 22px;gap:16px;position:sticky;top:0;z-index:5}
.topbar .top-left{gap:12px;flex-wrap:nowrap;overflow:hidden}
.topbar .top-right{gap:12px;flex-wrap:nowrap}
.topbar #collapse{font-size:18px;background:transparent;border:0;color:#605c88;padding:6px 10px}
.topbar select{border:0;border-radius:0;background:transparent;max-width:225px;text-overflow:ellipsis;color:#4c5671;font-weight:500;font-size:14px}
.topbar select:hover{color:var(--brand)}
.topbar .crumb-sep{color:#a6a6b4}
.topbar .dot{background:#eef9f1;color:#3a8c66;border-radius:5px;font-size:10px;white-space:nowrap}
.ai-badge{color:#4b34f5;font-size:17px;font-weight:900;white-space:nowrap}
.topbar .user-name{font-size:13px;color:#89919e}
.topbar .new-tab{font-size:19px;padding:5px 11px}
.content{padding:25px 30px 42px;min-height:calc(100vh - 66px);overflow-x:hidden}
.page-head{margin-bottom:22px;align-items:center}
.page-head h1{font-size:23px;font-weight:600}
.page-head .eyebrow{color:#727d93;font-size:11px;font-weight:500;letter-spacing:.5px}
.page-head .subtitle{font-size:13px}
.page-head .actions{justify-content:flex-end}
.content>.cards{margin-top:10px}
.card,.column,.table-wrap{box-shadow:0 1px 4px #24283b0b;border-radius:3px;border:1px solid #e5e5e8}
.card{padding:18px}
.metric small{font-size:12px;color:#687083;text-transform:none}
.metric .value{font-weight:650;color:#343250;letter-spacing:-.5px;font-size:27px}
.metric .hint{font-size:11px;color:#8c94a1}
.track{background:#edebfa}
.track i{background:var(--brand)}
.toolbar{background:#fff;border:0;border-radius:3px;margin-bottom:16px;padding:12px 15px;gap:12px;box-shadow:0 1px 2px #24283b09}
.toolbar .segmented{border-color:#e8e7ee}
.segmented button.active{background:#e7e2ff!important;color:#4833e8!important;border-color:#b8b0ff!important}
.tag{background:#f1f0fa;color:#6659ba;border-color:#e5e1fc}
.note{background:#f0f1f3;border:0;border-radius:3px;color:#626b7c;font-size:13px}
.note-info{background:#f1f1f2;color:#5f6981}
.table-wrap{background:white;border-color:#dedee3;border-radius:2px;box-shadow:0 2px 5px #0000000a}
table{font-size:14px}
th{font-size:13px;text-transform:none;letter-spacing:0;background:#fff;color:#646c79;font-weight:650;padding:17px 14px;line-height:1.4;white-space:nowrap}
td{padding:16px 14px;color:#667181;min-width:100px}
tbody tr:hover{background:#f8f7ff}
.empty{background:#fff;color:#888ba0;border:1px solid #e8e8ec;border-radius:3px}
/* Four project phases – initial screen */
.content-portfolio{background:#f6f6f7}
.welcome{display:flex;align-items:center;justify-content:space-between;margin:8px 2px 24px}
.welcome h1{color:#656a72;font-size:21px}
.stages-panel{padding:24px 28px 28px;background:white;border-radius:8px}
.stages-panel>h2{font-size:22px;font-weight:500;color:#5c626a;margin-bottom:32px}
.step-rail{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:0;margin:14px 8px 34px}
.step{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:0;gap:13px;position:relative;color:#8b8992;font-size:13px;text-align:center}
.step>span{min-height:42px;max-width:150px;line-height:1.1;padding-inline:3px}
.step:after{content:'';position:absolute;height:1px;left:62%;right:-38%;bottom:12px;background:#e2e1e4;z-index:0}
.step:last-child:after{display:none}
.step b{position:relative;z-index:1;background:#5041ef;border-radius:50%;color:white;width:25px;height:25px;font-size:12px;display:grid;place-items:center}
.step:nth-child(-n+2) b{background:#4368e3}
.phase-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:22px}
.phase-card{border-radius:8px;background:#fff;box-shadow:0 4px 11px #1118272a;overflow:hidden;min-width:0}
.phase-title{height:63px;display:flex;align-items:center;gap:10px;color:#586276;padding:12px 16px;font-size:15px}
.phase-title b{background:#4c3cea;color:#fff;min-width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-size:18px}
.phase-card:first-child .phase-title b{background:#8da9eb}
.phase-color{height:125px;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:4px;color:white;text-decoration:none;background:#4f42ec}
.phase-color:hover{filter:brightness(.95);color:white}
.phase-color strong{font-size:45px;line-height:1.1;font-weight:600}
.phase-color span{font-size:14px}
.phase-0{background:#8ba9eb}.phase-1{background:#4c58ee}.phase-2{background:#4633e8}.phase-3{background:#4936e4}
.phase-bottom{height:61px;display:flex;align-items:center;justify-content:space-between;padding:15px 17px;color:#757781;font-size:13px;gap:10px}
.phase-bottom a{text-decoration:none;color:#697180;font-size:27px;line-height:1}
.portfolio-lower{margin-top:30px}
.section-heading{display:flex;align-items:center;justify-content:space-between;margin:18px 0 16px}
.section-heading h2{font-size:19px;font-weight:500}
.section-heading span{color:#8a94a0;font-size:12px}
.project-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}
.project-card .badge-icon{background:#eeeaff;color:#533ae9}
.project-card h2{font-weight:600}
/* Macroflow screenshot: dotted surface, colorful stage nodes */
.flow-canvas{background-color:white;background-image:radial-gradient(#d4d3d9 0.75px,transparent .9px);background-size:10px 10px;border:1px solid #e0e0e6;border-radius:0;height:520px}
.flow-canvas svg{height:510px;min-width:1120px}
.flow-node rect{fill:#4935ed;stroke:#ffffffaa;stroke-width:.6px;rx:3px;filter:drop-shadow(1px 4px 3px #7777)}
.flow-node:nth-of-type(7n+1) rect{fill:#39b4fb}.flow-node:nth-of-type(7n+2) rect{fill:#fc7228}.flow-node:nth-of-type(7n+3) rect{fill:#0c8eb7}.flow-node:nth-of-type(7n+4) rect{fill:#111827}.flow-node:nth-of-type(7n+5) rect{fill:#ef2d27}.flow-node:nth-of-type(7n+6) rect{fill:#83aa1a}
.flow-node text{fill:white;font-family:Arial,Helvetica,sans-serif;font-weight:650;font-size:13px}
.flow-node .node-meta{font-size:10px;fill:#fff9}
.flow-edge{stroke:#9b9ca4;stroke-width:1.3}
/* Schedule with crisp visual hierarchy. Logical arrows remain on the Gantt canvas. */
.schedule{background:white;border-radius:2px;border-color:#e6e6e9}
.schedule-corner,.time-head{background:#f4f4f5;color:#535d70;border-color:#d9d9e0}
.months,.weeks,.days{color:#535d70;background:#f1f1f2;font-size:11px;border-color:#dfe0e4}
.schedule-row{min-height:49px}
.row-label{font-size:12px;background:#fff;color:#626c7d;border-color:#e1e2e6}
.group .row-label,.group .lane{background:#f0f0f3;color:#53617c}
.lane{background-image:linear-gradient(to right,#e5e5e8 1px,transparent 1px);background-color:#fff;border-color:#e8e8eb}
.bar{border-radius:1px;height:20px;line-height:20px;font-size:10px;box-shadow:0 2px 3px #0000001c}
.bar.critical{outline-color:#f15855}
.gantt-links{z-index:3}
.gantt-links path{stroke:#4c45bb}
.schedule-foot{color:#707a87;background:#fff;border-color:#e4e5e9}
/* Weekly screen mirrors the reference list with sticky header and wider columns */
.content-weekly{padding:16px 24px 36px}
.week-context{color:#8b8b98;font-size:13px;margin:0 0 9px}
.week-context b{color:#606778;font-weight:500}
.week-context>span{float:right}
.week-toolbar{padding:7px 0 13px;box-shadow:none;background:transparent;display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap}
.week-toolbar .row{gap:4px;flex-wrap:nowrap}
.week-selector{display:flex;flex-direction:row;align-items:center;gap:6px;padding:0 10px;border-radius:3px;background:#ededee}
.week-selector input{width:148px;background:transparent;border:0;color:#404b5c}
.week-kpis{background:#f4f4f4;border-radius:3px;color:#485266;padding:12px;font-size:12px;white-space:nowrap}
.week-toolbar .actions{gap:6px}
.weekly-table{overflow:auto;width:100%}
.weekly-table .table-wrap{overflow:auto;max-height:60vh}
.weekly-table table{min-width:1250px}
.weekly-table th{position:sticky;top:0;z-index:1;background:white}
.weekly-table td{white-space:normal}
.weekly-table td:first-child,.weekly-table th:first-child{min-width:150px;max-width:215px}
.weekly-table td:nth-child(3){min-width:100px}
.weekly-table button{padding:4px 8px}
.week-grid{grid-template-columns:repeat(7,minmax(155px,1fr));gap:7px}
.week-grid .column{background:#f7f7fa}
/* Board and filter drawer as in Restricoes reference */
.content-restrictions{padding:0;background:#f7f7f7}
.kanban-heading{min-height:62px;background:#fff;border-bottom:1px solid #dddde3;display:flex;align-items:center;gap:17px;padding:10px 22px}
.kanban-heading h1{font-size:22px;font-weight:500;color:#25252c}
.kanban-heading .actions{margin-left:auto}
.kanban-counters{display:flex;border:1px solid #dedee4;border-radius:4px;gap:10px;padding:8px;font-size:12px;color:#777}
.restrictions-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;min-height:calc(100vh - 130px)}
.restrictions-board{padding:12px;min-width:0;overflow:auto}
.restrictions-board .board{grid-template-columns:repeat(3,minmax(230px,1fr));gap:8px}
.restrictions-board .column{background:#f3f3f4;border:0;box-shadow:none;border-radius:0;min-height:calc(100vh - 185px);padding:12px}
.restrictions-board .column h3{font-weight:500;font-size:21px;color:#637083}
.restrictions-board .ticket{box-shadow:0 2px 6px #00000009}
.filter-panel{background:#fff;border-left:1px solid #dfe0e5;padding:18px 16px;display:flex;flex-direction:column;gap:17px}
.filter-panel h3{font-size:16px;font-weight:500;display:flex;justify-content:space-between;margin-bottom:3px}
.filter-panel h3 span{color:var(--brand)}
.filter-panel label{font-size:12px;color:#555d6f;gap:6px}
.filter-panel label input,.filter-panel label select{width:100%;border-radius:3px}
.filter-explainer{font-size:12px;color:#8d92a0;border-top:1px solid #e9e9ee;padding-top:15px}
/* Measurement history split panel */
.content-measurements{padding:0;background:#fafafa}
.measurement-layout{display:grid;grid-template-columns:320px minmax(0,1fr);min-height:calc(100vh - 67px)}
.measurement-history{background:#f7f7f7;border-right:1px solid #dcdce1;padding:18px 17px;overflow:auto}
.measurement-history h3{font-weight:500;font-size:15px;padding-bottom:18px;border-bottom:1px solid #dedee2}
.measurement-history>label{margin-top:17px}
.measurement-history input{background:transparent;border:0;border-bottom:1px solid #999ba4;border-radius:0}
.history-dates{display:flex;flex-direction:column;margin-top:12px;gap:0}
.history-item{display:flex;align-items:center;gap:13px;border:0;background:transparent;justify-content:flex-start;padding:14px 6px;text-align:left;font-size:14px;color:#777f8b}
.history-item span{width:26px;height:26px;border-radius:50%;background:#ededee;display:inline-block;flex:0 0 26px}
.history-item.active span{background:#232039}
.history-item.active{color:#4b5666}
.measurement-detail{min-width:0;background:#fafafa}
.measurement-tabs{display:flex;justify-content:center;gap:30px;height:53px;background:#fff;border-bottom:1px solid #dedfe5;text-transform:uppercase;letter-spacing:1.3px;font-size:13px;align-items:center;color:#9ca0ae}
.measurement-tabs b{height:53px;display:grid;place-items:center;border-bottom:2px solid #523cf1;color:#232a3c;font-weight:600}
.measurement-top{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:#fff;border-bottom:1px solid #e2e2e6}
.measurement-top span{color:#556177}
.measure-date-title{margin:24px 17px;font-weight:500;color:#64728a}
.measurement-detail .weekly-table{padding:0 14px}
.measurement-detail .note{margin:15px}
.measurement-detail .table-wrap{min-height:180px}
/* Dark confirmation preview with distinct dependent rows */
dialog{border-radius:7px;box-shadow:0 16px 60px #19162e66;border-color:#d9d8e8}
dialog .dialog-head{border-bottom:1px solid #eeeef3;padding-bottom:15px}
dialog h2{font-weight:550}
#toast{background:#1f1d38;box-shadow:0 7px 20px #24223644}
#toast.error{background:#bc3955}
.help-rail{position:fixed;right:0;top:65%;writing-mode:vertical-rl;transform:rotate(180deg);background:#4b36f1;color:white;border:0;border-radius:0 5px 5px 0;padding:12px 7px;z-index:11;font-size:14px;font-weight:650;box-shadow:0 2px 7px #1112}
.help-rail:hover{background:#3828c8;color:#fff}
.panel{border-left:1px solid #e2dfef;box-shadow:-12px 0 50px #14132b22}
.login-art{background:linear-gradient(135deg,#25215a,#4a38e5)}
.login-art h1{color:#fff}
.login-art p{color:#dedaff}
@media(max-width:1200px){.step-rail{font-size:11px}.phase-grid{gap:12px}.phase-title{font-size:13px;padding:8px}.stages-panel{padding:18px}.restrictions-layout{grid-template-columns:minmax(0,1fr) 250px}}
@media(max-width:950px){.shell{--sidebar:78px}.sidebar{padding:0}.sidebar .brand span,.sidebar .side-project-name,.sidebar .side-chevron,.sidebar .label,.nav-label,.sidebar .user span{display:none}.sidebar .brand{justify-content:center;padding:12px}.side-project{justify-content:center}.nav-item{justify-content:center;padding:14px}.topbar{padding:0 10px}.topbar .top-right .user-name{display:none}.phase-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.step-rail{display:none}.stages-panel>h2{margin-bottom:22px}.measurement-layout{grid-template-columns:220px minmax(0,1fr)}.restrictions-layout{grid-template-columns:minmax(0,1fr) 225px}}
@media(max-width:700px){.shell{display:block}.sidebar{position:sticky;top:0;height:58px;flex-direction:row;padding:0;overflow:visible}.sidebar .brand{height:58px;padding:9px}.sidebar .brand span{display:block;font-size:15px}.sidebar .brand span small{display:none}.sidebar .side-project,.sidebar nav,.sidebar .user{display:none}.sidebar .mobile-nav{display:block;margin:auto 9px auto auto;max-width:170px}.topbar{position:relative;min-height:54px;height:auto;padding:7px}.topbar select{max-width:110px}.topbar .top-right{gap:4px}.topbar .dot,.topbar .ai-badge{display:none}.topbar .new-tab{font-size:14px}.content{padding:14px;min-height:calc(100vh - 110px)}.content-restrictions,.content-measurements{padding:0}.welcome{gap:10px}.welcome h1{font-size:19px}.stages-panel{padding:15px}.phase-grid{gap:11px}.phase-color{height:98px}.phase-title{font-size:12px}.phase-bottom{font-size:11px}.restrictions-layout{grid-template-columns:1fr}.filter-panel{border:0;border-top:1px solid #e1dfe8}.restrictions-board .board{grid-template-columns:repeat(3,minmax(230px,1fr))}.measurement-layout{grid-template-columns:1fr}.measurement-history{max-height:170px;overflow:auto}.measurement-history h3{padding:0 0 10px}.history-dates{flex-direction:row;overflow:auto}.history-item{white-space:nowrap}.week-context>span{float:none;display:block}.week-toolbar .row{flex-wrap:wrap}.week-toolbar .actions{justify-content:flex-start}.help-rail{top:auto;bottom:80px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* v2.0.1 — seletor de obra, estado de carregamento e ajustes de layout */
.sidebar nav{flex:1 1 auto;min-height:0;overscroll-behavior:contain}
button.side-project{width:100%;border:0;border-radius:0;background:transparent;text-align:left;cursor:pointer;font:inherit;color:inherit;box-shadow:none}
button.side-project:hover{background:#e8e5f8}
button.side-project:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.project-loading{display:flex;align-items:center;justify-content:center;gap:12px;min-height:50vh;color:var(--muted);font-size:14px}
.spinner{width:22px;height:22px;border-radius:50%;border:3px solid var(--violet-light);border-top-color:var(--brand);animation:or-spin .8s linear infinite}
@keyframes or-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spinner{animation-duration:2.4s}}
.error-state small{color:#b42318}
dialog.picker-dialog{max-width:560px}
.picker-search{width:100%;margin-bottom:12px}
.picker-list{display:grid;gap:8px;max-height:min(56vh,460px);overflow:auto;padding:2px}
.picker-item{display:flex;align-items:center;gap:12px;width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:8px;background:#fff;text-align:left;cursor:pointer;font:inherit;color:var(--ink);min-height:62px}
.picker-item:hover,.picker-item:focus-visible{border-color:var(--brand);background:#f6f4ff;outline:none}
.picker-item.current{border-color:#c9c2fb;background:#f3f1ff}
.picker-item[hidden]{display:none}
.picker-info{display:grid;gap:3px;min-width:0;flex:1}
.picker-info b{font-size:14px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.picker-info small{color:var(--muted);font-size:12px}
.picker-current{font-size:11px;font-weight:650;color:var(--brand)}
.picker-item .tag{flex-shrink:0}
.picker-empty{margin-top:10px}
dialog.picker-dialog .form-actions{justify-content:space-between}
@media(max-width:600px){.picker-item{padding:10px}.picker-item .tag{display:none}}
@media(max-width:700px){.topbar #collapse{display:none}.topbar #company.single-company,.topbar #company.single-company+.crumb-sep{display:none}.topbar .top-left{flex:1;min-width:0}.topbar #project{max-width:none;flex:1;min-width:0}}
