    :root {
      color-scheme: dark;
      --app-bg: #0b1220;
      --app-surface: #111827;
      --app-surface-raised: #1e293b;
      --app-border: #334155;
      --app-text: #e2e8f0;
      --app-muted: #94a3b8;
      --app-primary: #3b82f6;
      --sidebar-width: 272px;
      --sidebar-collapsed-width: 76px;
      --topbar-height: 72px;
    }
    * { box-sizing: border-box; }
    html { min-height: 100%; background: var(--app-bg); }
    body { min-height: 100dvh; background: var(--app-bg); color: var(--app-text); padding-bottom: env(safe-area-inset-bottom, 0px); }
    body.modal-open { overflow: hidden; }
    .hidden { display: none !important; }
    button, input, select, textarea { font: inherit; }
    button:focus-visible,
    a:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible {
      outline: 2px solid #60a5fa;
      outline-offset: 2px;
    }
    .skip-link {
      position: fixed;
      top: 0.5rem;
      left: 0.5rem;
      z-index: 100;
      transform: translateY(-150%);
      border-radius: 0.5rem;
      background: #fff;
      color: #0f172a;
      padding: 0.65rem 0.85rem;
      font-size: 0.8rem;
      font-weight: 800;
    }
    .skip-link:focus { transform: translateY(0); }
    .login-offline {
      border: 1px solid rgb(245 158 11 / 0.45);
      border-radius: 0.65rem;
      background: rgb(120 53 15 / 0.35);
      color: #fde68a;
      padding: 0.7rem;
      font-size: 0.7rem;
      line-height: 1.45;
      text-align: center;
    }
    .password-control { position: relative; width: 100%; }
    .password-control input { width: 100%; padding-right: 2.8rem !important; }
    .password-toggle {
      position: absolute;
      top: 50%;
      right: 0.45rem;
      width: 2rem;
      height: 2rem;
      display: grid;
      place-items: center;
      transform: translateY(-50%);
      border-radius: 0.45rem;
      color: #94a3b8;
    }
    .password-toggle:hover { background: rgb(51 65 85 / 0.75); color: white; }
    .password-toggle svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .users-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
    .users-heading h2 { margin-top: .2rem; color: #fff; font-size: 1.35rem; font-weight: 850; }
    .users-heading p { margin-top: .25rem; color: var(--app-muted); font-size: .78rem; }
    .users-primary-action { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.55rem; border-radius: .75rem; background: linear-gradient(135deg, #2563eb, #3b82f6); padding: .65rem 1rem; color: #fff; font-size: .75rem; font-weight: 850; box-shadow: 0 10px 24px rgb(37 99 235 / .24); }
    .users-primary-action:hover { background: linear-gradient(135deg, #1d4ed8, #2563eb); }
    .users-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
    .users-stats button { min-height: 5.8rem; display: flex; align-items: center; gap: .8rem; border: 1px solid rgb(71 85 105 / .65); border-radius: .9rem; background: linear-gradient(145deg, rgb(30 41 59 / .96), rgb(15 23 42 / .9)); padding: 1rem; text-align: left; box-shadow: 0 12px 25px rgb(2 6 23 / .14); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
    .users-stats button:hover { transform: translateY(-1px); border-color: #60a5fa; }
    .users-stats button.is-selected { border-color: #60a5fa; box-shadow: 0 0 0 2px rgb(37 99 235 / .24), 0 12px 25px rgb(2 6 23 / .18); }
    .users-stat-icon { flex: 0 0 2.7rem; width: 2.7rem; height: 2.7rem; display: grid; place-items: center; border-radius: .75rem; font-size: 1.25rem; font-weight: 900; }
    .stat-blue { background: rgb(37 99 235 / .18); color: #93c5fd; }
    .stat-green { background: rgb(5 150 105 / .18); color: #6ee7b7; }
    .stat-red { background: rgb(225 29 72 / .16); color: #fda4af; }
    .stat-amber { background: rgb(217 119 6 / .18); color: #fcd34d; }
    .users-stats strong { display: block; color: #fff; font-size: 1.3rem; line-height: 1; }
    .users-stats small { display: block; margin-top: .35rem; color: var(--app-muted); font-size: .7rem; }
    .users-panel { overflow: hidden; border: 1px solid rgb(71 85 105 / .65); border-radius: 1rem; background: rgb(15 23 42 / .72); box-shadow: 0 16px 34px rgb(2 6 23 / .2); }
    .users-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem; background: rgb(30 41 59 / .86); }
    .users-tabs { display: flex; gap: .35rem; }
    .users-tabs button { border-radius: 999px; padding: .48rem .72rem; color: #94a3b8; font-size: .68rem; font-weight: 800; }
    .users-tabs button:hover { color: #fff; background: rgb(51 65 85 / .75); }
    .users-tabs button.active { background: #2563eb; color: #fff; }
    .users-tabs span { margin-left: .22rem; border-radius: 999px; background: rgb(15 23 42 / .45); padding: .08rem .36rem; }
    .users-filters { display: flex; gap: .55rem; }
    .users-filters input, .users-filters select { min-height: 2.35rem; border: 1px solid #334155; border-radius: .7rem; background: #0f172a; color: #e2e8f0; padding: .55rem .8rem; font-size: .7rem; }
    .users-filters input { min-width: 15rem; padding-right: 2.3rem; }
    .users-mobile-sort { display: none; }
    .users-table-header, .user-row { display: grid; grid-template-columns: minmax(13rem, 1.55fr) minmax(7rem, .7fr) minmax(10rem, 1.15fr) minmax(6rem, .55fr) minmax(6rem, .55fr) minmax(12rem, 1fr); align-items: center; gap: .7rem; }
    .users-table-header { border-top: 1px solid rgb(51 65 85 / .65); border-bottom: 1px solid rgb(51 65 85 / .65); padding: .72rem 1rem; color: #64748b; font-size: .61rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
    .users-table-header button { display: inline-flex; align-items: center; gap: .28rem; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; text-transform: inherit; }
    .users-table-header button:hover, .users-table-header button.is-sorted { color: #93c5fd; }
    .users-table-header button span { min-width: .65rem; }
    .user-row { min-height: 4.8rem; border-bottom: 1px solid rgb(51 65 85 / .52); padding: .75rem 1rem; font-size: .7rem; transition: background .15s ease; }
    .user-row:hover, .user-row:focus-visible { background: rgb(30 41 59 / .72); outline: none; }
    .user-row { cursor: pointer; }
    .user-row.is-inactive { opacity: .72; }
    .user-identity { min-width: 0; display: flex; align-items: center; gap: .7rem; }
    .user-identity .user-avatar { width: 2.45rem; height: 2.45rem; }
    .user-identity div { min-width: 0; }
    .user-identity strong, .user-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .user-identity strong { color: #fff; font-size: .75rem; }
    .user-identity small { margin-top: .15rem; color: #94a3b8; font-size: .64rem; }
    .user-role, .user-status { display: inline-flex; align-items: center; border-radius: 999px; padding: .28rem .55rem; font-size: .62rem; font-weight: 850; }
    .role-admin { background: rgb(190 24 93 / .2); color: #f9a8d4; }
    .role-gestor { background: rgb(217 119 6 / .2); color: #fcd34d; }
    .role-conferente { background: rgb(2 132 199 / .2); color: #7dd3fc; }
    .user-status.active { background: rgb(5 150 105 / .16); color: #6ee7b7; }
    .user-status.inactive { background: rgb(71 85 105 / .38); color: #cbd5e1; }
    .user-divisions { overflow: hidden; color: #cbd5e1; text-overflow: ellipsis; white-space: nowrap; }
    .user-date { color: #94a3b8; }
    .user-actions { display: flex; flex-wrap: wrap; gap: .3rem; }
    .user-actions button { border: 1px solid #475569; border-radius: .45rem; padding: .32rem .48rem; color: #cbd5e1; font-size: .59rem; font-weight: 800; }
    .user-actions button:hover { border-color: #60a5fa; color: #fff; }
    .user-actions button.danger { border-color: rgb(244 63 94 / .45); color: #fda4af; }
    .user-actions button.success { border-color: rgb(16 185 129 / .45); color: #6ee7b7; }
    .users-readonly { color: #64748b; font-size: .62rem; }
    .user-open-details { color: #93c5fd; font-size: .64rem; font-weight: 850; }
    .user-details-dialog { width: 100%; max-width: 34rem; max-height: 90vh; overflow-y: auto; border: 1px solid #475569; border-radius: 1rem; background: #1e293b; padding: 1.25rem; box-shadow: 0 24px 70px rgb(2 6 23 / .62); }
    .user-details-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #334155; padding-bottom: .7rem; }
    .user-details-heading h3 { color: #60a5fa; font-size: .76rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
    .user-details-heading button { color: #94a3b8; font-weight: 900; }
    .user-details-profile { display: flex; align-items: center; gap: .85rem; padding: 1rem 0; }
    .user-avatar-large { width: 3.5rem; height: 3.5rem; font-size: .9rem; }
    .user-details-profile strong, .user-details-profile small { display: block; }
    .user-details-profile strong { color: #fff; font-size: .92rem; }
    .user-details-profile small { margin-top: .2rem; color: #94a3b8; font-size: .7rem; }
    .user-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
    .user-details-grid > div { border: 1px solid #334155; border-radius: .7rem; background: rgb(15 23 42 / .6); padding: .75rem; }
    .user-details-grid dt { color: #64748b; font-size: .58rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
    .user-details-grid dd { margin-top: .25rem; color: #e2e8f0; font-size: .72rem; overflow-wrap: anywhere; }
    .user-details-wide { grid-column: 1 / -1; }
    .user-details-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
    .user-details-actions button { border: 1px solid #475569; border-radius: .55rem; padding: .55rem .7rem; color: #dbeafe; font-size: .66rem; font-weight: 850; }
    .user-details-actions button:hover { border-color: #60a5fa; }
    .user-details-actions button.danger { border-color: rgb(244 63 94 / .55); color: #fda4af; }
    .user-details-actions button.success { border-color: rgb(16 185 129 / .55); color: #6ee7b7; }
    .users-empty { padding: 2.5rem 1rem; color: #94a3b8; font-size: .75rem; text-align: center; }
    .users-pagination { min-height: 3.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; color: #94a3b8; font-size: .66rem; }
    .users-pagination div { display: flex; align-items: center; gap: .55rem; }
    .users-pagination button { width: 1.9rem; height: 1.9rem; border: 1px solid #475569; border-radius: .55rem; color: #cbd5e1; }
    .users-pagination button:disabled { cursor: not-allowed; opacity: .35; }
    .users-pagination strong { color: #dbeafe; }
    .division-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
    .division-stats > div { min-height: 5.4rem; display: flex; align-items: center; gap: .8rem; border: 1px solid rgb(71 85 105 / .65); border-radius: .9rem; background: linear-gradient(145deg, rgb(30 41 59 / .96), rgb(15 23 42 / .9)); padding: 1rem; }
    .division-stats strong, .division-stats small { display: block; }
    .division-stats strong { color: #fff; font-size: 1.3rem; line-height: 1; }
    .division-stats small { margin-top: .35rem; color: var(--app-muted); font-size: .7rem; }
    .divisions-panel { overflow: hidden; border: 1px solid rgb(71 85 105 / .65); border-radius: 1rem; background: rgb(15 23 42 / .72); box-shadow: 0 16px 34px rgb(2 6 23 / .2); }
    .divisions-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem; background: rgb(30 41 59 / .86); }
    .divisions-filters { display: flex; gap: .55rem; }
    .divisions-toolbar input, .divisions-toolbar select { min-height: 2.35rem; border: 1px solid #334155; border-radius: .7rem; background: #0f172a; color: #e2e8f0; padding: .55rem .8rem; font-size: .7rem; }
    .divisions-toolbar input { min-width: 18rem; }
    .divisions-table-header, .division-row { display: grid; grid-template-columns: minmax(12rem, 1.4fr) minmax(10rem, 1fr) minmax(10rem, 1fr) 6rem 7rem; align-items: center; gap: .7rem; }
    .divisions-table-header { border-top: 1px solid #334155; border-bottom: 1px solid #334155; padding: .72rem 1rem; color: #64748b; font-size: .61rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
    .divisions-table-header button { display: inline-flex; align-items: center; gap: .28rem; color: inherit; font: inherit; letter-spacing: inherit; text-align: left; text-transform: inherit; }
    .divisions-table-header button:hover, .divisions-table-header button.is-sorted { color: #93c5fd; }
    .division-row { min-height: 4.5rem; border-bottom: 1px solid rgb(51 65 85 / .52); padding: .75rem 1rem; color: #cbd5e1; font-size: .7rem; }
    .division-row:hover { background: rgb(30 41 59 / .72); }
    .division-name strong, .division-name small { display: block; }
    .division-name strong { color: #fff; overflow-wrap: anywhere; }
    .division-name small { margin-top: .2rem; color: #64748b; }
    .division-person { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .division-actions button { border: 1px solid #475569; border-radius: .45rem; padding: .35rem .55rem; color: #bfdbfe; font-size: .62rem; font-weight: 850; }
    .division-dialog { width: 100%; max-width: 34rem; max-height: 90vh; overflow-y: auto; border: 1px solid #475569; border-radius: 1rem; background: #1e293b; padding: 1.25rem; box-shadow: 0 24px 70px rgb(2 6 23 / .62); }
    .division-active-control { display: flex; align-items: center; gap: .55rem; border: 1px solid #334155; border-radius: .65rem; background: rgb(15 23 42 / .55); padding: .7rem; color: #cbd5e1; font-size: .7rem; }
    .division-modal-note { color: #94a3b8; font-size: .64rem; line-height: 1.5; }
    .divisions-empty { padding: 2.5rem 1rem; color: #94a3b8; font-size: .75rem; text-align: center; }
    @media (max-width: 1100px) { .users-stats, .division-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .users-panel, .divisions-panel { overflow: visible; } .users-table-header, .divisions-table-header { display: none; } .users-mobile-sort { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; border-top: 1px solid #334155; padding: .65rem .9rem; color: #94a3b8; font-size: .64rem; } .users-mobile-sort select { border: 1px solid #334155; border-radius: .55rem; background: #0f172a; color: #e2e8f0; padding: .45rem .6rem; } .users-list, .divisions-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; padding: .7rem; } .user-row, .division-row { display: flex; min-width: 0; flex-direction: column; align-items: stretch; gap: .65rem; border: 1px solid #334155; border-radius: .8rem; background: rgb(30 41 59 / .65); } .user-row > div:not(.user-identity)::before, .division-row > div::before { content: attr(data-label); display: block; margin-bottom: .22rem; color: #64748b; font-size: .56rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; } .user-divisions { white-space: normal; } }
    @media (max-width: 700px) { .users-heading, .users-toolbar, .divisions-toolbar { align-items: stretch; flex-direction: column; } .users-primary-action { width: 100%; } .users-stats, .division-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; } .users-stats button, .division-stats > div { min-height: 4.8rem; padding: .7rem; } .users-stat-icon { width: 2.25rem; height: 2.25rem; flex-basis: 2.25rem; } .users-tabs { overflow-x: auto; padding-bottom: .15rem; } .users-filters { flex-direction: column; } .users-filters input, .divisions-toolbar input { width: 100%; min-width: 0; } .users-list, .divisions-list { grid-template-columns: 1fr; } .users-pagination { align-items: flex-start; flex-direction: column; } .users-mobile-sort { align-items: stretch; flex-direction: column; } .user-details-grid { grid-template-columns: 1fr; } .user-details-wide { grid-column: auto; } }

    .tutorial-profile-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
    .tutorial-profile-card.hidden { display: none; }
    .tutorial-profile-card h2 { margin-top: .2rem; color: #fff; font-size: .9rem; font-weight: 850; }
    .tutorial-profile-card p { margin-top: .3rem; color: #94a3b8; font-size: .7rem; }
    .driver-popover.cmapp-tutorial { border: 1px solid #3b82f6; border-radius: .9rem; background: #1e293b; color: #e2e8f0; box-shadow: 0 20px 55px rgb(2 6 23 / .55); }
    .driver-popover.cmapp-tutorial .driver-popover-title { color: #fff; font-size: .92rem; }
    .driver-popover.cmapp-tutorial .driver-popover-description { color: #cbd5e1; font-size: .75rem; line-height: 1.55; }
    .driver-popover.cmapp-tutorial .driver-popover-progress-text { color: #94a3b8; }
    .driver-popover.cmapp-tutorial .driver-popover-footer { display: flex; align-items: center; gap: .35rem; }
    .driver-popover.cmapp-tutorial .driver-popover-progress-text { flex: 0 0 auto; white-space: nowrap; }
    .driver-popover.cmapp-tutorial .driver-popover-footer-buttons { display: flex; align-items: center; flex-wrap: nowrap; gap: .3rem; }
    .driver-popover.cmapp-tutorial button { border-radius: .45rem; text-shadow: none; }
    .driver-popover.cmapp-tutorial .driver-popover-next-btn { border-color: #2563eb; background: #2563eb; color: #fff; }
    .driver-popover.cmapp-tutorial .tutorial-skip-button { margin-right: auto; border: 1px solid #475569; background: #0f172a; color: #bfdbfe; white-space: nowrap; }
    @media (max-width: 700px) { .tutorial-profile-card { align-items: stretch; flex-direction: column; } }

    .suggestion-destination-button { width: 100%; border: 1px solid rgb(245 158 11 / .5); border-radius: .55rem; background: rgb(120 53 15 / .26); padding: .55rem .7rem; color: #fcd34d; font-size: .68rem; font-weight: 850; }
    .suggestion-destination-button:hover { border-color: #f59e0b; background: rgb(120 53 15 / .4); }
    .suggestion-dialog { width: 100%; max-width: 32rem; max-height: 90vh; overflow-y: auto; border: 1px solid #475569; border-radius: 1rem; background: #1e293b; padding: 1.25rem; box-shadow: 0 24px 70px rgb(2 6 23 / .65); }
    .suggestion-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #334155; padding-bottom: .75rem; }
    .suggestion-heading h3 { margin-top: .2rem; color: #fff; font-size: .95rem; font-weight: 850; }
    .suggestion-heading button { color: #94a3b8; font-weight: 900; }
    .suggestion-item-summary { display: grid; gap: .2rem; margin: .85rem 0; border: 1px solid #334155; border-radius: .7rem; background: rgb(15 23 42 / .6); padding: .75rem; }
    .suggestion-item-summary strong { color: #93c5fd; font-size: .78rem; }
    .suggestion-item-summary span, .suggestion-item-summary small { color: #cbd5e1; font-size: .68rem; }
    .suggestion-warning { border: 1px solid rgb(245 158 11 / .45); border-radius: .65rem; background: rgb(120 53 15 / .23); padding: .7rem; color: #fde68a; }
    .suggestion-warning strong { display: block; font-size: .7rem; }
    .suggestion-warning p { margin-top: .2rem; font-size: .64rem; line-height: 1.45; }
    .suggestion-actions { display: flex; justify-content: flex-end; gap: .5rem; }
    .suggestion-actions button { border: 1px solid #475569; border-radius: .55rem; padding: .55rem .75rem; color: #cbd5e1; font-size: .68rem; font-weight: 850; }
    .suggestion-actions button[type="submit"] { border-color: #d97706; background: #d97706; color: #fff; }
    .transfer-type { display: inline-flex; width: fit-content; border-radius: 999px; padding: .25rem .5rem; font-size: .58rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
    .transfer-type.physical { background: rgb(37 99 235 / .18); color: #93c5fd; }
    .transfer-type.suggestion { background: rgb(217 119 6 / .2); color: #fcd34d; }
    .app-shell {
      min-height: 100vh;
      display: grid;
      grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    }
    .app-shell.hidden { display: none; }
    .app-sidebar {
      position: sticky;
      top: 0;
      z-index: 50;
      display: flex;
      flex-direction: column;
      width: var(--sidebar-width);
      height: 100vh;
      overflow: hidden;
      border-right: 1px solid rgb(71 85 105 / 0.7);
      background: linear-gradient(180deg, #202b3a 0%, #182231 100%);
      box-shadow: 10px 0 30px rgb(2 6 23 / 0.18);
      transition: width 0.2s ease, transform 0.2s ease;
    }
    .sidebar-brand {
      min-height: var(--topbar-height);
      display: flex;
      align-items: center;
      gap: 0.8rem;
      padding: 0.8rem 1rem;
      border-bottom: 1px solid rgb(71 85 105 / 0.65);
    }
    .brand-mark {
      flex: 0 0 2.65rem;
      width: 2.65rem;
      height: 2.65rem;
      display: grid;
      place-items: center;
      border-radius: 0.85rem;
      background: linear-gradient(145deg, #3b82f6, #1d4ed8);
      color: white;
      font-size: 0.9rem;
      font-weight: 900;
      box-shadow: 0 8px 20px rgb(37 99 235 / 0.28);
    }
    .sidebar-brand strong { display: block; color: white; font-size: 1rem; letter-spacing: 0.03em; }
    .sidebar-brand span { display: block; color: #94a3b8; font-size: 0.68rem; margin-top: 0.1rem; }
    .sidebar-profile {
      display: flex;
      align-items: center;
      gap: 0.7rem;
      margin: 0.85rem;
      padding: 0.75rem;
      border: 1px solid rgb(71 85 105 / 0.65);
      border-radius: 0.85rem;
      background: rgb(15 23 42 / 0.5);
    }
    .user-avatar {
      flex: 0 0 auto;
      width: 2.55rem;
      height: 2.55rem;
      display: grid;
      place-items: center;
      overflow: hidden;
      border: 2px solid rgb(96 165 250 / 0.7);
      border-radius: 999px;
      background: linear-gradient(145deg, #1d4ed8, #312e81);
      color: #dbeafe;
      font-size: 0.72rem;
      font-weight: 900;
      letter-spacing: 0.04em;
    }
    .user-avatar-small { width: 2.35rem; height: 2.35rem; }
    .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
    .sidebar-profile-copy { min-width: 0; }
    .sidebar-profile-copy strong { display: block; overflow: hidden; color: white; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
    .sidebar-profile-copy span { display: block; margin-top: 0.15rem; color: #94a3b8; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; }
    .sidebar-nav { flex: 1; overflow-y: auto; padding: 0.25rem 0.65rem 1rem; }
    .sidebar-section-label {
      display: block;
      padding: 0.8rem 0.7rem 0.35rem;
      color: #64748b;
      font-size: 0.58rem;
      font-weight: 900;
      letter-spacing: 0.12em;
      text-transform: uppercase;
    }
    .nav-item {
      width: 100%;
      min-height: 2.8rem;
      display: flex;
      align-items: center;
      gap: 0.8rem;
      margin: 0.18rem 0;
      padding: 0.65rem 0.75rem;
      border: 1px solid transparent;
      border-radius: 0.7rem;
      color: #cbd5e1;
      text-align: left;
      transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    }
    .nav-item:hover { background: rgb(51 65 85 / 0.7); color: white; }
    .nav-item.active {
      border-color: rgb(96 165 250 / 0.35);
      background: linear-gradient(90deg, rgb(37 99 235 / 0.9), rgb(30 64 175 / 0.72));
      color: white;
      box-shadow: 0 8px 18px rgb(2 6 23 / 0.2);
    }
    .nav-item svg {
      flex: 0 0 1.25rem;
      width: 1.25rem;
      height: 1.25rem;
      fill: none;
      stroke: currentColor;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .nav-item > .sidebar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; font-weight: 700; }
    .nav-badge {
      margin-left: auto;
      min-width: 1.35rem;
      border-radius: 999px;
      background: #f59e0b;
      color: #1e293b;
      padding: 0.12rem 0.38rem;
      font-size: 0.6rem;
      font-weight: 900;
      text-align: center;
    }
    .sidebar-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.8rem 1rem;
      border-top: 1px solid rgb(71 85 105 / 0.65);
      color: #64748b;
      font-size: 0.62rem;
    }
    .sidebar-footer button { color: #cbd5e1; font-weight: 800; }
    .sidebar-footer button:hover { color: #fca5a5; }
    .app-workspace { min-width: 0; display: flex; min-height: 100vh; flex-direction: column; }
    .app-topbar {
      position: sticky;
      top: 0;
      z-index: 40;
      min-height: var(--topbar-height);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding: 0.65rem clamp(1rem, 2.5vw, 2rem);
      border-bottom: 1px solid rgb(51 65 85 / 0.8);
      background: rgb(15 23 42 / 0.93);
      backdrop-filter: blur(14px);
    }
    .topbar-leading { min-width: 0; display: flex; align-items: center; gap: 0.85rem; }
    .icon-button {
      flex: 0 0 auto;
      width: 2.7rem;
      height: 2.7rem;
      display: grid;
      place-items: center;
      border: 1px solid rgb(71 85 105 / 0.8);
      border-radius: 0.75rem;
      background: rgb(30 41 59 / 0.72);
      color: #cbd5e1;
    }
    .icon-button:hover { border-color: #60a5fa; color: white; }
    .icon-button svg { width: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
    .page-heading { min-width: 0; }
    .page-heading h1 { color: white; font-size: clamp(1rem, 2vw, 1.25rem); font-weight: 800; line-height: 1.1; }
    .breadcrumb { display: flex; align-items: center; gap: 0.35rem; margin-top: 0.28rem; color: #64748b; font-size: 0.66rem; }
    .breadcrumb strong { color: #93c5fd; font-weight: 700; }
    .profile-menu-wrapper { position: relative; }
    .profile-trigger { display: flex; align-items: center; gap: 0.7rem; border-radius: 0.75rem; padding: 0.25rem; }
    .profile-trigger:hover { background: rgb(30 41 59 / 0.72); }
    .profile-trigger-copy { text-align: right; }
    .profile-trigger-copy strong { display: block; max-width: 14rem; overflow: hidden; color: white; font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
    .profile-trigger-copy small { display: block; margin-top: 0.1rem; color: #94a3b8; font-size: 0.58rem; font-weight: 800; text-transform: uppercase; }
    .profile-dropdown {
      position: absolute;
      top: calc(100% + 0.55rem);
      right: 0;
      width: min(19rem, calc(100vw - 2rem));
      overflow: hidden;
      border: 1px solid var(--app-border);
      border-radius: 0.85rem;
      background: #1e293b;
      box-shadow: 0 20px 55px rgb(2 6 23 / 0.55);
    }
    .profile-dropdown-heading { padding: 0.85rem; }
    .profile-dropdown-heading strong { display: block; color: white; font-size: 0.78rem; }
    .profile-dropdown-heading span { display: block; margin-top: 0.3rem; color: #94a3b8; font-size: 0.65rem; line-height: 1.45; }
    .profile-dropdown button { width: 100%; padding: 0.72rem 0.85rem; border-top: 1px solid var(--app-border); color: #fca5a5; text-align: left; font-size: 0.7rem; font-weight: 800; }
    .profile-dropdown button:hover { background: rgb(127 29 29 / 0.4); }
    .profile-dropdown button.profile-dropdown-primary { color: #bfdbfe; }
    .profile-dropdown button.profile-dropdown-primary:hover { background: rgb(30 64 175 / 0.35); }
    .profile-dropdown button.profile-dropdown-install { color: #a7f3d0; }
    .profile-dropdown button.profile-dropdown-install:hover { background: rgb(6 78 59 / 0.42); }
    .app-offline-banner {
      position: sticky;
      top: var(--topbar-height);
      z-index: 35;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.35rem;
      border-bottom: 1px solid rgb(245 158 11 / 0.45);
      background: rgb(120 53 15 / 0.96);
      color: #fef3c7;
      padding: 0.55rem 1rem;
      font-size: 0.68rem;
      text-align: center;
      box-shadow: 0 8px 24px rgb(2 6 23 / 0.24);
    }
    .app-content { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: clamp(1rem, 2.6vw, 2rem); }
    .escopo-barra { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding: 0.85rem 1rem; border: 1px solid rgb(96 165 250 / 0.4); border-radius: 0.85rem; background: #162339; }
    .escopo-barra label { display: block; color: #bfdbfe; font-size: 0.78rem; font-weight: 800; }
    .escopo-barra p { margin-top: 0.2rem; color: #94a3b8; font-size: 0.66rem; line-height: 1.4; }
    .escopo-barra select { flex: 0 1 22rem; min-width: 12rem; max-width: 100%; padding: 0.65rem; border: 1px solid #64748b; border-radius: 0.6rem; background: #0f172a; color: #fff; font-size: 0.75rem; }
    .app-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 2.6vw, 2rem); color: #64748b; font-size: 0.62rem; }
    .app-card {
      border: 1px solid rgb(51 65 85 / 0.8);
      border-radius: 0.9rem;
      background: linear-gradient(145deg, rgb(30 41 59 / 0.92), rgb(15 23 42 / 0.94));
      padding: clamp(1rem, 2vw, 1.3rem);
      box-shadow: 0 12px 32px rgb(2 6 23 / 0.2);
    }
    .profile-page-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr); gap: 1rem; align-items: start; }
    .profile-identity-card { display: grid; grid-template-columns: minmax(10rem, 0.42fr) minmax(0, 1fr); gap: 1.4rem; align-items: center; }
    .profile-photo-column { display: flex; flex-direction: column; align-items: center; gap: 0.65rem; text-align: center; }
    .profile-avatar-large { width: 8rem; height: 8rem; border-width: 3px; font-size: 1.65rem; box-shadow: 0 16px 38px rgb(2 6 23 / 0.38); }
    .profile-photo-column p { max-width: 15rem; color: #64748b; font-size: 0.62rem; line-height: 1.5; }
    .profile-data-column h2,
    .profile-password-card h2 { margin-top: 0.35rem; color: white; font-size: 1.15rem; font-weight: 850; }
    .profile-data-list { display: grid; gap: 0.7rem; margin-top: 1rem; }
    .profile-data-list div { border: 1px solid rgb(51 65 85 / 0.75); border-radius: 0.75rem; background: rgb(15 23 42 / 0.55); padding: 0.75rem; }
    .profile-data-list dt { color: #64748b; font-size: 0.59rem; font-weight: 850; letter-spacing: 0.06em; text-transform: uppercase; }
    .profile-data-list dd { margin-top: 0.2rem; overflow-wrap: anywhere; color: #e2e8f0; font-size: 0.76rem; font-weight: 700; }
    .profile-password-card { display: grid; gap: 1.1rem; }
    .profile-password-card > div > p { margin-top: 0.45rem; color: #94a3b8; font-size: 0.68rem; line-height: 1.55; }
    .profile-name-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.65rem; margin-top: 0.9rem; }
    .profile-field { display: grid; gap: 0.35rem; }
    .profile-field span { color: #cbd5e1; font-size: 0.65rem; font-weight: 750; }
    .profile-field input { width: 100%; border: 1px solid #334155; border-radius: 0.6rem; background: #0f172a; padding: 0.7rem 0.8rem; color: white; font-size: 0.75rem; }
    .profile-action { width: 100%; border-radius: 0.62rem; padding: 0.68rem 0.8rem; font-size: 0.67rem; font-weight: 900; transition: background 0.15s ease, border-color 0.15s ease; }
    .profile-action:disabled { cursor: wait; opacity: 0.6; }
    .profile-action-primary { border: 1px solid rgb(59 130 246 / 0.5); background: rgb(29 78 216 / 0.8); color: white; }
    .profile-action-primary:hover { background: #2563eb; }
    .profile-action-secondary { border: 1px solid rgb(239 68 68 / 0.35); background: rgb(127 29 29 / 0.35); color: #fca5a5; }
    .profile-action-secondary:hover { background: rgb(127 29 29 / 0.58); }
    .profile-action-success { border: 1px solid rgb(16 185 129 / 0.45); background: #047857; color: white; }
    .profile-action-success:hover { background: #059669; }
    .pwa-install-card {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(10rem, 15rem);
      align-items: center;
      gap: 1rem;
    }
    .pwa-install-card h2 { margin-top: 0.35rem; color: white; font-size: 1rem; font-weight: 850; }
    .pwa-install-card p { margin-top: 0.4rem; color: #94a3b8; font-size: 0.68rem; line-height: 1.55; }
    .dashboard-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; }
    .kpi-card {
      position: relative;
      min-height: 9.5rem;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      overflow: hidden;
      border: 1px solid rgb(255 255 255 / 0.1);
      border-radius: 0.9rem;
      padding: 1rem;
      color: white;
      text-align: left;
      box-shadow: 0 12px 28px rgb(2 6 23 / 0.22);
      transition: transform 0.16s ease, filter 0.16s ease;
    }
    .kpi-card::after { content: ''; position: absolute; right: -1.2rem; top: -1.2rem; width: 6rem; height: 6rem; border-radius: 999px; background: rgb(255 255 255 / 0.08); }
    .kpi-card:hover { transform: translateY(-2px); filter: brightness(1.08); }
    .kpi-card-blue { background: linear-gradient(145deg, #2563eb, #1d4ed8); }
    .kpi-card-green { background: linear-gradient(145deg, #059669, #047857); }
    .kpi-card-red { background: linear-gradient(145deg, #dc2626, #991b1b); }
    .kpi-card-amber { background: linear-gradient(145deg, #d97706, #b45309); }
    .kpi-label { position: relative; z-index: 1; font-size: 0.67rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.9; }
    .kpi-card strong { position: relative; z-index: 1; margin-top: 0.5rem; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; }
    .kpi-action { position: relative; z-index: 1; margin-top: auto; padding-top: 1rem; font-size: 0.66rem; font-weight: 800; opacity: 0.88; }
    .dashboard-progress { display: grid; grid-template-columns: minmax(12rem, 0.7fr) minmax(16rem, 1.3fr); align-items: center; gap: 1.25rem; }
    .eyebrow { display: block; color: #94a3b8; font-size: 0.61rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
    .dashboard-progress strong { display: block; margin-top: 0.3rem; color: white; font-size: 1.05rem; }
    .progress-track { height: 0.72rem; overflow: hidden; border-radius: 999px; background: #0f172a; box-shadow: inset 0 0 0 1px #334155; }
    .progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #34d399); transition: width 0.3s ease; }
    .inventario-card { position: relative; min-width: 0; overflow: hidden; padding: 0.9rem; border: 1px solid #334155; border-radius: 0.75rem; background: #0f172a; }
    .inventario-card-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 0.5rem; min-width: 0; }
    .inventario-nome { min-width: 0; overflow-wrap: anywhere; word-break: normal; }
    .inventario-percentual { flex: 0 0 auto; }
    .inventario-card.esta-encerrado { padding-top: 2.85rem; }
    .inventario-ribbon {
      position: absolute;
      top: -1px;
      right: 0.9rem;
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      width: auto;
      border: 1px solid rgb(110 231 183 / 0.55);
      border-top: 0;
      border-radius: 0 0 0.48rem 0.48rem;
      background: linear-gradient(180deg, #10b981, #047857);
      color: #ecfdf5;
      padding: 0.32rem 0.52rem 0.38rem;
      font-size: 0.55rem;
      font-weight: 900;
      letter-spacing: 0.08em;
      box-shadow: 0 5px 12px rgb(2 6 23 / 0.35);
    }
    .inventario-ribbon svg { width: 0.9rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
    .inventario-card.com-progresso {
      border: 2px solid transparent;
      background: linear-gradient(#0f172a, #0f172a) padding-box,
        linear-gradient(125deg, hsl(var(--inventario-tom) 85% 57%), hsl(var(--inventario-tom) 80% 34%)) border-box;
    }
    .inventario-card.com-progresso .inventario-percentual { color: hsl(var(--inventario-tom) 90% 74%); }
    .inventario-card.com-progresso .progress-track span {
      background: linear-gradient(90deg, hsl(var(--inventario-tom) 82% 43%), hsl(var(--inventario-tom) 85% 57%));
    }
    .inventario-card .progress-track { margin: 0.75rem 0; }
    .inventario-estatisticas { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; color: #94a3b8; font-size: 0.68rem; }
    .inventario-estatisticas strong { font-weight: 800; }
    .search-field { position: relative; min-width: 0; }
    .search-clear {
      position: absolute;
      top: 50%;
      right: 0.4rem;
      width: 1.8rem;
      height: 1.8rem;
      display: grid;
      place-items: center;
      transform: translateY(-50%);
      border-radius: 999px;
      color: #94a3b8;
      font-size: 1rem;
      line-height: 1;
    }
    .search-clear:hover { background: #334155; color: white; }
    .toast-container {
      position: fixed;
      z-index: 90;
      top: calc(var(--topbar-height) + env(safe-area-inset-top, 0px) + 0.75rem);
      right: 1rem;
      width: min(24rem, calc(100vw - 2rem));
      display: grid;
      gap: 0.65rem;
      pointer-events: none;
    }
    .app-toast {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: start;
      gap: 0.7rem;
      transform: translateY(0.7rem);
      opacity: 0;
      border: 1px solid var(--app-border);
      border-left-width: 4px;
      border-radius: 0.75rem;
      background: rgb(15 23 42 / 0.96);
      padding: 0.8rem;
      box-shadow: 0 18px 45px rgb(2 6 23 / 0.52);
      pointer-events: auto;
      transition: opacity 0.18s ease, transform 0.18s ease;
    }
    .app-toast-visible { transform: translateY(0); opacity: 1; }
    .app-toast-leaving { transform: translateX(1rem); opacity: 0; }
    .app-toast-sucesso { border-left-color: #10b981; }
    .app-toast-erro { border-left-color: #ef4444; }
    .app-toast-aviso { border-left-color: #f59e0b; }
    .app-toast-info { border-left-color: #3b82f6; }
    .app-toast-icon { width: 1.45rem; height: 1.45rem; display: grid; place-items: center; border-radius: 999px; background: #334155; color: white; font-size: 0.72rem; font-weight: 900; }
    .app-toast-content strong { display: block; margin-bottom: 0.15rem; color: white; font-size: 0.72rem; }
    .app-toast-content p { color: #cbd5e1; font-size: 0.7rem; line-height: 1.45; }
    .app-toast-action {
      margin-top: 0.6rem;
      border: 1px solid rgb(96 165 250 / 0.45);
      border-radius: 0.45rem;
      background: rgb(29 78 216 / 0.75);
      color: white;
      padding: 0.45rem 0.65rem;
      font-size: 0.62rem;
      font-weight: 900;
    }
    .app-toast-action:hover { background: #2563eb; }
    .app-toast-close { color: #94a3b8; font-size: 1rem; line-height: 1; }
    .app-toast-close:hover { color: white; }
    .app-modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 100;
      display: grid;
      place-items: center;
      background: rgb(2 6 23 / 0.82);
      padding: 1rem;
      backdrop-filter: blur(4px);
    }
    .app-dialog { width: min(29rem, 100%); border: 1px solid #475569; border-radius: 1rem; background: #1e293b; padding: 1.2rem; box-shadow: 0 24px 70px rgb(2 6 23 / 0.65); }
    .app-dialog-icon { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 999px; background: rgb(245 158 11 / 0.16); color: #fbbf24; font-weight: 900; }
    .app-dialog-copy { margin-top: 0.85rem; }
    .app-dialog-copy h2 { color: white; font-size: 1rem; font-weight: 800; }
    .app-dialog-copy p { margin-top: 0.45rem; color: #cbd5e1; font-size: 0.75rem; line-height: 1.55; }
    .app-dialog-actions { display: flex; justify-content: flex-end; gap: 0.65rem; margin-top: 1.2rem; }
    .app-button { min-height: 2.55rem; border-radius: 0.65rem; padding: 0.55rem 0.9rem; font-size: 0.72rem; font-weight: 800; }
    .app-button-secondary { border: 1px solid #475569; background: #334155; color: #e2e8f0; }
    .app-button-primary { background: #2563eb; color: white; }
    .app-button-danger { background: #dc2626; color: white; }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 45; background: rgb(2 6 23 / 0.72); backdrop-filter: blur(2px); }
    .transfer-group {
      overflow: hidden;
      border: 1px solid #334155;
      border-radius: 0.9rem;
      background: rgb(15 23 42 / 0.72);
      box-shadow: 0 12px 28px rgb(2 6 23 / 0.18);
    }
    .transfer-group + .transfer-group { margin-top: 0.8rem; }
    .transfer-group-summary {
      display: flex;
      min-height: 3.8rem;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      cursor: pointer;
      list-style: none;
      padding: 0.85rem 1rem;
      background: #1e293b;
      color: white;
    }
    .transfer-group-summary::-webkit-details-marker { display: none; }
    .transfer-group-summary > span:first-child { display: grid; gap: 0.18rem; min-width: 0; }
    .transfer-group-summary strong { overflow-wrap: anywhere; font-size: 0.78rem; }
    .transfer-group-summary small { color: #94a3b8; font-size: 0.62rem; font-weight: 700; }
    .transfer-group-chevron { color: #94a3b8; font-size: 1.15rem; transition: transform 0.18s ease; }
    .transfer-group[open] .transfer-group-chevron { transform: rotate(180deg); }
    .transfer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; padding: 0.8rem; }
    .transfer-card { display: flex; min-width: 0; flex-direction: column; gap: 0.7rem; border: 1px solid #334155; border-radius: 0.75rem; background: #1e293b; padding: 0.85rem; }
    .transfer-card-link { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; color: #93c5fd; font-size: 0.76rem; font-weight: 900; text-align: left; }
    .transfer-card-link:hover span:first-child { text-decoration: underline; }
    .transfer-status { flex: none; border: 1px solid rgb(245 158 11 / 0.28); border-radius: 999px; background: rgb(120 53 15 / 0.38); padding: 0.18rem 0.45rem; color: #fde68a; font-size: 0.54rem; text-transform: uppercase; }
    .transfer-description { color: #e2e8f0; font-size: 0.7rem; line-height: 1.45; }
    .transfer-route { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
    .transfer-route div { min-width: 0; border-radius: 0.55rem; background: #0f172a; padding: 0.6rem; }
    .transfer-route dt { color: #64748b; font-size: 0.54rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; }
    .transfer-route dd { margin-top: 0.18rem; overflow-wrap: anywhere; color: #cbd5e1; font-size: 0.66rem; font-weight: 700; }
    .transfer-route div:last-child dd { color: #6ee7b7; }
    .transfer-note { border: 1px solid rgb(245 158 11 / 0.6); border-left: 4px solid #f59e0b; border-radius: 0.6rem; background: rgb(120 53 15 / 0.24); padding: 0.75rem; line-height: 1.5; }
    .transfer-note strong { display: block; margin-bottom: 0.25rem; color: #fde68a; font-size: 0.7rem; }
    .transfer-note p { color: #f8fafc; font-size: 0.72rem; white-space: pre-wrap; overflow-wrap: anywhere; }
    .patrimonio-card--localizados { border-color: #10b981; }
    .patrimonio-card--localizados:hover { border-color: #6ee7b7; }
    .patrimonio-card--aguardando { border-color: #f59e0b; }
    .patrimonio-card--aguardando:hover { border-color: #fcd34d; }
    .patrimonio-card--pendentes { border-color: #ef4444; }
    .patrimonio-card--pendentes:hover { border-color: #fca5a5; }
    .transfer-actions { display: grid; grid-template-columns: 1fr auto; gap: 0.55rem; margin-top: auto; }
    .transfer-actions button { min-height: 2.35rem; border-radius: 0.55rem; padding: 0.45rem 0.8rem; font-size: 0.67rem; font-weight: 900; }
    .transfer-approve { background: #059669; color: white; }
    .transfer-approve:hover { background: #10b981; }
    .transfer-reject { border: 1px solid rgb(239 68 68 / 0.35); background: rgb(127 29 29 / 0.5); color: #fecaca; }
    .transfer-reject:hover { background: rgb(153 27 27 / 0.75); }

    body.sidebar-collapsed .app-shell { grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr); }
    body.sidebar-collapsed .app-sidebar { width: var(--sidebar-collapsed-width); }
    body.sidebar-collapsed .sidebar-label { display: none !important; }
    body.sidebar-collapsed .sidebar-brand,
    body.sidebar-collapsed .sidebar-profile { justify-content: center; padding-left: 0.55rem; padding-right: 0.55rem; }
    body.sidebar-collapsed .sidebar-profile { margin-left: 0.55rem; margin-right: 0.55rem; }
    body.sidebar-collapsed .nav-item { justify-content: center; padding-left: 0.5rem; padding-right: 0.5rem; }

    @media (min-width: 1024px) {
      body.sidebar-collapsed .app-sidebar:is(:hover, :focus-within) {
        width: var(--sidebar-width);
        box-shadow: 18px 0 45px rgb(2 6 23 / 0.45);
      }
      body.sidebar-collapsed .app-sidebar:is(:hover, :focus-within) .sidebar-label { display: block !important; }
      body.sidebar-collapsed .app-sidebar:is(:hover, :focus-within) .sidebar-footer.sidebar-label { display: flex !important; }
      body.sidebar-collapsed .app-sidebar:is(:hover, :focus-within) .sidebar-brand,
      body.sidebar-collapsed .app-sidebar:is(:hover, :focus-within) .sidebar-profile,
      body.sidebar-collapsed .app-sidebar:is(:hover, :focus-within) .nav-item { justify-content: flex-start; }
      body.sidebar-collapsed .app-sidebar:is(:hover, :focus-within) .sidebar-brand,
      body.sidebar-collapsed .app-sidebar:is(:hover, :focus-within) .sidebar-profile { padding-left: 1rem; padding-right: 1rem; }
      body.sidebar-collapsed .app-sidebar:is(:hover, :focus-within) .sidebar-profile { margin-left: 0.85rem; margin-right: 0.85rem; }
      body.sidebar-collapsed .app-sidebar:is(:hover, :focus-within) .nav-item { padding-left: 0.75rem; padding-right: 0.75rem; }
    }

    @media (max-width: 1023px) {
      .app-shell { display: block; }
      .app-sidebar { position: fixed; left: 0; transform: translateX(-105%); width: min(84vw, 19rem); }
      body.sidebar-open { overflow: hidden; }
      body.sidebar-open .app-sidebar { transform: translateX(0); }
      body.sidebar-collapsed .app-sidebar { width: min(84vw, 19rem); }
      body.sidebar-collapsed .sidebar-label { display: initial !important; }
      body.sidebar-collapsed .sidebar-section-label { display: block !important; }
      body.sidebar-collapsed .sidebar-brand,
      body.sidebar-collapsed .sidebar-profile,
      body.sidebar-collapsed .nav-item { justify-content: flex-start; }
      .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .transfer-grid { grid-template-columns: 1fr; }
      .profile-page-grid { grid-template-columns: 1fr; }
    }
    @media (max-width: 639px) {
      .escopo-barra { flex-direction: column; align-items: stretch; gap: 0.65rem; }
      .escopo-barra select { flex: none; width: 100%; }
      .app-topbar { min-height: 64px; padding: 0.55rem 0.75rem; }
      .profile-trigger-copy, .breadcrumb { display: none; }
      .app-content { padding: 0.85rem; }
      .dashboard-kpis { gap: 0.65rem; }
      .kpi-card { min-height: 8rem; padding: 0.8rem; }
      .kpi-label { font-size: 0.58rem; }
      .kpi-card strong { font-size: 2rem; }
      .dashboard-progress { grid-template-columns: 1fr; gap: 0.75rem; }
      .app-footer { flex-direction: column; align-items: center; gap: 0.25rem; }
      .toast-container { top: calc(64px + env(safe-area-inset-top, 0px) + 0.6rem); right: 0.75rem; width: calc(100vw - 1.5rem); }
      .app-dialog-actions { flex-direction: column-reverse; }
      .app-dialog-actions .app-button { width: 100%; }
      .transfer-route { grid-template-columns: 1fr; }
      .transfer-actions { grid-template-columns: 1fr 1fr; }
      .profile-identity-card { grid-template-columns: 1fr; }
      .profile-name-form { grid-template-columns: 1fr; }
      .profile-avatar-large { width: 7rem; height: 7rem; }
      .app-offline-banner { top: 64px; flex-direction: column; gap: 0.15rem; }
      .pwa-install-card { grid-template-columns: 1fr; }
    }

    @media (display-mode: standalone) {
      .app-topbar { padding-top: max(0.65rem, env(safe-area-inset-top, 0px)); }
      .app-sidebar { padding-top: env(safe-area-inset-top, 0px); }
    }

    .accordion-content { transition: max-height 0.3s ease-out; overflow: hidden; }
    .accordion-content.collapsed { max-height: 0 !important; }
    .scanner-laser {
      display: none;
      position: absolute;
      top: 32%; left: 10%; right: 10%;
      height: 2px;
      background: #ef4444;
      box-shadow: 0 0 10px #ef4444;
      animation: scanner-move 1.8s ease-in-out infinite;
      z-index: 50;
      pointer-events: none;
    }
    #reader-container.camera-running .scanner-laser { display: block; }
    #reader-container.camera-paused .scanner-laser { display: none; }
    @keyframes scanner-move {
      0%, 100% { top: 32%; opacity: 0.35; }
      50% { top: 68%; opacity: 1; }
    }
    #reader video {
      width: 100% !important;
      object-fit: cover;
      transform: scale(var(--camera-css-zoom, 1));
      transform-origin: center center;
      transition: transform 0.1s ease-out;
    }
    #reader-container {
      --camera-css-zoom: 1;
      isolation: isolate;
      touch-action: pan-y;
    }
    #reader { min-height: 240px; }
    #reader > div:first-child { border: 0 !important; }
    .camera-guide {
      display: none;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 45;
      width: min(82%, 360px);
      aspect-ratio: 2 / 1;
      border: 2px solid rgba(255, 255, 255, 0.72);
      border-radius: 0.65rem;
      box-shadow: 0 0 0 999px rgba(2, 6, 23, 0.2);
      pointer-events: none;
    }
    #reader-container.camera-running .camera-guide { display: block; }
    #reader-container.camera-success .camera-guide {
      border-color: #34d399;
      box-shadow: 0 0 0 999px rgba(2, 6, 23, 0.2), 0 0 18px rgba(52, 211, 153, 0.8);
    }
    .camera-status {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      min-height: 2.25rem;
      padding: 0.55rem 0.7rem;
      border: 1px solid rgb(51 65 85);
      border-radius: 0.5rem;
      background: rgb(15 23 42 / 0.85);
      color: rgb(203 213 225);
      font-size: 0.7rem;
      line-height: 1.2;
    }
    .camera-status-running { border-color: rgb(16 185 129 / 0.5); color: rgb(167 243 208); }
    .camera-status-paused { border-color: rgb(245 158 11 / 0.5); color: rgb(253 230 138); }
    .camera-status-result { display: none; }
    .camera-status-error { border-color: rgb(239 68 68 / 0.55); color: rgb(254 202 202); }
    .camera-status-starting { border-color: rgb(59 130 246 / 0.5); color: rgb(191 219 254); }
    .camera-controls {
      grid-template-columns: minmax(0, 1.3fr) minmax(150px, 1fr);
      gap: 0.65rem;
      align-items: end;
    }
    .camera-controls:not(.hidden) { display: grid; }
    .camera-control { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
    .camera-control > span { color: rgb(148 163 184); font-size: 0.65rem; font-weight: 700; }
    .camera-control-wide { grid-column: 1 / -1; }
    .camera-action-row { align-items: flex-start; }
    .camera-range { width: 100%; accent-color: #3b82f6; }
    .camera-action-button,
    .camera-capability-badge {
      border: 1px solid rgb(71 85 105);
      border-radius: 0.375rem;
      background: rgb(30 41 59);
      color: rgb(226 232 240);
      padding: 0.35rem 0.5rem;
      font-size: 0.65rem;
      font-weight: 700;
      white-space: nowrap;
    }
    .camera-action-button[aria-pressed="true"] { border-color: #f59e0b; color: #fde68a; }
    .camera-capability-badge.unsupported { color: rgb(148 163 184); opacity: 0.75; }
    .camera-feedback {
      border: 1px solid rgb(16 185 129 / 0.45);
      border-radius: 0.5rem;
      background: rgb(6 78 59 / 0.45);
      color: rgb(167 243 208);
      padding: 0.55rem 0.7rem;
      text-align: center;
      font-size: 0.7rem;
      font-weight: 700;
    }
    .camera-assistance {
      border: 1px solid rgb(245 158 11 / 0.45);
      border-radius: 0.6rem;
      background: rgb(120 53 15 / 0.35);
      padding: 0.7rem;
    }
    .camera-assistance:not(.hidden) { display: grid; gap: 0.55rem; }
    .camera-assistance-button {
      border: 1px solid rgb(245 158 11 / 0.45);
      border-radius: 0.4rem;
      background: rgb(146 64 14 / 0.75);
      color: rgb(255 251 235);
      padding: 0.45rem 0.55rem;
      font-size: 0.68rem;
      font-weight: 700;
      transition: background-color 0.15s ease, border-color 0.15s ease;
    }
    .camera-assistance-button:hover,
    .camera-assistance-button:focus-visible {
      background: rgb(180 83 9);
      border-color: rgb(251 191 36);
      box-shadow: 0 0 0 2px rgb(15 23 42), 0 0 0 4px rgb(251 191 36);
      outline: none;
    }
    .camera-assistance-secondary { background: rgb(30 41 59 / 0.8); border-color: rgb(71 85 105); color: rgb(203 213 225); }
    .scanner-form-stack { min-width: 0; }
    .patrimonio-nao-encontrado {
      display: grid;
      gap: 0.75rem;
      border: 1px solid rgb(245 158 11 / 0.48);
      border-radius: 0.75rem;
      background: linear-gradient(145deg, rgb(120 53 15 / 0.42), rgb(15 23 42 / 0.96));
      padding: 0.9rem;
      box-shadow: 0 12px 30px rgb(2 6 23 / 0.24);
    }
    .patrimonio-nao-encontrado-heading { display: flex; align-items: center; gap: 0.7rem; }
    .patrimonio-nao-encontrado-icon { width: 2.3rem; height: 2.3rem; display: grid; flex: none; place-items: center; border-radius: 999px; background: rgb(245 158 11 / 0.18); color: #fcd34d; font-weight: 900; }
    .patrimonio-nao-encontrado-heading strong { display: block; margin-top: 0.16rem; color: white; font-size: 0.88rem; }
    .patrimonio-nao-encontrado p { color: #fde68a; font-size: 0.69rem; line-height: 1.5; }
    .patrimonio-nao-encontrado button { min-height: 2.35rem; border: 1px solid rgb(245 158 11 / 0.45); border-radius: 0.55rem; background: rgb(180 83 9 / 0.82); color: white; font-size: 0.67rem; font-weight: 900; }
    .patrimonio-nao-encontrado button:hover { background: #d97706; }
    .leitura-resultado {
      border: 1px solid rgb(16 185 129 / 0.5);
      border-radius: 0.75rem;
      background: linear-gradient(145deg, rgb(6 78 59 / 0.55), rgb(15 23 42 / 0.96));
      padding: 0.8rem;
      box-shadow: 0 12px 30px rgb(2 6 23 / 0.28);
    }
    .leitura-resultado:not(.hidden) { display: grid; gap: 0.65rem; }
    .leitura-resultado:focus { outline: 2px solid rgb(52 211 153); outline-offset: 2px; }
    .leitura-preview-container {
      position: relative;
      overflow: hidden;
      border: 1px solid rgb(51 65 85);
      border-radius: 0.55rem;
      background: #020617;
      min-height: 72px;
    }
    #leitura-preview { display: block; width: 100%; height: auto; }
    #scanner-camera-card,
    #leitura-resultado { scroll-margin-top: 1rem; }
    @media (orientation: landscape) and (max-height: 560px) {
      #reader, #reader-container { min-height: 190px; }
    }
    @media (max-width: 480px) {
      .camera-controls { grid-template-columns: 1fr; }
      .camera-control-wide { grid-column: auto; }
    }
    @media (prefers-reduced-motion: reduce) {
      .scanner-laser { animation: none; top: 50%; }
      #reader video,
      .camera-assistance-button,
      .app-toast,
      .transfer-group-chevron { transition: none; }
    }
