:root {
    --ink: #18212f;
    --muted: #697386;
    --line: #e4e7ec;
    --panel: #ffffff;
    --canvas: #f4f5f7;
    --brand: #0b7a75;
    --brand-dark: #075e5a;
    --brand-soft: #e8f5f3;
    --accent: #e64332;
    --accent-dark: #c83225;
    --warning: #b56a00;
    --success: #26734d;
    --shadow: 0 10px 30px rgba(27, 39, 54, 0.08);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

body.admin-body {
    background: #eef1f3;
}

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

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

button {
    cursor: pointer;
}

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

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    z-index: 30;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
}

.header-main {
    display: grid;
    grid-template-columns: auto minmax(240px, 1fr) auto;
    align-items: center;
    gap: 28px;
    min-height: 72px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 7px;
    color: white;
    background: var(--brand);
    font-size: 20px;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 18px;
    letter-spacing: 0.04em;
}

.brand small {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.12em;
}

.brand-inverse {
    color: white;
}

.brand-inverse small {
    color: #b9c8ca;
}

.header-search {
    display: flex;
    max-width: 620px;
    width: 100%;
    justify-self: center;
    border: 1px solid var(--brand);
    border-radius: 6px;
    overflow: hidden;
}

.header-search input {
    width: 100%;
    min-width: 0;
    padding: 10px 14px;
    border: 0;
    outline: 0;
}

.header-search button {
    width: 82px;
    border: 0;
    color: white;
    background: var(--brand);
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 18px;
    white-space: nowrap;
    font-size: 14px;
}

.header-actions > a:hover,
.user-menu:hover > span {
    color: var(--brand);
}

.count-badge {
    display: inline-grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    color: white;
    background: var(--accent);
    font-size: 11px;
}

.user-menu {
    position: relative;
    padding: 24px 0;
}

.user-menu-panel {
    position: absolute;
    top: 62px;
    right: 0;
    display: none;
    width: 156px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow);
}

.user-menu:hover .user-menu-panel,
.user-menu:focus-within .user-menu-panel {
    display: block;
}

.user-menu-panel a,
.user-menu-panel button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 5px;
    text-align: left;
    background: transparent;
}

.user-menu-panel a:hover,
.user-menu-panel button:hover {
    background: var(--brand-soft);
}

.page-shell {
    min-height: calc(100vh - 72px);
}

.flash-stack {
    padding-top: 18px;
}

.flash {
    margin-bottom: 10px;
    padding: 11px 14px;
    border-radius: 6px;
    border: 1px solid;
    background: white;
}

.flash-success {
    color: var(--success);
    border-color: #b9dfce;
    background: #f0faf5;
}

.flash-error {
    color: #a52a20;
    border-color: #f0b9b4;
    background: #fff4f2;
}

.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: white;
    font-weight: 700;
}

.button:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.button-primary {
    border-color: var(--accent);
    color: white;
    background: var(--accent);
}

.button-primary:hover {
    border-color: var(--accent-dark);
    color: white;
    background: var(--accent-dark);
}

.button-brand {
    border-color: var(--brand);
    color: white;
    background: var(--brand);
}

.button-brand:hover {
    border-color: var(--brand-dark);
    color: white;
    background: var(--brand-dark);
}

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

.button-block {
    width: 100%;
}

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

.link-button {
    border: 0;
    color: inherit;
    background: transparent;
}

.text-link {
    color: var(--brand);
    font-weight: 700;
}

.text-danger {
    color: var(--accent);
}

.section {
    padding: 44px 0;
}

.section-tight {
    padding: 28px 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: 26px;
    line-height: 1.25;
}

.section-heading p {
    margin: 5px 0 0;
    color: var(--muted);
}

.hero {
    position: relative;
    overflow: hidden;
    color: white;
    background: #123e4b;
}

.hero::after {
    position: absolute;
    inset: auto -90px -110px auto;
    width: 440px;
    height: 440px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    content: "";
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 380px;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 40px;
}

.hero-copy {
    padding: 48px 0;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #bde2dd;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.hero h1 {
    max-width: 600px;
    margin: 0;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.05;
}

.hero p {
    max-width: 590px;
    margin: 18px 0 26px;
    color: #d9e8e7;
    font-size: 17px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-visual {
    align-self: end;
    height: 330px;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 210px 210px 0 0;
    filter: saturate(0.9);
}

.metric-strip {
    border-bottom: 1px solid var(--line);
    background: white;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.metric-item {
    padding: 20px 26px;
    border-right: 1px solid var(--line);
}

.metric-item:last-child {
    border-right: 0;
}

.metric-item strong,
.metric-item span {
    display: block;
}

.metric-item strong {
    font-size: 21px;
}

.metric-item span {
    color: var(--muted);
    font-size: 13px;
}

.category-band {
    background: white;
    border-bottom: 1px solid var(--line);
}

.category-list {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    padding: 18px 0;
}

.category-tile {
    display: grid;
    min-height: 72px;
    place-items: center;
    padding: 10px 6px;
    border: 1px solid transparent;
    border-radius: 7px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

.category-tile:hover {
    color: var(--brand);
    border-color: #b9ded9;
    background: var(--brand-soft);
}

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

.product-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.product-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e8ecef;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 240ms ease;
}

.product-card:hover .product-image img {
    transform: scale(1.035);
}

.product-info {
    display: flex;
    min-height: 148px;
    flex: 1;
    flex-direction: column;
    padding: 14px;
}

.product-brand {
    color: var(--muted);
    font-size: 12px;
}

.product-name {
    display: -webkit-box;
    overflow: hidden;
    margin: 4px 0 10px;
    font-size: 15px;
    font-weight: 700;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.product-meta {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.price {
    color: var(--accent);
    font-size: 20px;
    font-weight: 800;
}

.price-small {
    font-size: 16px;
}

.sales {
    color: var(--muted);
    font-size: 12px;
}

.stock-pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--success);
    background: #e9f7f0;
    font-size: 12px;
    font-weight: 700;
}

.stock-pill.out,
.status-pill.danger {
    color: #a52a20;
    background: #fff0ee;
}

.status-pill.neutral {
    color: #526071;
    background: #eef1f4;
}

.status-pill.warning {
    color: #8a5000;
    background: #fff3dc;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.panel-header h2,
.panel-header h3 {
    margin: 0;
}

.panel-body {
    padding: 20px;
}

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

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

.grid-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    align-items: start;
}

.form-row {
    margin-bottom: 16px;
}

.form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}

.form-control {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #cfd5dc;
    border-radius: 5px;
    outline: none;
    background: white;
}

.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(11, 122, 117, 0.1);
}

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

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

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.form-hint {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-wrap {
    display: grid;
    min-height: calc(100vh - 72px);
    grid-template-columns: 1fr 1fr;
    background: white;
}

.auth-visual {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: #174b55;
}

.auth-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.auth-overlay {
    position: absolute;
    inset: auto 0 0;
    padding: 48px;
    color: white;
    background: linear-gradient(transparent, rgba(8, 31, 35, 0.94));
}

.auth-overlay h1 {
    margin: 0 0 8px;
    font-size: 40px;
}

.auth-overlay p {
    max-width: 520px;
    margin: 0;
    color: #d7e5e4;
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 44px 24px;
}

.auth-card {
    width: min(430px, 100%);
}

.auth-card h2 {
    margin: 0 0 8px;
    font-size: 30px;
}

.auth-card > p {
    margin: 0 0 26px;
    color: var(--muted);
}

.auth-switch {
    margin-top: 18px;
    color: var(--muted);
    text-align: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 18px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb a:hover {
    color: var(--brand);
}

.product-detail {
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
}

.product-gallery {
    min-height: 520px;
    background: #e8ecef;
}

.product-gallery img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
}

.product-summary {
    padding: 36px;
}

.product-summary h1 {
    margin: 8px 0 10px;
    font-size: 32px;
    line-height: 1.25;
}

.detail-price-box {
    margin: 20px 0;
    padding: 18px;
    border-left: 4px solid var(--accent);
    background: #fff7f5;
}

.detail-price-box .price {
    font-size: 30px;
}

.sku-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sku-option {
    position: relative;
}

.sku-option input {
    position: absolute;
    opacity: 0;
}

.sku-option span {
    display: block;
    min-width: 116px;
    padding: 10px 14px;
    border: 1px solid #cfd5dc;
    border-radius: 5px;
    text-align: center;
}

.sku-option input:checked + span {
    border-color: var(--brand);
    color: var(--brand);
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 1px var(--brand);
}

.sku-option input:disabled + span {
    cursor: not-allowed;
    color: #9aa3af;
    background: #f2f3f4;
}

.quantity-control {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #cfd5dc;
    border-radius: 5px;
}

.quantity-control button {
    width: 38px;
    border: 0;
    background: #f7f8f9;
}

.quantity-control input {
    width: 54px;
    border: 0;
    border-right: 1px solid #cfd5dc;
    border-left: 1px solid #cfd5dc;
    text-align: center;
    outline: none;
}

.detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.detail-actions .button {
    min-width: 150px;
}

.spec-table {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 0;
    margin-top: 24px;
    border-top: 1px solid var(--line);
}

.spec-table dt,
.spec-table dd {
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.spec-table dt {
    color: var(--muted);
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 22px;
    align-items: start;
}

.cart-list {
    overflow: hidden;
}

.cart-item {
    display: grid;
    grid-template-columns: 28px 96px minmax(0, 1fr) 130px 120px 42px;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.cart-item:last-child {
    border-bottom: 0;
}

.cart-thumb {
    width: 96px;
    height: 76px;
    overflow: hidden;
    border-radius: 6px;
    background: #e8ecef;
}

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

.cart-item-name {
    min-width: 0;
}

.cart-item-name strong,
.cart-item-name span {
    display: block;
}

.cart-item-name span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.cart-summary {
    position: sticky;
    top: 96px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
}

.summary-total {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 20px;
    font-weight: 800;
}

.summary-total .price {
    font-size: 24px;
}

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

.address-option {
    position: relative;
}

.address-option input {
    position: absolute;
    opacity: 0;
}

.address-option span {
    display: block;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.address-option input:checked + span {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.address-option strong {
    display: block;
    margin-bottom: 4px;
}

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

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th,
.data-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.data-table th {
    color: #596576;
    background: #f8f9fa;
    font-size: 12px;
    letter-spacing: 0.03em;
}

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

.data-table td.wrap {
    min-width: 240px;
    white-space: normal;
}

.order-card {
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
}

.order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
    background: #f9fafb;
    font-size: 13px;
}

.order-item {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 90px 110px;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}

.order-item:last-child {
    border-bottom: 0;
}

.order-item-thumb {
    width: 84px;
    height: 68px;
    overflow: hidden;
    border-radius: 5px;
    background: #e8ecef;
}

.order-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-total {
    padding: 15px 18px;
    border-top: 1px solid var(--line);
    text-align: right;
}

.order-total strong {
    margin-left: 6px;
    color: var(--accent);
    font-size: 21px;
}

.order-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.timeline {
    position: relative;
    margin: 0;
    padding: 8px 0 8px 26px;
    list-style: none;
}

.timeline::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 7px;
    width: 1px;
    background: var(--line);
    content: "";
}

.timeline li {
    position: relative;
    padding: 0 0 20px 10px;
}

.timeline li::before {
    position: absolute;
    top: 5px;
    left: -24px;
    width: 9px;
    height: 9px;
    border: 2px solid white;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 1px var(--brand);
    content: "";
}

.timeline strong,
.timeline span {
    display: block;
}

.timeline span {
    color: var(--muted);
    font-size: 12px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
    margin-bottom: 18px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
}

.filter-bar .form-row {
    margin: 0;
}

.filter-bar .form-control {
    min-width: 120px;
}

.search-field {
    min-width: 230px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 28px;
}

.pagination a,
.pagination span {
    display: grid;
    min-width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: white;
}

.pagination .active {
    border-color: var(--brand);
    color: white;
    background: var(--brand);
}

.empty-state {
    padding: 64px 20px;
    border: 1px dashed #c8ced5;
    border-radius: var(--radius);
    color: var(--muted);
    background: white;
    text-align: center;
}

.empty-state strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 19px;
}

.payment-page {
    display: grid;
    min-height: calc(100vh - 72px);
    place-items: center;
    padding: 48px 20px;
    background: #eef4f3;
}

.payment-card {
    width: min(620px, 100%);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    box-shadow: var(--shadow);
}

.payment-head {
    padding: 22px 26px;
    color: white;
    background: #1677ff;
}

.payment-head h1 {
    margin: 0;
    font-size: 24px;
}

.payment-body {
    padding: 30px 26px;
}

.payment-amount {
    margin: 18px 0 24px;
    text-align: center;
}

.payment-amount span,
.payment-amount strong {
    display: block;
}

.payment-amount span {
    color: var(--muted);
}

.payment-amount strong {
    margin-top: 5px;
    font-size: 40px;
}

.payment-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.payment-actions .button-primary {
    border-color: #1677ff;
    background: #1677ff;
}

.payment-note {
    margin-top: 20px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.metric-cards {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.metric-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: white;
}

.metric-card span,
.metric-card strong {
    display: block;
}

.metric-card span {
    color: var(--muted);
    font-size: 12px;
}

.metric-card strong {
    margin-top: 8px;
    font-size: 24px;
}

.rank-list {
    display: grid;
    gap: 13px;
}

.rank-item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.rank-number {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 5px;
    color: var(--brand);
    background: var(--brand-soft);
    font-size: 12px;
    font-weight: 800;
}

.rank-bar {
    grid-column: 2 / 4;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf0f2;
}

.rank-bar i {
    display: block;
    height: 100%;
    background: var(--brand);
}

.admin-layout {
    display: grid;
    min-height: calc(100vh - 72px);
    grid-template-columns: 220px minmax(0, 1fr);
}

.admin-sidebar {
    padding: 24px 14px;
    color: #d7e2e4;
    background: #18333a;
}

.admin-sidebar-title {
    padding: 0 10px 18px;
    color: #8fb0b3;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

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

.admin-nav a {
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 14px;
}

.admin-nav a:hover,
.admin-nav a.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.admin-content {
    min-width: 0;
    padding: 28px;
}

.admin-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.admin-heading h1 {
    margin: 0;
    font-size: 27px;
}

.admin-heading p {
    margin: 4px 0 0;
    color: var(--muted);
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
}

.inline-form .form-control {
    width: auto;
    min-width: 90px;
    min-height: 34px;
    padding: 6px 8px;
}

.inline-form .button {
    min-height: 34px;
}

.sensitive {
    font-variant-numeric: tabular-nums;
}

.notice {
    padding: 13px 15px;
    border-left: 3px solid var(--brand);
    background: var(--brand-soft);
    color: #225e5a;
}

.notice.warning {
    border-left-color: var(--warning);
    background: #fff6e6;
    color: #754900;
}

.chat-widget {
    position: fixed;
    z-index: 50;
    right: 24px;
    bottom: 24px;
}

.chat-toggle {
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 9px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: var(--brand);
    box-shadow: 0 12px 28px rgba(7, 94, 90, 0.25);
    font-weight: 800;
}

.chat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6ef0c5;
}

.chat-panel {
    position: absolute;
    right: 0;
    bottom: 58px;
    width: min(370px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    box-shadow: 0 20px 50px rgba(14, 31, 36, 0.2);
}

.chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px;
    color: white;
    background: #173e48;
}

.chat-head strong,
.chat-head small {
    display: block;
}

.chat-head small {
    color: #b9cdcf;
}

.icon-button {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 5px;
    color: inherit;
    background: rgba(255, 255, 255, 0.1);
    font-size: 20px;
}

.chat-messages {
    display: flex;
    height: 310px;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 16px;
    background: #f6f7f8;
}

.chat-message {
    max-width: 84%;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
}

.chat-message.bot {
    align-self: flex-start;
    border: 1px solid var(--line);
    background: white;
}

.chat-message.user {
    align-self: flex-end;
    color: white;
    background: var(--brand);
}

.chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--line);
}

.chat-form input {
    min-width: 0;
    flex: 1;
    padding: 9px 11px;
    border: 1px solid #cfd5dc;
    border-radius: 5px;
    outline: none;
}

.chat-form button {
    padding: 0 15px;
    border: 0;
    border-radius: 5px;
    color: white;
    background: var(--brand);
    font-weight: 700;
}

.site-footer {
    color: #cfdddf;
    background: #14282e;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 50px;
    padding-top: 42px;
    padding-bottom: 34px;
}

.footer-grid > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-grid p {
    max-width: 420px;
    margin: 8px 0 0;
    color: #9db1b5;
}

.footer-grid a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 16px;
    padding-bottom: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #879da1;
    font-size: 12px;
}

.toast {
    position: fixed;
    z-index: 80;
    top: 90px;
    left: 50%;
    max-width: 460px;
    padding: 11px 16px;
    border-radius: 6px;
    color: white;
    background: #1e2e38;
    box-shadow: var(--shadow);
    transform: translateX(-50%);
}

.toast.error {
    background: #a52a20;
}

@media (max-width: 1080px) {
    .header-main {
        grid-template-columns: auto 1fr;
    }

    .header-search {
        grid-row: 2;
        grid-column: 1 / 3;
        margin-bottom: 12px;
    }

    .header-actions {
        grid-column: 2;
    }

    .category-list {
        grid-template-columns: repeat(5, 1fr);
    }

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

    .metric-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 820px) {
    .header-main {
        gap: 14px;
    }

    .header-actions {
        gap: 10px;
    }

    .header-actions > a:nth-of-type(1),
    .header-actions > a:nth-of-type(2) {
        display: none;
    }

    .hero-inner,
    .auth-wrap,
    .product-detail,
    .grid-sidebar,
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        min-height: auto;
    }

    .hero-copy {
        padding-bottom: 0;
    }

    .hero-visual {
        height: 240px;
    }

    .hero-visual img {
        border-radius: 120px 120px 0 0;
    }

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

    .metric-item:nth-child(2) {
        border-right: 0;
    }

    .metric-item:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

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

    .auth-visual {
        min-height: 300px;
    }

    .auth-overlay {
        padding: 28px;
    }

    .auth-overlay h1 {
        font-size: 30px;
    }

    .product-gallery,
    .product-gallery img {
        min-height: 360px;
    }

    .product-summary {
        padding: 24px;
    }

    .cart-summary {
        position: static;
    }

    .cart-item {
        grid-template-columns: 24px 78px minmax(0, 1fr);
        align-items: start;
    }

    .cart-item .price-small,
    .cart-item .quantity-control,
    .cart-item .remove-button {
        grid-column: 3;
    }

    .cart-thumb {
        width: 78px;
        height: 68px;
    }

    .order-item {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .order-item-thumb {
        width: 72px;
        height: 62px;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        padding: 12px;
    }

    .admin-sidebar-title {
        display: none;
    }

    .admin-nav {
        display: flex;
        overflow-x: auto;
    }

    .admin-nav a {
        white-space: nowrap;
    }

    .admin-content {
        padding: 18px;
    }

    .metric-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 20px, 1180px);
    }

    .header-main {
        min-height: 64px;
    }

    .brand small {
        display: none;
    }

    .header-actions {
        font-size: 13px;
    }

    .header-actions .user-menu > span {
        display: none;
    }

    .category-list {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .product-info {
        min-height: 132px;
        padding: 11px;
    }

    .product-name {
        font-size: 14px;
    }

    .price {
        font-size: 17px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 15px;
    }

    .section {
        padding: 30px 0;
    }

    .section-heading h1,
    .section-heading h2 {
        font-size: 22px;
    }

    .form-grid,
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .detail-actions {
        flex-direction: column;
    }

    .detail-actions .button {
        width: 100%;
    }

    .payment-actions,
    .metric-cards {
        grid-template-columns: 1fr;
    }

    .chat-widget {
        right: 14px;
        bottom: 14px;
    }

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

