.corbu-rewards {
    --corbu-ink: #261b14;
    --corbu-muted: #6f6258;
    --corbu-line: #e9dfd4;
    --corbu-surface: #fffaf4;
    --corbu-accent: #5f7f69;
    --corbu-gold: #c49a5a;
    --corbu-coffee: #3a281e;
    color: var(--corbu-ink);
    background: var(--corbu-surface);
    border: 1px solid var(--corbu-line);
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    margin: 24px 0;
    padding: clamp(18px, 4vw, 32px);
}

.corbu-rewards--dashboard {
    background:
        linear-gradient(180deg, rgba(255, 250, 244, 0.96), rgba(255, 255, 255, 0.96)),
        var(--corbu-surface);
}

.corbu-rewards *,
.corbu-rewards *::before,
.corbu-rewards *::after {
    box-sizing: border-box;
}

.corbu-rewards__header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.corbu-rewards__intro {
    color: var(--corbu-muted);
    margin: 8px 0 0;
    max-width: 620px;
}

.corbu-rewards__header-actions {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.corbu-rewards__eyebrow {
    color: var(--corbu-muted);
    font-size: 0.78rem;
    letter-spacing: 0;
    margin: 0 0 4px;
    text-transform: uppercase;
}

.corbu-rewards h2,
.corbu-rewards h3 {
    color: var(--corbu-ink);
    line-height: 1.2;
    margin: 0;
}

.corbu-rewards h3 {
    font-size: 1.05rem;
    margin-bottom: 12px;
}

.corbu-rewards__tier {
    background: var(--corbu-accent);
    border-radius: 999px;
    color: #fff;
    flex: 0 0 auto;
    font-weight: 700;
    line-height: 1;
    padding: 10px 14px;
}

.corbu-rewards__logout {
    color: var(--corbu-muted);
    font-size: 0.9rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.corbu-rewards__welcome {
    background: #f8efe2;
    border: 1px solid #ead8bd;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
    padding: 14px 16px;
}

.corbu-rewards__welcome span {
    color: var(--corbu-muted);
}

.corbu-rewards__summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.corbu-rewards__summary > div,
.corbu-rewards__panel,
.corbu-rewards__qr {
    background: #fff;
    border: 1px solid var(--corbu-line);
    border-radius: 8px;
    padding: 16px;
}

.corbu-rewards__summary > div:first-child {
    background: var(--corbu-coffee);
    border-color: var(--corbu-coffee);
    color: #fff;
}

.corbu-rewards__summary > div:first-child span {
    color: #e6d5c2;
}

.corbu-rewards__summary > div:first-child strong {
    color: #fff;
}

.corbu-rewards__summary span {
    color: var(--corbu-muted);
    display: block;
    font-size: 0.86rem;
    margin-bottom: 6px;
}

.corbu-rewards__summary strong {
    display: block;
    font-size: clamp(1.25rem, 3vw, 1.8rem);
    line-height: 1.1;
}

.corbu-rewards__progress {
    background: #fff;
    border: 1px solid var(--corbu-line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
    padding: 16px;
}

.corbu-rewards__progress > div:first-child span,
.corbu-rewards__expiry strong {
    color: var(--corbu-muted);
    display: block;
    font-size: 0.82rem;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.corbu-rewards__progress > div:first-child strong {
    display: block;
    font-size: 1.1rem;
}

.corbu-rewards__progress-bar {
    background: #f2ebe2;
    border-radius: 999px;
    height: 14px;
    overflow: hidden;
}

.corbu-rewards__progress-bar span {
    background: var(--corbu-accent);
    display: block;
    height: 100%;
}

.corbu-rewards__progress-meta,
.corbu-rewards__expiry div {
    color: var(--corbu-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.corbu-rewards__benefit-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.corbu-rewards__benefit-pills li {
    background: #f8efe2;
    border: 1px solid #ead8bd;
    border-radius: 999px;
    padding: 7px 10px;
}

.corbu-rewards__expiry {
    background: #fff8e9;
    border: 1px solid #ead8bd;
    border-radius: 8px;
    margin-bottom: 18px;
    padding: 14px 16px;
}

.corbu-rewards__grid {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    margin-bottom: 14px;
}

.corbu-rewards__qr {
    align-items: center;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.corbu-rewards__qr-label {
    color: var(--corbu-muted);
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.corbu-rewards__qr img {
    height: auto;
    max-width: min(220px, 100%);
}

.corbu-rewards__qr p {
    color: var(--corbu-muted);
    margin: 12px 0 8px;
}

.corbu-rewards__qr code {
    background: #f2ebe2;
    border-radius: 6px;
    color: var(--corbu-ink);
    display: inline-block;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
    padding: 6px 8px;
}

.corbu-rewards__list {
    display: grid;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.corbu-rewards__list li {
    border-bottom: 1px solid var(--corbu-line);
    padding-bottom: 10px;
}

.corbu-rewards__list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.corbu-rewards__list strong,
.corbu-rewards__list span {
    display: block;
}

.corbu-rewards__list span {
    color: var(--corbu-muted);
    margin-top: 2px;
}

.corbu-rewards__history {
    border-collapse: collapse;
    width: 100%;
}

.corbu-rewards__orders {
    display: grid;
    gap: 10px;
}

.corbu-rewards__order {
    align-items: center;
    border-bottom: 1px solid var(--corbu-line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding-bottom: 10px;
}

.corbu-rewards__order:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.corbu-rewards__order div {
    display: grid;
    gap: 2px;
}

.corbu-rewards__order div:last-child {
    text-align: right;
}

.corbu-rewards__order span {
    color: var(--corbu-muted);
}

.corbu-rewards__coupons {
    display: grid;
    gap: 12px;
}

.corbu-rewards__coupon {
    align-items: center;
    background: #fffaf4;
    border: 1px solid #ead8bd;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 14px;
}

.corbu-rewards__coupon div:first-child,
.corbu-rewards__coupon-side {
    display: grid;
    gap: 4px;
}

.corbu-rewards__coupon span,
.corbu-rewards__coupon small,
.corbu-rewards__hint {
    color: var(--corbu-muted);
}

.corbu-rewards__coupon-side {
    justify-items: end;
    text-align: right;
}

.corbu-rewards__coupon code {
    background: var(--corbu-coffee);
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    padding: 7px 9px;
}

.corbu-rewards__hint {
    margin-bottom: 0;
}

.corbu-rewards__history th,
.corbu-rewards__history td {
    border-bottom: 1px solid var(--corbu-line);
    padding: 10px 8px;
    text-align: left;
    vertical-align: top;
}

.corbu-rewards__history th:last-child,
.corbu-rewards__history td:last-child {
    text-align: right;
}

.corbu-rewards__notice {
    background: #edf7f0;
    border: 1px solid #b7dec0;
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 10px 12px;
}

.corbu-rewards__notice--error {
    background: #fff0ee;
    border-color: #ebb5ad;
}

.corbu-rewards__empty {
    background: #faf6ef;
    border: 1px dashed #d8c8b5;
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 14px;
}

.corbu-rewards__empty span {
    color: var(--corbu-muted);
}

.corbu-rewards__sync {
    margin: 0;
}

.corbu-rewards__sync button {
    background: var(--corbu-ink);
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: 10px 14px;
}

.corbu-rewards__link-button {
    background: var(--corbu-ink);
    border-radius: 6px;
    color: #fff;
    display: inline-block;
    font-weight: 700;
    padding: 10px 14px;
    text-decoration: none;
}

.corbu-rewards--auth {
    background: #fffaf4;
}

.corbu-rewards__auth-header {
    margin-bottom: 20px;
    max-width: 720px;
}

.corbu-rewards__auth-header p:last-child {
    color: var(--corbu-muted);
    margin-bottom: 0;
}

.corbu-rewards__auth-grid {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
}

.corbu-rewards__auth-single {
    max-width: 620px;
}

.corbu-rewards__form {
    background: #fff;
    border: 1px solid var(--corbu-line);
    border-radius: 8px;
    display: grid;
    gap: 13px;
    padding: clamp(16px, 3vw, 22px);
}

.corbu-rewards__trap {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.corbu-rewards__form label {
    display: grid;
    gap: 6px;
}

.corbu-rewards__form label span {
    color: var(--corbu-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.corbu-rewards__form input[type="date"],
.corbu-rewards__form input[type="email"],
.corbu-rewards__form input[type="password"],
.corbu-rewards__form input[type="tel"],
.corbu-rewards__form input[type="text"] {
    background: #fff;
    border: 1px solid #d7cabd;
    border-radius: 6px;
    color: var(--corbu-ink);
    font: inherit;
    min-height: 44px;
    padding: 9px 10px;
    width: 100%;
}

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

.corbu-rewards__check {
    align-items: center;
    display: flex !important;
    gap: 8px !important;
}

.corbu-rewards__check input {
    flex: 0 0 auto;
}

.corbu-rewards__form button {
    background: var(--corbu-ink);
    border: 0;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    min-height: 44px;
    padding: 10px 14px;
}

.corbu-rewards__small-link {
    color: var(--corbu-muted);
    font-size: 0.9rem;
}

.corbu-rewards__form-note {
    color: var(--corbu-muted);
    font-size: 0.9rem;
    margin: -2px 0 0;
}

.corbu-rewards__footer-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
}

.corbu-rewards-cta {
    --corbu-ink: #261b14;
    --corbu-muted: #6f6258;
    --corbu-line: #e9dfd4;
    --corbu-surface: #fffaf4;
    align-items: center;
    background: var(--corbu-surface);
    border: 1px solid var(--corbu-line);
    border-radius: 8px;
    color: var(--corbu-ink);
    display: flex;
    gap: 22px;
    justify-content: space-between;
    margin: 28px 0;
    padding: clamp(20px, 4vw, 34px);
}

.corbu-rewards-cta *,
.corbu-rewards-cta *::before,
.corbu-rewards-cta *::after {
    box-sizing: border-box;
}

.corbu-rewards-cta h2 {
    color: var(--corbu-ink);
    line-height: 1.15;
    margin: 0 0 8px;
}

.corbu-rewards-cta p {
    color: var(--corbu-muted);
    margin: 0;
    max-width: 620px;
}

.corbu-rewards-cta__button {
    background: var(--corbu-ink);
    border-radius: 6px;
    color: #fff;
    flex: 0 0 auto;
    font-weight: 700;
    padding: 12px 16px;
    text-decoration: none;
}

.corbu-admin-tabs {
    margin-bottom: 18px;
}

.corbu-admin-toolbar {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.corbu-admin-toolbar label {
    display: grid;
    gap: 4px;
}

.corbu-admin-toolbar input[type="date"],
.corbu-admin-toolbar input[type="search"],
.corbu-admin-toolbar select {
    min-height: 34px;
    min-width: 180px;
}

.corbu-admin-kpis,
.corbu-admin-mini-kpis {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin: 16px 0;
}

.corbu-admin-kpi {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 14px;
}

.corbu-admin-kpi span {
    color: #646970;
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
}

.corbu-admin-kpi strong {
    color: #1d2327;
    display: block;
    font-size: 22px;
    line-height: 1.15;
}

.corbu-admin-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    margin-top: 16px;
}

.corbu-admin-grid--wide {
    grid-template-columns: minmax(420px, 1.6fr) repeat(2, minmax(260px, 1fr));
}

.corbu-admin-panel {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 16px;
}

.corbu-admin-panel--wide {
    min-width: 0;
}

.corbu-admin-panel h2 {
    margin-top: 0;
}

.corbu-admin-adjustment {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #dcdcde;
}

.corbu-admin-adjustment h3 {
    margin: 0 0 6px;
}

.corbu-admin-adjustment p {
    margin: 0 0 12px;
    color: #646970;
}

.corbu-admin-adjustment > div {
    display: grid;
    grid-template-columns: 120px minmax(220px, 1fr);
    gap: 10px;
    align-items: end;
    margin-bottom: 12px;
}

.corbu-admin-adjustment label span {
    display: block;
    margin-bottom: 5px;
    color: #646970;
    font-weight: 700;
}

.corbu-admin-adjustment input {
    width: 100%;
}

.corbu-admin-table code {
    white-space: nowrap;
}

.corbu-admin-table span,
.corbu-admin-panel table span {
    color: #646970;
}

.corbu-admin-bars {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    margin-top: 14px;
}

.corbu-admin-bars--compact {
    grid-template-columns: repeat(auto-fit, minmax(42px, 1fr));
}

.corbu-admin-bar {
    display: grid;
    gap: 6px;
    min-width: 0;
    text-align: center;
}

.corbu-admin-bar__track {
    align-items: end;
    background: #f6f0e8;
    border: 1px solid #e4d7c7;
    border-radius: 6px;
    display: flex;
    overflow: hidden;
    width: 100%;
}

.corbu-admin-bar__track span {
    background: #3a281e;
    border-radius: 6px 6px 0 0;
    display: block;
    margin-top: auto;
    position: relative;
    width: 100%;
}

.corbu-admin-bar__track i {
    background: #c49a5a;
    bottom: 0;
    display: block;
    left: 0;
    position: absolute;
    width: 100%;
}

.corbu-admin-bar strong {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.corbu-admin-bar small,
.corbu-admin-note {
    color: #646970;
}

.corbu-admin-note {
    margin-bottom: 0;
}

.corbu-admin-meter {
    background: #f6f0e8;
    border-radius: 999px;
    height: 14px;
    overflow: hidden;
}

.corbu-admin-meter span {
    background: #3a281e;
    display: block;
    height: 100%;
}

.corbu-admin-mix ul {
    display: grid;
    gap: 8px;
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.corbu-admin-highlight strong {
    display: block;
    font-size: 30px;
    line-height: 1.1;
    margin: 8px 0;
}

.corbu-admin-highlight span {
    color: #646970;
}

.corbu-admin-promo-list {
    display: grid;
    gap: 10px;
}

.corbu-admin-promo {
    border: 1px solid #e4d7c7;
    border-radius: 8px;
    padding: 10px;
}

.corbu-admin-promo strong,
.corbu-admin-promo span {
    display: block;
}

.corbu-admin-promo span {
    color: #646970;
    font-size: 12px;
    margin-top: 2px;
}

.corbu-admin-promo p {
    margin: 8px 0 0;
}

.corbu-rewards--notice p {
    margin-top: 0;
}

@media (max-width: 720px) {
    .corbu-rewards__header,
    .corbu-rewards__grid,
    .corbu-rewards-cta {
        display: block;
    }

    .corbu-rewards__header-actions {
        align-items: flex-start;
        margin-top: 12px;
    }

    .corbu-rewards__tier,
    .corbu-rewards__panel {
        margin-top: 14px;
    }

    .corbu-rewards__summary {
        grid-template-columns: 1fr;
    }

    .corbu-rewards__auth-grid,
    .corbu-rewards__fields-2 {
        grid-template-columns: 1fr;
    }

    .corbu-rewards__history {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .corbu-rewards__coupon {
        align-items: stretch;
        display: grid;
    }

    .corbu-rewards__coupon-side {
        justify-items: start;
        text-align: left;
    }

    .corbu-rewards-cta__button {
        display: inline-block;
        margin-top: 16px;
    }
}
