:root {
    --wine: #951619;
    --wine-dark: #7d1115;
    --ink: #171f26;
    --charcoal: #2d2b2d;
    --gold: #f0b400;
    --surface: #ffffff;
    --bg: #f4f4f4;
    --text: #111111;
    --muted: #5b626c;
    --line: #dedede;
    --success: #147a45;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Instrument Sans", "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
}

.inline-form {
    display: inline-flex;
}

.inline-form button {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.notification-link {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.notification-count {
    background: var(--gold);
    border-radius: 999px;
    color: #231a00;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    min-width: 20px;
    padding: 4px 6px;
    place-content: center;
}

.notification-count[hidden] {
    display: none;
}

.flash {
    border-radius: 8px;
    margin-top: 18px;
    padding: 14px 18px;
}

.flash--success {
    background: #edf7ef;
    border: 1px solid #b9dfc0;
    color: #1d5f2b;
}

.flash--error {
    background: #fff1f1;
    border: 1px solid #efb8b8;
    color: #811d22;
}

.flash ul {
    margin: 8px 0 0 18px;
}

.auth-page {
    padding: 44px 0 64px;
}

.auth-shell {
    max-width: 920px;
}

.auth-panel {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .06);
    padding: 28px;
}

.auth-heading {
    align-items: center;
    display: grid;
    justify-content: center;
    margin-bottom: 22px;
    text-align: center;
}

.auth-heading h1 {
    margin-bottom: 0;
}

.role-grid,
.login-grid {
    align-items: stretch;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.role-grid--two {
    margin: 0 auto;
    max-width: 920px;
}

.role-card {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 5px solid var(--wine);
    border-radius: 8px;
    color: inherit;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
    height: 100%;
    min-height: 170px;
    padding: 22px;
    text-decoration: none;
}

.role-card span {
    color: var(--wine);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.role-card strong {
    font-size: 1.18rem;
}

.role-card small {
    color: #555;
    line-height: 1.45;
}

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

.form-grid--single {
    grid-template-columns: 1fr;
}

.form-grid label {
    color: #333;
    display: grid;
    font-weight: 700;
    gap: 7px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    color: #222;
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
}

.form-grid textarea {
    min-height: 96px;
    resize: vertical;
}

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

.check-row {
    align-items: center;
    display: flex !important;
    font-weight: 500 !important;
    gap: 10px !important;
}

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

.debug-code {
    background: #fff7d7;
    border: 1px solid #ead17a;
    border-radius: 8px;
    margin: 14px 0 18px;
    padding: 12px 14px;
}

.guidance-box {
    background: #fff8df;
    border: 1px solid #ead17a;
    border-left: 5px solid var(--gold);
    border-radius: 8px;
    color: #3f3520;
    padding: 14px 16px;
}

.guidance-box strong {
    display: block;
    margin-bottom: 5px;
}

.guidance-box p {
    margin-bottom: 0;
}

.button-row,
.panel-heading {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

.catalog-row__main {
    align-items: center;
    display: flex;
    gap: 14px;
}

.thumb {
    aspect-ratio: 1;
    border-radius: 8px;
    height: 68px;
    object-fit: cover;
    width: 68px;
}

.empty-state {
    color: var(--muted);
    margin: 0;
    padding: 18px 0;
}

.image-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-strip img {
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: 8px;
    height: 92px;
    object-fit: cover;
    width: 92px;
}

.combo-builder {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 16px;
}

.combo-builder h2 {
    color: var(--wine);
    font-size: 1.05rem;
    margin: 0 0 4px;
}

.combo-item-row {
    align-items: center;
    border-top: 1px solid #ececec;
    display: grid !important;
    gap: 12px !important;
    grid-template-columns: auto 1fr 92px;
    padding-top: 10px;
}

.combo-item-row input[type="checkbox"] {
    min-height: auto;
    width: auto;
}

.receipt-builder {
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
}

.receipt-builder__row {
    align-items: center;
    border-top: 1px solid #ececec;
    display: grid !important;
    gap: 12px !important;
    grid-template-columns: auto 1fr 92px 120px;
    padding: 12px;
}

.receipt-builder__row:first-child {
    border-top: 0;
}

.receipt-builder__row input[type="checkbox"] {
    min-height: auto;
    width: auto;
}

.receipt-builder__row small {
    color: var(--muted);
    display: block;
}

.qr-panel {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr 180px;
}

.copy-field {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
    width: 100%;
}

.copy-link-row {
    align-items: center;
    display: flex;
    gap: 10px;
}

.copy-link-row .copy-field {
    flex: 1;
}

.copy-link-row .button {
    white-space: nowrap;
}

.qr-box {
    aspect-ratio: 1;
    border: 2px solid var(--ink);
    border-radius: 8px;
    display: grid;
    padding: 14px;
    place-items: center;
}

.qr-svg,
.qr-image {
    display: block;
    height: auto;
    image-rendering: pixelated;
    max-width: 100%;
}

@media (max-width: 760px) {
    .role-grid,
    .login-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

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

    .combo-item-row {
        grid-template-columns: auto 1fr;
    }

    .combo-item-row input[type="number"] {
        grid-column: 2;
    }

    .receipt-builder__row,
    .qr-panel {
        grid-template-columns: 1fr;
    }
}

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

button,
input,
textarea {
    font: inherit;
}

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

.top-strip {
    background: var(--ink);
    color: #fff;
    font-size: 14px;
}

.top-strip__inner,
.brand-band__inner,
.main-nav__inner,
.section-heading,
.receipt-card__header,
.activity-item,
.catalog-row,
.receipt-line,
.receipt-total,
.receipt-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.top-strip__inner {
    min-height: 46px;
    position: relative;
}

.quick-links {
    display: flex;
    gap: 18px;
}

.quick-menu {
    display: none;
    margin-left: auto;
    position: relative;
}

.quick-menu summary {
    display: none;
}

.hamburger-lines,
.hamburger-lines::before,
.hamburger-lines::after {
    background: currentColor;
    border-radius: 999px;
    display: block;
    height: 2px;
    width: 18px;
}

.hamburger-lines {
    position: relative;
}

.hamburger-lines::before,
.hamburger-lines::after {
    content: "";
    left: 0;
    position: absolute;
}

.hamburger-lines::before {
    top: -6px;
}

.hamburger-lines::after {
    top: 6px;
}

.brand-band {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.brand-band__inner {
    min-height: 112px;
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-seal {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 2px solid var(--charcoal);
    border-radius: 50%;
    font-weight: 800;
}

.brand-mark strong,
.brand-mark small,
.project-title span,
.project-title small {
	display: block;
    color: var(--muted);
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.project-title span {
    color: var(--wine-dark);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.15;
}

.main-nav {
    background: var(--wine);
    color: #fff;
}

.main-nav__inner {
    justify-content: flex-start;
    min-height: 56px;
    font-weight: 700;
}

.main-nav a::before {
    color: var(--gold);
    content: "/";
    margin-right: 10px;
}

.page-hero,
.tenant-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.page-hero__grid,
.tenant-header__inner {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 32px;
    padding: 44px 0;
}

.tenant-header__inner {
    grid-template-columns: auto 1fr;
}

.tenant-logo,
.venture-card__media {
    display: grid;
    place-items: center;
    background: var(--wine);
    color: #fff;
    font-weight: 800;
}

.tenant-logo {
    width: 92px;
    height: 92px;
    border-radius: 8px;
    font-size: 30px;
}

.eyebrow {
    color: var(--wine);
    font-size: 13px;
    font-weight: 800;
    margin: 0 0 8px;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    color: var(--wine-dark);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    margin-bottom: 12px;
}

h2 {
    color: var(--wine-dark);
    font-size: 28px;
}

h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.search-panel,
.panel,
.receipt-card,
.rating-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
}

.search-panel label {
    display: block;
    font-weight: 700;
    margin-bottom: 12px;
}

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

.search-row input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 14px;
}

.content-section,
.dashboard,
.receipt-page {
    padding: 36px 0;
}

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

.venture-card,
.metric-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.venture-card__media {
    height: 120px;
    font-size: 36px;
}

.venture-card__body,
.metric-card {
    padding: 18px;
}

.metric-card strong {
    display: block;
    color: var(--wine);
    font-size: 34px;
}

.card-meta,
.card-actions,
.tenant-actions,
.catalog-row__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.card-meta {
    justify-content: space-between;
    color: var(--muted);
    font-size: 14px;
}

.button {
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    padding: 10px 14px;
}

.button--primary {
    background: var(--wine);
    color: #fff;
}

.button--secondary {
    background: #f7e9ea;
    color: var(--wine);
}

.button--ghost {
    background: #f2f2f2;
    color: var(--charcoal);
}

.text-link {
    color: var(--wine);
    font-weight: 800;
}

.privacy-note,
.catalog-row small,
.activity-item span,
.receipt-line span,
.receipt-card__header span {
    color: var(--muted);
}

.catalog-list,
.activity-list,
.receipt-items {
    display: grid;
    gap: 12px;
}

.catalog-row,
.activity-item,
.receipt-line {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.activity-item--unread {
    border-left: 5px solid var(--gold);
}

.badge,
.status,
.receipt-status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 10px;
}

.badge {
    background: #f7e9ea;
    color: var(--wine);
}

.status {
    background: #f3f3f3;
}

.receipt-status {
    background: #e8f5ee;
    color: var(--success);
}

.rating-panel {
    margin-top: 28px;
}

.stars {
    color: var(--gold);
    font-size: 28px;
    margin-bottom: 12px;
}

.panel {
    margin-top: 24px;
}

.receipt-page {
    display: flex;
    justify-content: center;
}

.receipt-card {
    width: min(760px, 100%);
}

.receipt-total {
    border-top: 2px solid var(--line);
    font-size: 24px;
    margin-top: 18px;
    padding-top: 18px;
}

.payment-box {
    align-items: center;
    background: #fff8df;
    border: 1px solid #ead17a;
    border-radius: 8px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin-top: 16px;
    padding: 16px;
}

.payment-box span {
    color: var(--muted);
    display: block;
    font-size: 14px;
}

.payment-box strong {
    color: var(--wine-dark);
    display: block;
    font-size: 22px;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .project-title small {
        display: none;
    }

    .quick-links {
        display: none;
    }

    .quick-menu {
        display: block;
    }

    .quick-menu summary {
        align-items: center;
        cursor: pointer;
        display: inline-flex;
        font-weight: 800;
        gap: 10px;
        list-style: none;
        min-height: 44px;
        padding: 0 2px;
    }

    .quick-menu summary::-webkit-details-marker {
        display: none;
    }

    .quick-menu nav {
        background: var(--ink);
        border: 1px solid rgba(255, 255, 255, .2);
        border-radius: 8px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
        display: none;
        min-width: 210px;
        padding: 12px;
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        z-index: 20;
    }

    .quick-menu[open] nav {
        display: grid;
        gap: 12px;
    }

    .quick-menu .inline-form,
    .quick-menu .inline-form button,
    .quick-menu nav a {
        text-align: left;
        width: 100%;
    }

    .brand-band__inner,
    .section-heading,
    .receipt-card__header,
    .catalog-row,
    .activity-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .project-title span {
        font-size: 20px;
    }

    .main-nav__inner {
        overflow-x: auto;
        white-space: nowrap;
    }

    .page-hero__grid,
    .tenant-header__inner,
    .venture-grid,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .search-row,
    .receipt-actions,
    .copy-link-row,
    .payment-box {
        flex-direction: column;
    }

    .button {
        justify-content: center;
        width: 100%;
    }
}
