* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    font-size: 14px;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 顶部导航栏 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-circle {
    width: 40px;
    height: 40px;
    background: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
}

.logo-inner {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
}

.logo-circle::after {
    content: '';
    position: absolute;
    right: -2px;
    top: -2px;
    width: 16px;
    height: 16px;
    background: #20c997;
    border-radius: 50%;
    border: 2px solid #fff;
}

header h1 {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    position: relative;
}

.user-info-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e5e5e5;
}

.user-info-container:hover {
    background: #eeeeee;
    border-color: #ddd;
}

.user-avatar-box {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar-text {
    font-size: 14px;
    color: #333;
    font-weight: 400;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 150px;
    display: none;
    z-index: 1001;
    padding: 8px 0;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}

.user-dropdown-item:hover {
    background: #f5f5f5;
}

.user-dropdown-item:first-child {
    font-weight: 500;
    cursor: default;
}

.user-dropdown-item:first-child:hover {
    background: transparent;
}

.logout-item {
    color: #dc3545;
}

.logout-item:hover {
    background: #fff5f5;
    color: #c82333;
}

.user-dropdown-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 4px 0;
}

/* 左侧导航栏 */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 220px;
    height: calc(100vh - 60px);
    background: #fff;
    border-right: 1px solid #e5e5e5;
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin: 0;
}

.sidebar a {
    display: block;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.sidebar a:hover {
    background: #f8f9fa;
    color: #333;
}

.sidebar a.active {
    background: #f8f9fa;
    color: #333;
    border-left-color: #333;
    font-weight: 500;
}

/* 主内容区 */
.content {
    margin-left: 220px;
    margin-top: 60px;
    padding: 20px;
    width: calc(100% - 220px);
    min-height: calc(100vh - 60px);
}

.module {
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.module h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    font-weight: 500;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.toolbar button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #333;
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.toolbar button:hover {
    background: #555;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toolbar button:active {
    transform: translateY(0);
}

.toolbar input {
    padding: 9px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    width: 280px;
    background: #fff;
    transition: all 0.2s;
}

.toolbar input:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

.toolbar input::placeholder {
    color: #999;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    background: #fff;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
    font-size: 13px;
}

table th {
    background: #fafafa;
    font-weight: 500;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tr:hover {
    background: #fafafa;
}

table tr:last-child td {
    border-bottom: none;
}

/* 按钮样式 */
.btn-edit,
.btn-delete {
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
    transition: all 0.2s;
    background: #fff;
}

/* 操作按钮一行显示（用于话题管理等） */
.actions-inline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.actions-inline button {
    margin-right: 0; /* 由 gap 控制间距 */
}

.btn-edit {
    color: #28a745;
    border-color: #28a745;
    outline: none;
}

.btn-edit:hover {
    background: #28a745;
    color: white;
}

.btn-edit:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.btn-delete {
    color: #dc3545;
    border-color: #dc3545;
    outline: none;
}

.btn-delete:hover {
    background: #dc3545;
    color: white;
}

.btn-delete:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.btn-ship {
    padding: 4px 10px;
    border: 1px solid #28a745;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
    transition: all 0.2s;
    background: #fff;
    color: #28a745;
    outline: none;
}

.btn-ship:hover {
    background: #28a745;
    color: white;
}

.btn-ship:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2);
}

.btn-ship:active {
    transform: translateY(1px);
}

.btn-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    color: #0d6efd;
    border: 1px solid #0d6efd;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
    transition: all 0.2s;
    background: #f0f6ff;
    font-weight: 500;
    outline: none;
}

.btn-info:hover {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.btn-info:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.2);
}

/* 订单状态样式 */
.status-pending {
    background-color: #fff3e0;
    color: #f57c00;
}

.status-paid {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-shipped {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-completed {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.status-cancelled {
    background-color: #fce4ec;
    color: #c2185b;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    overflow: auto;
}

.modal-content {
    background-color: #fff;
    margin: 50px auto;
    padding: 24px;
    border-radius: 4px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.close {
    color: #999;
    float: right;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 400;
    color: #666;
    font-size: 13px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: #333;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.form-group input:required:invalid {
    border-color: #dc3545;
}

.form-group input:required:valid {
    border-color: #28a745;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.btn-submit,
.btn-cancel {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-submit {
    background: #333;
    color: white;
    border-color: #333;
}

.btn-submit:hover:not(:disabled) {
    background: #555;
    border-color: #555;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #666;
    border-color: #666;
}

.btn-cancel {
    background: #fff;
    color: #666;
}

.btn-cancel:hover {
    background: #f5f5f5;
    color: #333;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 400;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-inactive {
    background: #ffebee;
    color: #c62828;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    background: #f5f5f5;
    border-color: #999;
    color: #333;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination span {
    color: #666;
    font-size: 13px;
    padding: 0 10px;
}

/* 多图上传组件样式（统一） */
.multi-image-upload-group {
    margin-top: 8px;
}

.multi-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
}

.multi-image-item,
.multi-image-add {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e5e5;
}

.multi-image-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.multi-image-item.error {
    border-color: #ffcdd2;
    background: #fff5f5;
}

.multi-image-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 11px;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    cursor: pointer;
    line-height: 22px;
    font-size: 14px;
}

.multi-image-add {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
    background: #fff;
    color: #666;
    transition: all 0.2s;
}

.multi-image-add:hover {
    border-color: #999;
    color: #333;
}

.multi-image-add .add-plus {
    font-size: 26px;
    line-height: 1;
    margin-bottom: 4px;
}

.multi-image-add .add-text {
    font-size: 12px;
}

.multi-image-json {
    margin-top: 10px;
    width: 100%;
    min-height: 68px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    background: #fff;
    color: #333;
    resize: vertical;
}

.multi-image-json-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    gap: 10px;
}

.btn-json-apply {
    padding: 8px 12px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.btn-json-apply:hover {
    background: #555;
}

.multi-image-hint {
    color: #999;
    font-size: 12px;
}

/* 兼容旧按钮样式（若其他地方使用） */
.btn-upload {
    padding: 8px 16px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.btn-upload:hover {
    background: #555;
}

.btn-remove-image {
    padding: 8px 12px;
    background: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-remove-image:hover {
    background: #fff5f5;
    border-color: #c82333;
}

.upload-progress {
    margin-top: 8px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: #333;
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    font-size: 12px;
    color: #666;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.empty-hint {
    font-size: 13px;
    color: #999;
}

/* 滚动条样式 */
.sidebar::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.sidebar::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Login Center Styles */
.login-center-description {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.login-center-card {
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 0;
}

.login-center-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.login-center-row:last-child {
    border-bottom: none;
}

.login-center-left {
    flex: 1;
    padding-right: 20px;
}

.login-center-title {
    font-weight: 500;
    color: #333;
    font-size: 15px;
    margin-bottom: 4px;
}

.login-center-desc {
    font-size: 13px;
    color: #888;
}

.login-center-right {
    flex-shrink: 0;
}

.login-center-actions {
    padding: 20px;
    background-color: #fafafa;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-center-actions button {
    background: #333;
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.login-center-actions button:hover {
    background: #555;
}

.login-center-updated {
    font-size: 13px;
    color: #888;
}


/* Toggle Switch CSS */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #28a745; /* Green for enabled */
}

input:focus + .slider {
  box-shadow: 0 0 1px #28a745;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Topic Comments (Admin Modal) */
.topic-comments-list {
    max-height: 60vh;
    overflow: auto;
    padding-right: 4px;
}

.topic-comment-item {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fff;
}

.topic-comment-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.topic-comment-user {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

.topic-comment-time {
    color: #999;
    font-size: 12px;
}

.topic-comment-content {
    color: #333;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.topic-comment-actions button {
    margin-left: 6px;
}

.topic-comment-reply {
    margin-top: 10px;
    padding: 10px;
    border-left: 3px solid #333;
    background: #fafafa;
    border-radius: 4px;
}

.reply-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 600;
}

.reply-content {
    font-size: 13px;
    color: #333;
    white-space: pre-wrap;
}

.topic-comment-replybox {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px dashed #ddd;
}

.topic-comment-replybox textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    background: #fff;
}

.replybox-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

/* 物流信息显示样式 */
.shipping-info .info-value {
    padding: 8px 12px;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    min-height: 20px;
    line-height: 1.5;
}

/* 通知样式 */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    padding: 12px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    pointer-events: auto;
    min-width: 200px;
    max-width: 400px;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background: #28a745;
}

.notification-error {
    background: #dc3545;
}

.notification-info {
    background: #0d6efd;
}

.notification-warning {
    background: #ffc107;
    color: #333;
}

