* {
  box-sizing: border-box;
}

:root {
  --bs-body-bg: #10151a;
  --bs-body-color: #f8f3e6;
  --bs-primary: #d9b35b;
  --bs-primary-rgb: 217, 179, 91;
  --bs-border-radius: 1rem;
  --bs-font-sans-serif: Arial, Helvetica, sans-serif;
  --bg: #10151a;
  --bg-soft: #17202a;
  --panel: rgba(22, 28, 34, 0.92);
  --panel-strong: #202832;
  --gold: #d9b35b;
  --gold-light: #ffe9a3;
  --gold-dark: #9b6d26;
  --text: #f8f3e6;
  --muted: #b8ad95;
  --line: rgba(217, 179, 91, 0.25);
  --danger-bg: rgba(127, 29, 29, 0.28);
  --danger-text: #fecaca;
  --success-bg: rgba(22, 101, 52, 0.28);
  --success-text: #bbf7d0;
}

body {
  margin: 0;
  font-family: var(--bs-font-sans-serif);
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 179, 91, 0.13), transparent 34rem),
    linear-gradient(145deg, #0d1116 0%, #17212a 48%, #10151a 100%);
  color: var(--text);
  min-height: 100vh;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.header {
  background: rgba(13, 17, 22, 0.88);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
  color: var(--text);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(150px, 18vw, 215px);
  height: auto;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.header a,
.link-button {
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
}

.nav-form {
  margin: 0;
}

.main-nav a,
.main-nav .link-button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow: none;
  color: var(--text);
  min-height: auto;
  padding: 8px 13px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  width: auto;
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav .link-button:hover,
.main-nav .link-button:focus {
  background: rgba(217, 179, 91, 0.11);
  border-color: var(--line);
  box-shadow: none;
  color: var(--gold-light);
  transform: none;
}

main {
  padding: 32px 0 48px;
}

.hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 233, 163, 0.09), rgba(22, 28, 34, 0.72)),
    radial-gradient(circle at 80% 18%, rgba(217, 179, 91, 0.22), transparent 18rem);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  margin-bottom: 22px;
  overflow: hidden;
  padding: clamp(24px, 5vw, 56px);
  position: relative;
}

.hero::after {
  background: linear-gradient(90deg, transparent, rgba(255, 233, 163, 0.18), transparent);
  content: "";
  height: 1px;
  inset: auto 10% 18px;
  position: absolute;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  line-height: 1.05;
  margin: 0 0 18px;
}

.hero p {
  color: #e6dcc4;
  font-size: 1.08rem;
  line-height: 1.8;
  margin-top: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-logo-card {
  align-items: center;
  background: radial-gradient(circle at center, rgba(255, 233, 163, 0.1), rgba(9, 13, 17, 0.42));
  border: 1px solid rgba(255, 233, 163, 0.22);
  border-radius: 24px;
  display: flex;
  justify-content: center;
  min-height: 260px;
  padding: 20px;
}

.hero-logo-card img {
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.5));
  max-width: 100%;
}

.button-link,
button {
  background: linear-gradient(135deg, var(--gold-light), var(--gold) 48%, var(--gold-dark));
  border: none;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(155, 109, 38, 0.28);
  color: #15120b;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: fit-content;
}

.button-link.btn,
button.btn {
  align-items: center;
  border: none;
  border-radius: 999px;
  color: #15120b;
  font-weight: 800;
  gap: 8px;
}

.btn-primary {
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: transparent;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: transparent;
  --bs-btn-active-border-color: transparent;
  --bs-btn-disabled-bg: rgba(217, 179, 91, 0.55);
  --bs-btn-disabled-border-color: transparent;
}

.button-link:hover,
.button-link:focus,
button:hover,
button:focus {
  box-shadow: 0 16px 34px rgba(155, 109, 38, 0.38);
  transform: translateY(-1px);
}

.secondary-link,
button.secondary {
  background: rgba(255, 233, 163, 0.08);
  border: 1px solid var(--line);
  color: var(--gold-light);
}

.secondary-link.btn,
button.secondary.btn {
  border: 1px solid var(--line);
  color: var(--gold-light);
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(18px, 3vw, 26px);
  margin-bottom: 18px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
}

.card h2,
.card h3,
.card h4 {
  color: var(--gold-light);
  margin-top: 0;
}

.card p,
.card li {
  color: #e3dac6;
  line-height: 1.7;
}

.card a {
  color: var(--gold-light);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.form-grid button[type="submit"] {
  align-self: end;
  min-height: 47px;
  padding-inline: 24px;
  width: 100%;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: var(--gold-light);
}

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

input,
textarea,
select {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(217, 179, 91, 0.4);
  border-radius: 12px;
  color: #161c22;
  padding: 11px 12px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 179, 91, 0.18);
  outline: none;
}

.nav-form .link-button {
  background: transparent;
  box-shadow: none;
  color: var(--text);
  width: auto;
}

.button-link.google {
  background: #fff;
  border: 1px solid rgba(217, 179, 91, 0.45);
  box-shadow: none;
  color: #1f2937;
}

.hero-card {
  background:
    linear-gradient(135deg, rgba(255, 233, 163, 0.1), rgba(22, 28, 34, 0.82)),
    var(--panel);
  border: 1px solid var(--line);
}

.subscription-cta {
  display: flex;
  justify-content: center;
  margin: 18px 0 22px;
}

.subscription-cta .button-link {
  font-size: 1.08rem;
  padding: 13px 26px;
}

.about-content {
  max-width: 760px;
}

.check-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 18px 0 24px;
  padding: 0;
}

.check-list li {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.check-list li::before {
  color: #86efac;
  content: "V";
  flex: 0 0 auto;
  font-weight: 900;
}

.info-card,
.login-panel {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.auth-page {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-inline: auto;
  max-width: 460px;
}

.auth-card {
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.auth-eyebrow {
  color: var(--gold-light);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.auth-card {
  background:
    linear-gradient(180deg, rgba(255, 233, 163, 0.08), transparent 170px),
    rgba(22, 28, 34, 0.96);
  border-radius: 26px;
  padding: clamp(22px, 4vw, 34px);
}

.auth-card-header {
  text-align: center;
}

.auth-logo {
  display: block;
  margin: 0 auto 14px;
  max-width: 180px;
  width: 62%;
}

.auth-card h2,
.auth-card h3 {
  color: var(--gold-light);
  font-size: 1.7rem;
  margin: 6px 0 8px;
}

.auth-card .muted {
  margin: 0 auto 18px;
  max-width: 360px;
}

.auth-social-button,
.auth-submit {
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: 100%;
}

.auth-social-button {
  color: #15120b;
  gap: 10px;
}

.google-mark {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(21, 18, 11, 0.14);
  border-radius: 50%;
  display: inline-flex;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.auth-divider {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 0.92rem;
  gap: 12px;
  margin: 22px 0;
}

.auth-divider::before,
.auth-divider::after {
  background: var(--line);
  content: "";
  flex: 1;
  height: 1px;
}

.auth-form {
  display: grid;
  gap: 13px;
}

.auth-form label {
  color: #f5e8c9;
  font-size: 0.94rem;
}

.auth-form input {
  min-height: 45px;
}

.auth-switch-line {
  margin: 18px 0 0;
  text-align: center;
}

.auth-switch-line a {
  color: var(--gold-light);
  font-weight: 800;
  text-decoration: none;
}

.auth-switch-line a:hover,
.auth-switch-line a:focus {
  color: var(--text);
  text-decoration: underline;
}

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

.price-line {
  font-size: 1.15rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
}

th,
td {
  border: 1px solid rgba(217, 179, 91, 0.2);
  padding: 10px;
  text-align: right;
  vertical-align: top;
}

th {
  background: rgba(217, 179, 91, 0.14);
  color: var(--gold-light);
}

td {
  background: rgba(255, 255, 255, 0.03);
}

td input,
td textarea {
  min-width: 120px;
  width: 100%;
}

.alert {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 12px;
}

.alert.success {
  background: var(--success-bg);
  border-color: rgba(187, 247, 208, 0.28);
  color: var(--success-text);
}

.alert.error {
  background: var(--danger-bg);
  border-color: rgba(254, 202, 202, 0.28);
  color: var(--danger-text);
}

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

.apartment-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.editable-card {
  grid-column: 1 / -1;
}

.import-preview {
  margin-top: 16px;
}

.comparison-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin: 12px 0;
  padding: 14px;
}

.muted {
  color: var(--muted);
}

.paid {
  color: #86efac;
}

.unpaid {
  color: var(--gold);
}

.inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.metric-card {
  background:
    linear-gradient(135deg, rgba(255, 233, 163, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.metric-card span {
  color: var(--muted);
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.metric-card strong {
  color: var(--gold-light);
  display: block;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  color: var(--muted);
}

@media (max-width: 760px) {
  .header-inner,
  .hero,
  .auth-page {
    grid-template-columns: 1fr;
  }

  .header-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .brand {
    justify-content: center;
  }

  .main-nav {
    justify-content: center;
  }

  .hero-logo-card {
    min-height: 190px;
  }

}

@media (max-width: 560px) {
  .main-nav a {
    padding: 7px 10px;
  }

  .inline-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}
