* { box-sizing: border-box; }
:root { color-scheme: light; font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif; color: #172923; background: #f0f3ed; }
body { margin: 0; }
button { font: inherit; cursor: pointer; }
button:disabled { opacity: .55; cursor: progress; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid #2b7967; outline-offset: 3px; }
.top { background: #17332b; color: #edf4ee; }
.top-inner { max-width: 1232px; margin: auto; display: flex; align-items: center; gap: 14px; padding: 15px 32px; }
.mark { display: grid; place-items: center; color: #17332b; background: #c9e4cb; width: 36px; height: 36px; border-radius: 8px; font-weight: 750; }
.top-label { color: #c0d3c9; border-left: 1px solid #5f776d; padding-left: 14px; font-size: 14px; }
.home-brand, .home-link { color: inherit; text-decoration: none; }
.home-brand { display: inline-flex; align-items: center; gap: 10px; }
.home-link { margin-left: auto; padding: 7px 13px; border: 1px solid #758b81; border-radius: 7px; font-size: 14px; }
.home-link:hover { background: #29473d; }
.top a:focus-visible { outline-color: #c9e4cb; }
.login-form { margin-top: 20px; }
main { max-width: 1232px; margin: auto; padding: 42px 32px 24px; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -.04em; }
p { margin: 8px 0 0; line-height: 1.6; color: #475f54; }
.secondary, .primary, .danger { padding: 9px 14px; border-radius: 8px; border: 1px solid #bdcdc3; color: #174436; background: #fff; }
.primary { background: #195b49; color: #fff; border-color: #195b49; }
.danger { color: #8c3029; border-color: #dfb3ac; }
.workspace { min-height: 450px; display: grid; grid-template-columns: minmax(270px, .72fr) minmax(0, 1.4fr); background: #fff; border: 1px solid #d4dfd5; border-radius: 14px; overflow: hidden; }
.queue { border-right: 1px solid #dce4dd; }
.user-search { padding: 18px 18px 0; }
.user-search label, .detail-section h3 { display: block; margin: 0 0 9px; font-size: 14px; font-weight: 700; color: #244d3d; }
.user-search input, .edit-row input, .support-edit input { width: 100%; min-width: 0; min-height: 38px; padding: 7px 10px; font: inherit; color: inherit; background: #fff; border: 1px solid #aabcb0; border-radius: 7px; }
.user-search input { background: #f8faf7; font-size: 14px; }
.filters { display: flex; flex-wrap: wrap; gap: 5px; padding: 13px; border-bottom: 1px solid #dce4dd; }
.filters button { border: none; background: transparent; padding: 8px 10px; border-radius: 6px; color: #3c554b; font-size: 14px; }
.filters button[aria-pressed="true"] { background: #e8f1ea; color: #1b4c3b; font-weight: 700; }
ul { list-style: none; margin: 0; padding: 0; }
li + li { border-top: 1px solid #edf0ed; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; width: 100%; text-align: left; align-items: center; padding: 15px 18px; border: 0; background: #fff; color: #22372f; }
.item:hover { background: #f5f8f4; }
.item[aria-current="true"] { background: #eef5ee; box-shadow: inset 4px 0 #28775e; }
.item small { color: #4d645a; }
.status { font-size: 12px; font-weight: 700; background: #edf0ec; color: #384d42; padding: 4px 8px; border-radius: 5px; align-self: center; }
.status.pending { background: #fff2d5; color: #6e4e13; }
.status.approved { background: #e2f2e7; color: #1b583b; }
.detail { padding: 25px 27px; min-width: 0; }
.detail h2 { margin: 0; font-size: 24px; overflow-wrap: anywhere; }
.detail-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin: 21px 0; }
dl div { padding: 12px 0; border-bottom: 1px solid #e5ebe6; }
dt { font-size: 13px; color: #4e665b; }
dd { margin: 6px 0 0; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.empty { padding: 18px; color: #4a6157; }
#notice { min-height: 1.6em; }
.avatar { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; border-radius: 50%; background: #dfebe3; color: #244839; object-fit: cover; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person-names { min-width: 0; display: grid; gap: 3px; }
.person-names strong, .person-names small { overflow-wrap: anywhere; }
.person-names small, .history-list small, .field-hint { font-size: 13px; line-height: 1.55; color: #52685b; font-variant-numeric: tabular-nums; }
.detail-head .avatar { width: 40px; height: 40px; flex-basis: 40px; }
.detail dl { margin: 14px 0 18px; column-gap: 24px; }
.detail dl div { min-width: 0; padding: 9px 0; }
.detail dd { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.detail-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid #dce4dd; }
.detail-section h3 { font-size: 16px; margin-bottom: 13px; }
.detail-section .actions { margin: 10px 0 0; }
.detail-section form { margin: 0; }
.detail-section .edit-row, .detail-section .support-edit { display: grid; grid-template-columns: 7em minmax(0,1fr); align-items: center; gap: 9px 12px; }
.detail-section label { font-size: 14px; color: #40594d; }
.date-fields, .shortcuts, .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.date-fields input[type=date] { width: 12em; max-width: 100%; font-variant-numeric: tabular-nums; }
.shortcut { color: #245843; border: 1px solid #d0dfd3; background: #f3f7f2; padding: 5px 9px; border-radius: 6px; font-size: 13px; }
.term-form .field-hint, .term-form .form-actions { grid-column: 2; }
.detail-section .limit-form { margin-top: 14px; }
.limit-form input { width: 6em; }
.detail-section .support-edit input { max-width: 29em; }
.history-panel { margin-top: 18px; border: 1px solid #d4e0d6; border-radius: 8px; }
.history-panel summary { padding: 11px 14px; cursor: pointer; font-size: 15px; font-weight: 700; color: #22513d; background: #f1f6f0; }
.history-panel summary:focus-visible { outline: 2px solid #2b7967; outline-offset: -2px; }
.history-body { padding: 12px 14px; }
.history-count { font-size: 14px; }
.history-list { list-style: none; margin: 6px 0 0; padding: 0; }
.history-list li { display: grid; grid-template-columns: minmax(122px, .7fr) minmax(0,1.4fr); align-items: baseline; gap: 6px 16px; padding: 9px 0; }
.history-list li time { font-size: 13px; color: #52685b; font-variant-numeric: tabular-nums; }
.history-list li strong, .history-list li small { display: block; overflow-wrap: anywhere; }
.history-list li strong { font-size: 14px; }
.detail .actions { margin-bottom: 13px; }
select { padding: 7px 9px; border-radius: 7px; border: 1px solid #aabcb0; font: inherit; background: white; color: #22372f; }
[hidden] { display: none !important; }
.account-views { display: flex; gap: 4px; width: fit-content; margin: 0 0 22px; padding: 4px; border: 1px solid #d0dbd1; border-radius: 9px; background: #fff; }
.account-views a { color: #3c574b; text-decoration: none; font-size: 14px; border-radius: 6px; padding: 8px 15px; }
.account-views a[aria-current="page"] { background: #e4efe6; color: #164c39; font-weight: 700; }
.personal-account { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.account-card { min-width: 0; padding: 24px; background: #fff; border: 1px solid #d4dfd5; border-radius: 14px; }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card-heading h2 { margin: 0; font-size: 20px; }
.role-label { color: #52685b; font-size: 14px; }
.entitlement-status { padding: 4px 9px; border-radius: 5px; font-size: 13px; font-weight: 700; color: #43584a; background: #edf1ec; }
.entitlement-status[data-status="active"] { color: #19533b; background: #e1f1e5; }
.entitlement-status[data-status="expired"], .entitlement-status[data-status="revoked"] { color: #833d2e; background: #faece7; }
.plan-name { color: #173e2f; font-size: 24px; font-weight: 700; margin-top: 18px; }
.account-fields { display: block; margin: 10px 0 0; }
.account-fields div { display: grid; grid-template-columns: minmax(7em, .8fr) minmax(0, 1.45fr); align-items: baseline; gap: 8px 16px; }
.account-fields dd { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.account-fields dt { font-size: 14px; }
.account-fields div:last-child { border-bottom: 0; }
.personal-account form, .trial-box { border-top: 1px solid #e5ebe6; padding-top: 16px; margin: 6px 0 0; }
.personal-account form { display: grid; grid-template-columns: minmax(5em, .8fr) minmax(0, 1.45fr); align-items: center; gap: 10px 16px; }
.personal-account form label, .personal-account form p { font-size: 14px; }
.personal-account input { min-width: 0; width: 100%; padding: 9px; border: 1px solid #aabcb0; border-radius: 7px; font: inherit; color: inherit; }
.personal-account form p, .personal-account form button { grid-column: 1 / -1; margin: 0; }
.personal-account form button { justify-self: start; }
.trial-box p { margin: 0; }
.trial-box button { margin-top: 12px; }
.support-edit button { grid-column: 2; justify-self: start; }
@media (min-width: 1050px) {
  .detail dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  main { padding: 24px 14px; }
  .top-inner { padding: 14px; flex-wrap: wrap; gap: 8px; }
  .personal-account { grid-template-columns: 1fr; gap: 14px; }
  .account-card { padding: 20px 16px; }
  .intro { flex-wrap: wrap; }
  .workspace { grid-template-columns: 1fr; }
  .queue { border: none; border-bottom: 1px solid #dce4dd; }
  .detail { padding: 20px 16px; }
}
@media (max-width: 520px) {
  .detail-section .edit-row, .detail-section .support-edit { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .term-form .field-hint, .term-form .form-actions, .support-edit button { grid-column: 1; }
  .support-edit input + label { margin-top: 5px; }
  .detail .form-actions { margin-top: 3px; }
  .date-fields input[type=date] { flex: 1 1 150px; }
  .history-list li { grid-template-columns: 1fr; gap: 3px; }
}
