:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #5a645d;
  --line: #d8ded8;
  --surface: #ffffff;
  --soft: #f4f7f3;
  --accent: #0d766e;
  --accent-dark: #09564f;
  --gold: #b46b1d;
  --danger: #b42318;
  --shadow: 0 24px 70px rgba(23, 32, 27, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Lato, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(244, 247, 243, 0.96), rgba(232, 239, 237, 0.82)),
    #eef3ef;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(360px, 1fr);
  gap: 38px;
  align-items: center;
  padding: 34px 0;
}

.lookup-panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(216, 222, 216, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 42px);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 54px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
}

.brand-name {
  font-weight: 800;
  font-size: 1.02rem;
}

.intro {
  max-width: 470px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-family: "Bebas Neu Bold", "Bebas Neue", Impact, Haettenschweiler, "Arial Narrow", sans-serif;
  font-size: clamp(3rem, 6.8vw, 5.35rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0;
}

.summary {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.search-form {
  margin-top: 34px;
}

label {
  display: block;
  margin-bottom: 9px;
  font-weight: 750;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  min-width: 0;
  width: 100%;
  border: 1px solid #b9c4bd;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 15px 16px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(13, 118, 110, 0.14);
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  min-height: 48px;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

button:active {
  transform: translateY(1px);
}

.search-row button {
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  padding: 0 22px;
  white-space: nowrap;
}

.search-row button:hover {
  background: var(--accent-dark);
}

.help-text {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.suggestions button {
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: #35413a;
  padding: 0 12px;
  font-size: 0.88rem;
  font-weight: 700;
}

.suggestions button:hover {
  border-color: #a9b6ad;
  background: #eaf0ec;
}

.result-panel {
  margin-top: 26px;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  overflow: hidden;
}

.disclaimer {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #d8d0bf;
  border-radius: 8px;
  background: #fffaf0;
}

.disclaimer h2 {
  margin: 0 0 7px;
  color: #6e4213;
  font-size: 0.86rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.disclaimer p {
  margin: 0;
  color: #5e5142;
  font-size: 0.9rem;
  line-height: 1.5;
}

.empty-state,
.not-found {
  padding: 26px;
}

.empty-state h2,
.not-found h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.empty-state p,
.not-found p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.bill-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  background: #f2f6f4;
  border-bottom: 1px solid var(--line);
}

.bill-header p,
.bill-header h2 {
  margin: 0;
}

.bill-header h2 {
  margin-top: 4px;
  font-size: 1.1rem;
}

.status {
  align-self: flex-start;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.status.current,
.status.lower {
  background: rgba(13, 118, 110, 0.12);
  color: var(--accent-dark);
}

.status.past-due,
.status.higher {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.bill-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}

.bill-body.compact {
  grid-template-columns: 0.9fr 1.1fr 0.85fr;
}

.bill-stat {
  padding: 20px 18px;
}

.bill-stat + .bill-stat {
  border-left: 1px solid var(--line);
}

.bill-stat span,
.bill-header span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bill-stat strong {
  display: block;
  margin-top: 7px;
  font-size: 1.35rem;
}

.higher {
  color: var(--danger);
}

.lower {
  color: var(--accent-dark);
}

.month-detail {
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

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

th,
td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid #edf1ee;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #fbfcfb;
}

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

.bill-footer {
  padding: 18px 24px 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.bill-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.secondary-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border-radius: 8px;
  border: 1px solid #b9c4bd;
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 800;
  padding: 0 14px;
  white-space: nowrap;
}

.image-panel {
  min-height: min(760px, calc(100vh - 68px));
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.logo-panel {
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vw, 78px);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.94), rgba(244, 247, 243, 0.86) 62%),
    linear-gradient(145deg, #e4eddc, #f8fbef);
}

.image-panel img {
  width: 100%;
  height: 100%;
  min-height: min(760px, calc(100vh - 68px));
  object-fit: cover;
  display: block;
}

.logo-panel img {
  width: min(100%, 560px);
  height: auto;
  min-height: 0;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(8, 76, 56, 0.18));
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 20px;
  }

  .image-panel {
    order: -1;
    min-height: 260px;
  }

  .image-panel img {
    min-height: 260px;
    max-height: 340px;
  }

  .logo-panel img {
    min-height: 0;
    max-height: 280px;
  }

  .brand-row {
    margin-bottom: 30px;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 560px);
    gap: 12px;
  }

  .lookup-panel {
    padding: 22px 16px;
  }

  .search-row,
  .bill-body,
  .bill-footer,
  .bill-header {
    grid-template-columns: 1fr;
    display: grid;
  }

  .search-row button {
    width: 100%;
  }

  .bill-stat + .bill-stat {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .secondary-action {
    justify-content: center;
  }
}
