/* 后台统一主题：深海军蓝 + 鼠尾草绿 + 暖白 */
:root {
    --admin-ink: #223047;
    --admin-ink-soft: #3d4c62;
    --admin-surface: #fffdf9;
    --admin-canvas: #eef2f1;
    --admin-line: #dce5e1;
    --admin-green: #3d927e;
    --admin-green-dark: #2f7566;
    --admin-green-pale: #e8f3ef;
    --admin-gold: #c9953d;
    --admin-muted: #718096;
}

html,
body {
    background: var(--admin-canvas);
    color: var(--admin-ink);
    font-family: "Microsoft YaHei", "Segoe UI", Roboto, Arial, sans-serif;
}

a { color: var(--admin-green); }
a:hover, a:focus { color: var(--admin-green-dark); }

/* 顶栏与品牌区 */
.am-topbar-inverse,
.admin-header {
    background: var(--admin-ink);
    border-color: var(--admin-ink);
    box-shadow: 0 2px 12px rgba(34, 48, 71, .18);
}

.am-topbar-inverse .am-topbar-nav > li > a,
.am-topbar-inverse .am-topbar-brand,
.am-topbar-inverse .tpl-topbar-list-button,
.am-topbar-inverse .tpl-header-nav-hover-ico,
.am-topbar-inverse .tpl-header-list-link {
    color: #f7faf9 !important;
}

.am-topbar-inverse .am-topbar-nav > li > a:hover,
.am-topbar-inverse .am-topbar-nav > li > a:focus,
.am-topbar-inverse .am-topbar-nav > li.am-active > a,
.am-topbar-inverse .am-topbar-nav > li.am-active > a:hover {
    background: rgba(255,255,255,.09);
    color: #ffffff !important;
}

/* 左侧导航：保持深色框架，当前项使用柔和绿色 */
.tpl-navbar-collapse,
.tpl-left-nav,
.admin-sidebar {
    background: var(--admin-ink);
    border-radius: 0;
    box-shadow: none;
}

.tpl-page-container-nav-heading,
.tpl-left-nav-title { color: #b6d8ce; }

.admin-sidebar-list li,
.admin-sidebar-list li a,
.tpl-left-nav-item .nav-link,
.tpl-left-nav-item .nav-link span,
.tpl-left-nav-sub-menu a span {
    color: #dce8e4;
}

.tpl-page-container-ico,
.tpl-left-nav-item .nav-link i,
.tpl-left-nav-sub-menu a i { color: #9cb8b0; }

.tpl-sidebar-list li.tpl-sidebar-list-hover:hover,
.tpl-sidebar-list li.tpl-sidebar-list-hover.active,
.tpl-sidebar-list-hover-show:hover,
.tpl-sidebar-list-hover-show.active,
.admin-sidebar-sub li:hover,
.admin-sidebar-sub li.active,
.tpl-left-nav-item .nav-link:hover,
.tpl-left-nav-item .nav-link.active {
    background: var(--admin-green-dark);
    border-left-color: #d2eadf !important;
}

.tpl-sidebar-list li.tpl-sidebar-list-hover:hover a,
.tpl-sidebar-list li.tpl-sidebar-list-hover.active a,
.tpl-sidebar-list li.tpl-sidebar-list-hover:hover .tpl-page-container-ico,
.tpl-sidebar-list li.tpl-sidebar-list-hover.active .tpl-page-container-ico,
.tpl-left-nav-item .nav-link:hover span,
.tpl-left-nav-item .nav-link.active span,
.tpl-left-nav-item .nav-link:hover i,
.tpl-left-nav-item .nav-link.active i,
.tpl-left-nav-sub-menu a:hover span,
.tpl-left-nav-sub-menu a:hover i {
    color: #ffffff;
}

/* 内容区域、面包屑与卡片 */
.tpl-page-container { background: var(--admin-canvas); }
.tpl-content-wrapper { padding-top: 18px; }
.tpl-content-page-title {
    color: var(--admin-ink);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: .01em;
}

.am-breadcrumb {
    background: transparent;
    box-shadow: none;
    color: var(--admin-muted);
    margin-bottom: 16px;
}
.am-breadcrumb > li > a { color: var(--admin-green); }
.am-breadcrumb > li.am-active { color: var(--admin-muted); }

.tpl-portlet-components,
.note,
.am-panel,
.am-modal-dialog {
    background: var(--admin-surface);
    border: 1px solid var(--admin-line);
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(34, 48, 71, .07);
}

.tpl-portlet-components {
    padding: 16px 22px 20px;
    margin-bottom: 22px;
}

.tpl-portlet-components .portlet-title,
.portlet-title {
    background: transparent;
    border-bottom: 1px solid var(--admin-line);
    min-height: 54px;
    margin-bottom: 16px;
}

.tpl-portlet-components .portlet-title .caption,
.portlet-title .caption,
.note h3 {
    color: var(--admin-ink);
    font-weight: 700;
}

.portlet-title .caption.font-green,
.tpl-color-success { color: var(--admin-green) !important; }

/* 表单、按钮和提示 */
.tpl-amazeui-form { padding: 4px 0; }
.am-form-label { color: var(--admin-ink-soft); font-weight: 600; }

.am-form input[type="text"],
.am-form input[type="password"],
.am-form input[type="number"],
.am-form select,
.am-form textarea,
.am-u-sm-9 input {
    background: #ffffff;
    border: 1px solid #cfdad6;
    border-radius: 7px;
    color: var(--admin-ink);
    box-shadow: none;
}

.am-form input:focus,
.am-form select:focus,
.am-form textarea:focus,
.am-u-sm-9 input:focus {
    border-color: var(--admin-green);
    box-shadow: 0 0 0 3px rgba(61, 146, 126, .14);
}

.am-btn {
    border-radius: 7px;
    font-weight: 600;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.am-btn:hover { transform: translateY(-1px); }
.am-btn-primary,
.am-btn-success,
.tpl-am-btn-success {
    background: var(--admin-green);
    border-color: var(--admin-green) !important;
    color: #ffffff;
}
.am-btn-primary:hover,
.am-btn-primary:focus,
.am-btn-success:hover,
.am-btn-success:focus,
.tpl-am-btn-success:hover,
.tpl-am-btn-success:focus {
    background: var(--admin-green-dark);
    border-color: var(--admin-green-dark) !important;
    box-shadow: 0 5px 12px rgba(47, 117, 102, .22);
    color: #ffffff;
}
.am-btn-warning { background: var(--admin-gold); border-color: var(--admin-gold); color: #fff; }

.am-alert-warning,
.am-alert-secondary {
    background: #fff8e8;
    border-color: #eedaa7;
    color: #7a5a1c;
}
.am-alert-success {
    background: var(--admin-green-pale);
    border-color: #b9dccc;
    color: var(--admin-green-dark);
}

/* 表格与列表 */
.am-table { background: var(--admin-surface); color: var(--admin-ink-soft); }
.am-table > thead > tr > th {
    background: #edf4f1;
    color: var(--admin-ink);
    border-bottom-color: #d4e2dc;
    font-weight: 700;
}
.am-table > tbody > tr > td,
.am-table > tbody > tr > th,
.am-table > tfoot > tr > td,
.am-table > tfoot > tr > th,
.am-table > thead > tr > td,
.am-table > thead > tr > th { border-top-color: var(--admin-line); color: var(--admin-ink-soft); }
.am-table-striped > tbody > tr:nth-child(odd) > td,
.am-table-striped > tbody > tr:nth-child(odd) > th { background: #f7faf8; }
.am-table-hover > tbody > tr:hover > td { background: #eef6f2; }

.am-pagination > .am-active > a,
.tpl-pagination .am-active a {
    background: var(--admin-green);
    border-color: var(--admin-green);
    color: #fff;
}
.am-pagination > li > a,
.tpl-pagination li a { color: var(--admin-green); }

@media (max-width: 768px) {
    .tpl-content-wrapper { padding-top: 12px; }
    .tpl-content-page-title { font-size: 22px; }
    .tpl-portlet-components { border-radius: 8px; padding: 14px; }
}
