/* ============================================
   全域获客工具箱 - 样式表
   工厂全域获客实战营 · 学员专用
   ============================================ */

/* ===== 重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a5fb4;
    --primary-light: #4a90d9;
    --primary-dark: #0d3f7a;
    --accent: #e8a317;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --text-white: #ffffff;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --radius-sm: 4px;
    --sidebar-width: 220px;
    --header-height: 60px;
}

body {
    font-family: "Microsoft YaHei", "Segoe UI", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
}

/* ===== 布局 ===== */
.app-container {
    display: flex;
    height: 100vh;
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

.sidebar-logo {
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-logo .logo-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.sidebar-logo .logo-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-logo .logo-subtitle {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}

.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.3);
    border-radius: 2px;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 20px 6px;
    opacity: 0.6;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 13px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: var(--accent);
    font-weight: 600;
}

.nav-item .nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 11px;
    opacity: 0.7;
    text-align: center;
}

/* ===== 主内容区 ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ===== 顶部栏 ===== */
.topbar {
    height: var(--header-height);
    background: var(--card-bg);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 50;
    flex-shrink: 0;
}

.topbar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.topbar-title .breadcrumb {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== 语言切换 ===== */
.lang-switch {
    display: flex;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.lang-switch button {
    border: none;
    background: transparent;
    padding: 4px 12px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 12px;
    color: var(--text-light);
    transition: all 0.2s;
}

.lang-switch button.active {
    background: var(--primary);
    color: white;
}

/* ===== 内容区域 ===== */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.content-area::-webkit-scrollbar {
    width: 6px;
}

.content-area::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* ===== 卡片 ===== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== 仪表盘 ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

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

.stat-card .stat-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.tool-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}

.tool-card .tool-icon {
    font-size: 40px;
    margin-bottom: 12px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
}

.tool-card .tool-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.tool-card .tool-desc {
    font-size: 12px;
    color: var(--text-light);
}

/* ===== 表单元素 ===== */
.form-group {
    margin-bottom: 14px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.form-label .required {
    color: var(--danger);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
    color: var(--text);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.1);
}

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

.form-input.small {
    padding: 6px 8px;
    font-size: 12px;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

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

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: var(--bg);
    border-color: var(--primary-light);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 8px;
}

/* ===== 表格 ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background: var(--bg);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

.data-table tr:hover {
    background: #f8f9fa;
}

.data-table .text-right {
    text-align: right;
}

.data-table .text-center {
    text-align: center;
}

.data-table input,
.data-table select {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 12px;
}

.data-table input:focus,
.data-table select:focus {
    outline: none;
    border-color: var(--primary-light);
}

/* ===== 标签/徽章 ===== */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* ===== 模态框 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: var(--bg);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ===== 提示/通知 ===== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 12px 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid var(--primary);
    min-width: 250px;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== 报价单打印样式 ===== */
.quote-document {
    background: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    font-size: 13px;
    line-height: 1.8;
    color: #333;
}

.quote-document .quote-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary);
}

.quote-document .company-info h2 {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 4px;
}

.quote-document .company-info p {
    font-size: 12px;
    color: #666;
    margin: 2px 0;
}

.quote-document .quote-meta {
    text-align: right;
}

.quote-document .quote-meta h3 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 8px;
}

.quote-document .quote-meta p {
    font-size: 12px;
    margin: 2px 0;
}

.quote-document .quote-parties {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.quote-document .party-block h4 {
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quote-document .party-block p {
    font-size: 12px;
    margin: 1px 0;
}

.quote-document table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.quote-document table th {
    background: var(--primary);
    color: white;
    padding: 10px 8px;
    font-size: 12px;
    text-align: left;
    font-weight: 600;
}

.quote-document table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    font-size: 12px;
}

.quote-document table tr:nth-child(even) {
    background: #f8f9fa;
}

.quote-document .quote-totals {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.quote-document .totals-table {
    width: 300px;
}

.quote-document .totals-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #ddd;
    font-size: 12px;
}

.quote-document .totals-table .total-row {
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 14px;
}

.quote-document .quote-terms {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.quote-document .quote-terms h4 {
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--primary);
}

.quote-document .quote-terms p {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
}

.quote-document .quote-signature {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 40px;
}

.quote-document .signature-block {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-height: 140px;
}

.quote-document .signature-block .stamp-img {
    max-width: 120px;
    max-height: 120px;
    opacity: 0.85;
    margin-bottom: 4px;
    object-fit: contain;
}

.quote-document .signature-block .sig-line {
    border-top: 1px solid #333;
    width: 200px;
    padding-top: 4px;
    font-size: 11px;
    color: #666;
}

/* ===== 报价单模板样式 ===== */

/* 现代简约模板 */
.quote-tpl-modern .quote-header {
    border-bottom: 2px solid #ecf0f1;
    border-left: 4px solid var(--primary);
    padding-left: 16px;
}
.quote-tpl-modern .company-info h2 {
    color: var(--text);
    font-weight: 300;
    letter-spacing: 1px;
}
.quote-tpl-modern table th {
    background: #ecf0f1;
    color: var(--text);
    font-weight: 600;
    border-radius: 4px;
}
.quote-tpl-modern .totals-table .total-row {
    background: #ecf0f1;
    color: var(--text);
    font-weight: 700;
}
.quote-tpl-modern .quote-terms h4 {
    color: var(--text);
    text-transform: none;
}

/* 极简黑白模板 */
.quote-tpl-minimal .quote-header {
    border-bottom: 1px solid #333;
}
.quote-tpl-minimal .company-info h2 {
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: 2px;
}
.quote-tpl-minimal .quote-meta h3 {
    color: #1a1a1a;
    font-weight: 700;
    letter-spacing: 3px;
}
.quote-tpl-minimal table th {
    background: #1a1a1a;
    color: white;
    font-weight: 600;
}
.quote-tpl-minimal table td {
    border-bottom: 1px solid #eee;
}
.quote-tpl-minimal .totals-table .total-row {
    background: #1a1a1a;
    color: white;
}
.quote-tpl-minimal .quote-terms h4 {
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.quote-tpl-minimal .party-block h4 {
    color: #1a1a1a;
}

/* 商务深色模板 */
.quote-tpl-dark {
    background: #fafafa;
}
.quote-tpl-dark .quote-header {
    border-bottom: 3px solid #2c3e50;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    padding: 20px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 20px;
}
.quote-tpl-dark .quote-header .company-info h2 {
    color: #f1c40f;
}
.quote-tpl-dark .quote-header .company-info p {
    color: #bdc3c7;
}
.quote-tpl-dark .quote-header .quote-meta h3 {
    color: white;
}
.quote-tpl-dark .quote-header .quote-meta p {
    color: #bdc3c7;
}
.quote-tpl-dark .quote-header .quote-meta strong {
    color: #f1c40f;
}
.quote-tpl-dark table th {
    background: #2c3e50;
    color: #f1c40f;
}
.quote-tpl-dark .totals-table .total-row {
    background: #2c3e50;
    color: #f1c40f;
}
.quote-tpl-dark .quote-terms h4 {
    color: #2c3e50;
}
.quote-tpl-dark .party-block h4 {
    color: #2c3e50;
}
.quote-tpl-dark .signature-block .sig-line {
    border-top: 2px solid #2c3e50;
}

/* ===== 打印 ===== */
@media print {
    body * {
        visibility: hidden;
    }

    .print-area,
    .print-area * {
        visibility: visible;
    }

    .print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .no-print {
        display: none !important;
    }

    .quote-document {
        box-shadow: none;
        padding: 20px;
    }
}

/* ===== 工具类 ===== */
.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}

.gap-16 {
    gap: 16px;
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

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

.text-warning {
    color: var(--warning);
}

.text-light {
    color: var(--text-light);
}

.font-bold {
    font-weight: 700;
}

.font-lg {
    font-size: 18px;
}

.font-xl {
    font-size: 24px;
}

.font-sm {
    font-size: 12px;
}

.font-xs {
    font-size: 11px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.empty-state .empty-text {
    font-size: 14px;
}

/* ===== 计算器结果展示 ===== */
.calc-result {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    margin-top: 16px;
}

.calc-result .result-label {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.calc-result .result-value {
    font-size: 32px;
    font-weight: 700;
}

.calc-result .result-unit {
    font-size: 14px;
    opacity: 0.8;
}

/* ===== 日历 ===== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-top: 12px;
}

.calendar-header {
    text-align: center;
    font-weight: 600;
    padding: 8px 4px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.calendar-day {
    min-height: 80px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-day:hover {
    border-color: var(--primary-light);
    background: #f8f9fa;
}

.calendar-day.has-event {
    background: #e3f2fd;
    border-color: var(--primary-light);
}

.calendar-day .day-number {
    font-weight: 600;
    color: var(--text);
}

.calendar-day .day-events {
    margin-top: 4px;
}

.calendar-day .day-event {
    background: var(--primary);
    color: white;
    padding: 1px 4px;
    border-radius: 2px;
    font-size: 10px;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== 图片上传组件 ===== */
.img-upload-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.img-upload-preview {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg);
    position: relative;
}

.img-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

.img-upload-preview.has-image {
    border-style: solid;
    border-color: var(--success);
}

.logo-upload-preview {
    width: 200px;
    height: 80px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-image: 
        linear-gradient(45deg, #e8e8e8 25%, transparent 25%),
        linear-gradient(-45deg, #e8e8e8 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e8e8e8 75%),
        linear-gradient(-45deg, transparent 75%, #e8e8e8 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: #fafafa;
    position: relative;
    flex-shrink: 0;
}

.logo-upload-preview.has-image {
    border-style: solid;
    border-color: var(--success);
}

.stamp-upload-preview {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-image: 
        linear-gradient(45deg, #e8e8e8 25%, transparent 25%),
        linear-gradient(-45deg, #e8e8e8 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e8e8e8 75%),
        linear-gradient(-45deg, transparent 75%, #e8e8e8 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: #fafafa;
    position: relative;
    flex-shrink: 0;
}

.stamp-upload-preview.has-image {
    border-style: solid;
    border-color: var(--danger);
}

.img-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.img-upload-btn:hover {
    background: var(--primary-dark);
}

.img-upload-btn input[type="file"] {
    display: none;
}

.img-upload-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.img-upload-cell .img-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
    cursor: pointer;
}

.img-upload-cell .img-thumb-placeholder {
    width: 50px;
    height: 50px;
    border: 1px dashed var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-light);
    cursor: pointer;
}

.img-upload-cell .img-upload-btn-sm {
    font-size: 11px;
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}

.img-upload-cell .img-upload-btn-sm input[type="file"] {
    display: none;
}

.product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* ===== 主题切换器 ===== */
.theme-switcher {
    position: relative;
}

.theme-btn {
    border: none;
    background: var(--bg);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.theme-btn:hover {
    background: var(--primary-light);
    transform: scale(1.1);
}

.theme-menu {
    position: absolute;
    top: 44px;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 200;
    overflow: hidden;
}

.theme-menu-title {
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text);
    transition: background 0.2s;
}

.theme-option:hover {
    background: var(--bg);
}

.theme-option.active {
    background: var(--bg);
    font-weight: 600;
    color: var(--primary);
}

.theme-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar-logo .logo-title,
    .sidebar-logo .logo-subtitle,
    .nav-item span:not(.nav-icon),
    .nav-section-title,
    .sidebar-footer {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 12px;
    }

    .form-row {
        flex-direction: column;
    }
}

/* ===== AI提示词模板 ===== */
.prompt-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.prompt-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
    background: var(--card-bg);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
}

.prompt-tab:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.prompt-tab.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
}

.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.prompt-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.prompt-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.prompt-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.prompt-card-desc {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
    flex: 1;
}

.prompt-card-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
}

/* 提示词详情弹窗 */
.prompt-detail-header {
    margin-bottom: 12px;
}

.prompt-detail-meta {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.prompt-text-area {
    background: #1e1e1e;
    border-radius: var(--radius);
    overflow: hidden;
}

.prompt-text-label {
    background: #2d2d2d;
    color: #888;
    font-size: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid #444;
}

.prompt-text {
    color: #e0e0e0;
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 13px;
    line-height: 1.8;
    padding: 16px;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    margin: 0;
}

.prompt-text::-webkit-scrollbar {
    width: 6px;
}

.prompt-text::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

/* ===== 实用工具链接 ===== */
.tool-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.tool-link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
    background: var(--card-bg);
    position: relative;
}

.tool-link-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    background: #f8fbff;
}

.tool-link-card:visited {
    color: var(--text);
}

.tool-link-icon {
    font-size: 28px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bg), #e8eef5);
    flex-shrink: 0;
}

.tool-link-info {
    flex: 1;
    min-width: 0;
}

.tool-link-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.tool-link-desc {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-link-arrow {
    font-size: 18px;
    color: var(--text-light);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.tool-link-card:hover .tool-link-arrow {
    color: var(--primary);
    transform: translate(2px, -2px);
}

/* ===== 外贸术语模块 ===== */
.term-cat-tab {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg);
    color: var(--text-light);
    border: 1px solid var(--border);
    transition: all 0.2s;
    user-select: none;
}

.term-cat-tab:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

.term-cat-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.term-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.term-card {
    background: var(--bg);
    border-radius: 8px;
    padding: 14px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.term-card:hover {
    background: var(--card-bg);
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.term-card-abbr {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
}

.term-card-en {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.term-card-cn {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.term-card-desc {
    font-size: 11px;
    color: var(--text-light);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ===== 动画 ===== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== 更新通知横幅 ===== */
@keyframes updateBannerSlide {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.update-banner {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 12px 20px;
    animation: updateBannerSlide 0.4s ease;
}

.update-banner-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

.update-banner-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.update-banner-content {
    flex: 1;
    min-width: 0;
}

.update-banner-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

.update-banner-desc {
    font-size: 12px;
    opacity: 0.9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.update-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.update-banner-actions .btn {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
}

.update-banner-actions .btn:hover {
    background: rgba(255,255,255,0.35) !important;
}

.update-banner-actions .btn-outline {
    background: transparent !important;
}
