:root {
  color-scheme: light;
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-soft: #f7f9fd;
  --surface-tint: #f2f5ff;
  --border: #e3e8f2;
  --border-strong: #d5ddef;
  --text: #172033;
  --muted: #748096;
  --muted-2: #9aa5b7;
  --violet: #635bdf;
  --violet-2: #9a56dd;
  --cyan: #0ea5c8;
  --green: #12a878;
  --orange: #e98b2a;
  --red: #dc4e64;
  --shadow: 0 24px 70px rgba(63, 79, 115, .16);
  --shadow-soft: 0 10px 30px rgba(51, 65, 96, .08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; stroke-width: 2; }
.is-hidden { display: none !important; }
.eyebrow { color: #6978ca; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.align-right { text-align: right !important; }

.btn {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  color: var(--text);
  background: var(--surface);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, opacity .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { cursor: wait; opacity: .65; transform: none; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-primary { color: #fff; background: linear-gradient(110deg, #5569df 0%, #765bdf 58%, #a252dc 100%); box-shadow: 0 11px 24px rgba(99, 91, 223, .22); }
.btn-secondary { color: #555fcd; border-color: #dce1fb; background: #f7f8ff; }
.btn-danger { color: var(--red); border-color: #f5cdd5; background: #fff7f8; }
.btn-large { min-height: 54px; font-size: 16px; }
.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  color: #647087;
  background: #fff;
}
.text-button { border: 0; background: transparent; color: var(--violet); font-weight: 750; display: inline-flex; gap: 6px; align-items: center; }

input, select, textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input, select { min-height: 44px; padding: 0 13px; }
textarea { padding: 12px 13px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #8b91ed; box-shadow: 0 0 0 3px rgba(99, 91, 223, .11); }
label { font-size: 13px; font-weight: 750; color: #556076; }
.input-with-icon, .search-field { position: relative; }
.input-with-icon > svg, .input-with-icon > i, .search-field > svg, .search-field > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #8a95aa; pointer-events: none; }
.input-with-icon input { padding-left: 45px; }
.search-field input { padding-left: 39px; }
.search-field { flex: 1 1 320px; max-width: 460px; }

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 18px);
  max-width: min(92vw, 520px);
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 7px;
  color: #fff;
  background: #182034;
  box-shadow: 0 18px 50px rgba(19, 27, 44, .25);
  opacity: 0;
  pointer-events: none;
  transition: .22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #b63a50; }
.toast.success { background: #087b5d; }

/* Redeem */
.redeem-body {
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(225, 229, 255, .8), rgba(244, 248, 255, .94) 48%, rgba(220, 244, 250, .78)),
    #eef4fc;
  overflow-x: hidden;
}
.ambient-grid { position: fixed; inset: 0; pointer-events: none; opacity: .32; background-image: linear-gradient(rgba(102, 118, 162, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(102, 118, 162, .04) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 72%); }
.redeem-page { position: relative; width: min(1440px, calc(100% - 48px)); min-height: 100vh; margin: 0 auto; padding: clamp(58px, 9vh, 112px) 0 32px; }
.redeem-header { display: flex; align-items: center; justify-content: space-between; margin: 0 12px 32px; }
.brand-lockup, .admin-brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 15px; display: grid; place-items: center; color: #fff; font-size: 26px; background: linear-gradient(140deg, #5668df, #a452db); box-shadow: 0 12px 28px rgba(104, 84, 220, .24); }
.brand-lockup strong { display: block; color: transparent; background: linear-gradient(105deg, #5263d8, #ad4cda); background-clip: text; font-size: clamp(26px, 2.5vw, 37px); line-height: 1.16; font-weight: 900; }
.brand-lockup small { display: block; color: #798398; margin-top: 5px; font-size: 14px; }
.online-pill, .live-chip { display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px; border: 1px solid rgba(255,255,255,.82); border-radius: 999px; color: #667186; background: rgba(255,255,255,.78); box-shadow: var(--shadow-soft); font-size: 13px; }
.online-pill span, .live-chip span, .system-state > span { width: 9px; height: 9px; border-radius: 50%; background: #16ae7a; box-shadow: 0 0 0 5px rgba(22, 174, 122, .1); }
.redeem-shell { min-height: 690px; padding: 34px; border: 1px solid rgba(255,255,255,.9); border-radius: 26px; display: grid; grid-template-columns: minmax(330px, 405px) minmax(0, 1fr); gap: 34px; background: rgba(255,255,255,.93); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.redeem-form-panel { padding: 18px 10px 12px; }
.section-title-row { display: flex; align-items: center; gap: 14px; }
.section-title-row h1 { margin: 0 0 5px; font-size: 23px; }
.section-title-row p { margin: 0; color: var(--muted); font-size: 13px; }
.soft-icon { width: 46px; height: 46px; flex: 0 0 auto; border: 1px solid #dbe0ff; border-radius: 13px; display: grid; place-items: center; color: #6070e2; background: #f0f2ff; font-size: 22px; }
.notice-line { min-height: 52px; margin: 30px 0; padding: 0 15px; border: 1px solid #e6e9f1; border-radius: 10px; display: flex; align-items: center; gap: 11px; color: #747f92; background: #f7f8fb; font-size: 13px; }
.redeem-form { display: grid; gap: 12px; }
.redeem-form .input-with-icon input { height: 56px; font-size: 15px; border-color: #ced6fb; }
.redeem-form .btn { margin-top: 10px; width: 100%; }
.redeem-progress { margin-top: 2px; padding: 12px 14px; border: 1px solid #dfe3f5; border-radius: 10px; display: grid; gap: 8px; background: #f7f8ff; }
.redeem-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #667187; font-size: 11px; }
.redeem-progress-head strong { color: #5f5bd6; font-size: 12px; }
.redeem-progress-track { height: 8px; overflow: hidden; border-radius: 99px; background: #e6e8f3; }
.redeem-progress-track span { width: 0; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #5b6ce1, #a34dde); transition: width .2s ease; }
.redeem-progress small { min-height: 16px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.redeem-progress.has-error { border-color: #efd2d8; background: #fff5f6; }
.redeem-progress.has-error .redeem-progress-head strong, .redeem-progress.has-error .redeem-progress-head { color: var(--red); }
.redeem-progress.has-error .redeem-progress-track span { background: var(--red); }
.trust-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; margin: 22px 0 30px; color: #7d88a0; font-size: 12px; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { color: #7180e7; }
.verify-setting { padding: 22px 4px 17px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.verify-setting strong { display: block; font-size: 14px; }
.verify-setting p, .setting-note { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.setting-note { padding: 12px 4px 0; }
.switch { position: relative; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span { width: 54px; height: 30px; border-radius: 18px; display: block; background: #cbd2df; box-shadow: inset 0 1px 3px rgba(25, 35, 55, .15); transition: .2s ease; }
.switch span::after { content: ""; width: 24px; height: 24px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(30, 39, 62, .25); transition: .2s ease; }
.switch input:checked + span { background: #625edf; }
.switch input:checked + span::after { transform: translateX(24px); }
.credential-console { min-width: 0; padding: 28px; border: 1px solid #e2e6f2; border-radius: 20px; background: linear-gradient(145deg, #f7f9fe, #f0f5fc); }
.console-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.console-heading h2 { margin: 7px 0 0; font-size: 22px; }
.format-pill { flex: 0 0 auto; padding: 7px 13px; border: 1px solid #dbe1ff; border-radius: 999px; color: #6170d3; background: #f0f2ff; font-size: 12px; font-weight: 800; }
.console-stage { min-height: 525px; border: 1px dashed #d8dfef; border-radius: 16px; display: flex; align-items: stretch; justify-content: center; background: rgba(255,255,255,.58); overflow: hidden; }
.empty-console { margin: auto; text-align: center; color: var(--muted); }
.empty-icon { width: 68px; height: 68px; margin: 0 auto 17px; border: 1px solid #dfe4ff; border-radius: 20px; display: grid; place-items: center; color: #7a85dc; background: #f1f3ff; font-size: 31px; }
.empty-console strong { display: block; color: #5d687e; font-size: 16px; }
.empty-console p { margin: 8px 0; color: #9aa5b7; font-size: 13px; }
.result-view { width: 100%; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.result-view-compact { justify-content: center; }
.success-line { min-height: 48px; padding: 0 15px; border: 1px solid #bee9d8; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; color: #147558; background: #ebfaf4; font-size: 13px; }
.success-line > span { display: flex; align-items: center; gap: 8px; }
.success-line i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.package-hero { padding: 22px; border: 1px solid #dfe4f1; border-radius: 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; background: #fff; box-shadow: var(--shadow-soft); }
.package-icon { width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: #655cdf; box-shadow: 0 10px 24px rgba(99, 91, 223, .24); font-size: 28px; }
.package-copy .eyebrow { font-size: 9px; }
.package-copy h3 { margin: 5px 0; font-size: 18px; }
.package-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.json-tile { width: 112px; min-height: 110px; border-radius: 15px; padding: 17px; color: #fff; background: linear-gradient(145deg, #5866dd, #9754d9); display: flex; flex-direction: column; justify-content: center; }
.json-tile small { font-size: 8px; font-weight: 800; opacity: .75; }
.json-tile strong { margin: 6px 0; font-size: 25px; }
.json-tile span { width: max-content; padding: 4px 7px; border-radius: 6px; background: rgba(255,255,255,.17); font-size: 8px; }
.credential-list { display: grid; gap: 10px; max-height: 270px; overflow-y: auto; padding-right: 4px; }
.credential-item { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.credential-item-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 11px; }
.credential-item-head strong { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.credential-item-head span { flex: 0 0 auto; color: var(--green); font-size: 11px; font-weight: 800; }
.credential-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.credential-field { min-width: 0; padding: 9px 10px; border-radius: 7px; background: #f7f8fc; }
.credential-field small { display: block; margin-bottom: 4px; color: var(--muted-2); font-size: 9px; text-transform: uppercase; }
.credential-field code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4d5770; font-size: 11px; }
.snapshot-ready { min-height: 150px; padding: 24px; border: 1px solid #dfe4f1; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 16px; color: #43506a; background: #fff; text-align: left; }
.snapshot-ready-icon { width: 58px; height: 58px; flex: 0 0 auto; border-radius: 16px; display: grid; place-items: center; color: #fff; background: #18aa7b; box-shadow: 0 10px 24px rgba(24,170,123,.2); }
.snapshot-ready-icon svg { width: 29px; height: 29px; }
.snapshot-ready strong { display: block; font-size: 18px; }
.snapshot-ready p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.result-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.summary-cell { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.summary-cell small { display: block; color: var(--muted-2); font-size: 10px; }
.summary-cell strong { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: auto; }
.result-actions-download { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.result-actions .btn { padding: 0 10px; }
.download-status { padding: 12px 14px; border: 1px solid #dfe3f5; border-radius: 10px; display: grid; gap: 8px; background: #f7f8ff; }
.download-status-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #667187; font-size: 11px; }
.download-status-head strong { color: #5f5bd6; font-size: 12px; }
.download-status-track { height: 8px; overflow: hidden; border-radius: 99px; background: #e6e8f3; }
.download-status-track span { width: 0; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #5b6ce1, #a34dde); transition: width .2s ease; }
.download-status small { color: var(--muted); font-size: 10px; }
.download-status.is-complete { border-color: #bee9d8; background: #ebfaf4; }
.download-status.is-complete .download-status-head, .download-status.is-complete .download-status-head strong { color: #147558; }
.download-status.is-complete .download-status-track span { background: #18aa7b; }
.download-status.has-error { border-color: #efd2d8; background: #fff5f6; }
.download-status.has-error .download-status-head, .download-status.has-error .download-status-head strong { color: var(--red); }
.download-status.has-error .download-status-track span { background: var(--red); }
.redeem-footer { display: flex; justify-content: space-between; padding: 18px 12px 0; color: rgba(100, 111, 134, .7); font-size: 11px; }

/* Admin */
.admin-body { min-height: 100vh; background: #f4f6fa; }
.login-view { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: linear-gradient(135deg, #111827 0 50%, #18243a 50%); }
.login-panel { width: min(420px, 100%); padding: 38px; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; color: #fff; background: rgba(27, 36, 55, .92); box-shadow: 0 28px 80px rgba(0,0,0,.34); }
.login-mark { width: 56px; height: 56px; margin-bottom: 28px; }
.login-panel h1 { margin: 8px 0; font-size: 29px; }
.login-panel > p { margin: 0 0 28px; color: #9eabc1; line-height: 1.65; font-size: 13px; }
.login-panel label { display: block; color: #c8d0de; margin-bottom: 9px; }
.login-panel .dark-input input { border-color: #36425a; color: #fff; background: #151e30; }
.login-panel .btn { width: 100%; margin-top: 16px; }
.login-back { margin-top: 20px; display: flex; justify-content: center; align-items: center; gap: 7px; color: #91a0b8; font-size: 12px; }
.admin-app { min-height: 100vh; display: grid; grid-template-columns: 244px minmax(0, 1fr); }
.sidebar { position: sticky; z-index: 40; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; color: #d7dfec; background: #151d2c; }
.admin-brand { padding: 0 9px 24px; border-bottom: 1px solid rgba(255,255,255,.07); }
.admin-brand .brand-mark { width: 41px; height: 41px; border-radius: 11px; font-size: 20px; }
.admin-brand strong, .admin-brand small { display: block; }
.admin-brand strong { color: #fff; font-size: 17px; }
.admin-brand small { margin-top: 3px; color: #7f8ba1; font-size: 10px; }
.admin-nav { display: grid; gap: 5px; margin-top: 24px; }
.nav-item { width: 100%; min-height: 46px; padding: 0 12px; border: 0; border-radius: 7px; display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 10px; text-align: left; color: #9da9bd; background: transparent; }
.nav-item:hover { color: #e2e7f0; background: rgba(255,255,255,.045); }
.nav-item.active { color: #fff; background: #5f5bd6; box-shadow: 0 8px 24px rgba(80, 73, 196, .25); }
.nav-item b { min-width: 23px; padding: 3px 6px; border-radius: 10px; text-align: center; color: #aeb8ca; background: rgba(255,255,255,.08); font-size: 9px; }
.nav-item.active b { color: #fff; }
.sidebar-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.07); }
.system-state { padding: 10px; display: flex; align-items: center; gap: 11px; }
.system-state > span { width: 8px; height: 8px; flex: 0 0 auto; }
.system-state strong, .system-state small { display: block; }
.system-state strong { color: #d6deea; font-size: 11px; }
.system-state small { margin-top: 4px; color: #77849a; font-size: 9px; }
.sidebar-foot > a { margin-top: 7px; padding: 10px; display: flex; align-items: center; gap: 9px; color: #8d99ad; font-size: 11px; }
.admin-main { min-width: 0; }
.admin-topbar { height: 76px; position: sticky; z-index: 30; top: 0; padding: 0 30px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(255,255,255,.92); backdrop-filter: blur(15px); }
.admin-topbar h1 { margin: 3px 0 0; font-size: 20px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.live-chip { box-shadow: none; border-color: var(--border); background: #fff; }
.live-chip span { width: 7px; height: 7px; }
.mobile-only { display: none; }
.admin-content { width: min(1540px, 100%); margin: 0 auto; padding: 28px 30px 50px; }
.admin-section { display: none; }
.admin-section.active { display: block; }
.section-toolbar { min-height: 58px; margin-bottom: 21px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.section-toolbar h2 { margin: 0 0 6px; font-size: 22px; }
.section-toolbar p { margin: 0; color: var(--muted); font-size: 12px; }
.toolbar-actions { display: flex; gap: 10px; }
.action-menu { position: relative; }
.action-menu > .btn { height: 100%; }
.menu-chevron { width: 14px; height: 14px; margin-left: 1px; transition: transform .18s ease; }
.action-menu > .btn[aria-expanded="true"] .menu-chevron { transform: rotate(180deg); }
.action-dropdown { width: 260px; position: absolute; z-index: 45; top: calc(100% + 8px); right: 0; padding: 7px; border: 1px solid var(--border); border-radius: 8px; display: grid; gap: 3px; background: #fff; box-shadow: 0 18px 45px rgba(22, 31, 50, .16); }
.action-dropdown button { min-height: 42px; padding: 0 11px; border: 0; border-radius: 6px; display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 8px; color: #3d4659; background: transparent; text-align: left; font-size: 11px; font-weight: 650; }
.action-dropdown button:hover, .action-dropdown button:focus-visible { color: #5459c9; background: #f2f3ff; outline: 0; }
.action-dropdown button svg { width: 17px; height: 17px; color: #667085; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.stat-card { min-width: 0; min-height: 132px; padding: 20px; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: flex-start; gap: 15px; background: #fff; box-shadow: 0 7px 20px rgba(30, 44, 73, .045); }
.stat-icon { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 8px; display: grid; place-items: center; }
.accent-violet .stat-icon { color: var(--violet); background: #efefff; }
.accent-green .stat-icon { color: var(--green); background: #e8f8f2; }
.accent-cyan .stat-icon { color: var(--cyan); background: #e7f7fa; }
.accent-orange .stat-icon { color: var(--orange); background: #fff4e7; }
.stat-card p { margin: 1px 0 7px; color: var(--muted); font-size: 11px; }
.stat-card strong { display: block; font-size: 28px; line-height: 1; }
.stat-card small { display: block; margin-top: 12px; color: var(--muted-2); font-size: 10px; }
.stat-card small b { color: #47536a; }
.dashboard-grid { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 16px; }
.data-panel, .table-panel { border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: 0 7px 20px rgba(30, 44, 73, .04); }
.data-panel { padding: 20px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.panel-heading h3 { margin: 0 0 5px; font-size: 15px; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.metric-chip { padding: 6px 9px; border-radius: 6px; color: #5a5dcc; background: #f0f1ff; font-size: 10px; font-weight: 800; }
.trend-chart { height: 230px; margin-top: 20px; padding: 15px 3px 2px; border-bottom: 1px solid #edf0f5; display: grid; grid-template-columns: repeat(7, 1fr); gap: 15px; align-items: end; }
.trend-column { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; }
.trend-value { color: #68738a; font-size: 9px; }
.trend-bar { width: min(32px, 70%); min-height: 4px; border-radius: 5px 5px 2px 2px; background: linear-gradient(#675fdf, #28a8c5); transition: height .4s ease; }
.trend-label { color: #8e99ac; font-size: 9px; }
.health-meter { min-height: 190px; display: flex; align-items: center; justify-content: center; gap: 25px; }
.health-ring { --score: 0deg; width: 118px; height: 118px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--green) var(--score), #edf0f5 0); position: relative; }
.health-ring::after { content: ""; width: 88px; height: 88px; position: absolute; border-radius: 50%; background: #fff; }
.health-ring span { position: relative; z-index: 1; font-size: 19px; font-weight: 850; }
.health-copy { max-width: 155px; }
.health-copy strong { font-size: 14px; }
.health-copy p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.health-legend { padding-top: 14px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; }
.health-legend span { display: flex; align-items: center; gap: 7px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }.dot.violet { background: var(--violet); }.dot.orange { background: var(--orange); }
.recent-panel { margin-top: 16px; }
.activity-list { margin-top: 14px; }
.activity-row { min-height: 56px; padding: 9px 4px; border-top: 1px solid #edf0f5; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; }
.activity-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: var(--green); background: #e9f8f2; }
.activity-copy strong, .activity-copy small { display: block; }
.activity-copy strong { font-size: 11px; }.activity-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.activity-time { color: var(--muted-2); font-size: 9px; }
.empty-inline { padding: 35px 10px; text-align: center; color: var(--muted-2); font-size: 11px; }
.filter-bar { min-height: 62px; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; gap: 10px; background: #fff; }
.filter-bar select { width: 150px; }
.result-count { margin-left: auto; padding-right: 5px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 860px; border-collapse: collapse; }
#section-accounts table { min-width: 1220px; }
th, td { padding: 13px 17px; border-bottom: 1px solid #edf0f5; text-align: left; vertical-align: middle; }
th { height: 43px; color: #8792a5; background: #fafbfc; font-size: 10px; font-weight: 750; }
td { color: #4b566c; font-size: 11px; }
tbody tr:hover { background: #fcfcff; }
tbody tr:last-child td { border-bottom: 0; }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.cell-avatar { width: 31px; height: 31px; flex: 0 0 auto; border-radius: 7px; display: grid; place-items: center; color: #5f67ce; background: #eff0ff; font-weight: 800; }
.cell-main strong, .cell-main small { display: block; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-main strong { color: #313c52; font-size: 11px; }.cell-main small { margin-top: 3px; color: var(--muted-2); font-size: 9px; }
.status-badge { width: max-content; padding: 5px 8px; border-radius: 5px; display: inline-flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 800; }
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-available { color: #07835f; background: #e9f8f2; }
.status-delivered, .status-redeemed { color: #5962cf; background: #eff0ff; }
.status-disabled { color: #9a5360; background: #fceef1; }
.select-cell { width: 42px; padding-left: 14px; padding-right: 6px; text-align: center; }
.row-checkbox { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; accent-color: var(--violet); cursor: pointer; }
.health-cell, .subscription-cell { min-width: 135px; }
.health-cell small, .subscription-cell small { display: block; max-width: 190px; margin-top: 5px; overflow: hidden; color: var(--muted-2); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.subscription-cell strong { color: #354056; font-size: 10px; }
.health-badge { width: max-content; padding: 5px 8px; border-radius: 5px; display: inline-flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 800; }
.health-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.health-unchecked { color: #778397; background: #f0f2f5; }
.health-alive { color: #087e5e; background: #e8f8f2; }
.health-invalid { color: #b06c16; background: #fff4e5; }
.health-suspended { color: #bd3850; background: #fdecef; }
.health-error { color: #7653b7; background: #f2edfb; }
.group-badge { width: max-content; max-width: 180px; padding: 5px 8px; border-radius: 5px; display: inline-flex; align-items: center; gap: 6px; overflow: hidden; color: #56637a; background: #eef2f7; font-size: 9px; font-weight: 750; white-space: nowrap; text-overflow: ellipsis; }
.group-badge svg { flex: 0 0 auto; color: #6b70cf; }
.credential-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.mini-tag { padding: 3px 6px; border-radius: 4px; color: #6f7a90; background: #f1f3f7; font-size: 8px; }
.table-actions { display: flex; justify-content: flex-end; gap: 4px; }
.table-action { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; display: grid; place-items: center; color: #7c879a; background: transparent; }
.table-action:hover { color: var(--violet); background: #f0f1ff; }
.table-action.danger:hover { color: var(--red); background: #fff0f2; }
.code-text { font-family: "Cascadia Code", Consolas, monospace; color: #37425a; font-size: 10px; }
.table-empty { padding: 70px 20px; text-align: center; color: var(--muted-2); }
.table-empty svg { width: 32px; height: 32px; margin-bottom: 11px; }.table-empty strong { display: block; color: #697489; font-size: 13px; }.table-empty p { margin: 7px 0 0; font-size: 10px; }

/* Modal */
.modal-backdrop { position: fixed; z-index: 100; inset: 0; padding: 20px; display: grid; place-items: center; background: rgba(10, 16, 29, .55); backdrop-filter: blur(5px); }
.modal { width: min(600px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; box-shadow: 0 30px 90px rgba(13, 20, 34, .3); }
.modal-wide { width: min(760px, 100%); }
.modal-head { min-height: 68px; padding: 15px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.modal-head h3 { margin: 0 0 4px; font-size: 17px; }.modal-head p { margin: 0; color: var(--muted); font-size: 10px; }
.modal-body { padding: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-group { min-width: 0; display: grid; gap: 7px; }.form-group.full { grid-column: 1 / -1; }
.form-hint { color: var(--muted); font-size: 9px; line-height: 1.55; }
.modal-actions { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 9px; background: #fafbfc; }
.integration-config { display: grid; gap: 18px; }
.integration-status { min-height: 64px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; gap: 12px; background: var(--surface-soft); }
.integration-status > svg { width: 22px; height: 22px; flex: 0 0 auto; }
.integration-status strong, .integration-status span { display: block; }
.integration-status strong { font-size: 12px; }.integration-status span { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.integration-status.enabled { border-color: #cdebdc; color: #087b5d; background: #f1fbf6; }
.integration-status.disabled { border-color: #f0d9de; color: var(--red); background: #fff7f8; }
.integration-copy-row, .integration-secret-row { display: grid; gap: 8px; align-items: center; }
.integration-copy-row { grid-template-columns: minmax(0, 1fr) 40px; }
.integration-secret-row { grid-template-columns: minmax(0, 1fr) 40px 40px; }
.integration-copy-row .icon-btn, .integration-secret-row .icon-btn { width: 40px; height: 44px; }
.integration-secret-row .icon-btn:disabled { cursor: not-allowed; opacity: .45; }
.code-input { min-width: 0; font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; }
.settings-layout { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }
.settings-fields { display: grid; gap: 18px; margin-top: 22px; }
.settings-summary { padding: 13px 14px; border: 1px solid var(--border); border-radius: 7px; display: flex; align-items: center; gap: 9px; color: var(--muted); background: var(--surface-soft); font-size: 10px; }
.settings-summary svg { width: 15px; height: 15px; color: var(--violet); }
.settings-summary strong { color: var(--text); font-size: 20px; }
.settings-summary-note { margin-left: auto; font-size: 9px; text-align: right; }
.token-panel { min-width: 0; }
.token-list { margin-top: 18px; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.token-item { padding: 13px 14px; border-bottom: 1px solid var(--border); display: grid; gap: 11px; }
.token-item:last-child { border-bottom: 0; }
.token-item-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.token-icon { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 7px; color: var(--violet); background: #f0f1ff; }
.token-icon svg { width: 15px; height: 15px; }
.token-item-heading strong, .token-item-heading small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-item-heading strong { color: var(--text); font-size: 11px; }.token-item-heading small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.token-secret { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.token-secret .code-input { height: 36px; padding: 0 10px; background: #f8f9fc; }
.token-empty { min-height: 150px; padding: 28px 18px; display: grid; place-items: center; gap: 7px; color: var(--muted-2); text-align: center; }
.token-empty svg { width: 28px; height: 28px; color: #a3a9d8; }.token-empty strong { color: #697489; font-size: 12px; }.token-empty span { font-size: 9px; }
.btn-quiet { color: #697489; background: #f5f6fa; border-color: #e8eaf1; }
.select-filtered-button { margin-left: auto; padding: 5px 8px; color: var(--violet); font-size: 10px; }
.accounts-pagination { min-height: 48px; padding: 10px 14px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 9px; }
.accounts-pagination > div { display: flex; align-items: center; gap: 4px; }
.page-button { min-width: 28px; height: 28px; padding: 0 7px; border: 1px solid transparent; border-radius: 6px; color: #6d7890; background: transparent; font-size: 10px; }
.page-button:hover, .page-button.active { border-color: #d9daf7; color: var(--violet); background: #f1f1ff; }
.compact-transfer-form { width: min(520px, 100%); }
.modal:has(.compact-transfer-form) { width: min(520px, 100%); }
.switch-row { min-height: 38px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.capsule-switch { width: 42px; height: 24px; margin-left: auto; padding: 3px; border-radius: 99px; display: flex; align-items: center; background: #d7dbe5; transition: background .18s ease; }
.capsule-switch span { width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(26,35,55,.2); transition: transform .18s ease; }
.switch-row input:checked + .capsule-switch { background: var(--violet); }.switch-row input:checked + .capsule-switch span { transform: translateX(18px); }
.import-sample { margin-top: 10px; padding: 11px; border-radius: 7px; color: #667087; background: #f4f6fa; overflow-x: auto; font: 10px/1.6 "Cascadia Code", Consolas, monospace; }
.import-preview-list { max-height: 390px; border: 1px solid var(--border); border-radius: 8px; overflow-y: auto; }
.import-preview-item { min-height: 58px; padding: 9px 12px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 11px; }
.import-preview-item:last-child { border-bottom: 0; }
.import-preview-item strong, .import-preview-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-preview-item strong { color: #354056; font-size: 10px; }.import-preview-item small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.import-preview-more { padding: 11px; color: var(--muted); text-align: center; font-size: 9px; }
.import-progress-body { display: grid; gap: 15px; }
.import-progress-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 10px; }
.import-progress-summary strong { color: var(--text); font-size: 13px; }
.import-progress-track { height: 10px; border: 1px solid #e1e3f2; border-radius: 99px; overflow: hidden; background: #f0f2f7; }
.import-progress-track span { width: 0; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, #596de8, #9b4ce2); transition: width .22s ease; }
.import-complete-summary { padding: 12px 14px; border: 1px solid #d9eee5; border-radius: 7px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; color: #4d6e63; background: #f2fbf7; font-size: 10px; }
.import-complete-summary span { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.import-complete-summary b { color: #087e5e; font-size: 16px; }
.validation-note-error { margin-top: 0; border-left-color: var(--red); color: #8f3d4c; background: #fff4f6; }
.generated-list { max-height: 330px; overflow-y: auto; border: 1px solid var(--border); border-radius: 7px; }
.generated-item { padding: 10px 12px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 15px; font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; }.generated-item:last-child { border-bottom: 0; }
.group-manager-body { display: grid; gap: 20px; }
.group-create-form { padding: 15px; border: 1px solid #e2e5f4; border-radius: 8px; display: grid; grid-template-columns: minmax(150px, .8fr) minmax(220px, 1.35fr) auto; align-items: end; gap: 12px; background: #f8f9ff; }
.group-create-form .btn { min-height: 38px; white-space: nowrap; }
.group-manager-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.group-manager-heading strong { font-size: 12px; }.group-manager-heading span { color: var(--muted); font-size: 9px; }
.group-manager-list { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.group-manager-item { min-height: 66px; padding: 11px 13px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; }
.group-manager-item:last-child { border-bottom: 0; }
.group-manager-item:hover { background: #fbfbff; }
.group-manager-icon { width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; color: #6265cd; background: #eff0ff; }
.group-manager-copy { min-width: 0; }
.group-manager-copy strong, .group-manager-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-manager-copy strong { color: #354056; font-size: 11px; }.group-manager-copy small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.group-manager-count { padding: 5px 8px; border-radius: 5px; color: #667187; background: #f0f2f6; font-size: 9px; font-weight: 750; white-space: nowrap; }
.group-manager-empty { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted-2); text-align: center; }
.group-manager-empty svg { width: 29px; height: 29px; }.group-manager-empty strong { color: #657087; font-size: 11px; }.group-manager-empty span { font-size: 9px; }
.group-delete-note { min-height: 90px; padding: 16px; border: 1px solid #f0d9de; border-radius: 8px; display: flex; align-items: flex-start; gap: 13px; color: #a33d50; background: #fff7f8; }
.group-delete-note > svg { flex: 0 0 auto; }.group-delete-note strong { color: #45333a; font-size: 12px; }.group-delete-note p { margin: 7px 0 0; color: #8b6670; font-size: 10px; line-height: 1.55; }
.validation-flow { margin-bottom: 20px; padding: 13px; border: 1px solid #e1e5f5; border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #677187; background: #f7f8ff; font-size: 10px; }
.validation-flow span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.validation-flow b { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--violet); font-size: 9px; }
.validation-flow > svg { color: #a1a9b9; }
.validation-note { margin-top: 18px; padding: 14px; border-left: 3px solid var(--cyan); display: flex; gap: 11px; color: #526076; background: #f0f9fb; }
.validation-note > svg { flex: 0 0 auto; color: var(--cyan); }
.validation-note strong { font-size: 11px; }.validation-note p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.validation-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.validation-summary > div { padding: 13px; border: 1px solid var(--border); border-radius: 7px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; }
.validation-summary strong { font-size: 20px; }
.validation-result-list { max-height: 360px; margin-top: 15px; overflow-y: auto; border: 1px solid var(--border); border-radius: 7px; }
.validation-result-item { min-height: 58px; padding: 10px 12px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; }
.validation-result-item:last-child { border-bottom: 0; }
.validation-result-item strong, .validation-result-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.validation-result-item strong { font-size: 10px; }.validation-result-item small { max-width: 390px; margin-top: 4px; color: var(--muted); font-size: 8px; }
.cleanup-summary { display: grid; gap: 10px; }
.cleanup-summary span { padding: 13px; border: 1px solid var(--border); border-radius: 7px; color: #59657a; background: #f8f9fb; font-size: 11px; }
.cleanup-summary b { color: var(--text); font-size: 16px; }
.cleanup-note { margin: 14px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }

@media (max-width: 1120px) {
  .redeem-page { width: min(960px, calc(100% - 32px)); padding-top: 48px; }
  .redeem-shell { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 22px; padding: 22px; }
  .credential-console { padding: 22px; }
  .package-hero { grid-template-columns: auto 1fr; }.json-tile { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .redeem-page { width: min(640px, calc(100% - 24px)); padding: 26px 0; }
  .redeem-header { margin: 0 4px 22px; }
  .brand-lockup .brand-mark { width: 44px; height: 44px; border-radius: 12px; }
  .brand-lockup strong { font-size: 22px; }.brand-lockup small { font-size: 11px; }
  .online-pill { padding: 8px 10px; font-size: 11px; }
  .redeem-shell { grid-template-columns: 1fr; border-radius: 18px; padding: 15px; gap: 16px; }
  .redeem-form-panel { padding: 14px 8px 4px; }
  .notice-line { margin: 22px 0; }
  .credential-console { padding: 17px; border-radius: 15px; }
  .console-stage { min-height: 430px; }
  .credential-fields { grid-template-columns: 1fr; }
  .result-actions { grid-template-columns: 1fr; }
  .redeem-footer { display: none; }

  .admin-app { display: block; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .sidebar { width: 100%; height: calc(66px + env(safe-area-inset-bottom)); position: fixed; z-index: 70; left: 0; right: 0; top: auto; bottom: 0; padding: 5px 8px env(safe-area-inset-bottom); color: #68738a; background: rgba(255,255,255,.97); border-top: 1px solid var(--border); box-shadow: 0 -10px 30px rgba(24,34,55,.08); backdrop-filter: blur(16px); }
  .admin-brand, .sidebar-foot { display: none; }
  .admin-nav { width: 100%; height: 100%; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
  .nav-item { min-width: 0; min-height: 56px; padding: 5px 2px; border-radius: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; position: relative; color: #7b8699; background: transparent; text-align: center; }
  .nav-item:hover { color: #5963c8; background: transparent; }
  .nav-item.active { color: var(--violet); background: transparent; box-shadow: none; }
  .nav-item svg { width: 20px; height: 20px; flex: 0 0 auto; }
  .nav-item span { width: 100%; overflow: hidden; font-size: 9px; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
  .nav-item b { min-width: 16px; position: absolute; top: 3px; left: calc(50% + 8px); padding: 2px 4px; border-radius: 9px; color: #fff; background: #6265d6; font-size: 8px; line-height: 1.2; }
  .nav-item.active b { color: #fff; }
  .mobile-only { display: inline-grid; }
  .mobile-brand-mark { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; place-items: center; color: #fff; background: #625bd7; box-shadow: 0 6px 16px rgba(82,76,195,.2); }
  .mobile-brand-mark svg { width: 18px; height: 18px; }
  .admin-topbar { height: 60px; padding: 0 14px; justify-content: flex-start; gap: 10px; }
  .admin-topbar > div:nth-child(2) { min-width: 0; flex: 1; }
  .admin-topbar h1 { margin-top: 1px; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
  .admin-topbar .eyebrow { font-size: 8px; }
  .topbar-actions { gap: 5px; }
  .topbar-actions .icon-btn { width: 36px; height: 36px; }
  .live-chip { display: none; }
  .admin-content { padding: 18px 14px calc(92px + env(safe-area-inset-bottom)); }
  .section-toolbar { align-items: flex-start; }
  .welcome-row, .section-toolbar { flex-direction: column; }
  .toolbar-actions { width: 100%; }.toolbar-actions .btn { flex: 1; }
  .account-toolbar { flex-wrap: wrap; }.account-toolbar > .btn, .account-toolbar > .action-menu { flex: 1 1 140px; }.account-toolbar .action-menu > .btn { width: 100%; }
  .card-toolbar { flex-wrap: wrap; }.card-toolbar .btn { flex: 1 1 145px; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-summary-note { max-width: 150px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-height: 120px; padding: 15px; gap: 11px; }.stat-card strong { font-size: 24px; }
  .filter-bar { flex-wrap: wrap; }.filter-bar .search-field { max-width: none; flex-basis: 100%; }.result-count { margin-left: 0; }
}

@media (max-width: 520px) {
  .redeem-header { align-items: flex-start; }
  .online-pill { font-size: 0; gap: 0; padding: 10px; }.online-pill span { width: 9px; height: 9px; }
  .redeem-shell { padding: 10px; }
  .section-title-row h1 { font-size: 20px; }
  .credential-console { padding: 13px; }
  .console-heading h2 { font-size: 19px; }.format-pill { padding: 6px 9px; font-size: 9px; }
  .package-hero { padding: 15px; gap: 12px; }.package-icon { width: 50px; height: 50px; border-radius: 12px; }.package-copy h3 { font-size: 15px; }
  .snapshot-ready { min-height: 125px; padding: 18px; }.snapshot-ready-icon { width: 50px; height: 50px; border-radius: 13px; }.snapshot-ready strong { font-size: 16px; }
  .result-view { padding: 8px; }.result-summary { grid-template-columns: 1fr; }.summary-cell { display: flex; justify-content: space-between; align-items: center; }.summary-cell strong { margin: 0; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { min-height: 125px; padding: 12px; gap: 8px; }
  .stat-icon { width: 34px; height: 34px; }
  .stat-icon svg { width: 17px; height: 17px; }
  .stat-card p { margin-bottom: 5px; font-size: 10px; }
  .stat-card strong { font-size: 22px; }
  .stat-card small { margin-top: 9px; font-size: 9px; line-height: 1.35; }
  .section-toolbar h2 { font-size: 20px; }
  .welcome-row { min-height: 0; margin-bottom: 16px; }
  .data-panel { padding: 16px; }
  .trend-chart { height: 180px; margin-top: 14px; padding-top: 10px; gap: 8px; }
  .health-meter { flex-direction: column; gap: 15px; text-align: center; }
  .health-copy { max-width: 240px; }
  .health-legend { flex-direction: column; }
  .filter-bar select { width: 100%; }
  .settings-summary { align-items: flex-start; flex-wrap: wrap; }.settings-summary-note { width: 100%; max-width: none; margin-left: 24px; text-align: left; }
  .token-secret { grid-template-columns: 1fr; }.token-secret .table-actions { justify-content: flex-start; }
  .form-grid { grid-template-columns: 1fr; }.form-group.full { grid-column: auto; }
  .group-create-form { grid-template-columns: 1fr; }.group-create-form .btn { width: 100%; }
  .group-manager-item { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 9px; }
  .group-manager-item .group-manager-count { grid-column: 2; width: max-content; }
  .group-manager-item .table-actions { grid-column: 3; grid-row: 1 / span 2; }
  .action-dropdown { width: min(280px, calc(100vw - 32px)); left: auto; right: 0; }
  .validation-flow { justify-content: flex-start; overflow-x: auto; }
  .validation-summary { grid-template-columns: repeat(2, 1fr); }
  .validation-result-list { max-height: 40vh; }
  .validation-result-item { min-height: 74px; padding: 10px; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; }
  .validation-result-item > div:first-child { grid-column: 1 / -1; }
  .validation-result-item > .status-badge { justify-self: start; }
  .validation-result-item > .health-badge { justify-self: end; }
  .modal-backdrop { padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); align-items: center; }
  .modal { width: min(100%, 440px); max-height: calc(100vh - 28px - env(safe-area-inset-bottom)); border-radius: 10px; box-shadow: 0 24px 70px rgba(13, 20, 34, .28); }
  .modal-head { min-height: 60px; padding: 13px 16px; }
  .modal-head h3 { font-size: 16px; }
  .modal-body { padding: 16px; }
  .modal-actions { padding: 12px 16px; }
  .compact-card-form .modal-body { padding: 14px 16px; }
  .compact-card-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
  .compact-card-form .form-group { gap: 5px; }
  .compact-card-form .form-group.full { grid-column: 1 / -1; }
  .compact-card-form input, .compact-card-form select { min-width: 0; min-height: 40px; padding: 0 10px; }
  .compact-card-form label { font-size: 10px; }
  .compact-card-form .form-hint { font-size: 8px; line-height: 1.35; }
  .login-view { padding: 14px; }.login-panel { padding: 28px 22px; }
}

@media (max-width: 360px) {
  .compact-card-form .form-grid { grid-template-columns: 1fr; }
  .compact-card-form .form-group.full { grid-column: auto; }
}
