/* ============= 云信箱 工会后台样式 ============= */

* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; }

/* 头部 */
.cm-header {
    background: linear-gradient(90deg, #1E4E84 0%, #2B6CB0 100%) !important;
    border-bottom: 2px solid #1E4E84;
}
.cm-header .logo {
    display: flex; align-items: center;
    height: 60px; padding: 0 20px;
    color: #fff; font-size: 18px; font-weight: 600;
}
.cm-header .logo-icon { font-size: 22px; margin-right: 8px; }
.cm-header .layui-nav { background: transparent !important; }
/* 仅匹配顶部直接子项，避免渗透到下拉子菜单 */
.cm-header .layui-nav > .layui-nav-item > a { color: rgba(255,255,255,0.92); }
.cm-header .layui-nav > .layui-nav-item > a:hover { color: #fff; }
/* 下拉子菜单（白底深色字） */
.cm-header .layui-nav-child { background: #fff !important; }
.cm-header .layui-nav-child a { color: #4A5568 !important; }
.cm-header .layui-nav-child a:hover { color: #2B6CB0 !important; background: #F4F6FA !important; }

/* 侧边栏（Layui 2.9 用 flex 布局，不再用 line-height 居中） */
.cm-side .layui-nav-tree { background: #2C3E50 !important; width: 200px; }
.cm-side .layui-nav-tree .layui-nav-item a {
    color: rgba(255,255,255,0.85);
    display: flex; align-items: center;
    padding: 0 20px; height: 50px;
}
.cm-side .layui-nav-tree .layui-nav-item a i { font-size: 18px; margin-right: 8px; }
.cm-side .layui-nav-tree .layui-nav-item.layui-this,
.cm-side .layui-nav-tree .layui-nav-item.layui-this > a { background: #2B6CB0 !important; color: #fff; }
.cm-side .layui-nav-tree .layui-nav-item > a:hover { background: rgba(43,108,176,0.45) !important; }

/* 主体 */
.cm-body { left: 200px !important; background: #F4F6FA; }
.cm-breadcrumb {
    height: 44px; line-height: 44px;
    padding: 0 24px; background: #fff;
    border-bottom: 1px solid #ECEFF5;
}
.cm-content { padding: 20px 24px 60px; min-height: calc(100vh - 104px); }
.cm-footer {
    text-align: center; padding: 16px 0;
    color: #8A94A6; font-size: 12px;
    border-top: 1px solid #ECEFF5; background: #fff;
    position: fixed; bottom: 0; left: 200px; right: 0;
}

/* 通用卡片 */
.cm-card {
    background: #fff; border-radius: 6px;
    box-shadow: 0 1px 8px rgba(28,50,84,0.05);
    margin-bottom: 16px;
}
.cm-card-title {
    padding: 14px 20px; border-bottom: 1px solid #ECEFF5;
    font-weight: 600; color: #1A2233; font-size: 15px;
    display: flex; align-items: center; justify-content: space-between;
}
.cm-card-title::before {
    content: ""; display: inline-block;
    width: 3px; height: 14px; background: #2B6CB0;
    margin-right: 8px; border-radius: 2px; vertical-align: middle;
}
.cm-card-body { padding: 18px 20px; }

/* 状态标签 */
.cm-tag { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px; line-height: 1.6; }
.cm-tag.margin { margin: 2px 4px; }
.cm-tag-pending   { background: #FDF3E0; color: #D4860F; }
.cm-tag-accepted  { background: #EEE9FD; color: #6C5CE7; }
.cm-tag-dispatching { background: #EEE9FD; color: #6C5CE7; }
.cm-tag-processing { background: #EAF1FB; color: #2B6CB0; }
.cm-tag-replied   { background: #E7F6EE; color: #2BA471; }
.cm-tag-closed    { background: #E7F6EE; color: #2BA471; }
.cm-tag-overdue   { background: #FDECEC; color: #E54848; }
.cm-tag-urgent    { background: #FDECEC; color: #E54848; font-weight: 600; }
.cm-tag-anonymous { background: #EEE9FD; color: #6C5CE7; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat-card {
    background: #fff; border-radius: 6px;
    padding: 18px 20px; box-shadow: 0 1px 8px rgba(28,50,84,0.05);
    border-left: 4px solid #2B6CB0;
}
.stat-card.success { border-left-color: #2BA471; }
.stat-card.warning { border-left-color: #F5A623; }
.stat-card.danger  { border-left-color: #E54848; }
.stat-card.notice  { border-left-color: #6C5CE7; }
.stat-card .stat-icon {
    width: 48px; height: 48px; border-radius: 8px;
    background: #EAF1FB; color: #2B6CB0;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; float: right;
}
.stat-card.success .stat-icon { background: #E7F6EE; color: #2BA471; }
.stat-card.warning .stat-icon { background: #FDF3E0; color: #D4860F; }
.stat-card.danger  .stat-icon { background: #FDECEC; color: #E54848; }
.stat-card.notice  .stat-icon { background: #EEE9FD; color: #6C5CE7; }
.stat-card .stat-num { font-size: 28px; font-weight: 700; color: #1A2233; line-height: 1.2; }
.stat-card .stat-label { font-size: 13px; color: #8A94A6; margin-top: 4px; }

/* 过滤栏（Layui 2.9 用 flex 布局替代 inline-block，避免基线对齐问题） */
.filter-bar {
    background: #fff; padding: 16px 20px; margin-bottom: 16px;
    border-radius: 6px; box-shadow: 0 1px 8px rgba(28,50,84,0.05);
    display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px;
}
.filter-bar .layui-form-item { margin-bottom: 0; display: flex; align-items: center; }
.filter-bar .layui-form-label { width: auto; padding: 0 8px 0 0; line-height: 38px; }

/* 表单页：统一 label 宽度和右侧对齐 */
.cm-form .layui-form-label { width: 110px; font-weight: 500; }
.cm-form .layui-input-block { margin-left: 140px; }
.cm-form .layui-input-inline { margin-left: 0; }
/* 子 label（统计数据区域的内联 label） */

.cm-form .layui-form-label.cm-form-sub { width: 100px; margin-left: 10px; font-weight: 500; }
.cm-form .layui-input-inline { width: 100px; }
.filter-bar .layui-input-inline { width: auto; }
.filter-bar .layui-input { width: 160px; }

/* 表格 */
.cm-table { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 8px rgba(28,50,84,0.05); }
.cm-table .layui-table { margin: 0; }
.cm-table .layui-table thead { background: #F8FAFC; }
.cm-table .layui-table th { font-weight: 600; color: #1A2233; }
.cm-table .layui-table th, .cm-table .layui-table td { text-align: center; }

/* 意见列表：*/
.opinion-list-table th:nth-child(2),
.opinion-list-table td:nth-child(2) { text-align: left; }

/* 意见回收站：*/
.opinion-trash-table th:nth-child(2),
.opinion-trash-table td:nth-child(2) { text-align: left; }

/* 通报列表：标题列居左（第2列），其余居中 */
.notice-list-table th:nth-child(2),
.notice-list-table td:nth-child(2) { text-align: left; }

/* 部门列表：名称列居左（第2列），其余居中 */
.department-list-table th:nth-child(2),
.department-list-table td:nth-child(2) { text-align: left; }

/* 时间轴（详情页） */
.cm-timeline { padding: 10px 0; }
.cm-timeline-item {
    position: relative; padding: 0 0 24px 32px;
    border-left: 2px solid #ECEFF5;
}
.cm-timeline-item:last-child { border-left-color: transparent; }
.cm-timeline-item .dot {
    position: absolute; left: -7px; top: 2px;
    width: 12px; height: 12px; border-radius: 50%;
    background: #C0C4CC; border: 2px solid #fff;
    box-shadow: 0 0 0 2px #ECEFF5;
}
.cm-timeline-item.done .dot { background: #2BA471; box-shadow: 0 0 0 2px #E7F6EE; }
.cm-timeline-item.active .dot { background: #2B6CB0; box-shadow: 0 0 0 2px #EAF1FB; }
.cm-timeline-item.warn .dot { background: #E54848; box-shadow: 0 0 0 2px #FDECEC; }
.cm-timeline-item .time { font-size: 12px; color: #8A94A6; }
.cm-timeline-item .title { font-size: 14px; color: #1A2233; font-weight: 500; margin: 2px 0 4px; }
.cm-timeline-item .desc { font-size: 13px; color: #4A5568; }

/* 详情信息行 */
.detail-section { background: #fff; border-radius: 6px; margin-bottom: 16px; box-shadow: 0 1px 8px rgba(28,50,84,0.05); }
.detail-section .detail-title { padding: 14px 20px; border-bottom: 1px solid #ECEFF5; font-weight: 600; }
.detail-section .detail-body { padding: 18px 20px; }
.detail-row { padding: 10px 0; border-bottom: 1px dashed #F0F2F7; }
.detail-row:last-child { border-bottom: none; }
.detail-row .label { display: inline-block; width: 110px; color: #8A94A6; }
.detail-row .value { color: #1A2233; }
.detail-row .value.urgent { color: #E54848; font-weight: 600; }

/* 登录页 */
.login-page {
    background: linear-gradient(135deg, #1E4E84 0%, #2B6CB0 50%, #4B8FD1 100%);
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
}
.login-box {
    width: 380px; background: #fff;
    border-radius: 10px; padding: 36px 36px 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.login-box .login-title {
    text-align: center; font-size: 22px; font-weight: 700;
    color: #1E4E84; margin-bottom: 6px;
}
.login-box .login-sub {
    text-align: center; font-size: 13px;
    color: #8A94A6; margin-bottom: 28px;
}
.login-box .layui-form-item { margin-bottom: 18px; }
.login-box .layui-input { height: 44px; }
.login-box .login-btn {
    width: 100%; height: 44px;
    background: linear-gradient(90deg, #2B6CB0 0%, #1E4E84 100%);
    border: none; font-size: 16px;
}
.login-box .login-tip {
    margin-top: 16px; padding: 10px 12px;
    background: #4d350a; border-radius: 4px;
    font-size: 12px; color: #D4860F; line-height: 1.6;
}
.login-box .login-logo {
    text-align: center; font-size: 40px; color: #2B6CB0;
    margin-bottom: 8px;
}

/* 控制台：*/
.cm-table.index .layui-table th, .cm-table.index .layui-table td { padding: 10px 20px; }
.quick-action { text-align: center; }
.quick-action .layui-btn { min-width:30%; margin: 8px 5px; }