/* 椤烘椂 授权 UI — 参考 Licenseapi，加大字号与对比度 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    font-size: 15px;
    color: #1f2937;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ===== 登录页 ===== */
body.login-page {
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}
.login-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
    padding: 36px 32px;
}
.login-title {
    text-align: center;
    font-size: 28px;
    color: #111827;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.login-subtitle {
    text-align: center;
    font-size: 15px;
    color: #4b5563;
    margin-bottom: 28px;
}
.input-group { margin-bottom: 22px; }
.input-group label {
    display: block;
    font-size: 15px;
    color: #374151;
    font-weight: 600;
    margin-bottom: 10px;
}
.input-group input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    color: #111827;
    transition: all 0.25s ease;
}
.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.18);
}
.error-msg {
    text-align: center;
    color: #dc2626;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 16px;
    padding: 12px;
    background: #fef2f2;
    border-radius: 8px;
    border: 1px solid #fecaca;
    display: none;
}
.error-msg.show { display: block; }
.login-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(102,126,234,0.35); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.copyright { text-align: center; font-size: 13px; color: #6b7280; margin-top: 20px; }
.home-nav { margin-top: 10px; }
.home-nav a {
    display: block;
    text-align: center;
    margin: 12px 0;
    padding: 14px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #4f46e5;
    font-weight: 600;
    font-size: 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}
.home-nav a:hover { background: rgba(102,126,234,0.08); border-color: #667eea; }
.home-nav a.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
}
.home-nav a.logout { color: #dc2626; border-color: #fecaca; background: #fff; }

/* ===== 管理后台布局 ===== */
body.la-layout { background: #eef1f6; min-height: 100vh; }
.la-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    z-index: 1000;
    background: #1e293b;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.la-logo {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.3px;
}
.la-logo span { color: #818cf8; margin-right: 8px; }
.la-header-right { margin-left: auto; font-size: 15px; }
.la-header-right a { color: #e2e8f0; text-decoration: none; cursor: pointer; font-weight: 500; }
.la-header-right a:hover { color: #fff; }
.la-wrap { display: flex; padding-top: 56px; min-height: 100vh; }
.la-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #334155;
    color: #e2e8f0;
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
}
.la-menu { list-style: none; padding: 10px 0; }
.la-menu-group {
    padding: 14px 18px 8px;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.la-menu a {
    display: block;
    padding: 12px 18px 12px 24px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-left: 3px solid transparent;
}
.la-menu a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.la-menu a.active {
    background: #1e293b;
    color: #fff;
    border-left-color: #818cf8;
    font-weight: 600;
}
.la-content {
    flex: 1;
    margin-left: 220px;
    padding: 20px 24px 36px;
    min-width: 0;
}

body.la-simple { background: #eef1f6; padding: 20px 24px; }
.la-simple-head { max-width: 960px; margin: 0 auto 20px; }
.la-simple-head h1 {
    font-size: 26px;
    color: #111827;
    font-weight: 700;
    margin-bottom: 10px;
}
.la-simple-head p { font-size: 15px; color: #4b5563; line-height: 1.7; }
.la-simple-body { max-width: 960px; margin: 0 auto; }

/* ===== 本机激活页：横向铺满 ===== */
body.la-local-act { background: #eef1f6; padding: 16px 20px 24px; min-height: 100vh; }
.local-act-wrap { width: 100%; max-width: none; margin: 0; }
.local-act-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 24px;
    margin-bottom: 16px;
    padding: 0 4px;
}
.local-act-head h1 { font-size: 24px; color: #111827; font-weight: 700; margin: 0; }
.local-act-head p { font-size: 15px; color: #4b5563; margin: 0; }
.local-act-top {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    align-items: stretch;
}
.local-act-top .page-section { flex: 1 1 320px; margin-bottom: 0; }
.local-act-meta .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    align-items: center;
}
.local-act-meta .meta-item { font-size: 15px; color: #374151; }
.local-act-meta .meta-item strong { color: #111827; margin-right: 6px; }
.local-act-meta .meta-cloud { flex: 1 1 280px; min-width: 240px; }
.local-act-meta .meta-cloud input { width: 100%; max-width: none; }
.local-act-mode .radio-line {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 32px;
    align-items: center;
    margin: 0;
}
.local-act-mode .radio-line label { margin: 0; white-space: nowrap; }
.local-act-status { margin-bottom: 16px; }
.local-act-status .page-section { margin-bottom: 0; }
.local-act-status .table-wrap { max-height: 220px; }
.local-act-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: stretch;
}
.local-act-actions > .page-section { flex: 1 1 360px; margin-bottom: 0; min-width: 0; }
.local-act-actions .local-act-main { flex: 2 1 480px; }
.local-act-actions .local-act-rece { flex: 1 1 280px; }
.local-act-actions .form-inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: center;
}
.local-act-actions .form-inline-row .form-control { flex: 1 1 200px; max-width: none; }
.local-act-foot {
    margin-top: 14px;
    padding: 12px 16px;
    font-size: 14px;
    color: #4b5563;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
@media (max-width: 900px) {
    .local-act-top .page-section,
    .local-act-actions > .page-section { flex: 1 1 100%; }
}

/* ===== 内容区 ===== */
.page-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px 22px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.page-section h2, .page-section h3 {
    font-size: 17px;
    color: #111827;
    margin-bottom: 16px;
    font-weight: 700;
    border-bottom: 2px solid #eef1f6;
    padding-bottom: 10px;
}
.control-label {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
    display: inline-block;
    min-width: 80px;
    margin-right: 10px;
}
.form-group { margin: 18px 0; }
.form-control {
    font-family: inherit;
    font-size: 15px;
    color: #111827;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    max-width: 100%;
    background: #fff;
}
.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102,126,234,0.15);
}
.form-control-inline { width: 220px; margin-right: 14px; display: inline-block; vertical-align: middle; }
.form-control-wide { width: 100%; max-width: 520px; }
textarea.form-control, pre.result-pre {
    font-family: Consolas, "Microsoft YaHei", monospace;
    font-size: 14px;
    color: #1f2937;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 12px;
    border-radius: 6px;
    overflow: auto;
    line-height: 1.5;
}
.btn {
    padding: 8px 18px;
    margin-right: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid transparent;
    line-height: 1.4;
}
.btn-primary {
    background: linear-gradient(135deg, #5b7cfa 0%, #6366f1 100%);
    border-color: #4f46e5;
    color: #fff;
}
.btn-primary:hover { background: linear-gradient(135deg, #4f6ef7 0%, #4f46e5 100%); }
.btn-default {
    background: #fff;
    border-color: #cbd5e1;
    color: #374151;
}
.btn-default:hover { background: #f1f5f9; }
.btn-danger { background: #ef4444; border-color: #dc2626; color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.table {
    font-size: 14px;
    color: #1f2937;
    border-collapse: collapse;
    width: 100%;
    margin-top: 14px;
}
.table th {
    font-weight: 700;
    color: #111827;
    text-align: center;
    padding: 14px 10px;
    border: 1px solid #cbd5e1;
    background: #f1f5f9;
    font-size: 14px;
}
.table td {
    padding: 10px 10px;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    max-width: 240px;
    overflow: auto;
    font-size: 14px;
}
.table tbody tr:nth-child(even) { background: #fafbfc; }
.table tbody tr:hover { background: #f0f4ff; }
.table-wrap { overflow: auto; max-height: 560px; margin-top: 10px; border-radius: 6px; }

.stat-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.stat-box {
    flex: 1;
    min-width: 120px;
    background: #fff;
    border: 1px solid #e5e7eb;
    padding: 16px 14px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.stat-box span {
    display: block;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 6px;
}
.stat-box b { font-size: 28px; color: #4f46e5; font-weight: 700; }

.tab-bar { margin: 14px 0 0; border-bottom: 2px solid #e5e7eb; }
.tab-bar button {
    padding: 10px 18px;
    margin-right: 6px;
    margin-bottom: -2px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    border-radius: 6px 6px 0 0;
}
.tab-bar button:hover { color: #4f46e5; background: #f8fafc; }
.tab-bar button.on {
    border: 1px solid #e5e7eb;
    border-bottom-color: #fff;
    background: #fff;
    color: #4f46e5;
}
.tab-panel { display: none; padding-top: 14px; }
.tab-panel.on { display: block; }

.text-warning { color: #ea580c; margin-top: 12px; font-size: 15px; font-weight: 500; }
.text-muted { color: #4b5563; font-size: 15px; line-height: 1.75; }
.text-ok { color: #059669; font-weight: 700; font-size: 15px; }
.text-fail { color: #dc2626; font-weight: 700; font-size: 15px; }
.text-pending { color: #d97706; font-weight: 700; font-size: 15px; }
.text-expired { color: #dc2626; font-weight: 700; font-size: 15px; }
.banner-msg {
    display: none;
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}
.banner-msg.show { display: block; }
.banner-msg.ok { border-color: #86efac; background: #f0fdf4; color: #166534; }
.banner-msg.fail { border-color: #fca5a5; background: #fef2f2; color: #b91c1c; }

.tag {
    display: inline-block;
    padding: 4px 10px;
    margin: 3px 6px 3px 0;
    background: #eef2ff;
    color: #4338ca;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}
.captcha-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 10px 0; }
.captcha-row img { height: 44px; border: 1px solid #cbd5e1; border-radius: 4px; cursor: pointer; background: #fafafa; }
.captcha-row input { width: 160px; font-size: 16px; }
.radio-line { margin: 12px 0; font-size: 15px; color: #374151; }
.radio-line label { margin-right: 22px; cursor: pointer; font-weight: 500; }
.radio-line input { margin-right: 6px; transform: scale(1.15); vertical-align: middle; }
code {
    background: #f1f5f9;
    color: #334155;
    padding: 2px 6px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 3px;
    word-break: break-all;
}
a { color: #4f46e5; font-weight: 500; }
a:hover { color: #4338ca; }
.msg-tip { margin-top: 12px; font-size: 15px; color: #374151; min-height: 20px; font-weight: 500; }

ol.text-muted { font-size: 15px; color: #4b5563; }
