:root {
  --navy: #0b1f3a;
  --navy-2: #102b4f;
  --blue: #237ce5;
  --amber: #f5a500;
  --purple: #844dc4;
  --green: #5ccb5f;
  --green-dark: #15923a;
  --line: #dfe8ef;
  --ink: #0f2239;
  --muted: #5d7084;
  --white: #ffffff;
  --ice: #f5f8fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, var(--navy) 0 260px, #07172c 260px, #0b1f3a 52%, #123a45 100%);
}
.brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 900; text-decoration: none; color: var(--navy); }
.brand img { border-radius: 50%; }
.brand span span { color: var(--green); }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #07172c 0%, var(--navy) 52%, #102e54 100%);
}
.login-card {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  background: var(--white);
}
.login-card h2 { margin: 6px 0 8px; color: var(--navy); }
label { display: grid; gap: 8px; font-weight: 700; font-size: 0.92rem; }
input, select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
}
.button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: #062314;
  background: var(--green);
  font-weight: 900;
  cursor: pointer;
}
.feedback { min-height: 20px; margin: 0; color: #b43434; font-size: 0.92rem; }
.feedback.ok { color: #2f8f35; }

.app-shell { display: none; min-height: 100vh; background: transparent; }
.app-shell.active { display: grid; grid-template-columns: 260px 1fr; }
.side-nav {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(92, 203, 95, 0.08), transparent 28%),
    linear-gradient(180deg, #07172c 0%, var(--navy) 42%, #07172c 100%);
  color: var(--white);
}
.side-title {
  margin: 8px 4px 2px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}
.side-nav .brand { color: var(--white); margin-bottom: 12px; }
.nav-item {
  min-height: 44px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: var(--white);
  background: transparent;
  text-align: left;
  padding: 0 12px;
  font-weight: 800;
  cursor: pointer;
}
.nav-item.is-active,
.nav-item:hover { background: rgba(255,255,255,0.12); }
.nav-item.danger { margin-top: 14px; border-color: rgba(255,99,99,0.35); }
.main-panel {
  display: grid;
  grid-template-rows: 1fr;
  min-width: 0;
  background:
    radial-gradient(circle at 92% 0%, rgba(92, 203, 95, 0.16), transparent 26%),
    linear-gradient(135deg, #07172c 0%, var(--navy) 42%, #123a45 100%);
}
.view-panel {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
  padding: 0 20px 20px;
  background: linear-gradient(180deg, transparent 0 172px, var(--ice) 172px 100%);
}
body.modal-open { overflow: hidden; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 16px;
}
.card strong { display: block; color: var(--navy); font-size: 1.5rem; margin-top: 8px; }
.card h3 { margin: 0; color: var(--navy); }
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-heading > span,
.card-heading button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--navy);
  background: var(--white);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
}
.card-heading button { cursor: pointer; }
.card-heading button:hover { border-color: rgba(92, 203, 95, 0.7); }
.muted { color: var(--muted); }
.list { display: grid; gap: 8px; }
.row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--white);
}
.row h3 { margin: 0 0 6px; color: var(--navy); font-size: 1rem; }
.row p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 -20px;
  padding: 34px 20px 74px;
  color: var(--white);
  background:
    radial-gradient(circle at 78% 12%, rgba(92, 203, 95, 0.2), transparent 28%),
    linear-gradient(135deg, #07172c 0%, var(--navy) 54%, #123a45 100%);
}
.home-hero h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.08;
}
.home-hero p {
  margin: 8px 0 0;
  color: #d7e2ee;
  font-size: 1rem;
}
.notification-button {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.notification-button span { font-size: 1.35rem; }
.notification-button i {
  position: absolute;
  right: 6px;
  top: 6px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  padding: 0 4px;
  color: #062314;
  background: var(--green);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 950;
  line-height: 16px;
}
.home-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: -50px;
}
.home-kpi {
  display: grid;
  gap: 8px;
  min-height: 152px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  text-align: left;
  background: var(--white);
  box-shadow: 0 14px 38px rgba(11, 31, 58, 0.08);
  cursor: pointer;
}
.home-kpi:hover { border-color: rgba(92, 203, 95, 0.7); }
.home-kpi strong {
  margin: 6px 0 0;
  font-size: 2rem;
  line-height: 1;
}
.home-kpi em {
  color: var(--navy);
  font-style: normal;
}
.home-kpi small {
  color: var(--green-dark);
  font-weight: 900;
}
.kpi-icon,
.incident-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  font-weight: 950;
}
.kpi-icon.is-new,
.incident-icon.is-medium { color: var(--amber); background: #fff5df; }
.kpi-icon.is-progress,
.incident-icon.is-low { color: var(--green); background: #e7f8ed; }
.kpi-icon.is-hold { color: var(--purple); background: #f1e4ff; }
.kpi-icon.is-completed { color: var(--green-dark); background: #e7f8ed; }
.incident-icon.is-high { color: #d64242; background: #ffe8e8; }
.home-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
}
.status-overview {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: center;
}
.donut {
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: conic-gradient(
    var(--green) 0 var(--completed, 0%),
    var(--blue) var(--completed, 0%) var(--progress, 0%),
    var(--amber) var(--progress, 0%) var(--new, 0%),
    var(--purple) var(--new, 0%) 100%
  );
}
.donut.is-empty {
  background: #edf2f7;
}
.donut::before {
  content: "";
  grid-area: 1 / 1;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--white);
}
.donut strong,
.donut span {
  position: relative;
  grid-area: 1 / 1;
  z-index: 1;
}
.donut strong { margin: -10px 0 0; font-size: 1.55rem; }
.donut span { margin-top: 42px; color: var(--muted); font-size: 0.88rem; }
.legend-list {
  display: grid;
  gap: 9px;
}
.legend-list button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  border: 0;
  padding: 4px 0;
  color: var(--navy);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.legend-list strong {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot.completed { background: var(--green); }
.dot.progress { background: var(--blue); }
.dot.new { background: var(--amber); }
.dot.hold { background: var(--purple); }
.home-incident-list {
  display: grid;
  gap: 10px;
}
.home-incident-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid #e8eef4;
  border-radius: 8px;
  padding: 12px;
  color: var(--navy);
  background: var(--white);
  text-align: left;
  cursor: pointer;
}
.home-incident-row:hover { border-color: rgba(92, 203, 95, 0.65); }
.incident-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}
.incident-copy > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.incident-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.incident-title-line strong {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.incident-pills {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 6px;
}
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 900;
}
.pill.priority.is-high { color: #b42318; background: #fff0ed; }
.pill.priority.is-critical { color: #b42318; background: #fff0ed; }
.pill.priority.is-medium { color: #a15c00; background: #fff5df; }
.pill.priority.is-low { color: #137333; background: #e7f8ed; }
.pill.status.is-new { color: #a15c00; background: #fff5df; }
.pill.status.is-scheduled { color: #155fc0; background: #e8f1ff; }
.pill.status.is-progress { color: #155fc0; background: #e8f1ff; }
.pill.status.is-hold { color: #7441ae; background: #f1e4ff; }
.pill.status.is-completed { color: #137333; background: #e7f8ed; }
.row-arrow {
  color: var(--navy);
  font-size: 1.7rem;
  font-weight: 950;
}
.condominium-table {
  display: grid;
  gap: 4px;
}
.condominium-row {
  display: grid;
  grid-template-columns: minmax(160px, 2fr) repeat(3, minmax(70px, 1fr));
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #eef3f7;
}
.condominium-row.head {
  border-top: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}
.condominium-row span:not(:first-child) {
  text-align: center;
  color: var(--green-dark);
  font-weight: 950;
}
.condominium-row strong {
  margin: 0;
  color: var(--navy);
  font-size: 0.95rem;
}
.condominium-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}
.filter-chips {
  display: none !important;
}
.incidents-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  margin: 0 -20px;
  padding: 28px 20px;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 15%, rgba(92, 203, 95, 0.22), transparent 28%),
    linear-gradient(135deg, #07172c 0%, var(--navy) 55%, #123a45 100%);
}
.incidents-hero > div:first-child {
  display: flex;
  align-items: center;
  gap: 16px;
}
.incidents-hero > div:first-child > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.35rem;
  font-weight: 950;
}
.incidents-hero p {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.incidents-hero h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
}
.incidents-hero small {
  display: block;
  margin-top: 8px;
  max-width: 560px;
  color: #d7e2ee;
  font-size: 0.98rem;
}
.incidents-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 10px;
  min-width: 430px;
}
.condominiums-hero .incidents-hero-stats {
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  margin-left: auto;
}
.external-companies-hero .incidents-hero-stats,
.users-hero .incidents-hero-stats {
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  margin-left: auto;
}
.incidents-hero-stats button {
  display: grid;
  gap: 4px;
  align-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  text-align: left;
  cursor: pointer;
}
.incidents-hero-stats button:hover {
  border-color: rgba(92, 203, 95, 0.55);
  background: rgba(255, 255, 255, 0.12);
}
.incidents-hero-stats button.is-active {
  border-color: rgba(92, 203, 95, 0.78);
  background: rgba(92, 203, 95, 0.16);
}
.incidents-hero-stats strong {
  font-size: 1.55rem;
  line-height: 1;
}
.incidents-hero-stats span {
  color: #d7e2ee;
  font-size: 0.84rem;
  font-weight: 800;
}
.incidents-page-card {
  gap: 14px;
  margin-top: -12px;
  box-shadow: 0 18px 48px rgba(11, 31, 58, 0.08);
}
.incidents-page-card .card-heading {
  align-items: flex-start;
}
.incidents-page-card .card-heading h3 {
  margin: 0;
  font-size: 1.2rem;
}
.incidents-page-card .card-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.incident-filter-panel {
  display: grid;
  grid-template-columns: minmax(135px, 0.7fr) minmax(135px, 0.7fr) minmax(240px, 1.35fr) minmax(200px, 1fr) minmax(160px, 0.8fr);
  gap: 10px;
  align-items: end;
  overflow-x: auto;
  border: 1px solid #e8eef4;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfd;
  -webkit-overflow-scrolling: touch;
}
.incident-filter-panel label {
  min-width: 0;
  gap: 6px;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 900;
}
.incident-filter-panel input,
.incident-filter-panel select {
  min-height: 38px;
  background: var(--white);
}
.incident-filter-actions {
  display: flex;
  justify-content: flex-start;
}
.incident-filter-actions .btn-secondary {
  min-height: 38px;
  white-space: nowrap;
}
.incident-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.28fr);
  gap: 16px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: inherit;
  background:
    linear-gradient(90deg, rgba(92, 203, 95, 0.08), transparent 28%),
    var(--white);
  box-shadow: 0 10px 28px rgba(11, 31, 58, 0.04);
  text-align: left;
  cursor: pointer;
}
.incident-list-row:hover {
  border-color: rgba(92, 203, 95, 0.5);
  box-shadow: 0 16px 36px rgba(11, 31, 58, 0.08);
}
.incident-list-row:focus-visible {
  outline: 3px solid rgba(92, 203, 95, 0.28);
  outline-offset: 2px;
}
.incident-list-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.incident-list-main > div {
  min-width: 0;
}
.incident-list-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.incident-list-title strong {
  display: inline;
  margin-top: 0;
  color: var(--navy);
  font-size: 0.94rem;
  white-space: nowrap;
}
.incident-list-row h3 {
  margin: 7px 0 5px;
  overflow: hidden;
  color: var(--navy);
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.incident-list-row p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.incident-list-side {
  display: grid;
  gap: 4px;
  justify-items: end;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: right;
}
.incident-list-side strong {
  display: block;
  margin-top: 0;
  max-width: 100%;
  overflow: hidden;
  color: var(--navy);
  font-size: 0.94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.incident-list-side span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.communications-page-card {
  gap: 16px;
  margin-top: -8px;
}
.communications-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.communications-hero small {
  white-space: nowrap;
}
.companies-hero small,
.condominiums-hero small,
.residents-hero small,
.external-companies-hero small,
.technicians-hero small {
  white-space: nowrap;
}
.communications-card-head h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.15rem;
}
.communications-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.permission-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 0 12px;
  color: #0e6b2a;
  background: rgba(92, 203, 95, 0.14);
  font-size: 0.82rem;
  font-weight: 950;
}
.permission-badge.read-only {
  color: var(--muted);
  background: #eef4f8;
}
.communication-head-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}
.modal-primary-button.compact {
  min-height: 34px;
  padding: 0 12px;
  box-shadow: 0 10px 22px rgba(92, 203, 95, 0.18);
  font-size: 0.84rem;
}
.communication-filter-panel {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(220px, 1.3fr) minmax(170px, 0.8fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfd;
}
.communication-filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 950;
}
.communication-filter-panel input,
.communication-filter-panel select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--navy);
  background: var(--white);
  font-weight: 850;
}
.communications-list {
  display: grid;
  gap: 10px;
}
.communication-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--white);
  box-shadow: 0 14px 30px rgba(11, 31, 58, 0.04);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.communication-row:hover,
.communication-row:focus-visible {
  border-color: rgba(92, 203, 95, 0.45);
  box-shadow: 0 18px 36px rgba(11, 31, 58, 0.08);
  transform: translateY(-1px);
  outline: none;
}
.communication-row.is-unread {
  border-color: rgba(92, 203, 95, 0.34);
  background: linear-gradient(90deg, rgba(92, 203, 95, 0.08), #ffffff 24%);
}
.companies-page-card {
  gap: 16px;
  margin-top: -8px;
  box-shadow: 0 18px 48px rgba(11, 31, 58, 0.08);
}
.companies-list {
  display: grid;
  gap: 10px;
}
.resident-filter-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfd;
}
.resident-filter-panel label,
.preferred-contact-field {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 900;
}
.resident-filter-panel input,
.resident-filter-panel select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--navy);
  background: var(--white);
  font: inherit;
  font-weight: 850;
}
.resident-group {
  display: grid;
  gap: 10px;
}
.resident-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 6px 2px 8px;
}
.resident-group h4 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}
.resident-group header span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}
.resident-group-list {
  display: grid;
  gap: 10px;
}
.company-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: inherit;
  background:
    linear-gradient(90deg, rgba(92, 203, 95, 0.07), transparent 26%),
    var(--white);
  box-shadow: 0 14px 30px rgba(11, 31, 58, 0.04);
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.company-row:hover,
.company-row:focus-visible {
  border-color: rgba(92, 203, 95, 0.5);
  box-shadow: 0 18px 38px rgba(11, 31, 58, 0.08);
  transform: translateY(-1px);
  outline: none;
}
.company-main {
  min-width: 0;
}
.company-main p,
.company-main small {
  display: block;
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.company-main p {
  font-size: 0.92rem;
}
.company-main small {
  font-size: 0.82rem;
  font-weight: 800;
}
.company-actions {
  display: inline-flex;
  gap: 8px;
}
.company-row-arrow {
  color: var(--navy);
  font-size: 2rem;
  font-weight: 950;
  line-height: 1;
}
.icon-action {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: var(--white);
  font-weight: 950;
  cursor: pointer;
}
.icon-action:hover {
  border-color: rgba(92, 203, 95, 0.7);
  box-shadow: 0 10px 22px rgba(11, 31, 58, 0.08);
}
.icon-action.danger {
  color: #b9302c;
}
.communication-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  font-weight: 950;
}
.communication-icon.is-critical {
  color: #b42318;
  background: #fff0ed;
}
.communication-icon.is-high {
  color: #a15c00;
  background: #fff5df;
}
.communication-icon.is-low {
  color: #137333;
  background: #e7f8ed;
}
.communication-main {
  min-width: 0;
}
.communication-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.communication-title-line h3 {
  margin: 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.communication-pills {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}
.mark-read-button {
  min-height: 24px;
  border: 1px solid rgba(92, 203, 95, 0.7);
  border-radius: 8px;
  padding: 0 8px;
  color: #0e6b2a;
  background: rgba(92, 203, 95, 0.12);
  font-size: 0.75rem;
  font-weight: 950;
  cursor: pointer;
}
.mark-read-button:hover {
  background: rgba(92, 203, 95, 0.2);
}
.communication-main p {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.communication-main small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.84rem;
}
.communication-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.icon-action-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: var(--white);
  font-weight: 950;
  cursor: pointer;
}
.icon-action-button:hover {
  border-color: rgba(92, 203, 95, 0.58);
  color: var(--green-dark);
}
.detail-hero {
  display: grid;
  gap: 18px;
  margin: 0 -20px;
  padding: 28px 20px 34px;
  color: var(--white);
  background:
    radial-gradient(circle at 82% 12%, rgba(92, 203, 95, 0.22), transparent 30%),
    linear-gradient(135deg, #07172c 0%, var(--navy) 58%, #123a45 100%);
}
.detail-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.detail-back {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
  cursor: pointer;
}
.detail-back:hover {
  border-color: rgba(92, 203, 95, 0.55);
}
.detail-report-button {
  min-height: 38px;
  border: 1px solid rgba(92, 203, 95, 0.55);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--navy);
  background: var(--green);
  box-shadow: 0 12px 28px rgba(92, 203, 95, 0.18);
  font-weight: 950;
  cursor: pointer;
}
.detail-report-button:hover {
  background: #6fe072;
}
.detail-report-button:disabled {
  cursor: wait;
  opacity: 0.72;
}
.detail-hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
}
.detail-hero-main .incident-icon {
  width: 58px;
  height: 58px;
  font-size: 1.25rem;
}
.detail-hero-main p {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.detail-hero-main h2 {
  margin: 0 0 10px;
  color: var(--white);
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  line-height: 1.06;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 16px;
  align-items: start;
  margin-top: -14px;
}
.detail-grid.secondary {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  margin-top: 0;
}
.detail-main-card,
.detail-side-stack,
.detail-media-card,
.detail-doc-card,
.comments-card {
  gap: 16px;
}
.detail-main-card strong,
.detail-side-stack strong,
.detail-media-card strong,
.detail-doc-card strong,
.comments-card strong {
  margin-top: 0;
  font-size: inherit;
}
.detail-side-stack {
  display: grid;
}
.detail-description {
  display: grid;
  gap: 8px;
  border: 1px solid #e8eef4;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbfd;
}
.detail-description strong {
  display: inline;
  color: var(--navy);
}
.detail-description p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.detail-info-grid span {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--white);
}
.detail-info-grid small,
.detail-doc-list small,
.comment-item small,
.detail-timeline small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}
.detail-info-grid strong {
  display: block;
  overflow: hidden;
  color: var(--navy);
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-info-grid .editable-detail-field {
  position: relative;
  padding-right: 48px;
}
.field-edit-button {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: var(--white);
  font-size: 0.95rem;
  font-weight: 950;
  cursor: pointer;
}
.field-edit-button:hover {
  border-color: rgba(92, 203, 95, 0.7);
  background: #f4fcf5;
}
.assignment-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}
.assignment-edit-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: var(--white);
  font-size: 1rem;
  font-weight: 950;
  cursor: pointer;
}
.assignment-edit-button:hover {
  border-color: rgba(92, 203, 95, 0.7);
  background: #f4fcf5;
}
.assignment-summary > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: var(--white);
  background: var(--navy);
  font-weight: 950;
}
.assignment-summary strong {
  display: block;
  color: var(--navy);
  font-size: 1rem;
}
.assignment-summary p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.assignment-modal[hidden] {
  display: none;
}
.assignment-modal {
  position: fixed;
  inset: 0;
  z-index: 48;
  display: grid;
  place-items: center;
  padding: 20px;
}
.assignment-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 23, 44, 0.72);
  backdrop-filter: blur(5px);
}
.assignment-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(540px, 94vw);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--white);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}
.assignment-dialog.large {
  width: min(720px, 94vw);
}
.assignment-dialog header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.assignment-dialog header strong {
  display: block;
  margin: 0;
  color: var(--navy);
  font-size: 1.15rem;
}
.assignment-dialog header small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}
.assignment-dialog header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.15rem;
}
.assignment-dialog header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}
.assignment-dialog header button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
}
.assignment-form-grid {
  display: grid;
  gap: 12px;
}
.assignment-form-grid label {
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 900;
}
.assignment-dialog > label {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 900;
}
.assignment-dialog textarea {
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--navy);
  background: var(--white);
  font: inherit;
  font-weight: 800;
  resize: vertical;
}
.assignment-dialog select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--navy);
  background: var(--white);
  font: inherit;
  font-weight: 850;
}
.assignment-dialog input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--navy);
  background: var(--white);
  font: inherit;
  font-weight: 850;
}
.assignment-dialog select:disabled {
  color: #66788d;
  background: #f3f7fa;
  cursor: not-allowed;
}
.assignment-dialog textarea:focus,
.assignment-dialog select:focus,
.assignment-dialog input:focus {
  border-color: rgba(92, 203, 95, 0.7);
  outline: none;
  box-shadow: 0 0 0 4px rgba(92, 203, 95, 0.14);
}
.company-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.company-form-grid label,
.company-detail-form label {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 900;
}
.company-form-grid .full {
  grid-column: 1 / -1;
}
.company-form-grid .checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.company-form-grid .checkbox-field input {
  width: 18px;
  min-height: 18px;
}
.company-detail-grid {
  grid-template-columns: 1fr;
  align-items: start;
}
.company-detail-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.company-detail-form.email-settings {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.company-detail-form .full {
  grid-column: 1 / -1;
}
.company-detail-form input,
.company-detail-form select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--navy);
  background: var(--white);
  font: inherit;
  font-weight: 850;
}
.company-detail-form input:disabled,
.company-detail-form select:disabled {
  color: #66788d;
  background: #f3f7fa;
  cursor: not-allowed;
}
.company-detail-form input:focus,
.company-detail-form select:focus {
  border-color: rgba(92, 203, 95, 0.7);
  outline: none;
  box-shadow: 0 0 0 4px rgba(92, 203, 95, 0.14);
}
.company-detail-form .checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
}
.company-detail-form .checkbox-field input {
  width: 18px;
  min-height: 18px;
}
.preferred-contact-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.preferred-contact-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--white);
  cursor: pointer;
}
.preferred-contact-option input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green);
}
.preferred-contact-option span {
  color: var(--navy);
  font-weight: 900;
}
.preferred-contact-option:has(input:checked) {
  border-color: rgba(92, 203, 95, 0.72);
  background: rgba(92, 203, 95, 0.1);
}
.service-areas-card {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}
.service-areas-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.service-areas-head h4 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}
.service-areas-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.service-areas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.service-area-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid rgba(92, 203, 95, 0.42);
  border-radius: 999px;
  padding: 0 10px 0 12px;
  color: var(--navy);
  background: rgba(92, 203, 95, 0.1);
  font-size: 0.86rem;
  font-weight: 900;
}
.service-area-chip button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  color: #b9302c;
  background: #ffffff;
  font-weight: 950;
  cursor: pointer;
}
.service-area-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.service-area-add input,
.service-area-add select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--navy);
  background: var(--white);
  font: inherit;
  font-weight: 850;
}
.company-detail-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.company-detail-footer.is-action-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.company-status-button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.company-status-button.danger {
  border: 1px solid rgba(194, 65, 61, 0.88);
  color: #ffffff;
  background: linear-gradient(135deg, #b9302c 0%, #e35a54 100%);
  box-shadow: 0 16px 34px rgba(194, 65, 61, 0.2);
}
.company-status-button.success {
  border: 1px solid rgba(92, 203, 95, 0.95);
  color: #06233f;
  background: linear-gradient(135deg, #5ccb5f 0%, #7be37d 100%);
  box-shadow: 0 16px 34px rgba(92, 203, 95, 0.22);
}
.company-status-button:hover {
  transform: translateY(-1px);
}
.company-status-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}
.company-condominiums-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.company-condominium-card {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfd;
}
.company-condominium-card strong {
  display: block;
  margin: 0;
  color: var(--navy);
  font-size: 0.96rem;
}
.company-condominium-card span,
.company-condominium-card small {
  color: var(--muted);
  font-weight: 800;
}
.modal-file-field input {
  border: 1px dashed rgba(92, 203, 95, 0.5);
  border-radius: 8px;
  padding: 12px;
  color: var(--navy);
  background: #f8fbfd;
  font-weight: 850;
}
.modal-file-field input::file-selector-button {
  min-height: 38px;
  margin-right: 12px;
  border: 1px solid rgba(92, 203, 95, 0.9);
  border-radius: 8px;
  padding: 0 14px;
  color: #06233f;
  background: linear-gradient(135deg, #5ccb5f 0%, #7be37d 100%);
  box-shadow: 0 10px 22px rgba(92, 203, 95, 0.2);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}
.modal-file-field input:hover {
  border-color: rgba(92, 203, 95, 0.8);
  background: #fbfefd;
}
.modal-file-field input:hover::file-selector-button {
  box-shadow: 0 14px 28px rgba(92, 203, 95, 0.28);
}
.modal-file-field input:focus {
  border-color: rgba(92, 203, 95, 0.8);
  outline: none;
  box-shadow: 0 0 0 4px rgba(92, 203, 95, 0.14);
}
.modal-file-field small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}
.assignment-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.modal-primary-button,
.modal-secondary-button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.modal-primary-button {
  border: 1px solid rgba(92, 203, 95, 0.95);
  color: #06233f;
  background: linear-gradient(135deg, #5ccb5f 0%, #7be37d 100%);
  box-shadow: 0 16px 34px rgba(92, 203, 95, 0.24);
}
.modal-primary-button.danger {
  border-color: rgba(194, 65, 61, 0.88);
  color: #ffffff;
  background: linear-gradient(135deg, #b9302c 0%, #e35a54 100%);
  box-shadow: 0 16px 34px rgba(194, 65, 61, 0.24);
}
.modal-secondary-button {
  border: 1px solid var(--line);
  color: var(--navy);
  background: var(--white);
}
.modal-primary-button:hover,
.modal-secondary-button:hover {
  transform: translateY(-1px);
}
.modal-primary-button:disabled,
.modal-secondary-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}
.detail-timeline {
  display: grid;
  gap: 12px;
}
.detail-timeline span {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}
.detail-timeline i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}
.detail-timeline strong {
  display: block;
  color: var(--navy);
  font-size: 0.9rem;
}
.detail-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-columns: minmax(150px, 1fr);
  grid-auto-flow: column;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 6px;
  scrollbar-color: rgba(92, 203, 95, 0.75) #edf4f8;
  scrollbar-width: thin;
}
.detail-photo-grid::-webkit-scrollbar {
  height: 8px;
}
.detail-photo-grid::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #edf4f8;
}
.detail-photo-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(90deg, #5ccb5f, #0b1f3a);
}
.detail-photo-item {
  position: relative;
}
.detail-photo-grid .photo-open-button {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 0;
  padding: 0;
  color: var(--navy);
  background: transparent;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.detail-photo-grid .photo-open-button:hover img {
  border-color: rgba(92, 203, 95, 0.6);
  box-shadow: 0 14px 28px rgba(11, 31, 58, 0.1);
}
.detail-photo-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: #f8fbfd;
}
.photo-delete-button {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 999px;
  color: #b91c1c;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(11, 31, 58, 0.14);
  font-weight: 950;
  cursor: pointer;
}
.photo-delete-button:hover {
  color: #ffffff;
  background: #dc2626;
}
.photo-gallery-modal[hidden] {
  display: none;
}
.photo-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
}
.photo-gallery-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 23, 44, 0.78);
  backdrop-filter: blur(6px);
}
.photo-gallery-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1120px, 94vw);
  max-height: 92vh;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: #07172c;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}
.photo-gallery-dialog header,
.photo-gallery-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--white);
  background: rgba(11, 31, 58, 0.92);
}
.photo-gallery-dialog header strong {
  display: block;
  max-width: min(640px, 64vw);
  overflow: hidden;
  color: var(--white);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-gallery-dialog header small {
  color: #d7e2ee;
  font-weight: 800;
}
.photo-gallery-dialog header button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.5rem;
  cursor: pointer;
}
.photo-gallery-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(62vh, 680px);
  padding: 18px 64px;
  background: #051225;
}
.photo-gallery-stage img {
  max-width: 100%;
  max-height: 68vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}
.photo-gallery-nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 54px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  font-size: 2rem;
  cursor: pointer;
}
.photo-gallery-nav:hover,
.photo-gallery-dialog header button:hover {
  border-color: rgba(92, 203, 95, 0.6);
  background: rgba(92, 203, 95, 0.16);
}
.photo-gallery-nav[data-photo-prev] {
  left: 14px;
}
.photo-gallery-nav[data-photo-next] {
  right: 14px;
}
.photo-gallery-dialog footer p {
  margin: 0;
  overflow: hidden;
  color: #d7e2ee;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.photo-gallery-dialog footer a {
  flex: 0 0 auto;
  border: 1px solid rgba(92, 203, 95, 0.55);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--navy);
  background: var(--green);
  font-weight: 950;
  text-decoration: none;
}
.detail-doc-list,
.comment-list {
  display: grid;
  gap: 10px;
}
.detail-doc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.detail-doc-row > a {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  color: var(--navy);
  background: var(--white);
  text-decoration: none;
}
.detail-doc-row > a:hover {
  border-color: rgba(92, 203, 95, 0.55);
}
.detail-doc-row > a > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--green-dark);
  background: #e7f8ed;
}
.detail-doc-row > button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(180, 52, 52, 0.28);
  border-radius: 8px;
  padding: 0;
  color: #b43434;
  background: #fff3f3;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 950;
  cursor: pointer;
}
.detail-doc-row > button:hover {
  border-color: rgba(180, 52, 52, 0.52);
  background: #ffe6e6;
}
.detail-doc-row > button:disabled {
  cursor: wait;
  opacity: 0.72;
}
.detail-doc-list strong {
  display: block;
  overflow: hidden;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.comment-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--white);
}
.comment-item > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #e7f8ed;
  font-weight: 950;
}
.comment-item strong {
  display: inline;
  color: var(--navy);
  font-size: 0.95rem;
}
.comments-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.comments-heading-actions span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--navy);
  background: #f2f7fb;
  font-weight: 950;
}
.comments-heading-actions button {
  border: 1px solid rgba(92, 203, 95, 0.4);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--navy);
  background: linear-gradient(135deg, rgba(92, 203, 95, 0.16), rgba(92, 203, 95, 0.05));
  font-size: 0.8rem;
  font-weight: 950;
  cursor: pointer;
}
.comments-heading-actions button:hover {
  border-color: rgba(92, 203, 95, 0.8);
  box-shadow: 0 12px 26px rgba(92, 203, 95, 0.16);
}
.comment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.comment-header > div:first-child {
  display: grid;
  gap: 2px;
}
.comment-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.comment-actions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--navy);
  background: var(--white);
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}
.comment-actions button:hover {
  border-color: rgba(92, 203, 95, 0.45);
  color: var(--green-dark);
}
.comment-actions button.danger {
  border-color: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}
.comment-actions button.danger:hover {
  color: #ffffff;
  background: #dc2626;
}
.comment-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}
.create-hero {
  margin: 0 -20px;
  padding: 34px 20px 34px;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 15%, rgba(92, 203, 95, 0.2), transparent 28%),
    linear-gradient(135deg, #07172c 0%, var(--navy) 54%, #123a45 100%);
}
.create-hero > div {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 980px;
}
.create-hero span,
.form-card-head > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 1.35rem;
  font-weight: 950;
}
.create-hero h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1.08;
}
.create-hero p {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.create-hero small {
  display: block;
  margin-top: 8px;
  color: #d7e2ee;
  font-size: 0.98rem;
  white-space: nowrap;
}
.incident-create-form {
  display: grid;
  gap: 16px;
}
.premium-form-card {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--white);
  box-shadow: 0 14px 38px rgba(11, 31, 58, 0.06);
}
.form-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.form-card-head > span {
  width: 46px;
  height: 46px;
  color: var(--green-dark);
  background: #e7f8ed;
  border-color: #d6efd9;
}
.form-card-head h3 {
  margin: 0;
  color: var(--navy);
}
.form-card-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.premium-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field.full {
  grid-column: 1 / -1;
}
textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  resize: vertical;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(92, 203, 95, 0.22);
  border-color: rgba(92, 203, 95, 0.75);
}
.attachment-drop {
  display: grid;
  gap: 8px;
  min-height: 118px;
  place-items: center;
  border: 1px dashed #bdd1df;
  border-radius: 8px;
  padding: 18px;
  color: var(--navy);
  background: #f8fbfd;
  text-align: center;
  cursor: pointer;
}
.attachment-drop input {
  width: auto;
  min-height: 0;
  border: 0;
  padding: 0;
}
.attachment-drop small {
  color: var(--muted);
  font-weight: 500;
}
.attachment-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attachment-preview span {
  display: inline-grid;
  gap: 2px;
  max-width: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--navy);
  background: var(--white);
}
.attachment-preview strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.86rem;
}
.attachment-preview small {
  color: var(--muted);
  font-size: 0.76rem;
}
.create-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}
.button:disabled {
  cursor: wait;
  opacity: 0.7;
}
.create-feedback {
  min-height: 22px;
  margin: 0;
  color: #b43434;
  font-weight: 800;
}
.create-feedback.ok {
  color: var(--green-dark);
}
.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.view-panel > .card:first-child:not(.incidents-page-card):not(.detail-main-card),
.view-panel > .settings-grid:first-child {
  margin-top: 20px;
}
.settings-entry {
  display: grid;
  gap: 10px;
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(92, 203, 95, 0.1), transparent 42%),
    var(--white);
  padding: 16px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(11, 31, 58, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.settings-entry i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: var(--green-dark);
  background: rgba(92, 203, 95, 0.16);
  font-style: normal;
  font-weight: 950;
}
.settings-entry strong { display: block; color: var(--navy); margin-bottom: 6px; font-size: 1rem; }
.settings-entry span { color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.settings-entry:hover {
  border-color: rgba(92, 203, 95, 0.7);
  box-shadow: 0 24px 54px rgba(11, 31, 58, 0.1);
  transform: translateY(-1px);
}
.settings-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.settings-section-card {
  margin-top: -12px;
}
.settings-premium-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.settings-premium-form label {
  display: grid;
  gap: 8px;
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 900;
}
.settings-premium-form label.full {
  grid-column: 1 / -1;
}
.settings-premium-form input,
.settings-premium-form select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--navy);
  background: var(--white);
  font: inherit;
  font-weight: 850;
}
.settings-premium-form input:disabled,
.settings-premium-form select:disabled {
  color: #66788d;
  background: #f3f7fa;
  cursor: not-allowed;
}
.settings-premium-form input:focus,
.settings-premium-form select:focus {
  border-color: rgba(92, 203, 95, 0.7);
  outline: none;
  box-shadow: 0 0 0 4px rgba(92, 203, 95, 0.14);
}
.settings-toggle {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--white);
}
.settings-toggle input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green);
}
.settings-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.settings-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbfd;
}
.settings-list-row strong {
  display: block;
  color: var(--navy);
}
.settings-list-row small {
  color: var(--muted);
  font-weight: 800;
}
.settings-row-actions {
  display: inline-flex;
  gap: 8px;
}
.settings-header-pill {
  align-self: flex-start;
}
.settings-email-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr);
  gap: 14px;
  margin-top: 14px;
}
.settings-fieldset {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fbfd;
}
.settings-fieldset h4 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}
.settings-fieldset .settings-premium-form {
  margin-top: 0;
}
.settings-fieldset .settings-premium-form.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.settings-fieldset .settings-premium-form.one-column {
  grid-template-columns: 1fr;
  align-content: start;
}
.settings-field-description {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}
.btn-secondary {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}
.inline-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 10px 12px;
}
.mini-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
}
.mini-btn:hover { border-color: rgba(92, 203, 95, 0.7); }
.helper { color: var(--muted); font-size: 0.88rem; margin: 0; }

@media (max-width: 980px) {
  .app-shell.active { grid-template-columns: 1fr; }
  body {
    background: linear-gradient(180deg, #07172c 0%, var(--navy) 36%, #123a45 100%);
  }
  .side-nav {
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 1fr);
    overflow-x: auto;
    background: linear-gradient(90deg, #07172c 0%, var(--navy) 58%, #123a45 100%);
  }
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .home-grid { grid-template-columns: 1fr; }
  .status-overview { grid-template-columns: 180px 1fr; }
  .incidents-hero {
    flex-direction: column;
  }
  .incidents-hero-stats {
    min-width: 0;
  }
  .incident-filter-panel {
    min-width: 920px;
  }
  .incident-list-row {
    grid-template-columns: 1fr;
  }
  .communication-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .company-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .company-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
  .communication-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .resident-filter-panel {
    grid-template-columns: 1fr;
  }
  .communication-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
  .incident-list-side {
    justify-items: start;
    text-align: left;
  }
  .detail-grid,
  .detail-grid.secondary {
    grid-template-columns: 1fr;
  }
  .detail-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .view-panel {
    padding: 0 16px 16px;
    background: linear-gradient(180deg, transparent 0 180px, var(--ice) 180px 100%);
  }
  .home-hero,
  .create-hero,
  .incidents-hero {
    margin: 0 -16px;
  }
  .home-hero {
    padding: 26px 16px 68px;
  }
  .create-hero {
    padding: 26px 16px;
  }
  .create-hero > div,
  .form-card-head {
    align-items: flex-start;
  }
  .home-kpis {
    display: flex;
    overflow-x: auto;
    margin-inline: -16px;
    padding: 0 16px 8px;
    scroll-snap-type: x proximity;
  }
  .home-kpi {
    flex: 0 0 min(210px, 76vw);
    scroll-snap-align: start;
  }
  .status-overview {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .legend-list {
    width: 100%;
  }
  .incident-title-line {
    align-items: flex-start;
    flex-direction: column;
  }
  .incident-pills {
    flex-wrap: wrap;
  }
  .incidents-hero {
    padding: 26px 16px;
  }
  .incidents-hero > div:first-child {
    align-items: flex-start;
  }
  .incidents-hero-stats {
    display: flex;
    overflow-x: auto;
  }
  .incidents-hero-stats button {
    flex: 0 0 118px;
  }
  .incident-list-main {
    align-items: flex-start;
  }
  .incident-list-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .communications-card-head,
  .communication-title-line {
    align-items: flex-start;
    flex-direction: column;
  }
  .communications-hero small,
  .companies-hero small,
  .condominiums-hero small,
  .residents-hero small,
  .external-companies-hero small,
  .technicians-hero small {
    white-space: normal;
  }
  .communication-head-actions {
    align-self: flex-end;
    justify-content: flex-end;
  }
  .communication-filter-panel {
    grid-template-columns: 1fr;
  }
  .communication-pills {
    flex-wrap: wrap;
  }
  .incident-list-row h3,
  .incident-list-row p,
  .communication-title-line h3,
  .company-main p,
  .company-main small {
    white-space: normal;
  }
  .detail-hero {
    margin: 0 -16px;
    padding: 22px 16px 28px;
  }
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .assignment-dialog footer {
    flex-direction: column-reverse;
  }
  .detail-hero-main {
    align-items: flex-start;
  }
  .detail-info-grid,
  .detail-photo-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
  .detail-doc-list strong,
  .detail-info-grid strong {
    white-space: normal;
  }
  .detail-doc-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .detail-doc-row > button {
    justify-self: end;
  }
  .photo-gallery-modal {
    padding: 10px;
  }
  .photo-gallery-dialog {
    width: 100%;
    max-height: 94vh;
  }
  .photo-gallery-stage {
    min-height: 54vh;
    padding: 12px 48px;
  }
  .photo-gallery-stage img {
    max-height: 60vh;
  }
  .photo-gallery-nav {
    width: 36px;
    height: 48px;
  }
  .photo-gallery-dialog footer {
    align-items: stretch;
    flex-direction: column;
  }
  .photo-gallery-dialog footer p {
    white-space: normal;
  }
  .photo-gallery-dialog footer a {
    text-align: center;
  }
  .detail-timeline span {
    grid-template-columns: auto 1fr;
  }
  .detail-timeline small {
    grid-column: 2;
  }
  .home-incident-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .incident-icon {
    display: none;
  }
  .condominium-row {
    grid-template-columns: minmax(130px, 1.6fr) repeat(3, minmax(48px, 1fr));
    font-size: 0.88rem;
  }
  .premium-form-grid {
    grid-template-columns: 1fr;
  }
  .company-form-grid,
  .company-detail-form,
  .settings-premium-form {
    grid-template-columns: 1fr;
  }
  .settings-email-layout,
  .settings-fieldset .settings-premium-form.two-columns {
    grid-template-columns: 1fr;
  }
  .preferred-contact-options {
    grid-template-columns: 1fr;
  }
  .service-area-add {
    grid-template-columns: 1fr;
  }
  .create-footer {
    flex-direction: column-reverse;
  }
}
