:root {
    --primary: #ff5a1f;
    --primary-dark: #e8470f;
    --wechat: #07c160;
    --text: #222222;
    --muted: #777777;
    --line: #e8e8e8;
    --background: #f5f5f5;
    --white: #ffffff;
    --danger: #dc2626;
    --blue: #2563eb;
    --green: #16845b;
    --radius: 10px;
}

* {
    box-sizing: border-box;
}

html {
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--background);
}

body {
    margin: 0;
}

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

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

button {
    cursor: pointer;
}

.store-body {
    background: #ededed;
}

.store-shell {
    position: relative;
    width: min(100%, 520px);
    min-height: 100vh;
    margin: 0 auto;
    background: var(--background);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
}

.store-header {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.store-brand {
    display: flex;
    align-items: center;
    gap: 7px;
}

.store-brand img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.store-brand strong {
    color: #222;
    font-size: 19px;
    font-weight: 800;
}

.store-brand em {
    color: var(--primary);
    font-style: normal;
}

.store-header-side {
    display: flex;
    gap: 14px;
    color: #555;
    font-size: 13px;
}

.store-main {
    min-height: calc(100vh - 170px);
    padding-bottom: 74px;
}

.store-footer {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 24px 16px 94px;
    color: #888;
    font-size: 11px;
    text-align: center;
}

.store-footer strong {
    color: #666;
}

.store-footer a {
    color: var(--blue);
}

.mobile-nav {
    position: fixed;
    z-index: 40;
    right: 50%;
    bottom: 0;
    display: grid;
    width: min(100%, 520px);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(4, 1fr);
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--line);
    transform: translateX(50%);
}

.mobile-nav a {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 2px;
    color: #777;
    font-size: 11px;
}

.mobile-nav a > img {
    width: 23px;
    height: 23px;
    object-fit: contain;
    opacity: 0.55;
    filter: grayscale(1);
}

.mobile-nav a.active {
    color: var(--primary);
    font-weight: 700;
}

.mobile-nav a.active > img {
    opacity: 1;
    filter: none;
}

.mobile-nav i {
    position: absolute;
    top: -4px;
    left: calc(50% + 8px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    color: #fff;
    font-size: 10px;
    font-style: normal;
    line-height: 16px;
    text-align: center;
    background: var(--primary);
    border-radius: 9px;
}

.flash {
    margin: 12px 14px 0;
    padding: 11px 13px;
    font-size: 13px;
    border-radius: 8px;
}

.flash-success {
    color: #166534;
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
}

.flash-error {
    color: #991b1b;
    background: #fff1f2;
    border: 1px solid #fecdd3;
}

.home-search {
    padding: 12px 14px;
    background: var(--white);
}

.home-search form,
.filter-panel form {
    display: flex;
    gap: 8px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    background: #f4f4f4;
    border: 1px solid transparent;
    border-radius: 7px;
    outline: 0;
}

.home-search input {
    flex: 1;
}

.home-search button {
    width: 64px;
    color: #fff;
    background: var(--primary);
    border: 0;
    border-radius: 7px;
}

.home-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 152px;
    margin: 12px 14px;
    padding: 22px;
    overflow: hidden;
    color: #2d211c;
    background: #fff0e7;
    border-radius: 12px;
}

.home-banner strong {
    color: #9f3b18;
    font-size: 13px;
    font-weight: 700;
}

.home-banner h1 {
    margin: 6px 0;
    font-size: 25px;
}

.home-banner p {
    margin: 0 0 14px;
    color: #745e54;
    font-size: 12px;
}

.home-banner a {
    display: inline-flex;
    padding: 7px 13px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    background: var(--primary);
    border-radius: 16px;
}

.home-banner > img {
    position: absolute;
    right: 14px;
    bottom: 2px;
    width: 118px;
    height: 118px;
    object-fit: contain;
    opacity: 0.16;
}

.home-section {
    margin: 12px 14px;
}

.section-title,
.card-title,
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    margin-bottom: 12px;
}

.section-title h2,
.card-title h2 {
    margin: 0;
    font-size: 17px;
}

.section-title a,
.section-title span,
.card-title a {
    color: var(--muted);
    font-size: 12px;
}

.category-grid {
    display: grid;
    padding: 16px 8px;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px 6px;
    background: #fff;
    border-radius: var(--radius);
}

.category-grid a {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 7px;
    font-size: 12px;
}

.category-grid a > span {
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    background: #fff0e8;
    border-radius: 50%;
}

.category-grid a > span img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

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

.product-card {
    overflow: hidden;
    background: #fff;
    border-radius: var(--radius);
}

.product-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f0f0f0;
}

.product-card > div {
    padding: 10px;
}

.product-card h3 {
    display: -webkit-box;
    min-height: 39px;
    margin: 0 0 5px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-card p {
    margin: 0 0 8px;
    overflow: hidden;
    color: #999;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card strong {
    color: #e43d12;
    font-size: 18px;
}

.product-card small {
    float: right;
    margin-top: 5px;
    color: #aaa;
    font-size: 10px;
}

.page-head {
    min-height: 60px;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.page-head h1 {
    margin: 0;
    font-size: 20px;
}

.page-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.filter-panel {
    padding: 12px 14px;
    background: #fff;
}

.filter-panel form {
    flex-wrap: wrap;
}

.filter-panel input {
    width: 100%;
}

.filter-panel select {
    flex: 1;
}

.store-card {
    margin: 12px 14px;
    padding: 16px;
    background: #fff;
    border-radius: var(--radius);
}

.store-card h2 {
    margin: 0 0 14px;
    font-size: 16px;
}

.product-gallery {
    background: #fff;
}

.product-main-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.gallery-list {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    overflow-x: auto;
}

.gallery-list img {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 5px;
}

.product-info h1 {
    margin: 10px 0 6px;
    font-size: 21px;
    line-height: 1.4;
}

.product-info > p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
}

.category-tag {
    padding: 3px 7px;
    color: var(--primary-dark);
    font-size: 11px;
    background: #fff0e8;
    border-radius: 4px;
}

.product-price {
    color: #e43d12;
    font-size: 26px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 13px;
    padding-top: 12px;
    color: #999;
    font-size: 11px;
    border-top: 1px solid var(--line);
}

.buy-form {
    display: grid;
    gap: 14px;
}

.buy-actions,
.double-actions,
.order-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 1fr);
}

.product-description p,
.service-list p {
    margin: 0 0 10px;
    color: #555;
    font-size: 14px;
    line-height: 1.8;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 15px;
    color: #444;
    font-size: 13px;
    font-weight: 600;
    background: #f1f1f1;
    border: 1px solid transparent;
    border-radius: 7px;
}

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

.button.primary:hover {
    background: var(--primary-dark);
}

.button.outline {
    color: var(--primary-dark);
    background: #fff;
    border-color: #ffb89d;
}

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

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

.button.small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12px;
}

.button.block {
    width: 100%;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.field {
    display: grid;
    gap: 6px;
}

.field label {
    color: #555;
    font-size: 12px;
    font-weight: 600;
}

.field input,
.field select,
.field textarea,
.inline-form input,
.inline-form select,
.filter-form input,
.filter-form select,
.variant-table input {
    width: 100%;
    min-height: 39px;
    padding: 8px 10px;
    color: var(--text);
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    outline: 0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--primary);
}

.field textarea {
    min-height: 90px;
    resize: vertical;
}

.three-fields,
.two-columns {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, 1fr);
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #555;
    font-size: 13px;
}

.checkbox-line input {
    width: auto;
}

.cart-list,
.order-list,
.address-list {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
}

.cart-item,
.order-card,
.address-list article {
    background: #fff;
    border-radius: var(--radius);
}

.cart-item {
    display: grid;
    gap: 12px;
    padding: 14px;
    grid-template-columns: 92px 1fr;
}

.cart-item > img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 6px;
}

.cart-item h3 {
    margin: 0 0 5px;
    font-size: 14px;
}

.cart-item p {
    margin: 0 0 8px;
    color: #888;
    font-size: 12px;
}

.cart-item strong {
    color: #e43d12;
}

.cart-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}

.cart-actions form {
    display: flex;
    gap: 5px;
}

.cart-actions input {
    width: 58px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cart-actions button,
.link-danger {
    padding: 0;
    color: var(--danger);
    font-size: 12px;
    background: transparent;
    border: 0;
}

.cart-actions form:first-child button {
    padding: 0 8px;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cart-settlement,
.submit-bar {
    position: sticky;
    z-index: 20;
    bottom: 63px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #fff;
    border-top: 1px solid var(--line);
}

.cart-settlement strong,
.submit-bar > strong {
    color: #e43d12;
    font-size: 18px;
}

.address-options {
    display: grid;
    gap: 10px;
}

.address-options label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
}

.address-options input {
    margin-top: 3px;
}

.address-options span {
    display: grid;
    gap: 4px;
}

.address-options small {
    color: #777;
    line-height: 1.5;
}

.empty-inline {
    padding: 14px;
    color: #777;
    font-size: 13px;
    background: #fafafa;
    border: 1px dashed #ccc;
    border-radius: 6px;
}

.empty-inline a {
    color: var(--blue);
}

.checkout-item {
    display: grid;
    align-items: center;
    gap: 11px;
    padding: 11px 0;
    grid-template-columns: 72px 1fr;
    border-bottom: 1px solid var(--line);
}

.checkout-item img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
}

.checkout-item > div {
    display: grid;
    gap: 5px;
}

.checkout-item small {
    color: #888;
}

.checkout-item span {
    font-size: 13px;
}

.amount-list,
.data-list {
    display: grid;
    gap: 10px;
}

.amount-list {
    margin-top: 12px;
}

.amount-list > div,
.data-list > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #666;
    font-size: 13px;
}

.amount-list strong,
.data-list strong {
    color: #222;
    text-align: right;
    overflow-wrap: anywhere;
}

.amount-list .total {
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.amount-list .total strong {
    color: #e43d12;
    font-size: 18px;
}

.payment-card {
    margin: 26px 14px;
    padding: 24px 18px;
    text-align: center;
    background: #fff;
    border-radius: var(--radius);
}

.wechat-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
}

.wechat-title span {
    padding: 7px;
    color: #fff;
    font-size: 11px;
    background: var(--wechat);
    border-radius: 6px;
}

.payment-card > p {
    margin: 0;
    color: #888;
    font-size: 12px;
}

.payment-card > h1 {
    margin: 8px 0 24px;
    font-size: 34px;
}

.payment-card dl {
    margin: 0 0 18px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.payment-card dl > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 5px 0;
    font-size: 12px;
}

.payment-card dt {
    color: #888;
}

.payment-card dd {
    margin: 0;
    text-align: right;
    overflow-wrap: anywhere;
}

.notice {
    margin: 12px 0;
    padding: 10px;
    font-size: 12px;
    line-height: 1.6;
    text-align: left;
    border-radius: 6px;
}

.notice.warning {
    color: #7c4b00;
    background: #fff8e6;
    border: 1px solid #f7d794;
}

.result-card {
    padding: 44px 20px 24px;
    text-align: center;
}

.result-mark {
    display: grid;
    width: 62px;
    height: 62px;
    margin: 0 auto 14px;
    place-items: center;
    color: #fff;
    font-size: 28px;
    background: var(--green);
    border-radius: 50%;
}

.result-card h1 {
    margin: 0 0 8px;
}

.result-card p {
    color: #777;
    font-size: 12px;
}

.result-card > strong {
    font-size: 24px;
}

.double-actions,
.order-actions {
    margin: 14px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 18px;
    color: #fff;
    background: #34383e;
}

.profile-card .avatar {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: var(--primary-dark);
    font-size: 22px;
    font-weight: 700;
    background: #fff;
    border-radius: 50%;
}

.profile-card h1,
.profile-card p {
    margin: 0;
}

.profile-card h1 {
    font-size: 18px;
}

.profile-card p {
    margin-top: 5px;
    color: #ddd;
    font-size: 12px;
}

.order-shortcuts > div:last-child {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.order-shortcuts > div:last-child a {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
}

.order-shortcuts > div:last-child strong {
    color: var(--primary-dark);
    font-size: 19px;
}

.profile-links a {
    display: flex;
    justify-content: space-between;
    padding: 13px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--line);
}

.profile-links a:last-child {
    border: 0;
}

.profile-links b {
    color: #aaa;
}

.logout-form {
    margin: 14px;
}

.address-list article {
    padding: 14px;
}

.address-list article > div:first-child > strong {
    font-size: 14px;
}

.address-list article > div:first-child > span {
    margin-left: 7px;
    padding: 2px 5px;
    color: var(--primary-dark);
    font-size: 10px;
    background: #fff0e8;
    border-radius: 3px;
}

.address-list p {
    margin: 8px 0 0;
    color: #666;
    font-size: 13px;
    line-height: 1.6;
}

.address-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 12px;
    padding-top: 10px;
    font-size: 12px;
    border-top: 1px solid var(--line);
}

.address-actions button {
    padding: 0;
    color: var(--danger);
    background: transparent;
    border: 0;
}

.order-tabs {
    display: flex;
    gap: 18px;
    padding: 0 14px;
    overflow-x: auto;
    white-space: nowrap;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.order-tabs a {
    padding: 12px 0 10px;
    color: #666;
    font-size: 12px;
    border-bottom: 2px solid transparent;
}

.order-tabs a.active {
    color: var(--primary-dark);
    font-weight: 700;
    border-bottom-color: var(--primary);
}

.order-card {
    padding: 14px;
}

.order-card header,
.order-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
}

.order-card header {
    padding-bottom: 10px;
    color: #777;
    border-bottom: 1px solid var(--line);
}

.order-card header strong {
    color: var(--primary-dark);
}

.order-product {
    display: grid;
    gap: 10px;
    padding: 12px 0;
    grid-template-columns: 68px 1fr;
}

.order-product img {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 5px;
}

.order-product h3 {
    margin: 0 0 6px;
    font-size: 14px;
}

.order-product p {
    margin: 0;
    color: #888;
    font-size: 12px;
}

.order-card footer {
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.order-state {
    padding: 24px 18px;
    color: #fff;
    background: #3a3f45;
}

.order-state h1,
.order-state p {
    margin: 0;
}

.order-state p {
    margin-top: 7px;
    color: #ddd;
    font-size: 12px;
}

.order-state span {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 7px;
    color: #5f3300;
    font-size: 11px;
    background: #ffd89d;
    border-radius: 4px;
}

.data-list.separated {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.license-box {
    display: grid;
    min-height: 180px;
    margin-bottom: 16px;
    padding: 20px;
    place-items: center;
    color: #999;
    font-size: 12px;
    text-align: center;
    background: #fafafa;
    border: 1px dashed #ccc;
    border-radius: 6px;
}

.policy-list > div {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, 1fr);
}

.policy-list span {
    padding: 10px;
    font-size: 12px;
    text-align: center;
    background: #f5f5f5;
    border-radius: 5px;
}

.service-rule-card h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.service-rule-card > p {
    margin: 0 0 10px;
    color: #666;
    font-size: 13px;
    line-height: 1.8;
}

.service-rule-card > p:last-child {
    margin-bottom: 0;
}

.empty-state {
    display: grid;
    min-height: 360px;
    padding: 40px 20px;
    place-items: center;
    align-content: center;
    text-align: center;
}

.empty-state.compact {
    min-height: 180px;
    background: #fff;
    border-radius: var(--radius);
}

.empty-state > span {
    font-size: 17px;
    font-weight: 700;
}

.empty-state p {
    margin: 8px 0 18px;
    color: #888;
    font-size: 13px;
}

.auth-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background: #f4f4f4;
}

.auth-shell {
    width: min(100%, 420px);
}

.auth-shell .flash {
    margin: 0 0 12px;
}

.auth-card {
    padding: 28px;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 10px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
}

.auth-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.auth-card h1 {
    margin: 0;
    font-size: 24px;
}

.auth-subtitle {
    margin: 8px 0 24px;
    color: #888;
    font-size: 13px;
}

.auth-switch {
    margin: 20px 0 0;
    color: #777;
    font-size: 13px;
    text-align: center;
}

.auth-switch a {
    color: var(--primary-dark);
}

.admin-body {
    min-width: 1100px;
    background: #f3f4f6;
}

.admin-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 220px 1fr;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    flex-direction: column;
    padding: 22px 14px;
    color: #d1d5db;
    background: #1f2937;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px 22px;
    color: #fff;
}

.admin-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.admin-brand span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.admin-brand strong {
    font-size: 18px;
    font-weight: 700;
}

.admin-brand small {
    color: #9ca3af;
}

.admin-nav {
    display: grid;
    gap: 4px;
}

.admin-nav a {
    padding: 11px 13px;
    font-size: 13px;
    border-radius: 6px;
}

.admin-nav a:hover,
.admin-nav a.active {
    color: #fff;
    background: #374151;
}

.admin-nav a.active {
    box-shadow: inset 3px 0 0 var(--primary);
}

.admin-store-link {
    margin-top: auto;
    padding: 10px 12px;
    color: #d1d5db;
    font-size: 12px;
    border: 1px solid #4b5563;
    border-radius: 6px;
}

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

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 74px;
    padding: 0 26px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.admin-topbar small {
    color: #9ca3af;
}

.admin-topbar h1 {
    margin: 3px 0 0;
    font-size: 21px;
}

.admin-topbar form {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.text-button {
    padding: 0;
    color: var(--blue);
    background: transparent;
    border: 0;
}

.admin-content > .flash {
    margin: 18px 26px 0;
}

.admin-main {
    padding: 22px 26px 40px;
}

.stat-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.stat-grid article {
    padding: 17px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.stat-grid span {
    color: #6b7280;
    font-size: 12px;
}

.stat-grid strong {
    display: block;
    margin-top: 8px;
    font-size: 23px;
}

.admin-card {
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.admin-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 57px;
    padding: 12px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.admin-card-head h2 {
    margin: 0;
    font-size: 15px;
}

.admin-card-head > span,
.admin-card-head p {
    color: #6b7280;
    font-size: 12px;
}

.admin-card-body {
    padding: 18px;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.admin-toolbar > span {
    color: #6b7280;
    font-size: 12px;
}

.filter-form,
.inline-form,
.actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-form input {
    width: 300px;
}

.filter-form select {
    width: 150px;
}

.inline-form input {
    width: 220px;
}

.inline-form input[type="number"] {
    width: 100px;
}

.inline-form.compact input {
    min-height: 32px;
    width: 150px;
}

.inline-form.compact input[type="number"] {
    width: 80px;
}

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

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

.admin-table th,
.admin-table td {
    padding: 12px 14px;
    font-size: 12px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #eef0f2;
}

.admin-table th {
    color: #6b7280;
    font-weight: 600;
    background: #f9fafb;
    white-space: nowrap;
}

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

.admin-table small {
    color: #8b919b;
    line-height: 1.5;
}

.number-link {
    color: var(--blue);
    font-weight: 600;
}

.admin-product {
    display: flex;
    align-items: center;
    min-width: 190px;
    gap: 9px;
}

.admin-product img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    background: #f3f4f6;
    border-radius: 5px;
}

.admin-product strong,
.admin-product small {
    display: block;
}

.admin-product small {
    margin-top: 3px;
}

.status-badge {
    display: inline-block;
    padding: 4px 7px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.status-badge.success {
    color: #166534;
    background: #dcfce7;
}

.status-badge.warning {
    color: #854d0e;
    background: #fef3c7;
}

.status-badge.info,
.status-badge.primary {
    color: #1d4ed8;
    background: #dbeafe;
}

.status-badge.muted {
    color: #4b5563;
    background: #e5e7eb;
}

.admin-form {
    max-width: 1100px;
}

.admin-form .two-columns {
    grid-template-columns: repeat(2, 1fr);
}

.admin-form .full {
    grid-column: 1 / -1;
}

.upload-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(2, 1fr);
}

.image-preview {
    width: 140px;
    height: 140px;
    margin-top: 8px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.image-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.image-list article {
    text-align: center;
}

.image-list img {
    display: block;
    width: 120px;
    height: 120px;
    margin-bottom: 6px;
    object-fit: cover;
    border-radius: 6px;
}

.variant-table input {
    min-width: 110px;
}

.variant-table td > small {
    display: block;
    margin-top: 4px;
}

.admin-form-actions {
    display: flex;
    gap: 10px;
    margin: 18px 0;
}

.form-help {
    margin: 5px 0 0;
    color: #8b919b;
    font-size: 11px;
    line-height: 1.5;
}

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

.detail-grid .admin-card {
    margin-bottom: 0;
}

.detail-grid .full {
    grid-column: 1 / -1;
}

.admin-data-list {
    display: grid;
    gap: 12px 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-data-list > div {
    display: grid;
    gap: 4px;
}

.admin-data-list span {
    color: #6b7280;
    font-size: 11px;
}

.admin-data-list strong {
    font-size: 13px;
    overflow-wrap: anywhere;
}

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

.operation-panel {
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
}

.operation-panel h3 {
    margin: 0 0 12px;
    font-size: 14px;
}

.operation-panel > p {
    color: #6b7280;
    font-size: 12px;
}

.admin-login-body {
    display: grid;
    min-height: 100vh;
    padding: 24px;
    place-items: center;
    background: #eef0f3;
}

.admin-login-card {
    width: min(100%, 400px);
    padding: 30px;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 9px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

.admin-login-title > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-login-title img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.admin-login-title strong {
    color: var(--primary-dark);
    font-size: 14px;
}

.admin-login-title h1 {
    margin: 7px 0;
    font-size: 23px;
}

.admin-login-title p {
    margin: 0 0 24px;
    color: #777;
    font-size: 12px;
}

.login-flash {
    position: fixed;
    top: 18px;
    left: 50%;
    width: min(calc(100% - 30px), 400px);
    margin: 0;
    transform: translateX(-50%);
}

@media (max-width: 520px) {
    .store-shell {
        box-shadow: none;
    }

    .home-banner {
        min-height: 135px;
    }

    .home-banner h1 {
        font-size: 24px;
    }

    .three-fields {
        grid-template-columns: 1fr;
    }
}
