/* ==========================================================================
   站点授权检测（秋辞网络）面板样式
   由 theme-license.js 在管理后台注入，独立成文件方便单独回退：
   删掉 vue-dist/index.html 里 theme-license.css / theme-license.js 的两行引用即可。
   液态玻璃观感的覆盖规则写在 theme-glass.css 第 18 节。
   ========================================================================== */

#saasLicenseFab {
    position: fixed;
    right: 22px;
    bottom: 182px;
    z-index: 3000;
    height: 44px;
    padding: 0 16px 0 13px;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 0;
    border-radius: 22px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 10px 26px rgba(7, 89, 133, 0.4);
}
#saasLicenseFab:hover { transform: translateY(-2px); }
#saasLicenseFab .ic { font-size: 15px; line-height: 1; }
#saasLicenseFab[data-state="pass"] { background: linear-gradient(135deg, #059669 0%, #065f46 100%); box-shadow: 0 10px 26px rgba(4, 120, 87, 0.36); }
#saasLicenseFab[data-state="fail"],
#saasLicenseFab[data-state="expired"] { background: linear-gradient(135deg, #be123c 0%, #881337 100%); box-shadow: 0 10px 26px rgba(159, 18, 57, 0.36); }
#saasLicenseFab[data-state="error"] { background: linear-gradient(135deg, #b45309 0%, #78350f 100%); box-shadow: 0 10px 26px rgba(146, 64, 14, 0.36); }

.sl-mask {
    position: fixed;
    inset: 0;
    z-index: 3420;
    background: rgba(19, 10, 30, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}
.sl-mask.open { opacity: 1; pointer-events: auto; }
.sl-box {
    width: min(740px, 100%);
    max-height: min(90vh, 880px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(6, 8, 24, 0.4);
    transform: translateY(14px) scale(0.99);
    transition: transform 0.22s ease;
}
.sl-mask.open .sl-box { transform: none; }

.sl-head {
    flex: 0 0 auto;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-bottom: 1px solid rgba(2, 132, 199, 0.22);
}
.sl-head b { font-size: 16px; color: #075985; }
.sl-head .tag { font-size: 12px; color: #075985; background: rgba(255, 255, 255, 0.82); border: 1px solid rgba(2, 132, 199, 0.26); border-radius: 20px; padding: 2px 10px; }
.sl-head .sp { flex: 1; }
.sl-close { width: 30px; height: 30px; border: 0; border-radius: 8px; cursor: pointer; background: transparent; color: #075985; font-size: 22px; line-height: 1; }
.sl-close:hover { background: rgba(2, 132, 199, 0.14); }

.sl-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px 18px; }

/* 状态大卡 */
.sl-state {
    display: flex; align-items: flex-start; gap: 13px;
    padding: 15px 16px;
    border-radius: 13px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    margin-bottom: 16px;
}
.sl-state .sl-mark {
    color: #fff;
    -webkit-text-fill-color: #fff;
    flex: 0 0 auto;
    width: 42px; height: 42px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 21px; line-height: 1; color: #fff;
    background: #6b7280;
}
.sl-state .txt { min-width: 0; flex: 1 1 auto; }
.sl-state .lv { display: block; font-size: 16px; font-weight: 800; color: var(--lg-text, #111827); letter-spacing: 0.2px; }
.sl-state .ms { display: block; font-size: 13px; color: var(--lg-text-2, #374151); line-height: 1.65; margin-top: 4px; word-break: break-word; }
.sl-state .mt { display: block; font-size: 11.5px; color: var(--lg-text-3, #6b7280); margin-top: 6px; }
.sl-state.pass { border-color: rgba(5, 150, 105, 0.4); background: #ecfdf5; }
.sl-state.pass .sl-mark { background: #047857; }
.sl-state.pass .lv { color: #065f46; }
.sl-state.fail { border-color: rgba(190, 18, 60, 0.38); background: #fff1f2; }
.sl-state.fail .sl-mark { background: #9f1239; }
.sl-state.fail .lv { color: #9f1239; }
.sl-state.expired { border-color: rgba(146, 64, 14, 0.4); background: #fffbeb; }
.sl-state.expired .sl-mark { background: #92400e; }
.sl-state.expired .lv { color: #92400e; }
.sl-state.error { border-color: rgba(146, 64, 14, 0.4); background: #fff7ed; }
.sl-state.error .sl-mark { background: #9a3412; }
.sl-state.error .lv { color: #9a3412; }
.sl-state.unconfigured { border-color: rgba(71, 85, 105, 0.35); background: #f8fafc; }
.sl-state.unconfigured .sl-mark { background: #475569; }
.sl-state.unconfigured .lv { color: #334155; }
.sl-state.testing { border-color: rgba(2, 132, 199, 0.4); background: #f0f9ff; }
.sl-state.testing .sl-mark { background: #0369a1; }
.sl-state.testing .lv { color: #075985; }

/* 表单 */
.sl-sec > .lb { font-size: 12.5px; font-weight: 700; color: var(--lg-text-3, #6b7280); letter-spacing: 0.4px; margin: 0 0 9px; }
.sl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.sl-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.sl-field.wide { grid-column: 1 / -1; }
.sl-field label { font-size: 12.5px; font-weight: 600; color: var(--lg-text-2, #374151); }
.sl-field input,
.sl-field select {
    height: 34px; width: 100%; min-width: 0;
    padding: 0 10px;
    border: 1px solid #d7dee8; border-radius: 9px;
    background: #fff; color: var(--lg-text, #111827);
    font-size: 13.5px; font-family: inherit;
}
.sl-field input:focus, .sl-field select:focus { outline: none; border-color: #0284c7; box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.16); }
.sl-field .hint { font-size: 11.5px; color: var(--lg-text-3, #6b7280); line-height: 1.55; }
.sl-field code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11.5px; color: #075985; background: #f0f9ff;
    border: 1px solid rgba(2, 132, 199, 0.22); border-radius: 5px; padding: 0 4px;
}
.sl-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; font-size: 13.5px; color: var(--lg-text, #111827); cursor: pointer; }
.sl-check input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: #0284c7; }
.sl-check .d { display: block; font-size: 11.5px; color: var(--lg-text-3, #6b7280); margin-top: 2px; }

/* 结果明细 */
.sl-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
.sl-table th, .sl-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eef2f7; vertical-align: top; }
.sl-table th { width: 116px; font-weight: 600; color: var(--lg-text-3, #6b7280); background: #fbfcfe; }
.sl-table td { color: var(--lg-text, #111827); word-break: break-all; }
.sl-table td.good { color: #047857; font-weight: 700; }
.sl-table td.bad { color: #9f1239; font-weight: 700; }
.sl-table td.warn { color: #92400e; font-weight: 700; }

.sl-raw { margin-top: 12px; }
.sl-raw summary { cursor: pointer; font-size: 12.5px; color: #0369a1; font-weight: 600; }
.sl-raw pre {
    margin: 8px 0 0; padding: 10px 12px;
    background: #0f172a; color: #e2e8f0;
    border-radius: 9px; font-size: 12px; line-height: 1.6;
    white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.sl-note {
    margin-top: 14px; padding: 12px 14px;
    border-radius: 11px;
    border: 1px solid rgba(2, 132, 199, 0.22);
    background: #f8fbff;
    font-size: 12.5px; line-height: 1.75; color: var(--lg-text-2, #374151);
}
.sl-note b { color: #075985; }
.sl-note ol { margin: 4px 0 0; padding-left: 20px; }

.sl-foot {
    flex: 0 0 auto;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 13px 18px;
    border-top: 1px solid #eef2f7;
    background: #fbfdff;
}
.sl-status { flex: 1 1 180px; min-width: 0; font-size: 12.5px; color: var(--lg-text-3, #6b7280); line-height: 1.5; }
.sl-status.ok { color: #047857; }
.sl-status.bad { color: #9f1239; }
.sl-status.wait { color: #92400e; }
.sl-btn {
    height: 34px; padding: 0 14px;
    border: 1px solid #cfe0ee; border-radius: 9px;
    background: #fff; color: #075985; font-size: 13px; font-weight: 600; cursor: pointer;
}
.sl-btn:hover { background: #f0f9ff; }
.sl-btn.solid { border-color: transparent; background: #075985; color: #fff; -webkit-text-fill-color: #fff; }
.sl-btn.solid:hover { background: #0c4a6e; }
.sl-btn[disabled] { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 640px) {
    #saasLicenseFab { bottom: 166px; right: 14px; height: 40px; padding: 0 13px 0 11px; font-size: 13px; }
    .sl-mask { padding: 8px; }
    .sl-body { padding: 13px; }
    .sl-grid { grid-template-columns: minmax(0, 1fr); }
    .sl-table th { width: 92px; }
}
