﻿:root {
  color: #1f2a44;
  background: #f4f7fb;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f4f7fb; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
[hidden] { display: none !important; }

.login-screen { display: grid; min-height: 100vh; place-items: center; padding: 28px; background: radial-gradient(circle at 15% 10%, #dce7ff 0, transparent 35%), radial-gradient(circle at 95% 90%, #daeef5 0, transparent 30%), #eef3fa; }
.login-card { width: min(100%, 420px); padding: 42px; background: rgba(255,255,255,.96); border: 1px solid #e2e8f2; border-radius: 20px; box-shadow: 0 24px 70px rgba(27, 48, 82, .13); }
.brand-mark { display: grid; width: 48px; height: 48px; place-items: center; color: #fff; font-weight: 750; font-size: 19px; border-radius: 14px; background: linear-gradient(140deg, #5577f6, #3459db); box-shadow: 0 8px 18px rgba(61, 94, 220, .28); }
.brand-mark.small { width: 36px; height: 36px; font-size: 15px; border-radius: 10px; }
.eyebrow { margin: 0; color: #71809a; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.login-card .eyebrow { margin-top: 21px; }
h1 { margin: 4px 0 0; color: #1d2a42; font-size: 25px; line-height: 1.25; }
h2 { margin: 0; color: #1e2b44; font-size: 22px; }
.login-intro, .page-heading p { color: #6e7b91; font-size: 14px; line-height: 1.7; }
.login-intro { margin: 12px 0 26px; }
.stack-form { display: grid; gap: 17px; }
.stack-form label, .dialog-form label { display: grid; gap: 7px; color: #42516b; font-size: 13px; font-weight: 600; }
input, select { width: 100%; min-height: 42px; padding: 9px 11px; color: #26354f; background: #fff; border: 1px solid #cfd8e6; border-radius: 8px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus { border-color: #5072ef; box-shadow: 0 0 0 3px rgba(80,114,239,.13); }
.form-error { margin: -5px 0 0; color: #c13343; font-size: 13px; }
.primary-button, .secondary-button, .text-button, .filter-button, .table-action { min-height: 38px; padding: 8px 13px; border: 0; border-radius: 8px; font-size: 13px; font-weight: 650; transition: transform .15s, box-shadow .15s, background .15s; }
.primary-button { color: #fff; background: #4769e8; box-shadow: 0 5px 12px rgba(57, 87, 207, .2); }
.primary-button:hover { background: #385bdc; transform: translateY(-1px); }
.full-width { width: 100%; min-height: 43px; }
.secondary-button { color: #40506a; background: #fff; border: 1px solid #d3dce9; }
.secondary-button:hover { color: #3459dc; border-color: #aabcf7; background: #f8faff; }
.text-button { color: #61708a; background: transparent; }
.text-button:hover { color: #d1495b; background: #fff2f4; }

.admin-screen { min-height: 100vh; }
.topbar { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px max(24px, calc((100vw - 1440px) / 2)); color: #fff; background: #17243a; box-shadow: 0 1px 0 rgba(255,255,255,.08); }
.topbar-title, .topbar-actions { display: flex; align-items: center; gap: 11px; }
.topbar h1 { color: #f7f9fc; font-size: 16px; }
.topbar .eyebrow { color: #8ea0bf; font-size: 9px; }
.admin-name { color: #b8c5d9; font-size: 13px; }
.topbar .text-button { color: #d7dfeb; }
.topbar .text-button:hover { color: #ffb7c0; background: rgba(255,255,255,.07); }
.content { width: min(100% - 40px, 1440px); margin: 0 auto; padding: 30px 0 42px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 21px; }
.page-heading p { max-width: 720px; margin: 6px 0 0; }
.panel { background: #fff; border: 1px solid #e1e7ef; border-radius: 12px; box-shadow: 0 4px 12px rgba(31, 52, 87, .03); }
.filters-panel { display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 15px; }
.status-filters { display: flex; flex: 1; flex-wrap: wrap; gap: 6px; }
.filter-button { min-height: 34px; color: #5c6a80; background: #f5f7fb; }
.filter-button:hover { color: #3f60dc; background: #edf1ff; }
.filter-button.active { color: #3459df; background: #e9eeff; }
.search-field { width: min(100%, 270px); }
.search-field input { min-height: 36px; }
.table-panel { padding: 17px; }
.table-summary { display: flex; justify-content: space-between; margin: 0 0 13px; color: #738197; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 1050px; border-collapse: collapse; text-align: left; }
th { padding: 11px 10px; color: #718097; background: #f8fafd; border-bottom: 1px solid #e6ecf3; font-size: 12px; font-weight: 650; white-space: nowrap; }
td { padding: 13px 10px; color: #44526a; border-bottom: 1px solid #edf1f5; font-size: 13px; vertical-align: middle; }
tbody tr:hover { background: #fbfcff; }
.key-cell { color: #263650; font-family: Consolas, "SFMono-Regular", "Liberation Mono", monospace; font-size: 12px; letter-spacing: .03em; }
.muted { color: #8b97a9; }
.status-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.status-unused { color: #536273; background: #edf0f4; }.status-active { color: #208254; background: #e4f6ec; }.status-expired { color: #aa6b1c; background: #fff2de; }.status-disabled { color: #bb4150; background: #fde8eb; }
.actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 180px; }
.table-action { min-height: 30px; padding: 5px 8px; color: #3d5bd2; background: #edf1ff; font-size: 12px; }.table-action:hover { background: #dde6ff; }.table-action.danger { color: #bd4050; background: #fff0f2; }.table-action.danger:hover { background: #ffe0e5; }
.empty-cell { padding: 42px 16px; color: #8794a7; text-align: center; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 16px; color: #6f7d92; font-size: 13px; }

.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; overflow-y: auto; place-items: center; padding: 22px; background: rgba(20, 31, 51, .48); }
.dialog { width: min(100%, 600px); max-height: min(760px, calc(100vh - 44px)); overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 25px 60px rgba(6, 18, 44, .28); }
.dialog.wide { width: min(100%, 880px); }.dialog-header, .dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 21px; }.dialog-header { border-bottom: 1px solid #e8edf4; }.dialog-header h3 { margin: 0; color: #263651; font-size: 17px; }.dialog-body { padding: 21px; }.dialog-footer { justify-content: flex-end; border-top: 1px solid #e8edf4; }.close-button { display: grid; width: 30px; height: 30px; place-items: center; color: #6e7d93; background: #f1f4f8; border: 0; border-radius: 50%; font-size: 18px; }.close-button:hover { color: #a3293c; background: #ffecef; }
.dialog-form { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }.dialog-form .full { grid-column: 1 / -1; }.hint { margin: -8px 0 0; color: #8290a4; font-size: 12px; line-height: 1.6; }.dialog-error { margin: 0; color: #bf3749; font-size: 13px; }.generated-notice { margin: 0 0 16px; color: #965c19; font-size: 13px; line-height: 1.6; }.generated-list { display: grid; gap: 9px; max-height: 390px; overflow: auto; }.generated-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; background: #f7f9ff; border: 1px solid #dce5ff; border-radius: 8px; }.generated-key { color: #243758; font-family: Consolas, "SFMono-Regular", monospace; font-size: 13px; }.generated-meta { color: #77869d; font-size: 12px; }.dialog-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }.logs-list { display: grid; gap: 10px; }.log-item { padding: 12px; border: 1px solid #e6ebf1; border-radius: 8px; }.log-title { color: #33425c; font-size: 13px; font-weight: 700; }.log-meta, .log-message { margin-top: 4px; color: #7e8ba0; font-size: 12px; line-height: 1.55; }
.toast-root { position: fixed; z-index: 30; top: 18px; left: 50%; display: grid; gap: 8px; width: min(calc(100% - 32px), 430px); transform: translateX(-50%); }.toast { padding: 11px 14px; color: #fff; border-radius: 9px; box-shadow: 0 9px 24px rgba(25,36,57,.18); font-size: 13px; animation: toast-in .16s ease-out; }.toast.success { background: #247e52; }.toast.error { background: #c83f50; }.toast.info { background: #405a91; } @keyframes toast-in { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: translateY(0); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (max-width: 760px) { .login-card { padding: 30px 24px; }.topbar, .page-heading, .filters-panel { align-items: flex-start; flex-direction: column; }.topbar { padding: 14px 20px; }.topbar-actions { width: 100%; justify-content: space-between; }.content { width: min(100% - 28px, 1440px); padding-top: 22px; }.page-heading .primary-button { width: 100%; }.filters-panel { gap: 10px; }.search-field { width: 100%; }.filters-panel > .secondary-button { width: 100%; }.dialog-form { grid-template-columns: 1fr; }.dialog-form .full { grid-column: auto; }.pagination { justify-content: center; } }
