/* ===== 网信云会员管理系统 - 全局样式 ===== */

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1890ff;
    --primary-dark: #096dd9;
    --primary-light: #e6f7ff;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #ff4d4f;
    --info: #13c2c2;
    --purple: #722ed1;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #999;
    --bg-page: #f0f2f5;
    --bg-card: #fff;
    --bg-sidebar: #001529;
    --bg-sidebar-hover: #000c17;
    --bg-sidebar-active: #1890ff;
    --border-color: #e8e8e8;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --radius: 6px;
    --radius-lg: 12px;
    --sidebar-width: 220px;
    --topbar-height: 56px;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-page);
    line-height: 1.6;
}

a { text-decoration: none; color: var(--primary); }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; font-size: 14px; outline: none; }

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: loginBg 20s linear infinite;
}

@keyframes loginBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 900px;
    max-width: 95%;
    min-height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    overflow: hidden;
}

.login-left {
    flex: 1;
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    color: #fff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-left .logo {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
}

.login-left .slogan {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.8;
}

.login-left .features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-left .feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    opacity: 0.95;
}

.login-left .feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.login-right {
    width: 400px;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-right h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 32px;
    text-align: center;
}

.login-form-group {
    margin-bottom: 20px;
}

.login-form-group label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap .input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #bbb;
}

.login-input {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 40px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 14px;
}

.login-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(24,144,255,0.2);
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.login-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    cursor: pointer;
}

.login-options a {
    color: var(--primary);
}

.login-btn {
    width: 100%;
    height: 42px;
    background: var(--primary);
    color: #fff;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    letter-spacing: 4px;
}

.login-btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(24,144,255,0.4);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: #999;
}

.login-footer a {
    color: var(--primary);
    margin-left: 8px;
}

.login-code-row {
    display: flex;
    gap: 12px;
}

.login-code-row .login-input {
    flex: 1;
}

.login-code-btn {
    width: 120px;
    height: 42px;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    transition: all 0.3s;
}

.login-code-btn:hover {
    background: var(--primary-light);
}

.login-code-btn:disabled {
    border-color: #d9d9d9;
    color: #999;
    background: #f5f5f5;
    cursor: not-allowed;
}

.login-tabs {
    display: flex;
    margin-bottom: 32px;
    border-bottom: 2px solid #f0f0f0;
}

.login-tab {
    flex: 1;
    text-align: center;
    padding-bottom: 12px;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.login-tab.active {
    color: var(--primary);
    font-weight: 600;
}

.login-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20%;
    right: 20%;
    height: 2px;
    background: var(--primary);
}

.login-agreement {
    margin-bottom: 20px;
    font-size: 13px;
    color: #666;
}

.login-agreement input {
    margin-right: 6px;
}

/* ===== Main Layout ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: rgba(255,255,255,0.85);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width 0.3s;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 64px;
}

.sidebar-logo {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 10px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
}

.sidebar-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-logo .logo-text {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

.nav-group {
    margin-bottom: 2px;
}

.nav-group-header {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    user-select: none;
}

.nav-group-header:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}

.nav-group-arrow {
    display: inline-block;
    width: 14px;
    font-size: 10px;
    transition: transform 0.25s ease;
    color: rgba(255,255,255,0.4);
}

.nav-group-header.expanded .nav-group-arrow {
    transform: rotate(90deg);
}

.nav-group-header .nav-group-title {
    padding: 0;
    font-size: 13px;
    color: inherit;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 500;
}

.sidebar.collapsed .nav-group-header {
    justify-content: center;
    padding: 10px 0;
}

.sidebar.collapsed .nav-group-title {
    display: none;
}

.sidebar.collapsed .nav-group-arrow {
    display: none;
}

.sidebar.collapsed .nav-group-items {
    display: none !important;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 44px;
    gap: 12px;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: #fff;
}

.nav-item.active {
    background: var(--bg-sidebar-active);
    color: #fff;
}

.nav-item .nav-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item .nav-text {
    font-size: 14px;
    flex: 1;
}

.sidebar.collapsed .nav-text {
    display: none;
}

.nav-item .nav-badge {
    font-size: 10px;
    background: var(--danger);
    color: #fff;
    padding: 1px 6px;
    border-radius: 10px;
}

.sidebar.collapsed .nav-badge {
    display: none;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 99;
    gap: 16px;
}

.topbar-toggle {
    font-size: 20px;
    color: #666;
    cursor: pointer;
    width: 32px;
    text-align: center;
}

.topbar-breadcrumb {
    font-size: 14px;
    color: #666;
    flex: 1;
}

.topbar-breadcrumb span {
    color: var(--text-primary);
    font-weight: 500;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-search {
    position: relative;
}

.topbar-search input {
    width: 200px;
    height: 32px;
    padding: 0 12px 0 32px;
    border: 1px solid #d9d9d9;
    border-radius: 16px;
    font-size: 13px;
    transition: all 0.3s;
}

.topbar-search input:focus {
    border-color: var(--primary);
    width: 260px;
}

.topbar-search .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #bbb;
}

.topbar-icon-btn {
    font-size: 18px;
    color: #666;
    cursor: pointer;
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.topbar-icon-btn:hover {
    background: #f5f5f5;
}

.topbar-icon-btn .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 20px;
    transition: background 0.2s;
}

.topbar-user:hover {
    background: #f5f5f5;
}

.topbar-user .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
}

.topbar-user .username {
    font-size: 13px;
    color: #333;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px 24px;
    transition: margin 0.3s;
    min-width: 0;
}

.app-layout.sidebar-collapsed .main-content {
    margin-left: 64px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.page-subtitle {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* ===== Components ===== */

/* Card */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    transition: all 0.3s;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #333;
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #389e0d;
    border-color: #389e0d;
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #d9363e;
    border-color: #d9363e;
    color: #fff;
}

.btn-warning {
    background: var(--warning);
    border-color: var(--warning);
    color: #fff;
}

.btn-text {
    border: none;
    background: transparent;
    color: var(--primary);
    padding: 4px 8px;
}

.btn-text:hover {
    background: var(--primary-light);
}

.btn-text.danger {
    color: var(--danger);
}

.btn-text.danger:hover {
    background: #fff1f0;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 10px 24px;
    font-size: 15px;
}

.btn-group {
    display: flex;
    gap: 8px;
}

/* Form */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    flex: 1;
}

.form-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--danger);
    margin-right: 2px;
}

/* 会员运营操作弹窗专用样式 */
.recharge-member-bar {
    background: #f5f7fa;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}
.pay-method-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.pay-opt {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 10px 4px;
    text-align: center;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.pay-opt:hover { border-color: var(--primary); }
.pay-opt.active {
    border-color: var(--primary);
    background: #e6f7ff;
    color: var(--primary);
    font-weight: 600;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #d9d9d9;
    border-radius: var(--radius);
    font-size: 14px;
    transition: all 0.3s;
    background: #fff;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(24,144,255,0.15);
}

.form-textarea {
    height: auto;
    padding: 8px 12px;
    min-height: 80px;
    resize: vertical;
}

/* Table */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

table.data-table th {
    background: #fafafa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

table.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

table.data-table tbody tr:hover {
    background: #fafafa;
}

table.data-table .table-actions {
    display: flex;
    gap: 4px;
}

/* Tags / Badges */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
}

.tag-blue { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.tag-green { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.tag-orange { background: #fff7e6; color: #fa8c16; border: 1px solid #ffd591; }
.tag-red { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.tag-purple { background: #f9f0ff; color: #722ed1; border: 1px solid #d3adf7; }
.tag-gray { background: #fafafa; color: #666; border: 1px solid #d9d9d9; }

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    flex-shrink: 0;
}

.stat-icon.blue { background: linear-gradient(135deg, #1890ff, #096dd9); }
.stat-icon.green { background: linear-gradient(135deg, #52c41a, #389e0d); }
.stat-icon.orange { background: linear-gradient(135deg, #fa8c16, #d4380d); }
.stat-icon.purple { background: linear-gradient(135deg, #722ed1, #531dab); }
.stat-icon.cyan { background: linear-gradient(135deg, #13c2c2, #08979c); }
.stat-icon.red { background: linear-gradient(135deg, #ff4d4f, #cf1322); }

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.stat-change {
    font-size: 12px;
    margin-top: 4px;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* Search Bar */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.search-bar .form-input,
.search-bar .form-select {
    width: auto;
    min-width: 160px;
}

.search-bar .form-input {
    flex: 1;
    max-width: 300px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin-top: 20px;
    font-size: 13px;
}

.pagination button {
    min-width: 32px;
    height: 32px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    color: #555;
    padding: 0 8px;
    font-size: 13px;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination button:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.pagination .page-info {
    margin: 0 12px;
    color: #666;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 8px;
    width: 560px;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.3s;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    font-size: 20px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 12px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.tab-item {
    padding: 10px 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.tab-item:hover {
    color: var(--primary);
}

.tab-item.active {
    color: var(--primary);
    font-weight: 600;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Charts */
.chart-container {
    position: relative;
    width: 100%;
}

/* Grid Layout */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Cashier Layout */
.cashier-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
    height: calc(100vh - var(--topbar-height) - 160px);
    min-height: 380px;
}

.cashier-products {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cashier-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.cashier-cat-btn {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid #d9d9d9;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.cashier-cat-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.cashier-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    overflow-y: auto;
    flex: 1;
    padding-right: 8px;
    align-content: start;
}

.cashier-product-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-height: 110px;
    max-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cashier-product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(24,144,255,0.15);
    transform: translateY(-2px);
}

.cashier-product-card.flash {
    background: #e6f7ff;
    border-color: var(--primary);
    transform: scale(0.95);
    transition: all 0.15s;
}

.cashier-product-card .product-img {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: #f5f7fa;
}

.cashier-product-card .product-name {
    font-size: 13px;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cashier-product-card .product-price {
    font-size: 14px;
    color: var(--danger);
    font-weight: 600;
}

.cashier-cart {
    background: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.cashier-cart-header {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cashier-cart-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.cashier-cart-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    gap: 12px;
    border-bottom: 1px solid #f5f5f5;
}

.cashier-cart-item .cart-item-info {
    flex: 1;
    min-width: 0;
}

.cashier-cart-item .cart-item-name {
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cashier-cart-item .cart-item-price {
    font-size: 12px;
    color: #999;
}

.cashier-cart-item .cart-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cashier-cart-item .qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cashier-cart-item .qty-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cashier-cart-item .qty-value {
    min-width: 30px;
    text-align: center;
    font-size: 14px;
}

.cashier-cart-item .cart-item-total {
    font-size: 14px;
    color: var(--danger);
    font-weight: 600;
    min-width: 60px;
    text-align: right;
}

.cashier-cart-item .cart-item-del {
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
}

.cashier-cart-item .cart-item-del:hover {
    color: var(--danger);
}

.cashier-cart-footer {
    border-top: 1px solid #f0f0f0;
    padding: 12px 16px;
}

.cashier-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 13px;
    color: #666;
}

.cashier-total-row.grand-total {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed #f0f0f0;
}

.cashier-total-row .amount {
    color: var(--danger);
    font-size: 22px;
    font-weight: 700;
}

.cashier-pay-btn {
    width: 100%;
    height: 42px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s;
}

.cashier-pay-btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(24,144,255,0.4);
}

.cashier-pay-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Member select in cashier */
.cashier-member-bar {
    background: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
}

.cashier-member-bar .member-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.cashier-member-bar .member-info {
    flex: 1;
}

.cashier-member-bar .member-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.cashier-member-bar .member-detail {
    font-size: 12px;
    color: #999;
}

/* 收银台刷卡输入框 */
.cashier-card-input {
    width: 220px;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.cashier-card-input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.15);
}

/* Payment Methods Grid */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 10px 0;
}

.payment-method {
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-method:hover {
    border-color: var(--primary);
}

.payment-method.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.payment-method .pay-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.payment-method .pay-name {
    font-size: 12px;
    color: #333;
}

/* Progress */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar .progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #f0f0f0;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--primary);
}

.timeline-time {
    font-size: 12px;
    color: #999;
}

.timeline-content {
    font-size: 13px;
    color: #333;
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 16px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .cashier-layout { grid-template-columns: 1fr; height: auto; }
    .login-container { flex-direction: column; }
    .login-left { display: none; }
    .login-right { width: 100%; }
}

/* 加载动画 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== 会员刷卡页面 ===== */
.member-card-page {
    padding: 0;
}

/* 搜索区 */
.member-card-search {
    background: #fff;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.member-card-search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
}
.member-card-search-input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
}
.member-card-search-input:focus { border-color: #1890ff; }
.btn-search {
    padding: 8px 20px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.btn-search:hover { background: #40a9ff; }

/* 顶部按钮区 */
.member-card-actions {
    background: #fff;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.member-card-actions .action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.member-card-actions .action-row:last-child { margin-bottom: 0; }
.action-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: #fff;
    transition: opacity .2s;
}
.action-btn:hover { opacity: 0.85; }
.action-btn.green { background: #52c41a; }
.action-btn.blue { background: #1890ff; }
.action-btn.red { background: #f5222d; }
.action-btn.gray { background: #8c8c8c; }
.action-btn.orange { background: #fa8c16; }
.action-btn:disabled,
.action-btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.45);
}
.action-btn:disabled:hover,
.action-btn.disabled:hover {
    opacity: 0.45;
}

/* 子标签页 */
.member-card-tabs {
    background: #fff;
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    padding: 0 12px;
    overflow-x: auto;
}
.member-card-tab {
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #595959;
    border-bottom: 2px solid transparent;
    transition: all .2s;
    white-space: nowrap;
}
.member-card-tab:hover { color: #fa8c16; }
.member-card-tab.active {
    color: #fa8c16;
    border-bottom-color: #fa8c16;
    font-weight: 500;
}

/* Tab内容区 */
.member-card-tab-content {
    background: #fff;
    padding: 20px;
    min-height: 400px;
}

/* 空状态 */
.card-empty {
    text-align: center;
    padding: 80px 20px;
    color: #8c8c8c;
}
.card-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}
.card-empty-text {
    font-size: 14px;
}
.card-empty-hint {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}
.card-empty.no-member {
    background: #fafafa;
    border: 1px dashed #e0e0e0;
    border-radius: 8px;
}

/* 会员信息区块 */
.card-info-section {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
}
.card-info-header {
    background: #f6ffed;
    border-bottom: 1px solid #b7eb8f;
    padding: 8px 16px;
    color: #52c41a;
    font-size: 14px;
    font-weight: 500;
}
.card-info-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
}
.card-info-body.with-photo {
    grid-template-columns: 1fr 220px;
}
.card-info-fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.card-info-fields .form-row {
    display: grid;
    grid-template-columns: 110px 1fr 110px 1fr;
    gap: 8px 12px;
    align-items: center;
    font-size: 14px;
}
.card-info-fields .form-row.single {
    grid-template-columns: 110px 1fr;
}
.card-info-fields .form-label {
    color: #595959;
    text-align: right;
}
.card-info-fields .form-value {
    color: #262626;
    background: #fafafa;
    padding: 6px 10px;
    border-radius: 3px;
    min-height: 18px;
}
.card-info-fields .form-value.textarea-value {
    background: transparent;
    padding: 0;
    min-height: 60px;
}
.form-link {
    color: #1890ff;
    text-decoration: none;
}
.form-link:hover { text-decoration: underline; }

/* 卡片表格 */
.card-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.card-table thead {
    background: #fafafa;
}
.card-table th {
    padding: 10px;
    text-align: left;
    color: #595959;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 500;
}
.card-table td {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    color: #262626;
}
.card-table tbody tr:hover {
    background: #fafafa;
}
.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.status-tag.active {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}
.status-tag.inactive {
    background: #f5f5f5;
    color: #8c8c8c;
    border: 1px solid #d9d9d9;
}

/* 响应式 */
@media (max-width: 992px) {
    .card-info-body {
        grid-template-columns: 1fr;
    }
    .card-info-fields .form-row {
        grid-template-columns: 90px 1fr;
    }
    .card-info-fields .form-row > .form-label:nth-child(3),
    .card-info-fields .form-row > .form-value:nth-child(4) {
        display: none;
    }
}

/* ===== 微信自定义菜单 - 手机预览 ===== */
.wx-phone {
    width: 300px;
    background: #1c1c1e;
    border-radius: 36px;
    padding: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    position: relative;
}
.wx-phone-notch {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 22px;
    background: #1c1c1e;
    border-radius: 0 0 14px 14px;
    z-index: 3;
}
.wx-phone-bar {
    height: 44px;
    background: #ededed;
    border-radius: 28px 28px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    font-size: 15px;
    color: #333;
    position: relative;
}
.wx-phone-back, .wx-phone-more { font-size: 20px; color: #07c160; width: 20px; }
.wx-phone-title { font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-phone-screen {
    background: #ededed;
    height: 420px;
    padding: 16px;
    overflow-y: auto;
}
.wx-phone-msg {
    background: #fff;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: #333;
    line-height: 1.6;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    display: inline-block;
    max-width: 90%;
}
.wx-phone-menu {
    background: #f7f7f7;
    border-top: 1px solid #d9d9d9;
    border-radius: 0 0 28px 28px;
    display: flex;
    height: 50px;
}
.wx-ph-cell {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #d9d9d9;
    cursor: pointer;
}
.wx-ph-cell:last-child { border-right: none; }
.wx-ph-cell-on { background: #ececec; }
.wx-ph-l1 {
    font-size: 13px;
    color: #07c160;
    text-align: center;
    padding: 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wx-ph-pop {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #f7f7f7;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.12);
    overflow: hidden;
    z-index: 5;
}
.wx-ph-sub {
    font-size: 13px;
    color: #07c160;
    text-align: center;
    padding: 10px 6px;
    border-bottom: 1px solid #e3e3e3;
    cursor: pointer;
}
.wx-ph-sub:last-child { border-bottom: none; }
.wx-ph-sub:hover { background: #ececec; }
.wx-ph-sub-head {
    color: #999;
    font-weight: 600;
    background: #f0f0f0;
}
.wx-ph-cell-on {
    background: #e0f7e9;
}
.wx-ph-cell-on .wx-ph-l1 {
    color: #07c160;
    font-weight: 600;
}
.wx-ph-sub-on {
    background: #e0f7e9 !important;
    color: #07c160 !important;
    font-weight: 600;
}
.wx-ph-add {
    width: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #999;
    border-left: 1px solid #d9d9d9;
    cursor: pointer;
    background: #f7f7f7;
    border-radius: 0 0 28px 0;
}
.wx-ph-add:hover { background: #ececec; }
.wx-menu-types {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}
.wx-menu-type {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
}
.wx-menu-type input {
    width: 14px;
    height: 14px;
    cursor: pointer;
}
.wx-emoji-pop {
    display: none;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
    padding: 10px;
    margin-top: 8px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    max-width: 320px;
}
.wx-emoji-pop span {
    font-size: 20px;
    text-align: center;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}
.wx-emoji-pop span:hover { background: #f0f0f0; }
