.app-page { background: radial-gradient(circle at top, #fafcff, #eef3f9); }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--rotina-sidebar-width) minmax(0,1fr); }
.app-sidebar { z-index: 20; min-height: 100vh; padding: 24px 18px; display: flex; flex-direction: column; border-right: 1px solid #e6ebf2; background: #fff; box-shadow: 10px 0 35px rgba(15,23,42,.04); }
.app-logo-lockup { position: relative; width: 64px; height: 64px; margin: 0 auto 30px; }
.app-logo { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,#5b52f4,#4338ca); box-shadow: 0 16px 32px rgba(79,70,229,.28); font-size: 1.4rem; font-weight: 800; text-decoration: none; transition: transform .25s ease; }
.app-logo:hover { transform: translateY(-3px) scale(1.04); }
.app-beta-badge { position: absolute; right: -8px; bottom: -7px; padding: 3px 6px; border: 2px solid #fff; border-radius: 999px; color: #7c2d12; background: #fed7aa; font-size: .48rem; font-weight: 900; letter-spacing: .07em; }
.app-nav { display: grid; gap: 0; }
.app-nav-link { min-width: 0; min-height: 46px; margin-bottom: 2px; padding: 9px 14px; border-radius: 14px; display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 11px; align-items: center; color: #64748b; text-decoration: none; transition: background .18s ease,color .18s ease,transform .18s ease; }
.app-nav-link:hover { color: #4338ca; background: #f3f4ff; transform: translateX(6px); }
.app-nav-link.active { color: #4338ca; background: #eef2ff; }
.app-nav-link.active::before { display: none; }
.app-nav-icon { width: 26px; height: 26px; display: grid; place-items: center; }
.app-nav-icon .ui-icon { width: 19px; height: 19px; }
.app-nav-copy { min-width: 0; display: grid; gap: 1px; }
.app-nav-copy strong { overflow: hidden; color: inherit; font-size: .88rem; font-weight: 600; line-height: 1.22; text-overflow: ellipsis; }
.app-nav-copy small { justify-self: start; padding: 3px 7px; border-radius: 999px; color: #94600c; background: #fff4dd; font-size: .55rem; font-weight: 850; letter-spacing: .04em; line-height: 1.2; text-transform: uppercase; }
.app-nav-link.is-disabled { color: #9aa5b8; }
.app-nav-link.is-disabled:hover { color: #8995aa; background: #f7f8fb; transform: none; }
.app-nav-label { margin: 17px 10px 7px; color: #94a3b8; font-size: .62rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.app-sidebar-bottom { display: grid; gap: 12px; margin-top: auto; padding-top: 18px; border-top: 1px solid #e6ebf2; }
.app-user-mini { min-width: 0; padding: 0 8px; }
.app-user-mini strong, .app-user-mini small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-user-mini small { margin-top: 4px; color: var(--rotina-text-soft); font-size: .72rem; }
.app-workspace { min-width: 0; }
.app-topbar { min-height: 70px; padding: 0 38px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(226,232,240,.8); background: rgba(255,255,255,.7); backdrop-filter: blur(12px); }
.app-topbar strong { display: block; font-size: .92rem; }
.app-topbar small { display: block; margin-top: 3px; color: var(--rotina-text-soft); font-size: .7rem; }
.app-topbar-actions { display: flex; align-items: center; gap: 9px; }
.app-content { width: 100%; max-width: 1380px; margin: 0 auto; padding: 38px 40px 34px; }
.app-footer { margin-top: 38px; padding-top: 18px; border-top: 1px solid var(--rotina-line); color: var(--rotina-text-soft); font-size: .72rem; text-align: center; }

.app-welcome { position: relative; overflow: hidden; padding: clamp(25px,5vw,42px); color: #fff; border: 0; background: radial-gradient(circle at 86% 18%,rgba(132,148,255,.3),transparent 24%),linear-gradient(135deg,#0a1733,#173a7b); }
.app-welcome::after { content: ""; position: absolute; right: -90px; bottom: -120px; width: 330px; height: 330px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.025),0 0 0 90px rgba(255,255,255,.018); }
.app-welcome > * { position: relative; z-index: 1; }
.app-welcome .eyebrow { color: #9aa8ff; }
.app-welcome h1 { margin: 0 0 12px; font-size: clamp(2rem,5vw,3.3rem); letter-spacing: -.055em; }
.app-welcome > p { max-width: 730px; margin: 0; color: #bbc8e5; line-height: 1.7; }
.foundation-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-top: 24px; }
.foundation-item { padding: 17px; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: rgba(255,255,255,.08); }
.foundation-item strong, .foundation-item span { display: block; }
.foundation-item span { margin-top: 5px; color: #b9c6e3; font-size: .78rem; line-height: 1.45; }
.app-status-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.app-module-card { min-width: 0; padding: 19px; border: 1px solid var(--rotina-line); border-radius: 18px; background: #fff; box-shadow: var(--rotina-shadow-card); }
.app-module-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-module-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--rotina-primary); background: var(--rotina-primary-soft); }
.app-module-icon .ui-icon { width: 20px; height: 20px; }
.app-module-card h3 { margin: 15px 0 7px; }
.app-module-card p { margin: 0; color: var(--rotina-text-soft); font-size: .82rem; line-height: 1.55; }
.migration-note { display: grid; grid-template-columns: 55px minmax(0,1fr); gap: 15px; align-items: center; padding: 18px; border: 1px solid #d5dcf5; border-radius: 17px; background: #f5f7ff; }
.migration-note-icon { width: 55px; height: 55px; border-radius: 17px; display: grid; place-items: center; color: var(--rotina-primary); background: #fff; box-shadow: var(--rotina-shadow-card); }
.migration-note h2 { margin: 0 0 5px; font-size: 1.05rem; }
.migration-note p { margin: 0; color: var(--rotina-text-soft); font-size: .82rem; line-height: 1.55; }

@media (max-width: 980px) {
  .app-shell { display: block; }
  .app-sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 1500; width: min(300px,86vw); min-height: 100dvh; transform: translateX(-105%); transition: transform .23s ease; box-shadow: 24px 0 60px rgba(15,23,42,.18); }
  body.menu-open { overflow: hidden; }
  body.menu-open .app-sidebar { transform: translateX(0); }
  .mobile-menu-button { position: fixed; top: 13px; left: 13px; z-index: 1450; width: 44px; height: 44px; border: 0; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--rotina-primary); box-shadow: 0 10px 28px rgba(79,70,229,.23); }
  .mobile-menu-button .ui-icon { width: 20px; height: 20px; }
  .sidebar-close { position: absolute; right: 13px; top: 13px; width: 38px; height: 38px; border: 0; border-radius: 12px; display: grid; place-items: center; color: var(--rotina-text-soft); background: #f4f6fa; }
  .sidebar-backdrop { display: block; }
  .app-topbar { padding-left: 74px; }
}
@media (max-width: 850px) {
  .app-status-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .app-topbar { min-height: 67px; padding-right: 13px; }
  .app-topbar small, .app-topbar .version-pill { display: none; }
  .app-topbar-actions .button span { display: none; }
  .app-topbar-actions .button { width: 40px; min-height: 40px; padding: 0; }
  .app-content { padding: 25px 14px 30px; }
  .foundation-grid, .app-status-grid { grid-template-columns: 1fr; }
  .migration-note { grid-template-columns: 46px minmax(0,1fr); }
  .migration-note-icon { width: 46px; height: 46px; }
}

/* Beta 3 — dados pessoais */
.today-metrics { margin-bottom: 20px; }
.day-cycle-card { margin: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(135deg,#fff,#f6f8ff); }
.day-cycle-card h2 { margin: 0 0 7px; font-size: 1.2rem; }
.day-cycle-card p { margin: 0; color: var(--rotina-text-soft); line-height: 1.55; }
.day-cycle-actions { flex: 0 0 auto; }
.reminder-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.reminder-alert { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px 15px; border: 1px solid #f2d08a; border-radius: 15px; background: #fff8e8; }
.reminder-alert > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: #956116; background: #fff; }
.reminder-alert strong,.reminder-alert small { display: block; }
.reminder-alert small { margin-top: 4px; color: #805512; }
.task-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(310px,390px); gap: 20px; align-items: start; }
.task-board { display: grid; gap: 18px; min-width: 0; }
.task-section { padding: 20px; border: 1px solid var(--rotina-line); border-radius: 20px; background: rgba(255,255,255,.82); box-shadow: var(--rotina-shadow-card); }
.task-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.task-section-heading > div { display: flex; align-items: center; gap: 12px; }
.task-section-heading h2 { margin: 0 0 3px; font-size: 1.05rem; }
.task-section-heading p { margin: 0; color: var(--rotina-text-soft); font-size: .78rem; }
.task-section-heading > strong { min-width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: var(--rotina-primary-dark); background: var(--rotina-primary-soft); }
.task-section-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; color: var(--rotina-primary); background: var(--rotina-primary-soft); }
.task-section-icon.overdue { color: var(--rotina-danger); background: var(--rotina-danger-soft); }
.task-section-icon.completed { color: var(--rotina-success); background: var(--rotina-success-soft); }
.task-card { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 11px; align-items: start; padding: 14px 4px; border-bottom: 1px solid #edf1f6; }
.task-card:last-child { border-bottom: 0; }
.task-card.is-overdue { border-left: 3px solid #e96b5e; padding-left: 11px; }
.task-card.is-done { opacity: .72; }
.task-card.is-done .task-card-title strong { text-decoration: line-through; }
.task-check-form { margin: 0; }
.task-check { width: 38px; height: 38px; border: 0; border-radius: 12px; display: grid; place-items: center; color: var(--rotina-success); background: #eef8f4; cursor: pointer; }
.task-check-empty { width: 18px; height: 18px; border: 2px solid #a9b4c6; border-radius: 50%; }
.task-card-body { min-width: 0; }
.task-card-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.task-card-title strong { font-size: .94rem; }
.task-source { padding: 3px 7px; border-radius: 999px; color: #4f46e5; background: #eef0ff; font-size: .62rem; font-weight: 800; text-transform: uppercase; }
.task-card-body p { margin: 6px 0 0; color: var(--rotina-text-soft); font-size: .8rem; line-height: 1.5; }
.task-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; color: var(--rotina-text-muted); font-size: .7rem; }
.task-meta span { display: inline-flex; align-items: center; gap: 4px; }
.task-actions { display: flex; gap: 5px; }
.icon-button { width: 38px; height: 38px; padding: 0; border: 1px solid var(--rotina-line); border-radius: 11px; display: grid; place-items: center; color: #536176; background: #fff; text-decoration: none; cursor: pointer; }
.icon-button:hover { color: var(--rotina-primary); background: var(--rotina-primary-soft); }
.icon-button.danger { color: var(--rotina-danger); }
.task-actions form { margin: 0; }
.task-form-panel { position: sticky; top: 90px; margin-top: 0; }

.routine-page-heading { align-items: flex-end; }
.routine-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.routine-workspace { display: grid; grid-template-columns: minmax(0,1fr) minmax(310px,360px); gap: 20px; align-items: start; }
.routine-list,.routine-side-column { display: grid; gap: 16px; min-width: 0; }
.routine-side-column { position: sticky; top: 90px; }
.routine-empty-panel { margin-top: 0; }
.routine-card { position: relative; margin: 0; padding: 23px; overflow: visible; transition: transform .2s ease,box-shadow .2s ease,border-color .2s ease,opacity .2s ease; }
.routine-card:hover { transform: translateY(-2px); border-color: #d8def3; box-shadow: 0 18px 44px rgba(15,23,42,.09); }
.routine-card.is-inactive { opacity: .72; }
.routine-card.is-inactive:hover { opacity: .9; }
.routine-accent { position: absolute; top: 0; left: 22px; right: 22px; height: 4px; border-radius: 0 0 999px 999px; background: linear-gradient(90deg,var(--rotina-primary),#8b7cf6); }
.routine-card-head { display: flex; justify-content: space-between; gap: 15px; padding-top: 4px; }
.routine-title-group { min-width: 0; display: grid; grid-template-columns: 50px minmax(0,1fr); gap: 13px; }
.routine-icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: var(--rotina-primary); background: var(--rotina-primary-soft); }
.routine-icon .ui-icon { width: 23px; height: 23px; }
.routine-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.routine-title-line h2 { margin: 2px 0 5px; font-size: 1.15rem; }
.routine-title-group p { margin: 0; color: var(--rotina-text-soft); line-height: 1.5; }
.routine-menu { position: relative; flex: 0 0 auto; }
.routine-menu > summary { width: 39px; height: 39px; border: 1px solid var(--rotina-line); border-radius: 12px; display: grid; place-items: center; color: #536176; background: #fff; cursor: pointer; list-style: none; }
.routine-menu > summary::-webkit-details-marker { display: none; }
.routine-menu[open] > summary,.routine-menu > summary:hover { color: var(--rotina-primary); border-color: #b8c0f5; background: var(--rotina-primary-soft); }
.routine-menu-popover { position: absolute; top: 46px; right: 0; z-index: 80; width: 190px; padding: 7px; border: 1px solid var(--rotina-line); border-radius: 14px; background: #fff; box-shadow: 0 18px 48px rgba(15,23,42,.16); }
.routine-menu-popover form { margin: 0; }
.routine-menu-popover button { width: 100%; min-height: 40px; padding: 9px 10px; border: 0; border-radius: 9px; display: flex; align-items: center; gap: 9px; color: #344054; background: transparent; font: inherit; font-size: .8rem; font-weight: 720; text-align: left; cursor: pointer; }
.routine-menu-popover button:hover { color: var(--rotina-primary-dark); background: var(--rotina-primary-soft); }
.routine-menu-popover button.danger { color: var(--rotina-danger); }
.routine-menu-popover .ui-icon { width: 17px; height: 17px; }
.routine-overview-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin: 17px 0; }
.routine-overview-grid > div { min-width: 0; padding: 11px; border: 1px solid #edf0f6; border-radius: 13px; display: grid; grid-template-columns: 25px minmax(0,1fr); column-gap: 7px; background: #fafbfe; }
.routine-overview-grid > div > span { grid-row: 1/3; width: 25px; height: 25px; display: grid; place-items: center; color: var(--rotina-primary); }
.routine-overview-grid small,.routine-overview-grid strong { min-width: 0; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.routine-overview-grid small { color: var(--rotina-text-muted); font-size: .61rem; font-weight: 760; letter-spacing: .03em; text-transform: uppercase; }
.routine-overview-grid strong { margin-top: 3px; color: #344054; font-size: .72rem; }
.routine-task-preview { padding: 15px; border: 1px solid var(--rotina-line); border-radius: 16px; background: #fbfcff; }
.routine-task-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.routine-task-preview-heading strong { font-size: .78rem; }
.routine-task-preview-heading button { padding: 4px 0; border: 0; color: var(--rotina-primary); background: transparent; font: inherit; font-size: .7rem; font-weight: 760; cursor: pointer; }
.routine-task-preview ol { margin: 0; padding: 0; display: grid; gap: 7px; list-style: none; }
.routine-task-preview li { min-width: 0; display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 8px 9px; border-radius: 11px; background: #fff; }
.routine-task-index { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--rotina-primary-dark); background: var(--rotina-primary-soft); font-size: .65rem; font-weight: 850; }
.routine-task-preview li strong,.routine-task-preview li small { display: block; }
.routine-task-preview li strong { font-size: .78rem; }
.routine-task-preview li small { margin-top: 3px; overflow: hidden; color: var(--rotina-text-soft); font-size: .66rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.routine-task-preview time { padding: 4px 7px; border-radius: 8px; color: #536176; background: #f1f4f8; font-size: .66rem; font-weight: 780; }
.routine-more-tasks { margin: 9px 0 0; color: var(--rotina-text-soft); font-size: .68rem; text-align: center; }
.routine-card-footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 15px; }
.routine-card-footer form { margin: 0; }
.routine-card-footer .button[disabled] { opacity: .62; cursor: not-allowed; transform: none; box-shadow: none; }
.routine-inactive-note { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--rotina-text-soft); font-size: .76rem; }
.routine-inactive-note .ui-icon { flex: 0 0 auto; }
.routine-automation-panel,.routine-history-panel { margin-top: 0; }
.routine-rule-list { display: grid; gap: 9px; }
.routine-rule-list > div { display: grid; grid-template-columns: 39px minmax(0,1fr); gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--rotina-line); border-radius: 13px; background: #fbfcff; }
.routine-rule-list > div > span { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; color: var(--rotina-primary); background: var(--rotina-primary-soft); }
.routine-rule-list strong,.routine-rule-list small { display: block; }
.routine-rule-list strong { font-size: .78rem; }
.routine-rule-list small { margin-top: 3px; color: var(--rotina-text-soft); font-size: .68rem; line-height: 1.4; }
.compact-empty { padding: 16px; border: 1px dashed #ccd4e2; border-radius: 14px; display: grid; justify-items: center; gap: 8px; color: var(--rotina-text-soft); background: #fbfcff; text-align: center; }
.compact-empty > span { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--rotina-primary); background: var(--rotina-primary-soft); }
.compact-empty p { margin: 0; font-size: .72rem; line-height: 1.5; }
.routine-history-list { display: grid; gap: 8px; }
.routine-history-list article { min-width: 0; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 9px; align-items: center; padding: 10px; border: 1px solid var(--rotina-line); border-radius: 13px; background: #fbfcff; }
.routine-history-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--rotina-primary); background: var(--rotina-primary-soft); }
.routine-history-list strong,.routine-history-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.routine-history-list strong { font-size: .76rem; }
.routine-history-list small { margin-top: 3px; color: var(--rotina-text-soft); font-size: .63rem; }
.routine-history-list article > b { min-width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--rotina-primary-dark); background: var(--rotina-primary-soft); font-size: .68rem; }
.routine-history-progress { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.routine-history-progress span { color: var(--rotina-text-muted); font-size: .58rem; }
.schedule-extra > label { display: block; margin-bottom: 8px; color: #344054; font-size: .82rem; font-weight: 780; }
.weekday-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.weekday-picker label { position: relative; }
.weekday-picker input { position: absolute; opacity: 0; }
.weekday-picker span { min-height: 36px; padding: 8px 11px; border: 1px solid var(--rotina-line); border-radius: 10px; display: grid; place-items: center; color: #536176; background: #fff; font-size: .72rem; font-weight: 800; cursor: pointer; }
.weekday-picker input:focus-visible + span { outline: 3px solid rgba(79,70,229,.18); outline-offset: 2px; }
.weekday-picker input:checked + span { color: var(--rotina-primary-dark); border-color: #9da8f5; background: var(--rotina-primary-soft); }
.weekday-picker.wide label { flex: 1 1 64px; }
.routine-drawer-layer,.routine-date-layer { position: fixed; inset: 0; z-index: 2800; display: flex; }
.routine-drawer-layer[hidden],.routine-date-layer[hidden] { display: none; }
.routine-drawer-backdrop,.routine-date-backdrop { position: absolute; inset: 0; border: 0; background: rgba(4,12,29,.58); backdrop-filter: blur(4px); }
.routine-drawer-layer { justify-content: flex-end; }
.routine-drawer { position: relative; width: min(720px,96vw); height: 100dvh; display: flex; flex-direction: column; background: #fff; box-shadow: -22px 0 70px rgba(4,12,29,.24); animation: routine-drawer-in .22s ease-out; }
.routine-drawer > form { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.routine-drawer-header { padding: 23px 25px 19px; border-bottom: 1px solid var(--rotina-line); display: flex; justify-content: space-between; gap: 16px; background: linear-gradient(135deg,#fff,#f7f8ff); }
.routine-drawer-header h2 { margin: 2px 0 6px; font-size: 1.55rem; }
.routine-drawer-header p:not(.eyebrow) { margin: 0; color: var(--rotina-text-soft); font-size: .78rem; line-height: 1.5; }
.routine-drawer-body { min-height: 0; flex: 1; overflow-y: auto; padding: 23px 25px 32px; }
.routine-editor-section { margin-top: 22px; padding-top: 21px; border-top: 1px solid var(--rotina-line); }
.routine-editor-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.routine-editor-section-heading > div { display: flex; align-items: center; gap: 10px; }
.routine-editor-section-heading > div > span { width: 41px; height: 41px; border-radius: 12px; display: grid; place-items: center; color: var(--rotina-primary); background: var(--rotina-primary-soft); }
.routine-editor-section-heading h3,.routine-editor-section-heading p { margin: 0; }
.routine-editor-section-heading h3 { font-size: .95rem; }
.routine-editor-section-heading p { margin-top: 3px; color: var(--rotina-text-soft); font-size: .68rem; line-height: 1.4; }
.routine-task-counter { padding: 5px 9px; border-radius: 999px; color: var(--rotina-primary-dark); background: var(--rotina-primary-soft); font-size: .64rem; font-weight: 800; }
.routine-task-builder { display: grid; gap: 10px; }
.routine-task-editor-row { min-width: 0; padding: 12px; border: 1px solid var(--rotina-line); border-radius: 15px; display: grid; grid-template-columns: 28px 28px minmax(0,1fr) 34px; gap: 8px; align-items: start; background: #fbfcff; transition: opacity .16s ease,border-color .16s ease,box-shadow .16s ease; }
.routine-task-editor-row:hover { border-color: #bdc6f5; box-shadow: 0 8px 22px rgba(15,23,42,.06); }
.routine-task-editor-row.is-dragging { opacity: .38; border-style: dashed; }
.routine-drag-handle { width: 28px; height: 34px; padding: 0; border: 0; display: grid; place-items: center; color: #8b97aa; background: transparent; cursor: grab; }
.routine-drag-handle:active { cursor: grabbing; }
.routine-task-order { width: 28px; height: 28px; margin-top: 3px; border-radius: 9px; display: grid; place-items: center; color: var(--rotina-primary-dark); background: var(--rotina-primary-soft); font-size: .64rem; font-weight: 850; }
.routine-task-fields { min-width: 0; display: grid; gap: 8px; }
.routine-task-main-fields { display: grid; grid-template-columns: minmax(0,1fr) 125px; gap: 9px; }
.routine-task-editor-row .field { margin: 0; }
.routine-task-editor-row .field label { margin-bottom: 5px; font-size: .65rem; }
.routine-task-editor-row input { min-height: 38px; padding: 8px 10px; }
.routine-task-notes-field input { color: #536176; font-size: .75rem; }
.routine-task-row-actions { display: grid; gap: 5px; }
.routine-task-row-actions button { width: 32px; height: 32px; padding: 0; border: 1px solid var(--rotina-line); border-radius: 9px; display: grid; place-items: center; color: #64748b; background: #fff; cursor: pointer; }
.routine-task-row-actions button:hover { color: var(--rotina-primary); background: var(--rotina-primary-soft); }
.routine-task-row-actions button.danger { color: var(--rotina-danger); }
.routine-task-row-actions button:disabled { opacity: .3; cursor: default; }
.routine-add-task { width: 100%; margin-top: 10px; border-style: dashed; }
.routine-drawer-footer { padding: 16px 25px; border-top: 1px solid var(--rotina-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; box-shadow: 0 -8px 24px rgba(15,23,42,.04); }
.routine-drawer-footer > div { display: flex; gap: 8px; }
.routine-shortcut-hint { color: var(--rotina-text-muted); font-size: .65rem; }
body.routine-editor-open,body.routine-date-open { overflow: hidden; }
.routine-date-layer { align-items: center; justify-content: center; padding: 18px; }
.routine-date-dialog { position: relative; width: min(450px,100%); padding: 28px; border-radius: 22px; background: #fff; box-shadow: 0 28px 80px rgba(4,12,29,.28); animation: routine-dialog-in .18s ease-out; }
.routine-date-icon { width: 56px; height: 56px; margin-bottom: 15px; border-radius: 17px; display: grid; place-items: center; color: var(--rotina-primary); background: var(--rotina-primary-soft); }
.routine-date-dialog h2 { margin: 3px 0 8px; }
.routine-date-dialog > p:not(.eyebrow) { margin: 0 0 18px; color: var(--rotina-text-soft); line-height: 1.55; }
.routine-date-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
@keyframes routine-drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes routine-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.agenda-toolbar { display: flex; align-items: center; justify-content: center; gap: 25px; text-align: center; margin-bottom: 18px; }
.agenda-toolbar h2 { margin: 0; font-size: 1.45rem; }
.agenda-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.agenda-day { margin-top: 0; }
.agenda-day.is-today { border-color: #8c98f5; box-shadow: 0 0 0 3px rgba(79,70,229,.08),var(--rotina-shadow-card); }
.agenda-day-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 13px; }
.agenda-date { display: flex; align-items: center; gap: 10px; }
.agenda-date strong { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--rotina-primary); font-size: 1.15rem; }
.agenda-date span { color: var(--rotina-text-soft); font-size: .78rem; }
.agenda-items { display: grid; gap: 8px; }
.agenda-item { display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 10px; align-items: center; padding: 11px; border: 1px solid var(--rotina-line); border-radius: 13px; color: inherit; background: #fbfcff; text-decoration: none; }
.agenda-item:hover { border-color: #aab4f5; background: #f5f6ff; }
.agenda-item.is-done { opacity: .65; }
.agenda-item.is-done strong { text-decoration: line-through; }
.agenda-item-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--rotina-primary); background: var(--rotina-primary-soft); }
.agenda-item strong,.agenda-item small { display: block; }
.agenda-item small { margin-top: 4px; color: var(--rotina-text-soft); }
.agenda-empty { grid-column: 1/-1; margin-top: 0; }

.settings-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(330px,.75fr); gap: 20px; align-items: start; }
.settings-main { display: grid; gap: 20px; }
.settings-main .panel,.settings-side .panel { margin-top: 0; }
.settings-side { display: grid; gap: 16px; position: sticky; top: 90px; }
.switch-list { display: grid; gap: 10px; margin: 7px 0 18px; }
.switch-row { display: grid; grid-template-columns: minmax(0,1fr) 48px; align-items: center; gap: 15px; padding: 13px; border: 1px solid var(--rotina-line); border-radius: 14px; background: #fbfcff; cursor: pointer; }
.switch-row strong,.switch-row small { display: block; }
.switch-row small { margin-top: 3px; color: var(--rotina-text-soft); line-height: 1.4; }
.switch-row input { position: absolute; opacity: 0; }
.switch-row i { position: relative; width: 44px; height: 25px; border-radius: 999px; background: #cbd3df; transition: .18s; }
.switch-row i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(15,23,42,.18); transition: .18s; }
.switch-row input:checked + i { background: var(--rotina-primary); }
.switch-row input:checked + i::after { transform: translateX(19px); }
.backup-current { padding: 14px; border: 1px solid var(--rotina-line); border-radius: 15px; background: #f8faff; margin-bottom: 13px; }
.backup-current h3 { margin: 0 0 12px; font-size: .9rem; }
.backup-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.backup-stats > div { padding: 11px; border-radius: 12px; background: #fff; }
.backup-stats strong,.backup-stats span { display: block; }
.backup-stats strong { font-size: 1.35rem; }
.backup-stats span { color: var(--rotina-text-soft); font-size: .7rem; }
.backup-current > small { display: block; margin-top: 10px; color: var(--rotina-text-soft); }
.panel-divider { height: 1px; margin: 20px 0; border: 0; background: var(--rotina-line); }
.backup-preview { margin: 12px 0; padding: 14px; border: 1px solid #ccd5ff; border-radius: 14px; background: #f5f7ff; }
.backup-preview h3 { margin: 0 0 12px; font-size: .9rem; overflow-wrap: anywhere; }
.backup-comparison { display: grid; gap: 8px; }
.backup-comparison > div { padding: 9px 10px; border-radius: 10px; background: #fff; }
.backup-comparison small,.backup-comparison strong { display: block; }
.backup-comparison small { color: var(--rotina-text-muted); font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; }
.backup-comparison strong { margin-top: 3px; font-size: .78rem; }
.import-modes { display: grid; gap: 9px; margin: 12px 0; }
.import-modes label { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 9px; padding: 11px; border: 1px solid var(--rotina-line); border-radius: 12px; cursor: pointer; }
.import-modes strong,.import-modes small { display: block; }
.import-modes small { margin-top: 3px; color: var(--rotina-text-soft); line-height: 1.4; }
.account-security { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 12px; align-items: center; }
.account-security > span { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--rotina-success); background: var(--rotina-success-soft); }
.account-security strong { display: block; }
.account-security p { margin: 5px 0 0; color: var(--rotina-text-soft); font-size: .76rem; line-height: 1.5; }

.confirm-modal { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 20px; }
.confirm-backdrop { position: absolute; inset: 0; border: 0; background: rgba(4,12,29,.6); backdrop-filter: blur(4px); }
.confirm-dialog { position: relative; width: min(430px,100%); padding: 28px; border-radius: 22px; background: #fff; box-shadow: 0 28px 80px rgba(4,12,29,.28); text-align: center; }
.confirm-icon { width: 58px; height: 58px; margin: 0 auto 15px; border-radius: 18px; display: grid; place-items: center; color: var(--rotina-danger); background: var(--rotina-danger-soft); }
.confirm-dialog h2 { margin: 0 0 8px; }
.confirm-dialog p { margin: 0; color: var(--rotina-text-soft); line-height: 1.6; }
.confirm-actions { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
body.modal-open { overflow: hidden; }

@media (max-width: 1120px) {
  .task-layout,.routine-workspace,.settings-grid { grid-template-columns: 1fr; }
  .task-form-panel,.routine-side-column,.settings-side { position: static; }
}
@media (max-width: 850px) {
  .routine-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .agenda-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .day-cycle-card { align-items: stretch; flex-direction: column; }
  .day-cycle-actions .button { width: 100%; }
  .reminder-alert { grid-template-columns: 40px minmax(0,1fr); }
  .reminder-alert form { grid-column: 1/-1; }
  .reminder-alert .button { width: 100%; }
  .task-card { grid-template-columns: 38px minmax(0,1fr); }
  .task-actions { grid-column: 2; justify-content: flex-end; }
  .routine-metrics { grid-template-columns: 1fr; }
  .routine-card-head { align-items: flex-start; }
  .routine-overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .routine-card-footer { align-items: stretch; flex-direction: column; }
  .routine-card-footer form,.routine-card-footer .button { width: 100%; }
  .agenda-toolbar { justify-content: space-between; }
  .weekday-picker.wide label { flex-basis: calc(50% - 7px); }
  .confirm-actions { flex-direction: column-reverse; }
  .confirm-actions .button { width: 100%; }
}
.notification-permission { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; gap: 12px; align-items: center; margin: 0 0 18px; padding: 13px; border: 1px solid var(--rotina-line); border-radius: 14px; background: #f8faff; }
.notification-permission-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--rotina-primary); background: #fff; box-shadow: var(--rotina-shadow-card); }
.notification-permission strong,.notification-permission small { display: block; }
.notification-permission small { margin-top: 4px; color: var(--rotina-text-soft); line-height: 1.4; }
.sound-test { width: 100%; min-height: 36px; margin-top: 7px; border: 1px solid var(--rotina-line); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: var(--rotina-primary-dark); background: #f7f8ff; font-weight: 780; cursor: pointer; }
@media (max-width:650px){.notification-permission{grid-template-columns:42px minmax(0,1fr)}.notification-permission .button{grid-column:1/-1;width:100%}}
.app-quick-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.app-quick-card { min-width:0; padding:15px; border:1px solid var(--rotina-line); border-radius:16px; display:grid; grid-template-columns:46px minmax(0,1fr) 22px; gap:12px; align-items:center; color:inherit; background:#fbfcff; text-decoration:none; transition:.18s; }
.app-quick-card:hover { transform:translateY(-2px); border-color:#aab4f5; background:#f5f6ff; box-shadow:var(--rotina-shadow-card); }
.app-quick-card > span { width:46px; height:46px; border-radius:14px; display:grid; place-items:center; color:var(--rotina-primary); background:var(--rotina-primary-soft); }
.app-quick-card strong,.app-quick-card small { display:block; }
.app-quick-card small { margin-top:4px; color:var(--rotina-text-soft); line-height:1.4; }
.app-quick-card > .ui-icon { color:var(--rotina-text-muted); }
@media(max-width:650px){.app-quick-grid{grid-template-columns:1fr}}

/* Beta 5 — editor e recorrência de Rotinas */
@media (max-width: 1120px) {
  .routine-side-column { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 850px) {
  .routine-overview-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .routine-side-column { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .routine-page-heading { align-items: stretch; }
  .routine-page-heading .page-heading-actions,.routine-page-heading .button { width: 100%; }
  .routine-card { padding: 19px 15px; }
  .routine-accent { left: 15px; right: 15px; }
  .routine-title-group { grid-template-columns: 43px minmax(0,1fr); }
  .routine-icon { width: 43px; height: 43px; }
  .routine-title-line { align-items: flex-start; flex-direction: column; gap: 2px; }
  .routine-overview-grid { grid-template-columns: 1fr 1fr; }
  .routine-task-preview li { grid-template-columns: 28px minmax(0,1fr); }
  .routine-task-preview time { grid-column: 2; justify-self: start; }
  .routine-menu-popover { position: fixed; top: auto; right: 14px; left: 14px; bottom: 14px; width: auto; z-index: 3100; }
  .routine-drawer { width: 100vw; }
  .routine-drawer-header,.routine-drawer-body,.routine-drawer-footer { padding-left: 16px; padding-right: 16px; }
  .routine-drawer-footer { align-items: stretch; flex-direction: column; }
  .routine-drawer-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .routine-shortcut-hint { display: none; }
  .routine-task-editor-row { grid-template-columns: 25px 25px minmax(0,1fr); }
  .routine-task-row-actions { grid-column: 3; display: flex; justify-content: flex-end; }
  .routine-task-main-fields { grid-template-columns: 1fr; }
  .routine-time-field { max-width: 180px; }
  .routine-date-actions { flex-direction: column-reverse; }
  .routine-date-actions .button { width: 100%; }
}

/* Beta 5.1 — paridade inicial com a experiência da versão 18.8.2 */
.routine-metrics { margin-bottom: 28px; }
.routine-workspace { gap: 24px; }
.routine-carousel-panel { min-width: 0; margin-top: 0; padding: 22px; overflow: visible; }
.routine-carousel-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.routine-carousel-header h2 { margin: 0; font-size: 1.08rem; }
.routine-carousel-header p { margin: 5px 0 0; color: var(--rotina-text-soft); font-size: .78rem; }
.routine-carousel-controls { display: flex; align-items: center; gap: 8px; }
.routine-carousel-controls > span { min-width: 76px; color: var(--rotina-text-soft); font-size: .72rem; text-align: right; font-variant-numeric: tabular-nums; }
.routine-carousel-controls button { width: 40px; height: 40px; padding: 0; border: 1px solid var(--rotina-line); border-radius: 12px; display: grid; place-items: center; color: #344054; background: #fff; box-shadow: 0 5px 16px rgba(15,23,42,.05); cursor: pointer; transition: .18s ease; }
.routine-carousel-controls button:hover:not(:disabled) { transform: translateY(-2px); color: var(--rotina-primary-dark); border-color: #aeb7f5; background: var(--rotina-primary-soft); }
.routine-carousel-controls button:disabled { opacity: .35; cursor: default; box-shadow: none; }
.routine-carousel-viewport { width: 100%; overflow-x: auto; overflow-y: visible; scroll-behavior: smooth; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-inline: contain; }
.routine-carousel-viewport::-webkit-scrollbar { display: none; }
.routine-carousel-track { display: flex; gap: 18px; width: 100%; padding: 6px 2px 18px; }
.routine-carousel-track .routine-card { flex: 0 0 calc((100% - 18px) / 2); min-width: 0; scroll-snap-align: start; }
.routine-empty-state { min-height: 360px; display: grid; place-content: center; justify-items: center; text-align: center; }
.routine-empty-state p { max-width: 520px; }
.routine-card { cursor: pointer; }
.routine-card-head h3 { margin: 2px 0 8px; font-size: 1.05rem; }
.routine-schedule-badge { width: fit-content; max-width: 100%; display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; color: #536176; background: #f1f4f8; font-size: .66rem; font-weight: 780; }
.routine-schedule-badge > span { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.routine-schedule-badge.is-automatic { color: #08705a; background: #e7f8f1; }
.routine-schedule-badge.is-automatic > span { background: #0f9f79; }
.routine-progress { height: 6px; margin: 18px 0 8px; border-radius: 999px; overflow: hidden; background: #edf0f6; }
.routine-progress > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--rotina-primary),#8b7cf6); }
.routine-progress-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; color: var(--rotina-text-soft); font-size: .7rem; }
.routine-progress-info strong { color: #344054; }
.routine-task-preview-legacy { padding: 0; border: 0; background: transparent; }
.routine-preview-task { min-width: 0; display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 8px; align-items: start; min-height: 40px; padding: 9px 10px; border: 1px solid #edf0f6; border-radius: 11px; background: #fbfcff; }
.routine-preview-task + .routine-preview-task { margin-top: 7px; }
.routine-preview-task > span { color: var(--rotina-primary); font-weight: 850; }
.routine-preview-task strong,.routine-preview-task small { display: block; }
.routine-preview-task strong { font-size: .76rem; line-height: 1.38; }
.routine-preview-task small { margin-top: 4px; color: var(--rotina-text-soft); font-size: .64rem; }
.routine-preview-more { display: flex; align-items: center; gap: 8px; min-height: 38px; margin-top: 7px; padding: 8px 10px; border: 1px dashed #cfd8e8; border-radius: 11px; color: var(--rotina-text-soft); background: #fbfcff; font-size: .68rem; }
.routine-preview-more::before { content: "+"; width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; color: var(--rotina-primary); background: var(--rotina-primary-soft); font-weight: 850; }
.routine-card-footer-legacy { align-items: center; justify-content: space-between; gap: 10px; }
.routine-card-footer-legacy > span { min-width: 0; color: var(--rotina-text-muted); font-size: .62rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.routine-card-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.button-small { min-height: 38px; padding: 9px 12px; border-radius: 11px; font-size: .7rem; }

.routine-drawer-heading { display: flex; align-items: center; gap: 13px; }
.routine-drawer-icon { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: var(--rotina-primary-soft); font-size: 1.2rem; }
.routine-editor-main { margin-top: 0; padding-top: 0; border-top: 0; }
.routine-name-input { min-height: 58px; font-size: 1.05rem !important; font-weight: 720; }
.routine-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: -8px; }
.meta-chip { padding: 7px 10px; border: 1px solid var(--rotina-line); border-radius: 999px; color: var(--rotina-text-soft); background: #fbfcff; font-size: .67rem; }
.routine-enabled-setting { margin-top: 22px; padding: 16px; border: 1px solid var(--rotina-line); border-radius: 16px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fbfcff; cursor: pointer; }
.routine-enabled-setting > span:first-child { min-width: 0; }
.routine-enabled-setting strong,.routine-enabled-setting small { display: block; }
.routine-enabled-setting strong { font-size: .84rem; }
.routine-enabled-setting small { margin-top: 5px; color: var(--rotina-text-soft); font-size: .7rem; line-height: 1.45; }
.switch-control { position: relative; flex: 0 0 auto; width: 62px; height: 36px; }
.switch-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: absolute; inset: 0; border-radius: 999px; background: #d9dfeb; transition: .18s ease; }
.switch-track::after { content: ""; position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(15,23,42,.18); transition: .18s ease; }
.switch-control input:checked + .switch-track { background: #19bd69; box-shadow: 0 0 0 5px rgba(25,189,105,.1); }
.switch-control input:checked + .switch-track::after { transform: translateX(26px); }
.switch-control input:focus-visible + .switch-track { outline: 3px solid rgba(79,70,229,.2); outline-offset: 2px; }
.routine-schedule-panel { margin-top: 16px; padding: 16px; border: 1px solid var(--rotina-line); border-radius: 16px; background: #fbfcff; }
.legacy-weekday-picker { margin-top: 5px; }
.legacy-weekday-picker label { flex: 1 1 60px; }
.routine-editor-section-heading.legacy-heading { align-items: baseline; }
.routine-editor-section-heading.legacy-heading label { color: #20283c; font-size: .86rem; font-weight: 800; }
.routine-editor-section-heading.legacy-heading span { color: var(--rotina-text-muted); font-size: .67rem; }
.routine-task-editor-row { position: relative; grid-template-columns: 36px minmax(0,1fr) 34px; gap: 10px; padding: 14px; }
.routine-task-editor-row.drop-before::before,.routine-task-editor-row.drop-after::after { content: ""; position: absolute; right: 8px; left: 8px; height: 3px; border-radius: 999px; background: var(--rotina-primary); }
.routine-task-editor-row.drop-before::before { top: -7px; }
.routine-task-editor-row.drop-after::after { bottom: -7px; }
.routine-drag-handle { width: 36px; height: 44px; color: #9aa5b7; font-size: 1.25rem; letter-spacing: -3px; touch-action: none; }
.routine-task-fields { gap: 10px; }
.routine-task-fields > textarea { width: 100%; min-height: 44px; max-height: 180px; padding: 11px 12px; border: 1px solid var(--rotina-line); border-radius: 12px; resize: none; overflow-y: auto; color: #20283c; background: #fff; font: inherit; line-height: 1.45; outline: none; }
.routine-task-fields > textarea:focus { border-color: #8e99f3; box-shadow: 0 0 0 4px rgba(79,70,229,.1); }
.routine-task-options { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.routine-step-field { min-width: 135px; display: grid; gap: 6px; }
.routine-step-field > span { color: #667085; font-size: .64rem; font-weight: 760; }
.routine-step-field input { min-height: 42px; padding: 9px 10px; border: 1px solid var(--rotina-line); border-radius: 11px; background: #fff; }
.routine-reminder-toggle { min-height: 42px; padding: 9px 12px; border: 1px solid #aeb8f5; border-radius: 11px; display: inline-flex; align-items: center; gap: 8px; color: var(--rotina-primary-dark); background: var(--rotina-primary-soft); font-size: .69rem; font-weight: 800; cursor: pointer; }
.routine-reminder-toggle.disabled { opacity: .48; cursor: not-allowed; }
.routine-reminder-toggle input { width: 18px; height: 18px; accent-color: var(--rotina-primary); }
.routine-reminder-field { max-width: 150px; }
.routine-task-remove { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; display: grid; place-items: center; color: #94a3b8; background: transparent; font-size: 1.25rem; cursor: pointer; }
.routine-task-remove:hover { color: var(--rotina-danger); background: var(--rotina-danger-soft); }
.button-outline { border: 1px solid #ffc7c0; background: #fff; }

@media (max-width: 1120px) {
  .routine-carousel-track .routine-card { flex-basis: calc((100% - 18px) / 2); }
}
@media (max-width: 760px) {
  .routine-metrics { margin-bottom: 22px; }
  .routine-carousel-controls > span { display: none; }
  .routine-carousel-track .routine-card { flex-basis: 100%; }
  .routine-carousel-panel { padding: 17px 14px; }
  .routine-card-footer-legacy { align-items: stretch; flex-direction: column; }
  .routine-card-actions,.routine-card-actions form,.routine-card-actions .button { width: 100%; }
  .routine-card-actions .icon-button { width: 42px; flex: 0 0 42px; }
  .routine-task-editor-row { grid-template-columns: 30px minmax(0,1fr) 32px; padding: 11px; }
  .routine-task-options { align-items: stretch; flex-direction: column; }
  .routine-step-field,.routine-reminder-field { min-width: 0; max-width: none; width: 100%; }
  .routine-reminder-toggle { justify-content: center; }
  .routine-editor-section-heading.legacy-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
}

/* ROTINA 3.0.0-beta.5.2 — segunda etapa de paridade com a 18.8.2 */
.routine-card-toggle-form { margin: 0; flex: 0 0 auto; }
.routine-card-toggle {
  min-height: 38px;
  max-width: 190px;
  padding: 8px 11px;
  border: 1px solid #d8deea;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #536176;
  background: #f1f4f8;
  font: inherit;
  font-size: .66rem;
  font-weight: 790;
  line-height: 1.2;
  cursor: pointer;
  transition: .18s ease;
}
.routine-card-toggle:hover { transform: translateY(-1px); border-color: #b9c2d3; background: #e9edf4; }
.routine-card-toggle.is-enabled { color: #08705a; border-color: #bce9db; background: #e7f8f1; }
.routine-card-toggle.is-enabled:hover { border-color: #8fd8c2; background: #daf4ea; }
.routine-card-toggle-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #94a3b8; }
.routine-card-toggle.is-enabled .routine-card-toggle-dot { background: #0f9f79; }
.routine-card-delete-form { margin: 0; flex: 0 0 auto; }
.routine-card-delete {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  background: transparent;
  cursor: pointer;
  transition: .18s ease;
}
.routine-card-delete:hover { color: var(--rotina-danger); background: var(--rotina-danger-soft); }
.routine-card-delete .ui-icon { width: 17px; height: 17px; }

.routine-picker-layer { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; padding: 22px; }
.routine-picker-layer[hidden] { display: none; }
.routine-picker-backdrop { position: absolute; inset: 0; border: 0; background: rgba(4,12,29,.58); backdrop-filter: blur(4px); }
.routine-picker-dialog {
  position: relative;
  width: min(620px,100%);
  max-height: min(760px,calc(100dvh - 44px));
  overflow: hidden;
  border: 1px solid var(--rotina-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(4,12,29,.28);
  animation: routine-picker-in .2s ease-out;
}
.routine-picker-header { padding: 22px 24px 18px; border-bottom: 1px solid var(--rotina-line); display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; background: linear-gradient(135deg,#fff,#f7f8ff); }
.routine-picker-header h2 { margin: 0; font-size: 1.35rem; }
.routine-picker-header p { margin: 7px 0 0; color: var(--rotina-text-soft); font-size: .78rem; line-height: 1.5; }
.routine-picker-list { max-height: calc(min(760px,100dvh - 44px) - 112px); overflow-y: auto; padding: 18px; display: grid; gap: 10px; }
.routine-picker-form { margin: 0; }
.routine-picker-option {
  width: 100%;
  min-height: 76px;
  padding: 12px 13px;
  border: 1px solid var(--rotina-line);
  border-radius: 15px;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) 34px;
  align-items: center;
  gap: 12px;
  color: var(--rotina-text);
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: .18s ease;
}
.routine-picker-option:hover,.routine-picker-option:focus-visible { transform: translateY(-1px); border-color: #aeb8f5; background: #fafaff; box-shadow: 0 10px 28px rgba(79,70,229,.08); outline: none; }
.routine-picker-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--rotina-primary); background: var(--rotina-primary-soft); }
.routine-picker-icon .ui-icon { width: 22px; height: 22px; }
.routine-picker-copy { min-width: 0; }
.routine-picker-copy strong,.routine-picker-copy small { display: block; }
.routine-picker-copy strong { overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.routine-picker-copy small { margin-top: 5px; color: var(--rotina-text-soft); font-size: .68rem; line-height: 1.4; }
.routine-picker-add { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--rotina-primary-dark); background: var(--rotina-primary-soft); font-size: 1.15rem; font-weight: 800; }
.routine-picker-empty { min-height: 300px; }
body.routine-picker-open { overflow: hidden; }
@keyframes routine-picker-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 760px) {
  .routine-card-head { align-items: flex-start; }
  .routine-card-toggle { max-width: 145px; padding-inline: 9px; }
  .routine-picker-layer { padding: 12px; align-items: end; }
  .routine-picker-dialog { width: 100%; max-height: calc(100dvh - 24px); border-radius: 22px 22px 0 0; }
  .routine-picker-header { padding: 19px 18px 15px; }
  .routine-picker-list { max-height: calc(100dvh - 135px); padding: 14px; }
  .routine-picker-option { grid-template-columns: 42px minmax(0,1fr) 32px; min-height: 70px; padding: 10px; }
  .routine-picker-icon { width: 42px; height: 42px; }
}

/* ROTINA 3.0.0-beta.5.3 — preparação do novo dia conforme a 18.8.2 */
.new-day-notice {
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) auto;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid #f2d08a;
  border-radius: 18px;
  background: linear-gradient(135deg,#fffaf0,#fff4dc);
  box-shadow: var(--rotina-shadow-card);
}
.new-day-notice-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #9a650f;
  background: #fff;
  box-shadow: 0 8px 20px rgba(154,101,15,.12);
}
.new-day-notice-icon .ui-icon { width: 23px; height: 23px; }
.new-day-notice-copy strong { display: block; color: #5f3c05; font-size: .92rem; }
.new-day-notice-copy p { margin: 5px 0 0; color: #805512; font-size: .78rem; line-height: 1.5; }
.day-cycle-actions form { margin: 0; }

.new-day-layer { position: fixed; inset: 0; z-index: 3200; display: grid; place-items: center; padding: 22px; }
.new-day-layer[hidden] { display: none; }
.new-day-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.62); backdrop-filter: blur(7px); }
.new-day-dialog {
  position: relative;
  z-index: 1;
  width: min(610px,100%);
  max-height: min(780px,calc(100dvh - 44px));
  overflow: auto;
  padding: 27px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(15,23,42,.28);
}
.new-day-hero { display: flex; align-items: center; gap: 15px; }
.new-day-hero-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg,#665cf6,#4338ca);
  box-shadow: 0 15px 32px rgba(79,70,229,.25);
}
.new-day-hero-icon .ui-icon { width: 28px; height: 28px; }
.new-day-hero .eyebrow { margin-bottom: 4px; }
.new-day-hero h2 { margin: 0; font-size: clamp(1.45rem,4vw,2rem); letter-spacing: -.035em; }
.new-day-date { margin: 5px 0 0; color: var(--rotina-text-soft); font-size: .78rem; }
.new-day-description { margin: 22px 0 17px; color: #4f5d73; line-height: 1.65; }
.new-day-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.new-day-summary > div { padding: 15px; border: 1px solid #dfe4f1; border-radius: 16px; background: #f8f9ff; }
.new-day-summary span,.new-day-summary strong { display: block; }
.new-day-summary span { color: var(--rotina-text-soft); font-size: .7rem; font-weight: 760; }
.new-day-summary strong { margin-top: 5px; color: var(--rotina-primary-dark); font-size: 1.55rem; }
.new-day-routine-list { display: grid; gap: 9px; max-height: 310px; margin-top: 16px; overflow: auto; padding-right: 3px; }
.new-day-routine-item,.new-day-empty { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 12px 13px; border: 1px solid var(--rotina-line); border-radius: 14px; background: #fbfcff; }
.new-day-routine-item > span,.new-day-empty > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: var(--rotina-primary); background: var(--rotina-primary-soft); }
.new-day-routine-item strong,.new-day-routine-item small,.new-day-empty strong,.new-day-empty small { display: block; }
.new-day-routine-item small,.new-day-empty small { margin-top: 4px; color: var(--rotina-text-soft); font-size: .7rem; line-height: 1.4; }
.new-day-routine-item em { padding: 5px 8px; border-radius: 999px; color: #08705a; background: #e7f8f1; font-size: .59rem; font-style: normal; font-weight: 850; text-transform: uppercase; }
.new-day-empty { grid-template-columns: 42px minmax(0,1fr); }
.new-day-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 21px; padding-top: 17px; border-top: 1px solid var(--rotina-line); }
.new-day-actions form { margin: 0; }

@media (max-width: 650px) {
  .new-day-notice { grid-template-columns: 44px minmax(0,1fr); padding: 14px; }
  .new-day-notice-icon { width: 44px; height: 44px; border-radius: 14px; }
  .new-day-notice .button { grid-column: 1/-1; width: 100%; }
  .new-day-layer { padding: 10px; align-items: end; }
  .new-day-dialog { width: 100%; max-height: calc(100dvh - 20px); padding: 21px 17px; border-radius: 23px 23px 16px 16px; }
  .new-day-hero-icon { width: 54px; height: 54px; border-radius: 17px; }
  .new-day-summary { grid-template-columns: 1fr 1fr; }
  .new-day-routine-item { grid-template-columns: 38px minmax(0,1fr); }
  .new-day-routine-item > span,.new-day-empty > span { width: 38px; height: 38px; }
  .new-day-routine-item em { grid-column: 2; justify-self: start; }
  .new-day-actions { align-items: stretch; flex-direction: column-reverse; }
  .new-day-actions form,.new-day-actions .button { width: 100%; }
}

/* ROTINA 3.0.0-beta.5.4 — encerramento do dia conforme a 18.8.2 */
.closing-day-notice {
  display: grid;
  grid-template-columns: 52px minmax(0,1fr) auto;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid #f2d08a;
  border-radius: 18px;
  background: linear-gradient(135deg,#fffaf0,#fff4dc);
  box-shadow: var(--rotina-shadow-card);
}
.closing-day-notice-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #9a650f;
  background: #fff;
  box-shadow: 0 8px 20px rgba(154,101,15,.12);
}
.closing-day-notice-icon .ui-icon { width: 23px; height: 23px; }
.closing-day-notice-copy strong { display: block; color: #5f3c05; font-size: .92rem; }
.closing-day-notice-copy p { margin: 5px 0 0; color: #805512; font-size: .78rem; line-height: 1.5; }

.closing-day-layer { position: fixed; inset: 0; z-index: 3250; display: grid; place-items: center; padding: 22px; }
.closing-day-layer[hidden] { display: none; }
.closing-day-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.64); backdrop-filter: blur(7px); }
.closing-day-dialog {
  position: relative;
  z-index: 1;
  width: min(820px,100%);
  max-height: min(800px,calc(100dvh - 44px));
  overflow: auto;
  padding: 27px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(15,23,42,.3);
}
.closing-day-hero { display: flex; align-items: center; gap: 15px; }
.closing-day-hero-icon {
  width: 60px;
  height: 60px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 19px;
  color: var(--rotina-primary);
  background: var(--rotina-primary-soft);
}
.closing-day-hero-icon .ui-icon { width: 27px; height: 27px; }
.closing-day-hero .eyebrow { margin-bottom: 4px; }
.closing-day-hero h2 { margin: 0; font-size: clamp(1.45rem,4vw,2rem); letter-spacing: -.035em; }
.closing-day-date { margin: 5px 0 0; color: var(--rotina-text-soft); font-size: .78rem; text-transform: capitalize; }
.closing-day-description { margin: 22px 0 0; color: #4f5d73; line-height: 1.65; }
.closing-day-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; margin: 18px 0; }
.closing-day-summary > div { padding: 15px; border: 1px solid #dfe4f1; border-radius: 16px; background: #f8f9ff; text-align: center; }
.closing-day-summary span,.closing-day-summary strong { display: block; }
.closing-day-summary span { color: var(--rotina-text-soft); font-size: .7rem; font-weight: 760; }
.closing-day-summary strong { margin-top: 5px; color: var(--rotina-primary-dark); font-size: 1.55rem; }
.closing-day-pending { padding: 16px; border: 1px solid var(--rotina-line); border-radius: 17px; background: #fff; }
.closing-day-pending > strong { display: block; margin-bottom: 10px; }
.closing-day-pending ul { display: grid; gap: 8px; max-height: 315px; margin: 0; overflow: auto; padding: 0 3px 0 0; list-style: none; }
.closing-day-pending li { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 11px 12px; border-radius: 12px; background: #f8fafc; }
.closing-day-pending li span { min-width: 0; overflow: hidden; font-size: .78rem; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.closing-day-pending time { flex: 0 0 auto; color: var(--rotina-text-soft); font-size: .68rem; }
.closing-day-empty,.closing-day-more { color: var(--rotina-text-soft); justify-content: flex-start !important; font-size: .75rem; }
.closing-day-more { border: 1px dashed var(--rotina-line); background: #fff !important; }
.closing-day-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 21px; padding-top: 17px; border-top: 1px solid var(--rotina-line); }
.closing-day-actions form { margin: 0; }

@media (max-width: 700px) {
  .closing-day-notice { grid-template-columns: 44px minmax(0,1fr); padding: 14px; }
  .closing-day-notice-icon { width: 44px; height: 44px; border-radius: 14px; }
  .closing-day-notice .button { grid-column: 1/-1; width: 100%; }
  .closing-day-layer { padding: 10px; align-items: end; }
  .closing-day-dialog { width: 100%; max-height: calc(100dvh - 20px); padding: 21px 17px; border-radius: 23px 23px 16px 16px; }
  .closing-day-hero-icon { width: 54px; height: 54px; border-radius: 17px; }
  .closing-day-actions { align-items: stretch; flex-direction: column; }
  .closing-day-actions form,.closing-day-actions .button { width: 100%; }
}
@media (max-width: 460px) {
  .closing-day-summary { grid-template-columns: 1fr; }
  .closing-day-pending li { align-items: flex-start; flex-direction: column; gap: 4px; }
  .closing-day-pending li span { white-space: normal; }
}

/* Resumo do Dia · paridade 18.8.2 */
.daily-briefing { margin: 18px 0 22px; padding: 22px; border: 1px solid #dce3ef; border-radius: 22px; background: linear-gradient(135deg,#fff 0%,#f5f7ff 100%); box-shadow: 0 12px 30px rgba(79,70,229,.07); }
.daily-briefing-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.daily-briefing-heading h2 { margin: 3px 0 4px; }
.daily-briefing-heading p:last-child { margin: 0; color: var(--rotina-text-soft); }
.daily-briefing-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.daily-briefing-actions form { margin: 0; }
.daily-briefing-items { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.daily-briefing-item { display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; }
.daily-briefing-item > span { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 11px; color: #4f46e5; background: #eef2ff; font-weight: 900; }
.daily-briefing-item strong, .daily-briefing-item small { display: block; }
.daily-briefing-item strong { font-size: 1.18rem; line-height: 1.1; }
.daily-briefing-item small { margin-top: 3px; color: #64748b; line-height: 1.25; }
.daily-briefing-item.danger { border-color: #fecaca; background: #fff7f7; }
.daily-briefing-item.danger > span { color: #b42318; background: #fee2e2; }
.daily-briefing-item.success { border-color: #bbf7d0; background: #f7fff9; }
.daily-briefing-item.success > span { color: #15803d; background: #dcfce7; }
@media (max-width: 1050px) { .daily-briefing-items { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 720px) { .daily-briefing { padding: 18px; border-radius: 18px; } .daily-briefing-heading { display: grid; } .daily-briefing-actions { justify-content: stretch; } .daily-briefing-actions form,.daily-briefing-actions .button { flex: 1; width: 100%; } .daily-briefing-items { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 430px) { .daily-briefing-items { grid-template-columns: 1fr; } }

/* Beta 5.6 — Pensamento do Dia na Visão Geral */
.overview-thought-card {
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0,1fr);
  gap: 24px;
  align-items: start;
  margin: 0 0 22px;
  padding: 27px 30px;
  overflow: hidden;
  border: 1px solid #dfe2ff;
  border-radius: 24px;
  background: linear-gradient(135deg,#f0f3ff 0%,#fbfbff 70%,#f5f1ff 100%);
  box-shadow: 0 15px 35px rgba(72,63,190,.08);
}
.overview-thought-card::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -100px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle,rgba(117,91,255,.09),rgba(117,91,255,0) 67%);
  pointer-events: none;
}
.overview-thought-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  color: var(--rotina-primary);
  font-family: Georgia,serif;
  font-size: 2.1rem;
  font-weight: 800;
  box-shadow: 0 9px 22px rgba(79,70,229,.08);
}
.overview-thought-copy { position: relative; z-index: 1; min-width: 0; }
.overview-thought-copy .eyebrow { margin: 5px 0 9px; color: var(--rotina-primary); }
.overview-thought-copy blockquote {
  margin: 0;
  color: var(--rotina-primary-dark);
  font-family: Georgia,"Times New Roman",serif;
  font-size: clamp(1.08rem,1.8vw,1.34rem);
  line-height: 1.55;
}
.overview-thought-copy cite {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 17px;
  color: var(--rotina-text-soft);
  font-size: .78rem;
  font-style: normal;
  font-weight: 700;
}
.overview-thought-copy cite span { display: block; width: 22px; height: 1px; background: #b9c2d5; }
@media (max-width: 640px) {
  .overview-thought-card { grid-template-columns: 50px minmax(0,1fr); gap: 15px; padding: 20px 18px; border-radius: 20px; }
  .overview-thought-icon { width: 50px; height: 50px; border-radius: 16px; font-size: 1.65rem; }
  .overview-thought-copy .eyebrow { margin-top: 1px; }
}
.overview-thought-copy cite b { font: inherit; }

/* Beta 5.6.1 — paridade visual da página Hoje e navegação lateral */
.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
}
.app-content { padding-top: 26px; }
.app-sidebar-session {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px 8px 0;
  border-top: 1px solid #edf0f5;
}
.app-sidebar-version {
  overflow: hidden;
  color: #8490a5;
  font-size: .67rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-sidebar-logout {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #dfe5ef;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #344054;
  background: #fff;
  font-size: .75rem;
  font-weight: 800;
  text-decoration: none;
  transition: color .18s ease,background .18s ease,border-color .18s ease,transform .18s ease;
}
.app-sidebar-logout:hover { color: #4338ca; border-color: #c8cff7; background: #f5f6ff; transform: translateY(-1px); }
.app-sidebar-logout .ui-icon { width: 15px; height: 15px; }
.today-page-heading { margin-bottom: 22px; }

.task-horizon { display: grid; gap: 22px; }
.task-section-legacy,
.future-task-section {
  overflow: hidden;
  border: 1px solid var(--rotina-line);
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--rotina-shadow-card);
}
.today-panel { padding: 26px; }
.today-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid #edf1f6;
}
.today-panel-header .eyebrow { margin: 0 0 8px; }
.today-panel-header h2 { margin: 0; font-size: 1.6rem; letter-spacing: -.035em; }
.today-panel-header p:not(.eyebrow) { margin: 7px 0 0; color: var(--rotina-text-soft); font-size: .87rem; line-height: 1.55; }
.today-panel-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.today-task-list { display: grid; gap: 10px; padding-top: 20px; }
.today-task-item {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) 32px;
  gap: 10px;
  align-items: start;
  min-height: 92px;
  padding: 14px 14px 13px;
  border: 1px solid #e4e9f1;
  border-radius: 17px;
  background: #fbfcfe;
  transition: transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease;
}
.today-task-item:hover { transform: translateX(2px); border-color: #d2daf0; background: #fff; box-shadow: 0 8px 22px rgba(15,23,42,.045); }
.today-task-item.overdue-task { border-color: #ffaba5; border-left: 5px solid #e83d36; background: #fffafa; }
.today-task-item.completed { opacity: .72; background: #f9fafc; }
.today-task-check-form { margin: 0; }
.today-task-check {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid #cad4e5;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: transparent;
  background: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .16s ease,border-color .16s ease,background .16s ease,color .16s ease;
}
.today-task-check:hover { border-color: var(--rotina-primary); transform: scale(1.05); }
.today-task-item.overdue-task .today-task-check { border-color: #f4b5b0; color: #d8453d; }
.today-task-item.completed .today-task-check { color: #fff; border-color: #43c97a; background: #43c97a; }
.today-task-content {
  min-width: 0;
  padding: 0;
  border: 0;
  display: block;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.today-task-content:focus-visible { outline: 3px solid rgba(79,70,229,.18); outline-offset: 5px; border-radius: 8px; }
.today-task-title { display: block; overflow: hidden; font-size: .96rem; font-weight: 720; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.today-task-item.completed .today-task-title { color: #9aa5b7; text-decoration: line-through; }
.today-task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 8px; color: #64748b; font-size: .72rem; line-height: 1.35; }
.today-task-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.today-task-meta .ui-icon { width: 13px; height: 13px; }
.today-task-source { padding: 4px 9px; border: 1px solid; border-radius: 999px; font-weight: 720; }
.today-task-source.source-routine { color: #4f46e5; border-color: #cdd3ff; background: #f1f2ff; }
.today-task-source.source-standalone { color: #1760ad; border-color: #a9d2ff; background: #eaf5ff; }
.today-overdue-badge { padding: 4px 9px; border-radius: 999px; color: #aa241f; background: #ffe9e7; font-weight: 800; }
.today-overdue-badge b { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #de3028; font-size: .64rem; }
.today-due { color: #f04438; font-weight: 750; }
.today-due:not(.overdue) { color: #d97706; }
.today-time { color: #344054; font-weight: 730; }
.today-time.overdue { color: #b42318; text-decoration: line-through; }
.today-reminder { color: #4f46e5; font-weight: 720; }
.today-completed-at { color: #15915b; font-weight: 720; }
.today-carried { color: #8a5d10; }
.today-task-remove-form { margin: -2px -2px 0 0; }
.today-task-remove {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  display: grid;
  place-items: center;
  color: #cbd2dd;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: color .16s ease,background .16s ease;
}
.today-task-remove:hover { color: #c93636; background: #fff1f1; border-radius: 9px; }
.today-overdue-actions { grid-column: 2 / 4; display: flex; gap: 8px; margin-top: 1px; }
.today-overdue-actions form { margin: 0; }
.overdue-action { min-height: 36px; padding: 7px 12px; border: 1px solid #efbbb7; border-radius: 10px; color: #9e2f28; background: #fff; font: inherit; font-size: .72rem; font-weight: 780; cursor: pointer; }
.overdue-action.complete { color: #17663c; border-color: #a9ddbe; background: #f2fff7; }
.today-empty-state { padding: 38px 16px 18px; text-align: center; }
.today-empty-state > span { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 19px; display: grid; place-items: center; color: #fff; background: #4bc77b; font-size: 1.35rem; }
.today-empty-state h3 { margin: 0 0 7px; }
.today-empty-state p { margin: 0; color: var(--rotina-text-soft); }
.future-task-header {
  width: 100%;
  min-height: 88px;
  padding: 18px 27px;
  border: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto 34px;
  gap: 14px;
  align-items: center;
  color: inherit;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.future-task-header > span { display: grid; gap: 4px; }
.future-task-header small { color: var(--rotina-primary); font-size: .7rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.future-task-header strong { font-size: 1.05rem; }
.future-task-header b { min-width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--rotina-primary-dark); background: var(--rotina-primary-soft); font-size: .75rem; }
.future-task-header i { color: #64748b; font-style: normal; text-align: center; transition: transform .18s ease; }
.future-task-header[aria-expanded="false"] i { transform: rotate(-90deg); }
.future-task-content { padding: 5px 27px 25px; border-top: 1px solid #edf1f6; }
.future-task-content[hidden] { display: none; }
.future-task-empty { padding: 34px 12px 10px; color: #94a3b8; text-align: center; font-size: .82rem; }

.task-modal-layer { position: fixed; inset: 0; z-index: 3100; display: grid; place-items: center; padding: 20px; }
.task-modal-layer[hidden] { display: none; }
.task-modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(20,29,46,.44); backdrop-filter: blur(3px); }
.task-modal-dialog {
  position: relative;
  width: min(565px,100%);
  max-height: min(850px,calc(100dvh - 40px));
  overflow-y: auto;
  padding: 30px;
  border: 0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15,23,42,.28);
  animation: task-modal-in .2s ease-out;
}
@keyframes task-modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
body.task-modal-open { overflow: hidden; }
.task-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 27px; }
.task-modal-header h2 { margin: 0; font-size: 1.75rem; letter-spacing: -.035em; }
.task-modal-header p { margin: 8px 0 0; color: var(--rotina-text-soft); line-height: 1.55; }
.task-modal-close { width: 38px; height: 38px; flex: 0 0 38px; padding: 0; border: 0; border-radius: 12px; color: #64748b; background: transparent; font-size: 1.45rem; cursor: pointer; }
.task-modal-close:hover { color: #334155; background: #f3f5f8; }
.task-modal-description { margin-bottom: 24px; }
.task-modal-dialog .field label small { color: #98a4b7; font-weight: 650; }
.task-period-selector { margin: 0 0 25px; padding: 0; border: 0; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.task-period-selector legend { grid-column: 1/-1; margin-bottom: 8px; font-weight: 800; }
.task-period-selector label { position: relative; min-width: 0; }
.task-period-selector input { position: absolute; opacity: 0; pointer-events: none; }
.task-period-selector label > span { min-height: 104px; padding: 17px 15px; border: 1px solid #dce3ed; border-radius: 17px; display: grid; align-content: start; gap: 8px; background: #fbfcfe; cursor: pointer; transition: border-color .16s ease,background .16s ease,box-shadow .16s ease; }
.task-period-selector strong { font-size: .86rem; }
.task-period-selector small { color: #66758d; font-size: .72rem; line-height: 1.45; }
.task-period-selector input:checked + span { border-color: #9ca9ff; background: #f0f2ff; box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.task-period-selector input:focus-visible + span { outline: 3px solid rgba(79,70,229,.18); outline-offset: 2px; }
.task-modal-schedule,.task-reminder-controls { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.task-reminder-setting { margin: 7px 0 14px; padding: 16px 17px; border: 1px solid #dfe5ee; border-radius: 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fbfcfe; cursor: pointer; }
.task-reminder-setting strong,.task-reminder-setting small { display: block; }
.task-reminder-setting strong { font-size: .87rem; }
.task-reminder-setting small { margin-top: 5px; color: var(--rotina-text-soft); font-size: .7rem; line-height: 1.4; }
.task-reminder-controls { padding: 16px; border: 1px solid #dfe5ee; border-radius: 17px; background: #f8faff; }
.task-reminder-controls[hidden] { display: none; }
.task-reminder-controls .field { margin: 0; }
.task-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 27px; }

/* Estatísticas da página Rotinas com a mesma densidade dos indicadores de Hoje. */
.routine-metrics { gap: 12px; margin-bottom: 20px; }
.routine-metrics .metric-card { min-height: 118px; padding: 16px 17px; display: grid; grid-template-columns: 38px minmax(0,1fr); grid-template-rows: auto auto; column-gap: 12px; align-content: center; }
.routine-metrics .metric-card .metric-icon { grid-row: 1 / 3; width: 38px; height: 38px; margin: 0; border-radius: 12px; }
.routine-metrics .metric-card .metric-icon .ui-icon { width: 18px; height: 18px; }
.routine-metrics .metric-card > span:not(.metric-icon) { align-self: end; font-size: .65rem; }
.routine-metrics .metric-card strong { margin-top: 3px; font-size: 1.45rem; line-height: 1; }
.routine-metrics .metric-card small { grid-column: 2; margin-top: 4px; font-size: .66rem; }

@media (max-width: 980px) {
  .app-sidebar { position: fixed; height: 100dvh; overflow-y: auto; }
  .app-content { padding-top: 74px; }
}
@media (max-width: 720px) {
  .today-panel { padding: 18px; }
  .today-panel-header { display: grid; }
  .today-panel-actions { justify-content: stretch; }
  .today-panel-actions .button { flex: 1; }
  .today-task-item { grid-template-columns: 40px minmax(0,1fr) 28px; padding: 12px 10px; }
  .today-task-check { width: 33px; height: 33px; }
  .today-task-title { white-space: normal; }
  .today-overdue-actions { grid-column: 2 / 4; }
  .future-task-header { padding: 16px 18px; }
  .future-task-content { padding: 4px 18px 20px; }
  .task-modal-dialog { padding: 23px 20px; border-radius: 23px; }
  .task-period-selector { grid-template-columns: 1fr; }
  .task-period-selector label > span { min-height: 76px; }
  .task-modal-schedule,.task-reminder-controls { grid-template-columns: 1fr; }
  .task-modal-actions .button { flex: 1; }
}
@media (max-width: 520px) {
  .app-sidebar-session { grid-template-columns: 1fr; }
  .app-sidebar-logout { width: 100%; }
  .today-task-meta { gap: 5px; }
  .today-panel-actions { display: grid; grid-template-columns: 1fr; }
  .today-overdue-actions { flex-wrap: wrap; }
}

/* =========================================================
   BASE DE CONHECIMENTO — PARIDADE 18.8.2
========================================================= */
.knowledge-view,.knowledge-detail-overlay{
  --primary:var(--rotina-primary);--primary-dark:var(--rotina-primary-dark);--primary-soft:var(--rotina-primary-soft);
  --text:var(--rotina-text);--text-soft:var(--rotina-text-soft);--line:var(--rotina-line);
  --surface:var(--rotina-surface);--surface-soft:var(--rotina-surface-soft);
  --radius-md:var(--rotina-radius-md);--radius-lg:var(--rotina-radius-lg);--radius-pill:var(--rotina-radius-pill);
  --shadow-card:var(--rotina-shadow-card);
}
.knowledge-view{min-width:0}.knowledge-view .page-heading{align-items:flex-start}.knowledge-view .section-kicker{display:block;margin-bottom:5px;color:var(--rotina-primary);font-size:.7rem;font-weight:850;letter-spacing:.1em;text-transform:uppercase}
.modal-overlay{position:fixed;inset:0;z-index:2500;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(15,23,42,.52);backdrop-filter:blur(5px)}
.modal-overlay.open{display:flex}.app-modal{width:min(760px,100%);max-height:calc(100vh - 48px);border:1px solid var(--rotina-line);border-radius:24px;background:#fff;box-shadow:0 28px 90px rgba(15,23,42,.26);overflow:hidden}.app-modal-header{display:flex;align-items:flex-start;gap:14px;padding:22px 24px;border-bottom:1px solid var(--rotina-line)}.app-modal-header>div{min-width:0;flex:1}.app-modal-header h2{margin:6px 0}.app-modal-header p{margin:0;color:var(--rotina-text-soft)}
.knowledge-header { gap: 24px; }
.knowledge-version {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid #d8ddfb;
    border-radius: var(--radius-pill);
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-size: .78rem;
    font-weight: 750;
    white-space: nowrap;
}
.knowledge-search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 8px 0 22px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,.9);
    box-shadow: var(--shadow-card);
    overflow: visible;
}
.knowledge-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    flex: 1;
    padding: 0 14px;
    border: 1px solid #dce2ed;
    border-radius: 14px;
    background: #f9fbfe;
}
.knowledge-search > span { color: var(--primary); font-size: 1.25rem; }
.knowledge-search input {
    width: 100%;
    min-width: 0;
    height: 50px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
}
.knowledge-search input::-webkit-search-cancel-button { display: none; }
.knowledge-search button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 9px;
    color: var(--text-soft);
    background: transparent;
}
.knowledge-search button:hover { background: #edf1f7; color: var(--text); }
.knowledge-stats { color: var(--text-soft); font-size: .88rem; white-space: nowrap; }
.knowledge-featured,
.knowledge-browser {
    margin-bottom: 24px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,.92);
    box-shadow: var(--shadow-card);
    overflow: visible;
}
.knowledge-featured { background: linear-gradient(145deg, #f6f7ff, #fff); border-color: #dfe2ff; }
.knowledge-section-heading,
.knowledge-results-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}
.knowledge-section-heading h2,
.knowledge-results-heading h2 { margin: 3px 0 0; font-size: 1.35rem; }
.knowledge-results-heading > span { color: var(--text-soft); font-size: .84rem; }
.knowledge-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}
.knowledge-featured-card,
.knowledge-procedure-open,
.knowledge-question {
    width: 100%;
    border: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.knowledge-featured-card {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    gap: 12px;
    align-items: center;
    min-height: 118px;
    padding: 16px;
    border: 1px solid #e0e3f8;
    border-radius: 16px;
    background: white;
    transition: transform .18s, box-shadow .18s, border-color .18s;
}
.knowledge-featured-card:hover { transform: translateY(-2px); border-color: #b9c0fa; box-shadow: var(--shadow-card-hover); }
.knowledge-featured-copy,
.knowledge-card-copy { min-width: 0; display: grid; gap: 5px; }
.knowledge-featured-copy small,
.knowledge-card-copy small { color: var(--primary); font-size: .72rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.knowledge-featured-copy strong,
.knowledge-card-copy strong { color: var(--text); line-height: 1.5; }
.knowledge-featured-copy > span:last-child,
.knowledge-card-copy > span { color: var(--text-soft); font-size: .86rem; line-height: 1.45; }
.knowledge-card-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-size: 1rem;
    font-weight: 800;
}
.knowledge-card-icon.procedure { color: #97520b; background: #fff4df; }
.knowledge-filter-bar {
    display: flex;
    gap: 9px;
    margin-bottom: 22px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.knowledge-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid #dce2ec;
    border-radius: var(--radius-pill);
    color: var(--text-soft);
    background: white;
    font-weight: 650;
    cursor: pointer;
}
.knowledge-filter:hover,
.knowledge-filter.active { color: var(--primary-dark); border-color: #aeb6fa; background: var(--primary-soft); }
.knowledge-content-list { display: grid; gap: 12px; }
.knowledge-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
    overflow: hidden;
    transition: border-color .18s, box-shadow .18s;
}
.knowledge-card:hover { border-color: #cbd2e0; box-shadow: 0 10px 24px rgba(15,23,42,.045); }
.knowledge-question,
.knowledge-procedure-open {
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 17px 18px;
    background: white;
}
.knowledge-question-chevron { color: var(--primary); font-size: 1.35rem; font-weight: 500; }
.knowledge-answer { padding: 0 18px 18px 74px; }
.knowledge-answer-text {
    padding-top: 15px;
    border-top: 1px solid var(--line);
    color: #39455a;
    line-height: 1.7;
}
.knowledge-answer-text p { margin: 0; }
.knowledge-card-footer { margin-top: 12px; }
.knowledge-link-button {
    border: 0;
    padding: 0;
    color: var(--primary);
    background: transparent;
    font-weight: 750;
    cursor: pointer;
}
.knowledge-step-count {
    display: inline-flex;
    width: max-content;
    margin-top: 3px;
    padding: 3px 8px;
    border-radius: 999px;
    color: #8a4b07 !important;
    background: #fff4df;
    font-size: .7rem !important;
    font-weight: 750;
}
.knowledge-keywords { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.knowledge-keywords span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #526075;
    background: #f0f3f8;
    font-size: .72rem;
}
.knowledge-empty {
    padding: 42px 20px;
    text-align: center;
    color: var(--text-soft);
}
.knowledge-empty h3 { margin-bottom: 6px; color: var(--text); }
.knowledge-detail-overlay { z-index: 55; }
.knowledge-detail-modal {
    width: min(780px, calc(100vw - 32px));
    max-height: min(88vh, 900px);
    padding: 0;
    overflow: hidden;
}
.knowledge-detail-header { padding: 24px 26px 18px; border-bottom: 1px solid var(--line); }
.knowledge-detail-header > div { min-width: 0; }
.knowledge-detail-header h2 { margin: 8px 0 6px; font-size: clamp(1.55rem, 3vw, 2.15rem); line-height: 1.15; }
.knowledge-detail-header p { margin: 0; color: var(--text-soft); line-height: 1.55; }
.knowledge-detail-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.knowledge-detail-meta span {
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-size: .7rem;
    font-weight: 750;
}
.knowledge-detail-meta span:first-child[data-type="procedure"] { color: #8b4b08; background: #fff3dd; }
.knowledge-detail-body {
    display: grid;
    gap: 18px;
    max-height: calc(88vh - 245px);
    padding: 22px 26px;
    overflow-y: auto;
}
.knowledge-detail-section { color: #374256; line-height: 1.7; }
.knowledge-detail-section h3 { margin: 0 0 8px; color: var(--text); font-size: 1rem; }
.knowledge-detail-section p { margin: 0; }
.knowledge-detail-section ul { margin: 0; padding-left: 20px; }
.knowledge-procedure-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.knowledge-procedure-steps li { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 12px; align-items: start; }
.knowledge-procedure-steps li > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: white; background: var(--primary); font-size: .82rem; font-weight: 800; }
.knowledge-procedure-steps p { padding-top: 3px; }
.knowledge-attention,
.knowledge-contact { padding: 14px 15px; border-radius: 13px; }
.knowledge-attention { color: #73420c; background: #fff6e7; border: 1px solid #f7ddb5; }
.knowledge-contact { color: #244a73; background: #eef6ff; border: 1px solid #d5e7fa; }
.knowledge-related { padding: 0 26px 20px; }
.knowledge-related h3 { font-size: .94rem; }
.knowledge-related > div { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 8px; }
.knowledge-related button {
    display: grid;
    grid-template-columns: 30px minmax(0,1fr);
    gap: 3px 9px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fafbfe;
    text-align: left;
    cursor: pointer;
}
.knowledge-related button span { grid-row: 1 / span 2; }
.knowledge-related button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-related button small { color: var(--text-soft); }
.knowledge-detail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 26px;
    border-top: 1px solid var(--line);
    background: #fafbfe;
}
.knowledge-detail-footer small { color: var(--text-soft); }

@media (max-width: 760px) {
    .knowledge-header,
    .knowledge-search-panel,
    .knowledge-section-heading,
    .knowledge-results-heading { align-items: stretch; flex-direction: column; }
    .knowledge-version { align-self: flex-start; }
    .knowledge-search-panel { padding: 15px; }
    .knowledge-stats { white-space: normal; }
    .knowledge-featured,
    .knowledge-browser { padding: 16px; }
    .knowledge-featured-grid { grid-template-columns: 1fr; }
    .knowledge-question,
    .knowledge-procedure-open { grid-template-columns: 38px minmax(0,1fr) auto; gap: 10px; padding: 15px 13px; }
    .knowledge-answer { padding: 0 13px 15px; }
    .knowledge-detail-overlay { align-items: flex-end; padding: 0; }
    .knowledge-detail-modal { width: 100%; max-height: 94vh; border-radius: 24px 24px 0 0; }
    .knowledge-detail-header { padding: 20px 18px 15px; }
    .knowledge-detail-body { max-height: calc(94vh - 235px); padding: 18px; }
    .knowledge-related { padding: 0 18px 18px; }
    .knowledge-detail-footer { align-items: stretch; flex-direction: column; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
    .knowledge-detail-footer .primary { width: 100%; }
}

/* =========================================================
   VERSÃO 18.1 — BETA, DESTAQUES E CONTEÚDOS RELACIONADOS
========================================================= */
.logo-lockup { position: relative; width: 64px; margin: 0 auto 36px; }
.logo-lockup .logo { margin: 0; }
.app-beta-badge {
    position: absolute; right: -12px; bottom: -8px; z-index: 2;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 3px 6px; border: 2px solid white; border-radius: 999px;
    color: #7c2d12; background: #fed7aa; box-shadow: 0 4px 12px rgba(124,45,18,.16);
    font-size: .52rem; font-weight: 900; letter-spacing: .08em;
}
.beta-settings-card { border-color: #fed7aa; background: linear-gradient(145deg,#fffaf2,#fff); }
.beta-settings-icon { width: auto !important; min-width: 58px; padding: 0 8px; color: #7c2d12 !important; background: #ffedd5 !important; font-size: .7rem !important; font-weight: 900; letter-spacing: .08em; }

.knowledge-featured { background: linear-gradient(145deg,#f9faff,#fff); }
.knowledge-carousel-controls { display: flex; gap: 7px; }
.knowledge-carousel-controls button {
    display: grid; place-items: center; width: 36px; height: 36px;
    border: 1px solid #d7ddea; border-radius: 11px; color: #42506a; background: white;
    font-size: 1.15rem; font-weight: 800;
}
.knowledge-carousel-controls button:hover:not(:disabled) { border-color: #9faee7; color: var(--primary); background: #f7f8ff; }
.knowledge-carousel-controls button:disabled { opacity: .35; cursor: not-allowed; }
.knowledge-carousel-controls button[aria-pressed="true"] { color: #7c2d12; background: #fff0e4; border-color: #fdba74; }
.knowledge-featured-grid {
    display: flex; gap: 14px; overflow-x: hidden; scroll-behavior: smooth; scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.knowledge-featured-grid::-webkit-scrollbar { display: none; }
.knowledge-featured-card {
    flex: 0 0 calc((100% - 14px)/2); min-width: 0; min-height: 150px; scroll-snap-align: start;
    border-width: 1px; box-shadow: 0 9px 24px rgba(15,23,42,.045);
}
.knowledge-featured-card .knowledge-featured-copy > span:last-child {
    display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
}
.knowledge-featured-card.tone-1 { border-color: #b9d8f8; background: linear-gradient(145deg,#eef7ff,#fff); }
.knowledge-featured-card.tone-1 .knowledge-card-icon { color: #075985; background: #dbeafe; }
.knowledge-featured-card.tone-1 small { color: #0369a1; }
.knowledge-featured-card.tone-2 { border-color: #b9eadf; background: linear-gradient(145deg,#ecfdf7,#fff); }
.knowledge-featured-card.tone-2 .knowledge-card-icon { color: #0f766e; background: #ccfbf1; }
.knowledge-featured-card.tone-2 small { color: #0f766e; }
.knowledge-featured-card.tone-3 { border-color: #ead5ad; background: linear-gradient(145deg,#fff8e8,#fff); }
.knowledge-featured-card.tone-3 .knowledge-card-icon { color: #92400e; background: #ffedd5; }
.knowledge-featured-card.tone-3 small { color: #a16207; }
.knowledge-featured-card.tone-4 { border-color: #d9c9f4; background: linear-gradient(145deg,#f7f2ff,#fff); }
.knowledge-featured-card.tone-4 .knowledge-card-icon { color: #6d28d9; background: #ede9fe; }
.knowledge-featured-card.tone-4 small { color: #6d28d9; }
.knowledge-card-arrow { align-self: center; color: currentColor; font-size: 1.2rem; }
.knowledge-carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.knowledge-carousel-dots span { width: 7px; height: 7px; border-radius: 999px; background: #cbd3e0; transition: width .2s, background .2s; }
.knowledge-carousel-dots span.active { width: 22px; background: var(--primary); }

.knowledge-detail-modal { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.knowledge-detail-header { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start; gap: 11px; }
.knowledge-detail-header > div { min-width: 0; }
.knowledge-detail-back { margin-top: 1px; }
.knowledge-detail-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.knowledge-detail-body { max-height: none; overflow: visible; }
.knowledge-related { padding-top: 4px; padding-bottom: 25px; }
.knowledge-related > div { grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 10px; }
.knowledge-related button {
    grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 10px;
    min-height: 68px; padding: 12px 13px; overflow: visible;
}
.knowledge-related-icon {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
    color: #075985; background: #dbeafe; font-weight: 900;
}
.knowledge-related-icon.procedure { color: #92400e; background: #ffedd5; }
.knowledge-related-copy { min-width: 0; display: grid; gap: 3px; }
.knowledge-related-copy strong { overflow: visible !important; text-overflow: clip !important; white-space: normal !important; line-height: 1.32; }
.knowledge-related-copy small { line-height: 1.35; }
.knowledge-related-arrow { color: var(--primary); font-size: 1.15rem; }

.system-routine-toggle { cursor: pointer; }
.card.system-routine-disabled { opacity: 1; }
.card.system-routine-disabled .accent { filter: none; opacity: .62; }
.card.system-routine-disabled .progress-info strong::after { content: " · modo manual"; font-weight: 500; color: var(--text-soft); }
.site-footer strong { line-height: 1.4; }

@media (max-width: 760px) {
    .knowledge-section-heading { flex-direction: row; align-items: center; }
    .knowledge-carousel-controls { margin-left: auto; }
    .knowledge-featured-card { flex-basis: 100%; min-height: 160px; }
    .knowledge-detail-header { grid-template-columns: auto minmax(0,1fr) auto; }
    .knowledge-detail-scroll { max-height: calc(94vh - 155px); }
    .knowledge-related > div { grid-template-columns: 1fr; }
    .knowledge-related button { min-height: 74px; }
    .app-beta-badge { right: -10px; bottom: -7px; }
}


/* =========================================================
   VERSÃO 18.4 — SELO BETA E MODO MANUAL DAS ROTINAS
========================================================= */
.logo-lockup .app-beta-badge { transform: translate(0,0); }
.system-routine-toggle:not(.enabled) { color: #475569; background: #f1f5f9; border-color: #d7ddea; }
.system-routine-toggle:not(.enabled) .routine-toggle-dot { background: #94a3b8; }

/* Versão 18.4 — ícones SVG e origem das tarefas */
.rotina-svg-icon { width: 1em; height: 1em; display: block; fill: currentColor; }
.rotina-text-icon { display: inline-grid; place-items: center; }
.card-icon-circle .app-routine-svg-icon { width: 1.35rem; height: 1.35rem; }
.picker-icon .app-picker-svg-icon { width: 1.2rem; height: 1.2rem; }
.new-day-routine-icon .app-new-day-svg-icon { width: 1.2rem; height: 1.2rem; }
.knowledge-filter-svg { width: .92rem; height: .92rem; }

.today-source { border: 1px solid transparent; }
.today-source.source-standalone {
    color: #1859a7;
    border-color: #b9d7fb;
    background: #eaf4ff;
}
.today-source.source-personal {
    color: #4c3bc8;
    border-color: #d5d0ff;
    background: #f0eeff;
}
.today-source.source-system {
    color: #08706b;
    border-color: #b6e4df;
    background: #e6f7f4;
}
.today-item.completed .today-source { opacity: .7; filter: saturate(.55); }

/* =========================================================
   VERSÃO 18.4 — MODAIS CENTRAIS, BASE EXPANSÍVEL E NOTIFICAÇÕES
========================================================= */
@media(max-width:760px){
    .modal-overlay,
    .modal-overlay.new-day-overlay,
    .knowledge-detail-overlay { place-items:center; align-items:center; padding:14px; }
    .new-day-modal,
    .knowledge-detail-modal { width:100%; max-height:calc(100dvh - 28px); border-radius:24px; }
    .knowledge-detail-scroll { max-height:calc(100dvh - 190px); }
    .knowledge-detail-footer { padding-bottom:14px; }
}
.knowledge-inline-body { padding:0 18px 18px 74px; }
.knowledge-inline-body[hidden] { display:none; }
.knowledge-inline-sections { display:grid; gap:13px; }
.knowledge-inline-section { color:#374256; line-height:1.65; }
.knowledge-inline-section h4 { margin:0 0 6px; color:var(--text); font-size:.9rem; }
.knowledge-inline-section p { margin:0; }
.knowledge-inline-attention,.knowledge-inline-contact,.knowledge-inline-info { padding:12px 13px; border-radius:12px; }
.knowledge-inline-attention { color:#73420c; background:#fff6e7; border:1px solid #f7ddb5; }
.knowledge-inline-contact { color:#244a73; background:#eef6ff; border:1px solid #d5e7fa; }
.knowledge-inline-info { color:#1e4f75; background:#f0f8ff; border:1px solid #cfe4f7; }
.knowledge-safe-rich h3,.knowledge-safe-rich h4 { margin:12px 0 6px; color:var(--text); }
.knowledge-safe-rich p { margin:0 0 9px; }
.knowledge-safe-rich ul,.knowledge-safe-rich ol { margin:7px 0; padding-left:22px; }
.knowledge-safe-rich a { color:var(--primary); text-decoration:underline; overflow-wrap:anywhere; }
.knowledge-safe-rich u { text-underline-offset:2px; }
.knowledge-safe-rich .rich-divider { height:1px; margin:12px 0; background:var(--line); }
.notification-help { display:grid; gap:10px; margin-top:14px; padding:14px 15px; border:1px solid #fecdd3; border-radius:14px; color:#9f1239; background:#fff1f2; }
.notification-help[hidden] { display:none; }
.notification-help p { margin:0; font-size:.84rem; line-height:1.5; }
.notification-help-actions { display:flex; flex-wrap:wrap; gap:8px; }
.notification-help-actions button { min-height:38px; }
@media(max-width:760px){
    .knowledge-inline-body { padding:0 13px 15px; }
}

/* =========================================================
   VERSÃO 18.4 — AVISOS ADMINISTRATIVOS
========================================================= */
.administrative-notices-container { display:grid; gap:10px; margin-bottom:16px; }
.administrative-notices-container[hidden] { display:none; }
.administrative-notice-banner { display:grid; grid-template-columns:50px minmax(0,1fr) auto; gap:13px; align-items:center; padding:15px 16px; border:1px solid #cbdaf2; border-left:5px solid #3971d6; border-radius:17px; color:#173b6d; background:#f3f7ff; box-shadow:0 10px 24px rgba(37,80,145,.07); }
.administrative-notice-banner.notice-novelty { border-color:#ddcff8; border-left-color:#7f56d9; color:#56348b; background:#faf7ff; }
.administrative-notice-banner.notice-warning { border-color:#f5d8ad; border-left-color:#e69221; color:#74430d; background:#fff9ef; }
.administrative-notice-banner.notice-urgent { border-color:#f3c7c3; border-left-color:#d92d20; color:#8f2119; background:#fff5f4; }
.administrative-notice-icon { display:grid; place-items:center; width:50px; height:50px; border-radius:14px; color:currentColor; background:rgba(255,255,255,.72); }
.administrative-notice-icon .rotina-svg-icon { width:25px; height:25px; }
.administrative-notice-copy { min-width:0; }
.administrative-notice-copy > small { display:block; margin-bottom:2px; font-size:.68rem; font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
.administrative-notice-copy > strong { display:block; color:var(--text); font-size:1rem; }
.administrative-notice-message { color:inherit; font-size:.85rem; line-height:1.55; }
.administrative-notice-message p { margin:4px 0 0; }
.administrative-notice-message ul { margin:7px 0 0; padding-left:20px; }
.administrative-notice-message a { color:currentColor; text-decoration:underline; overflow-wrap:anywhere; }
.administrative-notice-actions { display:flex; align-items:center; gap:8px; }
.administrative-notice-actions .ghost { white-space:nowrap; }
.notice-dismiss { display:grid; place-items:center; width:34px; height:34px; border:0; border-radius:999px; color:currentColor; background:rgba(255,255,255,.72); font-size:22px; cursor:pointer; }
.administrative-notice-modal { padding:14px; border:1px solid #d7e1f0; border-left:5px solid #3971d6; border-radius:14px; color:#1e416f; background:#f5f8ff; }
.administrative-notice-modal.notice-novelty { border-left-color:#7f56d9; color:#57358c; background:#faf8ff; }
.administrative-notice-modal.notice-warning { border-left-color:#e69221; color:#74430d; background:#fffaf1; }
.administrative-notice-modal.notice-urgent { border-left-color:#d92d20; color:#8f2119; background:#fff6f5; }
.administrative-notice-modal-heading { display:flex; align-items:center; gap:9px; margin-bottom:7px; }
.administrative-notice-modal-heading > span { display:grid; place-items:center; width:38px; height:38px; border-radius:11px; background:rgba(255,255,255,.85); }
.administrative-notice-modal-heading .rotina-svg-icon { width:20px; height:20px; }
.administrative-notice-modal-heading small { font-weight:900; text-transform:uppercase; letter-spacing:.08em; }
@media(max-width:700px){
    .administrative-notice-banner { grid-template-columns:42px minmax(0,1fr); padding:13px; }
    .administrative-notice-icon { width:42px; height:42px; }
    .administrative-notice-actions { grid-column:2; justify-content:flex-start; flex-wrap:wrap; }
}


/* =========================================================
   VERSÃO 18.6 — BLOCOS DA BASE DE CONHECIMENTO
========================================================= */
.rich-divider { height:1px; margin:20px 0; background:var(--line); }
.knowledge-callout { display:grid; grid-template-columns:34px minmax(0,1fr); gap:10px; align-items:flex-start; padding:13px 14px; border:1px solid; border-radius:14px; }
.knowledge-callout-icon { display:grid; place-items:center; width:32px; height:32px; border-radius:10px; }
.knowledge-callout-icon .rotina-svg-icon { width:18px; height:18px; }
.knowledge-callout h4 { margin:1px 0 6px; font-size:.88rem; }
.knowledge-callout .knowledge-safe-rich p:last-child { margin-bottom:0; }
.knowledge-callout-success { color:#176b36; border-color:#a7ddb6; background:#effcf3; }
.knowledge-callout-success .knowledge-callout-icon { background:#d8f5e1; }
.knowledge-callout-danger { color:#9f2219; border-color:#f2b1ab; background:#fff2f1; }
.knowledge-callout-danger .knowledge-callout-icon { background:#fee4e2; }
.knowledge-callout-alert { color:#785000; border-color:#eed28a; background:#fff9e8; }
.knowledge-callout-alert .knowledge-callout-icon { background:#ffefbd; }
.knowledge-callout-info { color:#174f92; border-color:#b4d6f4; background:#eff8ff; }
.knowledge-callout-info .knowledge-callout-icon { background:#dcebff; }
.knowledge-callout-light { color:#3f4b5d; border-color:#d8dee7; background:#fbfcfe; }
.knowledge-callout-light .knowledge-callout-icon { background:#eef2f6; }
.knowledge-callout-dark { color:#f8fafc; border-color:#334155; background:#1f2937; }
.knowledge-callout-dark h4,.knowledge-callout-dark .knowledge-safe-rich h3,.knowledge-callout-dark .knowledge-safe-rich h4 { color:#fff; }
.knowledge-callout-dark .knowledge-callout-icon { color:#fff; background:#475569; }
.knowledge-callout-dark a { color:#bfdbfe; }
.knowledge-bullet-list { margin:8px 0; padding-left:23px; }
.knowledge-numbered-list { display:grid; gap:0; margin:10px 0; padding:0; list-style:none; counter-reset:knowledge-step; }
.knowledge-numbered-list li { position:relative; display:grid; grid-template-columns:38px minmax(0,1fr); gap:10px; align-items:start; min-height:48px; counter-increment:knowledge-step; }
.knowledge-numbered-list li::before { content:counter(knowledge-step); position:relative; z-index:2; display:grid; place-items:center; width:34px; height:34px; border-radius:999px; color:#fff; background:var(--primary); font-size:.78rem; font-weight:850; box-shadow:0 5px 12px rgba(36,72,180,.18); }
.knowledge-numbered-list li:not(:last-child)::after { content:""; position:absolute; left:16px; top:34px; bottom:0; width:2px; background:#d8e2f1; }
.knowledge-numbered-list li > span { padding:5px 0 13px; line-height:1.55; }
@media(max-width:720px){.knowledge-search-panel{align-items:stretch;flex-direction:column}.knowledge-stats{white-space:normal}.knowledge-detail-overlay{padding:10px}.knowledge-detail-modal{max-height:calc(100vh - 20px);border-radius:18px}.knowledge-detail-header{padding:17px}.knowledge-detail-scroll{padding:17px}.knowledge-detail-footer{padding:13px 17px}}
.content-image-block {
    margin: 22px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.content-image-block.align-left { align-items: flex-start; }
.content-image-block.align-center { align-items: center; }
.content-image-block.align-right { align-items: flex-end; }
.content-image-block img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid rgba(100, 116, 139, .2);
    background: #f3f5f9;
    cursor: zoom-in;
}
.content-image-block.size-small img { width: min(320px, 100%); }
.content-image-block.size-medium img { width: min(560px, 100%); }
.content-image-block.size-large img { width: min(860px, 100%); }
.content-image-block.size-full img { width: 100%; }
.content-image-block figcaption { max-width: 860px; color: var(--text-muted, #64748b); font-size: .9rem; line-height: 1.5; }
.content-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1500;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, .82);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
}
.content-image-lightbox.open { opacity: 1; visibility: visible; }
.content-image-lightbox figure { max-width: min(1200px, 100%); max-height: calc(100dvh - 48px); margin: 0; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.content-image-lightbox img { max-width: 100%; max-height: calc(100dvh - 110px); object-fit: contain; border-radius: 14px; background: white; }
.content-image-lightbox figcaption { color: white; text-align: center; }
.content-image-lightbox button { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: white; font-size: 1.6rem; cursor: pointer; }

/* 3.0.0-beta.5.7.1 — Base de Conhecimento: acabamento visual 18.8.2 */
.knowledge-header { align-items: flex-start; gap: 24px; }
.knowledge-search-panel,
.knowledge-featured,
.knowledge-browser { border-radius: 20px; }
.knowledge-search-panel { gap: 18px; }
.knowledge-featured-card,
.knowledge-card { min-width: 0; }
.knowledge-question,
.knowledge-procedure-open { align-items: center; }
.knowledge-card-copy { min-width: 0; }
.knowledge-detail-modal { overflow: hidden; }
.knowledge-detail-footer { gap: 12px; }
@media (max-width: 720px) {
  .knowledge-header,
  .knowledge-search-panel,
  .knowledge-section-heading,
  .knowledge-results-heading { align-items: stretch; }
  .knowledge-featured,
  .knowledge-browser { border-radius: 17px; }
}

/* 3.0.0-beta.5.9 — textos publicados da Mudança do Dia */
.new-day-no-routines {
  margin: 16px 0 0;
  padding: 15px 16px;
  border: 1px solid var(--rotina-line);
  border-radius: 14px;
  color: var(--rotina-text-soft);
  background: #fbfcff;
  line-height: 1.55;
}

/* =========================================================
   3.0.0-beta.5.9.1 — ROTINAS E BASE: CONSOLIDAÇÃO VISUAL
========================================================= */

/* A área deixa de reservar uma coluna fixa para textos explicativos. */
.routine-workspace.routine-workspace-single { display: grid; grid-template-columns: 1fr; gap: 20px; }
.routine-workspace-single .routine-carousel-panel { width: 100%; }
.routine-system-panel { border-color: #d8e3f7; background: linear-gradient(145deg,#fbfdff,#fff); }
.routine-system-panel .routine-carousel-header .eyebrow { margin-bottom: 4px; }
.routine-help-button { width: 44px; height: 44px; flex: 0 0 44px; }
.routine-help-button .ui-icon { width: 19px; height: 19px; }

/* Três rotinas por slide no desktop, duas em telas intermediárias e uma no celular. */
.routine-carousel-track { gap: 16px; }
.routine-carousel-track .routine-card { flex-basis: calc((100% - 32px) / 3); }
.routine-card { padding: 20px; }
.routine-card-head { gap: 10px; }
.routine-title-group { min-width: 0; }
.routine-title-group > div { min-width: 0; }
.routine-card-head h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Ajuda sob demanda. */
body.routine-help-open { overflow: hidden; }
.routine-help-layer { position: fixed; inset: 0; z-index: 3100; display: grid; place-items: center; padding: 22px; }
.routine-help-layer[hidden] { display: none; }
.routine-help-backdrop { position: absolute; inset: 0; border: 0; background: rgba(4,12,29,.6); backdrop-filter: blur(4px); }
.routine-help-dialog {
  position: relative;
  width: min(620px,100%);
  max-height: calc(100dvh - 44px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--rotina-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(4,12,29,.28);
}
.routine-help-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.routine-help-dialog h2 { margin: 3px 0 0; }
.routine-help-dialog > p { margin: 13px 0 18px; color: var(--rotina-text-soft); line-height: 1.6; }
.routine-help-dialog > footer { display: flex; justify-content: flex-end; margin-top: 20px; }
.routine-help-rules { grid-template-columns: repeat(2,minmax(0,1fr)); }

/* Conteúdos em destaque mais compactos. */
.knowledge-featured { padding-top: 18px; padding-bottom: 18px; }
.knowledge-featured-card {
  min-height: 112px;
  padding: 15px 17px;
  grid-template-columns: 42px minmax(0,1fr) auto;
  gap: 12px;
}
.knowledge-featured-card .knowledge-card-icon { width: 40px; height: 40px; border-radius: 12px; }
.knowledge-featured-card .knowledge-featured-copy { gap: 3px; }
.knowledge-featured-card .knowledge-featured-copy small { font-size: .68rem; }
.knowledge-featured-card .knowledge-featured-copy strong { font-size: .91rem; line-height: 1.28; }
.knowledge-featured-card .knowledge-featured-copy > span:last-child { font-size: .76rem; -webkit-line-clamp: 2; }
.knowledge-carousel-dots { margin-top: 10px; }

@media (max-width: 1180px) {
  .routine-carousel-track .routine-card { flex-basis: calc((100% - 16px) / 2); }
}
@media (max-width: 760px) {
  .routine-carousel-track .routine-card { flex-basis: 100%; }
  .routine-help-rules { grid-template-columns: 1fr; }
  .knowledge-featured-card { min-height: 108px; }
}


/* =========================================================
   3.0.0-beta.5.9.3 — MOBILE DE ROTINAS, DESTAQUES E AGENDA
========================================================= */

/* Conteúdos em destaque assumem definitivamente o papel de acesso rápido. */
.knowledge-featured {
  padding: 15px 17px;
}
.knowledge-featured .knowledge-section-heading { margin-bottom: 12px; }
.knowledge-featured-card {
  min-height: 88px;
  max-width: 680px;
  padding: 12px 14px;
  grid-template-columns: 36px minmax(0,1fr) 18px;
  gap: 10px;
  border-radius: 15px;
}
.knowledge-featured-card .knowledge-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}
.knowledge-featured-card .knowledge-featured-copy { gap: 2px; }
.knowledge-featured-card .knowledge-featured-copy small { font-size: .64rem; }
.knowledge-featured-card .knowledge-featured-copy strong { font-size: .86rem; }
.knowledge-featured-card .knowledge-featured-copy > span:last-child {
  font-size: .72rem;
  -webkit-line-clamp: 1;
}

@media (max-width: 650px) {
  .routine-page-heading .page-heading-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0,1fr) 44px;
    gap: 10px;
  }
  .routine-page-heading .page-heading-actions .button {
    width: 100%;
    grid-column: 1;
    grid-row: 1;
  }
  .routine-page-heading .routine-help-button {
    grid-column: 2;
    grid-row: 1;
    width: 44px;
    height: 44px;
  }
  .routine-metrics {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
  }
  .routine-metrics .metric-card {
    min-height: 108px;
    padding: 13px;
    grid-template-columns: 34px minmax(0,1fr);
    column-gap: 9px;
  }
  .routine-metrics .metric-card .metric-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .routine-metrics .metric-card > span:not(.metric-icon) { font-size: .58rem; }
  .routine-metrics .metric-card strong { font-size: 1.28rem; }
  .routine-metrics .metric-card small { font-size: .6rem; line-height: 1.25; }
  .knowledge-featured { padding: 14px; }
  .knowledge-featured-card { min-height: 84px; max-width: none; }
}
@media (max-width: 370px) {
  .routine-metrics { grid-template-columns: 1fr; }
}

/* 3.0.0-beta.5.9.4 — rolagem discreta do menu do aplicativo */
.app-sidebar{height:100vh;min-height:100vh;overflow:hidden}
.app-logo-lockup,.app-sidebar>.sidebar-close{flex:0 0 auto}.app-nav{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;margin-right:-7px;padding-right:7px;padding-bottom:14px;scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}.app-nav::-webkit-scrollbar{width:7px}.app-nav::-webkit-scrollbar-track{background:transparent}.app-nav::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:999px;background:#cbd5e1;background-clip:padding-box}.app-nav:hover::-webkit-scrollbar-thumb{background:#94a3b8;background-clip:padding-box}.app-sidebar-bottom{flex:0 0 auto;margin-top:0;background:#fff}
@media(max-width:980px){.app-sidebar{height:100dvh;min-height:100dvh}}

/* =========================================================
   3.0.0-beta.5.9.5 — RODAPÉ COMPACTO DO APLICATIVO
========================================================= */
.app-sidebar-bottom{gap:6px!important;padding-top:10px!important}
.app-user-mini{padding:0 4px!important}.app-user-mini strong{font-size:.76rem}.app-user-mini small{margin-top:1px;font-size:.62rem}
.app-sidebar-version{padding:0 4px;font-size:.58rem!important}
.app-sidebar-session{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;padding:5px 0 0!important;border-top:0!important}
.app-sidebar-action{min-height:34px;padding:7px 8px;border:1px solid #dfe5ef;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;gap:6px;color:#46546b;background:#fff;font-size:.68rem;font-weight:800;text-decoration:none}
.app-sidebar-action:hover{color:var(--rotina-primary);border-color:#bac3f1;background:#f5f6ff}
.app-sidebar-action .ui-icon{width:14px;height:14px}
.app-sidebar-session>.app-sidebar-action:only-child{grid-column:1/-1}

/* Beta 5.9.7 — Configurações, ações e componentes do aplicativo */
.app-settings-tabs {
  display: flex;
  gap: 8px;
  padding: 8px;
  overflow-x: auto;
  background: var(--surface, #fff);
  border: 1px solid var(--border-color, #dce3ef);
  border-radius: 18px;
  margin-bottom: 22px;
  scrollbar-width: thin;
}
.app-settings-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 13px;
  color: var(--text-muted);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.app-settings-tabs a.is-active { background: var(--primary, #5144e5); color: #fff; box-shadow: 0 10px 24px rgba(81,68,229,.18); }
.settings-tab-panel { max-width: 1060px; }
.settings-tab-panel .panel { margin-bottom: 20px; }
.settings-section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.settings-section-grid > * { min-width: 0; }
.custom-file-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px;
  border: 1px solid var(--border-color, #dce3ef);
  border-radius: 14px;
  background: var(--surface, #fff);
}
.custom-file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.custom-file-picker .button { flex: 0 0 auto; }
.custom-file-picker-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.today-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.today-action-help {
  width: 44px;
  min-width: 44px;
  padding: 0 !important;
  justify-content: center;
}
.today-actions-help-layer[hidden] { display: none !important; }
.today-actions-help-layer { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; padding: 20px; }
.today-actions-help-backdrop { position: absolute; inset: 0; background: rgba(20,28,47,.58); backdrop-filter: blur(4px); }
.today-actions-help-dialog { position: relative; width: min(560px, 100%); background: #fff; border-radius: 24px; padding: 26px; box-shadow: 0 28px 80px rgba(15,23,42,.25); }
.today-help-items { display: grid; gap: 12px; margin: 20px 0; }
.today-help-item { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 14px; background: #f7f8fc; border: 1px solid #e1e6f0; border-radius: 16px; }
.today-help-item > span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: #eef0ff; color: var(--primary, #5144e5); }
.today-help-item strong, .today-help-item small { display: block; }
.today-help-item small { margin-top: 4px; color: var(--text-muted); line-height: 1.45; }
.app-page .button,
.app-shell .button {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 14px;
  gap: 8px;
  font-size: .94rem;
  line-height: 1.1;
}
.app-page .button.button-small,
.app-shell .button.button-small { min-height: 38px; padding: 8px 13px; font-size: .86rem; border-radius: 12px; }
.system-routine-badge { font-size: .78rem; }
.routine-card-toggle > span:last-child { white-space: nowrap; }
@media (max-width: 760px) {
  .settings-section-grid { grid-template-columns: 1fr; }
  .today-heading-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) 44px; width: 100%; }
  .today-heading-actions .button { width: 100%; padding-inline: 10px; }
}
@media (max-width: 430px) {
  .app-settings-tabs a { padding-inline: 11px; }
  .today-heading-actions { grid-template-columns: minmax(0,1fr) minmax(0,1fr) 42px; gap: 7px; }
  .today-heading-actions .button { font-size: .82rem; }
}


/* ROTINA 3.0.0-beta.5.9.8 — acabamento das Configurações */
.settings-tab-panel { max-width:none; }
.settings-panel { padding:30px; }
.settings-panel .panel-heading { margin-bottom:24px; padding-bottom:18px; border-bottom:1px solid var(--border-color,#dce3ef); }
.settings-panel .panel-heading .eyebrow { margin-bottom:7px; }
.settings-panel .field { display:flex; flex-direction:column; gap:8px; min-width:0; }
.settings-panel .field > label { margin:0; line-height:1.25; }
.settings-panel input:not([type=checkbox]):not([type=radio]):not([type=range]),
.settings-panel select { width:100%; min-height:48px; padding:10px 14px; box-sizing:border-box; }
.settings-panel .help-text { margin-top:2px; line-height:1.45; }
.settings-panel .form-actions { margin-top:24px; padding-top:20px; border-top:1px solid var(--border-color,#dce3ef); }
.settings-control-group .button { margin-top:8px; align-self:flex-start; }
.notification-permission { margin:14px 0 22px; }
.backup-mode { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:24px 0 0; padding:18px; border:1px solid var(--border-color,#dce3ef); border-radius:16px; }
.backup-mode legend { padding:0 8px; font-weight:800; }
.backup-mode label { display:flex; align-items:flex-start; gap:10px; padding:14px; border:1px solid var(--border-color,#dce3ef); border-radius:14px; background:#fafbfe; }
.backup-mode label > span { display:flex; flex-direction:column; gap:4px; }
.backup-mode label small { color:var(--text-muted); line-height:1.4; }
@media(max-width:760px){.settings-panel{padding:22px 18px}.backup-mode{grid-template-columns:1fr}}

/* =========================================================
   ROTINA 3.0.0-beta.5.9.11 — MODAL GLOBAL DE AVISOS
========================================================= */
.administrative-notice-layer{position:fixed;inset:0;z-index:1700;display:grid;place-items:center;padding:24px}.administrative-notice-layer[hidden]{display:none}.administrative-notice-backdrop{position:absolute;inset:0;border:0;background:rgba(12,19,36,.66);backdrop-filter:blur(6px)}.administrative-notice-dialog{position:relative;width:min(650px,calc(100vw - 36px));padding:24px;border:1px solid #d6e0ef;border-left:6px solid #3971d6;border-radius:24px;color:#234675;background:#fff;box-shadow:0 32px 90px rgba(15,23,42,.34)}.administrative-notice-dialog.notice-novelty{border-left-color:#7f56d9;color:#57358c}.administrative-notice-dialog.notice-warning{border-left-color:#e69221;color:#74430d}.administrative-notice-dialog.notice-urgent{border-left-color:#d92d20;color:#8f2119}.administrative-notice-dialog>header{display:grid;grid-template-columns:50px minmax(0,1fr);gap:13px;align-items:center}.administrative-notice-dialog>header>span{display:grid;place-items:center;width:50px;height:50px;border-radius:14px;color:currentColor;background:#f1f5fb}.administrative-notice-dialog>header .ui-icon{width:25px;height:25px}.administrative-notice-dialog>header p,.administrative-notice-dialog>header h2{margin:0}.administrative-notice-dialog>header h2{color:var(--text);font-size:1.45rem}.administrative-notice-dialog-message{margin-top:16px;color:inherit;line-height:1.65}.administrative-notice-dialog-message p{margin:0 0 10px}.administrative-notice-dialog-message ul{margin:8px 0;padding-left:23px}.administrative-notice-dialog-message a{color:currentColor;text-decoration:underline;overflow-wrap:anywhere}.administrative-notice-dialog>footer{display:flex;justify-content:flex-end;gap:10px;margin-top:21px;padding-top:16px;border-top:1px solid var(--line)}
@media(max-width:620px){.administrative-notice-layer{padding:12px}.administrative-notice-dialog{width:100%;padding:19px;border-radius:20px}.administrative-notice-dialog>header{grid-template-columns:43px minmax(0,1fr)}.administrative-notice-dialog>header>span{width:43px;height:43px}.administrative-notice-dialog>footer{align-items:stretch;flex-direction:column-reverse}.administrative-notice-dialog>footer .button{width:100%}}

/* Ajuda do ROTINA — Beta 5.9.12 */
.knowledge-editor-action{margin-top:20px;padding:18px;border:1px solid var(--border,#dbe3f0);border-radius:18px;background:rgba(247,249,255,.75)}
.knowledge-detail-action{display:flex;justify-content:flex-end;margin-top:22px;padding-top:18px;border-top:1px solid var(--border,#dbe3f0)}


/* =========================================================
   BETA 5.9.12.1 — AJUDA E AVISOS NA VISÃO INICIAL
========================================================= */
.overview-notices { margin: 0 0 20px; }
.knowledge-filter-bar {
    flex-wrap: wrap;
    overflow: visible;
    scrollbar-width: none;
}
.knowledge-filter-bar::-webkit-scrollbar { display: none; }
.knowledge-filter { max-width: 100%; }
.knowledge-filter > span:first-child { display: inline-grid; place-items: center; flex: 0 0 auto; }
.knowledge-filter-svg,
.knowledge-filter .rotina-text-icon { width: 1rem; height: 1rem; }
@media (max-width: 760px) {
    .knowledge-filter-bar { flex-wrap: nowrap; overflow-x: auto; padding: 2px 0 8px; scroll-snap-type: x proximity; }
    .knowledge-filter { scroll-snap-align: start; }
}

/* =========================================================
   ROTINA 3.0.0-beta.5.9.12.2 — VISÃO GERAL
========================================================= */
.overview-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.overview-page-heading > div { min-width: 0; }
.overview-page-heading h1 { margin-bottom: 7px; }
.overview-page-heading p:not(.eyebrow) { max-width: 780px; }
.overview-date {
  flex: 0 0 auto;
  margin-bottom: 4px;
  padding: 9px 13px;
  border: 1px solid var(--rotina-line);
  border-radius: 999px;
  color: var(--rotina-text-soft);
  background: rgba(255,255,255,.78);
  font-size: .72rem;
  font-weight: 760;
  text-transform: capitalize;
}
.overview-command-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1.05fr) minmax(400px,.95fr);
  gap: 30px;
  align-items: center;
  margin-bottom: 20px;
  padding: clamp(24px,3vw,34px);
  overflow: hidden;
  border-radius: 25px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 8%,rgba(132,148,255,.34),transparent 26%),
    linear-gradient(135deg,#0a1733 0%,#173a7b 100%);
  box-shadow: 0 20px 45px rgba(13,31,72,.18);
}
.overview-command-card::after {
  content: "";
  position: absolute;
  right: -110px;
  bottom: -170px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(255,255,255,.023),0 0 0 104px rgba(255,255,255,.014);
  pointer-events: none;
}
.overview-command-copy,
.overview-summary-grid { position: relative; z-index: 1; min-width: 0; }
.overview-command-copy .eyebrow { color: #9eabff; }
.overview-command-copy h2 {
  margin: 5px 0 10px;
  color: #fff;
  font-size: clamp(2rem,4vw,3rem);
  letter-spacing: -.055em;
}
.overview-command-copy > p:not(.eyebrow) {
  max-width: 600px;
  margin: 0;
  color: #c7d2ea;
  line-height: 1.65;
}
.overview-command-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.overview-command-actions .button-primary { color: #2f2a9a; background: #fff; box-shadow: 0 11px 25px rgba(0,0,0,.13); }
.overview-command-actions .button-secondary { color: #fff; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); }
.overview-command-actions .button-secondary:hover { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.14); }
.overview-summary-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}
.overview-summary-item {
  min-width: 0;
  min-height: 77px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  color: #fff;
  background: rgba(255,255,255,.085);
  text-decoration: none;
  transition: transform .18s ease,background .18s ease,border-color .18s ease;
}
.overview-summary-item:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.13); }
.overview-summary-item > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #dce2ff;
  background: rgba(255,255,255,.1);
}
.overview-summary-item .ui-icon { width: 18px; height: 18px; }
.overview-summary-item strong,.overview-summary-item small { display: block; }
.overview-summary-item strong { font-size: 1.08rem; }
.overview-summary-item small { margin-top: 3px; color: #c8d3e9; font-size: .7rem; line-height: 1.25; }
.overview-summary-item.is-danger > span { color: #ffd9d6; background: rgba(255,91,80,.18); }
.overview-progress {
  grid-column: 1/-1;
  padding: 13px 14px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  background: rgba(255,255,255,.075);
}
.overview-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #d4ddf0; font-size: .72rem; font-weight: 740; }
.overview-progress > div strong { color: #fff; font-size: .9rem; }
.overview-progress-track { display: block; height: 7px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.14); }
.overview-progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#9aa8ff,#fff); transition: width .25s ease; }
.overview-notices { margin: 0 0 20px; }
.overview-thought-card { margin-bottom: 20px; padding: 22px 25px; }
.overview-access-panel { margin-top: 0; }
.overview-quick-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
@media (max-width: 1120px) {
  .overview-command-card { grid-template-columns: 1fr; }
  .overview-summary-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .overview-progress { grid-column: 1/-1; }
  .overview-quick-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .overview-page-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .overview-date { margin: 0; }
  .overview-command-card { padding: 22px 18px; border-radius: 21px; }
  .overview-command-actions,.overview-command-actions .button { width: 100%; }
  .overview-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .overview-quick-grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .overview-summary-grid { grid-template-columns: 1fr 1fr; }
  .overview-summary-item { grid-template-columns: 32px minmax(0,1fr); min-height: 70px; padding: 10px; }
  .overview-summary-item > span { width: 32px; height: 32px; }
  .overview-thought-card { padding: 18px 15px; }
}

/* ROTINA 3.0.0-beta.5.9.12.3 — ações locais sem saltos de rolagem. */
.today-task-item.task-row-updated {
  animation: rotina-task-updated .8s ease;
}
@keyframes rotina-task-updated {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, .26); }
  45% { box-shadow: 0 0 0 5px rgba(79, 70, 229, .12); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}
button.is-submitting,
form[aria-busy="true"] button[type="submit"] {
  cursor: progress;
}
button.is-submitting::after {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  display: inline-block;
  margin-left: 7px;
  vertical-align: -2px;
  animation: rotina-submit-spin .7s linear infinite;
}
@keyframes rotina-submit-spin { to { transform: rotate(360deg); } }

/* ROTINA 3.0.0 Beta — notificações, atualização do PWA e segurança. */
.notification-runtime-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin:0 0 18px; }
.notification-runtime-card { min-height:150px; padding:18px; border:1px solid #dfe5ee; border-radius:18px; display:flex; align-items:flex-start; gap:14px; background:linear-gradient(145deg,#fbfcff,#f3f6ff); }
.notification-runtime-card > span { width:46px; height:46px; flex:0 0 46px; border-radius:14px; display:grid; place-items:center; color:var(--rotina-primary); background:#fff; box-shadow:var(--rotina-shadow-card); }
.notification-runtime-card > span .ui-icon { width:22px; height:22px; }
.notification-runtime-card small,.notification-runtime-card strong { display:block; }
.notification-runtime-card small { color:var(--rotina-text-soft); font-size:.7rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.notification-runtime-card strong { margin-top:5px; color:var(--rotina-text); line-height:1.35; }
.notification-runtime-card p { margin:8px 0 12px; color:var(--rotina-text-soft); font-size:.78rem; line-height:1.55; }
.notification-recovery-box { margin:18px 0; padding:16px; border:1px solid #dfe5ee; border-radius:18px; background:#f8faff; }
.notification-recovery-box .switch-row { margin:0 0 15px; }
.notification-recovery-box .field { margin:0; }
.task-reminder-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
.task-reminder-runtime-note { grid-column:1/-1; margin:0; padding:10px 12px; border-radius:12px; display:flex; align-items:center; gap:8px; color:#46536a; background:#fff; font-size:.72rem; line-height:1.45; }
.task-reminder-runtime-note .ui-icon { width:16px; height:16px; color:var(--rotina-primary); }

.global-reminder-center { position:fixed; right:22px; bottom:22px; z-index:5200; width:min(420px,calc(100vw - 32px)); border:1px solid rgba(151,164,190,.45); border-radius:22px; overflow:hidden; background:rgba(255,255,255,.98); box-shadow:0 26px 70px rgba(12,23,48,.26); backdrop-filter:blur(14px); }
.global-reminder-center[hidden] { display:none; }
.global-reminder-center-heading { min-height:54px; padding:11px 14px 11px 17px; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:9px; color:#fff; background:linear-gradient(135deg,#4338ca,#6366f1); }
.global-reminder-center-heading span { font-size:.62rem; font-weight:900; letter-spacing:.13em; }
.global-reminder-center-heading strong { font-size:.86rem; }
.global-reminder-center-heading button { width:32px; height:32px; border:1px solid rgba(255,255,255,.25); border-radius:10px; color:#fff; background:rgba(255,255,255,.12); font-size:1rem; cursor:pointer; }
.global-reminder-list { max-height:min(68vh,560px); overflow:auto; padding:10px; display:grid; gap:9px; }
.global-reminder-center.is-minimized .global-reminder-list { display:none; }
.global-reminder-card { padding:14px; border:1px solid #e0e5ef; border-radius:16px; display:grid; grid-template-columns:42px minmax(0,1fr); gap:11px; background:#fff; box-shadow:0 8px 24px rgba(31,41,67,.08); }
.global-reminder-card[aria-busy="true"] { opacity:.72; }
.global-reminder-card-icon { width:42px; height:42px; border-radius:13px; display:grid; place-items:center; color:#fff; background:linear-gradient(145deg,#6366f1,#4f46e5); }
.global-reminder-card-icon .ui-icon { width:20px; height:20px; }
.global-reminder-card-copy { min-width:0; }
.global-reminder-card-copy small,.global-reminder-card-copy strong,.global-reminder-card-copy span { display:block; }
.global-reminder-card-copy small { color:#dc2626; font-size:.67rem; font-weight:850; text-transform:uppercase; letter-spacing:.045em; }
.global-reminder-card-copy strong { margin-top:3px; overflow:hidden; color:#172033; font-size:.93rem; line-height:1.35; text-overflow:ellipsis; }
.global-reminder-card-copy span { margin-top:5px; color:#667085; font-size:.71rem; line-height:1.4; }
.global-reminder-actions { grid-column:1/-1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
.global-reminder-actions button { min-height:36px; padding:7px 8px; border:1px solid #dbe1eb; border-radius:10px; color:#38435a; background:#f8f9fc; font-size:.68rem; font-weight:800; cursor:pointer; }
.global-reminder-actions button:hover { color:#312e81; border-color:#aeb8f5; background:#eef0ff; }
.global-reminder-actions button[data-reminder-action="complete"] { color:#166534; border-color:#bbf7d0; background:#f0fdf4; }
.global-reminder-actions button.quiet { color:#697386; background:#fff; }

.agenda-reminder-diagnostic { margin-bottom:16px; padding:15px 17px; display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:center; gap:13px; }
.agenda-reminder-diagnostic > span { width:44px; height:44px; border-radius:13px; display:grid; place-items:center; color:var(--rotina-primary); background:var(--rotina-primary-soft); }
.agenda-reminder-diagnostic strong { display:block; }
.agenda-reminder-diagnostic p { margin:4px 0 0; color:var(--rotina-text-soft); font-size:.78rem; line-height:1.45; }
.agenda-reminder-state { margin-left:auto; padding:5px 9px; border-radius:999px; white-space:nowrap; color:#475569; background:#eef2f7; font-size:.65rem; font-weight:850; }
.agenda-reminder-state.is-active { color:#1d4ed8; background:#dbeafe; }
.agenda-reminder-state.is-snoozed { color:#6d28d9; background:#ede9fe; }
.agenda-reminder-state.is-late { color:#b91c1c; background:#fee2e2; }
.agenda-reminder-state.is-presented { color:#9a3412; background:#ffedd5; }
.agenda-reminder-state.is-done,.agenda-reminder-state.is-acknowledged { color:#166534; background:#dcfce7; }
.agenda-item-copy { min-width:0; }

@media (max-width:760px) {
  .notification-runtime-grid { grid-template-columns:1fr; }
  .global-reminder-center { right:12px; bottom:12px; width:calc(100vw - 24px); }
  .global-reminder-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .agenda-reminder-diagnostic { grid-template-columns:42px minmax(0,1fr); }
  .agenda-reminder-diagnostic .button { grid-column:1/-1; width:100%; }
  .agenda-reminder-state { grid-column:2; justify-self:start; margin-left:0; }
}
.agenda-item { grid-template-columns:40px minmax(0,1fr) auto; }
@media (max-width:560px) {
  .agenda-item { grid-template-columns:40px minmax(0,1fr); }
}

.notification-runtime-card.notification-update-card { grid-column:1/-1; min-height:unset; }
.notification-runtime-actions { display:flex; flex-wrap:wrap; gap:8px; }
.notification-runtime-actions .button[hidden] { display:none; }
.notification-update-card[data-update-ready="true"] { border-color:#a9b8ff; background:linear-gradient(145deg,#f8f9ff,#eef1ff); }
@media (max-width:760px) { .notification-runtime-card.notification-update-card { grid-column:auto; } .notification-runtime-actions .button { width:100%; } }

/* ROTINA 3.0.0-beta.3 — API editorial resiliente para Base de Conhecimento e Ajuda. */
.notification-runtime-grid-single { grid-template-columns:minmax(0,1fr); }
.notification-runtime-grid-single .notification-runtime-card { min-height:132px; }
.application-runtime-grid { margin-bottom:18px; }
.application-runtime-grid .notification-runtime-card { min-height:190px; }
.application-runtime-grid .notification-runtime-actions { display:flex; flex-wrap:wrap; gap:9px; }
@media (max-width:760px) {
  .application-runtime-grid { grid-template-columns:1fr; }
}
.application-runtime-grid .notification-update-card { grid-column:auto; min-height:190px; }
.settings-optional-label { color:var(--rotina-text-soft); font-size:.72rem; font-weight:600; }

/* ROTINA 3.0.0-beta.5 — Atlas 0.1.0 */
.atlas-page-heading{align-items:flex-start}.atlas-version-badge{display:inline-flex;align-items:center;min-height:36px;padding:0 14px;border:1px solid #cbd5ff;border-radius:999px;background:#f2f4ff;color:#4338ca;font-size:13px;font-weight:800;white-space:nowrap}.atlas-subnav{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 20px}.atlas-subnav a{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border:1px solid var(--line,#dbe3ef);border-radius:999px;background:#fff;color:#475569;font-weight:750;text-decoration:none}.atlas-subnav a.is-active{border-color:#aab5ff;background:#eef1ff;color:#4338ca}.atlas-subnav svg{width:17px;height:17px}.atlas-metrics{margin-bottom:20px}.atlas-map-panel{padding:20px}.atlas-map-toolbar{display:grid;grid-template-columns:minmax(240px,1.05fr) minmax(240px,1fr) auto;gap:14px;align-items:end;margin-bottom:18px}.atlas-map-toolbar .field{margin:0}.atlas-search-control{position:relative;display:flex;align-items:center}.atlas-search-control>svg{position:absolute;left:14px;width:18px;height:18px;color:#64748b;pointer-events:none}.atlas-search-control input{width:100%;padding-left:42px}.atlas-map-status{display:flex;align-items:center;gap:8px;min-height:46px;padding:0 4px;color:#53647f;font-size:13px;font-weight:700}.atlas-status-dot{width:9px;height:9px;border-radius:50%;background:#27b47e;box-shadow:0 0 0 5px rgba(39,180,126,.1)}.atlas-map-status.is-loading .atlas-status-dot{background:#5b5cf0;animation:atlasPulse 1.15s infinite}.atlas-map-status.is-error{color:#b42318}.atlas-map-status.is-error .atlas-status-dot{background:#dc2626;box-shadow:0 0 0 5px rgba(220,38,38,.09)}@keyframes atlasPulse{50%{transform:scale(.72);opacity:.55}}
.atlas-map-layout{display:grid;grid-template-columns:minmax(210px,260px) minmax(440px,1fr) minmax(280px,340px);gap:16px;align-items:stretch}.atlas-legend-card,.atlas-municipality-panel{border:1px solid #dde5f1;border-radius:20px;background:#f8faff;min-width:0}.atlas-legend-card{padding:18px;max-height:760px;overflow:auto}.atlas-card-heading h2{margin:2px 0 0;font-size:20px}.atlas-layer-description{margin:8px 0 16px;color:#64748b;font-size:13px;line-height:1.55}.atlas-legend-list{display:grid;gap:8px}.atlas-legend-item{display:flex;align-items:flex-start;gap:10px;padding:10px;border-radius:12px;background:#fff;border:1px solid #e5eaf3}.atlas-legend-item i{width:14px;height:14px;border-radius:4px;background:var(--atlas-swatch);margin-top:2px;box-shadow:inset 0 0 0 1px rgba(15,23,42,.12);flex:0 0 auto}.atlas-legend-item span{display:grid;gap:2px;min-width:0}.atlas-legend-item strong{font-size:12px;line-height:1.25}.atlas-legend-item small{color:#7a8aa3;font-size:11px;line-height:1.35}.atlas-legend-item.is-muted{opacity:.82}
.atlas-map-stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:620px;overflow:hidden;border:1px solid #dde5f1;border-radius:22px;background:radial-gradient(circle at 55% 40%,#fff 0,#f4f7ff 62%,#eef3fa 100%)}.atlas-map-svg{display:block;width:100%;height:auto;max-height:760px;filter:drop-shadow(0 10px 25px rgba(32,50,86,.08))}.atlas-municipality-shape{stroke:#fff;stroke-width:.9;vector-effect:non-scaling-stroke;cursor:pointer;transition:opacity .16s ease,filter .16s ease,stroke-width .16s ease}.atlas-municipality-shape:hover,.atlas-municipality-shape.is-keyboard-focus{filter:brightness(.94);stroke:#1e293b;stroke-width:1.6;outline:none}.atlas-municipality-shape.is-selected{stroke:#111827;stroke-width:3;filter:brightness(.92) drop-shadow(0 2px 5px rgba(15,23,42,.28))}.atlas-municipality-shape.is-unmatched{fill:#edf1f6;cursor:default}.atlas-map-loading{position:absolute;inset:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;text-align:center;border-radius:18px;background:rgba(248,250,255,.93);backdrop-filter:blur(4px);color:#667892;z-index:4}.atlas-map-loading[hidden]{display:none}.atlas-map-loading>svg{width:38px;height:38px;color:#5654eb}.atlas-map-loading strong{color:#172033;font-size:17px}.atlas-map-loading span{max-width:440px;font-size:13px;line-height:1.55}.atlas-map-loading.is-error strong{color:#b42318}.atlas-map-tooltip{position:absolute;z-index:8;max-width:230px;padding:9px 11px;border-radius:10px;background:#111827;color:#fff;pointer-events:none;box-shadow:0 12px 30px rgba(15,23,42,.24);font-size:12px}.atlas-map-tooltip strong,.atlas-map-tooltip span{display:block}.atlas-map-tooltip span{margin-top:2px;color:#cbd5e1;font-size:11px;line-height:1.35}
.atlas-municipality-panel{padding:18px;max-height:760px;overflow:auto}.atlas-detail-empty{min-height:230px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;color:#667892}.atlas-detail-empty>span>svg,.atlas-detail-empty>svg{width:34px;height:34px;color:#5b5cf0}.atlas-detail-empty h2{margin:10px 0 5px;color:#152039;font-size:18px}.atlas-detail-empty p{margin:0;max-width:270px;font-size:13px;line-height:1.55}.atlas-detail-empty.is-error h2{color:#b42318}.atlas-inline-loader{width:28px;height:28px;border:3px solid #dce3ef;border-top-color:#5556ea;border-radius:50%;animation:atlasSpin .8s linear infinite}@keyframes atlasSpin{to{transform:rotate(360deg)}}.atlas-detail-heading,.atlas-municipality-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:15px;border-bottom:1px solid #e0e6f0}.atlas-detail-heading h2,.atlas-municipality-heading h2{margin:2px 0 3px;font-size:22px}.atlas-detail-heading p:last-child,.atlas-municipality-heading p:last-child{margin:0;color:#6b7d97;font-size:12px}.button.button-small{min-height:36px;padding:0 11px;font-size:12px}.atlas-domain-stack{display:grid;gap:12px;margin-top:14px}.atlas-domain-card{padding:13px;border:1px solid #e0e6f0;border-radius:14px;background:#fff}.atlas-domain-card h3{margin:0 0 9px;font-size:14px}.atlas-detail-layer-list{display:grid;gap:8px}.atlas-detail-layer{display:grid;gap:5px;padding-top:8px;border-top:1px dashed #e1e6ef}.atlas-detail-layer:first-child{padding-top:0;border-top:0}.atlas-detail-layer span{display:grid;gap:2px}.atlas-detail-layer strong{font-size:12px;color:#435069}.atlas-detail-layer small{font-size:10px;color:#8996aa}.atlas-detail-layer b{font-size:12px;line-height:1.4;color:#16213a}
.atlas-consult-panel{margin-bottom:18px}.atlas-municipality-search-form{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end}.atlas-municipality-search-form .field{margin:0}.atlas-consult-layout{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(480px,1.2fr);gap:18px}.atlas-results-panel,.atlas-detail-page-panel{min-width:0}.atlas-municipality-list{display:grid;gap:7px;max-height:720px;overflow:auto;padding-right:3px}.atlas-municipality-row{display:grid;grid-template-columns:38px minmax(0,1fr) 18px;gap:9px;align-items:center;padding:11px;border:1px solid #e0e6f0;border-radius:13px;background:#fff;color:#18233a;text-decoration:none}.atlas-municipality-row:hover,.atlas-municipality-row.is-active{border-color:#aab5ff;background:#f2f4ff}.atlas-municipality-pin{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#eef1ff;color:#514ce8}.atlas-municipality-pin svg{width:16px;height:16px}.atlas-municipality-row>span:nth-child(2){display:grid;gap:2px;min-width:0}.atlas-municipality-row strong{font-size:13px}.atlas-municipality-row small{overflow:hidden;text-overflow:ellipsis;color:#7888a0;font-size:11px;white-space:nowrap}.atlas-municipality-row>svg{width:14px;color:#8a99ad}.atlas-detail-page-panel .atlas-domain-card{background:#f9fbff}
.atlas-domain-catalog{display:grid;gap:18px}.atlas-layer-domain-panel{min-width:0}.atlas-layer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.atlas-layer-card{display:flex;flex-direction:column;gap:12px;padding:16px;border:1px solid #e0e6f0;border-radius:16px;background:#fff}.atlas-layer-card-head{display:flex;align-items:flex-start;gap:11px}.atlas-layer-card-head>span{display:grid;place-items:center;width:38px;height:38px;flex:0 0 auto;border-radius:11px;background:#eef1ff;color:#514ce8}.atlas-layer-card-head svg{width:18px;height:18px}.atlas-layer-card-head>div{display:grid;gap:2px}.atlas-layer-card-head strong{font-size:14px;line-height:1.3}.atlas-layer-card-head small{color:#8491a5;font-size:10px}.atlas-layer-card>p{margin:0;color:#667892;font-size:12px;line-height:1.5;flex:1}.atlas-layer-stats{display:flex;gap:8px;flex-wrap:wrap}.atlas-layer-stats span{padding:7px 9px;border-radius:9px;background:#f5f7fb;color:#697a93;font-size:10px}.atlas-layer-stats b{color:#283650}.atlas-layer-card .button{align-self:flex-start}
@media (max-width:1280px){.atlas-map-layout{grid-template-columns:220px minmax(430px,1fr)}.atlas-municipality-panel{grid-column:1/-1;max-height:none}.atlas-detail-empty{min-height:150px}.atlas-layer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:900px){.atlas-map-toolbar{grid-template-columns:1fr 1fr}.atlas-map-status{grid-column:1/-1}.atlas-map-layout{grid-template-columns:1fr}.atlas-legend-card{max-height:310px}.atlas-map-stage{min-height:480px}.atlas-consult-layout{grid-template-columns:1fr}.atlas-layer-grid{grid-template-columns:1fr}.atlas-municipality-list{max-height:420px}}@media (max-width:640px){.atlas-page-heading{display:grid;gap:10px}.atlas-version-badge{justify-self:start}.atlas-map-panel{padding:12px}.atlas-map-toolbar{grid-template-columns:1fr}.atlas-map-status{grid-column:auto}.atlas-map-stage{min-height:390px;border-radius:16px}.atlas-map-svg{min-width:470px}.atlas-map-stage{overflow:auto}.atlas-municipality-search-form{grid-template-columns:1fr}.atlas-municipality-search-form .button{width:100%}.atlas-detail-heading,.atlas-municipality-heading{display:grid}.atlas-detail-heading .button,.atlas-municipality-heading .button{justify-self:start}}

/* ROTINA 3.0.0-beta.5.1 — Atlas 0.1.1: zoom, expansão, rótulos e navegação cartográfica. */
.atlas-map-panel{position:relative;transition:inset .18s ease,border-radius .18s ease,box-shadow .18s ease}.atlas-map-stage{min-height:690px;touch-action:none}.atlas-map-svg{cursor:grab;user-select:none}.atlas-map-svg.is-dragging{cursor:grabbing}.atlas-map-controls{position:absolute;top:14px;right:14px;z-index:12;display:flex;align-items:center;gap:6px;padding:7px;border:1px solid rgba(203,213,225,.92);border-radius:14px;background:rgba(255,255,255,.94);box-shadow:0 12px 30px rgba(15,23,42,.12);backdrop-filter:blur(8px)}.atlas-map-control{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:36px;height:36px;padding:0 10px;border:1px solid #d8e0ec;border-radius:10px;background:#fff;color:#26344f;font:800 15px/1 inherit;cursor:pointer}.atlas-map-control:hover{border-color:#aab5ff;background:#f3f5ff;color:#4338ca}.atlas-map-control:focus-visible{outline:3px solid rgba(79,70,229,.22);outline-offset:2px}.atlas-map-control.is-icon{padding:0;width:36px}.atlas-map-control.is-icon svg{width:15px;height:15px}.atlas-map-expand-control{min-width:96px}.atlas-map-expand-control>span{font-size:17px;line-height:1}.atlas-map-expand-control>b{font-size:12px}.atlas-map-zoom-label{min-width:50px;text-align:center;color:#52627c;font-size:11px;font-weight:800;font-variant-numeric:tabular-nums}.atlas-map-help{position:absolute;left:16px;bottom:12px;z-index:7;padding:7px 10px;border-radius:999px;background:rgba(15,23,42,.72);color:#fff;font-size:10px;font-weight:700;pointer-events:none;opacity:.76}.atlas-label-layer{pointer-events:none}.atlas-municipality-label{paint-order:stroke fill;stroke:#fff;stroke-linejoin:round;fill:#172033;font-weight:850;letter-spacing:-.015em;pointer-events:none}.atlas-municipality-label.is-selected{fill:#111827;font-weight:950}.atlas-shape-layer{transform-box:fill-box}.atlas-map-panel.is-expanded{position:fixed;inset:10px;z-index:2500;margin:0!important;padding:18px;border-radius:24px;background:#fff;box-shadow:0 30px 100px rgba(15,23,42,.28);overflow:auto}.atlas-map-panel.is-expanded .atlas-map-toolbar{position:sticky;top:-18px;z-index:30;margin:-18px -18px 14px;padding:18px;background:rgba(255,255,255,.96);border-bottom:1px solid #e4eaf3;backdrop-filter:blur(12px)}.atlas-map-panel.is-expanded .atlas-map-layout{grid-template-columns:minmax(210px,250px) minmax(620px,1fr) minmax(280px,330px);min-height:calc(100vh - 155px)}.atlas-map-panel.is-expanded .atlas-map-stage{min-height:calc(100vh - 155px);border-color:#ced8e7}.atlas-map-panel.is-expanded .atlas-map-svg{max-height:none;height:100%;min-height:calc(100vh - 155px)}.atlas-map-panel.is-expanded .atlas-legend-card,.atlas-map-panel.is-expanded .atlas-municipality-panel{max-height:calc(100vh - 155px)}body.atlas-map-expanded{overflow:hidden}.atlas-map-panel.is-expanded .atlas-map-expand-control{border-color:#b7c3ff;background:#eef1ff;color:#4338ca}
@media(max-width:1180px){.atlas-map-panel.is-expanded .atlas-map-layout{grid-template-columns:minmax(190px,230px) minmax(520px,1fr)}.atlas-map-panel.is-expanded .atlas-municipality-panel{grid-column:1/-1;max-height:none}.atlas-map-panel.is-expanded{overflow:auto}}
@media(max-width:900px){.atlas-map-stage{min-height:560px}.atlas-map-controls{top:10px;right:10px}.atlas-map-expand-control b{display:none}.atlas-map-expand-control{min-width:36px;width:36px;padding:0}.atlas-map-help{display:none}.atlas-map-panel.is-expanded{inset:4px;padding:10px;border-radius:16px}.atlas-map-panel.is-expanded .atlas-map-toolbar{top:-10px;margin:-10px -10px 10px;padding:12px}.atlas-map-panel.is-expanded .atlas-map-layout{display:grid;grid-template-columns:1fr;min-height:0}.atlas-map-panel.is-expanded .atlas-map-stage{min-height:72vh}.atlas-map-panel.is-expanded .atlas-map-svg{min-height:72vh}.atlas-map-panel.is-expanded .atlas-legend-card,.atlas-map-panel.is-expanded .atlas-municipality-panel{max-height:none}}

/* ROTINA 3.0.0-beta.5.2 — Atlas 0.1.2: interação, ficha territorial e leitura institucional. */
.atlas-visualization-switch{display:grid;gap:8px;margin:0 0 14px;padding:11px;border:1px solid #dfe6f2;border-radius:13px;background:#fff}.atlas-visualization-switch>span{color:#52627c;font-size:10px;font-weight:850;letter-spacing:.08em;text-transform:uppercase}.atlas-visualization-switch>div{display:grid;grid-template-columns:1fr 1fr;gap:6px}.atlas-visualization-switch button{min-height:34px;padding:0 9px;border:1px solid #dbe3ef;border-radius:9px;background:#f8faff;color:#4b5b75;font-size:11px;font-weight:800;cursor:pointer}.atlas-visualization-switch button:hover{border-color:#aab5ff;background:#f1f3ff}.atlas-visualization-switch button.is-active{border-color:#7f8cf5;background:#eef1ff;color:#4338ca;box-shadow:0 0 0 2px rgba(79,70,229,.06)}.atlas-visualization-switch small{color:#7b8aa1;font-size:10px;line-height:1.45}.atlas-legend-boundary i{height:3px!important;margin-top:7px!important;border-radius:999px!important;background:#111827!important;box-shadow:none!important}.atlas-region-boundary-layer{pointer-events:none}.atlas-region-boundary{fill:none;stroke:#111827;stroke-width:2.65;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke;pointer-events:none;opacity:.92}
.atlas-map-stage{min-height:720px}.atlas-map-svg{position:absolute;inset:0;width:100%;height:100%;max-height:none;min-height:0;cursor:grab;touch-action:none}.atlas-map-svg.is-dragging{cursor:grabbing}.atlas-map-panel.is-expanded .atlas-map-svg{position:absolute;inset:0;width:100%;height:100%;min-height:0;max-height:none}
.atlas-municipality-panel{padding:16px;background:linear-gradient(180deg,#fbfcff 0,#f7f9fe 100%);scrollbar-gutter:stable}.atlas-detail-summary{align-items:center;padding:4px 2px 16px}.atlas-detail-summary-main{display:flex;align-items:flex-start;gap:10px;min-width:0}.atlas-detail-pin{display:grid;place-items:center;width:34px;height:34px;flex:0 0 auto;margin-top:1px;border-radius:11px;background:linear-gradient(145deg,#625cf5,#4c8bf5);color:#fff;font-size:11px;box-shadow:0 8px 18px rgba(79,70,229,.18)}.atlas-detail-summary h2{margin:1px 0 3px;font-size:21px;line-height:1.12}.atlas-detail-summary p:last-child{color:#7a8aa2}.atlas-domain-stack{gap:10px;margin-top:12px}.atlas-domain-card{padding:0;overflow:hidden;border-color:#dce4f0;border-radius:15px;background:#fff;box-shadow:0 4px 14px rgba(32,50,86,.035)}.atlas-domain-card-title{display:flex;align-items:center;gap:8px;padding:11px 12px;border-bottom:1px solid #e7ecf4;background:linear-gradient(180deg,#fbfcff,#f7f9fd)}.atlas-domain-card-title>span{width:8px;height:8px;border-radius:50%;background:#5b5cf0;box-shadow:0 0 0 4px rgba(91,92,240,.09)}.atlas-domain-card-title h3{margin:0;font-size:13px;color:#1d2a44}.atlas-detail-layer-list{display:block}.atlas-detail-layer{display:grid;gap:7px;padding:11px 12px;border-top:1px solid #edf1f6}.atlas-detail-layer:first-child{border-top:0}.atlas-detail-layer-head{display:grid;gap:4px}.atlas-detail-layer-head>strong{font-size:11px;line-height:1.25;color:#53647f;text-transform:none}.atlas-detail-source{display:flex;align-items:baseline;gap:5px;min-width:0}.atlas-detail-source>span{color:#9aa6b7;font-size:8px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.atlas-detail-source small{min-width:0;color:#8997aa;font-size:9px;line-height:1.25}.atlas-detail-value{padding:8px 9px;border:1px solid #e4e9f2;border-radius:9px;background:#f8faff;color:#17233c;font-size:12px;font-weight:800;line-height:1.35}.atlas-detail-layer.is-missing .atlas-detail-value{color:#7b8799;background:#f5f6f8;font-weight:650}.atlas-detail-layer.is-missing .atlas-detail-value::before{content:'— ';color:#a5adba}.atlas-detail-empty{min-height:300px}
@media(max-width:1280px){.atlas-map-stage{min-height:680px}.atlas-municipality-panel{padding:18px}}
@media(max-width:900px){.atlas-map-stage{min-height:570px}.atlas-map-svg{min-width:0}.atlas-detail-summary{display:flex}.atlas-detail-summary .button{justify-self:auto}}
@media(max-width:640px){.atlas-map-stage{min-height:430px;overflow:hidden}.atlas-map-svg{min-width:0}.atlas-detail-summary{display:grid}.atlas-detail-summary-main{align-items:flex-start}.atlas-detail-summary .button{justify-self:start}.atlas-visualization-switch>div{grid-template-columns:1fr}}

/* ROTINA 3.0.0-beta.5.3 — Atlas 0.1.3: seleção, legenda interativa e hierarquia territorial. */
.atlas-selection-layer,.atlas-marker-layer{pointer-events:none}.atlas-selection-outline-outer,.atlas-selection-outline-inner{fill:none;pointer-events:none;vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-linecap:round}.atlas-selection-outline-outer{stroke:#fff;stroke-width:7;filter:drop-shadow(0 2px 4px rgba(15,23,42,.28))}.atlas-selection-outline-inner{stroke:#5145e5;stroke-width:3.8}.atlas-municipality-shape.is-selected{stroke:#fff;stroke-width:1.15;filter:brightness(1.02)}.atlas-municipality-label.is-selected{fill:#312e81;font-weight:950}.atlas-selection-marker{pointer-events:none;filter:drop-shadow(0 6px 8px rgba(49,46,129,.32))}.atlas-selection-marker path{fill:#5145e5;stroke:#fff;stroke-width:2.4}.atlas-selection-marker circle{fill:#fff;stroke:#5145e5;stroke-width:2}.atlas-municipality-shape.is-area-dimmed{opacity:.24;filter:saturate(.55)}.atlas-municipality-shape.is-area-highlighted{opacity:1;filter:brightness(1.06) saturate(1.08);stroke:#fff;stroke-width:1.35}.atlas-legend-item.is-interactive{position:relative;cursor:pointer;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease}.atlas-legend-item.is-interactive:hover,.atlas-legend-item.is-interactive:focus-visible,.atlas-legend-item.is-interactive.is-highlighted,.atlas-legend-item.is-interactive.is-map-related{border-color:#aeb8ff;background:#f8f8ff;box-shadow:0 8px 20px rgba(79,70,229,.1);transform:translateY(-1px);outline:none}.atlas-legend-item.is-interactive.is-highlighted{transform:translateY(-1px) scale(1.018)}.atlas-legend-focus-hint{margin-left:auto;align-self:center;color:#8b96aa;font-size:12px;opacity:0;transition:opacity .16s ease,color .16s ease}.atlas-legend-item.is-interactive:hover .atlas-legend-focus-hint,.atlas-legend-item.is-interactive:focus-visible .atlas-legend-focus-hint{opacity:1;color:#5145e5}.atlas-map-tooltip{min-width:155px}.atlas-map-tooltip small{display:block;margin-top:3px;color:#a5b4fc;font-size:9px;font-weight:800;letter-spacing:.045em;text-transform:uppercase}.atlas-map-tooltip span{margin-top:3px;color:#fff;font-weight:750}.atlas-map-tooltip em{display:block;margin-top:5px;color:#cbd5e1;font-size:9px;font-style:normal}.atlas-detail-layer{gap:9px;padding:13px 12px}.atlas-detail-layer-head{gap:5px}.atlas-detail-layer-head>.atlas-detail-layer-title{color:#17233c;font-size:14px;font-weight:900;line-height:1.2}.atlas-detail-source>span{font-size:7.5px}.atlas-detail-source small{font-size:8.5px}.atlas-detail-value{display:grid;gap:4px;padding:9px 10px}.atlas-detail-value>strong{color:#18213b;font-size:13px;font-weight:900;line-height:1.3}.atlas-detail-value>small{color:#9aa6b7;font-size:8px;font-weight:600;line-height:1.3}.atlas-detail-layer.is-missing .atlas-detail-value>strong{color:#7b8799;font-weight:650}.atlas-detail-layer.is-missing .atlas-detail-value>strong::before{content:'— ';color:#a5adba}.atlas-detail-layer.is-missing .atlas-detail-value::before{content:none}.atlas-application-preferences{display:grid;gap:14px}.atlas-application-preferences .panel-heading.compact{margin-bottom:0}.atlas-application-preferences .panel-heading.compact h3{margin:2px 0 4px;font-size:19px}.atlas-application-preferences .form-actions{margin-top:0}

/* ROTINA 3.0.0-beta.5.4 — Atlas 0.1.4: ficha territorial e ficha institucional de área. */
.atlas-detail-layer{padding:15px 13px 14px;gap:10px;background:#fff}
.atlas-detail-layer-head{display:grid;gap:2px}
.atlas-detail-layer-kicker{color:#9aa6b7;font-size:7.5px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
.atlas-detail-layer-head>.atlas-detail-layer-title{color:#101a32;font-size:16px;font-weight:950;letter-spacing:-.02em;line-height:1.15}
.atlas-detail-result{display:grid;gap:3px;padding:10px 11px;border:1px solid #dfe6f1;border-radius:11px;background:linear-gradient(180deg,#fbfcff,#f7f9fd)}
.atlas-detail-result>span{color:#8795aa;font-size:8px;font-weight:850;letter-spacing:.065em;text-transform:uppercase}
.atlas-detail-result>strong{color:#17233d;font-size:13.5px;font-weight:900;line-height:1.3}
.atlas-detail-source{display:grid;grid-template-columns:auto 1fr;gap:2px 6px;align-items:baseline;padding:0 2px}
.atlas-detail-source>span{grid-row:1/3;color:#a0aaba;font-size:7px;font-weight:900;letter-spacing:.075em;text-transform:uppercase}
.atlas-detail-source small{color:#8997aa;font-size:8.5px;line-height:1.3}
.atlas-detail-layer.is-missing .atlas-detail-result{background:#f6f7f9;border-color:#e7e9ed}
.atlas-detail-layer.is-missing .atlas-detail-result>strong{color:#7c8798;font-weight:700}
.atlas-detail-empty-icon{display:grid!important;place-items:center!important;width:44px!important;height:44px!important;margin:0 auto 14px!important;border-radius:15px!important;background:linear-gradient(145deg,#625cf5,#4c8bf5)!important;color:#fff!important;font-size:12px!important;box-shadow:0 10px 24px rgba(79,70,229,.18)!important}
.atlas-area-detail{display:grid;gap:12px}
.atlas-area-detail-head{padding:3px 2px 14px;border-bottom:1px solid #e5eaf2}
.atlas-area-detail-head h2{margin:3px 0 5px;color:#101a32;font-size:22px;line-height:1.12;letter-spacing:-.025em}
.atlas-area-detail-head>p:last-child{margin:0;color:#71819a;font-size:11px;line-height:1.45}
.atlas-area-description{padding:11px 12px;border:1px solid #dce4f1;border-radius:12px;background:linear-gradient(180deg,#f9faff,#f5f7fd);color:#43536d;font-size:11px;font-weight:650;line-height:1.55}
.atlas-area-detail-block{display:grid;gap:8px;padding:12px;border:1px solid #e0e6f0;border-radius:14px;background:#fff}
.atlas-area-detail-label{color:#65748d;font-size:9px;font-weight:900;letter-spacing:.055em;text-transform:uppercase}
.atlas-area-tags{display:flex;flex-wrap:wrap;gap:6px}
.atlas-area-tags span{padding:6px 8px;border:1px solid #dce3f0;border-radius:999px;background:#f7f9ff;color:#263652;font-size:9px;font-weight:800;line-height:1}
.atlas-area-offices{display:grid;gap:7px}
.atlas-area-offices article{display:grid;gap:2px;padding:9px 10px;border:1px solid #e5e9f1;border-radius:10px;background:#fafbfe}
.atlas-area-offices strong{color:#1a2842;font-size:10px;line-height:1.3}
.atlas-area-offices b{color:#4338ca;font-size:10px;line-height:1.35}
.atlas-area-offices small{color:#7b879a;font-size:8.5px;line-height:1.35}
.atlas-area-offices p{margin:3px 0 0;color:#69778d;font-size:8.5px;line-height:1.45}
.atlas-area-notes{display:grid;gap:7px}
.atlas-area-notes p{margin:0;padding:8px 9px;border-left:3px solid #7c6ff3;border-radius:0 9px 9px 0;background:#f7f7ff;color:#59677f;font-size:9px;line-height:1.5}
.atlas-area-source{display:grid;grid-template-columns:auto 1fr;gap:2px 7px;padding:9px 11px;border-radius:11px;background:#f6f8fb}
.atlas-area-source>span{grid-row:1/4;color:#9ca7b8;font-size:7px;font-weight:900;letter-spacing:.07em;text-transform:uppercase}
.atlas-area-source>strong{color:#536179;font-size:9px}
.atlas-area-source>small{color:#8a96a8;font-size:8px}
@media(max-width:900px){.atlas-detail-layer-head>.atlas-detail-layer-title{font-size:15px}.atlas-area-detail-head h2{font-size:20px}}
.atlas-area-subtitle{display:inline-flex;width:max-content;max-width:100%;margin-top:8px;padding:5px 8px;border:1px solid #dcdffd;border-radius:999px;background:#f5f4ff;color:#5145e5;font-size:8.5px;font-weight:850;line-height:1.2}
.atlas-legend-item.is-interactive.is-area-selected{border-color:#7d72f4;background:linear-gradient(180deg,#f7f6ff,#f1f0ff);box-shadow:0 0 0 2px rgba(81,69,229,.08),0 8px 22px rgba(79,70,229,.12)}
.atlas-legend-item.is-interactive.is-area-selected .atlas-legend-focus-hint{opacity:1;color:#5145e5}

/* ROTINA 3.0.0-beta.5.5 — Atlas 0.1.5: hierarquia Região/Subseções, municípios da Subseção e ficha territorial visual. */
.atlas-legend-region-group{display:grid;gap:7px;padding:8px;border:1px solid #dde5f1;border-radius:15px;background:linear-gradient(180deg,#fff,#f9fbff)}
.atlas-legend-region-group+.atlas-legend-region-group{margin-top:8px}
.atlas-legend-region-head{display:grid;grid-template-columns:minmax(0,1fr) 32px;gap:6px;align-items:stretch}
.atlas-legend-region-main,.atlas-legend-region-toggle{border:0;background:transparent;color:inherit;cursor:pointer}
.atlas-legend-region-main{display:flex;min-width:0;padding:6px 7px;text-align:left;border-radius:10px;transition:background .15s ease,box-shadow .15s ease}
.atlas-legend-region-main:hover,.atlas-legend-region-main:focus-visible,.atlas-legend-region-main.is-highlighted,.atlas-legend-region-main.is-map-related,.atlas-legend-region-main.is-area-selected{outline:none;background:#f1f2ff;box-shadow:inset 0 0 0 1px #c7ccff}
.atlas-legend-region-main>span{display:grid;gap:1px;min-width:0}
.atlas-legend-region-main small{color:#8b97aa;font-size:7px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.atlas-legend-region-main strong{color:#17223c;font-size:13px;font-weight:950;line-height:1.2}
.atlas-legend-region-main em{color:#75849a;font-size:9px;font-style:normal;font-weight:700;line-height:1.25}
.atlas-legend-region-toggle{display:grid;place-items:center;border:1px solid #dce4ef;border-radius:9px;background:#f8faff;color:#63728a;font-size:14px;transition:background .15s ease,color .15s ease,transform .15s ease}
.atlas-legend-region-toggle:hover,.atlas-legend-region-toggle:focus-visible{outline:none;background:#eff1ff;color:#4f46e5}
.atlas-legend-region-toggle span{transition:transform .15s ease}.atlas-legend-region-group.is-collapsed .atlas-legend-region-toggle span{transform:rotate(-90deg)}
.atlas-legend-region-children{display:grid;gap:6px;padding-top:2px}.atlas-legend-region-group.is-collapsed .atlas-legend-region-children{display:none}
.atlas-legend-item.is-subsection-item{padding:9px 9px 9px 10px;border-radius:10px;background:#fbfcff}
.atlas-legend-item.is-subsection-item strong{font-size:11px}.atlas-legend-item.is-subsection-item small{font-size:9.5px}
.atlas-legend-region-caption{display:grid;gap:2px;padding:6px 7px}.atlas-legend-region-caption small{color:#8a97aa;font-size:7px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.atlas-legend-region-caption strong{color:#43526b;font-size:10px;line-height:1.35}
.atlas-legend-region-group.is-map-related{border-color:#b9c0ff;box-shadow:0 7px 18px rgba(79,70,229,.08)}

.atlas-detail-quickfacts{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.atlas-detail-quickfacts>span{display:inline-flex;align-items:center;gap:4px;padding:6px 8px;border:1px solid #dde5f0;border-radius:999px;background:#fff;color:#65748c;font-size:8.5px;font-weight:750}.atlas-detail-quickfacts b{color:#302a80;font-size:9px}
.atlas-domain-card{--atlas-domain-accent:#5b5cf0}.atlas-domain-card.is-mpf{--atlas-domain-accent:#6d5df5}.atlas-domain-card.is-justice{--atlas-domain-accent:#2f7ed8}.atlas-domain-card.is-territorial{--atlas-domain-accent:#20a38a}
.atlas-domain-card-title{position:relative;padding:12px 12px 11px 13px;border-left:4px solid var(--atlas-domain-accent);background:linear-gradient(180deg,#fff,#f8faff)}
.atlas-domain-card-title>.atlas-domain-mark{display:grid;place-items:center;width:30px;height:30px;flex:0 0 auto;border-radius:10px;background:color-mix(in srgb,var(--atlas-domain-accent) 12%,white);color:var(--atlas-domain-accent);box-shadow:none;font-size:8px;font-weight:950;letter-spacing:.02em}
.atlas-domain-card-title>div{display:grid;gap:1px;min-width:0}.atlas-domain-card-title small{color:#98a3b4;font-size:7px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.atlas-domain-card-title h3{font-size:13.5px;font-weight:950;line-height:1.2}
.atlas-detail-layer{position:relative;padding:13px 13px 12px 16px}.atlas-detail-layer::before{content:'';position:absolute;left:0;top:12px;bottom:12px;width:3px;border-radius:0 3px 3px 0;background:color-mix(in srgb,var(--atlas-domain-accent) 72%,white);opacity:.75}
.atlas-detail-layer-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.atlas-detail-layer-head>.atlas-detail-layer-title{font-size:15px;letter-spacing:-.015em}.atlas-detail-status-dot{width:7px;height:7px;border-radius:50%;background:var(--atlas-domain-accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--atlas-domain-accent) 10%,transparent)}
.atlas-detail-result{padding:10px 11px;border-color:#e0e6f0;background:#fbfcff}.atlas-detail-result>span{font-size:7.5px}.atlas-detail-result>strong{font-size:14px;color:#111a31}
.atlas-detail-provenance{display:flex;align-items:flex-start;gap:6px;padding:0 2px;color:#8c99ac}.atlas-detail-provenance>span{display:grid;place-items:center;width:13px;height:13px;flex:0 0 auto;border:1px solid #d9e0eb;border-radius:50%;color:#7e8ba0;font-size:7px;font-weight:900}.atlas-detail-provenance small{font-size:8px;line-height:1.35}
.atlas-detail-layer.is-missing{opacity:.72}.atlas-detail-layer.is-missing .atlas-detail-status-dot{background:#a2aaba;box-shadow:none}.atlas-detail-layer.is-missing .atlas-detail-result{background:#f6f7f9}

.atlas-area-detail-block-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.atlas-area-detail-block-head>b{display:grid;place-items:center;min-width:25px;height:22px;padding:0 6px;border-radius:999px;background:#eeefff;color:#4f46e5;font-size:9px}
.atlas-area-municipality-list{display:grid;grid-template-columns:1fr;gap:5px;max-height:300px;overflow:auto;padding-right:3px;scrollbar-gutter:stable}
.atlas-area-municipality-list button{display:grid;grid-template-columns:12px minmax(0,1fr) auto 12px;gap:7px;align-items:center;min-height:37px;padding:7px 8px;border:1px solid #e1e7f0;border-radius:10px;background:#fafbfe;color:#1d2b45;text-align:left;cursor:pointer;transition:border-color .14s ease,background .14s ease,transform .14s ease}
.atlas-area-municipality-list button:hover,.atlas-area-municipality-list button:focus-visible{outline:none;border-color:#abb4ff;background:#f4f5ff;transform:translateX(2px)}
.atlas-area-municipality-list button>span{color:#665cf2;font-size:7px}.atlas-area-municipality-list button strong{overflow:hidden;text-overflow:ellipsis;font-size:10px;white-space:nowrap}.atlas-area-municipality-list button small{color:#8c98aa;font-size:7.5px;white-space:nowrap}.atlas-area-municipality-list button i{color:#8d98aa;font-size:9px;font-style:normal}

@media(max-width:640px){.atlas-legend-region-head{grid-template-columns:minmax(0,1fr) 30px}.atlas-area-municipality-list button{grid-template-columns:10px minmax(0,1fr) 10px}.atlas-area-municipality-list button small{display:none}.atlas-detail-quickfacts{display:grid;grid-template-columns:1fr}.atlas-detail-quickfacts>span{justify-content:center}}

/* ROTINA 3.0.0-beta.5.6 — Mapas 0.1.6: identidade pública, navegação hierárquica e ficha territorial compacta. */
.atlas-legend-card,.atlas-municipality-panel,.atlas-area-municipality-list,.atlas-municipality-list{scrollbar-width:thin;scrollbar-color:rgba(102,116,145,.38) transparent;scrollbar-gutter:stable}
.atlas-legend-card::-webkit-scrollbar,.atlas-municipality-panel::-webkit-scrollbar,.atlas-area-municipality-list::-webkit-scrollbar,.atlas-municipality-list::-webkit-scrollbar{width:7px;height:7px}
.atlas-legend-card::-webkit-scrollbar-track,.atlas-municipality-panel::-webkit-scrollbar-track,.atlas-area-municipality-list::-webkit-scrollbar-track,.atlas-municipality-list::-webkit-scrollbar-track{background:transparent}
.atlas-legend-card::-webkit-scrollbar-thumb,.atlas-municipality-panel::-webkit-scrollbar-thumb,.atlas-area-municipality-list::-webkit-scrollbar-thumb,.atlas-municipality-list::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:999px;background:rgba(104,119,148,.32);background-clip:padding-box}
.atlas-legend-card:hover::-webkit-scrollbar-thumb,.atlas-municipality-panel:hover::-webkit-scrollbar-thumb,.atlas-area-municipality-list:hover::-webkit-scrollbar-thumb,.atlas-municipality-list:hover::-webkit-scrollbar-thumb{background:rgba(90,103,132,.58);background-clip:padding-box}

.atlas-legend-filter{display:grid;gap:6px;margin:0 0 12px}.atlas-legend-filter[hidden]{display:none}.atlas-legend-filter>span{color:#7f8da4;font-size:8px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.atlas-legend-filter>div{position:relative;display:flex;align-items:center}.atlas-legend-filter svg{position:absolute;left:10px;width:14px;height:14px;color:#7e8ba1;pointer-events:none}.atlas-legend-filter input{width:100%;min-height:37px;padding:7px 10px 7px 31px;border:1px solid #dce4ef;border-radius:11px;background:#fff;color:#1d2a43;font-size:11px;outline:none;transition:border-color .15s ease,box-shadow .15s ease}.atlas-legend-filter input:focus{border-color:#aeb6ff;box-shadow:0 0 0 3px rgba(91,92,240,.08)}

.atlas-legend-region-group{gap:0;padding:0;border:0;border-bottom:1px solid #e1e7f0;border-radius:0;background:transparent}.atlas-legend-region-group:first-of-type{border-top:1px solid #e1e7f0}.atlas-legend-region-group+.atlas-legend-region-group{margin-top:0}.atlas-legend-region-group.is-map-related{border-color:#d4d9ff;box-shadow:none}
.atlas-legend-region-head{grid-template-columns:minmax(0,1fr) 24px;gap:3px;align-items:center;padding:9px 2px}.atlas-legend-region-main{padding:4px 3px;border-radius:8px}.atlas-legend-region-main:hover,.atlas-legend-region-main:focus-visible,.atlas-legend-region-main.is-highlighted,.atlas-legend-region-main.is-map-related,.atlas-legend-region-main.is-area-selected{background:#f4f5ff;box-shadow:none}.atlas-legend-region-main small{font-size:6.8px}.atlas-legend-region-main strong{font-size:13px}.atlas-legend-region-main em{margin-top:2px;font-size:8.8px}
.atlas-legend-region-toggle{width:24px;height:24px;border:0;border-radius:50%;background:transparent;color:#7b879c;font-size:18px;line-height:1}.atlas-legend-region-toggle:hover,.atlas-legend-region-toggle:focus-visible{background:#eef0ff;color:#4f46e5}.atlas-legend-region-toggle span{display:block;transform:rotate(90deg);transition:transform .17s ease}.atlas-legend-region-group.is-collapsed .atlas-legend-region-toggle span{transform:rotate(0deg)}
.atlas-legend-region-children{gap:4px;padding:0 0 10px 10px}.atlas-legend-item.is-subsection-item{min-height:48px;padding:8px 8px 8px 9px;border:0;border-left:3px solid var(--atlas-swatch);border-radius:8px;background:transparent}.atlas-legend-item.is-subsection-item:hover,.atlas-legend-item.is-subsection-item:focus-visible{background:#f4f6fb}.atlas-legend-item.is-subsection-item.is-area-selected{border-left-color:#5b5cf0;background:#f1f1ff;box-shadow:none}.atlas-legend-item.is-subsection-item i{width:10px;height:10px;margin-top:3px}.atlas-legend-item.is-subsection-item strong{font-size:10.5px}.atlas-legend-item.is-subsection-item small{font-size:9px}

.atlas-territorial-breadcrumb{display:flex;align-items:center;gap:4px;flex-wrap:nowrap;overflow:hidden;margin:0 0 11px;color:#75849a;font-size:8px;font-weight:750;line-height:1.3;white-space:nowrap}.atlas-territorial-breadcrumb span{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto}.atlas-territorial-breadcrumb span:last-child{min-width:0;overflow:hidden;color:#4338ca;font-weight:900;text-overflow:ellipsis;white-space:nowrap}.atlas-territorial-breadcrumb i{color:#b0b8c5;font-style:normal}
.atlas-detail-summary{padding-bottom:12px}.atlas-detail-summary-main{gap:10px}.atlas-detail-quickfacts{margin-top:8px}.atlas-domain-stack{gap:9px;margin-top:10px}.atlas-domain-card{overflow:hidden;padding:0;border-radius:13px}.atlas-domain-card-title{display:flex;align-items:center;gap:9px;padding:10px 11px 9px;border-left-width:3px}.atlas-domain-card-title>.atlas-domain-mark{width:27px;height:27px;border-radius:9px;font-size:7px}.atlas-domain-card-title h3{font-size:13px}.atlas-detail-domain-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;background:#e8edf5;border-top:1px solid #e8edf5}.atlas-domain-card.is-territorial .atlas-detail-domain-grid,.atlas-domain-card.is-justice .atlas-detail-domain-grid{grid-template-columns:1fr}.atlas-detail-mini-card{display:grid;align-content:start;gap:4px;min-width:0;padding:10px 11px;background:#fff}.atlas-detail-mini-card>span{overflow:hidden;text-overflow:ellipsis;color:#66758d;font-size:8.5px;font-weight:850;white-space:nowrap}.atlas-detail-mini-card>strong{color:#111a31;font-size:12.5px;line-height:1.25}.atlas-detail-mini-card.is-missing>strong{color:#8994a6;font-size:10px;font-weight:750}.atlas-domain-sources{display:flex;align-items:flex-start;gap:5px;flex-wrap:wrap;padding:8px 10px;border-top:1px solid #edf1f6;background:#fbfcfe}.atlas-domain-sources>span{color:#9aa5b5;font-size:7px;font-weight:900;letter-spacing:.07em;text-transform:uppercase}.atlas-domain-sources small{color:#7e8ca1;font-size:7.5px;line-height:1.3}.atlas-domain-sources small+small::before{content:'·';margin-right:5px;color:#b0b8c6}
.atlas-area-detail-actions{display:flex;margin-top:10px}.atlas-area-isolate-button{min-height:32px;font-size:9px}.atlas-municipality-shape.is-area-outside-isolation{opacity:.13}.atlas-municipality-shape.is-area-isolated{filter:saturate(1.08) brightness(1.01)}

@media(max-width:1280px){.atlas-detail-domain-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.atlas-domain-card.is-territorial .atlas-detail-domain-grid,.atlas-domain-card.is-justice .atlas-detail-domain-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){.atlas-detail-domain-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.atlas-domain-card.is-territorial .atlas-detail-domain-grid,.atlas-domain-card.is-justice .atlas-detail-domain-grid{grid-template-columns:1fr}}
@media(max-width:640px){.atlas-detail-domain-grid{grid-template-columns:1fr}.atlas-legend-region-head{grid-template-columns:minmax(0,1fr) 24px}}

/* ROTINA 3.0.0-beta.6.0 — Mapas 0.2.0: breadcrumb territorial volta ao formato discreto de uma linha; confiança visual das fontes permanece. */
.atlas-territorial-breadcrumb-page{margin-bottom:12px}
.atlas-municipality-heading-visual{padding:4px 2px 16px}.atlas-municipality-heading-visual h2{font-size:25px;letter-spacing:-.02em}.atlas-municipality-heading-visual .atlas-detail-quickfacts{margin-top:9px}
.atlas-source-confidence-inline{display:inline-flex;align-items:center;margin-right:5px;padding:2px 5px;border-radius:999px;background:#edf2ff;color:#4a54a8;font-size:6.5px;font-weight:950;letter-spacing:.04em;text-transform:uppercase}.atlas-area-source .atlas-source-confidence-inline{align-self:flex-start;margin:2px 0 0;padding:3px 6px;font-size:7px}
.atlas-layer-card-head>div{min-width:0}.atlas-source-confidence-chip{display:inline-flex;align-items:center;width:max-content;margin-top:5px;padding:3px 6px;border-radius:999px;background:#eef2ff;color:#4f55a6;font-size:7px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}
.atlas-detail-domain-grid{background:#edf1f6}.atlas-detail-mini-card{min-height:62px;padding:11px 12px}.atlas-detail-mini-card>span{font-size:9px}.atlas-detail-mini-card>strong{font-size:13px}.atlas-domain-sources{padding:9px 11px}.atlas-domain-sources small{display:inline-flex;align-items:center;flex-wrap:wrap;gap:2px;font-size:8px}
@media(max-width:640px){.atlas-municipality-heading-visual h2{font-size:22px}}

/* ROTINA 3.0.0-beta.6.2 — Mapas 0.2.2: seletor MPF-first. */
.atlas-layer-field select optgroup{font-weight:850;color:#334155;background:#f8fafc}.atlas-layer-field select option{font-weight:650;color:#263247;background:#fff}.atlas-layer-field select option:checked{font-weight:850}
.atlas-layer-confidence-inline{display:none;align-items:center;gap:9px;margin:-4px 0 14px;padding:9px 11px;border:1px solid #dfe5ef;border-radius:11px;background:#fafbfe;color:#596a84;font-size:10px}.atlas-layer-confidence-inline:not(:empty){display:flex}.atlas-layer-confidence-inline>span{display:inline-flex;padding:4px 7px;border-radius:999px;background:#fff4dd;color:#90651a;font-size:8px;font-weight:950;letter-spacing:.04em;text-transform:uppercase}.atlas-layer-confidence-inline[data-status="confirmed"]{border-color:#cde8db;background:#f4fbf8}.atlas-layer-confidence-inline[data-status="confirmed"]>span{background:#e5f7ef;color:#127158}.atlas-layer-confidence-inline[data-status="under_review"]>span{background:#eef0ff;color:#4943bf}.atlas-layer-confidence-inline small{color:#7a899f}

/* ROTINA 3.0.0-beta.6.3.1 — Mapas 0.2.3.1: seletor customizado, Unidades do MPF auditadas, hachuras e sobreposição de Subseções JF. */
.atlas-layer-picker{position:relative;width:100%;z-index:35}
.atlas-layer-native-select{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important;opacity:0!important;pointer-events:none!important}
.atlas-layer-picker-trigger{display:grid;grid-template-columns:32px minmax(0,1fr) 24px;gap:9px;align-items:center;width:100%;min-height:54px;padding:7px 9px;border:1px solid #cfd8e7;border-radius:12px;background:linear-gradient(180deg,#fff,#fbfcff);color:#1b2942;text-align:left;cursor:pointer;box-shadow:0 1px 2px rgba(30,41,59,.03);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}
.atlas-layer-picker-trigger:hover{border-color:#b9c4da;background:#fff}.atlas-layer-picker-trigger:focus-visible{outline:none;border-color:#8f91ff;box-shadow:0 0 0 3px rgba(91,92,240,.12)}
.atlas-layer-picker.is-open .atlas-layer-picker-trigger{border-color:#8f91ff;box-shadow:0 0 0 3px rgba(91,92,240,.09)}
.atlas-layer-picker-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;background:#eef0ff;color:#5145e5;font-size:15px}.atlas-layer-picker-icon svg{width:16px;height:16px}
.atlas-layer-picker-copy{display:grid;gap:2px;min-width:0}.atlas-layer-picker-copy small{overflow:hidden;color:#8794a8;font-size:7px;font-weight:900;letter-spacing:.07em;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.atlas-layer-picker-copy strong{overflow:hidden;color:#17223c;font-size:13px;font-weight:900;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}
.atlas-layer-picker-chevron{display:grid;place-items:center;color:#69778e;font-size:17px;transition:transform .16s ease}.atlas-layer-picker.is-open .atlas-layer-picker-chevron{transform:rotate(180deg)}
.atlas-layer-picker-menu{position:absolute;top:calc(100% + 7px);left:0;right:0;z-index:120;max-height:min(520px,70vh);overflow:auto;padding:7px;border:1px solid #d7dfeb;border-radius:13px;background:#fff;box-shadow:0 18px 45px rgba(30,41,59,.18),0 4px 12px rgba(30,41,59,.08);scrollbar-width:thin;scrollbar-color:rgba(94,108,136,.42) transparent;overscroll-behavior:contain}
.atlas-layer-picker-menu[hidden]{display:none}.atlas-layer-picker-menu::-webkit-scrollbar{width:7px}.atlas-layer-picker-menu::-webkit-scrollbar-track{background:transparent}.atlas-layer-picker-menu::-webkit-scrollbar-thumb{border:2px solid transparent;border-radius:999px;background:rgba(94,108,136,.36);background-clip:padding-box}
.atlas-layer-picker-group{display:grid;gap:2px;padding:5px 0}.atlas-layer-picker-group+.atlas-layer-picker-group{border-top:1px solid #edf1f6}.atlas-layer-picker-group-title{padding:5px 8px 4px;color:#6f7d92;font-size:7.5px;font-weight:950;letter-spacing:.075em;text-transform:uppercase}
.atlas-layer-picker-option{display:grid;grid-template-columns:minmax(0,1fr) 18px;gap:8px;align-items:center;width:100%;padding:8px 9px;border:0;border-radius:9px;background:transparent;color:#1e2a43;text-align:left;cursor:pointer;transition:background .14s ease,color .14s ease}.atlas-layer-picker-option:hover,.atlas-layer-picker-option:focus-visible{outline:none;background:#f4f5ff}.atlas-layer-picker-option.is-selected{background:#eeefff;color:#3f38bd}.atlas-layer-picker-option>span{display:grid;gap:2px;min-width:0}.atlas-layer-picker-option strong{font-size:11px;font-weight:900;line-height:1.2}.atlas-layer-picker-option small{display:-webkit-box;overflow:hidden;color:#7c8aa0;font-size:7.8px;font-weight:600;line-height:1.3;-webkit-box-orient:vertical;-webkit-line-clamp:2}.atlas-layer-picker-option i{visibility:hidden;color:#5145e5;font-size:11px;font-style:normal;font-weight:950;text-align:center}.atlas-layer-picker-option.is-selected i{visibility:visible}

.atlas-overlay-toggle{display:flex;align-items:flex-start;gap:9px;margin:-5px 0 13px;padding:9px 10px;border:1px solid #dfe6ef;border-radius:11px;background:#fbfcfe;color:#52627b;cursor:pointer;transition:border-color .15s ease,background .15s ease}.atlas-overlay-toggle[hidden]{display:none}.atlas-overlay-toggle:hover{border-color:#c8d1e0;background:#fff}.atlas-overlay-toggle input{width:15px;height:15px;margin:2px 0 0;accent-color:#5b5cf0;cursor:pointer}.atlas-overlay-toggle>span{display:grid;gap:2px}.atlas-overlay-toggle strong{color:#26344c;font-size:9.5px;font-weight:900}.atlas-overlay-toggle small{color:#8090a6;font-size:8px;line-height:1.35}
.atlas-overlay-boundary{fill:none;stroke:rgba(57,76,105,.58);stroke-width:1.35;stroke-dasharray:4 4;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke;pointer-events:none}.atlas-overlay-boundary-layer{pointer-events:none}
.atlas-legend-shared-note{margin-top:7px;border:1px dashed #d7deea!important;background:#fafbfe!important}.atlas-legend-shared-note>i{border-radius:3px!important;background:repeating-linear-gradient(135deg,#8174f5 0 4px,#f7c956 4px 8px,#55cbb8 8px 12px)!important;box-shadow:inset 0 0 0 1px rgba(30,41,59,.08)}
.atlas-area-municipality-list button.is-shared{border-color:#d9d4ff;background:linear-gradient(135deg,#faf9ff,#fffdf6)}.atlas-area-municipality-list button.is-shared::after{content:'Compartilhado';grid-column:2/4;width:max-content;margin-top:-2px;padding:2px 5px;border-radius:999px;background:#f0ecff;color:#5d4acb;font-size:6.8px;font-weight:950;letter-spacing:.04em;text-transform:uppercase}.atlas-shared-membership-note{display:flex;gap:7px;align-items:flex-start;margin-top:8px;padding:8px 9px;border:1px solid #ddd7ff;border-radius:9px;background:#faf9ff;color:#5f6075;font-size:8px;line-height:1.4}.atlas-shared-membership-note::before{content:'↗';display:grid;place-items:center;width:16px;height:16px;flex:0 0 auto;border-radius:50%;background:#ebe7ff;color:#5748bf;font-weight:950}

@media(max-width:640px){.atlas-layer-picker-trigger{grid-template-columns:29px minmax(0,1fr) 20px;min-height:50px;padding:6px 8px}.atlas-layer-picker-icon{width:29px;height:29px}.atlas-layer-picker-menu{position:fixed;left:12px;right:12px;top:auto;bottom:14px;max-height:min(66vh,560px);border-radius:15px}.atlas-layer-picker-option{padding:9px}.atlas-layer-picker-option strong{font-size:11.5px}}
