:root {
  color-scheme: light;
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #eef3f0;
  --ink: #17211c;
  --muted: #647067;
  --line: #d9e2dc;
  --brand: #0f6b5d;
  --brand-2: #184c73;
  --green: #1b8a4a;
  --red: #c9362f;
  --orange: #d9831f;
  --shadow: 0 18px 50px rgba(29, 46, 38, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(244, 246, 243, 0.88), rgba(244, 246, 243, 0.96)),
    linear-gradient(90deg, rgba(15, 107, 93, 0.13), rgba(24, 76, 115, 0.08)),
    url("assets/streetlight-background.png") center / cover fixed,
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  position: relative;
}

.app-shell::before {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 232, 163, 0.22), transparent 28%),
    radial-gradient(circle at 84% 8%, rgba(15, 107, 93, 0.16), transparent 26%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 48px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 330px;
}

.brand-mark {
  align-items: center;
  background: var(--brand);
  border-radius: 8px;
  color: white;
  display: grid;
  font-weight: 800;
  height: 42px;
  justify-items: center;
  width: 42px;
}

.brand-logo {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 44px;
  object-fit: contain;
  padding: 4px;
}

.brand-logo.creavation {
  width: 128px;
}

.brand-logo.haldia {
  width: 116px;
}

.logo-pair {
  align-items: center;
  display: flex;
  gap: 8px;
}

.logo-pair.large {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}

.logo-pair.large .brand-logo {
  height: 58px;
  width: 100%;
}

.brand h1 {
  font-size: 18px;
  line-height: 1.1;
  margin: 0;
}

.brand span,
.eyebrow,
.muted,
.helper {
  color: var(--muted);
}

.brand span {
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.tabs {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 4px;
  padding: 4px;
}

.tab {
  background: transparent;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 700;
  min-height: 38px;
  padding: 0 14px;
}

.tab.active {
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(24, 76, 115, 0.1);
  color: var(--ink);
}

.userbar {
  align-items: center;
  display: flex;
  gap: 12px;
}

.layout {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1440px;
  padding: 28px clamp(18px, 4vw, 48px) 48px;
}

.app-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 10px 18px;
  justify-content: center;
  padding: 16px clamp(18px, 4vw, 48px);
  text-align: center;
}

.app-footer strong {
  color: var(--brand);
}

.hero {
  align-items: end;
  background:
    linear-gradient(90deg, rgba(12, 80, 70, 0.92), rgba(18, 55, 84, 0.68)),
    url("assets/streetlight-background.png") center / cover;
  background-size: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: white;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 260px;
  overflow: hidden;
  padding: clamp(22px, 5vw, 46px);
}

.hero h2 {
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: 0;
  line-height: 1;
  margin: 8px 0 14px;
  max-width: 790px;
}

.hero p {
  font-size: 17px;
  line-height: 1.55;
  margin: 0;
  max-width: 720px;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.hero-stats {
  display: grid;
  gap: 10px;
  min-width: 220px;
}

.stat {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  padding: 14px;
}

.stat strong {
  display: block;
  font-size: 30px;
}

.grid-two {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
}

.panel,
.card,
.login-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(29, 46, 38, 0.07);
}

.panel {
  padding: 22px;
}

.panel h2,
.panel h3,
.login-panel h2 {
  margin: 0 0 14px;
}

.section-head {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head p {
  margin: 4px 0 0;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.inline-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  margin: 14px 0;
}

.inline-grid.two {
  grid-template-columns: 1fr 1fr;
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-row label,
.field-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 107, 93, 0.14);
  outline: none;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  align-items: center;
  background: var(--brand);
  border-radius: 7px;
  color: white;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
}

.btn.secondary {
  background: var(--brand-2);
}

.btn.ghost {
  background: var(--surface-2);
  color: var(--ink);
}

.btn.danger {
  background: var(--red);
}

.btn.small {
  min-height: 32px;
  padding: 0 10px;
}

.checks {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-option {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  gap: 9px;
  min-height: 44px;
  padding: 8px 10px;
}

.check-option input {
  min-height: auto;
  width: auto;
}

.resolve-pole-list {
  display: grid;
  gap: 10px;
}

.resolve-pole-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.card-head.compact {
  gap: 8px;
}

.search-results,
.complaint-list,
.user-list,
.light-list,
.multi-light-list {
  display: grid;
  gap: 10px;
}

.selected-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card {
  padding: 14px;
}

.editable-card {
  display: grid;
  gap: 2px;
}

.card-head {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.pill {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 26px;
  padding: 0 10px;
}

.pill.green {
  background: rgba(27, 138, 74, 0.12);
  color: var(--green);
}

.pill.red {
  background: rgba(201, 54, 47, 0.12);
  color: var(--red);
}

.pill.orange {
  background: rgba(217, 131, 31, 0.15);
  color: #965309;
}

.issue-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.issue-pill {
  background: color-mix(in srgb, var(--issue-color) 13%, white);
  border-left: 4px solid var(--issue-color);
  border-radius: 6px;
  color: #17211c;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  min-height: 26px;
  padding: 4px 8px;
}

.complaint-items {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.complaint-item {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(130px, 0.7fr) minmax(180px, 1fr) auto;
  padding: 10px;
}

.map-panel {
  display: grid;
  gap: 14px;
}

.filters {
  display: grid;
  gap: 10px;
  grid-template-columns: 1.4fr 1fr 1fr;
}

.legend-box {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.legend-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.legend-item {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 8px;
}

.legend-item i {
  border-radius: 4px;
  display: inline-block;
  height: 16px;
  width: 22px;
}

.status-board {
  background:
    linear-gradient(90deg, rgba(23, 33, 28, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 33, 28, 0.05) 1px, transparent 1px),
    #fbfcfb;
  background-size: 34px 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
  max-height: 480px;
  overflow: auto;
  padding: 14px;
}

.marker {
  align-items: center;
  aspect-ratio: 1;
  border-radius: 8px;
  color: white;
  display: grid;
  font-size: 12px;
  font-weight: 900;
  justify-items: center;
  line-height: 1;
  min-width: 0;
  padding: 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

.marker.multi-issue {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.42),
    0 6px 16px rgba(23, 33, 28, 0.15);
}

.marker.green {
  background: var(--green);
}

.marker.red {
  background: var(--red);
}

.marker.orange {
  background: var(--orange);
}

.marker span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  opacity: 0.82;
}

.layout-map-panel {
  display: grid;
  gap: 14px;
}

.selected-map-light {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
}

.selected-map-light span {
  color: var(--muted);
  font-weight: 700;
}

.layout-map-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.map-zoom-label {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: inline-flex;
  font-weight: 900;
  min-height: 32px;
  padding: 0 10px;
}

.layout-map-scroll {
  background: #eef3ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 72vh;
  overflow: auto;
  padding: 12px;
}

.layout-map-stage {
  aspect-ratio: 2400 / 1732;
  background: white;
  min-width: 1300px;
  position: relative;
  width: 100%;
}

.layout-map-stage.layout-zoom-2 {
  min-width: 2400px;
}

.layout-map-stage.layout-zoom-3 {
  min-width: 3400px;
}

.layout-map-stage.layout-zoom-4 {
  min-width: 4600px;
}

.layout-map-stage img {
  display: block;
  height: 100%;
  inset: 0;
  object-fit: contain;
  position: absolute;
  width: 100%;
}

.layout-marker-layer {
  inset: 0;
  position: absolute;
}

.layout-marker {
  aspect-ratio: auto;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(23, 33, 28, 0.26);
  font-size: 0;
  height: 12px;
  left: calc(var(--x) * 1%);
  min-height: 0;
  min-width: 0;
  opacity: 0.94;
  padding: 0;
  position: absolute;
  top: calc(var(--y) * 1%);
  transform: translate(-50%, -50%);
  width: 12px;
  z-index: 1;
}

.layout-marker span {
  display: none;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  opacity: 1;
}

.layout-zoom-2 .layout-marker,
.layout-zoom-3 .layout-marker,
.layout-zoom-4 .layout-marker,
.layout-marker:hover,
.layout-marker:focus,
.layout-marker.dragging {
  font-size: 9px;
  height: 20px;
  outline: 3px solid rgba(21, 91, 130, 0.28);
  padding: 0 6px;
  width: auto;
  z-index: 3;
}

.layout-zoom-2 .layout-marker span,
.layout-zoom-3 .layout-marker span,
.layout-zoom-4 .layout-marker span,
.layout-marker:hover span,
.layout-marker:focus span,
.layout-marker.dragging span {
  display: block;
}

.layout-map-stage.editing .layout-marker {
  cursor: grab;
}

.layout-map-stage.editing .layout-marker.dragging {
  cursor: grabbing;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--surface-2);
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.management-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1.2fr);
}

.export-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.export-card {
  display: grid;
  gap: 8px;
  min-height: 110px;
  text-align: left;
}

.audit {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 10px;
}

.audit summary {
  color: var(--brand-2);
  cursor: pointer;
  font-weight: 800;
}

.timeline {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.timeline-item {
  border-left: 3px solid var(--brand);
  padding-left: 12px;
}

.timeline-item span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 2px;
}

.timeline-item p {
  margin: 6px 0 0;
}

.mail-error {
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.secure-toggle {
  align-self: end;
  min-height: 42px;
}

.modal-backdrop {
  align-items: center;
  background: rgba(23, 33, 28, 0.42);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 22px;
  position: fixed;
  z-index: 20;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  max-width: 460px;
  padding: 22px;
  width: 100%;
}

.modal.wide-modal {
  max-height: min(88vh, 900px);
  max-width: 860px;
  overflow: auto;
}

.modal h2,
.modal p {
  margin: 0;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  position: relative;
}

.login-screen::before {
  background:
    linear-gradient(90deg, rgba(9, 53, 47, 0.7), rgba(244, 246, 243, 0.38) 48%, rgba(244, 246, 243, 0.88)),
    url("assets/streetlight-background.png") center / cover;
  content: "";
  inset: 0;
  position: fixed;
  z-index: -2;
}

.login-screen::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.52));
  content: "";
  inset: 0;
  position: fixed;
  z-index: -1;
}

.login-panel {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  max-width: 520px;
  padding: 26px;
  width: 100%;
}

.login-panel .brand {
  align-items: flex-start;
  display: grid;
  justify-items: start;
}

.login-branding {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding-top: 14px;
}

.login-branding span {
  color: var(--muted);
  font-size: 13px;
}

.role-cards {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.role-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.empty {
  background: var(--surface-2);
  border: 1px dashed #b9c7bf;
  border-radius: 8px;
  color: var(--muted);
  padding: 20px;
  text-align: center;
}

.notice {
  background: rgba(15, 107, 93, 0.1);
  border: 1px solid rgba(15, 107, 93, 0.22);
  border-radius: 8px;
  color: var(--brand);
  font-weight: 800;
  padding: 12px;
}

@media (max-width: 980px) {
  .topbar,
  .hero,
  .grid-two,
  .management-grid,
  .section-head {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
  }

  .brand {
    min-width: 0;
  }

  .tabs,
  .userbar {
    justify-content: flex-start;
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .checks,
  .filters,
  .inline-grid,
  .inline-grid.two {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 320px;
  }

  .tab {
    white-space: nowrap;
  }
}
