/* SMART 分析工具面板 */
.smart-tool-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 0;
}

.smart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-muted, #f9fafb);
    flex-shrink: 0;
}

.smart-toolbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.smart-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.smart-title i { color: #ec4899; }

.smart-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(236, 72, 153, 0.1);
    color: #db2777;
}

.smart-toolbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.smart-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.smart-btn:hover {
    border-color: #ec4899;
    color: #db2777;
}

.smart-btn-primary {
    background: linear-gradient(135deg, #ec4899, #f472b6);
    border-color: transparent;
    color: #fff !important;
}

.smart-btn-primary:hover {
    opacity: 0.88;
    border-color: transparent !important;
}

.smart-canvas-wrap {
    flex: 1;
    overflow: auto;
    padding: 16px;
    background-color: #eef1f5;
    background-image: radial-gradient(circle, #c5cdd8 1px, transparent 1px);
    background-size: 18px 18px;
    min-height: 520px;
}

.smart-board {
    max-width: 1280px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    padding: 24px 18px 20px;
    min-width: 980px;
}

.smart-map-header {
    margin-bottom: 18px;
    padding: 0 4px;
}

.smart-map-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    outline: none;
    line-height: 1.3;
}

.smart-map-subtitle {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: #64748b;
    outline: none;
}

.smart-map-title:focus,
.smart-map-subtitle:focus,
.smart-col-name:focus,
.smart-col-desc:focus {
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.35);
    border-radius: 4px;
}

/* 五列布局 */
.smart-columns {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.smart-col {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

/* 彩色表头 */
.smart-col-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 10px;
    color: #fff;
    flex-shrink: 0;
}

.smart-head-letter {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.95;
}

.smart-head-pink   { background: #ec4899; }
.smart-head-yellow { background: #eab308; }
.smart-head-blue   { background: #2563eb; }
.smart-head-purple { background: #7c3aed; }
.smart-head-orange { background: #f97316; }

.smart-col-titles {
    flex: 1;
    min-width: 0;
}

.smart-col-name {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    outline: none;
    line-height: 1.35;
}

.smart-col-desc {
    margin: 3px 0 0;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.4;
    outline: none;
}

/* 列主体 + 水印字母 */
.smart-col-body {
    position: relative;
    flex: 1;
    padding: 14px 10px 36px;
    min-height: 0;
    overflow: hidden;
}

.smart-col-s .smart-col-body { background: linear-gradient(180deg, #fdf2f8 0%, #fce7f3 100%); }
.smart-col-m .smart-col-body { background: linear-gradient(180deg, #fefce8 0%, #fef9c3 100%); }
.smart-col-a .smart-col-body { background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%); }
.smart-col-r .smart-col-body { background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%); }
.smart-col-t .smart-col-body { background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%); }

.smart-watermark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 7rem;
    font-weight: 900;
    line-height: 1;
    opacity: 0.12;
    user-select: none;
    pointer-events: none;
    z-index: 0;
}

.smart-watermark-s { color: #ec4899; }
.smart-watermark-m { color: #ca8a04; }
.smart-watermark-a { color: #2563eb; }
.smart-watermark-r { color: #7c3aed; }
.smart-watermark-t { color: #ea580c; }

/* 便签 */
.smart-stickies {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.smart-sticky {
    padding: 10px 11px;
    font-size: 0.74rem;
    line-height: 1.5;
    color: #1e293b;
    border-radius: 4px;
    outline: none;
    cursor: text;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
    transform: rotate(-0.8deg);
    transition: transform 0.15s, box-shadow 0.15s;
}

.smart-sticky:nth-child(even) {
    transform: rotate(0.6deg);
}

.smart-sticky:nth-child(3) {
    transform: rotate(-0.4deg);
}

.smart-sticky:focus {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
    z-index: 2;
}

.smart-sticky-yellow { background: #fef08a; border: 1px solid #fde047; }
.smart-sticky-blue   { background: #bae6fd; border: 1px solid #7dd3fc; }
.smart-sticky-pink   { background: #fbcfe8; border: 1px solid #f9a8d4; }
.smart-sticky-green  { background: #bbf7d0; border: 1px solid #86efac; }
.smart-sticky-orange { background: #fed7aa; border: 1px solid #fdba74; }

.smart-sticky:empty::before {
    content: '点击输入…';
    color: #94a3b8;
}

.smart-btn-add {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px dashed #cbd5e1;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    color: #64748b;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.45;
    transition: opacity 0.15s;
    z-index: 2;
}

.smart-col:hover .smart-btn-add { opacity: 1; }

.smart-btn-add:hover {
    border-color: #ec4899;
    color: #db2777;
}
@media (max-width: 1100px) {
    .smart-board {
        min-width: 900px;
    }

    .smart-columns {
        gap: 8px;
    }

    .smart-watermark {
        font-size: 5.5rem;
    }
}
