/* ============================
   宿舍小卖部 · 样式表
   设计风格：温暖橙 + 薄荷绿
============================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #ff6b35;
    --primary-light: #ff8a5d;
    --primary-dark: #e85a25;
    --secondary: #2ec4b6;
    --secondary-light: #5cd6a7;
    --bg: #faf7f2;
    --card: #ffffff;
    --text: #2d2d2d;
    --text-light: #888;
    --text-lighter: #b8b8b8;
    --border: #f0ebe2;
    --danger: #ff4757;
    --success: #2ed573;
    --warning: #ffa502;
    --shadow-sm: 0 2px 8px rgba(255, 107, 53, 0.06);
    --shadow-md: 0 4px 16px rgba(255, 107, 53, 0.12);
    --shadow-lg: 0 8px 24px rgba(255, 107, 53, 0.18);
}

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: 14px;
    outline: none;
    border: none;
    background: transparent;
    color: var(--text);
}

input::placeholder, textarea::placeholder {
    color: var(--text-lighter);
}

/* ============================
   应用容器
============================ */
#app {
    max-width: 480px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--bg);
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

/* ============================
   顶部 Header
============================ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #ff8a5d 0%, #ff6b35 100%);
    color: white;
    padding-top: env(safe-area-inset-top, 0);
    box-shadow: var(--shadow-md);
}

.header-inner {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 32px;
    line-height: 1;
}

.logo-text h1 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.logo-text p {
    font-size: 11px;
    opacity: 0.9;
    margin-top: 2px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.2s;
}

.icon-btn:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.3);
}

/* ============================
   主内容区
============================ */
.app-main {
    flex: 1;
    padding-bottom: 70px;
    overflow-y: auto;
}

.page {
    display: none;
    padding: 14px;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================
   横幅
============================ */
.banner {
    background: linear-gradient(135deg, #ffd6c2 0%, #ffe9d9 100%);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.banner-text h2 {
    font-size: 20px;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.banner-text p {
    font-size: 12px;
    color: #8a4a2c;
    margin-bottom: 10px;
}

.banner-btn {
    background: var(--primary);
    color: white;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(255, 107, 53, 0.35);
}

.banner-emoji {
    font-size: 56px;
    line-height: 1;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ============================
   搜索栏
============================ */
.search-bar {
    background: white;
    border-radius: 22px;
    padding: 9px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    color: var(--text-light);
}

.search-bar input {
    flex: 1;
    font-size: 14px;
}

/* ============================
   分类导航
============================ */
.category-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 12px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-chip {
    flex-shrink: 0;
    padding: 7px 14px;
    background: white;
    border-radius: 18px;
    font-size: 13px;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.category-chip.active {
    background: linear-gradient(135deg, #ff8a5d 0%, #ff6b35 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.4);
    transform: translateY(-1px);
}

/* ============================
   商品区域
============================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.section-meta {
    font-size: 12px;
    color: var(--text-light);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:active {
    transform: scale(0.97);
    box-shadow: var(--shadow-md);
}

.product-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #fff5ec 0%, #ffe2cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    position: relative;
}

.product-tag {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
}

.product-tag.hot {
    background: var(--danger);
}

.product-info {
    padding: 8px 10px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-desc {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-bottom {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

.product-price small {
    font-size: 11px;
    font-weight: 400;
}

.product-old {
    text-decoration: line-through;
    color: var(--text-lighter);
    font-size: 11px;
    margin-left: 4px;
}

.add-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8a5d 0%, #ff6b35 100%);
    color: white;
    font-size: 18px;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 3px 8px rgba(255, 107, 53, 0.35);
    transition: all 0.2s;
}

.add-btn:active {
    transform: scale(0.85);
}

.add-btn.disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.product-sales {
    font-size: 10px;
    color: var(--text-lighter);
    margin-top: 4px;
}

/* ============================
   空状态
============================ */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-light);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 14px;
    opacity: 0.6;
}

.empty-state p {
    margin-bottom: 16px;
}

/* ============================
   按钮
============================ */
.primary-btn {
    background: linear-gradient(135deg, #ff8a5d 0%, #ff6b35 100%);
    color: white;
    padding: 11px 22px;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35);
    transition: all 0.2s;
}

.primary-btn:active {
    transform: scale(0.96);
}

.primary-btn.full {
    width: 100%;
}

.primary-btn:disabled {
    background: #ccc;
    box-shadow: none;
}

.text-btn {
    color: var(--text-light);
    font-size: 13px;
    padding: 4px 8px;
}

.text-btn:active {
    color: var(--primary);
}

/* ============================
   购物车页面
============================ */
.page-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px 14px;
}

.page-title h2 {
    font-size: 20px;
    font-weight: 700;
}

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-item {
    background: white;
    border-radius: 12px;
    padding: 10px;
    display: flex;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    align-items: center;
}

.cart-img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff5ec 0%, #ffe2cc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}

.cart-info {
    flex: 1;
    min-width: 0;
}

.cart-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
}

.cart-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg);
    border-radius: 16px;
    overflow: hidden;
}

.qty-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text);
    font-weight: 500;
    transition: all 0.15s;
}

.qty-btn:active {
    background: var(--border);
}

.qty-btn.minus {
    color: var(--danger);
}

.qty-btn.plus {
    color: var(--primary);
}

.qty-num {
    min-width: 30px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

.cart-delete {
    color: var(--text-lighter);
    font-size: 18px;
    padding: 4px;
    transition: all 0.2s;
}

.cart-delete:active {
    color: var(--danger);
}

.cart-footer {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    z-index: 90;
}

.cart-total {
    display: flex;
    flex-direction: column;
}

.cart-total span {
    font-size: 11px;
    color: var(--text-light);
}

.cart-total strong {
    color: var(--primary);
    font-size: 18px;
    font-weight: 700;
}

/* ============================
   订单页面
============================ */
.order-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
    background: white;
    border-radius: 12px;
    padding: 4px;
    box-shadow: var(--shadow-sm);
}

.order-tab {
    flex: 1;
    padding: 7px 0;
    font-size: 13px;
    border-radius: 8px;
    color: var(--text-light);
    transition: all 0.2s;
}

.order-tab.active {
    background: linear-gradient(135deg, #ff8a5d 0%, #ff6b35 100%);
    color: white;
    font-weight: 600;
}

.order-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.order-head {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-light);
}

.order-no {
    font-family: monospace;
}

.order-status {
    font-weight: 600;
}

.order-status.pending { color: var(--warning); }
.order-status.delivering { color: var(--primary); }
.order-status.completed { color: var(--success); }
.order-status.cancelled { color: var(--text-lighter); }

.order-body {
    padding: 10px 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.order-item-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.order-item-more {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-light);
}

.order-foot {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.order-total {
    font-weight: 700;
    color: var(--text);
}

.order-actions {
    display: flex;
    gap: 6px;
}

.order-action-btn {
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 12px;
    border: 1px solid var(--border);
    color: var(--text-light);
    background: white;
    transition: all 0.2s;
}

.order-action-btn.primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.order-action-btn:active {
    transform: scale(0.95);
}

/* ============================
   我的页面
============================ */
.profile-header {
    background: linear-gradient(135deg, #ff8a5d 0%, #ff6b35 100%);
    margin: -14px -14px 14px -14px;
    padding: 26px 18px 28px;
    color: white;
    display: flex;
    gap: 14px;
    align-items: center;
    border-radius: 0 0 24px 24px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.profile-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.profile-info p {
    font-size: 12px;
    opacity: 0.9;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: white;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.stat-item {
    text-align: center;
    border-right: 1px solid var(--border);
}

.stat-item:last-child {
    border-right: none;
}

.stat-item strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-item span {
    font-size: 11px;
    color: var(--text-light);
}

.menu-list {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.menu-item {
    padding: 13px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:active {
    background: var(--bg);
}

.menu-icon {
    font-size: 20px;
    width: 26px;
    text-align: center;
}

.menu-text {
    flex: 1;
    font-size: 14px;
}

.menu-arrow {
    color: var(--text-lighter);
    font-size: 20px;
    line-height: 1;
}

/* ============================
   底部 Tab 栏
============================ */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    border-top: 1px solid var(--border);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0));
    display: flex;
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 0;
    color: var(--text-light);
    position: relative;
    transition: color 0.2s;
}

.tab-item.active {
    color: var(--primary);
}

.tab-icon {
    font-size: 22px;
    line-height: 1;
}

.tab-label {
    font-size: 10px;
}

.tab-badge {
    position: absolute;
    top: 0;
    right: calc(50% - 20px);
    background: var(--danger);
    color: white;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* ============================
   模态框
============================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    position: relative;
    background: white;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    padding: 24px 18px 18px;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-large .modal-content {
    max-height: 92vh;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text-light);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
}

/* ============================
   商品详情
============================ */
.product-detail {
    text-align: center;
}

.detail-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 240px;
    background: linear-gradient(135deg, #fff5ec 0%, #ffe2cc 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 110px;
    margin-bottom: 14px;
}

.detail-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.detail-price {
    color: var(--primary);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.detail-old-price {
    color: var(--text-lighter);
    text-decoration: line-through;
    font-size: 13px;
    margin-bottom: 12px;
}

.detail-desc {
    background: var(--bg);
    padding: 12px;
    border-radius: 10px;
    color: var(--text-light);
    font-size: 13px;
    margin-bottom: 14px;
    text-align: left;
}

.detail-meta {
    display: flex;
    justify-content: space-around;
    margin-bottom: 14px;
    padding: 12px 0;
    background: var(--bg);
    border-radius: 10px;
}

.detail-meta div {
    text-align: center;
}

.detail-meta strong {
    display: block;
    color: var(--primary);
    font-size: 16px;
}

.detail-meta span {
    font-size: 11px;
    color: var(--text-light);
}

.detail-add-btn {
    width: 100%;
    padding: 12px;
    border-radius: 22px;
    background: linear-gradient(135deg, #ff8a5d 0%, #ff6b35 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.4);
}

/* ============================
   结算弹窗
============================ */
.checkout-content h3 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 18px;
}

.checkout-section {
    margin-bottom: 14px;
}

.checkout-section label {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.checkout-section input[type="text"],
.checkout-section textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: 10px;
    font-size: 14px;
}

.pay-methods {
    display: flex;
    gap: 8px;
}

.pay-method {
    flex: 1;
    padding: 10px;
    background: var(--bg);
    border-radius: 10px;
    text-align: center;
    font-size: 13px;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.pay-method input {
    display: none;
}

.pay-method.active {
    background: rgba(255, 107, 53, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.checkout-summary {
    background: var(--bg);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 14px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
}

.summary-row:last-child {
    margin-bottom: 0;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

.summary-row.total strong {
    color: var(--primary);
    font-size: 18px;
}

/* ============================
   订单详情
============================ */
.order-detail-content {
    padding: 4px;
}

.order-detail-content h3 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 18px;
}

.detail-section {
    margin-bottom: 16px;
}

.detail-section-title {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.detail-items {
    background: var(--bg);
    border-radius: 10px;
    padding: 10px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.detail-item-img {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.detail-item-info {
    flex: 1;
    text-align: left;
}

.detail-item-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.detail-item-meta {
    font-size: 11px;
    color: var(--text-light);
}

.detail-item-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
}

/* ============================
   管理后台
============================ */
.admin-content h3 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 14px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.admin-stat {
    background: linear-gradient(135deg, #fff5ec 0%, #ffe2cc 100%);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
}

.admin-stat-num {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.admin-stat span {
    font-size: 11px;
    color: var(--text-light);
}

.admin-tabs {
    display: flex;
    background: var(--bg);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 12px;
}

.admin-tab {
    flex: 1;
    padding: 7px 0;
    font-size: 13px;
    color: var(--text-light);
    border-radius: 7px;
    transition: all 0.2s;
}

.admin-tab.active {
    background: white;
    color: var(--primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 4px;
}

.admin-list-row {
    background: var(--bg);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-list-row .icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.admin-list-row .info {
    flex: 1;
    min-width: 0;
}

.admin-list-row .info .name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.admin-list-row .info .meta {
    font-size: 11px;
    color: var(--text-light);
}

.admin-list-row .actions {
    display: flex;
    gap: 4px;
}

.mini-btn {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 12px;
    background: white;
    color: var(--text);
    transition: all 0.2s;
}

.mini-btn:active {
    transform: scale(0.95);
}

.mini-btn.primary {
    background: var(--primary);
    color: white;
}

.mini-btn.danger {
    background: var(--danger);
    color: white;
}

.admin-add-btn {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: linear-gradient(135deg, #5cd6a7 0%, #2ec4b6 100%);
    color: white;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(46, 196, 182, 0.35);
}

/* ============================
   表单 (编辑商品)
============================ */
.edit-content h3 {
    text-align: center;
    font-size: 18px;
    margin-bottom: 18px;
}

.form-row {
    margin-bottom: 12px;
}

.form-row label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.form-row input[type="text"],
.form-row input[type="number"],
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: 10px;
    font-size: 14px;
}

.checkbox-row {
    display: flex;
    gap: 14px;
    align-items: center;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
}

.form-actions {
    margin-top: 16px;
}

/* ============================
   Toast
============================ */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.78);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.toast.success {
    background: rgba(46, 213, 115, 0.92);
}

.toast.error {
    background: rgba(255, 71, 87, 0.92);
}

/* ============================
   响应式
============================ */
@media (min-width: 481px) {
    body {
        background: #f0ebe2;
    }
}

@media (max-width: 360px) {
    .logo-text h1 { font-size: 15px; }
    .logo-text p { font-size: 10px; }
    .products-grid { gap: 8px; }
    .product-img { font-size: 44px; }
}

/* ============================
   登录页面
============================ */
.login-page {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #ff8a5d 0%, #ff6b35 50%, #e85a25 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.login-decoration {
    position: absolute;
    font-size: 48px;
    opacity: 0.18;
    animation: float 6s ease-in-out infinite;
}

.login-decoration.d1 { top: 8%;  left: 8%;  animation-delay: 0s; }
.login-decoration.d2 { top: 14%; right: 10%; animation-delay: 0.8s; font-size: 60px; }
.login-decoration.d3 { bottom: 16%; left: 6%; animation-delay: 1.6s; }
.login-decoration.d4 { top: 38%; left: 12%; animation-delay: 2.4s; font-size: 44px; }
.login-decoration.d5 { bottom: 10%; right: 12%; animation-delay: 3.2s; }
.login-decoration.d6 { top: 56%; right: 6%; animation-delay: 4s; font-size: 50px; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(8deg); }
}

.login-card {
    position: relative;
    background: white;
    width: calc(100% - 40px);
    max-width: 380px;
    border-radius: 20px;
    padding: 28px 24px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: cardEnter 0.5s ease;
}

@keyframes cardEnter {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
    text-align: center;
    margin-bottom: 22px;
}

.login-logo-icon {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 8px;
    display: inline-block;
    animation: bounce 2s infinite;
}

.login-logo h1 {
    font-size: 22px;
    color: var(--primary);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.login-logo p {
    font-size: 12px;
    color: var(--text-light);
}

.login-tabs {
    display: flex;
    background: var(--bg);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 16px;
}

.login-tab {
    flex: 1;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-light);
    border-radius: 7px;
    transition: all 0.25s;
}

.login-tab.active {
    background: white;
    color: var(--primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.form-field {
    position: relative;
    background: var(--bg);
    border-radius: 12px;
    padding: 12px 14px 12px 40px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.form-field:focus-within {
    border-color: var(--primary);
    background: white;
}

.field-icon {
    position: absolute;
    left: 12px;
    font-size: 18px;
    line-height: 1;
}

.form-field input {
    flex: 1;
    font-size: 14px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
}

.toggle-pwd {
    background: none;
    border: none;
    font-size: 16px;
    padding: 4px;
    opacity: 0.6;
}

.login-hint {
    min-height: 18px;
    font-size: 12px;
    color: var(--danger);
    margin-bottom: 8px;
    padding-left: 4px;
}

.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ff8a5d 0%, #ff6b35 100%);
    color: white;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.4);
    transition: all 0.2s;
    margin-bottom: 10px;
}

.login-btn:active {
    transform: scale(0.97);
}

.login-btn-secondary {
    width: 100%;
    padding: 11px;
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 22px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.login-btn-secondary:active {
    background: var(--bg);
}

.login-tip {
    background: var(--bg);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.7;
}

.login-tip p:first-child {
    color: var(--text);
    font-weight: 600;
    margin-bottom: 2px;
}

.login-tip strong {
    color: var(--primary);
}

/* 管理员标识 */
.admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffa502, #ff7e3e);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 6px;
    font-weight: 600;
    vertical-align: middle;
}

.user-badge {
    display: inline-block;
    background: var(--secondary);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: 6px;
    font-weight: 600;
    vertical-align: middle;
}

/* 用户管理列表 */
.user-list-row {
    background: var(--bg);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-list-row .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8a5d, #ff6b35);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-list-row .user-avatar.admin {
    background: linear-gradient(135deg, #ffa502, #ff7e3e);
}

.user-list-row .info {
    flex: 1;
    min-width: 0;
}

.user-list-row .name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
}

.user-list-row .meta {
    font-size: 11px;
    color: var(--text-light);
}

.user-list-row .actions {
    display: flex;
    gap: 4px;
}

/* 订单中的用户标识 */
.order-owner-tag {
    display: inline-block;
    background: var(--secondary);
    color: white;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 500;
}

.order-owner-tag.admin {
    background: linear-gradient(135deg, #ffa502, #ff7e3e);
}
