/* CityReport · sistema visual unificado. Conserva los colores y marcas existentes. */
:root {
  --cr-navy: #154965;
  --cr-navy-deep: #10394d;
  --cr-teal: #0e7b80;
  --cr-teal-soft: #e9f5f5;
  --cr-orange: #f18f01;
  --cr-ink: #173445;
  --cr-muted: #627786;
  --cr-canvas: #f3f7f9;
  --cr-paper: #ffffff;
  --cr-line: #e1eaee;
  --cr-radius: 20px;
  --cr-shadow: 0 16px 42px rgba(21, 73, 101, .085);
  --cr-shadow-hover: 0 23px 50px rgba(21, 73, 101, .15);
}

html { scroll-padding-top: 28px; }
body:not(.login-page) {
  color: var(--cr-ink);
  background: radial-gradient(ellipse at 7% 2%, rgba(14,123,128,.065), transparent 34rem),
              radial-gradient(ellipse at 95% 9%, rgba(241,143,1,.055), transparent 28rem),
              var(--cr-canvas);
}

::selection { background: rgba(14,123,128,.18); color: var(--cr-navy-deep); }
a { text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(241,143,1,.48) !important;
  outline-offset: 3px;
}

/* Shared masthead */
.main-header, header.main-header, .header, header.header {
  position: relative;
  z-index: 20;
  padding: 13px 0;
  background: linear-gradient(112deg, var(--cr-navy-deep), var(--cr-navy) 66%, #1a5a70);
  box-shadow: 0 7px 24px rgba(16,57,77,.15);
}
.main-header::after {
  position: absolute;
  right: 0; bottom: 0; left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--cr-orange), rgba(255,255,255,.55), transparent);
  opacity: .8;
}
.header-container, .main-header .header-container, .header-content {
  width: min(100% - 44px, 1500px);
  min-height: 70px;
  max-width: 1500px;
  padding: 0;
  margin: auto;
  display: grid;
  grid-template-columns: auto minmax(140px,1fr) auto;
  align-items: center;
  gap: clamp(15px,2vw,32px);
}
.logo-container, .header-logo { width: auto; }
.logo-link.header-logos, .logo-container .logo-link {
  gap: 10px;
  width: auto;
}
.logo-urbano, .logo-city, .header-logo .logo-img, .logo-link .logo-img {
  width: 112px;
  height: 54px !important;
  max-height: 54px;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 13px rgba(5,32,46,.15);
  object-fit: contain;
  transition: transform .22s ease, box-shadow .22s ease;
}
.logo-urbano:hover, .logo-city:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(5,32,46,.2); }
.header-title { min-width: 0; text-align: left; }
.header-title h1 { margin: 0; font-size: 1.15rem; font-weight: 750; letter-spacing: .015em; }
.header-subtitle { justify-content: flex-start; margin-top: 3px; color: rgba(232,245,249,.8); font-size: .79rem; }
.main-nav, .header-nav {
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: nowrap;
}
.main-nav .nav-link, .header-nav .nav-link, .nav-link {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: rgba(245,251,252,.89);
  font-size: .83rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, color .18s ease;
}
.nav-link svg { width: 17px; height: 17px; }
.nav-link:hover { transform: translateY(-1px); background: rgba(255,255,255,.1); }
.nav-link.active { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.15); color: #fff; }
.nav-link.logout-link { color: #ffe4c2; }

/* Consistent content width, surfaces and entrance */
main.principal { width: min(100% - 48px, 1320px); max-width: 1320px; padding: 35px 0 58px; margin-inline: auto; }
.content-panel, .stats-main { width: min(100% - 48px, 1320px); max-width: 1320px; margin: auto; }
.panel, .rc-panel, .users-panel, .report-view-panel {
  border: 1px solid rgba(206,222,229,.8) !important;
  border-radius: var(--cr-radius) !important;
  background: rgba(255,255,255,.94) !important;
  box-shadow: var(--cr-shadow) !important;
  backdrop-filter: blur(14px);
}
.rc-page { max-width: 1320px; padding: 10px 0 0; }
.rc-panel { padding: clamp(18px,2.5vw,34px); }
.principal > .panel, .principal > .users-panel { margin-inline: auto; }
.pie { margin-top: auto; padding: 17px 0; background: var(--cr-navy-deep); color: rgba(255,255,255,.82); font-size: .85rem; }

.page-intro { display:flex; align-items:flex-end; justify-content:space-between; gap:22px; margin: 0 0 21px; animation: cr-rise .5s both; }
.page-intro-copy { max-width: 760px; }
.page-eyebrow { display:inline-flex; align-items:center; gap:8px; margin:0 0 8px; color:var(--cr-teal); font-size:.74rem; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
.page-eyebrow::before { width:19px; height:2px; content:""; border-radius:2px; background:var(--cr-orange); }
.page-intro h2 { margin:0; color:var(--cr-navy-deep); font-size:clamp(1.65rem,2.4vw,2.25rem); line-height:1.16; letter-spacing:-.035em; }
.page-intro p { margin:8px 0 0; color:var(--cr-muted); font-size:.97rem; }

/* Dashboard */
.dashboard-grid { display:grid; grid-template-columns:minmax(0,1fr); max-width:1120px; margin:10px auto; padding:0; }
.welcome-card { padding:clamp(24px,4.5vw,58px); text-align:left; border:1px solid var(--cr-line); border-radius:26px; box-shadow:var(--cr-shadow); }
.welcome-card::before { height:4px; background:linear-gradient(90deg,var(--cr-navy),var(--cr-teal) 70%,var(--cr-orange)); }
.welcome-time { display:inline-flex; width:max-content; margin:0 0 22px; padding:8px 12px; border:1px solid var(--cr-line); border-radius:999px; background:#f8fbfc; color:var(--cr-muted); font-size:.82rem; opacity:1; animation:none; }
.welcome-heading { margin-bottom:8px; font-size:clamp(2.2rem,5vw,3.6rem); line-height:1.05; letter-spacing:-.05em; }
.welcome-message { max-width:690px; margin:0; color:var(--cr-muted); font-size:1.05rem; opacity:1; animation:none; }
.stats-preview { grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:31px 0 0; opacity:1; animation:none; }
.stat-item { position:relative; overflow:hidden; padding:20px 21px; border:1px solid var(--cr-line); border-radius:17px; background:linear-gradient(150deg,#fff,#f8fbfc); }
.stat-item::after { position:absolute; top:0; right:0; width:42px; height:3px; content:""; background:var(--cr-teal); }
.stat-item:nth-child(2)::after { background:var(--cr-orange); }
.stat-item:nth-child(3)::after { background:#54a37b; }
.stat-value { color:var(--cr-navy); font-size:2.1rem; letter-spacing:-.04em; }
.stat-label { display:flex; align-items:center; gap:7px; color:var(--cr-muted); font-size:.87rem; }
.action-buttons { justify-content:flex-start; margin:25px 0 0; opacity:1; animation:none; }

/* Controls and forms */
.btn, button.btn { min-height:44px; padding:10px 16px; border-radius:12px; font-weight:700; box-shadow:none; transition:transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.btn:hover, button.btn:hover { transform:translateY(-2px); box-shadow:0 8px 17px rgba(21,73,101,.14); }
.btn-primary { border-color:transparent; background:linear-gradient(135deg,var(--cr-navy),#246680); }
.btn-accent { border-color:transparent; background:linear-gradient(135deg,#f39a12,var(--cr-orange)); color:#fff; }
.btn-secondary { border-color:#dce7eb; background:#f5f9fa; color:var(--cr-navy); }
.form-control, input.form-control, select.form-control, textarea.form-control {
  min-height:47px; padding:11px 14px; border:1px solid #d6e2e7; border-radius:12px; background:#fff; color:var(--cr-ink); box-shadow:0 1px 2px rgba(15,51,68,.025); transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.form-control:hover { border-color:#adc5cf; }
.form-control:focus { border-color:var(--cr-teal); outline:none; box-shadow:0 0 0 4px rgba(14,123,128,.12); }
label, .new-report-form label, .edit-form label { margin-bottom:8px; color:#294a5b; font-size:.86rem; font-weight:700; letter-spacing:0; }
.form-grid { gap:18px 22px; }
.new-report-form .form-grid, .edit-form .form-grid { padding:clamp(17px,2.3vw,30px); border-color:var(--cr-line); border-radius:18px; background:#fafcfd; box-shadow:none; }
.new-report-panel, .edit-report-panel { padding:clamp(19px,2.7vw,34px); }
.map-pick-wrap { border-radius:17px; }
#pickMap, #statsMap { border-radius:inherit; }
.new-report-actions { padding-top:8px; }
.new-report-actions .btn { min-width:210px; }

/* Search and data tables */
.rc-topbar { margin-bottom:19px; }
.rc-search { align-items:center; gap:10px; margin-bottom:18px; padding:12px; border:1px solid var(--cr-line); border-radius:15px; background:#f8fbfc; }
.rc-search .form-control { height:auto; }
.rc-search .btn { min-width:126px; }
.table-responsive, .users-table-wrap { overflow:auto; border:1px solid var(--cr-line); border-radius:15px; background:#fff; box-shadow:0 8px 22px rgba(21,73,101,.045); }
table.table, .users-table-wrap .table { min-width:760px; border-collapse:separate; border-spacing:0; }
table.table thead, .users-table-wrap thead { background:var(--cr-navy); }
table.table thead th, .users-table-wrap thead th { padding:14px 15px; color:#fff; font-size:.77rem; font-weight:700; letter-spacing:.045em; text-transform:uppercase; }
table.table tbody td, .users-table-wrap tbody td { padding:13px 15px; border-bottom:1px solid #edf2f4; color:#405d6c; font-size:.88rem; }
table.table tbody tr, .users-table-wrap tbody tr { height:58px; background:#fff; transition:background .16s ease; }
table.table tbody tr:nth-child(even), .users-table-wrap tbody tr:nth-child(even) { background:#fbfdfe; }
table.table tbody tr:hover, .users-table-wrap tbody tr:hover { background:#f0f7f8; box-shadow:inset 3px 0 0 var(--cr-teal); }
.col-rem { color:var(--cr-ink); font-weight:650; }
.status-badge { display:inline-flex; align-items:center; padding:6px 10px; border:1px solid transparent; border-radius:999px; font-size:.75rem; font-weight:750; white-space:nowrap; }
.status-pendiente { border-color:#f4dcae; background:#fff7e8; color:#9a630c; }
.status-en-proceso, .status-proceso { border-color:#c8ddef; background:#eff7fc; color:#286188; }
.status-resuelto { border-color:#c9e7d4; background:#eef9f1; color:#347448; }
.actions { justify-content:flex-end; gap:6px; }
.actions .btn.sm { min-height:36px; padding:7px 10px; }
#list nav[aria-label="Paginación de reportes"] { justify-content:flex-end; padding:8px 2px; color:var(--cr-muted); font-size:.86rem; }

/* Users and analytics */
.users-panel { padding:clamp(18px,2.5vw,32px); }
.users-toolbar { margin-bottom:18px; }
.users-form { padding:clamp(18px,2.5vw,30px); border:1px solid var(--cr-line); border-radius:18px; background:#fafcfd; }
.users-form h3 { margin:0 0 12px; color:var(--cr-navy); font-size:1.25rem; }
.stats-main { padding-top:25px; }
.panel-header { margin:8px 0 18px; border-color:var(--cr-line); border-radius:17px; background:rgba(255,255,255,.92); box-shadow:0 8px 22px rgba(21,73,101,.05); }
.stats-cards { gap:14px; }
.stat-card { min-height:153px; border:1px solid var(--cr-line); border-radius:18px; background:#fff; box-shadow:0 10px 25px rgba(21,73,101,.06); transition:transform .2s ease,box-shadow .2s ease; }
.stat-card:hover { transform:translateY(-3px); box-shadow:var(--cr-shadow-hover); }
.chart-accordion, .chart-box { border-color:var(--cr-line); border-radius:17px; background:rgba(255,255,255,.93); box-shadow:0 8px 24px rgba(21,73,101,.05); }
.chart-accordion { overflow:hidden; }
.users-panel .table-responsive { margin-top:8px; }

/* Sign-in and recovery */
body.login-page {
  position:relative; display:grid; min-height:100svh; place-items:center; overflow-x:hidden; padding:35px 20px;
  color:var(--cr-ink); background:radial-gradient(ellipse at 5% 8%,rgba(14,123,128,.09),transparent 32rem), #eff4f6;
}
body.login-page::before { background-image:radial-gradient(rgba(21,73,101,.07) 1px,transparent 1px); background-size:26px 26px; opacity:.48; }
body.login-page::after { inset:15% auto auto 4%; width:190px; height:190px; border:1px solid rgba(241,143,1,.18); border-radius:50%; opacity:.8; animation:cr-orbit 32s linear infinite; }
.login-shell {
  position:relative; z-index:1; display:grid; grid-template-columns:minmax(300px,.95fr) minmax(390px,1.05fr); width:min(100%,1030px); min-height:590px; overflow:hidden; border:1px solid rgba(204,220,227,.84); border-radius:28px; background:#fff; box-shadow:0 30px 85px rgba(16,57,77,.19); animation:cr-rise .65s cubic-bezier(.2,.8,.2,1) both;
}
.login-story { position:relative; display:flex; flex-direction:column; justify-content:space-between; overflow:hidden; padding:clamp(30px,5vw,56px); color:#fff; background:linear-gradient(147deg,#10394d,#154965 56%,#176977); }
.login-story::before, .login-story::after { position:absolute; content:""; pointer-events:none; border:1px solid rgba(255,255,255,.09); border-radius:50%; }
.login-story::before { width:430px; height:430px; right:-210px; bottom:-190px; box-shadow:0 0 0 34px rgba(255,255,255,.025),0 0 0 74px rgba(255,255,255,.02); }
.login-story::after { width:220px; height:220px; right:-80px; bottom:-83px; background:radial-gradient(circle at 34% 31%,rgba(241,143,1,.24),transparent 70%); }
.login-brand-logos { display:flex; align-items:center; gap:12px; }
.login-brand-logos img { width:130px; height:61px; padding:7px 10px; border:1px solid rgba(255,255,255,.76); border-radius:13px; background:#fff; object-fit:contain; box-shadow:0 8px 22px rgba(5,32,46,.16); }
.login-story-copy { position:relative; z-index:1; max-width:410px; padding:46px 0 37px; }
.login-kicker { display:inline-flex; align-items:center; gap:8px; color:#f8c676; font-size:.76rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
.login-kicker::before { width:19px; height:2px; content:""; background:var(--cr-orange); }
.login-story h1 { margin:17px 0 14px; color:white; font-size:clamp(2.25rem,4vw,3.35rem); line-height:1.03; letter-spacing:-.055em; }
.login-story-copy > p { max-width:370px; margin:0; color:rgba(239,248,250,.8); font-size:1rem; line-height:1.72; }
.login-benefits { position:relative; z-index:1; display:grid; gap:12px; padding:0; margin:24px 0 0; list-style:none; }
.login-benefits li { display:flex; align-items:center; gap:10px; color:rgba(246,251,252,.91); font-size:.88rem; }
.login-benefits svg { width:17px; height:17px; color:#f5b64c; }
.login-story-foot { position:relative; z-index:1; color:rgba(230,244,248,.57); font-size:.77rem; }
.login-content { align-self:center; width:min(100%,490px); padding:clamp(30px,5vw,62px); margin:0 auto; }
.login-page .login-content h2 { margin:0; color:var(--cr-navy-deep); text-align:left; font-size:2rem; font-weight:780; letter-spacing:-.045em; text-shadow:none; }
.login-page .login-content .welcome { margin:8px 0 28px; color:var(--cr-muted); text-align:left; font-size:.96rem; }
.login-page .login-content label { margin-bottom:7px; color:#294a5b; font-size:.83rem; font-weight:700; }
.login-page .login-content input { min-height:49px; padding:12px 14px; margin:0 0 18px; border:1px solid #d7e3e8; border-radius:12px; color:var(--cr-ink); background:#fafcfd; font-size:.93rem; transition:border-color .18s ease,box-shadow .18s ease,background .18s ease; }
.login-page .login-content input::placeholder { color:#93a4ae; }
.login-page .login-content input:focus { border-color:var(--cr-teal); outline:none; background:white; box-shadow:0 0 0 4px rgba(14,123,128,.12); }
.login-page .login-content .password-field input { margin:0; }
.login-page .login-content .password-toggle { color:var(--cr-muted); }
.login-page .login-content .password-toggle:hover { color:var(--cr-navy); }
.login-content .password-hint { margin:9px 0 21px; color:var(--cr-muted); font-size:.77rem; font-weight:550; }
.login-content .password-dot { background:var(--cr-teal); box-shadow:0 0 0 4px rgba(14,123,128,.1); }
.login-content form > button[type="submit"] { display:flex; align-items:center; justify-content:center; gap:9px; min-height:49px; padding:12px 18px; border-radius:12px; background:linear-gradient(110deg,var(--cr-navy),var(--cr-teal)); box-shadow:0 8px 18px rgba(21,73,101,.2); animation:none; transition:transform .18s ease,box-shadow .18s ease,filter .18s ease; }
.login-content form > button[type="submit"]:hover { transform:translateY(-2px); box-shadow:0 12px 24px rgba(21,73,101,.25); }
.login-content form > button:disabled { cursor:wait; filter:saturate(.7); transform:none; }
.login-content #alert { margin:0 0 15px; padding:11px 13px; border:1px solid #f3d2cc; border-radius:12px; background:#fff5f2; color:#9a3c2d; text-align:left; font-size:.86rem; }
.login-recovery { display:inline-flex; align-items:center; gap:7px; margin-top:20px; color:var(--cr-teal); font-size:.86rem; font-weight:700; text-decoration:none; }
.login-recovery:hover { color:var(--cr-navy); text-decoration:underline; }
.recovery-card { width:min(100%,490px); min-height:0; padding:clamp(26px,5vw,48px); margin:auto; border:1px solid var(--cr-line); border-radius:25px; background:#fff; box-shadow:var(--cr-shadow-hover); animation:cr-rise .55s both; }
.recovery-card .login-brand-logos { margin-bottom:32px; }
.recovery-card .login-brand-logos img { border-color:var(--cr-line); box-shadow:0 4px 14px rgba(21,73,101,.08); }
.recovery-card h1 { margin:0; color:var(--cr-navy-deep); font-size:2rem; letter-spacing:-.045em; }
.recovery-card > p { color:var(--cr-muted); }
.login-page .recovery-card label { margin-top:18px; }
.login-page .recovery-card input { min-height:47px; padding:11px 13px; border:1px solid #d7e3e8; border-radius:11px; background:#fafcfd; }
.login-page .recovery-card input:focus { border-color:var(--cr-teal); outline:none; box-shadow:0 0 0 4px rgba(14,123,128,.12); }
.login-page .recovery-card button { width:100%; padding:12px 18px; color:#fff; min-height:47px; margin:11px 0 17px; border:0; border-radius:11px; background:linear-gradient(110deg,var(--cr-navy),var(--cr-teal)); font-weight:750; }
.recovery-card a { color:var(--cr-teal); font-weight:700; }

/* Reusable quiet entrance and motion preference */
@keyframes cr-rise { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes cr-orbit { to { transform:rotate(360deg); } }
.page-intro, .stats-cards > *, .rc-panel, .users-panel, .rv-shell { animation:cr-rise .48s both; }
.stats-cards > *:nth-child(2) { animation-delay:.04s; }
.stats-cards > *:nth-child(3) { animation-delay:.08s; }
.stats-cards > *:nth-child(4) { animation-delay:.12s; }

@media (max-width:1120px) {
  .header-container, .main-header .header-container, .header-content { grid-template-columns:auto 1fr; gap:12px 20px; }
  .header-title { text-align:right; }
  .header-subtitle { justify-content:flex-end; }
  .main-nav, .header-nav { grid-column:1/-1; justify-content:center; flex-wrap:wrap; }
  main.principal, .content-panel, .stats-main { width:min(100% - 36px,1320px); }
}
@media (max-width:700px) {
  .main-header { padding:10px 0 9px; }
  .header-container, .main-header .header-container, .header-content { width:calc(100% - 26px); gap:10px 12px; }
  .logo-container { min-width:0; }
  .logo-link.header-logos, .logo-container .logo-link { gap:6px; }
  .logo-urbano, .logo-city, .header-logo .logo-img, .logo-link .logo-img { width:clamp(63px,20vw,96px); height:43px !important; padding:5px; border-radius:9px; }
  .header-title h1 { font-size:1rem; }
  .header-subtitle { font-size:.72rem; }
  .main-nav, .header-nav { display:flex; grid-column:1/-1; flex-wrap:wrap; justify-content:center; gap:4px; }
  .main-nav .nav-link, .header-nav .nav-link, .nav-link { min-height:38px; padding:7px 9px; font-size:.75rem; }
  .nav-link svg { width:15px; height:15px; }
  main.principal, .content-panel, .stats-main { width:calc(100% - 28px); padding:23px 0 38px; }
  .page-intro { align-items:flex-start; flex-direction:column; gap:14px; }
  .page-intro h2 { font-size:1.75rem; }
  .welcome-card { padding:25px 20px; border-radius:20px; }
  .welcome-time { margin-bottom:19px; }
  .welcome-heading { font-size:2.25rem; }
  .stats-preview { grid-template-columns:1fr; gap:10px; margin-top:21px; }
  .stat-item { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:15px 17px; }
  .stat-value { min-width:44px; margin:0; font-size:1.8rem; }
  .stat-label { margin-left:auto; }
  .action-buttons { display:grid; grid-template-columns:1fr; gap:9px; margin-top:20px; }
  .action-buttons .btn { width:100%; justify-content:center; }
  .rc-panel, .users-panel, .new-report-panel, .edit-report-panel { padding:17px 14px !important; border-radius:17px !important; }
  .rc-topbar { gap:8px; }
  .rc-topbar .btn { width:auto; flex:1; justify-content:center; }
  .rc-search { align-items:stretch; flex-direction:column; }
  .rc-search .btn { width:100%; }
  .new-report-form .form-grid, .edit-form .form-grid { grid-template-columns:minmax(0,1fr); gap:10px; padding:15px; }
  .new-report-form .form-group, .edit-form .form-group { grid-column:1; margin-bottom:5px; }
  .new-report-actions { display:grid; }
  .new-report-actions .btn { width:100%; }
  #pickMap { min-height:300px; }
  .panel-header { align-items:flex-start; flex-direction:column; }
  .panel-meta { justify-content:flex-start; }
  .stats-cards { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .stat-card { min-height:128px; padding:14px; }
  .stat-card .stat-value { font-size:2rem; }
  .rv-hero { align-items:flex-start; flex-direction:column; padding:20px; }
  .rv-grid { grid-template-columns:1fr !important; }
  .login-shell { grid-template-columns:minmax(0,1fr); width:min(100%,510px); min-height:0; border-radius:22px; }
  .login-story { padding:22px 23px 20px; }
  .login-brand-logos img { width:105px; height:49px; padding:6px; }
  .login-story-copy { padding:25px 0 11px; }
  .login-story h1 { margin:10px 0 9px; font-size:2rem; }
  .login-story-copy > p { font-size:.9rem; line-height:1.55; }
  .login-benefits { display:none; }
  .login-story-foot { display:none; }
  .login-content { width:100%; padding:26px 23px 28px; }
  .login-content h2 { font-size:1.7rem; }
  .recovery-card { padding:25px 22px; border-radius:21px; }
}
@media (max-width:410px) {
  .header-container, .main-header .header-container, .header-content { grid-template-columns:1fr auto; }
  .logo-urbano, .logo-city, .header-logo .logo-img, .logo-link .logo-img { width:70px; }
  .header-title h1 { font-size:.91rem; }
  .header-subtitle { font-size:.66rem; }
  .main-nav .nav-link, .header-nav .nav-link, .nav-link { padding:6px 7px; }
  .stats-cards { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:.01ms !important; }
}

/* Keep sign-in fields legible against the legacy login theme. */
.login-page .login-content #login-form label { display:block !important; color:#294a5b !important; opacity:1 !important; visibility:visible !important; animation:none !important; }
.login-page .login-content #login-form input { width:100% !important; border:1px solid #d7e3e8 !important; background:#fafcfd !important; color:var(--cr-ink) !important; opacity:1 !important; visibility:visible !important; animation:none !important; }
.login-page .login-content #login-form input::placeholder { color:#93a4ae !important; opacity:1 !important; }
.login-page .login-content #login-form .password-field input { padding-right:58px !important; margin-bottom:0 !important; }
.login-page .login-content #login-form .password-hint { opacity:1 !important; visibility:visible !important; animation:none !important; }
.login-access-note { margin:13px 0 0; color:var(--cr-muted); font-size:.76rem; text-align:center; }
.login-page .recovery-card label { color:#294a5b !important; opacity:1 !important; visibility:visible !important; }
.login-page .recovery-card input { width:100% !important; border:1px solid #d7e3e8 !important; background:#fafcfd !important; color:var(--cr-ink) !important; }

/* Reference-led CityReport workspace: the same skyline, surfaces and controls
   across every protected screen. */
:root {
  --cr-navy:#073f58;
  --cr-navy-deep:#062f43;
  --cr-teal:#087b91;
  --cr-teal-soft:#e9f7fb;
  --cr-orange:#f39a12;
  --cr-ink:#102d43;
  --cr-muted:#536d80;
  --cr-canvas:#eaf6fa;
  --cr-line:#d3e3eb;
  --cr-radius:20px;
  --cr-shadow:0 16px 42px rgba(8,63,88,.10);
  --cr-shadow-hover:0 22px 48px rgba(8,63,88,.16);
}
body:not(.login-page) {
  background-color:#eaf6fa;
  background-image:radial-gradient(rgba(37,151,185,.13) 1.6px,transparent 1.6px),linear-gradient(180deg,rgba(248,253,255,.88),rgba(231,246,251,.88)),url("../img/cityscape-horizon.svg");
  background-size:22px 22px,100% 100%,100% 390px;
  background-position:0 0,0 0,center bottom;
  background-repeat:repeat,no-repeat,no-repeat;
  background-attachment:scroll,scroll,scroll;
}
.main-header, header.main-header { padding:11px 0 13px; background:linear-gradient(105deg,#06384d,#07516b 66%,#08728a); box-shadow:0 8px 26px rgba(4,42,59,.24); }
.main-header::after { height:3px; opacity:1; background:linear-gradient(90deg,#f39a12,rgba(255,255,255,.42) 36%,#16a0b1 68%,#f39a12); }
.header-container, .main-header .header-container, .header-content { width:min(calc(100% - 56px),1580px); min-height:76px; grid-template-columns:auto minmax(150px,.6fr) minmax(450px,1.4fr); gap:clamp(17px,2.1vw,34px); }
.logo-container { padding-right:18px; border-right:1px solid rgba(255,255,255,.27); }
.logo-link.header-logos, .logo-container .logo-link { gap:11px; }
.logo-urbano, .logo-city, .header-logo .logo-img, .logo-link .logo-img { width:clamp(122px,11vw,174px); height:64px !important; max-height:64px; padding:6px 10px; border-radius:12px; }
.header-title h1 { font-size:clamp(1.2rem,1.55vw,1.62rem); letter-spacing:-.025em; }
.header-subtitle { color:rgba(231,247,252,.86); font-size:.84rem; }
.main-nav, .header-nav { gap:4px; }
.main-nav .nav-link, .header-nav .nav-link, .nav-link { min-height:43px; padding:9px 12px; font-size:.84rem; }
.nav-link.active { background:rgba(226,248,255,.18); border-color:rgba(226,248,255,.13); box-shadow:inset 0 1px rgba(255,255,255,.12); }
.nav-link.logout-link { color:#ffb23f; }
main.principal, .content-panel, .stats-main { width:min(calc(100% - 64px),1510px); max-width:1510px; padding:30px 0 55px; }
.page-intro { position:relative; isolation:isolate; min-height:155px; align-items:center; margin:0 0 18px; padding:17px 12px; overflow:hidden; }
.page-intro::after { position:absolute; z-index:-1; inset:-20px -5px -18px auto; width:min(59%,760px); content:""; background:linear-gradient(90deg,#eaf6fa 0%,rgba(234,246,250,.22) 25%,transparent 48%),url("../img/cityscape-horizon.svg") center 66% / auto 100% no-repeat; opacity:.92; }
.page-intro-copy { max-width:min(70%,870px); }
.page-eyebrow { color:#0a7188; font-size:.78rem; letter-spacing:.075em; }
.page-eyebrow::before { width:28px; height:4px; }
.page-intro h2 { color:#082f47; font-size:clamp(2.15rem,4vw,3.55rem); letter-spacing:-.055em; }
.page-intro p { max-width:760px; color:#365770; font-size:clamp(.96rem,1.4vw,1.15rem); }
.title-accent { color:#0a6b87; }
.panel, .rc-panel, .users-panel, .report-view-panel { border-color:rgba(208,227,236,.95)!important; border-radius:21px!important; background:rgba(255,255,255,.97)!important; box-shadow:0 18px 48px rgba(5,53,74,.12)!important; backdrop-filter:blur(12px); }
.welcome-card, .new-report-panel, .edit-report-panel, .users-panel { border-color:rgba(208,227,236,.95); background:rgba(255,255,255,.97); box-shadow:0 18px 48px rgba(5,53,74,.12); }
.pie { padding:16px 0; background:linear-gradient(100deg,#07384d,#07516b); color:#effaff; box-shadow:0 -2px rgba(11,108,135,.2); }
.btn, button.btn { min-height:43px; padding:10px 15px; border-radius:11px; font-weight:750; }
.btn-primary { color:#fff; background:linear-gradient(120deg,#073f58,#0a6b81); }
.btn-accent { color:#fff; background:linear-gradient(120deg,#f7a10d,#f38300); }
.btn-secondary { color:#10445d; border-color:#c5dce7; background:#f3f9fc; }
.form-control, input.form-control, select.form-control, textarea.form-control { min-height:47px; border-color:#cfdee8; border-radius:11px; color:#163d56; background:#fff; }
.form-control:focus { border-color:#1492b1; box-shadow:0 0 0 4px rgba(20,146,177,.13); }
.rc-panel, .users-panel, .new-report-panel, .edit-report-panel { padding:clamp(20px,2.5vw,31px)!important; }
.rc-topbar { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:17px; }
.rc-search { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; padding:12px; border:1px solid #dceaf0; border-radius:14px; background:#f3f9fc; }
.rc-search .btn { min-width:132px; }
.rc-filter-grid { display:grid; grid-template-columns:repeat(5,minmax(130px,1fr)); gap:12px; padding:13px 12px 4px; }
.rc-filter-grid .form-group { display:grid; gap:5px; min-width:0; }
.rc-filter-grid label { margin:0; color:#1a425a; font-size:.78rem; font-weight:750; }
.rc-filter-grid .form-control { min-width:0; min-height:43px; padding:8px 10px; }
.table-responsive, .users-table-wrap { overflow:auto; border:1px solid #dce8ee; border-radius:14px; background:#fff; box-shadow:0 8px 22px rgba(8,63,88,.06); }
table.table, .users-table-wrap .table { min-width:790px; border-collapse:separate; border-spacing:0; }
table.table thead, .users-table-wrap thead { background:linear-gradient(100deg,#073f58,#075a70); }
table.table thead th, .users-table-wrap thead th { padding:13px 14px; color:#fff; font-size:.76rem; font-weight:800; letter-spacing:.035em; }
table.table tbody td, .users-table-wrap tbody td { padding:12px 14px; border-bottom:1px solid #eaf0f3; color:#294b61; font-size:.86rem; }
table.table tbody tr, .users-table-wrap tbody tr { height:60px; background:#fff; }
table.table tbody tr:nth-child(even), .users-table-wrap tbody tr:nth-child(even) { background:#f8fbfd; }
.users-toolbar { display:flex; flex-wrap:wrap; justify-content:space-between; gap:12px; margin:0 0 15px; }
.users-filters { display:grid; grid-template-columns:minmax(220px,1fr) minmax(145px,210px) minmax(135px,180px); gap:10px; padding:12px; margin-bottom:13px; border:1px solid #dce9ef; border-radius:14px; background:#f4f9fc; }
.users-filters .form-control { min-height:44px; }
.user-cell { display:flex; align-items:center; gap:10px; min-width:190px; }
.user-avatar { display:grid; flex:none; width:38px; height:38px; place-items:center; border-radius:50%; color:#07506b; background:#dff4fa; font-size:.8rem; font-weight:850; }
.user-cell-copy { display:grid; gap:1px; }
.user-cell-copy strong { color:#173c54; font-size:.86rem; }
.user-cell-copy small { color:#637d8f; font-size:.75rem; }
.user-role-badge, .user-state-badge { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border:1px solid transparent; border-radius:999px; font-size:.76rem; font-weight:750; white-space:nowrap; }
.user-role-badge { border-color:#cce3f0; color:#17638a; background:#edf7fc; }
.user-role-badge[data-role="1"] { border-color:#dfd2ff; color:#623db0; background:#f6f1ff; }
.user-role-badge[data-role="2"], .user-role-badge[data-role="5"] { border-color:#f5dfb4; color:#9d6200; background:#fff7e8; }
.user-role-badge[data-role="3"] { border-color:#ffd0d0; color:#ad3030; background:#fff1f1; }
.user-state-badge::before { width:7px; height:7px; content:""; border-radius:50%; background:currentColor; }
.user-state-badge.is-active { border-color:#c7ead5; color:#18733d; background:#effaf3; }
.user-state-badge.is-inactive { border-color:#f3d0d0; color:#a73535; background:#fff2f2; }
.users-table-footer { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 3px 0; color:#4e697d; font-size:.84rem; }
.users-pagination { display:flex; align-items:center; gap:6px; }
.users-pagination .btn { min-width:38px; min-height:38px; padding:7px 10px; }
.users-pagination .page-current { color:#fff; border-color:#07516b; background:#07516b; }
.user-form-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:15px; margin-bottom:17px; border-bottom:1px solid #dce9ef; }
.user-form-callout { display:flex; align-items:center; gap:11px; padding:11px 14px; border-radius:14px; color:#184762; background:#f1f8fb; }
.user-form-callout svg { width:27px; height:27px; color:#0b7490; }
.users-form .form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:17px 20px; padding:0; border:0; background:transparent; box-shadow:none; }
.users-form .form-group { min-width:0; }
.users-form label { color:#173e57; }
.users-form .form-control { min-height:47px; border-radius:11px; }
.users-form-actions { justify-content:flex-end; gap:10px; padding-top:14px; border-top:1px solid #deebf0; }
.new-report-form .form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px 20px; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.new-report-form .form-group { min-width:0; }
.new-report-form .report-details { grid-column:1; grid-row:3; }
.new-report-form .report-map { grid-column:2; grid-row:1 / span 3; }
.new-report-form .report-evidence { grid-column:1; grid-row:4; }
.new-report-form .report-submit { grid-column:2; grid-row:4; align-self:end; }
.report-section-label { display:flex; align-items:center; gap:8px; padding:11px 13px; margin:0 0 12px; border:1px solid #dceaf0; border-radius:12px; color:#153b53; background:#f4f9fc; font-weight:800; }
.report-section-label svg { color:#0c6781; }
.new-report-form #pickMap { height:355px; min-height:355px; overflow:hidden; border-radius:12px; }
.map-pick-wrap { overflow:hidden; border:1px solid #cce1eb; border-radius:14px; box-shadow:0 8px 22px rgba(8,63,88,.08); }
.new-report-form .report-evidence { padding:14px; border:1px solid #dceaf0; border-radius:14px; background:#f7fbfd; }
.new-report-form input[type="file"].form-control { min-height:58px; padding:10px; border:1px dashed #8cb8ca; border-radius:12px; background:#fff; }
.new-report-actions { justify-content:flex-end; }
.new-report-actions .btn { min-width:230px; }
.stats-main .page-intro { min-height:125px; }
.panel-header, .stats-block, .map-block { border:1px solid #d5e5ec; border-radius:16px; background:rgba(255,255,255,.97); box-shadow:0 10px 28px rgba(8,63,88,.08); }
.panel-header { padding:13px 17px; }
.stats-cards { gap:12px; }
.stat-card { min-height:134px; padding:18px; border-radius:15px; }
.stats-block, .map-block { overflow:hidden; }
.map-canvas-wrap { border-color:#d5e5ec; }
.chart-wrap { background:#fbfdfe; }
.report-view-panel { padding:clamp(20px,2.5vw,31px); }
body.login-page { background-color:#eaf6fa; background-image:radial-gradient(rgba(37,151,185,.14) 1.6px,transparent 1.6px),url("../img/cityscape-horizon.svg"),linear-gradient(180deg,#eef9fc,#e5f3f8); background-size:22px 22px,100% 310px,100% 100%; background-position:0 0,center bottom,0 0; background-repeat:repeat,no-repeat,no-repeat; }
.login-shell { width:min(100%,1160px); min-height:650px; grid-template-columns:minmax(0,.98fr) minmax(0,1.02fr); border-radius:26px; }
.login-story { background:linear-gradient(145deg,rgba(4,44,63,.96),rgba(7,78,101,.94)),url("../img/cityscape-horizon.svg") center bottom / auto 74% no-repeat; }
.login-story h1 { font-size:clamp(2.6rem,4.6vw,3.7rem); }
.login-content { padding:clamp(34px,5vw,67px); }
.login-page .login-content h2 { font-size:clamp(2rem,3vw,2.7rem); }
.login-page .login-content #login-form { margin-top:22px; }

/* Layouts drawn from the supplied administration screen references. */
.dashboard-grid { width:100%; max-width:1510px; margin:10px auto; }
.welcome-card { padding:clamp(24px,3vw,38px); }
.dashboard-hero { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(340px,.95fr); align-items:center; gap:24px; }
.dashboard-hero-copy { min-width:0; }
.dashboard-hero .welcome-time { margin-bottom:22px; }
.dashboard-hero .welcome-heading { color:#101b32; }
.dashboard-hero .welcome-heading::after { color:#08718c; }
.dashboard-illustration { min-height:230px; border:1px solid #d9eaf0; border-radius:18px; background:url("../img/cityscape-horizon.svg") center 62%/cover no-repeat,#e4f7fc; box-shadow:inset 0 0 0 1px rgba(255,255,255,.65); }
.stats-preview { margin-top:23px; }
.stat-item { display:grid; grid-template-columns:72px 1fr; align-content:center; align-items:center; column-gap:14px; min-height:136px; }
.stat-item .stat-value { grid-column:2; grid-row:1; }
.stat-item .stat-label { display:contents; }
.stat-item .stat-label svg { width:48px; height:48px; box-sizing:content-box; grid-column:1; grid-row:1 / span 2; padding:14px; border-radius:50%; color:#07546f; background:#dff5fb; }
.stat-item .stat-label span { grid-column:2; grid-row:2; }
.stat-item:nth-child(2) .stat-label svg { color:#e87300; background:#fff0de; }
.stat-item:nth-child(3) .stat-label svg { color:#198049; background:#e2f7e9; }
.action-buttons { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.action-buttons .btn { display:flex; align-items:center; justify-content:flex-start; gap:10px; min-height:76px; padding:15px 17px; border-radius:13px; text-align:left; }
.action-buttons .btn svg { flex:none; width:27px; height:27px; }
.action-buttons .btn-accent { background:linear-gradient(125deg,#ff9d00,#f47b00); }
.rc-page { max-width:1510px; }
.reports-empty { display:grid; justify-items:center; gap:7px; min-height:235px; align-content:center; padding:28px; border:1px solid #dce9ef; border-radius:15px; color:#5c7484; background:linear-gradient(145deg,#fff,#f8fbfd); text-align:center; }
.reports-empty svg { width:65px; height:65px; margin-bottom:5px; padding:13px; border-radius:50%; color:#167b98; background:#e9f7fb; }
.reports-empty h3 { margin:0; color:#12263d; }
.reports-empty p { margin:0; }
.reports-pagination { display:flex; align-items:center; justify-content:flex-end; gap:12px; padding:12px 2px 0; color:#526d7d; font-size:.85rem; }
.users-page, .users-panel { max-width:1510px; }
.user-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; }
.user-actions .btn.sm { min-height:37px; padding:7px 10px; white-space:nowrap; }
.btn-danger-soft { border-color:#f2bebe; color:#c42d2d; background:#fff; }
.btn-danger-soft:hover { background:#fff1f1; }
.btn-success-soft { border-color:#a9dfbd; color:#17763b; background:#fff; }
.btn-success-soft:hover { background:#effaf3; }
.users-empty, .users-error { padding:34px!important; color:#607989!important; text-align:center; }
.users-error, .users-notice--error { color:#a52a2a!important; }
.users-notice { margin:10px 0; padding:11px 14px; border:1px solid #cde4d4; border-radius:11px; color:#1c6a39; background:#f0faf3; }
.users-notice--error { border-color:#f0caca; background:#fff5f5; }
.user-id-cell { color:#577285; font-variant-numeric:tabular-nums; }
.user-form-callout { max-width:490px; }
.new-report-form .form-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.new-report-form .report-remitente { grid-column:1; grid-row:1; }
.new-report-form .report-clasificacion { grid-column:2; grid-row:1; }
.new-report-form .report-colonia { grid-column:1; grid-row:2; }
.new-report-form .report-calle { grid-column:2; grid-row:2; }
.new-report-form .report-details { grid-column:1 / 3; grid-row:3; }
.new-report-form .report-map { grid-column:3 / 5; grid-row:1 / 4; }
.new-report-form .report-evidence { grid-column:1 / 3; grid-row:4; }
.new-report-form .report-submit { grid-column:3 / 5; grid-row:4; }
.new-report-form #pickMap { height:300px; min-height:300px; }
.stats-main { width:min(100% - 48px,1510px); max-width:1510px; }
.stats-main .page-intro { min-height:116px; }
.login-story { position:relative; overflow:hidden; }
.login-story::after { right:-80px; bottom:-83px; left:auto; width:220px; height:220px; background:radial-gradient(circle at 34% 31%,rgba(241,143,1,.24),transparent 70%); }
.login-story > * { position:relative; z-index:1; }

@media (max-width:1100px) {
  .action-buttons { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-hero { grid-template-columns:1fr 1fr; }
  .user-actions { justify-content:flex-start; }
}
@media (max-width:900px) {
  .dashboard-hero { grid-template-columns:1fr; }
  .dashboard-illustration { min-height:180px; }
  .stats-preview { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .stat-item { grid-template-columns:1fr; justify-items:center; text-align:center; }
  .stat-item .stat-label svg { grid-column:auto; grid-row:auto; width:32px; height:32px; padding:11px; }
  .stat-item .stat-value, .stat-item .stat-label span { grid-column:auto; grid-row:auto; }
  .new-report-form .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .new-report-form .report-remitente, .new-report-form .report-colonia { grid-column:1; grid-row:auto; }
  .new-report-form .report-clasificacion, .new-report-form .report-calle { grid-column:2; grid-row:auto; }
  .new-report-form .report-details, .new-report-form .report-map, .new-report-form .report-evidence, .new-report-form .report-submit { grid-column:1 / 3; grid-row:auto; }
}
@media (max-width:680px) {
  .dashboard-grid { margin:0 auto; }
  .welcome-card { padding:20px 15px; }
  .dashboard-hero { gap:14px; }
  .dashboard-illustration { min-height:150px; }
  .stats-preview { grid-template-columns:1fr; }
  .stat-item { grid-template-columns:58px 1fr; justify-items:start; min-height:93px; text-align:left; }
  .stat-item .stat-label svg { grid-column:1; grid-row:1 / span 2; width:34px; height:34px; padding:11px; }
  .stat-item .stat-value { grid-column:2; grid-row:1; }
  .stat-item .stat-label span { grid-column:2; grid-row:2; }
  .action-buttons { grid-template-columns:1fr; }
  .action-buttons .btn { min-height:59px; }
  .reports-pagination { justify-content:space-between; }
  .users-filters { grid-template-columns:1fr 1fr; }
  .user-actions { flex-wrap:wrap; }
  .stats-main { width:calc(100% - 22px); }
  .login-story::after { height:34%; }
}

/* Keep user rows, headings, and action controls on a shared column grid. */
.users-table-wrap .table {
  width:100%;
  min-width:1080px;
  table-layout:fixed;
}
.users-table-wrap .users-col-id { width:11%; }
.users-table-wrap .users-col-user { width:34%; }
.users-table-wrap .users-col-role { width:20%; }
.users-table-wrap .users-col-state { width:13%; }
.users-table-wrap .users-col-actions { width:22%; }
.users-table-wrap .table th,
.users-table-wrap .table td {
  box-sizing:border-box;
  vertical-align:middle;
}
.users-table-wrap .table th:last-child { text-align:center; }
.users-table-wrap .table td:first-child { white-space:nowrap; }
.users-table-wrap .user-cell { width:100%; min-width:0; }
.users-table-wrap .user-cell-copy { flex:1; min-width:0; overflow:hidden; }
.users-table-wrap .user-cell-copy strong,
.users-table-wrap .user-cell-copy small {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.users-table-wrap .user-actions {
  display:grid;
  grid-template-columns:minmax(82px,1fr) minmax(108px,1.15fr);
  align-items:center;
  justify-content:stretch;
  gap:7px;
  width:100%;
}
.users-table-wrap .user-actions .btn.sm {
  display:inline-flex;
  justify-content:center;
  width:100%;
  min-width:0;
  min-height:37px;
  padding:7px 8px;
}
@media (max-width:680px) {
  .users-table-wrap .table { min-width:1080px; }
  .users-table-wrap .user-actions { flex-wrap:initial; }
}

/* Final shared UI pass: restrained surfaces, consistent controls, intact brand assets. */
:root {
  --cr-radius:16px;
  --cr-shadow:0 8px 26px rgba(21,73,101,.075);
  --cr-shadow-hover:0 12px 30px rgba(21,73,101,.11);
}
.logo-urbano, .logo-city, .header-logo .logo-img, .logo-link .logo-img,
img.logo-img.logo-urbano, img.logo-img.logo-city,
.header-logo img.logo-img, .logo-link.header-logos img.logo-img {
  object-fit:cover!important;
  object-position:center 48%;
  background-color:#fff;
}
.login-brand-logos img { object-fit:cover!important; object-position:center 48%; background-color:#fff; }
.panel, .rc-panel, .users-panel, .report-view-panel,
.stat-card, .chart-accordion, .chart-box, .stats-block, .map-block,
.welcome-card, .stat-item {
  box-shadow:var(--cr-shadow);
}
.panel, .rc-panel, .users-panel, .report-view-panel { backdrop-filter:none; }
.btn, button.btn {
  min-height:42px;
  padding:9px 14px;
  border-radius:10px;
  box-shadow:none;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease;
}
.btn:hover, button.btn:hover { transform:none; box-shadow:0 3px 10px rgba(21,73,101,.1); }
.btn:active, button.btn:active { transform:translateY(1px); }
.btn-primary { background:var(--cr-navy); }
.btn-primary:hover { background:#103e57; }
.btn-accent { background:var(--cr-orange); }
.btn-accent:hover { background:#d77f00; }
.btn-secondary { border-color:#d6e2e7; background:#f7fafb; }
.form-control, input.form-control, select.form-control, textarea.form-control {
  min-height:44px;
  border-radius:10px;
  box-shadow:none;
}
.form-control:focus { box-shadow:0 0 0 3px rgba(14,123,128,.13); }
.status-badge, .user-role-badge, .user-state-badge { min-height:29px; }
.main-nav .nav-link, .header-nav .nav-link, .nav-link { border-radius:9px; }
.modal-overlay { overflow-y:auto; overscroll-behavior:contain; }
.modal {
  max-height:calc(100svh - 36px);
  overflow:auto;
  border-color:var(--cr-line);
  border-radius:16px;
  box-shadow:0 16px 42px rgba(16,57,77,.2);
}
.modal-head, .modal-actions { padding:14px 18px; }
.modal-body { padding:16px 18px; }
.modal-row { border-radius:10px; }
.pie { padding:14px 12px; }
.users-table-wrap .table tbody tr:hover,
.table-responsive .table tbody tr:hover { box-shadow:inset 3px 0 0 var(--cr-teal); }
@media (max-width:680px) {
  body.login-page { padding:14px; }
  .login-story { min-height:0; }
  .login-story-foot { margin-top:18px; }
  .modal-overlay { align-items:flex-start; padding:12px; }
  .modal { max-height:calc(100svh - 24px); }
  .modal-actions { flex-wrap:wrap; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after {
    scroll-behavior:auto!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

@media (max-width:1320px) {
  .header-container, .main-header .header-container, .header-content { grid-template-columns:auto 1fr; gap:12px 20px; }
  .header-title { text-align:right; }
  .header-subtitle { justify-content:flex-end; }
  .main-nav { grid-column:1/-1; justify-content:center; }
  .logo-urbano, .logo-city, .header-logo .logo-img, .logo-link .logo-img { width:clamp(115px,15vw,165px); }
}
@media (max-width:900px) {
  .header-container, .main-header .header-container, .header-content { width:calc(100% - 30px); grid-template-columns:1fr auto; gap:10px 14px; }
  .logo-container { padding-right:10px; }
  .logo-urbano, .logo-city, .header-logo .logo-img, .logo-link .logo-img { width:clamp(88px,15vw,130px); height:50px!important; }
  main.principal, .content-panel, .stats-main { width:calc(100% - 32px); }
  .page-intro { min-height:138px; }
  .page-intro-copy { max-width:78%; }
  .page-intro::after { width:54%; }
  .rc-filter-grid { grid-template-columns:repeat(3,minmax(120px,1fr)); }
  .users-filters { grid-template-columns:minmax(0,1fr) repeat(2,minmax(130px,190px)); }
  .new-report-form .report-map { grid-row:1 / span 3; }
}
@media (max-width:680px) {
  .main-header { padding:9px 0 11px; }
  .header-container, .main-header .header-container, .header-content { width:calc(100% - 22px); grid-template-columns:1fr; justify-items:center; gap:8px; }
  .logo-container { padding:0; border:0; }
  .logo-link.header-logos, .logo-container .logo-link { gap:7px; }
  .logo-urbano, .logo-city, .header-logo .logo-img, .logo-link .logo-img { width:min(39vw,142px); height:47px!important; padding:5px 8px; }
  .header-title { display:none; }
  .main-nav { grid-column:auto; width:100%; justify-content:center; flex-wrap:wrap; gap:3px; }
  .main-nav .nav-link { min-height:36px; padding:6px 8px; font-size:.73rem; }
  main.principal, .content-panel, .stats-main { width:calc(100% - 22px); padding:20px 0 36px; }
  .page-intro { min-height:122px; padding:10px 2px 15px; }
  .page-intro-copy { max-width:100%; }
  .page-intro::after { right:-14px; width:67%; opacity:.32; }
  .page-intro h2 { max-width:90%; font-size:2rem; }
  .page-intro p { max-width:90%; font-size:.9rem; }
  .rc-panel, .users-panel, .new-report-panel, .edit-report-panel, .report-view-panel { padding:15px 12px!important; border-radius:16px!important; }
  .rc-topbar { align-items:stretch; }
  .rc-topbar .btn { flex:1; justify-content:center; }
  .rc-search { grid-template-columns:1fr; }
  .rc-search .btn { width:100%; }
  .rc-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; padding:10px 3px; }
  .users-filters { grid-template-columns:1fr 1fr; padding:9px; }
  .users-filters input { grid-column:1/-1; }
  .users-table-footer { align-items:flex-start; flex-direction:column; }
  .users-form .form-grid { grid-template-columns:1fr; gap:13px; }
  .user-form-heading { align-items:flex-start; flex-direction:column; }
  .users-form-actions { align-items:stretch; flex-direction:column-reverse; }
  .new-report-form .form-grid { grid-template-columns:1fr; gap:12px; }
  .new-report-form .report-details, .new-report-form .report-map, .new-report-form .report-evidence, .new-report-form .report-submit { grid-column:1; grid-row:auto; }
  .new-report-form #pickMap { height:300px; min-height:300px; }
  .new-report-actions .btn { width:100%; min-width:0; }
  .stats-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .login-shell { width:min(100%,500px); grid-template-columns:1fr; min-height:0; }
  .login-story { min-height:275px; padding:22px 24px; background-size:auto 90%; }
  .login-story-copy { padding:24px 0 4px; }
  .login-story h1 { max-width:410px; font-size:2.15rem; }
  .login-story-copy>p { max-width:450px; }
  .login-content { padding:27px 24px 31px; }
}
@media (max-width:420px) {
  .main-nav .nav-link { gap:4px; padding:6px; font-size:.69rem; }
  .stats-cards { grid-template-columns:1fr; }
  .rc-filter-grid, .users-filters { grid-template-columns:1fr; }
  .users-filters input { grid-column:auto; }
}

/* Responsive placement comes after the legacy page rules above. */
@media (max-width:900px) {
  .new-report-form .report-map { grid-column:1 / -1; grid-row:auto; }
}
@media (max-width:680px) {
  .new-report-form .form-grid { grid-template-columns:1fr; }
  .new-report-form .report-remitente, .new-report-form .report-clasificacion, .new-report-form .report-colonia, .new-report-form .report-calle, .new-report-form .report-details, .new-report-form .report-map, .new-report-form .report-evidence, .new-report-form .report-submit { grid-column:1; grid-row:auto; }
}

/* Brand scale and shared proportions across the admin pages and sign-in. */
.main-header, header.main-header, .header, header.header { padding:9px 0; }
.header-container, .main-header .header-container, .header-content { min-height:72px; gap:clamp(16px,1.8vw,27px); }
img.logo-img.logo-urbano, img.logo-img.logo-city, .header-logo img.logo-img, .logo-link.header-logos img.logo-img {
  width:clamp(148px,12vw,184px)!important;
  height:68px!important;
  max-height:68px;
  padding:0;
  border-radius:12px;
  object-fit:cover;
  object-position:center;
}
.logo-link.header-logos, .logo-container .logo-link { gap:11px; }
.header-title h1 { font-size:1.42rem; }
.header-subtitle { font-size:.87rem; }
.main-nav .nav-link, .header-nav .nav-link, .nav-link { min-height:45px; padding:10px 12px; font-size:.87rem; }
main.principal { width:min(100% - 52px,1510px); max-width:1510px; padding-top:31px; }
.content-panel, .stats-main { width:min(100% - 52px,1510px); max-width:1510px; }
.dashboard-grid, .rc-page, .users-panel { max-width:1510px; }
.page-intro { min-height:145px; }
.page-intro h2 { font-size:clamp(2.05rem,3vw,2.75rem); }
.login-shell { width:min(100%,1260px); min-height:min(740px,calc(100svh - 48px)); grid-template-columns:minmax(0,1.04fr) minmax(0,.96fr); border-radius:32px; }
.login-story { padding:clamp(32px,4vw,54px); }
.login-brand-logos { gap:15px; }
.login-brand-logos img { width:clamp(170px,15vw,218px); height:82px; padding:0; object-fit:cover; object-position:center; }
.login-story h1 { max-width:590px; font-size:clamp(2.45rem,3.25vw,3.4rem); }
.login-content { width:min(100%,570px); padding:clamp(30px,3.3vw,48px); }
.login-page .login-content h2 { max-width:520px; font-size:clamp(1.9rem,2.7vw,2.45rem); line-height:1.12; }
.login-page .login-content .welcome { max-width:500px; margin:12px 0 31px; font-size:1.02rem; line-height:1.6; }
.login-page .login-content label { font-size:.89rem; }
.login-page .login-content input { min-height:56px; font-size:1rem; }
.login-content form>button[type="submit"] { min-height:57px; font-size:1.04rem; }
.login-page { overflow-x:hidden; overflow-y:auto; }
.login-page::before { z-index:0; }
.login-page::after { z-index:0; background:none; }
.login-shell, .recovery-card { position:relative; z-index:2; }
.login-content { background:#fff; }
.recovery-card { background:#fff; backdrop-filter:none; }
@media (max-width:1320px) {
  img.logo-img.logo-urbano, img.logo-img.logo-city, .header-logo img.logo-img, .logo-link.header-logos img.logo-img { width:clamp(124px,13vw,158px)!important; height:61px!important; }
}
@media (max-width:900px) {
  main.principal, .content-panel, .stats-main { width:calc(100% - 34px); }
  .login-shell { width:min(100%,760px); min-height:0; grid-template-columns:1fr 1fr; }
  .login-brand-logos { flex-wrap:wrap; }
  .login-brand-logos img { width:min(42%,190px); height:68px; }
  .login-story h1 { font-size:clamp(2.15rem,4vw,3rem); }
  .login-content { padding:clamp(27px,4vw,42px); }
}
@media (max-width:680px) {
  .header-container, .main-header .header-container, .header-content { min-height:0; }
  img.logo-img.logo-urbano, img.logo-img.logo-city, .header-logo img.logo-img, .logo-link.header-logos img.logo-img { width:min(41vw,160px)!important; height:57px!important; }
  main.principal, .content-panel, .stats-main { width:calc(100% - 22px); }
  .page-intro { min-height:125px; }
  .login-shell { width:min(100%,520px); grid-template-columns:1fr; }
  .login-story { min-height:300px; padding:23px 25px; }
  .login-brand-logos img { width:min(43%,180px); height:65px; }
  .login-story h1 { font-size:2.25rem; }
  .login-story-copy { padding:22px 0 11px; }
  .login-content { width:100%; padding:30px 25px 34px; }
  .login-page .login-content h2 { font-size:2rem; }
}

/* Analytics page: compact, readable cards with the report map kept in view. */
.stats-main .page-intro { min-height:132px; margin-bottom:11px; }
.stats-main .panel-header { min-height:54px; padding:11px 16px; margin:0 0 13px; border:1px solid #d8e8ee; border-radius:14px; }
.stats-main .panel-title, .stats-main .stats-block__title, .stats-main .map-block__title { color:#102b43; font-size:1.05rem; }
.stats-main .panel-meta { gap:9px; }
.stats-main .badge { padding:6px 10px; border-color:#f5dcad; color:#a75d00; background:#fff8eb; font-size:.77rem; box-shadow:none; }
.stats-main .stats-cards { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 0 13px; }
.stats-main .stat-card { display:grid; grid-column:auto; grid-template-columns:56px minmax(0,1fr); grid-template-rows:auto auto auto; align-content:center; align-items:center; column-gap:13px; min-height:127px; padding:16px; border-color:#dce8ee; border-radius:14px; background:rgba(255,255,255,.97); box-shadow:0 7px 20px rgba(8,63,88,.065); }
.stats-main .stat-top { display:contents; }
.stats-main .stat-label { grid-column:2; grid-row:1; color:#203d53; font-size:.82rem; }
.stats-main .stat-icon { grid-column:1; grid-row:1 / 4; width:46px; height:46px; border:0; border-radius:50%; background:#e4f3fa; box-shadow:none; }
.stats-main .stat-icon svg { width:24px; height:24px; color:#174d6b; }
.stats-main .stat-card.pending .stat-icon { background:#fff0dc; }
.stats-main .stat-card.pending .stat-icon svg { color:#d77400; }
.stats-main .stat-card.in-progress .stat-icon { background:#e7efff; }
.stats-main .stat-card.in-progress .stat-icon svg { color:#2362b5; }
.stats-main .stat-card.completed .stat-icon { background:#e2f7e9; }
.stats-main .stat-card.completed .stat-icon svg { color:#167b43; }
.stats-main .stat-value { grid-column:2; grid-row:2; margin:2px 0 0; color:#101d34; font-size:1.85rem; line-height:1.15; }
.stats-main .stat-sub { grid-column:2; grid-row:3; margin-top:1px; }
.stats-main .kpi-mini { color:#38556b; font-size:.81rem; }
.stats-main .kpi-pill { padding:4px 8px; font-size:.69rem; }
.stats-main .stats-block, .stats-main .map-block { border-color:#d7e6ed; border-radius:15px; background:rgba(255,255,255,.98); box-shadow:0 8px 23px rgba(8,63,88,.07); }
.stats-main .stats-block { margin-top:0!important; }
.stats-main .stats-block__head { padding:11px 15px; }
.stats-main .stats-acc-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; padding:10px; }
.stats-main .acc-item { grid-column:auto; border-color:#d9e6ed; border-radius:13px; box-shadow:none; }
.stats-main .acc-item.acc-wide { grid-column:1 / -1; }
.stats-main .acc-head { min-height:43px; padding:8px 10px; background:#fbfdfe; }
.stats-main .acc-left { gap:7px; }
.stats-main .acc-left span { color:#18334a; font-size:.73rem; }
.stats-main .acc-icon { width:16px; height:16px; color:#1b5875; }
.stats-main .acc-sub { padding:4px 7px!important; margin-left:auto; font-size:.62rem; }
.stats-main .acc-body { padding:9px; }
.stats-main .acc-body .chart-wrap { position:relative; height:188px; min-height:188px; padding:9px; border-radius:11px; }
.stats-main .chart-empty-state { display:none; }
.stats-main[data-empty="true"] .chart-wrap canvas { visibility:hidden; }
.stats-main[data-empty="true"] .status-chart-layout { visibility:hidden; }
.stats-main[data-empty="true"] .chart-empty-state { position:absolute; inset:0; display:grid; align-content:center; justify-items:center; gap:5px; color:#18334a; text-align:center; }
.stats-main[data-empty="true"] .chart-empty-state svg { width:44px; height:44px; padding:9px; margin-bottom:2px; border-radius:50%; color:#578ba4; background:#e8f3f8; }
.stats-main[data-empty="true"] .chart-empty-state strong { font-size:.79rem; }
.stats-main[data-empty="true"] .chart-empty-state span { max-width:230px; color:#526d7e; font-size:.68rem; }
.stats-main .acc-item[data-locked="true"]::before, .stats-main .acc-item[data-locked="true"] .chart-wrap::after { display:none; }
.stats-main .acc-item[data-locked="true"] .acc-head { cursor:default; }
.stats-main .map-block { margin-top:13px; }
.stats-main .map-block__head { padding:11px 15px; }
.stats-main .map-filters { padding:10px 14px 8px; }
.stats-main .map-filters .field label { color:#2c4b60; font-size:.76rem; }
.stats-main .map-filters .form-control { min-height:39px; padding:7px 10px; font-size:.82rem; }
.stats-main #mapInfo { padding:0 14px 8px; font-size:.79rem; }
.stats-main .map-canvas-wrap { height:340px; overflow:hidden; border-radius:12px; }
@media (max-width:1100px) {
  .stats-main .stats-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stats-main .stats-acc-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stats-main .acc-item.acc-wide { grid-column:1 / -1; }
  .stats-main .map-filters .field { grid-column:span 6; }
  .stats-main .map-filters .actions { grid-column:span 12; }
}
@media (max-width:680px) {
  .stats-main .stats-cards, .stats-main .stats-acc-grid { grid-template-columns:1fr; }
  .stats-main .acc-item, .stats-main .acc-item.acc-wide { grid-column:1; }
  .stats-main .panel-header { align-items:flex-start; flex-direction:column; }
  .stats-main .panel-meta { justify-content:flex-start; }
  .stats-main .map-filters .field, .stats-main .map-filters .actions { grid-column:span 12; }
  .stats-main .map-canvas-wrap { height:300px; }
}

/* Login atmosphere: show the complete city illustration and animate it gently. */
body.login-page {
  isolation:isolate;
  background-color:#eaf6fa;
  background-image:
    radial-gradient(rgba(37,151,185,.16) 1.5px,transparent 1.5px),
    radial-gradient(ellipse at 12% 20%,rgba(255,255,255,.96),transparent 44%),
    linear-gradient(145deg,#eaf8fc 0%,#d8edf4 52%,#f5fafb 100%);
  background-size:24px 24px,100% 100%,100% 100%;
  background-position:0 0,0 0,0 0;
}
body.login-page::before {
  inset:-12%;
  z-index:0;
  background:
    radial-gradient(ellipse at 13% 34%,rgba(255,255,255,.82) 0 5%,transparent 18%),
    radial-gradient(ellipse at 82% 28%,rgba(126,213,235,.29) 0 7%,transparent 21%),
    radial-gradient(ellipse at 76% 74%,rgba(255,190,77,.17) 0 4%,transparent 15%);
  opacity:.9;
  animation:cr-login-atmosphere 25s ease-in-out infinite alternate;
}
body.login-page::after {
  content:"";
  position:fixed;
  inset:auto 0 0;
  z-index:0;
  width:100%;
  height:clamp(180px,32vh,340px);
  border:0;
  border-radius:0;
  background:
    linear-gradient(0deg,rgba(234,246,250,.04),rgba(234,246,250,0) 70%),
    url("../img/cityscape-horizon.svg") center bottom / min(100vw,1600px) auto no-repeat;
  opacity:.95;
  pointer-events:none;
  animation:cr-login-skyline 30s ease-in-out infinite alternate;
}
.login-story {
  isolation:isolate;
  background-color:#083f55;
  background-image:
    linear-gradient(180deg,rgba(4,44,63,.76) 0%,rgba(5,58,77,.63) 54%,rgba(4,45,62,.77) 100%),
    url("../img/cityscape-horizon.svg"),
    linear-gradient(145deg,#082f45,#087080);
  background-size:100% 100%,100% auto,100% 100%;
  background-position:0 0,center 100%,0 0;
  background-repeat:no-repeat;
  animation:cr-login-story-city 28s ease-in-out infinite alternate;
}
.login-story::before { z-index:0; }
.login-story::after { z-index:0; }
.login-story > * { z-index:1; }
@keyframes cr-login-atmosphere {
  from { transform:translate3d(-1%,0,0) scale(1); }
  to { transform:translate3d(1%,1%,0) scale(1.035); }
}
@keyframes cr-login-skyline {
  from { transform:translate3d(-3px,0,0); }
  to { transform:translate3d(3px,-5px,0); }
}
@keyframes cr-login-story-city {
  from { background-position:0 0,calc(50% - 9px) 100%,0 0; }
  to { background-position:0 0,calc(50% + 9px) 100%,0 0; }
}
@media (max-width:680px) {
  body.login-page::after { height:210px; background-size:100% auto; opacity:.7; }
  .login-story { background-size:100% 100%,100% auto,100% 100%; }
}
@media (prefers-reduced-motion:reduce) {
  body.login-page::before, body.login-page::after, .login-story { animation:none!important; }
}

/* Keep the CityReport title centered in the breathing room between brand and nav. */
@media (min-width:1101px) {
  .main-header .header-container {
    grid-template-columns:auto minmax(190px,1fr) auto;
    gap:clamp(18px,2vw,32px);
  }
  .main-header .header-title {
    justify-self:stretch;
    text-align:center;
  }
  .main-header .header-subtitle { justify-content:center; }
}

/* Status chart: compact ring plus a readable, proportional breakdown. */
.stats-main .status-chart-wrap { padding:10px !important; }
.stats-main .status-chart-layout {
  display:grid;
  grid-template-columns:minmax(116px, 44%) minmax(0, 1fr);
  align-items:center;
  gap:clamp(10px, 2vw, 18px);
  height:100%;
  min-height:0;
}
.stats-main .status-doughnut {
  position:relative;
  width:min(100%, 158px);
  aspect-ratio:1;
  justify-self:center;
}
.stats-main .status-breakdown {
  display:grid;
  gap:10px;
  min-width:0;
  margin:0;
  padding:0;
  list-style:none;
}
.stats-main .status-row {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto auto;
  align-items:center;
  column-gap:8px;
  row-gap:5px;
  min-width:0;
}
.stats-main .status-row__label {
  display:flex;
  align-items:center;
  gap:7px;
  min-width:0;
  overflow:hidden;
  color:#29465d;
  font-size:.72rem;
  font-weight:800;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.stats-main .status-row__label i {
  width:9px;
  height:9px;
  flex:0 0 9px;
  border-radius:50%;
  background:var(--status-color);
  box-shadow:0 0 0 3px color-mix(in srgb, var(--status-color) 13%, transparent);
}
.stats-main .status-row__count {
  color:#132b40;
  font-size:.88rem;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.stats-main .status-row__percent {
  min-width:35px;
  color:#718395;
  font-size:.66rem;
  font-weight:800;
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.stats-main .status-row__track {
  grid-column:1 / -1;
  display:block;
  height:5px;
  overflow:hidden;
  border-radius:999px;
  background:#e8eef3;
}
.stats-main .status-row__track i {
  display:block;
  width:var(--status-width);
  height:100%;
  border-radius:inherit;
  background:var(--status-color);
  transition:width .55s cubic-bezier(.2,.75,.25,1);
}
@media (max-width:520px) {
  .stats-main .status-chart-layout { grid-template-columns:minmax(104px, 40%) minmax(0, 1fr); gap:9px; }
  .stats-main .status-breakdown { gap:8px; }
  .stats-main .status-row { column-gap:6px; }
  .stats-main .status-row__label { font-size:.67rem; }
}
@media (min-width:681px) and (max-width:1100px) {
  .main-header .header-title { text-align:center; }
  .main-header .header-subtitle { justify-content:center; }
}
@media (max-width:680px) {
  .main-header .header-title {
    display:block;
    width:100%;
    text-align:center;
  }
  .main-header .header-subtitle { justify-content:center; }
}
