:root { color: #172033; background: #f5f7fb; font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: #172033; }
.topbar { min-height: 62px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #d8e0ec; background: #fff; }
.brand { color: #172033; font-size: 18px; font-weight: 700; text-decoration: none; }
nav { display: flex; gap: 20px; align-items: center; } nav a { color: #38506e; text-decoration: none; } nav a:hover { color: #1464c6; } nav form { margin: 0; } .link-button { padding: 0; color: #38506e; background: transparent; border: 0; } .link-button:hover { color: #1464c6; background: transparent; }
.page-shell { width: min(100% - 40px, 900px); margin: 0 auto; padding: 56px 0 76px; }
.page-heading { max-width: 620px; margin-bottom: 32px; } .page-heading h1 { margin: 6px 0 12px; font-size: 30px; line-height: 1.25; } .page-heading p { margin: 0; color: #53657d; line-height: 1.7; }
.eyebrow { color: #1464c6 !important; font-size: 14px; font-weight: 700; }
.form-panel, .result-panel { padding: 28px; background: #fff; border: 1px solid #d8e0ec; border-radius: 6px; }
.form-grid { display: grid; gap: 20px; max-width: 640px; } label { display: grid; gap: 8px; color: #26364d; font-weight: 600; } input, textarea { width: 100%; padding: 10px 12px; color: #172033; font: inherit; border: 1px solid #b9c7d9; border-radius: 4px; background: #fff; } input:focus, textarea:focus { outline: 2px solid #9bc7ff; outline-offset: 1px; border-color: #1464c6; } small, span.field-validation-error { color: #6c7b90; font-size: 13px; font-weight: 400; } span.field-validation-error { color: #be2b25; }
.two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }.form-actions { display: flex; justify-content: flex-start; } button { padding: 10px 18px; color: #fff; background: #1464c6; border: 1px solid #1464c6; border-radius: 4px; font: inherit; cursor: pointer; } button:hover { background: #0d55ad; }
.notice { margin: 0 0 20px; padding: 14px 16px; border: 1px solid; border-radius: 4px; line-height: 1.5; }.notice-success { color: #17633b; background: #edf9f1; border-color: #a8d9b8; }.notice-warning { color: #895200; background: #fff8e8; border-color: #e8c878; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; border-bottom: 1px solid #e2e8f1; padding-bottom: 16px; }.result-heading h2 { margin: 0; font-size: 20px; }.status { padding: 4px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; }.status-pending { color: #895200; background: #fff1cf; }.status-issued { color: #17633b; background: #dff4e6; }.status-rejected { color: #a32621; background: #fde7e5; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 22px 0 0; }.detail-list div { min-width: 0; }.detail-list dt { color: #6c7b90; font-size: 13px; }.detail-list dd { margin: 6px 0 0; color: #172033; line-height: 1.5; word-break: break-word; }.license-code { font-family: Consolas, monospace; font-weight: 700; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }.action-item { display: block; min-height: 176px; padding: 24px; color: #172033; background: #fff; border: 1px solid #d8e0ec; border-radius: 6px; text-decoration: none; }.action-item:hover { border-color: #78a9e4; box-shadow: 0 4px 14px rgba(24, 61, 102, .1); }.action-item h2 { margin: 0 0 12px; font-size: 20px; }.action-item p { min-height: 48px; margin: 0 0 18px; color: #53657d; line-height: 1.55; }.action-item span { color: #1464c6; font-weight: 700; }
.account-requests { margin-top: 20px; }.muted { color: #6c7b90; }.table-wrap { overflow-x: auto; } table { width: 100%; border-collapse: collapse; } th, td { padding: 12px; text-align: left; border-bottom: 1px solid #e2e8f1; } th { color: #53657d; font-size: 13px; }.license-code { font-family: Consolas, monospace; font-weight: 700; }
@media (max-width: 640px) { .topbar { padding: 0 18px; }.topbar nav { gap: 14px; font-size: 14px; }.page-shell { width: min(100% - 28px, 900px); padding-top: 34px; }.two-columns, .detail-list, .action-grid, .two-fields { grid-template-columns: 1fr; }.form-panel, .result-panel { padding: 20px; }.page-heading h1 { font-size: 26px; } }
.status-pending_payment, .status-pending_confirmation { color: #895200; background: #fff1cf; }
.status-paid { color: #0f5aa8; background: #e3f0fc; }
.status-fulfilled, .status-succeeded { color: #17633b; background: #dff4e6; }
.status-cancelled { color: #64748b; background: #eef1f5; }
.status-failed { color: #a32621; background: #fde7e5; }
.status-renewal { color: #0f5aa8; background: #e3f0fc; }
select { width: 100%; padding: 10px 12px; color: #172033; font: inherit; border: 1px solid #b9c7d9; border-radius: 4px; background: #fff; }
.form-actions { display: flex; gap: 12px; align-items: center; }
.button-secondary { color: #264363; background: #fff; border: 1px solid #b9c7d9; border-radius: 4px; }
.button-secondary:hover { background: #edf4fc; color: #264363; }
.button-danger { color: #a03030; background: #fff; border: 1px solid #d9a9a9; border-radius: 4px; }
.button-danger:hover { background: #fdf1f1; color: #7f2020; }
.inline-form { display: inline; }
.row-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
/* 我的授权卡片：「申请续期」按钮与上方明细（detail-list）拉开间距，左对齐（v2.8 UI 调整）。仅作用于卡片内、不影响弹窗内提交按钮。 */
.renewal-actions { margin-top: 16px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.product-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: #fff; border: 1px solid #d8e0ec; border-radius: 6px; }
.product-card h2 { margin: 0; font-size: 20px; }
.product-card p { margin: 0; color: #53657d; line-height: 1.55; }
.product-price { font-size: 26px; font-weight: 700; color: #1464c6; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.filter-tabs a { padding: 7px 14px; color: #38506e; text-decoration: none; border: 1px solid #b9c7d9; border-radius: 16px; }
.filter-tabs a.active, .filter-tabs a:hover { color: #fff; background: #1464c6; border-color: #1464c6; }
.channel-options { display: grid; gap: 10px; }
.channel-options label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.channel-options input { width: auto; }
@media (max-width: 640px) { .product-grid { grid-template-columns: 1fr; } }
.input-error { border-color:#be2b25 !important; }
.input-error:focus { border-color:#be2b25 !important; outline-color:#f0b4b0; }
.js-inline-error { display:block; margin-top:2px; }
.js-inline-error:empty { display:none; }
.account-panel { max-width: 460px; margin: 0 auto; padding: 28px; background: #fff; border: 1px solid #d8e0ec; border-radius: 6px; }
/* 登录/注册页：登录框在顶栏下方剩余区域内水平+垂直居中（仅 .auth-shell 生效，不影响其它页面）。上下内边距对称以保持垂直居中；min-height 而非固定高度，内容超高时容器随内容增高、允许滚动、不裁切。 */
.page-shell.auth-shell { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 62px); padding-top: 24px; padding-bottom: 24px; }
.page-shell.auth-shell > .account-panel { width: 100%; }
.account-panel h1 { margin: 0 0 8px; font-size: 26px; }
.account-panel .form-grid { max-width: none; }
.intro { color: #53657d; line-height: 1.7; }
.footer-link { margin: 18px 0 0; color: #53657d; }
.notice-error { color: #a32621; background: #fde7e5; border-color: #e8a9a6; }
.status-approved { color: #17633b; background: #dff4e6; }
.status-cancelled { color: #64748b; background: #eef1f5; }

/* ===== 表单两列布局 / 单选项（与管理端 .two-fields / .radio-row 一致；v2.8）===== */
.two-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.two-fields > * { min-width: 0; }
.radio-row { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.radio-row input { width: auto; }

/* ===== 日期时间控件（flatpickr 包裹 + 快捷按钮；v2.8，自管理端复制）===== */
.dt-field { display: grid; gap: 6px; }
.dt-quick { display: flex; flex-wrap: wrap; gap: 4px; }
.dt-quick button { padding: 2px 6px; color: #264363; background: #fff; border: 1px solid #b9c7d9; border-radius: 10px; font-size: 11px; font-weight: 400; cursor: pointer; white-space: nowrap; }
.dt-quick button:hover { background: #edf4fc; border-color: #78a9e4; }
.flatpickr-calendar { z-index: 60; }

/* ===== 原生 <dialog> 模态（申请授权表单；v2.8，自管理端 .edit-dialog 复制）=====
 * 对话框进入浏览器 top-layer；overflow 保持 visible，使内部 flatpickr 日期弹层不被裁剪
 * （日期弹层经 datetime-picker.js 的 appendTo 挂到最近的 <dialog>）。
 * 关闭态 <dialog> 由 UA 样式 display:none 隐藏，不影响后续内容高度。 */
.edit-dialog { width: min(100% - 2rem, 640px); max-width: 640px; padding: 0; color: #172033; background: #fff; border: 1px solid #d8e0ec; border-radius: 8px; box-shadow: 0 18px 48px rgba(24, 61, 102, .28); overflow: visible; }
.edit-dialog::backdrop { background: rgba(15, 27, 45, .45); }
.edit-dialog .edit-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #e2e8f1; }
.edit-dialog .edit-dialog-head h3 { margin: 0; font-size: 17px; }
.edit-dialog .edit-dialog-close { padding: 6px 12px; color: #264363; background: #fff; border: 1px solid #b9c7d9; border-radius: 4px; }
.edit-dialog .edit-dialog-close:hover { background: #edf4fc; }
.edit-dialog .edit-dialog-body { padding: 20px; }
.edit-dialog .form-grid { max-width: none; }
.edit-dialog .row-actions { justify-content: flex-end; }
