:root {
    --ink: #121917;
    --muted: #64716b;
    --line: #dce6e1;
    --paper: #f7faf8;
    --surface: #ffffff;
    --soft: #eef5f0;
    --mint: #dcf6e9;
    --green: #0b7a55;
    --green-dark: #084d3a;
    --gold: #efb343;
    --coral: #d75d45;
    --plum: #604070;
    --sky: #dfefff;
    --shadow: 0 18px 48px rgba(18, 25, 23, 0.12);
    --shadow-soft: 0 10px 28px rgba(18, 25, 23, 0.08);
    --radius: 8px;
}

* {
    box-sizing: border-box;
    letter-spacing: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

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

a {
    color: inherit;
}

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

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    min-height: 48px;
    padding: 0.9rem 1rem;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(22, 122, 85, 0.15);
}

label {
    display: grid;
    gap: 0.4rem;
    color: var(--ink);
    font-weight: 700;
}

label input,
label select,
label textarea {
    font-weight: 400;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.narrow {
    width: min(780px, calc(100% - 32px));
}

.center {
    text-align: center;
}

.page-main {
    min-height: 62vh;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 20;
    background: var(--ink);
    color: #fff;
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius);
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(247, 250, 248, 0.88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    min-width: max-content;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(11, 122, 85, 0.24);
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.1;
}

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

.site-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-left: auto;
    border: 1px solid rgba(220, 230, 225, 0.74);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    padding: 0.22rem;
}

.site-nav a,
.filter-pills a {
    text-decoration: none;
    color: var(--muted);
    border-radius: var(--radius);
    padding: 0.55rem 0.85rem;
    font-weight: 700;
    transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.site-nav a:hover,
.site-nav a.active,
.filter-pills a:hover,
.filter-pills a.active {
    color: var(--ink);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 0.65rem;
}

.nav-toggle span:not(.sr-only) {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--ink);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 0.74rem 1.05rem;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
    box-shadow: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.68;
    transform: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green), #0d8f67);
    color: #fff;
}

.btn-dark {
    background: linear-gradient(135deg, var(--ink), #29322f);
    color: #fff;
}

.btn-light {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.58);
    color: var(--ink);
    border-color: var(--line);
}

.btn-small {
    min-height: 38px;
    padding: 0.55rem 0.75rem;
    background: var(--ink);
    color: #fff;
}

.text-link {
    color: var(--green-dark);
    font-weight: 800;
    text-decoration: none;
    border-bottom: 2px solid currentColor;
}

.button-row,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.hero-section {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(247, 250, 248, 0.98), rgba(220, 246, 233, 0.82), rgba(223, 239, 255, 0.62)),
        url("../images/service-workspace.svg");
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--line);
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: auto -10% -26% 42%;
    height: 340px;
    background: radial-gradient(circle, rgba(239, 179, 67, 0.32), rgba(239, 179, 67, 0));
    pointer-events: none;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.64fr);
    gap: 3rem;
    align-items: center;
    min-height: 660px;
    padding-block: 4.5rem;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--green-dark);
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.08;
    text-wrap: balance;
}

h1 {
    font-size: 3.7rem;
}

h2 {
    font-size: 2.18rem;
}

h3 {
    font-size: 1.2rem;
}

.hero-lead,
.lead {
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 68ch;
}

.service-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    margin: 2rem 0 1rem;
    max-width: 720px;
    border: 1px solid rgba(220, 230, 225, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
    padding: 0.35rem;
}

.service-search input {
    border-color: transparent;
    background: transparent;
}

.service-search input:focus {
    box-shadow: none;
}

.hero-panel {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.1rem;
    backdrop-filter: blur(18px);
}

.hero-panel-header,
.card-footer,
.section-heading,
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.hero-panel-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.hero-panel-header span {
    color: var(--muted);
    font-weight: 700;
}

.category-list {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    min-height: 46px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.8rem 0.9rem;
    text-decoration: none;
    font-weight: 800;
    background: var(--surface);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.category-list a:hover {
    border-color: rgba(11, 122, 85, 0.35);
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.category-list a::after {
    content: ">";
    color: var(--coral);
}

.section {
    padding-block: 4.75rem;
}

.section-compact {
    padding-block: 3.5rem;
}

.page-main > .section-compact:first-child:not(.account-hero) {
    background:
        linear-gradient(135deg, rgba(247, 250, 248, 0.98), rgba(220, 246, 233, 0.72)),
        url("../images/service-workspace.svg");
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--line);
}

.section-tight {
    padding-top: 0;
}

.section-muted {
    background: linear-gradient(180deg, var(--soft), #f9fbfa);
}

.section-accent {
    background: linear-gradient(135deg, var(--green-dark), #18352d 62%, var(--plum));
    color: #fff;
}

.section-accent .eyebrow,
.section-accent p {
    color: #e7f6ee;
}

.account-hero {
    background: linear-gradient(135deg, var(--soft), var(--sky));
    border-bottom: 1px solid var(--line);
}

.section-heading {
    margin-bottom: 1.5rem;
}

.section-heading > div {
    display: grid;
    gap: 0.15rem;
}

.section-heading h1,
.section-heading h2 {
    max-width: 760px;
}

.card-grid,
.plan-grid,
.info-grid {
    display: grid;
    gap: 1rem;
}

.service-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card,
.plan-card,
.info-grid > div,
.empty-state,
.panel-form,
.steps > div {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 1px 0 rgba(18, 25, 23, 0.03);
}

.service-card {
    overflow: hidden;
    display: grid;
    grid-template-rows: 176px 1fr;
    min-height: 448px;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.service-card:hover,
.plan-card:hover,
.info-grid > div:hover,
.steps > div:hover {
    border-color: rgba(11, 122, 85, 0.28);
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.service-card img {
    width: 100%;
    height: 176px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--mint), var(--sky));
}

.service-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
}

.service-card-body span,
.plan-card > span {
    color: var(--plum);
    font-size: 0.85rem;
    font-weight: 900;
}

.service-card-body p,
.plan-card p,
.info-grid p,
.empty-state p,
.steps p,
.site-footer p {
    margin: 0;
    color: var(--muted);
}

.service-card .card-footer {
    margin-top: auto;
}

.plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plan-card {
    padding: 1.25rem;
    display: grid;
    gap: 1rem;
}

.plan-card.featured {
    border-color: var(--green);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.plan-card.featured::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--green), var(--gold), var(--coral));
}

.plan-price {
    color: var(--ink);
    font-size: 2rem;
    font-weight: 900;
}

.plan-price small {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.plan-card ul {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding-left: 1.1rem;
}

.split-section,
.detail-grid,
.form-layout,
.auth-grid,
.cta-band {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1fr);
    gap: 2rem;
    align-items: start;
}

.steps {
    display: grid;
    gap: 1rem;
}

.steps > div {
    padding: 1.1rem;
    display: grid;
    gap: 0.45rem;
}

.steps span {
    color: var(--coral);
    font-weight: 900;
}

.cta-band {
    align-items: center;
}

.detail-grid {
    align-items: center;
}

.detail-image {
    width: 100%;
    min-height: 360px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.detail-copy {
    display: grid;
    gap: 1rem;
}

.detail-meta {
    border-left: 5px solid var(--gold);
    background: linear-gradient(135deg, var(--soft), #fff);
    padding: 1rem;
    border-radius: var(--radius);
}

.detail-meta span,
.detail-meta strong {
    display: block;
}

.detail-meta span {
    color: var(--muted);
    font-weight: 700;
}

.filter-bar {
    display: grid;
    gap: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    backdrop-filter: blur(14px);
}

.filter-bar form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-pills a {
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.72);
}

.market-filter-group {
    display: inline-flex;
    position: relative;
}

.market-filter-group > a {
    align-items: center;
    display: inline-flex;
}

.market-filter-menu {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 0.35rem;
    left: 0;
    min-width: 170px;
    opacity: 0;
    padding: 0.45rem;
    pointer-events: none;
    position: absolute;
    top: calc(100% + 0.45rem);
    transform: translateY(-4px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    visibility: hidden;
    z-index: 20;
}

.market-filter-group:hover .market-filter-menu,
.market-filter-group:focus-within .market-filter-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.market-filter-menu a {
    white-space: nowrap;
}

.account-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.account-nav a {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.74);
    color: var(--muted);
    font-weight: 800;
    padding: 0.65rem 0.85rem;
    text-decoration: none;
}

.account-nav a:hover,
.account-nav a.active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-soft);
}

.stat-grid,
.dashboard-grid {
    display: grid;
    gap: 1rem;
}

.stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    align-items: start;
}

.stat-card,
.account-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 1px 0 rgba(18, 25, 23, 0.03);
}

.stat-card {
    display: grid;
    gap: 0.35rem;
    padding: 1.2rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--green), var(--gold));
}

.stat-card span {
    color: var(--muted);
    font-weight: 800;
}

.stat-card strong {
    color: var(--ink);
    font-size: 1.8rem;
    line-height: 1.1;
}

.account-panel {
    padding: 1.25rem;
    box-shadow: var(--shadow-soft);
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.panel-heading h2 {
    font-size: 1.35rem;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 0.85rem;
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-size: 0.86rem;
    text-transform: uppercase;
    background: #f4f8f6;
}

.data-table tbody tr:hover td {
    background: #fbfdfc;
}

.data-table td small {
    display: block;
    color: var(--muted);
    margin-top: 0.2rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border-radius: var(--radius);
    background: var(--mint);
    color: var(--green-dark);
    font-weight: 900;
    padding: 0.3rem 0.55rem;
}

.status-badge.muted {
    background: var(--soft);
    color: var(--muted);
}

.account-summary {
    display: grid;
    gap: 1rem;
}

.account-summary dl {
    display: grid;
    gap: 0.85rem;
    margin: 0;
}

.account-summary dl div {
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.8rem;
}

.account-summary dt {
    color: var(--muted);
    font-weight: 800;
}

.account-summary dd {
    margin: 0.15rem 0 0;
    font-weight: 800;
}

.profile-summary {
    max-width: 760px;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 2rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 245, 240, 0.92)),
        url("../images/service-workspace.svg");
    background-size: cover;
    background-position: center;
}

.empty-state .btn {
    margin-top: 1rem;
}

.loading-state,
.form-status {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.form-status:empty {
    display: none;
}

.form-status.is-success {
    color: var(--green-dark);
}

.form-status.is-error {
    color: var(--coral);
}

.notice {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 800;
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.notice-success {
    background: var(--mint);
    color: var(--green-dark);
}

.notice-error {
    background: #fff2ee;
    color: var(--coral);
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.market-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-rows: 230px 1fr;
    overflow: hidden;
    min-height: 460px;
}

.market-card-media {
    background: var(--soft);
    display: block;
    overflow: hidden;
}

.market-card-media img,
.market-detail .detail-image {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.market-card-body {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.market-card-body h2,
.market-card-body p {
    margin: 0;
}

.market-card-body p {
    color: var(--muted);
}

.market-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.market-detail {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
    gap: 2rem;
    align-items: start;
}

.market-detail > div:first-child {
    aspect-ratio: 4 / 3;
    background: var(--soft);
    border-radius: var(--radius);
    overflow: hidden;
}

.market-checkout-form {
    margin-top: 0.5rem;
}

.delivery-note {
    color: var(--green-dark);
    font-weight: 800;
}

.receipt-shell {
    display: grid;
    gap: 1rem;
    width: min(980px, calc(100% - 32px));
}

.receipt-document {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.receipt-document-header {
    background: var(--ink);
    color: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem;
}

.receipt-brand {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    min-width: 0;
}

.receipt-brand .brand-mark {
    background: #fff;
    color: var(--green-dark);
    flex: 0 0 auto;
}

.receipt-kicker {
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin: 0 0 0.25rem;
    text-transform: uppercase;
}

.receipt-document-header h2 {
    color: #fff;
    font-size: clamp(1.35rem, 2vw, 1.95rem);
    line-height: 1.05;
    margin: 0;
}

.receipt-document-header p {
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
}

.receipt-title-block {
    display: grid;
    gap: 0.45rem;
    justify-items: end;
    text-align: right;
}

.receipt-title-block strong {
    font-size: 1rem;
    line-height: 1.2;
    word-break: break-word;
}

.receipt-title-block span:last-child {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
}

.receipt-paid-stamp {
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    padding: 0.35rem 0.65rem;
    text-transform: uppercase;
}

.receipt-amount-band,
.receipt-parties,
.receipt-payment-strip,
.receipt-totals {
    display: grid;
    gap: 0;
}

.receipt-amount-band {
    background: linear-gradient(135deg, var(--mint), var(--sky));
    grid-template-columns: 1.15fr 1fr 0.8fr;
}

.receipt-amount-band > div,
.receipt-payment-strip > div,
.receipt-totals > div {
    border-right: 1px solid rgba(18, 25, 23, 0.12);
    display: grid;
    gap: 0.2rem;
    padding: 1rem 1.25rem;
}

.receipt-amount-band > div:last-child,
.receipt-payment-strip > div:last-child,
.receipt-totals > div:last-child {
    border-right: 0;
}

.receipt-amount-band span,
.receipt-payment-strip span,
.receipt-totals span,
.receipt-section h3 {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.receipt-amount-band strong {
    color: var(--green-dark);
    font-size: clamp(1rem, 2vw, 1.85rem);
    line-height: 1.1;
}

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

.receipt-section {
    border-top: 1px solid var(--line);
    padding: 1.15rem 1.25rem;
}

.receipt-parties .receipt-section + .receipt-section {
    border-left: 1px solid var(--line);
}

.receipt-section h3 {
    margin: 0 0 0.65rem;
}

.receipt-section p {
    margin: 0.1rem 0;
    overflow-wrap: anywhere;
}

.receipt-strong {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 900;
}

.receipt-table-wrap {
    overflow-x: auto;
}

.receipt-table {
    border-collapse: collapse;
    width: 100%;
}

.receipt-table th,
.receipt-table td {
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 0.7rem 0.8rem 0;
    text-align: left;
    vertical-align: top;
}

.receipt-table th {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.receipt-table td {
    font-weight: 800;
    overflow-wrap: anywhere;
}

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

.amount-cell {
    text-align: right;
    white-space: nowrap;
}

.receipt-payment-strip {
    border-top: 1px solid var(--line);
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.receipt-payment-strip strong,
.receipt-totals strong {
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.receipt-totals {
    border-top: 1px solid var(--line);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.receipt-balance {
    background: var(--soft);
}

.receipt-balance strong {
    color: var(--green-dark);
}

.receipt-footer-note {
    align-items: center;
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: auto;
    padding: 0.85rem 1.25rem;
}

.receipt-footer-note p {
    margin: 0;
}

.receipt-actions {
    justify-content: flex-end;
}

.admin-form {
    box-shadow: none;
}

.checkbox-label {
    align-content: center;
    grid-template-columns: auto 1fr;
    min-height: 54px;
}

.checkbox-label input {
    width: auto;
}

.inline-admin-form {
    display: grid;
    gap: 0.6rem;
    min-width: 260px;
}

.inline-admin-form label {
    font-size: 0.88rem;
}

.inline-admin-form input,
.inline-admin-form select {
    min-height: 38px;
    padding: 0.55rem 0.65rem;
}

.form-layout {
    align-items: start;
}

.form-layout > div,
.auth-grid > div,
.split-section > div:first-child {
    display: grid;
    gap: 0.15rem;
}

.panel-form {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    box-shadow: var(--shadow-soft);
}

.panel-form .btn {
    justify-self: start;
}

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

.span-2 {
    grid-column: span 2;
}

.auth-grid {
    align-items: center;
}

.auth-form {
    max-width: 480px;
    width: 100%;
    justify-self: end;
}

.auth-form p {
    margin: 0;
    color: var(--muted);
}

.contact-list {
    margin-top: 1.5rem;
}

.contact-list p {
    margin: 0.4rem 0;
}

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

.info-grid > div {
    padding: 1.25rem;
}

.site-footer {
    background: linear-gradient(135deg, #111816, #162720 60%, #2e2236);
    color: #fff;
    padding-block: 3rem 1.25rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 2rem;
}

.brand-footer .brand-mark {
    background: var(--gold);
    color: var(--ink);
}

.brand-footer small,
.site-footer p {
    color: #c6d2cc;
}

.site-footer h2 {
    margin: 0 0 0.85rem;
    font-size: 1rem;
}

.site-footer a:not(.brand):not(.btn) {
    display: block;
    color: #dce8e2;
    text-decoration: none;
    margin: 0.35rem 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    margin-top: 2rem;
    padding-top: 1rem;
    color: #c6d2cc;
    font-size: 0.92rem;
}

.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;
}

.toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 30;
    max-width: min(420px, calc(100% - 32px));
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
    box-shadow: var(--shadow);
}

@media (max-width: 980px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .site-nav {
        display: none;
        width: 100%;
        order: 3;
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
        padding-bottom: 1rem;
    }

    .site-nav.open {
        display: flex;
    }

    .header-actions {
        order: 2;
    }

    .hero-grid,
    .split-section,
    .detail-grid,
    .market-detail,
    .form-layout,
    .auth-grid,
    .cta-band {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        min-height: 0;
    }

    .service-grid,
    .market-grid,
    .plan-grid,
    .stat-grid,
    .dashboard-grid,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .receipt-amount-band,
    .receipt-payment-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-form {
        justify-self: stretch;
        max-width: none;
    }
}

@media (max-width: 720px) {
    .container,
    .narrow {
        width: min(100% - 24px, 1120px);
    }

    .header-inner {
        min-height: 68px;
    }

    .header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .header-actions .btn {
        flex: 1;
    }

    .market-filter-group {
        flex-wrap: wrap;
        gap: 0.5rem;
        position: static;
    }

    .market-filter-menu {
        background: transparent;
        border: 0;
        box-shadow: none;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        min-width: 0;
        opacity: 1;
        padding: 0;
        pointer-events: auto;
        position: static;
        transform: none;
        visibility: visible;
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.55rem;
    }

    .section {
        padding-block: 3rem;
    }

    .service-search,
    .filter-bar form,
    .form-grid,
    .service-grid,
    .market-grid,
    .market-detail,
    .plan-grid,
    .stat-grid,
    .dashboard-grid,
    .info-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .receipt-document-header,
    .receipt-footer-note,
    .receipt-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .receipt-title-block {
        justify-items: start;
        text-align: left;
    }

    .receipt-amount-band,
    .receipt-parties,
    .receipt-payment-strip,
    .receipt-totals {
        grid-template-columns: 1fr;
    }

    .receipt-amount-band > div,
    .receipt-payment-strip > div,
    .receipt-totals > div {
        border-right: 0;
        border-bottom: 1px solid rgba(18, 25, 23, 0.12);
    }

    .receipt-amount-band > div:last-child,
    .receipt-payment-strip > div:last-child,
    .receipt-totals > div:last-child {
        border-bottom: 0;
    }

    .receipt-parties .receipt-section + .receipt-section {
        border-left: 0;
    }

    .span-2 {
        grid-column: auto;
    }

    .section-heading,
    .hero-panel-header,
    .card-footer,
    .panel-heading,
    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
    }

    .service-card {
        grid-template-rows: 180px 1fr;
        min-height: 0;
    }

    .market-card {
        grid-template-rows: 190px 1fr;
        min-height: 0;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    .site-header,
    .site-footer,
    .account-hero,
    .notice,
    .receipt-actions,
    .toast {
        display: none;
    }

    body {
        background: #fff;
        font-size: 10.5px;
        line-height: 1.35;
    }

    .page-main {
        min-height: 0;
    }

    .section {
        padding-block: 0;
    }

    .receipt-shell {
        gap: 0;
        width: 100%;
    }

    .receipt-document {
        break-inside: avoid;
        border: 1px solid #cfd9d4;
        border-radius: 0;
        box-shadow: none;
        min-height: calc(297mm - 16mm);
    }

    .receipt-document-header {
        padding: 0.55rem 0.75rem;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .receipt-brand {
        gap: 0.55rem;
    }

    .receipt-brand .brand-mark {
        height: 38px;
        width: 38px;
    }

    .receipt-document-header h2 {
        font-size: 1.2rem;
    }

    .receipt-title-block {
        gap: 0.25rem;
    }

    .receipt-amount-band > div,
    .receipt-payment-strip > div,
    .receipt-totals > div,
    .receipt-section {
        padding: 0.45rem 0.7rem;
    }

    .receipt-amount-band span,
    .receipt-payment-strip span,
    .receipt-totals span,
    .receipt-section h3,
    .receipt-table th {
        font-size: 0.62rem;
    }

    .receipt-amount-band strong {
        font-size: 1.05rem;
    }

    .receipt-table th,
    .receipt-table td {
        padding: 0.32rem 0.45rem 0.32rem 0;
    }

    .receipt-footer-note {
        align-items: flex-start;
        font-size: 0.68rem;
        padding: 0.45rem 0.7rem;
    }
}
