:root {
  --bg: #f7f4ef;
  --bg-soft: #f4efe8;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --border: rgba(51, 51, 51, 0.08);
  --border-strong: rgba(51, 51, 51, 0.12);
  --text: #333333;
  --text-soft: #5f5a54;
  --text-muted: #8b847d;
  --primary: #333333;
  --primary-2: #4a4540;
  --accent: #b0732b;
  --accent-2: #c58b46;
  --shadow-soft: 0 18px 40px rgba(51, 51, 51, 0.08);
  --shadow-card: 0 24px 60px rgba(51, 51, 51, 0.1);
  --radius-xl: 34px;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 16px;
  --container: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Open Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(176, 115, 43, 0.1), transparent 22%),
    radial-gradient(circle at top right, rgba(51, 51, 51, 0.05), transparent 24%),
    linear-gradient(180deg, #faf7f3 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

input {
  min-width: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: relative;
  z-index: 200;
  padding: 10px 24px 24px;
}

.navbar-wrapper {
  width: 100%;
}

.main-navbar {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 4px;
}

.navbar-shell {
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 14px 40px rgba(51, 51, 51, 0.07);
  backdrop-filter: blur(16px);
}

.navbar-container {
  min-height: 92px;
  padding: 0 42px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.navbar-brand img {
  width: 128px;
  height: auto;
  object-fit: contain;
}

.menu-button {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff, #f7f4ef);
  box-shadow: 0 8px 22px rgba(51, 51, 51, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.menu-button:hover {
  transform: translateY(-1px);
  color: var(--accent);
  box-shadow: 0 12px 24px rgba(51, 51, 51, 0.1);
}

.navbar-right {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0 auto;
}

.nav-link,
.dropdown-toggle,
.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.dropdown-toggle:hover,
.user-trigger:hover,
.nav-link:focus-visible,
.dropdown-toggle:focus-visible,
.user-trigger:focus-visible {
  color: var(--accent);
  outline: none;
}

.nav-link-active {
  color: var(--accent);
}

.dropdown,
.user-dropdown-container {
  position: relative;
}

.dropdown-icon {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.dropdown.is-open .dropdown-icon,
.user-dropdown-container.is-open .dropdown-icon {
  transform: rotate(180deg);
}

.dropdown-content,
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  min-width: 230px;
  margin: 0;
  padding: 14px;
  list-style: none;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.dropdown-content a,
.user-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--text-soft);
  font-weight: 600;
}

.dropdown-content a:hover,
.user-dropdown-menu a:hover {
  color: var(--accent);
  background: rgba(176, 115, 43, 0.08);
}

.dropdown.is-open .dropdown-content,
.user-dropdown-container.is-open .user-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.user-dropdown-menu .divider {
  height: 1px;
  margin: 10px 2px;
  background: rgba(51, 51, 51, 0.08);
}

.hello-label {
  color: var(--text-muted);
  font-weight: 600;
}

.page-shell {
  width: min(var(--container), calc(100vw - 48px));
  margin: 0 auto;
}

.billing-page {
  padding: 18px 0 48px;
}

.billing-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.overview-card,
.steps-card,
.profit-controls-card,
.profit-card,
.invoice-table-card,
.invoice-notes-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.9));
  box-shadow: var(--shadow-soft);
}

.overview-card {
  padding: 24px 22px 24px;
  min-height: 230px;
}

.overview-icon,
.step-number {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(176, 115, 43, 0.08);
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 800;
}

.overview-card h3,
.step-item h3,
.invoice-table-card h3,
.invoice-notes-card h3,
.steps-header h2,
.profit-heading-copy h2,
.intro-block h1 {
  margin: 16px 0 10px;
  font-family: "Montserrat", sans-serif;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #242833;
}

.overview-card h3,
.step-item h3 {
  font-size: 1.1rem;
}

.overview-card p,
.intro-block p,
.step-item p,
.profit-heading-copy p,
.notes-list span,
.note-panel p {
  color: var(--text-soft);
  line-height: 1.8;
}

.intro-block {
  padding: 54px 0 28px;
}

.intro-block h1,
.profit-heading-copy h2 {
  font-size: clamp(2.2rem, 4vw, 3.25rem);
}

.intro-block p,
.profit-heading-copy p {
  max-width: 860px;
  margin: 16px 0 0;
}

.section-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.steps-card {
  padding: 24px;
}

.steps-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.steps-badge,
.table-chip,
.card-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(51, 51, 51, 0.9);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
}

.steps-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step-item {
  padding: 22px 18px 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(250, 248, 244, 0.78);
}

.profit-section {
  padding-top: 54px;
}

.profit-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 24px;
  align-items: start;
}

.profit-controls-card {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.control-group label {
  display: block;
  margin-bottom: 10px;
  color: #242833;
  font-weight: 700;
}

.counter-box {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 12px;
}

.counter-btn {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(176, 115, 43, 0.08);
  color: var(--accent);
  font-size: 1.6rem;
  box-shadow: 0 8px 18px rgba(51, 51, 51, 0.05);
  transition: transform 0.2s ease, background 0.2s ease;
}

.counter-btn:hover {
  transform: translateY(-1px);
  background: rgba(176, 115, 43, 0.12);
}

.counter-box input {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  text-align: center;
  font-weight: 700;
  color: #242833;
  background: #f8f5ef;
}

.counter-box input:focus {
  outline: 2px solid rgba(176, 115, 43, 0.2);
  border-color: rgba(176, 115, 43, 0.35);
}

.profit-cards-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.profit-card {
  padding: 22px;
}

.profit-card-accent {
  background: linear-gradient(135deg, #2f2b29 0%, #4b443d 100%);
  color: #ffffff;
  border-color: transparent;
}

.profit-label {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.9;
}

.profit-rate {
  margin-top: 10px;
  color: inherit;
  opacity: 0.82;
  font-weight: 700;
}

.profit-total {
  margin-top: 18px;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: inherit;
}

.invoice-layout {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.82fr);
  gap: 20px;
}

.invoice-table-card,
.invoice-notes-card {
  padding: 24px;
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.table-chip,
.card-chip {
  background: rgba(176, 115, 43, 0.11);
  color: var(--accent);
}

.invoice-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}

.invoice-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.invoice-table th,
.invoice-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(51, 51, 51, 0.08);
}

.invoice-table th {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.invoice-table tfoot td {
  font-weight: 800;
  color: #242833;
}

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

.notes-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.notes-list i {
  color: var(--accent);
  margin-top: 6px;
}

.note-panel {
  margin-top: 22px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(176, 115, 43, 0.14);
  background: rgba(250, 245, 237, 0.95);
}

.note-panel h4 {
  margin: 0 0 10px;
  font-family: "Montserrat", sans-serif;
  font-size: 1.05rem;
}

.site-footer {
  padding: 34px 24px 44px;
}

.footer-shell {
  width: min(var(--container), calc(100vw - 48px));
  margin: 0 auto;
  padding: 28px 30px 18px;
  border-radius: 30px;
  background: linear-gradient(90deg, #2f2b29 0%, #4b443d 55%, #3c3834 100%);
  box-shadow: var(--shadow-card);
  color: #ffffff;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 0.6fr 0.6fr minmax(280px, 0.9fr);
  gap: 28px;
}

.footer-brand img {
  width: 138px;
}

.footer-brand-col p,
.footer-links-col a,
.footer-contact-item,
.footer-feedback,
.footer-form input {
  color: rgba(255, 255, 255, 0.84);
}

.footer-brand-col p {
  margin: 28px 0 22px;
  max-width: 340px;
  line-height: 1.8;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links-col h4,
.footer-contact-col h4 {
  margin: 0 0 20px;
  font-family: "Montserrat", sans-serif;
  font-size: 1.15rem;
}

.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-col a:hover,
.footer-socials a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.footer-form {
  display: grid;
  gap: 12px;
}

.footer-form input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.footer-form button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
}

.footer-feedback {
  min-height: 20px;
  margin: 8px 0 0;
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.footer-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-contact-item i {
  color: var(--accent-2);
}

@media (max-width: 1180px) {
  .nav-center {
    gap: 22px;
  }

  .profit-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-layout,
  .profit-heading-row,
  .footer-top {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .navbar-container {
    padding: 22px 22px;
    flex-wrap: wrap;
  }

  .navbar-right {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 8px 0 6px;
  }

  .navbar-right.is-open {
    display: flex;
  }

  .nav-center {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
  }

  .nav-link,
  .dropdown-toggle,
  .user-trigger {
    width: 100%;
    justify-content: space-between;
    min-height: 52px;
    padding: 0 6px;
  }

  .dropdown-content,
  .user-dropdown-menu {
    position: static;
    min-width: 100%;
    margin-top: 10px;
    transform: none;
    display: none;
    opacity: 1;
    pointer-events: auto;
  }

  .dropdown.is-open .dropdown-content,
  .user-dropdown-container.is-open .user-dropdown-menu {
    display: block;
  }

  .billing-overview,
  .steps-grid,
  .profit-cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-shell,
  .footer-shell {
    width: min(var(--container), calc(100vw - 32px));
  }

  .steps-card,
  .invoice-table-card,
  .invoice-notes-card,
  .overview-card,
  .profit-card,
  .profit-controls-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .counter-box {
    grid-template-columns: 44px 1fr 44px;
    gap: 10px;
  }

  .counter-btn {
    width: 44px;
    height: 44px;
  }

  .counter-box input,
  .footer-form input {
    height: 46px;
  }
}


.profit-card-charge {
  background: linear-gradient(180deg, rgba(255, 248, 246, 0.96), rgba(255, 244, 240, 0.92));
  border-color: rgba(176, 115, 43, 0.12);
}

.profit-card-charge .profit-total {
  color: #8a4d1f;
}
