/* M6 Layui 主题：在 layui.css 之后加载，保留老页面的表格与表单行为 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    font-size: 13px;
    color: #24313b;
    background: #f4f8fb;
}

.app-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 18px 22px 40px;
}

.app-title {
    font-size: 20px;
    font-weight: 700;
    color: #0b5f86;
    margin: 0 0 4px;
}

.app-sub {
    color: #687985;
    margin: 0 0 14px;
    line-height: 1.7;
}

.app-card {
    background: #fff;
    border: 1px solid #e1eaf0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(16, 63, 88, .05);
    padding: 16px 18px;
    margin-bottom: 14px;
}

.app-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #0b5f86;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #edf2f5;
}

.app-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.app-toolbar .layui-input,
.app-toolbar select {
    height: 34px;
    border: 1px solid #d7e2e9;
    border-radius: 4px;
    padding: 0 9px;
    background: #fff;
}

.app-toolbar .layui-input {
    width: 220px;
}

/* 客户详情服务内容页签：大按钮、18px 外框字、括号小数字 */
.app-tabs {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 -18px 16px;
    padding: 14px 18px 12px;
    background: #fff;
    border-bottom: 1px solid #edf2f5;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 12px rgba(16, 63, 88, .07);
}

.app-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 44px;
    line-height: 42px;
    padding: 0 22px;
    border: 1px solid #c9dce6;
    border-radius: 22px;
    background: #fff;
    color: #1f4052;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(16, 63, 88, .06);
    transition: all .18s ease;
}

.app-tab:hover {
    border-color: #0b5f86;
    color: #0b5f86;
    background: #f7fbfd;
    box-shadow: 0 5px 14px rgba(11, 95, 134, .16);
    transform: translateY(-1px);
}

.app-tab.active,
.app-tab.active:hover {
    border-color: #0b5f86;
    background: linear-gradient(135deg, #0b5f86 0%, #2f80a8 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(11, 95, 134, .30);
    transform: none;
}

.app-tab:focus-visible {
    outline: 2px solid #2f80a8;
    outline-offset: 2px;
}

.app-tab-count {
    display: inline;
    min-width: 0;
    padding: 0;
    border-radius: 0;
    background: none;
    color: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1;
    opacity: .72;
    text-align: inherit;
}

.app-tab.active .app-tab-count {
    background: none;
    color: inherit;
    opacity: .88;
}

@media (max-width: 640px) {
    .app-tabs {
        gap: 8px;
    }

    .app-tab {
        flex: 1 1 calc(50% - 8px);
        height: 42px;
        line-height: 40px;
        padding: 0 10px;
        font-size: 17px;
    }
}

.app-pager {
    margin: 16px 0 0;
    text-align: center;
    color: #687985;
}

.app-pager a {
    display: inline-block;
    padding: 4px 9px;
    margin: 0 2px;
    border: 1px solid #d7e2e9;
    border-radius: 3px;
    background: #fff;
    color: #245;
    text-decoration: none;
}

.app-pager a:hover {
    border-color: #0b5f86;
    color: #0b5f86;
}

.app-link {
    color: #0b5f86;
    text-decoration: none;
}

.app-link:hover {
    text-decoration: underline;
}

.app-danger {
    color: #b42318;
    text-decoration: none;
}

.app-muted {
    color: #8496a2;
}

.filter-tip {
    color: #b15c00;
}

.app-empty {
    padding: 22px;
    text-align: center;
    color: #8496a2;
}

/* 老表格统一成 Layui 视觉，不改表格 DOM */
table.managetab,
table.addtable,
table.tableBorder {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: collapse !important;
    background: #fff;
}

table.managetab th,
table.addtable th,
table.tableBorder th {
    background: #f1f6f9 !important;
    color: #2d4654;
    font-weight: 600;
    border: 1px solid #e1eaf0 !important;
    padding: 9px 8px !important;
}

table.managetab td,
table.addtable td,
table.tableBorder td {
    border: 1px solid #e8eff3 !important;
    padding: 8px !important;
}

table.managetab tr:hover td,
table.addtable tr:hover td {
    background: #f8fbfd;
}

table.addtable th[colspan],
table.addtable td[colspan] {
    background: #f7fafc;
}

/* 老式 input/button 统一 */
input[type="button"],
input[type="submit"] {
    height: 34px;
    padding: 0 16px;
    border: 1px solid #0b5f86;
    border-radius: 4px;
    background: #0b5f86;
    color: #fff;
    cursor: pointer;
}

input[type="button"]:hover,
input[type="submit"]:hover {
    background: #084b6b;
}

input[type="text"],
input[type="password"],
select,
textarea {
    border: 1px solid #d7e2e9;
    border-radius: 4px;
    padding: 5px 8px;
    background: #fff;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: #0b5f86;
    outline: 0;
}

/* 登录页 */
.login-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b3d5c 0%, #0b5f86 45%, #2f80a8 100%);
}

.login-card {
    width: 380px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(0, 30, 50, .28);
    padding: 34px 34px 28px;
}

.login-brand {
    font-size: 24px;
    font-weight: 700;
    color: #0b5f86;
    text-align: center;
}

.login-sub {
    margin: 6px 0 24px;
    color: #687985;
    text-align: center;
}

.login-error {
    background: #fdecea;
    border: 1px solid #e7aaa2;
    color: #a11;
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 14px;
}

/* 管理框架 */
.admin-shell {
    height: 100vh;
    overflow: hidden;
}

.admin-header {
    height: 52px;
    background: #0b3d5c;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 18px;
    box-sizing: border-box;
}

.admin-logo {
    width: 170px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .5px;
}

.admin-header-links {
    margin-left: auto;
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 13px;
}

.admin-header-links a {
    color: #dceef8;
    text-decoration: none;
}

.admin-header-links a:hover {
    color: #fff;
}

.admin-side {
    position: fixed;
    top: 52px;
    left: 0;
    bottom: 0;
    width: 170px;
    background: #fff;
    border-right: 1px solid #dbe5eb;
    z-index: 10;
}

.admin-side iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.admin-toggle {
    position: fixed;
    top: 52px;
    left: 170px;
    bottom: 0;
    width: 12px;
    background: #2f80a8;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 11;
    user-select: none;
}

.admin-main {
    position: fixed;
    top: 52px;
    left: 182px;
    right: 0;
    bottom: 0;
}

.admin-main iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #f4f8fb;
}

/* M9 续费提示与每条服务的状态行 */
.app-flash {
    padding: 10px 14px;
    border-radius: 6px;
    margin: 0 0 14px;
    font-weight: 600;
}

.app-flash.ok {
    background: #eaf8ef;
    border: 1px solid #a8d8b6;
    color: #1d7a3a;
}

.app-flash.err {
    background: #fdecea;
    border: 1px solid #e7aaa2;
    color: #a11;
}

.svc-actions {
    background: #fbfdfe;
    line-height: 1.9;
}

.svc-actions .svc-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-right: 12px;
    vertical-align: middle;
}

.svc-actions .svc-links {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    vertical-align: middle;
}

.svc-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
}

.svc-badge.ok {
    background: #e7f6ec;
    color: #1d7a3a;
}

.svc-badge.warn {
    background: #fff3df;
    color: #986000;
}

.svc-badge.stop {
    background: #f1f3f5;
    color: #6c757d;
}

.svc-days {
    color: #687985;
    font-size: 12px;
    white-space: nowrap;
}

.svc-days.overdue {
    color: #b42318;
    font-weight: 700;
}

.svc-days.soon {
    color: #b15c00;
    font-weight: 700;
}

.svc-last {
    color: #7b8b96;
    font-size: 12px;
}

.svc-actions .layui-btn-xs {
    height: 26px;
    line-height: 26px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 13px;
}

