/**
 * 管理后台壳层样式：侧栏、顶栏、登录页背景。
 * 表单、表格、按钮等使用 Element UI 2 theme-chalk（见 layout 引入的 index.css）。
 */
:root {
    --eea-primary: #409eff;
    --eea-success: #67c23a;
    --eea-warning: #e6a23c;
    --eea-text: #303133;
    --eea-text-secondary: #606266;
    --eea-text-placeholder: #c0c4cc;
    --eea-border-light: #ebeef5;
    --eea-bg: #f0f2f5;
    --eea-sidebar-bg: #304156;
    --eea-sidebar-text: #bfcbd9;
    --eea-sidebar-active: #409eff;
    --eea-menu-hover: #263445;
    --eea-header-height: 50px;
    --eea-sidebar-width: 220px;
    --eea-radius: 4px;
    --eea-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
    --eea-font: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ========== 登录页 ========== */
body.eea-login {
    margin: 0;
    min-height: 100vh;
    font-family: var(--eea-font);
    font-size: 14px;
    color: var(--eea-text);
    background: var(--eea-bg);
    background-image: linear-gradient(135deg, #e8f4ff 0%, var(--eea-bg) 45%, #f5f7fa 100%);
}

.eea-login__wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.eea-login-card {
    width: 100%;
    max-width: 420px;
}

.eea-login-card .el-card__header {
    padding: 18px 20px;
    border-bottom: none;
}

.eea-login-card .el-card__body {
    padding: 10px 20px 28px;
}

.eea-login__brand {
    text-align: center;
}

.eea-login__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    border-radius: var(--eea-radius);
    background: linear-gradient(135deg, var(--eea-primary), #66b1ff);
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.35);
}

.eea-login__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--eea-text);
}

.eea-login__alert {
    margin-bottom: 16px;
}

/* ========== 后台布局（侧栏 + 顶栏） ========== */
body.eea-layout {
    margin: 0;
    min-height: 100vh;
    font-family: var(--eea-font);
    font-size: 14px;
    color: var(--eea-text);
    background: var(--eea-bg);
}

.eea-app {
    display: flex;
    min-height: 100vh;
}

.eea-sidebar {
    width: var(--eea-sidebar-width);
    flex-shrink: 0;
    background: var(--eea-sidebar-bg);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 21, 41, 0.12);
}

.eea-sidebar__logo {
    height: var(--eea-header-height);
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.eea-sidebar__logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border-radius: var(--eea-radius);
    background: rgba(64, 158, 255, 0.25);
    color: var(--eea-primary);
    font-size: 14px;
    font-weight: 700;
}

.eea-menu {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.eea-menu__item {
    display: block;
    padding: 12px 20px;
    color: var(--eea-sidebar-text);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.eea-menu__item:hover {
    background: var(--eea-menu-hover);
    color: #fff;
}

.eea-menu__item.is-active {
    background: var(--eea-menu-hover);
    color: var(--eea-sidebar-active);
    border-left-color: var(--eea-primary);
}

.eea-sidebar__foot {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.eea-sidebar__link {
    display: block;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--eea-sidebar-text);
    text-decoration: none;
    border-radius: var(--eea-radius);
    transition: background 0.15s, color 0.15s;
}

.eea-sidebar__link:hover {
    background: var(--eea-menu-hover);
    color: #fff;
}

.eea-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.eea-navbar {
    height: var(--eea-header-height);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    box-shadow: var(--eea-shadow);
    z-index: 10;
}

.eea-navbar__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eea-navbar__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--eea-text);
}

.eea-navbar__crumb {
    font-size: 13px;
    color: var(--eea-text-placeholder);
}

.eea-navbar__right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eea-content {
    flex: 1;
    padding: 20px;
    overflow: auto;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 主区域卡片、表格横向铺满（避免表格仅随内容缩在左侧） */
.eea-content > .el-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.eea-content > .el-card > .el-card__body {
    width: 100%;
    box-sizing: border-box;
}

/* 订单列表卡片、系统配置卡片：白色区域横向铺满主内容区 */
.eea-card-orders-full,
.eea-card-settings-full {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.eea-card-settings-full .el-card__body {
    width: 100%;
    box-sizing: border-box;
}

.eea-content-flash {
    margin-bottom: 16px;
}

/* ========== 概览统计卡片内布局 ========== */
.eea-stat {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.eea-stat__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.eea-stat__icon--blue {
    background: #ecf5ff;
    color: var(--eea-primary);
}

.eea-stat__icon--green {
    background: #f0f9eb;
    color: var(--eea-success);
}

.eea-stat__icon--orange {
    background: #fdf6ec;
    color: var(--eea-warning);
}

.eea-stat__body {
    flex: 1;
    min-width: 0;
}

.eea-stat__label {
    font-size: 13px;
    color: var(--eea-text-secondary);
    margin-bottom: 6px;
}

.eea-stat__value {
    font-size: 24px;
    font-weight: 600;
    color: var(--eea-text);
    line-height: 1.2;
}

.eea-stat__hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--eea-text-placeholder);
}

/* ========== 订单列表：展开行与子表 ========== */

/* 主表 + 子表：字号加大（Element small 默认约 12px） */
.eea-card-orders-full .eea-table-orders--single .el-table__cell .cell,
.eea-sub-inner .eea-sub-table-wrap .el-table__cell .cell {
    font-size: 14px;
    line-height: 1.55;
}

/* 主单表：单表 thead + tbody + colgroup，避免 Element 官方「表头/表体双 table」在 PHP 静态页下列宽错位 */
.eea-table-orders--single {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.eea-table-orders--single.el-table {
    flex: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 100%;
    display: block;
}

.eea-card-orders-full .eea-table-orders--single.el-table {
    width: 100% !important;
    min-width: 100%;
}

.eea-table-orders--single .el-table__body-wrapper {
    width: 100% !important;
    max-width: none !important;
    min-width: 100%;
    display: block;
}

.eea-table-orders--single .eea-table-unified {
    width: 100% !important;
    min-width: 100%;
    max-width: none !important;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

.eea-table-orders--single .eea-table-unified thead .el-table__cell {
    background-color: #fff;
}

/* 四列比例之和为 100%，随容器拉伸 */
.eea-table-orders--single col.eea-col-order-no {
    width: 30%;
}

.eea-table-orders--single col.eea-col-subcnt {
    width: 12%;
}

.eea-table-orders--single col.eea-col-time {
    width: 46%;
}

.eea-table-orders--single col.eea-col-actions {
    width: 12%;
    min-width: 72px;
}

.eea-table-orders--single .eea-th-actions {
    text-align: right !important;
}

/* 展开行内子单表：与主表同宽 100% */
.eea-tr-sub > .el-table__cell {
    width: 100%;
    padding: 0 !important;
    background: #fafbfc;
}

.eea-tr-sub > .el-table__cell > .cell {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.eea-sub-inner {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 16px 16px;
    overflow-x: auto;
}

.eea-sub-table-wrap.el-table {
    flex: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 100%;
    display: block;
}

.eea-sub-inner .eea-sub-table-wrap .el-table__body-wrapper {
    width: 100% !important;
    max-width: none !important;
    min-width: 100%;
    display: block;
}

.eea-sub-inner .eea-sub-table-wrap .eea-table-unified {
    width: max-content !important;
    min-width: 100%;
    max-width: none !important;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

/* 子表：ID 固定 100px；爱回收/服务商子单号列最小宽度保证单号一行展示，整表可横向滚动 */
.eea-sub-inner .eea-sub-table-wrap .eea-sub-col-id {
    width: 100px;
}

.eea-sub-inner .eea-sub-table-wrap .eea-sub-col-ahs {
    min-width: 280px;
}

.eea-sub-inner .eea-sub-table-wrap .eea-sub-col-prov {
    min-width: 280px;
}

.eea-sub-col-time {
    min-width: 150px;
}

.eea-sub-col-op {
    min-width: 88px;
}

.eea-sub-col-st {
    min-width: 72px;
}

.eea-sub-col-fetch {
    min-width: 120px;
}

.eea-sub-inner .eea-sub-table-wrap .eea-table-unified th:nth-child(1),
.eea-sub-inner .eea-sub-table-wrap .eea-table-unified td:nth-child(1) {
    width: 100px;
    max-width: 100px;
    box-sizing: border-box;
}

.eea-sub-inner .eea-sub-table-wrap .eea-table-unified th:nth-child(2) .cell,
.eea-sub-inner .eea-sub-table-wrap .eea-table-unified th:nth-child(3) .cell,
.eea-sub-inner .eea-sub-table-wrap .eea-table-unified td:nth-child(2) .cell,
.eea-sub-inner .eea-sub-table-wrap .eea-table-unified td:nth-child(3) .cell {
    white-space: nowrap;
}

.eea-tr-sub[hidden] {
    display: none !important;
}

.eea-text-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
}

.eea-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 子单展开/收起：单 span 文案由 JS 切换，避免与 Element .el-button span 的 display 冲突 */
.eea-btn-sub-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.eea-btn-sub-toggle.is-open .eea-sub-toggle-icon {
    transform: rotate(180deg);
}

.eea-btn-sub-toggle .eea-sub-toggle-icon {
    transition: transform 0.2s ease;
    display: inline-block;
    flex-shrink: 0;
}

.eea-panel-meta {
    margin-left: 10px;
    font-size: 13px;
    font-weight: 400;
    color: var(--eea-text-placeholder);
}

.eea-pager {
    padding: 12px 16px;
    border-top: 1px solid var(--eea-border-light);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* 分页：PHP 渲染的页码链接接入 el-pager */
.el-pager li.number > a {
    display: block;
    height: 100%;
    min-width: 100%;
    padding: 0 4px;
    color: inherit;
    text-decoration: none;
    text-align: center;
    font-size: 13px;
    line-height: 28px;
    box-sizing: border-box;
}

.el-pager li.number > a:hover {
    color: #409eff;
}

.el-pager li.number.active span {
    display: inline-block;
    min-width: 28px;
    line-height: 28px;
    text-align: center;
    font-size: 13px;
}

@media (max-width: 768px) {
    .eea-content {
        padding: 12px;
    }
}
