/* 云楚智慧乡村管理平台 · 后台样式（LayUI 增强主题） */
:root {
    --yc-primary: #16b777;
    --yc-primary-dark: #0e9c66;
    --yc-primary-deep: #0a7a52;
    --yc-danger: #e54d42;
    --yc-warn: #ffb800;
    --yc-info: #2d8cf0;
    --yc-text: #2c3e50;
    --yc-text-sub: #7a8899;
    --yc-line: #eef2f5;
    --yc-bg: #f4f6f8;
    --yc-radius: 10px;
    --yc-shadow: 0 2px 10px rgba(20, 60, 45, .06);
    --yc-shadow-hover: 0 10px 28px rgba(20, 60, 45, .14);
}

/* 基础 */
body { color: var(--yc-text); }
.yc-body { background: var(--yc-bg); }
.yc-pad { padding: 16px; }
a { color: var(--yc-primary); }
::selection { background: rgba(22, 183, 119, .18); }

/* 顶部栏 */
.layui-header {
    background: #fff !important;
    box-shadow: 0 1px 8px rgba(0, 0, 0, .05);
    height: 56px;
    z-index: 1000;
}
.layui-header .layui-logo {
    background: none !important;
    color: var(--yc-text) !important;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .5px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 18px;
    width: 200px;
}
.layui-header .layui-logo .yc-logo-dot {
    width: 26px; height: 26px; border-radius: 8px;
    background: linear-gradient(135deg, var(--yc-primary), var(--yc-primary-deep));
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 14px; box-shadow: 0 4px 10px rgba(22,183,119,.35);
}
.yc-page-title {
    float: left; line-height: 56px; margin-left: 210px;
    font-size: 15px; font-weight: 600; color: var(--yc-text);
}
.yc-page-title .yc-breadcrumb { color: var(--yc-text-sub); font-weight: 400; font-size: 13px; }
.layui-header .layui-nav { background: none !important; }
.layui-header .layui-nav .layui-nav-item > a { color: var(--yc-text) !important; }

/* 侧边栏 */
.layui-side { background: linear-gradient(180deg, #0b3d2e 0%, #0f5138 100%) !important; }
.layui-side .yc-side-brand {
    height: 56px; display: flex; align-items: center; gap: 10px;
    padding: 0 20px; color: #eafff6; font-weight: 700; font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, .08); letter-spacing: .5px;
}
.layui-side .yc-side-brand i { font-size: 18px; color: #7ef0b8; }
.layui-side .layui-nav { background: none !important; padding: 8px 0; }
.layui-side .layui-nav-tree .layui-nav-item > a {
    color: #cfe9de !important; height: 44px; line-height: 44px; font-size: 14px;
    border-left: 3px solid transparent; transition: all .18s;
}
.layui-side .layui-nav-tree .layui-nav-item > a:hover { background: rgba(255,255,255,.06); color: #fff !important; }
.layui-side .layui-nav-tree .layui-nav-item.layui-this > a,
.layui-side .layui-nav-tree .layui-nav-itemed > a {
    background: rgba(22, 183, 119, .22) !important;
    color: #fff !important; border-left-color: #57e0a0;
}
.layui-side .layui-nav-tree .layui-nav-child dd a { color: #b9d9cb !important; height: 40px; line-height: 40px; }
.layui-side .layui-nav-tree .layui-nav-child dd.layui-this a,
.layui-side .layui-nav-tree .layui-nav-child dd a:hover { color: #fff !important; background: rgba(255,255,255,.06); }

/* 卡片通用 */
.layui-card { border-radius: var(--yc-radius); box-shadow: var(--yc-shadow); border: 1px solid var(--yc-line); margin-bottom: 14px; }
.layui-card-header { border-bottom: 1px solid var(--yc-line); font-weight: 600; color: var(--yc-text); font-size: 14px; }
.layui-elem-quote {
    border-left: 4px solid var(--yc-primary); background: #fff; border-radius: var(--yc-radius);
    box-shadow: var(--yc-shadow); padding: 14px 18px; color: var(--yc-text); margin-bottom: 14px;
}

/* 统计卡面 */
.stat-card {
    background: #fff; border-radius: var(--yc-radius); padding: 18px 16px; margin-bottom: 16px;
    display: flex; align-items: center; box-shadow: var(--yc-shadow);
    border: 1px solid var(--yc-line); transition: all .2s; position: relative; overflow: hidden;
}
.stat-card:hover { box-shadow: var(--yc-shadow-hover); transform: translateY(-2px); }
.stat-card::after {
    content: ''; position: absolute; right: -20px; top: -20px; width: 80px; height: 80px;
    border-radius: 50%; background: rgba(22,183,119,.05);
}
.stat-icon { font-size: 34px; margin-right: 14px; width: 54px; height: 54px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; background: #f2fbf7; flex-shrink: 0; }
.stat-body { flex: 1; min-width: 0; }
.stat-num { font-size: 24px; font-weight: 700; color: var(--yc-text); line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--yc-text-sub); margin-top: 4px; }

/* 模块入口 */
.module-link {
    display: block; background: #fff; border-radius: var(--yc-radius); padding: 22px 12px;
    margin-bottom: 16px; text-align: center; color: var(--yc-text); border: 1px solid var(--yc-line);
    box-shadow: var(--yc-shadow); transition: all .2s;
}
.module-link:hover { color: var(--yc-primary); box-shadow: var(--yc-shadow-hover); transform: translateY(-3px); border-color: #cdefe0; }
.module-link .yc-icon-circle {
    width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%;
    background: linear-gradient(135deg, #e9fbf3, #d3f5e6); display: flex; align-items: center; justify-content: center;
    transition: all .2s;
}
.module-link:hover .yc-icon-circle { background: linear-gradient(135deg, var(--yc-primary), var(--yc-primary-deep)); }
.module-link .yc-icon-circle i { font-size: 24px; color: var(--yc-primary); transition: all .2s; }
.module-link:hover .yc-icon-circle i { color: #fff; }
.module-link span { font-size: 14px; }

/* CRUD 头部工具条 */
.yc-crud-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.yc-crud-title { font-size: 15px; font-weight: 700; color: var(--yc-text); display: flex; align-items: center; gap: 8px; }
.yc-crud-title::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--yc-primary); display: inline-block; }
.yc-crud-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.yc-crud-tools .yc-kw { display: inline-block; width: 160px; height: 32px; vertical-align: middle; border-radius: 6px; }
.yc-crud-tools .layui-btn { height: 32px; line-height: 32px; border-radius: 6px; }

/* 表格 */
.layui-table { border-radius: 8px; }
.layui-table thead tr { background: #f7fafc; }
.layui-table thead th { color: #4a5a6a; font-weight: 600; }
.layui-table tbody tr:hover { background: #f4fdf8; }
.layui-table td, .layui-table th { border-color: var(--yc-line); }
.layui-table-view { border-radius: 8px; border-color: var(--yc-line); }

/* 按钮 */
.layui-btn { border-radius: 6px; }
.layui-btn-normal { background: var(--yc-info); }
.layui-btn:not(.layui-btn-primary):not(.layui-btn-danger):not(.layui-btn-warm):not(.layui-btn-normal):not(.layui-btn-disabled) {
    background: var(--yc-primary);
}
.layui-btn:not(.layui-btn-primary):not(.layui-btn-danger):not(.layui-btn-warm):not(.layui-btn-normal):hover { opacity: .92; }

/* 表单 */
.layui-form-label { color: #4a5a6a; }
.layui-input, .layui-select, .layui-textarea { border-radius: 6px; border-color: #dfe6ec; }
.layui-input:focus, .layui-textarea:focus { border-color: var(--yc-primary) !important; box-shadow: 0 0 0 3px rgba(22,183,119,.12); }

/* 状态徽标 */
.yc-badge { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: 12px; line-height: 20px; }
.yc-badge-ok { background: #e8f9f1; color: #0e9c66; }
.yc-badge-warn { background: #fff7e6; color: #d48806; }
.yc-badge-danger { background: #fdecea; color: var(--yc-danger); }
.yc-badge-info { background: #eaf3ff; color: var(--yc-info); }

/* 空状态 */
.yc-empty { text-align: center; padding: 46px 0; color: #9aa8b6; }
.yc-empty i { font-size: 40px; display: block; margin-bottom: 10px; color: #cfd8e0; }

/* 登录页 */
.yc-login-body {
    background: linear-gradient(135deg, #0b3d2e 0%, #0f5138 55%, #147a55 100%);
    min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.yc-login-wrap {
    width: 880px; max-width: 100%; display: flex; background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}
.yc-login-brand {
    width: 44%; padding: 44px 36px; color: #fff;
    background: linear-gradient(150deg, #0e9c66 0%, #0a7a52 100%);
    display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.yc-login-brand::after { content: ''; position: absolute; right: -60px; bottom: -60px; width: 220px; height: 220px;
    border-radius: 50%; background: rgba(255,255,255,.08); }
.yc-login-brand h1 { font-size: 22px; line-height: 1.5; margin: 0 0 10px; font-weight: 700; }
.yc-login-brand p.yc-sub { font-size: 13px; opacity: .85; margin: 0; line-height: 1.8; }
.yc-login-brand ul { list-style: none; margin: 24px 0 0; padding: 0; font-size: 13px; }
.yc-login-brand ul li { margin: 12px 0; opacity: .92; display: flex; align-items: center; gap: 8px; }
.yc-login-brand ul li i { color: #b9ffdf; }
.yc-login-brand .yc-brand-foot { font-size: 12px; opacity: .6; position: relative; z-index: 1; }
.yc-login-form { flex: 1; padding: 48px 42px 38px; }
.yc-login-title { margin-bottom: 26px; }
.yc-login-title h2 { font-size: 20px; color: var(--yc-text); margin: 0 0 6px; font-weight: 700; }
.yc-login-title p { font-size: 12px; color: var(--yc-text-sub); margin: 0; }
.yc-login-form .layui-input { height: 44px; border-radius: 8px; }
.yc-login-form .layui-form-item { margin-bottom: 18px; }
.yc-captcha-row { display: flex; gap: 10px; align-items: center; }
.yc-captcha-row .layui-input { flex: 1; }
.yc-captcha-row img { height: 44px; width: 112px; border-radius: 8px; border: 1px solid #e6e6e6; cursor: pointer; }
.yc-login-btn {
    width: 100%; height: 44px; line-height: 44px; border-radius: 8px; font-size: 15px; letter-spacing: 4px;
    background: linear-gradient(135deg, var(--yc-primary), var(--yc-primary-deep));
    box-shadow: 0 8px 18px rgba(22, 183, 119, .3);
}
.yc-login-tip { text-align: center; color: #a2adb8; font-size: 12px; margin-top: 18px; }

/* 角色权限树 / 汇总条 */
.perm-tree { border: 1px solid var(--yc-line); border-radius: 8px; padding: 12px; max-height: 340px; overflow: auto; background: #fbfdfc; }
.perm-group { margin-bottom: 8px; font-weight: 600; color: var(--yc-text); }
.perm-children { margin: 4px 0 10px 22px; font-weight: 400; }
.perm-children .layui-form-checkbox { margin-right: 12px; }
.yc-lookup-tip { display: inline-block; margin-left: 10px; font-size: 12px; color: var(--yc-primary); }
.yc-sum-box { padding: 10px 14px; background: #f2fbf7; border: 1px solid #d9f2e6; border-radius: 8px; font-size: 13px; color: #4a5a6a; margin-bottom: 12px; }
.yc-sum-box .yc-sum-num { color: var(--yc-danger); font-weight: 700; font-size: 15px; }
.yc-notice-bar { margin-bottom: 12px; font-size: 13px; }
.yc-tabs .layui-btn + .layui-btn { margin-left: 6px; }
.yc-tabs .layui-btn-primary.layui-this { border-color: var(--yc-primary); color: var(--yc-primary); }

/* 欢迎横幅 */
.yc-hero {
    background: linear-gradient(120deg, #0e9c66 0%, #12a86f 60%, #16b777 100%);
    color: #fff; border-radius: var(--yc-radius); padding: 22px 26px; margin-bottom: 16px;
    box-shadow: 0 10px 26px rgba(16, 150, 105, .25); position: relative; overflow: hidden;
}
.yc-hero::after { content: ''; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.1); }
.yc-hero h2 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.yc-hero p { margin: 0; font-size: 13px; opacity: .9; }
.yc-hero .yc-hero-meta { margin-top: 12px; font-size: 12px; opacity: .85; display: flex; gap: 18px; flex-wrap: wrap; }

/* 快捷入口卡 */
.yc-quick-card { background: #fff; border: 1px solid var(--yc-line); border-radius: var(--yc-radius); box-shadow: var(--yc-shadow); height: 100%; }
.yc-quick-card .layui-card-header { display: flex; align-items: center; gap: 8px; }
.yc-quick-card .layui-card-header i { color: var(--yc-primary); }
.yc-quick-card .layui-card-body { display: flex; flex-wrap: wrap; gap: 8px; }

/* 页脚 */
.yc-footer { text-align: center; color: #a2adb8; font-size: 12px; padding: 14px; }

/* 响应式 */
@media (max-width: 768px) {
    .yc-login-wrap { flex-direction: column; width: 100%; }
    .yc-login-brand { width: 100%; padding: 26px 24px; }
    .yc-login-brand ul, .yc-login-brand .yc-brand-foot { display: none; }
    .yc-login-form { padding: 28px 22px; }
    .yc-page-title { display: none; }
    .stat-num { font-size: 20px; }
    .yc-crud-tools { width: 100%; }
    .yc-crud-tools .yc-kw { width: 120px; }
}
