/* ==========================================================================
   统一后台主题（覆盖所有 #parse("sys/header.html") 的页面）
   说明：只调整视觉与布局，不改变任何页面逻辑
   ========================================================================== */

body {
    background: #f3f5f9;
    color: #515a6e;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

#rrapp {
    margin: 0;
    padding: 16px 18px 24px;
    min-height: 100%;
    box-sizing: border-box;
}

/* ------------------------------ 顶部工具栏 ------------------------------ */
.ivu-row:has(> .search-group),
.ivu-row:has(> .buttons-group),
#rrapp > div > .ivu-row:first-child {
    margin: 0 0 14px 0 !important;
    padding: 10px 14px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(20, 37, 63, 0.06);
}

.search-group {
    display: inline;
    padding-left: 0;
    padding-top: 0;
}

.buttons-group {
    display: inline;
    float: right;
    padding-right: 0;
}

.search-group .ivu-btn:not(:first-child),
.buttons-group .ivu-btn:not(:first-child) {
    margin-left: 8px;
}

/* ------------------------------ 卡片 ------------------------------ */
.ivu-card {
    background: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(20, 37, 63, 0.06);
}

.ivu-card-head {
    padding: 14px 18px;
    border-bottom: 1px solid #f2f4f7;
}

.ivu-card-head p {
    color: #333;
    font-size: 15px;
    font-weight: 600;
}

.ivu-card-body {
    padding: 18px;
}

/* ------------------------------ 表格（jqGrid / bootstrap） ------------------------------ */
.ui-jqgrid {
    background: #ffffff;
    border: 1px solid #ebeef5;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(20, 37, 63, 0.06);
    overflow: hidden;
}

.ui-jqgrid .ui-jqgrid-view {
    background: #ffffff;
}

.ui-jqgrid .ui-jqgrid-htable th {
    background: #f7f9fc;
    color: #515a6e;
    font-weight: 600;
    height: 42px;
    border-color: #ebeef5;
}

.ui-jqgrid .ui-jqgrid-htable th div {
    padding: 4px 6px;
}

.ui-jqgrid .ui-jqgrid-btable tr.jqgrow > td {
    padding: 9px 8px;
    border-color: #f0f2f5;
    color: #515a6e;
}

.ui-jqgrid .ui-jqgrid-btable tr.jqgrow:hover > td {
    background: #f5faff;
}

.ui-jqgrid .ui-jqgrid-btable tr.jqgrow.ui-state-highlight > td {
    background: #e8f3ff !important;
}

.ui-jqgrid-pager {
    background: #ffffff;
    border: 1px solid #ebeef5;
    border-top: 1px solid #f0f2f5;
    border-radius: 0 0 8px 8px;
    margin-top: -1px;
    box-shadow: 0 2px 10px rgba(20, 37, 63, 0.06);
    min-height: 44px;
    padding: 4px 8px;
}

.ui-jqgrid .ui-pg-table td {
    padding: 4px 6px;
    color: #515a6e;
}

.ui-jqgrid .ui-pg-input,
.ui-jqgrid .ui-pg-selbox {
    height: 26px;
    border: 1px solid #dcdee2;
    border-radius: 4px;
    color: #515a6e;
}

.table > thead > tr > th {
    background: #f7f9fc;
    color: #515a6e;
    border-bottom: 1px solid #ebeef5;
}

.table > tbody > tr > td {
    border-color: #f0f2f5;
}

.table-bordered {
    border-color: #ebeef5;
}

/* ------------------------------ iView 表格 / 分页 ------------------------------ */
.ivu-table {
    border-radius: 6px;
    overflow: hidden;
}

.ivu-table th {
    background: #f7f9fc;
    color: #515a6e;
    font-weight: 600;
}

.ivu-page {
    margin-top: 14px;
    text-align: right;
}

/* ------------------------------ 表单 ------------------------------ */
.ivu-form-item {
    margin-bottom: 18px;
}

/* 页面级表单卡片内容居中，避免宽屏下拉得过长 */
#rrapp > .ivu-card .ivu-form {
    max-width: 860px;
    margin: 0 auto;
}

.ivu-form-item-label {
    color: #515a6e;
}

.ivu-input,
.ivu-input-number,
.ivu-select-selection {
    border-radius: 4px;
}

.ivu-input:focus,
.ivu-input:hover,
.ivu-select-selection:hover {
    border-color: #57a3f3;
}

.ivu-input:focus {
    box-shadow: 0 0 0 2px rgba(45, 140, 240, 0.12);
}

.ivu-checkbox-wrapper,
.ivu-radio-wrapper {
    margin-right: 14px;
}

/* ------------------------------ 按钮 ------------------------------ */
.ivu-btn {
    border-radius: 4px;
    font-size: 13px;
}

.ivu-btn > i.fa {
    margin-right: 4px;
}

/* ------------------------------ 弹窗 ------------------------------ */
.ivu-modal-content {
    border-radius: 8px;
    overflow: hidden;
}

.ivu-modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid #f2f4f7;
}

.ivu-modal-header p {
    color: #333;
    font-weight: 600;
}

.ivu-modal-body {
    padding: 18px;
}

.ivu-modal-footer {
    padding: 12px 18px;
    border-top: 1px solid #f2f4f7;
}

.ivu-select-dropdown {
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(20, 37, 63, 0.12);
}

.ivu-message-notice-content {
    border-radius: 6px;
}

/* ------------------------------ 页签 ------------------------------ */
.ivu-tabs-bar {
    margin-bottom: 14px;
}

.ivu-tabs-nav .ivu-tabs-tab {
    padding: 8px 18px;
    font-size: 14px;
}

/* ------------------------------ 标签 ------------------------------ */
.label {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: normal;
}

.label-success {
    background: #f6ffed;
    color: #52c41a;
}

.label-danger {
    background: #fff1f0;
    color: #f5222d;
}

.label-primary {
    background: #e8f3ff;
    color: #2d8cf0;
}

/* ------------------------------ 欢迎页 / 富文本卡片 ------------------------------ */
.wrapper-content {
    padding: 16px 18px 24px;
}

.wrapper-content .ibox {
    margin-bottom: 16px;
    background: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(20, 37, 63, 0.06);
}

.wrapper-content .ibox-title {
    padding: 14px 18px;
    background: #ffffff;
    border-bottom: 1px solid #f2f4f7;
}

.wrapper-content .ibox-title h1 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.wrapper-content .ibox-content {
    padding: 18px;
}

.signin-info ul {
    margin: 0;
    padding-left: 18px;
    line-height: 2;
}

/* ------------------------------ 滚动条 ------------------------------ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: #c9d0da;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aab4c2;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* ------------------------------ 小屏适配 ------------------------------ */
@media (max-width: 768px) {
    #rrapp {
        padding: 10px;
    }

    .ivu-row:has(> .search-group),
    .ivu-row:has(> .buttons-group) {
        padding: 8px 10px;
    }

    .buttons-group {
        float: none;
        display: block;
        margin-top: 8px;
    }

    .search-group .ivu-btn,
    .buttons-group .ivu-btn {
        margin-left: 0;
        margin-right: 8px;
    }
}
