/* ==========================================================
   SaaS 运营后台样式
   路径：public/static/css/saas.css
   说明：复用 admin.css 的变量与骨架（yn-header / yn-side / yn-content），
         这里只补平台后台特有的部分（徽标、登录页、控制台卡片）
   ========================================================== */

/* 顶栏右侧的小徽标 */
.saas-badge {
    float: left;
    height: 24px;
    line-height: 24px;
    margin-top: 18px;
    padding: 0 10px;
    background: #eef4fd;
    color: #004EA2;
    border: 1px solid #d5e4f8;
    border-radius: 12px;
    font-size: 12px;
}

.saas-logo { width: 230px; }
.saas-logo a { font-size: 15px; }

.saas-content { padding: 16px 18px 24px; }

/* ---------------- 控制台 ---------------- */
.saas-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 16px;
}

.saas-stat {
    flex: 1 1 150px;
    background: #fff;
    border: 1px solid #e6e8eb;
    border-radius: 8px;
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
}

.saas-stat .label {
    font-size: 13px;
    color: #8a94a0;
    margin-bottom: 8px;
}

.saas-stat .num {
    font-size: 28px;
    font-weight: 600;
    color: #2c3038;
    line-height: 1.1;
}

.saas-stat .unit {
    font-size: 13px;
    color: #8a94a0;
    margin-left: 4px;
    font-weight: 400;
}

.saas-stat .bar {
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #004EA2;
}

.saas-stat.ok .bar { background: #16a34a; }
.saas-stat.warn .bar { background: #e6a23c; }
.saas-stat.danger .bar { background: #e04b4b; }
.saas-stat.info .bar { background: #1e9fff; }

.saas-panel {
    background: #fff;
    border: 1px solid #e6e8eb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.saas-panel-hd {
    height: 48px;
    line-height: 48px;
    padding: 0 18px;
    border-bottom: 1px solid #eef0f2;
    font-size: 15px;
    font-weight: 600;
    color: #2c3038;
}

.saas-panel-hd .more {
    float: right;
    font-size: 13px;
    font-weight: 400;
    color: #8a94a0;
}

.saas-panel-bd { padding: 6px 18px 14px; }

.saas-list { margin: 0; padding: 0; list-style: none; }

.saas-list li {
    display: flex;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px dashed #f0f2f4;
    font-size: 14px;
}

.saas-list li:last-child { border-bottom: 0; }

.saas-list .t {
    flex: 1;
    color: #2c3038;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.saas-list .s {
    color: #8a94a0;
    font-size: 12px;
    margin-left: 10px;
    white-space: nowrap;
}

.saas-empty {
    text-align: center;
    color: #b0b8c2;
    font-size: 13px;
    padding: 28px 0;
}

/* ---------------- 状态标签 ---------------- */
.saas-tag {
    display: inline-block;
    height: 22px;
    line-height: 22px;
    padding: 0 9px;
    border-radius: 11px;
    font-size: 12px;
    white-space: nowrap;
}

.saas-tag.normal   { background: #eaf7ee; color: #16a34a; }
.saas-tag.stopped  { background: #f2f3f5; color: #8a94a0; }
.saas-tag.expired  { background: #fdecec; color: #e04b4b; }
.saas-tag.warn     { background: #fdf6e8; color: #c8860d; }
.saas-tag.info     { background: #eef4fd; color: #004EA2; }

/* ---------------- 登录页 ---------------- */
.saas-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b2b4a 0%, #004EA2 55%, #1069c9 100%);
    padding: 30px 16px;
    box-sizing: border-box;
}

.saas-login-box {
    width: 400px;
    max-width: 100%;
    background: #fff;
    border-radius: 12px;
    padding: 42px 38px 30px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
    box-sizing: border-box;
}

.saas-login-logo { text-align: center; margin-bottom: 30px; }

.saas-login-logo img {
    max-height: 56px;
    max-width: 200px;
    margin-bottom: 12px;
}

.saas-login-logo .name {
    font-size: 21px;
    font-weight: 600;
    color: #004EA2;
    letter-spacing: .5px;
}

.saas-login-logo .sub {
    font-size: 12.5px;
    color: #9aa4b0;
    margin-top: 8px;
    letter-spacing: 1px;
}

.saas-login-field {
    position: relative;
    margin-bottom: 16px;
}

.saas-login-field i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    color: #a8b2bd;
}

.saas-login-field input {
    width: 100%;
    height: 46px;
    line-height: 46px;
    padding: 0 14px 0 42px;
    border: 1px solid #dfe3e8;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s;
}

.saas-login-field input:focus { border-color: #004EA2; }

.saas-login-btn {
    width: 100%;
    height: 46px;
    line-height: 46px;
    background: #004EA2;
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-size: 15px;
    letter-spacing: 3px;
    cursor: pointer;
    margin-top: 6px;
}

.saas-login-btn:hover { background: #003A7A; }

.saas-login-tip {
    margin-top: 18px;
    font-size: 12.5px;
    color: #9aa4b0;
    text-align: center;
    line-height: 1.8;
}

.saas-login-foot {
    text-align: center;
    color: rgba(255, 255, 255, .72);
    font-size: 12.5px;
    padding: 18px 0 0;
    line-height: 1.8;
}

.saas-login-wrap-outer {
    min-height: 100vh;
    background: linear-gradient(135deg, #0b2b4a 0%, #004EA2 55%, #1069c9 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ---------------- 表格内小元素 ---------------- */
.saas-code {
    font-family: Consolas, Monaco, monospace;
    background: #f5f7f9;
    border-radius: 3px;
    padding: 1px 6px;
    font-size: 12.5px;
    color: #5a6470;
}

.saas-domain {
    font-size: 12.5px;
    color: #5a6470;
    line-height: 1.6;
    word-break: break-all;
}

.saas-num-sm {
    font-size: 12.5px;
    color: #8a94a0;
}

.saas-toolbar {
    background: #fff;
    border: 1px solid #e6e8eb;
    border-radius: 8px;
    padding: 12px 14px 2px;
    margin-bottom: 12px;
}

/* 表单弹窗里的分区标题 */
.saas-form-title {
    font-size: 13px;
    font-weight: 600;
    color: #5a6470;
    padding: 6px 0 10px;
    border-bottom: 1px solid #f0f2f4;
    margin-bottom: 14px;
}

/* ==========================================================
   租户管理 v6：套餐标签 / 额度行
   ========================================================== */

.saas-plan-tag {
    display: inline-block;
    padding: 1px 9px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 20px;
    color: #0a5aa8;
    background: #eaf3fd;
    border: 1px solid #cfe3f7;
    white-space: nowrap;
}

.saas-plan-tag.is-none {
    color: #9aa4b0;
    background: #f2f4f6;
    border-color: #e6e8eb;
}

/* 额度列：四行紧凑展示，避免挤成一长串看不清 */
.saas-quota-line {
    display: block;
    line-height: 1.65;
    white-space: nowrap;
}

.saas-quota-line + .saas-quota-line {
    margin-top: 1px;
}
