* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, "Noto Sans SC", sans-serif; background: #f6f7f9; color: #1f2933; }
a { color: #075985; text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: #0f172a; color: #fff; }
.topbar a { color: #fff; }
.brand { font-weight: 700; font-size: 18px; }
.topbar nav { display: flex; gap: 16px; align-items: center; }
.page { max-width: 1280px; margin: 0 auto; padding: 24px; }
.page-head, .section-bar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 18px; }
.page-head h1, .section-bar h2, .panel h2 { margin-top: 0; }
.login-panel { max-width: 420px; margin: 80px auto; }
.form-card, .panel { background: #fff; border: 1px solid #d8dee6; border-radius: 8px; padding: 18px; }
.form-card label, .form-grid label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
input, select, textarea { width: 100%; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; background: #fff; }
button, .link-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 14px; border-radius: 6px; border: 1px solid #075985; background: #075985; color: #fff; font-weight: 600; cursor: pointer; }
.link-button { background: #fff; color: #075985; }
.danger-button { border-color: #b91c1c; background: #b91c1c; }
.error { color: #b91c1c; font-weight: 600; }
.dashboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric { background: #fff; border: 1px solid #d8dee6; border-radius: 8px; padding: 14px; }
.metric span { display: block; color: #64748b; font-size: 13px; }
.metric strong { display: block; font-size: 26px; margin-top: 4px; }
.metric.urgent strong { color: #b91c1c; }
.filters { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(auto-fit, minmax(110px, max-content)); gap: 10px; align-items: center; margin-bottom: 12px; }
.pool-note { margin: 0 0 18px; }
.check { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.check input { width: auto; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid #d8dee6; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 1120px; table-layout: fixed; }
th, td { text-align: left; border-bottom: 1px solid #e5e7eb; padding: 11px 12px; vertical-align: top; }
th { background: #f8fafc; color: #475569; font-size: 13px; }
th:nth-child(1), td:nth-child(1) { width: 72px; }
th:nth-child(2), td:nth-child(2) { width: 220px; }
th:nth-child(3), td:nth-child(3) { width: 110px; }
th:nth-child(4), td:nth-child(4) { width: 260px; }
th:nth-child(5), td:nth-child(5) { width: 260px; }
th:nth-child(6), td:nth-child(6) { width: 96px; }
th:nth-child(7), td:nth-child(7) { width: 96px; }
th:nth-child(8), td:nth-child(8) { width: 110px; }
td { overflow-wrap: anywhere; }
.muted { color: #64748b; font-size: 13px; }
.notice { border-radius: 8px; padding: 10px 12px; margin: 0 0 16px; }
.notice.success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.notice.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.badge { display: inline-flex; min-width: 28px; height: 24px; align-items: center; justify-content: center; border-radius: 999px; font-weight: 700; background: #e2e8f0; color: #334155; }
.pA { background: #dcfce7; color: #166534; }
.pB { background: #dbeafe; color: #1d4ed8; }
.pC { background: #fef9c3; color: #854d0e; }
.pD { background: #fee2e2; color: #991b1b; }
.detail-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.detail-head h1 { margin: 8px 0; }
.back { color: #475569; }
.status-box { background: #fff; border: 1px solid #d8dee6; border-radius: 8px; padding: 14px; min-width: 220px; height: fit-content; }
.status-box strong, .status-box span { display: block; }
.grid.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 18px; margin-bottom: 18px; }
dl { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; }
dt { color: #64748b; font-weight: 700; }
dd { margin: 0; word-break: break-word; }
.form-grid { display: grid; gap: 12px; align-content: start; }
.drafts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.draft { border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px; background: #f8fafc; }
.draft h3 { margin: 0 0 6px; font-size: 16px; }
pre { white-space: pre-wrap; word-wrap: break-word; margin: 8px 0 0; font-family: inherit; line-height: 1.45; }
.history { border-bottom: 1px solid #e5e7eb; padding: 10px 0; }
.history:last-child { border-bottom: 0; }
.history span { display: block; color: #64748b; font-size: 13px; margin-top: 2px; }
.admin-grid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.inline-filters { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) max-content; gap: 10px; align-items: center; }
.account-list { display: grid; gap: 14px; }
.account-card { border: 1px solid #e2e8f0; border-radius: 8px; padding: 14px; background: #f8fafc; display: grid; gap: 12px; }
.account-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.account-head h3 { margin: 0 0 4px; font-size: 16px; }
.account-head p { margin: 0; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 26px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.status-pill.enabled { background: #dcfce7; color: #166534; }
.status-pill.disabled { background: #fee2e2; color: #991b1b; }
.reset-form { display: grid; grid-template-columns: minmax(160px, 1fr) max-content; gap: 8px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.admin-table table { min-width: 1180px; }
.admin-table th:nth-child(1), .admin-table td:nth-child(1) { width: 72px; }
.admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 72px; }
.admin-table th:nth-child(3), .admin-table td:nth-child(3) { width: 240px; }
.admin-table th:nth-child(4), .admin-table td:nth-child(4) { width: 130px; }
.admin-table th:nth-child(5), .admin-table td:nth-child(5) { width: 300px; }
.admin-table th:nth-child(6), .admin-table td:nth-child(6) { width: 130px; }
.admin-table th:nth-child(7), .admin-table td:nth-child(7) { width: 120px; }
.assign-form { display: grid; grid-template-columns: minmax(120px, 1fr) max-content; gap: 8px; align-items: center; }
.bulk-actions { display: grid; grid-template-columns: max-content minmax(180px, 260px) max-content; gap: 10px; align-items: center; margin-bottom: 12px; }
.company-check { width: auto; }
.account-panel { margin-top: 24px; }
.resend-form { margin-top: 12px; display: flex; justify-content: center; }
.verify-note { text-align: center; margin-top: 10px; }
@media (max-width: 900px) {
  .filters, .grid.two, .detail-head, .admin-grid, .page-head, .section-bar, .inline-filters, .bulk-actions, .reset-form { grid-template-columns: 1fr; display: grid; }
  .page { padding: 14px; }
}
