:root {
    --iro-bg: #ffffff;
    --iro-surface: #ffffff;
    --iro-border: #eeeeee;
    --iro-text: #1a1a1a;
    --iro-muted: #666666;
    --iro-soft: #999999;
    --iro-mall: #f05a25;
    --iro-mall-light: #fff5f0;
    --iro-mall-border: #f5d4c4;
    --iro-lp: #f05a25;
    --iro-lp-light: #fff5f0;
    --iro-lp-border: #f5d4c4;
    --iro-radius: 14px;
    --iro-radius-sm: 10px;
    --iro-accent: #f05a25;
    --iro-danger: #e53935;
    --iro-success: #2e7d32;
}

#panel-organize .webox-organize {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.container-narrow { max-width: 480px; }

/* 顶栏 */
.iro-header, .header {
    background: var(--iro-surface);
    padding: 12px 16px;
    border-bottom: 1px solid var(--iro-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
.iro-header h1, .header h1 { font-size: 18px; color: var(--iro-text); margin: 0; font-weight: 700; }
.iro-header h1 a, .header h1 a { color: inherit; text-decoration: none; }
.iro-header .header-left, .header .header-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.iro-header .header-nav a, .header .header-nav a {
    color: var(--iro-accent);
    text-decoration: none;
    margin-right: 12px;
    font-size: 14px;
    font-weight: 500;
}
.iro-header .header-nav a.nav-lp, .header .header-nav a.nav-lp { color: #7c3aed; }
.iro-header .header-nav a.active, .header .header-nav a.active { font-weight: 700; color: var(--iro-mall); }
.iro-header .header-nav a.nav-lp.active, .header .header-nav a.nav-lp.active { color: var(--iro-lp); }
.iro-header .header-actions, .header .header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.iro-header .header-user-info, .header .header-user-info {
    color: var(--iro-muted);
    font-size: 13px;
    max-width: 36vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.header-actions a { font-size: 14px; text-decoration: none; }
.header-actions a[href*="profile"] { color: var(--iro-accent); }
.header-actions a[onclick*="Logout"], .header-actions a[href*="logout"] { color: var(--iro-danger); }

/* 面板 / 卡片 */
.iro-panel,
.index-module,
.index-activity-section {
    margin-top: 16px;
    padding: 18px 16px 20px;
    background: var(--iro-surface);
    border: 1px solid var(--iro-border);
    border-radius: var(--iro-radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.iro-panel:first-child,
.index-module:first-of-type { margin-top: 0; }

.iro-panel-head,
.index-module-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f5f5f4;
}
.iro-panel-title,
.index-module-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}
.iro-panel-title i,
.index-module-title i { font-size: 15px; opacity: 0.85; }
.iro-panel-note,
.index-module-note {
    margin: 0 0 14px;
    font-size: 12px;
    color: var(--iro-muted);
    line-height: 1.55;
}

.page-header {
    background: var(--iro-surface);
    border: 1px solid var(--iro-border);
    border-radius: var(--iro-radius);
    padding: 18px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.page-header h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--iro-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-header p { font-size: 13px; color: var(--iro-muted); margin: 0; line-height: 1.5; }

.iro-card {
    background: var(--iro-surface);
    border: 1px solid var(--iro-border);
    border-radius: var(--iro-radius);
    padding: 20px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.iro-card h2 { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--iro-text); }
.iro-card .hint {
    font-size: 12px;
    color: var(--iro-soft);
    margin: 0 0 16px;
    line-height: 1.55;
}

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-group label,
.form-row label {
    display: block;
    font-size: 13px;
    color: var(--iro-muted);
    margin-bottom: 6px;
    font-weight: 600;
}
.form-group .sub,
.form-row .sub { font-weight: normal; color: var(--iro-soft); font-size: 12px; }
.form-group input,
.form-group select,
.form-group textarea,
.form-row input,
.form-row textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--iro-border);
    border-radius: var(--iro-radius-sm);
    font-size: 15px;
    background: #fff;
    font-family: inherit;
    color: var(--iro-text);
}
.form-group input:focus,
.form-group select:focus,
.form-row input:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}
.form-group input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.form-row { margin-bottom: 12px; }
.form-row textarea { min-height: 72px; resize: vertical; line-height: 1.45; }
.readonly { background: #fafaf9 !important; color: var(--iro-muted) !important; }

.section-title {
    font-size: 13px;
    color: var(--iro-mall);
    margin: 20px 0 12px;
    padding-top: 4px;
    border-top: 1px solid #f5f5f4;
    font-weight: 700;
}
.section-title:first-of-type { border-top: none; margin-top: 0; }

/* 按钮（仅组织图面板，避免污染保险箱等全局 .btn） */
.iro-btn,
#panel-organize .webox-organize .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 13px 16px;
    border: none;
    border-radius: var(--iro-radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: var(--iro-accent);
    color: #fff;
    text-decoration: none;
}
.iro-btn:disabled,
#panel-organize .webox-organize .btn:disabled { opacity: 0.6; cursor: not-allowed; }
#panel-organize .webox-organize .btn-secondary { background: #f5f5f4; color: var(--iro-text); border: 1px solid var(--iro-border); }

/* 链接 */
.iro-link { color: var(--iro-accent); font-size: 14px; font-weight: 600; text-decoration: none; }
.iro-link.lp { color: var(--iro-lp); }
.iro-link-back { display: inline-block; margin-top: 16px; text-align: center; width: 100%; }

/* 消息 */
.msg { font-size: 14px; margin-top: 12px; display: none; line-height: 1.5; }
.msg.err { color: var(--iro-danger); }
.msg.ok { color: var(--iro-success); }
.error-message { color: var(--iro-danger); font-size: 14px; margin-top: 12px; display: none; }
.loading { text-align: center; color: var(--iro-muted); margin-top: 12px; display: none; font-size: 14px; }

/* 空状态 */
.empty-state-box {
    text-align: center;
    padding: 28px 16px;
    background: #fafaf9;
    border: 1px dashed var(--iro-border);
    border-radius: var(--iro-radius-sm);
    color: var(--iro-soft);
    font-size: 13px;
    line-height: 1.6;
}
.empty-state-box i { display: block; font-size: 22px; color: #d6d3d1; margin-bottom: 8px; }
.guest-tip { text-align: center; padding: 48px 20px; color: var(--iro-muted); }

/* 动态列表 */
.activity-list { list-style: none; margin: 0; padding: 0; background: var(--iro-surface); }
.activity-list.block {
    border: 1px solid var(--iro-border);
    border-radius: var(--iro-radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.activity-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f4;
}
.activity-list.block .activity-item { padding: 14px 16px; }
.activity-item:last-child { border-bottom: none; }
.activity-item.is-clickable { cursor: pointer; }
.activity-item.is-clickable:active { background: var(--iro-mall-light); }
.activity-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fbbf24;
    margin-top: 6px;
    box-shadow: 0 0 0 3px #fef3c7;
}
.activity-body { flex: 1; min-width: 0; }
.activity-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
}
.activity-who { font-size: 14px; font-weight: 600; color: var(--iro-mall); margin-right: 6px; }
.activity-time { font-size: 11px; color: var(--iro-soft); white-space: nowrap; flex-shrink: 0; }
.activity-text { font-size: 13px; color: var(--iro-muted); line-height: 1.45; }
.activity-main { font-size: 14px; color: var(--iro-text); flex: 1; line-height: 1.45; }
.activity-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; width: 100%; }

/* 分页 */
.pagination {
    margin-top: 14px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span.page-current {
    padding: 8px 14px;
    border-radius: var(--iro-radius-sm);
    text-decoration: none;
    font-size: 13px;
    border: 1px solid var(--iro-border);
    background: var(--iro-surface);
    color: var(--iro-muted);
}
.pagination span.page-current {
    background: var(--iro-accent);
    border-color: var(--iro-accent);
    color: #fff;
    font-weight: 600;
}
.pagination a.disabled { color: #d6d3d1; pointer-events: none; }
.pagination-summary { text-align: center; font-size: 12px; color: var(--iro-soft); margin-top: 8px; }

/* 登录页 */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(160deg, #fffbeb 0%, #fde68a 45%, #fbbf24 100%);
}
.auth-card {
    background: var(--iro-surface);
    border: 1px solid var(--iro-mall-border);
    border-radius: var(--iro-radius);
    box-shadow: 0 8px 32px rgba(180, 83, 9, 0.12);
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
}
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h1 { color: #92400e; font-size: 28px; margin: 0 0 8px; font-weight: 800; letter-spacing: -0.02em; }
.auth-header p { color: var(--iro-muted); font-size: 14px; margin: 0; }
.nb-amount { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.nb-nft { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #92400e; border: 1px solid #f59e0b; font-weight: 700; letter-spacing: 0.04em; }
.toolbar { padding: 12px 16px; display: flex; gap: 8px; flex-wrap: wrap; background: var(--iro-surface); border-bottom: 1px solid var(--iro-border); }
.toolbar input { flex: 1; min-width: 120px; padding: 10px 12px; border: 1px solid var(--iro-border); border-radius: var(--iro-radius-sm); font-size: 15px; }
.toolbar input:focus { outline: none; border-color: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2); }
.toolbar button { padding: 10px 14px; border: none; border-radius: var(--iro-radius-sm); background: var(--iro-accent); color: #fff; cursor: pointer; font-weight: 600; font-size: 14px; }
#breadcrumbBar {
    padding: 10px 16px;
    font-size: 13px;
    line-height: 1.6;
    background: var(--iro-surface);
    border-bottom: 1px solid var(--iro-border);
    word-break: break-all;
}
#breadcrumbBar a { color: var(--iro-accent); text-decoration: none; cursor: pointer; font-weight: 500; }
#breadcrumbBar .sep { color: #d6d3d1; margin: 0 4px; }
#listHeader { padding: 12px 16px 4px; font-size: 14px; font-weight: 600; color: #44403c; }
#listHeader .sub { display: block; font-size: 12px; font-weight: normal; color: #a8a29e; margin-top: 4px; }
.sort-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    border-right: 1px solid #f5f5f4;
    flex-shrink: 0;
}
.sort-actions button {
    border: none;
    background: #fafaf9;
    color: #78716c;
    width: 28px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
}
.sort-actions button:active { background: #f5f5f4; color: #d97706; }
#treeRoot { padding: 0 16px 24px; }
#childList { display: flex; flex-direction: column; gap: 8px; }
.child-card {
    background: var(--iro-surface);
    border-radius: var(--iro-radius-sm);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    border: 1px solid var(--iro-border);
    display: flex;
    align-items: stretch;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
}
/* 有效账户：绿色边框区分 */
.child-card.is-valid {
    background: #fff;
    border: 2px solid #22c55e;
    box-shadow: 0 1px 4px rgba(22, 163, 74, 0.12);
}
.child-card.invalid {
    opacity: 0.6;
    border: 1px dashed #a8a29e;
    background: #f5f5f4;
}
.child-card:not(.is-valid):not(.invalid) {
    background: #fff;
}
.child-card-body {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
}
.child-card .card-head {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding-right: 30px;
    margin-bottom: 2px;
}
.child-card .name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-bottom: 0;
    padding-right: 0;
    box-sizing: border-box;
}
.child-card .name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.node-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.nb {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
}
.nb-valid { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.nb-invalid-acct { background: #f5f5f4; color: #78716c; border: 1px solid #e7e5e4; }
.nb-node-invalid { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.nb-lv { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.nb-lv-0 { background: #f5f5f4; color: #a8a29e; border: 1px solid #e7e5e4; font-weight: 500; }
.nb-lv-1 { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.nb-lv-2 { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.nb-lv-3 { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.nb-lv-4 { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.nb-lv-5 { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.nb-lv-6 { background: #faf5ff; color: #7e22ce; border-color: #e9d5ff; }
.nb-lv-7 { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; border-color: #fbbf24; }
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #44403c;
    cursor: pointer;
    user-select: none;
}
.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #d97706;
    cursor: pointer;
}
#searchResults .node-badges { margin-top: 4px; }
.parent-context-card .pc-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-bottom: 8px;
}
.parent-context-card .pc-title-row .pc-title {
    margin-bottom: 0;
}
.parent-context-card .pc-title-row .node-badges {
    margin: 0;
}
#nodeDetail .status-detail { margin: 0 0 12px; }
.child-card .meta,
.parent-context-card .meta,
#searchResults .line,
#nodeDetail .copy-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 12px;
    color: #57534e;
    line-height: 1.5;
}
.child-card .meta { margin-top: 6px; align-self: stretch; }
.parent-context-card .meta { margin-top: 6px; }
#searchResults .line { margin-top: 2px; }
#nodeDetail .copy-row { margin: 0 0 8px; }
.child-card .meta .lbl,
.parent-context-card .meta .lbl,
#searchResults .line .lbl,
#nodeDetail .copy-row .lbl {
    color: #a8a29e;
    flex-shrink: 0;
    white-space: nowrap;
    word-break: keep-all;
}
.child-card .meta .lbl::after,
.parent-context-card .meta .lbl::after,
#searchResults .line .lbl::after,
#nodeDetail .copy-row .lbl::after {
    content: '：';
}
.child-card .meta .meta-val,
.parent-context-card .meta .meta-val,
#searchResults .line .line-val,
#nodeDetail .copy-row .copy-val {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: #f5f5f4;
    color: #78716c;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 11px;
}
.btn-copy:active { background: #e7e5e4; }
.btn-copy.copied { color: #16a34a; background: #dcfce7; }
#copyToast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: rgba(41, 37, 36, 0.92);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s, opacity 0.2s;
}
#copyToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.drill-hint { color: #d6d3d1; font-size: 14px; flex-shrink: 0; }
.btn-card-more {
    position: absolute;
    top: -4px;
    right: 0;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #a8a29e;
    cursor: pointer;
    flex-shrink: 0;
}
.btn-card-more i { font-size: 14px; line-height: 1; pointer-events: none; }
.btn-card-more:hover { background: #f5f5f4; color: #57534e; }
.btn-card-more:active { background: #e7e5e4; color: #44403c; }
#loadMoreWrap { padding: 16px 0 8px; text-align: center; }
#loadMoreBtn {
    border: 1px solid #e7e5e4;
    background: #fff;
    color: #57534e;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    max-width: 320px;
}
#loadMoreBtn:disabled { opacity: 0.5; cursor: not-allowed; }
.list-empty {
    color: var(--iro-soft);
    padding: 32px 16px;
    text-align: center;
    font-size: 14px;
    background: #fafaf9;
    border: 1px dashed var(--iro-border);
    border-radius: var(--iro-radius-sm);
    margin-top: 8px;
}
.lp-root-setup {
    max-width: 420px;
    margin: 24px auto;
    padding: 24px 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #ede9fe;
}
.lp-root-setup h3 {
    margin: 0 0 8px;
    font-size: 17px;
    color: #5b21b6;
    text-align: center;
}
.lp-root-setup .lp-root-intro {
    font-size: 13px;
    color: #78716c;
    line-height: 1.6;
    margin-bottom: 18px;
    text-align: center;
}
.lp-root-setup .form-row { margin-bottom: 14px; }
.lp-root-setup .form-row label {
    display: block;
    font-size: 13px;
    color: #444;
    margin-bottom: 6px;
}
.lp-root-setup .form-row input,
.lp-root-setup .form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}
.lp-root-setup .form-hint {
    font-size: 12px;
    color: #a8a29e;
    margin-top: 4px;
}
.lp-root-setup .form-row-check {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lp-root-setup .form-row-check input { width: auto; margin: 0; }
.lp-root-setup .form-row-check label { margin: 0; font-weight: normal; cursor: pointer; }
.lp-root-setup .btn-create-root {
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.lp-root-setup .btn-create-root:disabled { opacity: 0.65; cursor: not-allowed; }

.org-unbound-state {
    margin: 24px 16px;
    padding: 28px 20px;
    text-align: center;
    background: #fafaf9;
    border: 1px dashed #d6d3d1;
    border-radius: 16px;
}
.org-unbound-state .org-unbound-icon {
    font-size: 36px;
    color: #d6d3d1;
    margin-bottom: 12px;
}
.org-unbound-state h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #44403c;
}
.org-unbound-state p {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.6;
    color: #78716c;
}
.org-unbound-state .org-unbound-hint {
    font-size: 12px;
    color: #a8a29e;
}

#parentContext { margin-bottom: 12px; }
.parent-context-card {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.parent-context-card.is-valid {
    background: #fffbeb;
    border: 2px solid #22c55e;
    box-shadow: 0 1px 4px rgba(22, 163, 74, 0.12);
}
.parent-context-card .pc-title {
    font-size: 13px;
    color: #92400e;
    font-weight: 600;
}
.parent-context-card .meta { font-size: 12px; color: #57534e; line-height: 1.45; }
.parent-context-card .pc-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.parent-context-card .pc-actions button {
    flex: 1;
    min-width: 120px;
    padding: 9px 12px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    cursor: pointer;
}
.pc-btn-detail { background: #f5f5f4; color: #57534e; }
.pc-btn-add { background: var(--accent, #f05a25); color: #fff; }
#panel-organize #btnAddDirect { display: none; background: var(--accent, #f05a25); }
#searchResults .item .line { font-size: 12px; color: #57534e; margin-top: 2px; }
#panel-organize .modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
#panel-organize .modal.show { display: flex; }
#panel-organize .modal-panel {
    background: var(--iro-surface);
    width: 100%;
    max-width: 420px;
    max-height: min(85vh, calc(100% - 32px));
    overflow: auto;
    border-radius: var(--iro-radius);
    padding: 20px;
    border: 1px solid var(--iro-border);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
#panel-organize .modal-panel h3 { margin: 0 0 16px; font-size: 17px; font-weight: 700; color: var(--iro-text); }
#panel-organize .modal-panel.modal-panel-closable { position: relative; }
#panel-organize .modal-panel.modal-panel-closable > .modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #a8a29e;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex: none;
    min-width: 0;
    -webkit-appearance: none;
    appearance: none;
    transition: color 0.15s ease, background-color 0.15s ease;
}
#panel-organize .modal-panel.modal-panel-closable > .modal-close i { font-size: 18px; line-height: 1; pointer-events: none; }
#panel-organize .modal-panel.modal-panel-closable > .modal-close:hover { background: rgba(0, 0, 0, 0.06); color: #57534e; }
#panel-organize .modal-panel.modal-panel-closable > .modal-close:active { background: rgba(0, 0, 0, 0.1); color: #44403c; }
#panel-organize .modal-panel.modal-panel-closable > .modal-close:focus-visible { outline: 2px solid rgba(217, 119, 6, 0.45); outline-offset: 1px; }
#panel-organize .modal-detail-header { margin-bottom: 16px; }
#panel-organize .modal-detail-header h3 {
    margin: 0;
    padding-right: 36px;
    line-height: 1.35;
}
#panel-organize .modal-actions-detail { flex-wrap: nowrap; }
#panel-organize .modal-actions-detail button { flex: 1; min-width: 0; padding: 10px 8px; font-size: 14px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 13px; color: var(--iro-muted); margin-bottom: 4px; font-weight: 600; }
.form-row input,
.form-row textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--iro-border); border-radius: var(--iro-radius-sm); font-family: inherit; font-size: 14px; }
.form-row input:focus,
.form-row textarea:focus { outline: none; border-color: #fbbf24; box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2); }
.form-row textarea { min-height: 72px; resize: vertical; line-height: 1.45; }
.form-row-check { display: flex; align-items: center; gap: 8px; }
.form-row-check input[type="checkbox"] { width: auto; margin: 0; }
.form-row-check label { margin: 0; font-weight: normal; cursor: pointer; }
#panel-organize .modal-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
#panel-organize .modal-actions button { flex: 1; min-width: 90px; padding: 12px; border: none; border-radius: 8px; cursor: pointer; font-size: 15px; }
#panel-organize .webox-organize .btn-primary { background: var(--iro-accent); color: #fff; }
#panel-organize .webox-organize .btn-secondary { background: #eee; color: #333; }
#panel-organize .webox-organize .btn-edit { background: #16a34a; color: #fff; }
#panel-organize .webox-organize .btn-edit:disabled { opacity: 0.45; cursor: not-allowed; }
#panel-organize .webox-organize .btn-danger { background: #dc2626; color: #fff; }
#panel-organize .webox-organize .btn-danger:disabled { opacity: 0.45; cursor: not-allowed; }
#nodeDetail p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; word-break: break-all; }
#editNodeModal { z-index: 210; }
#editNodeModal .modal-panel,
#lpEditModal .modal-panel { max-height: 90vh; overflow: auto; }
#editNodeModal .form-hint { font-size: 12px; color: #a8a29e; margin-top: 6px; line-height: 1.45; }
#lpEditModal { z-index: 210; }
#panel-organize .modal-actions.edit-modal-actions { justify-content: flex-end; }
#panel-organize .modal-actions.edit-modal-actions .btn-delete-edit { margin-right: auto; flex: 0 1 auto; min-width: 72px; }
.form-block-status {
    margin: 6px 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fafaf9;
    border: 1px solid #ebe8e6;
}
.form-block-status .form-block-title {
    font-size: 12px;
    font-weight: 700;
    color: #b45309;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.01em;
}
.form-block-status .form-block-title i { font-size: 11px; opacity: 0.9; }
.status-field {
    display: grid;
    grid-template-columns: 64px 1fr;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 8px;
}
.status-field:last-child { margin-bottom: 0; }
.status-field-chips { align-items: start; }
.status-field-chips .status-label { margin-top: 5px; }
.status-label {
    font-size: 12px;
    font-weight: 600;
    color: #78716c;
    margin: 0;
    cursor: default;
}
.status-control { min-width: 0; }
.seg-toggle {
    display: inline-flex;
    gap: 0;
    padding: 2px;
    border-radius: 8px;
    border: none;
    background: #e7e5e4;
    max-width: 100%;
}
.seg-toggle .seg-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #78716c;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    line-height: 1.3;
    white-space: nowrap;
}
.seg-toggle .seg-btn + .seg-btn { border-left: none; }
.seg-toggle .seg-btn:hover:not(.active-no):not(.active-yes) { color: #44403c; }
.seg-toggle .seg-btn:active { transform: scale(0.97); }
.seg-toggle .seg-btn.active-no {
    background: #fff;
    color: #57534e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.seg-toggle .seg-btn.active-yes {
    background: #16a34a;
    color: #fff;
    box-shadow: 0 1px 4px rgba(22, 163, 74, 0.35);
}
.level-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.level-chip {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e7e5e4;
    background: #fff;
    color: #57534e;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.1s ease;
    line-height: 1.25;
    flex: none;
    min-width: 0;
}
.level-chip:hover { border-color: #d6d3d1; background: #fffbeb; color: #b45309; }
.level-chip:active { transform: scale(0.96); }
.level-chip.active {
    border-color: #d97706;
    background: #d97706;
    color: #fff;
    box-shadow: none;
}
.level-chip.lv-0.active {
    background: #78716c;
    border-color: #78716c;
    color: #fff;
}
.form-block-status .seg-btn,
.form-block-status .level-chip {
    flex: none;
    min-width: 0;
}
#searchResults .item.is-valid {
    background: #fff;
    border: 2px solid #22c55e;
    box-shadow: 0 1px 4px rgba(22, 163, 74, 0.12);
}
#searchResults {
    padding: 0 16px 16px;
    display: none;
    flex-direction: column;
    gap: 8px;
}
#searchResults .org-search-card .card-head {
    padding-right: 0;
}
#searchResults .org-search-empty {
    color: var(--text-3, #888);
    padding: 12px 0;
    text-align: center;
    font-size: 14px;
    margin: 0;
}
/* 旧版 .item 搜索结果（兼容） */
#searchResults .item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 14px;
    background: #fff;
    margin-bottom: 0;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--iro-border, #e7e5e4);
}
#searchResults .item .name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* WeBox 内嵌：模式切换（胶囊 Tab，对齐 GVR 主站） */
#panel-organize .org-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 4px;
    margin-bottom: 14px;
    background: #ffffff;
    border: 1px solid var(--line-strong, #e5e5e5);
    border-radius: var(--radius-pill, 999px);
}
#panel-organize .org-tab {
    min-height: 38px;
    padding: 0 12px;
    border-radius: var(--radius-pill, 999px);
    border: 0;
    background: transparent;
    color: var(--text-2, #666);
    font-size: 13px;
    font-weight: 600;
}
#panel-organize .org-tab.active {
    color: #fff;
    background: var(--accent, #f05a25);
}

/* WeBox 浅色主题（组织图面板） */
#panel-organize .webox-organize {
    --iro-bg: transparent;
    --iro-surface: #ffffff;
    --iro-border: var(--line, #eeeeee);
    --iro-text: var(--text, #1a1a1a);
    --iro-muted: var(--text-2, #666);
    --iro-soft: var(--text-3, #999);
    color: var(--iro-text);
}
#panel-organize .toolbar input[type="search"],
#panel-organize .form-row input,
#panel-organize .form-row textarea,
#panel-organize .modal-panel input,
#panel-organize .modal-panel textarea {
    background: #ffffff;
    border: 1px solid var(--line-strong, #e5e5e5);
    color: var(--text, #1a1a1a);
    border-radius: 10px;
}
#panel-organize .toolbar button,
#panel-organize .modal-actions button,
#panel-organize .btn-create-root {
    border-radius: var(--radius-pill, 999px);
}
#panel-organize .toolbar button:not(#btnAddDirect),
#panel-organize .btn-create-root,
#panel-organize .modal-actions .btn-primary,
#panel-organize .pc-btn-add {
    background: var(--accent, #f05a25);
    color: #fff;
    border: 0;
}
#panel-organize #btnAddDirect {
    background: var(--accent, #f05a25);
}
#panel-organize .child-card,
#panel-organize .parent-context,
#panel-organize .modal-panel,
#panel-organize #searchResults .child-card,
#panel-organize #searchResults .item,
#panel-organize .lp-root-setup {
    background: #ffffff;
    border-color: var(--line, #eeeeee);
    color: var(--text, #1a1a1a);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
#panel-organize .list-empty {
    color: var(--text-3, #999);
}
#panel-organize .modal {
    background: rgba(0, 0, 0, 0.4);
}
#panel-organize .breadcrumb-bar a {
    color: var(--accent, #f05a25);
}
