/* Identidade visual da área interna. Nenhum seletor desta folha altera o login. */
#app {
  --sdo-surface: #ffffff;
  --sdo-canvas: #f3f8f9;
  --sdo-ink: #133c39;
  --sdo-subtle: #647c80;
  --sdo-line: #e2eef0;
  --sdo-green: #087c48;
  --sdo-green-dark: #063d31;
  --sdo-soft-green: #e7f6ed;
  --sdo-shadow: 0 6px 20px rgba(24, 84, 79, .06);
  background: var(--sdo-canvas);
  color: var(--sdo-ink);
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
#app .side {
  width: 258px;
  padding: 27px 14px 22px;
  background: linear-gradient(155deg, #052f2b 0%, #043b32 70%, #074936 100%);
  box-shadow: 2px 0 18px rgba(4, 53, 46, .08);
  transition: transform .22s ease, width .22s ease;
}
#app .sidehead { min-height: 75px; padding: 2px 6px 22px; gap: 11px; border-color: rgba(255,255,255,.14); }
#app .sidehead .slogo { width: 49px; height: 49px; flex: 0 0 49px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); }
#app .sidehead > div:last-child { min-width: 0; }
#app .sidehead strong { font-size: 19px; line-height: 1; }
#app .sidehead small { font-size: 10px; line-height: 1.3; opacity: .76; }
#app .nav { padding-top: 19px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
#app .nav button { display:flex; align-items:center; gap: 10px; min-height: 43px; padding: 9px 12px; margin: 3px 0; border-radius: 9px; font-weight: 600; font-size: 13px; color: #d0e9e3; transition: background .2s ease, color .2s ease; }
#app .nav button span { min-width: 0; }
#app .nav button:hover { background: rgba(255,255,255,.09); color: #fff; }
#app .nav button.active { background: linear-gradient(90deg, #078f58, #087755); color: #fff; box-shadow: 0 5px 14px rgba(0,23,19,.13); }
#app .side-foot { border-top: 1px solid rgba(255,255,255,.13); padding: 16px 8px 0; font-size: 11px; line-height: 1.45; color: #d2e8de; }
#app .side-foot strong { display: block; font-weight: 650; }
#app .side-foot small { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: #b9d9cc; }
#app .side-foot small:before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #29c883; }
#app .sideuser { margin-top: 16px; padding-top: 14px; border-color: rgba(255,255,255,.12); }
#app .avatar { background: #0b7554; color: #fff; flex: 0 0 37px; }
#app .main { margin-left: 258px; min-width: 0; transition: margin-left .22s ease; }
#app .top { min-height: 73px; height: auto; gap: 16px; padding: 12px 28px; background: #fff; border-color: var(--sdo-line); }
#app .top-left { display: flex; align-items: center; min-width: 0; gap: 16px; flex: 1; }
#app .menu-toggle { width: 32px; height: 32px; display:grid; place-items:center; flex:0 0 32px; border-radius:7px; color: var(--sdo-green-dark); cursor:pointer; }
#app .menu-toggle:hover { background: var(--sdo-soft-green); }
#app .menu-toggle svg, #app .top-icon svg { width: 20px; height: 20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
#app #nav-switch { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
#app .top-search { position:relative; width:min(380px,100%); min-width:0; display:flex; align-items:center; gap:9px; padding:0 14px; border-radius:9px; background:#f3f9fb; color:var(--sdo-subtle); border:1px solid transparent; }
#app .top-search:focus-within { border-color:#4dae80; background:#fff; }
#app .top-search svg { width:17px; height:17px; flex:0 0 17px; fill:none; stroke:currentColor; stroke-width:2; }
#app .top-search input { min-width:0; width:100%; border:0; outline:0; height:39px; background:transparent; color:var(--sdo-ink); font-size:13px; }
#app .top-search input::placeholder { color:#8299a0; }
#app .crumb { display:none; }
#app .topright { flex:0 0 auto; gap:11px; }
#app .top-icon { width:34px; height:34px; display:grid; place-items:center; border:0; background:transparent; color:var(--sdo-green-dark); }
#app .top-user { display:flex; align-items:center; gap:9px; padding-left:14px; border-left:1px solid var(--sdo-line); min-width:0; }
#app .top-avatar { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border-radius:50%; background:var(--sdo-green-dark); color:#fff; font-weight:800; font-size:12px; }
#app .top-user-text { display:flex; flex-direction:column; min-width:0; max-width:130px; line-height:1.25; }
#app .top-user-text strong { font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#app .top-user-text small { font-size:10px; color:var(--sdo-subtle); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#app .topright .pill { display:none; }
#app .logout { border:0; padding:7px 9px; background:transparent; color:var(--sdo-subtle); font-size:12px; }
#app .logout:hover { color:var(--sdo-green); background:var(--sdo-soft-green); }
#app .content { max-width:none; padding:20px clamp(18px,2.2vw,36px) 48px; }
#app .view { min-width:0; }
#app .head { align-items:center; margin:0 0 22px; }
#app .head h1 { font-size:27px; line-height:1.2; color:var(--sdo-ink); }
#app .head p { font-size:13px; color:var(--sdo-subtle); }
#app .btn, #app .mini { border-radius:9px; transition:background .2s ease, transform .2s ease, box-shadow .2s ease; }
#app .btn { background:var(--sdo-green); }
#app .btn:hover { background:#07673e; transform:translateY(-1px); }
#app .btn.secondary, #app .mini { background:#fff; color:var(--sdo-green); border:1px solid #cce2d5; }
#app .btn.secondary:hover, #app .mini:hover { background:var(--sdo-soft-green); }
#app .btn.danger { background:#fff; }
#app .grid4 { gap:13px; }
#app .grid3, #app .grid2 { gap:15px; }
#app .grid2 { min-width:0; }
#app .card { min-width:0; background:var(--sdo-surface); border-color:var(--sdo-line); border-radius:14px; box-shadow:var(--sdo-shadow); padding:20px; }
#app .metric { min-height:142px; transition:transform .2s ease, box-shadow .2s ease; }
#app .metric:hover { transform:translateY(-3px); box-shadow:0 9px 24px rgba(24,84,79,.1); }
#app .metric .ic { width:43px; height:43px; border-radius:11px; background:var(--sdo-soft-green); }
#app .metric strong { font-size:30px; line-height:1.1; color:var(--sdo-ink); }
#app .metric span { font-size:12px; color:var(--sdo-subtle); }
#app .sectitle h3 { font-size:16px; }
#app .sectitle a { cursor:pointer; color:var(--sdo-green); font-size:12px; font-weight:700; }
#app .item { border-color:var(--sdo-line); border-radius:9px; }
#app .item + .item { margin-top:4px; }
#app .item small { line-height:1.5; }
#app .table { width:100%; }
#app .table th { color:var(--sdo-subtle); border-color:var(--sdo-line); }
#app .table td { padding-top:14px; padding-bottom:14px; border-color:var(--sdo-line); }
#app .table tbody tr:hover { background:#f6fbf9; }
#app .status { border-radius:6px; font-size:11px; }
#app .field label { color:var(--sdo-ink); }
#app .field input, #app .field select, #app .field textarea, #app .filters input, #app .filters select { border-color:#d3e3df; }
#app .field input:focus, #app .field select:focus, #app .field textarea:focus, #app .filters input:focus, #app .filters select:focus { outline:0; border-color:var(--sdo-green); box-shadow:0 0 0 3px rgba(8,124,72,.1); }
#app .day { border-color:var(--sdo-line); }
#app .note { background:#f3faf6; }
#app .intro-banner { position:relative; overflow:hidden; margin-bottom:16px; border-radius:18px; background:var(--sdo-green-dark); box-shadow:var(--sdo-shadow); }
#app .intro-art { display:block; width:100%; height:auto; }

#app .home-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
#app .home-metrics .metric { display:grid; grid-template-columns:44px 1fr; grid-template-rows:auto auto; column-gap:13px; align-content:center; gap:2px; }
#app .home-metrics .ic { grid-row:1/3; align-self:start; }
#app .home-metrics .metric strong { margin:0; grid-column:2; grid-row:2; }
#app .home-metrics .metric span { grid-column:2; grid-row:1; font-weight:600; }
#app .home-access { margin-top:17px; }
#app .home-access .sectitle { margin-bottom:10px; }
#app .home-access-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; }
#app .home-access-card { min-width:0; display:flex; align-items:center; gap:12px; text-align:left; padding:14px; border:1px solid var(--sdo-line); border-radius:13px; background:#fff; color:var(--sdo-ink); box-shadow:var(--sdo-shadow); transition:transform .2s ease, box-shadow .2s ease; }
#app .home-access-card:hover { transform:translateY(-2px); box-shadow:0 9px 24px rgba(24,84,79,.11); }
#app .home-access-card .ic { flex:0 0 39px; width:39px; height:39px; display:grid; place-items:center; border-radius:10px; background:var(--sdo-soft-green); font-size:19px; }
#app .home-access-card strong { display:block; font-size:12px; }
#app .home-access-card small { display:block; margin-top:3px; color:var(--sdo-subtle); font-size:10px; line-height:1.35; }
#app .home-access-card .arrow { margin-left:auto; flex:0 0 auto; color:var(--sdo-green); font-weight:800; }
#app .home-details { margin-top:17px; }
#app .home-details .card { overflow:auto; }
@media (min-width:951px) {
  #app #nav-switch:checked ~ .side { width:78px; }
  #app #nav-switch:checked ~ .side .sidehead > div:last-child, #app #nav-switch:checked ~ .side .nav span, #app #nav-switch:checked ~ .side .side-foot, #app #nav-switch:checked ~ .side .sideuser > div:last-child { display:none; }
  #app #nav-switch:checked ~ .side .sidehead, #app #nav-switch:checked ~ .side .sideuser { justify-content:center; }
  #app #nav-switch:checked ~ .main { margin-left:78px; }
}
@media (max-width:1100px) {
  #app .home-metrics, #app .home-access-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:950px) {
  #app .side { width:258px; transform:translateX(-100%); }
  #app .sidehead > div:last-child, #app .nav span, #app .sideuser > div:last-child { display:block; }
  #app .sidehead, #app .sideuser { justify-content:flex-start; }
  #app .main { margin-left:0; }
  #app #nav-switch:checked ~ .side { transform:translateX(0); }
  #app .nav-shade { display:none; position:fixed; inset:0; z-index:4; background:rgba(2,31,28,.45); }
  #app #nav-switch:checked ~ .nav-shade { display:block; }
}
@media (max-width:650px) {
  #app .top { padding:9px 14px; min-height:61px; }
  #app .top-left { gap:7px; }
  #app .top-search { padding:0 9px; }
  #app .top-search input { font-size:12px; }
  #app .top-user { padding-left:8px; }
  #app .top-user-text, #app .top-icon { display:none; }
  #app .topright { gap:2px; }
  #app .logout { padding:5px; }
  #app .content { padding:14px 12px 32px; }
  #app .intro-banner { border-radius:13px; }

  #app .home-metrics, #app .home-access-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  #app .home-metrics .metric { min-height:112px; grid-template-columns:1fr; padding:13px; gap:3px; }
  #app .home-metrics .metric .ic, #app .home-metrics .metric strong, #app .home-metrics .metric span { grid-column:1; grid-row:auto; }
  #app .home-metrics .metric .ic { width:32px; height:32px; font-size:16px; }
  #app .home-metrics .metric strong { font-size:24px; }
  #app .home-access-card { padding:10px; gap:7px; }
  #app .home-access-card .ic { flex-basis:30px; width:30px; height:30px; font-size:15px; }
  #app .home-access-card .arrow { display:none; }
  #app .grid2 { grid-template-columns:minmax(0,1fr); }
  #app .card { padding:14px; overflow-x:auto; }
  #app .head h1 { font-size:23px; }
  #app .filters > * { max-width:100%; }
  #app .table { min-width:500px; }
  #app .agenda { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  #app *, #app *:before, #app *:after { transition-duration:.01ms!important; animation-duration:.01ms!important; }
}#app .nav button svg { width:17px; height:17px; flex:0 0 17px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
#app .metric .ic svg, #app .home-access-card .ic svg { width:22px; height:22px; fill:none; stroke:var(--sdo-green); stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
#app .home-secondary-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; margin-top:13px; }
#app .home-secondary-metrics .metric { min-height:93px; display:grid; grid-template-columns:44px 1fr; grid-template-rows:auto auto; align-content:center; gap:2px 13px; }
#app .home-secondary-metrics .ic { grid-row:1/3; }
#app .home-secondary-metrics .metric strong { grid-column:2; grid-row:2; margin:0; font-size:23px; }
#app .home-secondary-metrics .metric span { grid-column:2; grid-row:1; }
@media (max-width:650px) { #app .home-secondary-metrics { gap:9px; } #app .home-secondary-metrics .metric { min-height:86px; padding:12px; grid-template-columns:34px 1fr; gap:2px 7px; } }
/* Keep the photographic dashboard treatment and the drawer stable on narrow screens. */
#app .side { flex-shrink:0; }
#app .top-search input[readonly] { cursor:default; }
@media (max-width:950px) { #app .side { z-index:6; } }
#app .top-search{overflow:visible}
#app .top-results{display:none;position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:30;max-height:360px;overflow:auto;background:#fff;border:1px solid var(--sdo-line);border-radius:10px;box-shadow:0 12px 30px rgba(24,84,79,.14);padding:5px}
#app .top-results.open{display:block}
#app .top-results button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;border:0;background:transparent;text-align:left;padding:8px 10px;border-radius:7px;color:var(--sdo-ink);font-size:13px}
#app .top-results button:hover{background:var(--sdo-soft-green)}
#app .top-results small{font-size:10px;font-weight:700;color:var(--sdo-green);text-transform:uppercase}
#app .top-results span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
#app .top-empty{padding:10px;font-size:12px;color:var(--sdo-subtle)}
#app .works-grid{grid-template-columns:minmax(0,2.2fr) minmax(260px,1fr);align-items:start}
#app .card{overflow-x:auto}
#app .table th,#app .table td{white-space:nowrap;vertical-align:middle}
#app .table td b{white-space:normal;min-width:120px;display:inline-block}
#app .table td .btn{padding:7px 11px;font-size:12px;margin:2px 4px 2px 0}
#app .btn.danger{color:#b42318;border:1px solid #f1c4bf}
#app .btn.danger:hover{background:#fdecea}
@media (max-width:1100px){#app .works-grid{grid-template-columns:minmax(0,1fr)}}
/* Mapa da cidade: link disponível para todos os usuários na tela de Localização. */
#app .maplink-card{margin-bottom:16px}
#app .maplink-row{display:grid;grid-template-columns:54px minmax(0,1fr);gap:15px;align-items:center}
#app .maplink-ic{width:54px;height:54px;display:grid;place-items:center;border-radius:14px;background:var(--sdo-soft-green);color:var(--sdo-green)}
#app .maplink-ic svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#app .maplink-text strong{display:block;font-size:16px;color:var(--sdo-ink)}
#app .maplink-text span{display:block;margin-top:5px;color:var(--sdo-subtle);font-size:12px;line-height:1.55;max-width:660px}
#app .maplink-btn{display:inline-flex;align-items:center;gap:8px;margin-top:13px;padding:11px 16px;border-radius:10px;background:var(--sdo-green);color:#fff;font-size:13px;font-weight:800;text-decoration:none;transition:background .2s ease,transform .2s ease,box-shadow .2s ease}
#app .maplink-btn:hover{background:#07673e;transform:translateY(-1px);box-shadow:0 7px 18px rgba(8,124,72,.22)}
#app .maplink-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
@media (max-width:650px){#app .maplink-row{grid-template-columns:1fr;gap:11px}#app .maplink-ic{width:42px;height:42px;border-radius:11px}#app .maplink-ic svg{width:22px;height:22px}#app .maplink-text strong{font-size:15px}#app .maplink-btn{width:100%;justify-content:center}}
/* Ajuste tipográfico: botões e filtros com letras levemente menores e menos negrito, sem mudar tamanho nem estilo. */
#app .btn, #app .mini { font-size:13px; font-weight:600; }
#app .btn.wbig { font-size:14px; font-weight:700; }
#app .proc-tabs button { font-size:13px; font-weight:600; }
#app .filters input, #app .filters select, #app .field input, #app .field select, #app .field textarea { font-size:13px; }
#app .field label { font-weight:600; }
/* Padrão tipográfico único da área interna: uma fonte e uma escala de tamanhos. */
#app { --fs-xs:11px; --fs-sm:12px; --fs-base:13px; --fs-md:14px; --fs-lg:16px; --fs-xl:24px; --fs-num:28px; }
#app, #app button, #app input, #app select, #app textarea { font-family:Inter, system-ui, -apple-system, 'Segoe UI', sans-serif !important; }
#app .content { font-size:var(--fs-base); line-height:1.5; }
#app .head h1 { font-size:var(--fs-xl) !important; font-weight:700; }
#app .head p, #app .content p { font-size:var(--fs-base); }
#app .sectitle h3, #app .card h3, #app .modal h2, #app .modal h3, #app .formsec h3, #app .formsec h4 { font-size:var(--fs-lg) !important; font-weight:700; }
#app .metric strong, #app .proc-metrics strong { font-size:var(--fs-num) !important; font-weight:700; }
#app .metric span, #app .proc-metrics span { font-size:var(--fs-sm) !important; }
#app .btn, #app .mini, #app .proc-tabs button, #app .logout { font-size:var(--fs-base) !important; font-weight:600; }
#app .btn.wbig { font-size:var(--fs-md) !important; }
#app .field label { font-size:var(--fs-sm) !important; font-weight:600; }
#app .field input, #app .field select, #app .field textarea, #app .filters input, #app .filters select, #app .top-search input { font-size:var(--fs-base) !important; }
#app .table th { font-size:var(--fs-xs) !important; font-weight:700; }
#app .table td, #app .item { font-size:var(--fs-base) !important; }
#app .item small, #app .card small, #app .note { font-size:var(--fs-sm) !important; }
#app .status, #app .prio { font-size:var(--fs-xs) !important; font-weight:600; }
#app .nav button { font-size:var(--fs-base) !important; }
@media (max-width:650px) { #app { --fs-xl:21px; --fs-num:23px; } }

/* Lançamentos de alvarás e Habite-se */
#app .permit-actions{display:flex;gap:10px;flex-wrap:wrap}
@media (max-width:800px){#app #alvaras .head{flex-direction:column;align-items:flex-start;gap:12px}#app .permit-actions{width:100%}#app .permit-actions .btn{flex:1 1 150px}}

/* Comunicados, sino e permissão de exclusão */
#app.nodel [onclick*="delItem("],#app.nodel [onclick*="deleteUser("]{display:none !important}
#app .bell-btn{position:relative;border:0;background:transparent;cursor:pointer}
#app .bell-count{position:absolute;top:-4px;right:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--danger,#d64545);color:#fff;font-size:11px;font-weight:600;line-height:18px;text-align:center}
#app .bell-count[hidden]{display:none}
#app .notice{border:1px solid var(--line,#e3e8e4);border-radius:12px;padding:14px 16px;margin-bottom:12px;background:#fff}
#app .notice.unread{border-left:4px solid var(--green,#1f7a4d);background:#f4faf6}
#app .notice-top{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
#app .notice-top small{color:var(--muted,#6b7a72)}
#app .notice p{margin:8px 0}
#app .notice-dem{font-size:13px;margin:6px 0;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
#app .notice-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
#app .notice-users{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:6px;margin:-4px 0 12px;padding:10px;border:1px solid var(--line,#e3e8e4);border-radius:10px}
#app .notice-users label{display:flex;gap:6px;align-items:center;font-size:13px}
#app .notice-users small{color:var(--muted,#6b7a72)}
