/*!
 * lus-basic.css — liusu 基础类样式（v1.0.0）
 * ============================================================
 * 作用：为存量页面保留的 .lus-* 类名提供基础样式兜底。
 * 说明：项目 common.css / tenant.css / platform.css 已对绝大多数 .lus-*
 *       类做过对齐 UI 的样式覆盖（按钮/表单/表格/分页/主框架），
 *       本文件仅补齐图标占位与少量未覆盖的基础类。
 */
/* ---- 图标占位：JS（modules/init.js）会替换为内联 SVG ---- */
.lus-icon {
    display: inline-block;
    vertical-align: -1px;
    font-style: normal;
    color: inherit;
}
.lus-icon[data-lus-icon="1"] { width: auto; height: auto; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.lus-icon[data-lus-icon="1"] .lus-ic { display: block; }

/* ---- 徽章红点（消息中心） ---- */
.lus-badge-dot {
    position: absolute;
    top: 22px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C0392B;
    display: none;
}

/* ---- 按钮基础（对齐参考 UI .btn：inline-flex 图标文字垂直居中） ---- */
.lus-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    line-height: 32px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #0a7d6e;
    color: #fff;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    transition: all 0.2s;
    font-family: inherit;
    text-decoration: none;
}
/* hover 不再强制白字：配合 liusu.css 的 hover 白底+主色文字，避免普通/渐变按钮白底白字看不清 */
.lus-btn:hover { opacity: 0.88; }
.lus-btn .lus-icon { font-size: 14px; flex-shrink: 0; }
.lus-btn-sm { height: 34px; line-height: 34px; font-size: 13px; padding: 0 14px; }
.lus-btn-xs { height: 22px; line-height: 22px; font-size: 12px; padding: 0 10px; }
.lus-btn-primary {
    background: #fff;
    color: #646a73;
    border-color: var(--border-light, #e5e8ef);
}
.lus-btn-primary:hover { color: #0a7d6e; border-color: #0a7d6e; opacity: 1; }
.lus-btn-danger { background: #ff5722; color: #fff; }
.lus-btn-warm { background: #ffb800; color: #fff; }
.lus-btn-fluid { width: 100%; }
.lus-btn.primary { background: var(--primary-color, #0d9488); color: #fff; }
.lus-btn.primary:hover { background: var(--primary-dark, #0f766e); opacity: 1; }
.lus-btn.btn-gray { background: #fff; color: #646a73; border-color: var(--border-light, #e5e8ef); }
.lus-btn.btn-gray:hover { color: #0a7d6e; border-color: #0a7d6e; opacity: 1; }
.lus-btn:disabled,
.lus-btn.lus-btn-disabled { opacity: 0.55; cursor: not-allowed; }

/* ---- 输入控件基础 ---- */
.lus-input, .lus-textarea, .lus-select {
    display: block;
    width: 100%;
    height: 38px;
    padding: 0 11px;
    border: 1px solid var(--border-color, #d1d5db);
    border-radius: 6px;
    background: #fff;
    color: var(--text-primary, #1f2329);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.lus-textarea { height: auto; min-height: 100px; padding: 9px 11px; resize: vertical; line-height: 1.6; }
.lus-input:focus, .lus-textarea:focus {
    border-color: var(--primary-color, #0d9488);
    box-shadow: 0 0 0 3px var(--primary-softer, rgba(13, 148, 136, 0.12));
}
.lus-input::placeholder, .lus-textarea::placeholder { color: var(--text-muted, #9ca3af); }

/* ---- 表单布局基础 ---- */
.lus-form-item {
    margin-bottom: 15px;
    clear: both;
    *zoom: 1;
}
.lus-form-label {
    float: left;
    display: block;
    padding: 9px 15px;
    width: 80px;
    font-size: 14px;
    color: var(--text-secondary, #6b7280);
    text-align: right;
    box-sizing: border-box;
    line-height: 20px;
}
.lus-input-block {
    margin-left: 110px;
    min-height: 36px;
}
.lus-input-inline { display: inline-block; vertical-align: middle; }
.lus-form-checkbox { position: relative; display: inline-block; vertical-align: middle; cursor: pointer; }
.lus-form-radio { display: inline-block; vertical-align: middle; cursor: pointer; }

/* ---- 徽章 ---- */
.lus-badge { display: inline-block; padding: 0 8px; height: 20px; line-height: 20px; border-radius: 2px; font-size: 12px; color: #fff; background: #666; }
.lus-badge-green, .lus-bg-green { background: #16b777; color: #fff; }
.lus-bg-gray { background: #f0f1f3; color: #666f7d; }
.lus-bg-red { background: #ff5722; color: #fff; }

/* ============================================================
   liusu 导航基础布局（外部 UI 框架样式 移除后的关键兜底）
   缺少以下规则会导致 .lus-nav-item 呈现 list-item（垂直堆叠），
   顶栏/侧栏全部错位——这是"布局错位"的根因。
   各端（tenant.css / platform.css）已对 .lus-nav-* 做过更细覆盖，
   本段只补最小可用的基础布局。
   ============================================================ */
.lus-nav {
    position: relative;
    padding: 0;
    margin: 0;
    list-style: none;
    background: transparent;
    border-radius: 0;
    font-size: 0; /* 消除行内块之间的空白间隙 */
    box-sizing: border-box;
}
.lus-nav * { font-size: 14px; }
.lus-nav .lus-nav-item {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    line-height: 60px;
    margin: 0;
    list-style: none;
}
.lus-nav .lus-nav-item a {
    display: block;
    padding: 0 20px;
    color: inherit;
    text-decoration: none;
}
.lus-nav .lus-nav-item > a i.lus-icon {
    display: inline-block;
    margin-right: 6px;
    line-height: 1;
    vertical-align: -1px;
    font-style: normal;
}
/* 下拉子菜单（顶栏用户下拉等） */
.lus-nav .lus-nav-child {
    position: absolute;
    top: 60px;
    left: 0;
    min-width: 150px;
    margin: 0;
    padding: 4px 0;
    background: #fff;
    border: 1px solid #e5e8ef;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
    display: none;
    z-index: 999;
    list-style: none;
    box-sizing: border-box;
}
.lus-nav .lus-nav-child dd { display: block; margin: 0; padding: 0; list-style: none; }
.lus-nav .lus-nav-child dd a { display: block; height: 36px; line-height: 36px; padding: 0 16px; color: #4a5568; white-space: nowrap; }
.lus-nav .lus-nav-child dd a:hover { background: #f5f8ff; color: #0d9488; }
.lus-nav .lus-nav-child dd.lus-this a { color: #0d9488; font-weight: 500; }
/* 顶栏下拉 hover 展开；树形菜单（.lus-nav-tree）子菜单由点击切换 lus-nav-itemed 控制 */
.lus-nav:not(.lus-nav-tree) .lus-nav-item:hover > .lus-nav-child { display: block; }
.lus-nav .lus-nav-item.lus-nav-itemed > .lus-nav-child { display: block; }
.lus-nav hr { margin: 4px 6px; border: none; border-top: 1px solid #eef0f3; }
/* 树形菜单：一级项必须是块级 */
.lus-nav-tree .lus-nav-item { display: block; }
.lus-nav-tree .lus-nav-child { position: static; top: auto; left: auto; display: none; box-shadow: none; border: none; background: transparent; padding: 0; min-width: 0; }

/* ---- 原生 select 基础（未美化为 lus-cselect 时） ---- */
select.lus-select,
select[ls-ignore] {
    height: 34px;
    padding: 0 28px 0 11px;
    border: 1px solid var(--border-light, #e5e8ef);
    border-radius: 6px;
    background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238f959e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 10px center;
    appearance: none;
    -webkit-appearance: none;
    font-size: 13px;
    color: var(--text-primary, #1f2329);
    outline: none;
    font-family: inherit;
}

/* ---- 隐藏原生 select（已由 lus.form.select 美化时） ---- */
.lus-cselect select { display: none !important; }

/* ---- 表格内链接按钮（沿用页面 lus-btn-xs 组合） ---- */
.lus-btn.lus-btn-xs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 26px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 6px;
    line-height: 1;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: all 0.15s;
}
.lus-btn.lus-btn-xs.primary {
    background: var(--primary-color, #0d9488);
    color: #fff;
}
.lus-btn.lus-btn-xs.primary:hover { background: var(--primary-dark, #0f766e); }
.lus-btn.lus-btn-xs.lus-btn-danger {
    background: #fff;
    color: var(--danger, #e5484d);
    border-color: var(--border-light, #e5e8ef);
}
.lus-btn.lus-btn-xs.lus-btn-danger:hover { border-color: var(--danger, #e5484d); }
.lus-btn.lus-btn-xs.lus-btn-warm {
    background: #fff;
    color: #b45309;
    border-color: var(--border-light, #e5e8ef);
}
.lus-btn.lus-btn-xs.lus-btn-warm:hover { border-color: #b45309; }

/* ============================================================
   表格操作列：对齐参考 UI 文本链接风格（teal=编辑 / amber=状态 / danger=删除）
   ============================================================ */
.lus-grid td .lus-btn.lus-btn-xs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: auto;
    padding: 2px 6px;
    font-size: 13px;
    line-height: 1.6;
    border: none;
    background: transparent;
    color: var(--lus-teal, #0d9488);
    border-radius: 4px;
    box-shadow: none;
}
.lus-grid td .lus-btn.lus-btn-xs:hover { background: var(--lus-teal-soft, rgba(13,148,136,.08)); color: var(--lus-teal-dark, #0f766e); }
.lus-grid td .lus-btn.lus-btn-xs.primary { background: transparent; color: var(--lus-teal, #0d9488); }
.lus-grid td .lus-btn.lus-btn-xs.primary:hover { background: var(--lus-teal-soft, rgba(13,148,136,.08)); color: var(--lus-teal-dark, #0f766e); }
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-warm { background: transparent; color: #b45309; }
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-warm:hover { background: rgba(217,119,6,.12); color: #b45309; }
/* 编辑按钮：青绿（规范：编辑=青绿、切换/反审=琥珀、删除=红；统一全站编辑按钮色，原用 warm 琥珀与切换撞色） */
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-edit { background: transparent; color: var(--primary-color, #0d9488); }
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-edit:hover { background: rgba(13,148,136,.1); color: var(--primary-dark, #0f766e); }
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-danger { background: transparent; color: var(--lus-danger, #e5484d); }
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-danger:hover { background: var(--lus-danger-soft, #fdecec); color: var(--lus-danger, #e5484d); }
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-normal { background: transparent; color: var(--lus-text-2, #646a73); }
.lus-grid td .lus-btn.lus-btn-xs.lus-btn-normal:hover { background: var(--lus-bg-soft, #f7f8fa); color: var(--lus-teal, #0d9488); }
/* 操作链接分隔符（对齐参考 UI .op-sep "|"） */
.lus-grid td .lus-btn.lus-btn-xs + .lus-btn.lus-btn-xs::before {
    content: "|";
    margin-right: 6px;
    color: var(--lus-border, #e5e8ef);
    font-size: 12px;
}

/* ---- 打印隐藏 ---- */
@media print {
    .lus-badge-dot { display: none !important; }
}
