:root{--obra-bg:#f4f5f7;--obra-surface:#fff;--obra-subtle:#eef1f5;--obra-border:#d9dee6;--obra-text:#17202d;--obra-muted:#526071;--obra-primary:#1f5fbf;--obra-primary-hover:#174a96;--obra-radius:12px;--obra-focus:#2563eb;--obra-safe:env(safe-area-inset-bottom,0px);color-scheme:light}
.dark{--obra-bg:#111827;--obra-surface:#1f2937;--obra-subtle:#293548;--obra-border:#46536a;--obra-text:#f3f4f6;--obra-muted:#bdc9d9;--obra-primary:#2563eb;--obra-primary-hover:#1d4ed8;--obra-focus:#93c5fd;color-scheme:dark}
html,body{margin:0;height:100%;background:var(--obra-bg);color:var(--obra-text)}
body{font-size:16px;line-height:1.45;caret-color:var(--obra-primary)}
::selection{background:#bed7fb;color:#132c51}
.obra-app{height:100vh;height:100dvh;min-width:0}
button,input,select,textarea,summary{touch-action:manipulation}
button,summary{cursor:pointer}
button:disabled{opacity:.55;cursor:wait}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid var(--obra-focus);outline-offset:3px}
input,select,textarea{font-size:16px!important;min-height:44px;max-width:100%}
button{min-height:44px}
.obra-header{background:var(--obra-surface);border-bottom:1px solid var(--obra-border);padding:0 16px 12px;flex-shrink:0;z-index:30}
.obra-topbar{display:flex;gap:12px;justify-content:space-between;align-items:center;min-height:60px;max-width:1024px;margin:auto}
.obra-brand{display:flex;align-items:center;gap:8px;font-size:18px;font-weight:700;white-space:nowrap}
.obra-account{display:flex;align-items:center;gap:4px;min-width:0}
.obra-button,.obra-icon{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;border-radius:8px;font-size:14px;font-weight:600;line-height:1.3;color:var(--obra-text);transition:background-color .15s ease}
.obra-button{padding:10px 12px;background:var(--obra-subtle)}
.obra-icon{width:44px;min-width:44px;padding:10px;background:transparent}
.obra-button:hover,.obra-icon:hover{background:var(--obra-border)}
.obra-primary{background:var(--obra-primary);color:#fff}
.obra-primary:hover{background:var(--obra-primary-hover)}
.obra-admin{background:transparent;color:var(--obra-muted);padding-inline:8px}
.obra-identify,.obra-user{background:transparent;color:var(--obra-primary)}
.dark .obra-identify,.dark .obra-user{color:#bfdbfe}
.obra-user span{max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.obra-search{display:flex;align-items:center;gap:12px;background:var(--obra-subtle);border:1px solid var(--obra-border);border-radius:8px;max-width:1024px;margin:auto;padding-left:14px;color:var(--obra-muted);height:48px}
.obra-search input{width:100%;background:transparent;border:0;color:var(--obra-text);padding:10px 8px 10px 0;outline-offset:0;border-radius:6px}
.obra-search input::placeholder{color:var(--obra-muted);opacity:1}
.obra-content{padding:20px 16px calc(28px + var(--obra-safe))}
.obra-heading{display:flex;align-items:start;justify-content:space-between;gap:16px;margin-bottom:20px}
.obra-heading h1{font-size:24px;font-weight:700;line-height:1.2;letter-spacing:-.02em}
.obra-heading p{font-size:14px;color:var(--obra-muted);margin-top:5px}
.obra-options{position:relative;flex-shrink:0}
.obra-options summary{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;min-height:44px;list-style:none;padding:8px;color:var(--obra-muted)}
.obra-options summary::-webkit-details-marker{display:none}
.obra-options>div{position:absolute;right:0;top:48px;width:220px;z-index:25;background:var(--obra-surface);border:1px solid var(--obra-border);border-radius:12px;padding:6px}
.obra-options button{display:flex;align-items:center;gap:10px;text-align:left;width:100%;padding:10px;font-size:14px;color:var(--obra-text);border-radius:6px}
.obra-options button:hover{background:var(--obra-subtle)}
.obra-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:4px;background:var(--obra-subtle);border-radius:10px;gap:4px;margin-bottom:16px}
.obra-tabs button{color:var(--obra-muted);font-size:14px;font-weight:600;border-radius:7px}
.obra-tabs button.active{background:var(--obra-surface);color:var(--obra-primary);box-shadow:0 2px 4px #1018280d}
.dark .obra-tabs button.active{color:#bfdbfe}
.obra-filter-row{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.obra-filter-row label{font-size:14px;font-weight:600}
.obra-filter-row select{flex:1;min-width:0;max-width:280px;padding:10px 12px;background:var(--obra-surface);border:1px solid var(--obra-border);border-radius:8px;color:var(--obra-text)}
.obra-filter-row button{font-size:12px;background:transparent;padding-inline:4px;color:var(--obra-muted)}
.obra-groups{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:24px}
.obra-groups button{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--obra-border);border-radius:8px;padding:8px 10px;background:var(--obra-surface);color:var(--obra-muted);font-size:13px;min-height:44px}
.obra-groups button.active{background:#e8f0ff;border-color:#8cb2e8;color:#174a96;font-weight:600}
.dark .obra-groups button.active{background:#1e3a5f;border-color:#659cde;color:#dbeafe}
.obra-groups button>span:last-child:not(.obra-group-dot){font-variant-numeric:tabular-nums;font-size:12px;font-weight:600}
.obra-group-dot{width:8px;height:8px;display:inline-block;flex-shrink:0;border-radius:50%}
.obra-task-sections{display:flex;flex-direction:column;gap:28px}
.obra-section-title{font-size:18px;font-weight:600;margin-bottom:12px;color:var(--obra-text)}
.obra-section-title span{font-size:14px;color:var(--obra-muted);margin-left:8px;font-weight:400}
.obra-task-list{display:grid;gap:10px}
.obra-task{background:var(--obra-surface);border:1px solid var(--obra-border);border-radius:var(--obra-radius);overflow:hidden}
.obra-task-open{display:flex;align-items:center;gap:12px;width:100%;padding:14px 12px;text-align:left;color:var(--obra-text);min-height:110px}
.obra-task-open:hover{background:var(--obra-subtle)}
.obra-task-open:focus-visible{outline-offset:-3px}
.obra-task-thumb{position:relative;display:flex;align-items:center;justify-content:center;flex:0 0 56px;height:56px;border-radius:8px;overflow:hidden;background:var(--obra-subtle);color:var(--obra-muted)}
.obra-task-thumb img{width:100%;height:100%;object-fit:cover}
.obra-photo-count{position:absolute;bottom:0;right:0;background:#17202deb;color:#fff;padding:1px 5px;font-size:11px;border-radius:4px 0 0 0}
.obra-task-copy{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}
.obra-task-title{font-size:16px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
.obra-task-meta{display:flex;flex-wrap:wrap;gap:6px 12px;font-size:13px;color:var(--obra-muted)}
.obra-priority{color:#a53c13;font-weight:600}
.dark .obra-priority{color:#fdba74}
.obra-task-bottom{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.obra-task-date{font-size:12px;color:var(--obra-muted)}
.obra-late{color:#a53c13}.dark .obra-late{color:#fdba74}
.obra-task-chevron{font-size:11px;color:var(--obra-muted);flex-shrink:0}
.obra-status{display:inline-flex;align-items:center;border-radius:5px;padding:3px 7px;font-size:12px;font-weight:600;line-height:1.4;background:#eef0f3;color:#4a5260}
.status-andamento{background:#e3eeff;color:#1f5fbf}.status-validacao{background:#fff3d6;color:#805200}.status-concluido{background:#e2f5e9;color:#1b713b}.status-rejeitado{background:#fde7e7;color:#b42318}
.dark .obra-status{background:#374151;color:#e5e7eb}.dark .status-andamento{background:#1e3a5f;color:#bfdbfe}.dark .status-validacao{background:#4b390e;color:#fde68a}.dark .status-concluido{background:#163d28;color:#bbf7d0}.dark .status-rejeitado{background:#4d2222;color:#fecaca}
.obra-empty{padding:44px 16px;text-align:center;color:var(--obra-muted)}
.obra-empty>i{font-size:28px;margin-bottom:14px}.obra-empty h2{font-size:18px;font-weight:600;color:var(--obra-text);margin-bottom:8px}.obra-empty p{font-size:14px;max-width:42ch;margin:0 auto 20px}
.obra-error{padding:14px;background:#fff1e6;color:#8c3510;font-size:14px;border-radius:8px}.obra-error button{font-weight:600;text-decoration:underline}
.dark .obra-error{background:#442815;color:#fed7aa}
.obra-loading{max-width:1024px;margin:auto;display:grid;gap:12px}
.obra-skeleton{display:flex;gap:14px;align-items:center;min-height:112px;background:var(--obra-surface);border-radius:12px;padding:16px}
.obra-skeleton div{width:56px;height:56px;background:var(--obra-subtle);border-radius:8px}.obra-skeleton span{height:50px;flex:1;border-radius:8px;background:var(--obra-subtle)}
.obra-overlay{position:fixed;inset:0;z-index:50;background:#0009;display:flex;align-items:center;justify-content:center;padding:16px}
.obra-sheet{display:flex;flex-direction:column;width:100%;max-width:640px;max-height:calc(100dvh - 32px);background:var(--obra-surface);color:var(--obra-text);border-radius:16px;overflow:hidden}
.obra-sheet-header,.obra-sheet-footer{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-shrink:0;background:var(--obra-surface);padding:12px 20px;border-bottom:1px solid var(--obra-border)}
.obra-sheet-header h2{font-size:20px;font-weight:700}
.obra-sheet-body{padding:20px;overflow-y:auto;min-height:0;display:flex;flex-direction:column;gap:20px}
.obra-sheet-footer{border-top:1px solid var(--obra-border);border-bottom:0;padding-bottom:calc(12px + var(--obra-safe))}.obra-sheet-footer .obra-primary{flex:1}.obra-sheet-footer>button:first-child{background:transparent}
.obra-field{display:flex;flex-direction:column;gap:8px}
.obra-field label,.obra-label{font-size:14px;font-weight:600;color:var(--obra-text)}
.obra-field small{font-size:12px;font-weight:400;color:var(--obra-muted);margin-left:4px}.obra-field label>span{color:#a53c13}
.obra-field input:not([type=checkbox]),.obra-field select,.obra-field textarea{width:100%;border:1px solid var(--obra-border);border-radius:8px;padding:11px 12px;background:var(--obra-surface);color:var(--obra-text)}
.obra-field textarea{resize:vertical}.obra-field input::placeholder,.obra-field textarea::placeholder{color:var(--obra-muted)}
.obra-help{font-size:13px;color:var(--obra-muted)}
.obra-check{display:flex!important;align-items:center;gap:10px;min-height:44px;font-size:14px;font-weight:500!important;color:var(--obra-text)}
.obra-check input[type=checkbox]{appearance:auto;width:20px;height:20px;min-height:20px;accent-color:var(--obra-primary)}
.obra-inline-action{font-size:13px;text-align:left;align-self:start;color:var(--obra-primary);padding:4px 0}
.dark .obra-inline-action{color:#bfdbfe}
.obra-upload{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:14px 12px;min-height:52px;border:1px dashed var(--obra-border);background:var(--obra-subtle);color:var(--obra-text);border-radius:8px;font-size:14px;font-weight:500}
.obra-photo-previews{display:flex;overflow-x:auto;gap:12px;padding-top:8px}.obra-photo-previews>div{position:relative;flex:0 0 90px}.obra-photo-previews img{width:90px;height:90px;border-radius:8px;object-fit:cover}.obra-photo-previews button{position:absolute;right:0;top:0;background:#17202ddb;color:#fff}
.obra-detail{display:flex;flex-direction:column;width:100%;max-width:768px;max-height:calc(100dvh - 32px);overflow:hidden;border-radius:16px;color:var(--obra-text)}
.obra-back{display:flex;align-items:center;gap:8px;align-self:flex-start;padding:12px 20px;color:var(--obra-muted);font-size:14px;flex-shrink:0}
.obra-detail-header{padding:0 20px 16px;display:flex;flex-direction:column;gap:12px;border-bottom:1px solid var(--obra-border);flex-shrink:0}
.obra-detail-header>div:last-child{flex-wrap:wrap}.obra-detail-header h2{font-size:22px;line-height:1.35}
.obra-detail-header button{min-width:44px;color:var(--obra-muted)}
.obra-detail-group{font-size:13px;color:var(--obra-muted);font-weight:600}
.obra-status-actions{display:flex;gap:10px;flex-wrap:wrap}
.obra-status-actions .obra-button{flex:1;min-width:160px}
.obra-complete{background:#18703a;color:#fff}.obra-complete:hover{background:#13592e}
.obra-toast{left:16px;right:16px;bottom:calc(16px + var(--obra-safe));padding:16px 18px;border-radius:12px;font-size:14px;max-width:520px;margin-left:auto;box-shadow:0 8px 24px #0003}
.animate-pulse-red,.badge-urgent,.animate-shake{animation:none}
@media(max-width:600px){.obra-header{padding-inline:12px}.obra-topbar{gap:4px}.obra-brand{font-size:17px;gap:4px}.obra-account{gap:0}.obra-account .obra-icon{width:44px;min-width:44px}.obra-identify{font-size:12px;gap:5px;padding-inline:6px}.obra-admin{font-size:12px;padding-inline:6px}.obra-user{padding-inline:6px;font-size:12px}.obra-user span{max-width:90px}.obra-new{font-size:13px;padding-inline:9px}.obra-content{padding-inline:12px}.obra-overlay{padding:0}.obra-sheet,.obra-detail{height:100dvh;max-height:100dvh;max-width:none;border-radius:0}.obra-sheet-header{padding-top:calc(12px + env(safe-area-inset-top,0px))}.obra-detail>.obra-back{padding-top:calc(12px + env(safe-area-inset-top,0px))}.obra-detail .flex-1.overflow-y-auto{padding-bottom:calc(24px + var(--obra-safe))}.obra-detail-header{padding-inline:16px}.obra-sheet-body{padding:16px}.obra-sheet-header,.obra-sheet-footer{padding-inline:16px}.obra-task-open{gap:10px}.obra-task-title{font-size:16px}.obra-task-chevron{display:none}}
@media(min-width:768px){.obra-header{padding:4px 32px 16px}.obra-topbar{min-height:64px}.obra-search{height:48px}.obra-content{padding:28px 32px}.obra-tabs{max-width:460px}.obra-task-list{grid-template-columns:repeat(2,minmax(0,1fr))}.obra-task-open{height:100%;min-height:130px;padding:16px}.obra-heading h1{font-size:28px}.obra-detail-header{flex-direction:row}.obra-toast{left:auto;min-width:260px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

.obra-photo-actions{display:flex;gap:10px}.obra-photo-actions>*{flex:1;min-width:0}.obra-photo-previews>div{padding-bottom:48px}.obra-photo-previews button.obra-annotate{top:94px;left:0;right:0;min-height:44px;background:var(--obra-subtle);color:var(--obra-text);font-size:12px;border-radius:5px;font-weight:600}.obra-create-footer{display:block}.obra-create-footer>.obra-check{font-size:13px;margin-bottom:8px}.obra-create-footer>div{display:flex;gap:12px}.obra-upload-status{display:grid;gap:8px}.obra-upload-status>div{display:flex;align-items:center;gap:10px;background:var(--obra-subtle);border-radius:8px;padding:10px 12px;font-size:13px;color:var(--obra-muted)}.obra-upload-status>div>span{flex:1;min-width:0}.obra-upload-status strong{display:block;font-size:13px;overflow-wrap:anywhere}.obra-upload-status small{display:block;font-size:12px;margin-top:2px}.obra-upload-status .obra-upload-failed{background:#fff1e6;color:#8c3510}.dark .obra-upload-status .obra-upload-failed{background:#442815;color:#fed7aa}.obra-upload-status button{font-size:12px}.obra-upload-status .obra-button{background:var(--obra-surface)}

.obra-form-details summary{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;font-size:14px;font-weight:600;min-height:48px;color:var(--obra-text);list-style:none;padding:8px 0}.obra-form-details summary small{font-size:12px;font-weight:400;color:var(--obra-muted);flex:1;min-width:170px}.obra-form-details summary::-webkit-details-marker{display:none}.obra-form-details>div{display:flex;flex-direction:column;gap:20px;padding-top:16px}.obra-detail>.flex-1.overflow-y-auto{min-height:0}.obra-app>main{min-width:0}.obra-sheet-header h2:focus{outline:none}

.obra-muted{color:var(--obra-muted)}

.obra-task-room{display:flex;align-items:center;gap:7px;font-size:13px;line-height:1.4;color:var(--obra-muted);overflow-wrap:anywhere}
.obra-task-room img{width:24px;height:24px;object-fit:cover;border-radius:4px;flex-shrink:0}
.obra-task-room i{font-size:13px;flex-shrink:0}
.obra-room-list{display:grid;gap:14px}
.obra-room{background:var(--obra-surface);border:1px solid var(--obra-border);border-radius:var(--obra-radius);overflow:hidden}
.obra-room-open{display:flex;align-items:center;gap:14px;width:100%;padding:16px;text-align:left;color:var(--obra-text)}
.obra-room-open:hover{background:var(--obra-subtle)}
.obra-room-open>span:nth-child(2){flex:1;min-width:0}
.obra-room-open strong{display:block;font-size:18px;line-height:1.35;font-weight:600;overflow-wrap:anywhere}
.obra-room-open small{display:block;font-size:13px;line-height:1.5;color:var(--obra-muted);margin-top:6px}
.obra-room-open>i{font-size:12px;color:var(--obra-muted)}
.obra-room-cover{display:flex;align-items:center;justify-content:center;flex:0 0 80px;height:80px;border-radius:8px;overflow:hidden;background:var(--obra-subtle);color:var(--obra-muted);font-size:24px}
.obra-room-cover img{width:100%;height:100%;object-fit:cover}
.obra-room-actions{display:flex;flex-wrap:wrap;gap:8px;padding:0 16px 16px}
.obra-sheet-body .obra-room-actions{padding:0}
.obra-room-photos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.obra-room-photos>button,.obra-room-photo>button:first-child{width:100%;display:block;aspect-ratio:4/3;min-height:44px;overflow:hidden;border-radius:8px;background:var(--obra-subtle)}
.obra-room-photos img{display:block;width:100%;height:100%;object-fit:cover}
.obra-room-photo{position:relative;min-width:0}
.obra-room-photo-remove{position:absolute;right:4px;top:4px;background:#17202deb;color:#fff}
.obra-room-photo-remove:hover{background:#17202d}
.obra-room-reference{display:flex;flex-direction:column;gap:14px;padding:16px;background:var(--obra-subtle);border-radius:12px}
.obra-room-reference h3{font-size:16px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
.obra-room-reference>div>p{margin-top:4px}
.obra-room-form-overlay{z-index:55}
.obra-room-previews>div{padding-bottom:0}
.obra-sheet-header h2{overflow-wrap:anywhere;min-width:0}
.obra-heading>.obra-button{flex-shrink:0}
@media(min-width:768px){.obra-room-list{grid-template-columns:repeat(2,minmax(0,1fr))}.obra-room-photos{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:380px){.obra-room-open{padding:12px;gap:10px}.obra-room-cover{flex-basis:64px;height:64px}.obra-brand{font-size:15px}.obra-identify{font-size:11px}.obra-topbar{flex-wrap:wrap}.obra-account{margin-left:auto}}
