html, body {
    --restart-teal: #16aaa6;
    --restart-teal-dark: #0d8f8c;
    --restart-teal-half: rgba(22, 170, 166, 0.5);
    --restart-teal-soft: rgba(22, 170, 166, 0.18);
    --restart-graphite: #2d3a36;
    --restart-graphite-soft: rgba(45, 58, 54, 0.08);
    --restart-divider: rgba(22, 170, 166, 0.34);
    --restart-accent-shadow: rgba(22, 170, 166, 0.12);
    --restart-accent-shadow-strong: rgba(22, 170, 166, 0.16);
    background: #f4f5f7;
    color: #161b22;
    font-family: Arial, Helvetica, sans-serif;
}

.report-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
    margin: 1.25rem 0;
}

.report-filters label:not(.form-check) {
    min-width: 170px;
}

.report-paid-only {
    margin-bottom: .55rem;
}

.report-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.report-kpis article {
    display: grid;
    gap: .35rem;
    padding: 1rem;
    border: 1px solid rgba(29, 39, 33, .12);
    border-radius: 14px;
    background: #fff;
}

.report-kpis span {
    color: #667067;
    font-size: .88rem;
}

.report-kpis strong {
    font-size: 1.45rem;
}

.report-kpi-profit {
    background: #eef8f1 !important;
    border-color: #b9dec3 !important;
}

@media (max-width: 760px) {
    .report-kpis { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
}

.care-theme--diet { --care-color: #16aaa6; --care-soft: rgba(22, 170, 166, 0.18); }
.care-theme--trainer { --care-color: #1fa5d8; --care-soft: rgba(31, 165, 216, 0.18); }
.care-theme--pharma { --care-color: #1f8f42; --care-soft: rgba(31, 143, 66, 0.18); }
.care-theme--physio { --care-color: #d6a321; --care-soft: rgba(214, 163, 33, 0.2); }
.care-theme--medical { --care-color: #c22f2f; --care-soft: rgba(194, 47, 47, 0.16); }

.care-theme .account-menu {
    border-top: 4px solid var(--care-color);
}

.care-theme .account-menu__item--active,
.care-theme .account-menu__item:hover,
.care-theme .account-menu__item:focus-visible {
    background: var(--care-soft);
    box-shadow: inset 4px 0 0 var(--care-color);
}

.care-theme .btn-primary {
    background: var(--care-soft);
    box-shadow: inset 0 0 0 1px var(--care-color);
}

.care-theme .btn-primary:hover,
.care-theme .btn-primary:focus-visible {
    background: var(--care-color);
    color: #fff;
}

a, .btn-link {
    color: var(--restart-graphite);
}

.btn {
    border: 0;
    border-radius: 0;
    font-weight: 800;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
}

.btn-primary {
    color: var(--restart-graphite);
    background-color: var(--restart-teal-half);
    border-color: transparent;
    font-weight: 800;
    box-shadow: 0 8px 18px var(--restart-accent-shadow);
}

.btn-primary:hover,
.btn-primary:disabled {
    color: var(--restart-graphite);
    background-color: var(--restart-teal);
    border-color: transparent;
}

.btn-success {
    background-color: var(--restart-graphite);
    border-color: transparent;
    font-weight: 800;
}

.btn-success:hover {
    background-color: #1f2926;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-dark {
    color: var(--restart-graphite);
    background: #fff;
    border-color: transparent;
    box-shadow: inset 0 0 0 1px var(--restart-teal-soft);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus-visible,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible,
.btn-outline-dark:hover,
.btn-outline-dark:focus-visible {
    color: var(--restart-graphite);
    background: var(--restart-teal-soft);
    border-color: transparent;
    box-shadow: 0 8px 18px var(--restart-accent-shadow-strong);
}

.btn-outline-danger {
    color: #a52828;
    background: #fff;
    border-color: transparent;
    box-shadow: inset 0 0 0 1px rgba(165, 40, 40, 0.16);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus-visible {
    color: #fff;
    background: #a52828;
    border-color: transparent;
}

.modal-btn {
    border-radius: 0;
    font-weight: 800;
}

.modal-btn--close,
.modal-btn--cancel {
    border-color: transparent;
    background: #fff;
    color: var(--restart-graphite);
    box-shadow: inset 0 0 0 1px var(--restart-teal-soft);
}

.modal-btn--close:hover,
.modal-btn--cancel:hover {
    background: var(--restart-teal-soft);
    color: var(--restart-graphite);
}

.modal-btn--save {
    border-color: transparent;
    background: var(--restart-teal-half);
    color: var(--restart-graphite);
    box-shadow: 0 8px 18px var(--restart-accent-shadow);
}

.modal-btn--save:hover {
    border-color: transparent;
    background: var(--restart-teal);
    color: var(--restart-graphite);
}

.modal-btn--danger {
    border-color: #b42318;
    background: #b42318;
    color: #fff;
}

.modal-btn--danger:hover {
    border-color: #8f1d14;
    background: #8f1d14;
    color: #fff;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  border-radius: 0;
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--restart-teal-half);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.market-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1.25rem;
    background: var(--restart-graphite);
    color: #fff;
    padding: 1.4rem;
}

.market-hero h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
}

.market-hero p {
    max-width: 48rem;
    margin: 0;
    color: #d7dde5;
}

.market-hero .eyebrow {
    color: var(--restart-teal);
}

.market-hero__panel {
    display: grid;
    align-content: center;
    gap: 0.25rem;
    border: 1px solid var(--restart-divider);
    background: rgba(255, 255, 255, 0.06);
    padding: 1rem;
}

.market-hero__panel strong {
    color: var(--restart-teal);
    font-size: 1.15rem;
}

.shop-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.shop-header h1,
.shop-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 900;
}

.eyebrow {
    margin: 0 0 0.25rem;
    color: #53606d;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.lead {
    max-width: 42rem;
    margin-bottom: 0;
    color: #53606d;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 0.75rem;
}

.product-card,
.order-panel,
.editor-panel,
.empty-state {
    border: 1px solid #d9e1e8;
    border-radius: 6px;
    background: #fff;
}

.product-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0.75rem;
    min-height: 100%;
    padding: 0.65rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.product-card:hover {
    box-shadow: 0 10px 22px rgba(18, 24, 31, 0.1);
    transform: translateY(-2px);
}

.product-card__media {
    display: grid;
    place-items: center;
    width: 96px;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #f8fafc, #e5e9ef);
    color: #111;
    grid-row: span 3;
    text-decoration: none;
}

.product-card__image,
.product-detail__hero-image,
.product-gallery__item,
.admin-image-preview,
.admin-gallery-preview__item {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__media span,
.product-detail__image {
    display: grid;
    place-items: center;
    width: 4.25rem;
    height: 4.25rem;
    border: 0;
    background: var(--restart-teal);
    color: #fff;
    font-size: 1.35rem;
    font-weight: 900;
    box-shadow: 0 8px 18px var(--restart-accent-shadow-strong);
}

.product-card h2,
.order-panel h2,
.editor-panel h2 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.product-card__title {
    display: block;
    min-height: 0;
    color: #161b22;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.25;
    text-decoration: none;
}

.product-card p {
    display: -webkit-box;
    min-height: 0;
    margin: 0.25rem 0 0;
    overflow: hidden;
    color: #53606d;
    font-size: 0.86rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.product-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.product-card__meta strong {
    font-size: 1.12rem;
    font-weight: 900;
}

.product-card__meta span,
.muted {
    color: #687684;
    font-size: 0.9rem;
}

.stock-badge {
    background: #eef7ec;
    color: #207227;
    font-weight: 800;
    padding: 0.2rem 0.4rem;
    white-space: nowrap;
}

.product-actions {
    display: grid;
    grid-template-columns: 0.7fr 1fr;
    gap: 0;
    grid-column: 2;
    margin-top: 0;
}

.product-actions .btn {
    min-height: 36px;
    padding: 0.45rem 0.6rem;
    font-size: 0.88rem;
    position: relative;
}

.product-actions .btn,
.modal-actions .btn,
.order-panel__actions .btn,
.table-actions .btn {
    position: relative;
}

.product-actions .btn + .btn::before,
.modal-actions .btn + .btn::before,
.order-panel__actions .btn + .btn::before,
.table-actions .btn + .btn::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18%;
    width: 1px;
    height: 64%;
    background: linear-gradient(to bottom, transparent, var(--restart-divider), transparent);
}

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

.product-detail__content {
    display: grid;
    grid-template-columns: minmax(260px, 430px) minmax(0, 1fr) minmax(260px, 340px);
    gap: 1.5rem;
    align-items: start;
}

.product-detail__content h1 {
    margin: 0 0 0.75rem;
}

.product-detail__purchase {
    display: grid;
    gap: 1rem;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
}

.product-detail__gallery,
.product-detail__description {
    border: 1px solid #d9e1e8;
    border-radius: 6px;
    background: #fff;
    padding: 1rem;
}

.product-detail__gallery {
    display: grid;
    place-items: center;
    min-height: 360px;
}

.product-detail__hero-image {
    border-radius: 6px;
    max-height: 420px;
}

.product-detail__image {
    width: 12rem;
    height: 12rem;
    font-size: 4rem;
}

.product-video,
.tutorial-video,
.admin-video-preview {
    width: 100%;
    border: 1px solid #d9e1e8;
    border-radius: 6px;
    background: #111;
}

.product-video {
    max-height: 420px;
}

.product-video--secondary {
    margin-top: 1rem;
}

.tutorial-video,
.admin-video-preview {
    max-height: 260px;
}

.product-specs {
    display: grid;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.product-gallery,
.admin-gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.product-gallery__item,
.admin-gallery-preview__item {
    aspect-ratio: 1 / 1;
    border: 1px solid #d9e1e8;
    border-radius: 6px;
    background: #fff;
}

.product-gallery--selector {
    width: 100%;
}

.product-gallery__button {
    aspect-ratio: 1 / 1;
    border: 0;
    border-radius: 6px;
    background: #fff;
    padding: 0;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    box-shadow: inset 0 0 0 1px var(--restart-teal-soft);
}

.product-gallery__button:hover,
.product-gallery__button:focus-visible {
    border-color: transparent;
    box-shadow: 0 0 0 3px var(--restart-teal-soft);
    transform: translateY(-1px);
}

.product-gallery__button--active {
    border-color: transparent;
    box-shadow: 0 0 0 3px var(--restart-divider);
}

.product-gallery__item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-image-preview {
    max-height: 240px;
    border: 1px solid #d9e1e8;
    border-radius: 6px;
}

.product-specs span {
    border-top: 1px solid #edf1f5;
    padding-top: 0.5rem;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
}

.order-panel {
    margin-top: 1.5rem;
    padding: 1rem;
    box-shadow: 0 6px 16px rgba(18, 24, 31, 0.06);
}

.modal-backdrop-panel {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    overflow-y: auto;
    background: rgba(18, 24, 31, 0.42);
    padding: clamp(1rem, 3vw, 2rem);
}

.order-panel--popup {
    width: min(960px, 100%);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    margin: 0;
    padding: 1.25rem;
}

.editor-panel--popup {
    display: grid;
    gap: 1rem;
    width: min(760px, 100%);
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    margin: 0;
    padding: 1.25rem;
}

.editor-panel--product {
    width: min(980px, 100%);
}

.confirm-dialog {
    display: grid;
    gap: 1rem;
    width: min(460px, 100%);
    border: 1px solid #d9e1e8;
    border-radius: 6px;
    background: #fff;
    padding: 1.25rem;
}

.confirm-dialog h1 {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    font-weight: 900;
}

.confirm-dialog p:last-child {
    margin-bottom: 0;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.editor-panel--focused {
    position: fixed;
    inset: 0;
    z-index: 100;
    max-width: none;
    margin: 0;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: #f4f5f7;
    padding: clamp(1rem, 3vw, 2rem);
}

.editor-panel--focused > * {
    width: 100%;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.order-panel__heading,
.order-panel__actions,
.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.order-panel__actions {
    justify-content: flex-end;
}

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

.form-grid label,
.form-stack label {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
}

.form-grid__wide {
    grid-column: 1 / -1;
}

.form-actions {
    margin-top: 1rem;
}

.cart-checkout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 1rem;
    align-items: start;
    margin-top: 1rem;
}

.cart-section,
.cart-summary {
    border: 1px solid #dfe7ed;
    background: #fff;
    padding: 1rem;
}

.cart-section__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cart-section__heading h2 {
    margin: 0;
    font-size: 1.1rem;
}

.cart-section__heading span {
    color: #6f7a86;
    font-weight: 700;
    white-space: nowrap;
}

.cart-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.cart-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 142px minmax(92px, auto) auto;
    gap: 0.85rem;
    align-items: center;
    border: 1px solid #edf1f5;
    background: #fbfcfd;
    padding: 0.75rem;
    padding-bottom: 0.75rem;
}

.cart-row__details {
    min-width: 0;
}

.cart-row__details a {
    color: #121820;
    text-decoration: none;
}

.cart-row__details a:hover,
.cart-row__details a:focus-visible {
    color: var(--restart-teal-dark);
}

.cart-row__total {
    text-align: right;
    white-space: nowrap;
}

.cart-row__remove {
    white-space: nowrap;
}

.quantity-control {
    display: grid;
    grid-template-columns: 34px minmax(58px, 1fr) 34px;
    gap: 0.35rem;
    align-items: center;
}

.quantity-control .form-control {
    min-width: 0;
    text-align: center;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #e7edf2;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    font-size: 1.2rem;
}

.cart-total strong {
    color: var(--restart-graphite);
    white-space: nowrap;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 1.25rem;
    align-items: start;
}

.admin-list-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid #d9e1e8;
    border-radius: 6px;
    background: #fbfcfd;
    padding: 0.75rem;
}

.admin-search {
    position: relative;
    display: block;
    min-width: 0;
}

.admin-search .form-control {
    min-height: 42px;
    padding-left: 2.45rem;
}

.admin-search__icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    width: 0.85rem;
    height: 0.85rem;
    border: 2px solid var(--restart-graphite);
    border-radius: 50%;
    pointer-events: none;
    transform: translateY(-55%);
}

.admin-search__icon::after {
    content: "";
    position: absolute;
    right: -0.38rem;
    bottom: -0.3rem;
    width: 0.45rem;
    height: 2px;
    background: var(--restart-graphite);
    transform: rotate(45deg);
    transform-origin: left center;
}

.admin-list-toolbar__count {
    color: #687684;
    font-size: 0.9rem;
    font-weight: 800;
    white-space: nowrap;
}

.admin-product-thumb {
    display: grid;
    place-items: center;
    width: 58px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid #d9e1e8;
    border-radius: 6px;
    background: #fff;
    color: var(--restart-graphite);
    font-size: 0.85rem;
    font-weight: 900;
    box-shadow: 0 8px 18px var(--restart-accent-shadow);
}

.admin-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-product-thumb span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: var(--restart-teal-soft);
}

.editor-panel,
.empty-state {
    padding: 1rem;
}

.editor-panel--focused {
    display: grid;
    gap: 1rem;
}

.form-stack {
    display: grid;
    gap: 1rem;
}

.video-upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
}

.admin-media-editor {
    display: grid;
    gap: 1rem;
}

.admin-media-section {
    display: grid;
    gap: 1rem;
    border: 1px solid #d9e1e8;
    border-radius: 6px;
    background: #fbfcfd;
    padding: 1rem;
}

.admin-media-section__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.admin-media-section__heading h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 900;
}

.admin-media-count {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    background: #fff;
    color: var(--restart-graphite);
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.35rem 0.6rem;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px var(--restart-teal-soft);
}

.admin-media-layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.admin-media-preview {
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d9e1e8;
    border-radius: 6px;
    background: #fff;
    color: #667085;
    font-weight: 800;
}

.admin-media-preview--cover {
    aspect-ratio: 4 / 3;
}

.admin-media-preview--video {
    aspect-ratio: 16 / 9;
}

.admin-media-preview img,
.admin-media-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-media-preview video {
    background: #111;
}

.admin-media-controls {
    display: grid;
    gap: 0.85rem;
    min-width: 0;
}

.admin-gallery-links {
    min-height: 7.5rem;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.86rem;
}

.admin-gallery-manager {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.admin-gallery-manager__item {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    border: 1px solid #d9e1e8;
    border-radius: 6px;
    background: #fff;
    padding: 0.55rem;
}

.admin-gallery-manager__item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 4px;
    background: #f4f5f7;
}

.admin-gallery-manager__item figcaption {
    display: grid;
    gap: 0.5rem;
}

.admin-gallery-manager__item figcaption span {
    overflow: hidden;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: end;
}

.top-row-actions {
    gap: 1rem;
}

.top-row-actions,
.top-row-actions form {
    display: flex;
    align-items: center;
}

.auth-panel {
    display: grid;
    gap: 1rem;
    max-width: 520px;
}

.auth-actions {
    display: grid;
    gap: 0.75rem;
}

.orders-list {
    display: grid;
    gap: 1rem;
}

.account-shell {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.account-shell--content-only {
    grid-template-columns: minmax(0, 1fr);
}

.account-menu {
    position: sticky;
    top: 150px;
    display: grid;
    gap: 1rem;
    border: 1px solid #d9e1e8;
    border-radius: 6px;
    background: #fff;
    padding: 1rem;
}

.account-menu h1 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 900;
}

.account-menu__items {
    display: grid;
    gap: 0;
}

.account-menu__item {
    position: relative;
    display: block;
    min-height: 42px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--restart-graphite);
    font-weight: 800;
    padding: 0.65rem 0.85rem;
    text-align: left;
    text-decoration: none;
}

.account-menu__item + .account-menu__item::before {
    content: "";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    top: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--restart-divider), transparent);
}

.account-menu__item:hover,
.account-menu__item:focus-visible {
    background: var(--restart-teal-soft);
}

.account-menu__item--active {
    background: var(--restart-teal-half);
    box-shadow: inset 0 0 0 1px var(--restart-teal-half), 0 8px 18px var(--restart-accent-shadow);
    color: var(--restart-graphite);
}

.account-content {
    min-width: 0;
}

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

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.section-heading h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 900;
}

.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.9rem;
}

.tutorial-playlist,
.tutorial-steps-list,
.tutorial-steps-editor {
    display: grid;
    gap: 1rem;
}

.tutorial-playlist__item,
.tutorial-step-card,
.tutorial-step-view {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    border: 1px solid #d9e1e8;
    border-radius: 6px;
    background: #fff;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
}

.tutorial-playlist__item:hover {
    box-shadow: 0 10px 22px rgba(18, 24, 31, 0.08);
}

.tutorial-playlist__thumb,
.tutorial-detail-header__image {
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc, #e5e9ef);
}

.tutorial-playlist__thumb img,
.tutorial-detail-header__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tutorial-playlist__thumb span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
    font-weight: 900;
}

.tutorial-playlist__content,
.tutorial-step-view__text {
    min-width: 0;
}

.tutorial-detail-page {
    gap: 1.25rem;
}

.meal-plan-content {
    white-space: pre-wrap;
    border-top: 1px solid #edf1f5;
    margin-top: 1rem;
    padding-top: 1rem;
}

.meal-plan-document {
    display: grid;
    gap: 1.4rem;
    min-width: 0;
    max-width: 100%;
    border-top: 1px solid #edf1f5;
    margin-top: 1rem;
    padding-top: 1rem;
}

.meal-plan-day {
    display: grid;
    gap: 1.15rem;
    min-width: 0;
    padding: 0.25rem 0 0.5rem;
}

.meal-plan-day + .meal-plan-day {
    border-top: 1px solid #d9e1e8;
    padding-top: 1.4rem;
}

.meal-plan-day h3 {
    margin: 0;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
}

.meal-plan-meal {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.meal-plan-meal h4 {
    margin: 0;
    color: #121820;
    font-size: 1rem;
    font-weight: 800;
}

.meal-plan-meal__notes {
    display: grid;
    gap: 0.25rem;
    color: #1d252c;
}

.meal-plan-meal__notes p {
    margin: 0;
}

.meal-plan-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.meal-plan-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.96rem;
}

.meal-plan-table th,
.meal-plan-table td {
    border: 1px solid #aeb6bd;
    padding: 0.35rem 0.55rem;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: normal;
}

.meal-plan-table th {
    background: #f7f9fb;
    color: #111;
    font-weight: 800;
    text-align: center;
}

.meal-plan-table th:nth-child(2),
.meal-plan-table td:nth-child(2) {
    width: 16%;
    text-align: right;
}

.meal-plan-table th:nth-child(3),
.meal-plan-table td:nth-child(3) {
    width: 28%;
    text-align: center;
}

.meal-plan-table__sum td {
    font-weight: 800;
}

.meal-plan-table__sum td:first-child {
    text-align: center;
}

.meal-plan-editor__content {
    min-height: 360px;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.45;
}

.form-hint {
    color: #6f7a86;
    font-size: 0.88rem;
    font-weight: 400;
}

.tutorial-detail-header {
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.tutorial-step-view__video {
    width: 100%;
    border: 1px solid #d9e1e8;
    border-radius: 6px;
    background: #111;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 1rem;
}

.filter-tabs .account-menu__item + .account-menu__item::before {
    left: 0;
    right: auto;
    top: 20%;
    width: 1px;
    height: 60%;
    background: linear-gradient(to bottom, transparent, var(--restart-divider), transparent);
}

.measurements-table {
    margin-top: 1rem;
}

.measurement-trend {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    margin-left: 0.35rem;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
}

.measurement-trend--up {
    color: #1f8f42;
}

.measurement-trend--down {
    color: #c22f2f;
}

.measurement-trend--stable {
    color: #1fa5d8;
}

.order-card {
    min-width: 0;
    max-width: 100%;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    background: #fff;
    padding: 1rem;
}

@media (max-width: 600px) {
    .meal-plan-table {
        font-size: 0.84rem;
    }

    .meal-plan-table th,
    .meal-plan-table td {
        padding: 0.3rem 0.35rem;
    }

    .meal-plan-table th:nth-child(2),
    .meal-plan-table td:nth-child(2) {
        width: 18%;
    }

    .meal-plan-table th:nth-child(3),
    .meal-plan-table td:nth-child(3) {
        width: 27%;
    }
}

.order-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: start;
    border-bottom: 1px solid #edf1f5;
    padding-bottom: 0.75rem;
}

.order-card__status {
    display: grid;
    gap: 0.5rem;
    justify-items: end;
}

.status-stack {
    display: grid;
    gap: 0.45rem;
    justify-items: end;
}

.order-card__header h2,
.order-card__grid h3 {
    margin: 0 0 0.4rem;
}

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

.payment-badge {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
    white-space: nowrap;
}

.payment-badge--paid {
    background: #dff5e7;
    color: #146c2e;
}

.payment-badge--unpaid {
    background: #fff2cc;
    color: #7a5200;
}

.payment-badge--completed {
    background: #dff5e7;
    color: #146c2e;
}

.payment-badge--pending {
    background: #dceeff;
    color: #005a9c;
}

.payment-update {
    display: grid;
    grid-template-columns: 170px 130px minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
    border-top: 1px solid #edf1f5;
    margin-top: 1rem;
    padding-top: 1rem;
}

.payment-update label,
.product-detail__purchase label {
    display: grid;
    gap: 0.35rem;
    font-weight: 600;
}

@media (max-width: 900px) {
    .admin-grid,
    .admin-list-toolbar,
    .account-shell,
    .form-grid,
    .market-hero,
    .product-detail__content,
    .order-card__grid,
    .payment-update,
    .admin-media-layout,
    .tutorial-playlist__item,
    .tutorial-step-card,
    .tutorial-step-view,
    .tutorial-detail-header {
        grid-template-columns: 1fr;
    }

    .shop-header,
    .order-panel__heading,
    .order-panel__actions,
    .section-heading,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .cart-checkout {
        grid-template-columns: 1fr;
    }

    .cart-section,
    .cart-summary {
        padding: 0.85rem;
    }

    .cart-row {
        grid-template-columns: 1fr;
    }

    .cart-row__total {
        text-align: left;
    }

    .order-card__status {
        justify-items: stretch;
    }

    .quantity-control {
        max-width: 180px;
    }

    .product-actions {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .product-card__media {
        width: 84px;
    }

    .account-menu {
        position: static;
    }

    .admin-list-toolbar__count {
        white-space: normal;
    }

    .admin-media-section__heading {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-media-count {
        justify-content: center;
    }

    .video-upload {
        grid-template-columns: 1fr;
    }
}
.meal-plan-copy {
    white-space: pre-wrap;
    line-height: 1.6;
}

.meal-plan-details {
    border-top: 1px solid #edf1f5;
    margin-top: 1rem;
    padding-top: 0.75rem;
}

.meal-plan-details > summary {
    width: fit-content;
    color: var(--restart-teal-dark);
    cursor: pointer;
    font-weight: 800;
}

.meal-plan-details > summary:hover,
.meal-plan-details > summary:focus-visible {
    text-decoration: underline;
}

.meal-plan-details__content {
    min-width: 0;
    padding-top: 0.25rem;
}

.meal-plan-shopping-list {
    border-top: 1px solid #d9e1e8;
    margin-top: 1.5rem;
    padding-top: 1rem;
}

.meal-plan-shopping-list h3 {
    margin: 0 0 0.75rem;
}

.meal-plan-choice {
    display: flex;
    align-items: end;
    gap: 0.75rem;
    flex-wrap: wrap;
    border-top: 1px solid #edf1f5;
    margin-top: 0.75rem;
    padding-top: 0.85rem;
}

.meal-plan-choice label {
    display: grid;
    flex: 1 1 320px;
    gap: 0.35rem;
}

.diet-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.diet-pagination span {
    padding: 0 0.5rem;
    text-align: center;
}

.diet-pagination__number {
    min-width: 42px;
}

.diet-search {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.diet-search .form-control {
    flex: 1 1 280px;
}
.care-nav-group {
    position: relative;
}

.care-nav-group > summary {
    list-style: none;
    cursor: pointer;
}

.care-nav-group > summary::-webkit-details-marker {
    display: none;
}

.care-nav-group__menu {
    position: absolute;
    z-index: 50;
    top: 100%;
    left: 0;
    display: grid;
    min-width: 220px;
    border: 1px solid #d9e1e8;
    border-radius: 0 0 6px 6px;
    background: #fff;
    box-shadow: 0 12px 25px rgba(18, 24, 32, 0.14);
    padding: 0.35rem;
}

.care-nav-group__menu a {
    color: var(--restart-graphite);
    padding: 0.65rem 0.75rem;
    text-decoration: none;
    white-space: nowrap;
}

.care-nav-group__menu a:hover,
.care-nav-group__menu a:focus-visible {
    background: var(--restart-teal-soft);
}

.care-page {
    display: grid;
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.care-page__header h1,
.questionnaire-section h2 {
    margin: 0;
}

.questionnaire-section {
    display: grid;
    gap: 1rem;
    border: 1px solid #d9e1e8;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 1rem;
    padding: 1rem;
}

.questionnaire-search {
    max-width: 480px;
}

.ingredient-preferences {
    max-height: 620px;
    overflow-y: auto;
    border: 1px solid #d9e1e8;
    border-radius: 6px;
}

.ingredient-preferences__header,
.ingredient-preferences__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px 90px;
    gap: 0.5rem;
    align-items: center;
    padding: 0.55rem 0.75rem;
}

.ingredient-preferences__header {
    position: sticky;
    z-index: 1;
    top: 0;
    background: #f7f9fb;
    font-weight: 800;
}

.ingredient-preferences__row + .ingredient-preferences__row {
    border-top: 1px solid #edf1f5;
}

.ingredient-preferences__row input,
.ingredient-preferences__header span:not(:first-child) {
    justify-self: center;
}
