:root { color-scheme: light; font-family: Inter, "Microsoft YaHei", Arial, sans-serif; color: #182230; background: #f2f5fa; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { min-height: 38px; padding: 0 16px; border: 1px solid #1769e8; border-radius: 6px; color: #fff; background: #1769e8; font-weight: 700; cursor: pointer; }
button.secondary { color: #344054; border-color: #cfd9e8; background: #fff; }
button.danger { color: #b42318; border-color: #f4c7c3; background: #fff6f5; }
button:disabled { cursor: not-allowed; opacity: .5; }
input, select, textarea { width: 100%; min-height: 40px; padding: 9px 11px; border: 1px solid #cfd9e8; border-radius: 6px; background: #fff; }
label { display: grid; gap: 6px; color: #475467; font-size: 13px; font-weight: 700; }
a { color: #1769e8; text-decoration: none; }
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #eaf1fd; }
.admin-login[hidden], #adminApp[hidden], .drawer[hidden] { display: none; }
.login-card { display: grid; gap: 14px; width: min(400px, 100%); padding: 30px; border: 1px solid #d8e3f4; border-radius: 8px; background: #fff; box-shadow: 0 16px 50px rgba(23, 52, 91, .12); }
.login-card img { margin: auto; }.login-card h1, .login-card p { margin: 0; text-align: center; }.login-card p { color: #667085; }.login-card a { text-align: center; }
.error, .message { padding: 11px 13px; border: 1px solid #f4c7c3; border-radius: 6px; color: #b42318; background: #fff6f5; }
.message.ok { color: #067647; border-color: #a6e3c4; background: #ecfdf3; }
.admin-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 24px; color: #fff; background: #1769e8; box-shadow: 0 2px 12px rgba(24, 34, 48, .14); }
.admin-header > div { display: flex; align-items: center; gap: 16px; }.admin-header span { font-size: 12px; opacity: .85; }.admin-header a { color: #fff; }
.admin-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.admin-nav { padding: 22px 14px; border-right: 1px solid #d8e3f4; background: #fff; }
.admin-nav button { display: block; width: 100%; margin-bottom: 6px; color: #344054; border-color: transparent; background: transparent; text-align: left; }
.admin-nav button.active { color: #1769e8; border-color: #c7dafb; background: #edf4ff; }
main { min-width: 0; padding: 28px; }.tab { display: none; }.tab.active { display: block; }
.page-heading, .table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }.page-heading h1, .page-heading p, .table-toolbar h2 { margin: 0; }.page-heading p { margin-top: 5px; color: #667085; }.page-heading input, .table-toolbar input { width: min(320px, 45vw); }
.panel { margin-bottom: 18px; padding: 18px; border: 1px solid #d8e3f4; border-radius: 7px; background: #fff; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 14px; align-items: end; }
.feature-selector { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 12px; border: 1px solid #d8e3f4; border-radius: 6px; }.feature-selector legend { padding: 0 6px; color: #475467; font-size: 13px; font-weight: 700; }.feature-selector label { display: flex; align-items: center; gap: 6px; }.feature-selector input { width: 16px; min-height: 16px; }
.data-table { overflow: auto; }.data-table table { width: 100%; border-collapse: collapse; font-size: 13px; }.data-table th, .data-table td { padding: 12px; border-bottom: 1px solid #e4eaf3; text-align: left; white-space: nowrap; }.data-table th { color: #475467; background: #f7f9fc; }.data-table td.actions { display: flex; gap: 7px; }.data-table td.actions button { min-height: 32px; padding: 0 10px; }
.tag { display: inline-block; padding: 3px 8px; border-radius: 999px; color: #175cd3; background: #eff8ff; font-size: 12px; font-weight: 700; }.tag.ok { color: #067647; background: #ecfdf3; }.tag.bad { color: #b42318; background: #fff1f0; }
.generated > div { display: flex; align-items: center; justify-content: space-between; }.generated h2 { margin: 0; font-size: 17px; }.generated textarea { height: 180px; margin-top: 12px; font-family: Consolas, monospace; }
.drawer { position: fixed; inset: 0; z-index: 50; display: grid; justify-items: end; }.drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }.drawer aside { position: relative; width: min(720px, 100%); height: 100%; overflow: auto; padding: 28px; background: #f7f9fc; box-shadow: -14px 0 40px rgba(15, 23, 42, .2); }.drawer-close { position: absolute; top: 16px; right: 18px; padding: 0; color: #475467; border: 0; background: transparent; font-size: 28px; }.detail-title h2 { margin: 0; }.detail-title p { margin: 6px 0 18px; color: #667085; }.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }.detail-grid > div { padding: 13px; border: 1px solid #d8e3f4; border-radius: 6px; background: #fff; }.detail-grid span, .detail-grid strong { display: block; }.detail-grid span { color: #667085; font-size: 12px; }.detail-grid strong { margin-top: 6px; }.detail-section { margin-top: 20px; }.detail-section h3 { font-size: 15px; }.detail-list { display: grid; gap: 8px; }.detail-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid #d8e3f4; border-radius: 6px; background: #fff; }.grant-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; }.grant-form .feature-selector { grid-column: 1 / -1; }
.form-help { margin: -4px 0 10px; color: #667085; font-size: 13px; line-height: 1.6; }
.expiry-section { padding: 14px; border: 1px solid #c7dafb; border-radius: 6px; background: #f5f9ff; }
.compact-form { grid-template-columns: minmax(220px, 1fr) auto; }
.renewal-section { padding: 14px; border: 1px solid #f4d7a5; border-radius: 6px; background: #fffaf0; }
@media (max-width: 900px) { .admin-shell { grid-template-columns: 1fr; }.admin-nav { display: flex; gap: 6px; overflow: auto; border-right: 0; border-bottom: 1px solid #d8e3f4; }.admin-nav button { width: auto; margin: 0; white-space: nowrap; }.form-grid { grid-template-columns: repeat(2, 1fr); } main { padding: 18px; } }
