/* EARTUNE HQ adaptive appearance.
 * Presentation only: routes, forms, permissions and business JavaScript stay unchanged.
 */

/* Shared appearance control */
.hq-theme-control {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--hq-color-border-default);
  border-radius: 14px;
  color: var(--hq-color-text-secondary);
  background: var(--hq-color-bg-control);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

.hq-theme-label {
  padding-inline: 3px;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.hq-theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--hq-color-border-default);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.13);
}

.hq-theme-options button {
  min-width: 0;
  min-height: 30px;
  padding: 0 7px;
  border: 0;
  border-radius: 8px;
  color: var(--hq-color-text-secondary);
  background: transparent;
  font: inherit;
  font-size: 9px;
  font-weight: 720;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 120ms cubic-bezier(0.23, 1, 0.32, 1);
}

.hq-theme-options button[aria-pressed="true"] {
  color: var(--hq-color-text-inverse);
  background: var(--hq-color-bg-accent);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16);
}

.hq-theme-options button:active {
  transform: scale(0.96);
}

.hq-theme-control-floating {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  grid-template-columns: auto 1fr;
  align-items: center;
  background: rgba(30, 32, 36, 0.8);
  box-shadow: 0 18px 48px rgba(8, 10, 13, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

@media (hover: hover) and (pointer: fine) {
  .hq-theme-options button:not([aria-pressed="true"]):hover {
    color: var(--hq-color-text-primary);
    background: var(--hq-color-bg-control-hover);
  }
}

/* Daylight semantic tokens */
html[data-theme="light"] {
  color-scheme: light;
  --hq-color-bg-canvas: #e6edf5;
  --hq-color-bg-app: rgba(248, 250, 248, 0.78);
  --hq-color-bg-sidebar: #171a1f;
  --hq-color-bg-card: rgba(255, 255, 255, 0.72);
  --hq-color-bg-card-subtle: rgba(242, 246, 246, 0.78);
  --hq-color-bg-elevated: rgba(255, 255, 255, 0.94);
  --hq-color-bg-control: rgba(255, 255, 255, 0.68);
  --hq-color-bg-control-hover: rgba(255, 255, 255, 0.92);
  --hq-color-bg-accent: #315bea;
  --hq-color-bg-brand: #315bea;
  --hq-color-bg-success-soft: rgba(28, 143, 98, 0.1);
  --hq-color-bg-warning-soft: rgba(183, 120, 16, 0.11);
  --hq-color-bg-danger-soft: rgba(196, 54, 69, 0.09);
  --hq-color-text-primary: #151922;
  --hq-color-text-secondary: #566170;
  --hq-color-text-tertiary: #5f6b78;
  --hq-color-text-inverse: #ffffff;
  --hq-color-text-accent: #284fda;
  --hq-color-text-brand: #315bea;
  --hq-color-text-success: #14734f;
  --hq-color-text-warning: #8b5b08;
  --hq-color-text-danger: #b42332;
  --hq-color-border-default: rgba(28, 37, 49, 0.09);
  --hq-color-border-strong: rgba(28, 37, 49, 0.17);
  --hq-color-border-focus: #315bea;
  --hq-color-border-brand: rgba(49, 91, 234, 0.5);
  --hq-color-border-success: rgba(20, 115, 79, 0.45);
  --hq-color-border-warning: rgba(139, 91, 8, 0.46);
  --hq-color-border-danger: rgba(180, 35, 50, 0.44);
  --hq-shadow-shell: 0 30px 90px rgba(70, 84, 101, 0.16);
  --hq-shadow-card: 0 18px 52px rgba(73, 90, 110, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  --ink: var(--hq-color-text-primary);
  --ink-2: #11161e;
  --muted: var(--hq-color-text-secondary);
  --muted-2: var(--hq-color-text-tertiary);
  --canvas: var(--hq-color-bg-canvas);
  --surface: var(--hq-color-bg-card);
  --white: #ffffff;
  --soft: var(--hq-color-bg-card-subtle);
  --line: var(--hq-color-border-default);
  --green: var(--hq-color-text-accent);
  --green-soft: rgba(49, 91, 234, 0.09);
  --gold: var(--hq-color-text-warning);
  --gold-soft: var(--hq-color-bg-warning-soft);
  --red: var(--hq-color-text-danger);
  --red-soft: var(--hq-color-bg-danger-soft);
  --accent: var(--hq-color-text-accent);
  --shadow: var(--hq-shadow-card);
}

html[data-theme="light"] {
  background: #e6edf5;
}

html[data-theme="light"] body.hq-body {
  color: var(--hq-color-text-primary);
  background:
    radial-gradient(circle at 7% 12%, rgba(164, 211, 255, 0.58), transparent 30rem),
    radial-gradient(circle at 92% 14%, rgba(235, 243, 205, 0.72), transparent 35rem),
    radial-gradient(circle at 64% 92%, rgba(255, 238, 206, 0.52), transparent 30rem),
    linear-gradient(135deg, #dceaf7 0%, #eef3ef 54%, #f3f4e9 100%);
  background-attachment: fixed;
}

html[data-theme="light"] body.hq-body ::selection {
  color: #ffffff;
  background: #315bea;
}

html[data-theme="light"] body.hq-body :is(a, button, input, select, textarea):focus-visible {
  outline-color: rgba(49, 91, 234, 0.82);
}

/* Structural material: dark anchor rail, light working canvas */
html[data-theme="light"] body.hq-body .hq-sidebar {
  --hq-color-text-primary: #172033;
  --hq-color-text-secondary: #4d5a6d;
  --hq-color-text-tertiary: #6f7c8f;
  --hq-color-text-inverse: #ffffff;
  --hq-color-bg-sidebar: #f4f7fb;
  --hq-color-bg-app: #ffffff;
  --hq-color-bg-control: rgba(49, 91, 234, 0.065);
  --hq-color-bg-control-hover: rgba(49, 91, 234, 0.11);
  --hq-color-border-default: rgba(28, 37, 49, 0.1);
  --hq-color-border-strong: rgba(28, 37, 49, 0.18);
  border-right-color: rgba(28, 37, 49, 0.1);
  background:
    radial-gradient(circle at 8% 8%, rgba(98, 130, 242, 0.13), transparent 20rem),
    linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(241, 246, 252, 0.96) 74%);
  box-shadow: 18px 0 62px rgba(70, 84, 101, 0.12), inset -1px 0 0 rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(26px) saturate(145%);
  backdrop-filter: blur(26px) saturate(145%);
}

html[data-theme="light"] body.hq-body .brand-mark {
  border-color: rgba(49, 91, 234, 0.22);
  color: #315bea;
  background: rgba(49, 91, 234, 0.08);
}

html[data-theme="light"] body.hq-body .agent-card {
  border-color: rgba(28, 37, 49, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 30px rgba(70, 84, 101, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] body.hq-body .agent-level,
html[data-theme="light"] body.hq-body .nav-section:has(a[aria-current="page"]) h2 {
  color: #284fda;
  background: rgba(49, 91, 234, 0.09);
}

html[data-theme="light"] body.hq-body .hq-primary-nav a[aria-current="page"] {
  color: #ffffff;
  border-color: rgba(134, 159, 255, 0.44);
  background: linear-gradient(135deg, #4168f1, #2f55d8);
  box-shadow: 0 12px 30px rgba(36, 70, 193, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

html[data-theme="light"] body.hq-body .hq-primary-nav a[aria-current="page"] .nav-dot {
  color: #e3e9ff;
  background: rgba(12, 17, 28, 0.42);
}

html[data-theme="light"] body.hq-body .nav-scroll-edge-top {
  background: linear-gradient(#f4f7fb, transparent);
}

html[data-theme="light"] body.hq-body .nav-scroll-edge-bottom {
  background: linear-gradient(transparent, #eef3f9);
}

html[data-theme="light"] body.hq-body .main-content {
  color: var(--hq-color-text-primary);
}

/* Apple-like frosted glass: use on outer surfaces, keep inner rows solid enough to read. */
html[data-theme="light"] body.hq-body :is(
  .panel,
  .form-panel,
  .empty-panel,
  .metric-card,
  .institution-card,
  .benefit-rule-card,
  .quota-summary-panel,
  .access-account-card,
  .access-share-card,
  .location-picker,
  .natural-upload-queue-panel,
  .copy-fields-panel
) {
  border-color: rgba(255, 255, 255, 0.78);
  color: var(--hq-color-text-primary);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(246, 249, 246, 0.64)),
    rgba(255, 255, 255, 0.66);
  box-shadow: var(--hq-shadow-card);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
}

html[data-theme="light"] body.hq-body :is(
  .filter-bar,
  .consultant-filter-grid,
  .order-filter-grid,
  .audio-filter-grid,
  .finance-filter-grid,
  .natural-filter-grid,
  .settlement-filter-grid,
  .coupon-filter-form
) {
  border-color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 38px rgba(73, 90, 110, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  backdrop-filter: blur(20px) saturate(145%);
}

html[data-theme="light"] body.hq-body .page-heading h1,
html[data-theme="light"] body.hq-body :is(.panel h2, .form-panel h2, .empty-panel h2) {
  color: #11161e;
}

html[data-theme="light"] body.hq-body .eyebrow,
html[data-theme="light"] body.hq-body .back-link,
html[data-theme="light"] body.hq-body :is(.text-link, .row-actions a:not(.button), .row-actions button:not(.button)),
html[data-theme="light"] body.hq-body .amount {
  color: #284fda;
}

html[data-theme="light"] body.hq-body .button-primary {
  color: #ffffff;
  border-color: #315bea;
  background: linear-gradient(135deg, #4168f1, #2f55da);
  box-shadow: 0 12px 28px rgba(49, 91, 234, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

html[data-theme="light"] body.hq-body .button-primary:hover {
  background: linear-gradient(135deg, #4b72f5, #315bea);
}

html[data-theme="light"] body.hq-body .button-secondary {
  color: #1b2230;
  border-color: rgba(29, 40, 56, 0.1);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

html[data-theme="light"] body.hq-body .button-secondary:hover {
  border-color: rgba(49, 91, 234, 0.24);
  background: rgba(255, 255, 255, 0.94);
}

html[data-theme="light"] body.hq-body .metric-card-accent {
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.2), transparent 44%),
    linear-gradient(145deg, #426cf3, #3156d5);
  box-shadow: 0 20px 52px rgba(49, 91, 234, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

html[data-theme="light"] body.hq-body :is(.soft-block, .institution-stats, .institution-stats div, .bank-summary) {
  color: var(--hq-color-text-primary);
  background: rgba(242, 246, 246, 0.78);
}

/* Dense information stays crisp on top of the glass. */
html[data-theme="light"] body.hq-body .table-wrap {
  border-color: rgba(27, 37, 50, 0.08);
  background: rgba(249, 251, 250, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] body.hq-body thead {
  background: rgba(41, 58, 79, 0.045);
}

html[data-theme="light"] body.hq-body tbody tr:nth-child(even) {
  background: rgba(41, 58, 79, 0.024);
}

html[data-theme="light"] body.hq-body tbody tr:hover {
  background: rgba(49, 91, 234, 0.055);
}

html[data-theme="light"] body.hq-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]),
html[data-theme="light"] body.hq-body select,
html[data-theme="light"] body.hq-body textarea {
  border-color: rgba(28, 39, 54, 0.11);
  color: #151922;
  background: rgba(255, 255, 255, 0.72);
  caret-color: #315bea;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

html[data-theme="light"] body.hq-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):focus,
html[data-theme="light"] body.hq-body select:focus,
html[data-theme="light"] body.hq-body textarea:focus {
  border-color: #315bea;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 4px rgba(49, 91, 234, 0.11), inset 0 1px 0 #ffffff;
}

html[data-theme="light"] body.hq-body select option {
  color: #151922;
  background: #ffffff;
}

html[data-theme="light"] body.hq-body input[type="checkbox"],
html[data-theme="light"] body.hq-body input[type="radio"] {
  accent-color: #315bea;
}

html[data-theme="light"] body.hq-body .notice {
  color: #445066;
  border-color: rgba(49, 91, 234, 0.28);
  background: rgba(229, 236, 255, 0.78);
}

html[data-theme="light"] body.hq-body .message {
  color: #1a202a;
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 20px 58px rgba(70, 84, 101, 0.16), inset 0 1px 0 #ffffff;
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
}

html[data-theme="light"] body.hq-body .message-success {
  color: #115f43;
  border-color: rgba(20, 115, 79, 0.24);
  background: rgba(235, 250, 243, 0.92);
}

html[data-theme="light"] body.hq-body .message-error {
  color: #a51e2e;
  border-color: rgba(180, 35, 50, 0.26);
  background: rgba(255, 240, 242, 0.94);
}

html[data-theme="light"] body.hq-body :is(.module-tabs, .copy-page-tabs) {
  border-color: rgba(28, 37, 49, 0.08);
  background: rgba(237, 242, 244, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] body.hq-body :is(.module-tabs a, .copy-page-tabs a)[aria-current="page"] {
  color: #ffffff;
  border-color: #315bea;
  background: #315bea;
  box-shadow: 0 9px 22px rgba(49, 91, 234, 0.18);
}

html[data-theme="light"] body.hq-body :is(.module-tabs a, .copy-page-tabs a)[aria-current="page"] .module-tab-count {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

html[data-theme="light"] body.hq-body .pagination a {
  border-color: rgba(28, 37, 49, 0.1);
  color: #202735;
  background: rgba(255, 255, 255, 0.68);
}

html[data-theme="light"] body.hq-body :is(.detail-list, .immutable-card) {
  border-color: rgba(28, 37, 49, 0.08);
  background: rgba(28, 37, 49, 0.08);
}

html[data-theme="light"] body.hq-body :is(.detail-list div, .immutable-card div, .parameter-grid div) {
  color: #151922;
  background: rgba(250, 252, 251, 0.92);
}

html[data-theme="light"] body.hq-body .price-detail-list .detail-total {
  color: #ffffff;
  background: linear-gradient(135deg, #4168f1, #2f55d8);
}

html[data-theme="light"] body.hq-body .order-summary-grid article {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--hq-shadow-card);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  backdrop-filter: blur(20px) saturate(145%);
}

html[data-theme="light"] body.hq-body :is(.order-action-form, .order-refund-form, .settlement-action-panel form, .batch-adjustment) {
  border-color: rgba(28, 37, 49, 0.08);
  background: rgba(242, 246, 246, 0.78);
}

html[data-theme="light"] body.hq-body .payload-block {
  color: #dce4f0;
  border-color: rgba(255, 255, 255, 0.08);
  background: #171b22;
}

html[data-theme="light"] body.hq-body .location-picker {
  background:
    radial-gradient(circle at 100% 0, rgba(93, 132, 255, 0.16), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(244, 248, 244, 0.65));
}

html[data-theme="light"] body.hq-body .location-results {
  border-color: rgba(28, 37, 49, 0.09);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 64px rgba(70, 84, 101, 0.18);
}

html[data-theme="light"] body.hq-body :is(.location-map, .location-map-placeholder, .location-preview) {
  border-color: rgba(28, 37, 49, 0.08);
  background: rgba(241, 245, 244, 0.88);
}

html[data-theme="light"] body.hq-body .location-selection {
  border-color: rgba(28, 37, 49, 0.08);
  background: rgba(255, 255, 255, 0.84);
}

html[data-theme="light"] body.hq-body .location-map-placeholder::before {
  border-color: rgba(49, 91, 234, 0.32);
  background: rgba(49, 91, 234, 0.1);
}

html[data-theme="light"] body.hq-body :is(.coupon-institution-picker, .institution-province, .institution-tag-option label, .natural-category-row) {
  border-color: rgba(28, 37, 49, 0.08);
  color: #151922;
  background: rgba(246, 249, 248, 0.82);
}

html[data-theme="light"] body.hq-body .institution-tag-option input:checked + label {
  color: #ffffff;
  border-color: #315bea;
  background: #315bea;
}

html[data-theme="light"] body.hq-body .coupon-institution-current,
html[data-theme="light"] body.hq-body .institution-province-content {
  border-color: rgba(28, 37, 49, 0.08);
  background: rgba(255, 255, 255, 0.62);
}

html[data-theme="light"] body.hq-body :is(.access-account-card, .access-meta-grid div, .access-login-url, .access-qr-frame) {
  border-color: rgba(28, 37, 49, 0.08);
  background: rgba(245, 248, 247, 0.84);
}

html[data-theme="light"] body.hq-body .natural-upload-intro {
  color: #151922;
  border-color: rgba(255, 255, 255, 0.8);
  background:
    radial-gradient(circle at 92% -15%, rgba(105, 139, 255, 0.22), transparent 48%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(237, 244, 249, 0.72));
  box-shadow: var(--hq-shadow-card);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
}

html[data-theme="light"] body.hq-body .natural-upload-intro dl {
  border-color: rgba(28, 37, 49, 0.08);
  background: rgba(255, 255, 255, 0.58);
}

html[data-theme="light"] body.hq-body .natural-upload-intro dl div {
  background: rgba(255, 255, 255, 0.38);
}

html[data-theme="light"] body.hq-body .natural-upload-intro dt {
  color: var(--hq-color-text-secondary);
}

html[data-theme="light"] body.hq-body .natural-upload-intro dd {
  color: var(--hq-color-text-primary);
}

html[data-theme="light"] body.hq-body :is(.natural-category-row, .natural-upload-row, .natural-upload-overall) {
  border-color: rgba(28, 37, 49, 0.08);
  background: rgba(246, 249, 248, 0.84);
}

html[data-theme="light"] body.hq-body .natural-upload-empty {
  border-color: rgba(49, 91, 234, 0.24);
  background: rgba(232, 239, 255, 0.72);
}

html[data-theme="light"] body.hq-body .natural-upload-empty > span,
html[data-theme="light"] body.hq-body .natural-upload-index,
html[data-theme="light"] body.hq-body .copy-fields-heading > span {
  color: #284fda;
  background: rgba(49, 91, 234, 0.1);
}

html[data-theme="light"] body.hq-body :is(.copy-field input, .copy-field textarea) {
  border-color: rgba(28, 37, 49, 0.11);
  color: #151922;
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] body.hq-body :is(.copy-field input, .copy-field textarea):focus {
  border-color: #315bea;
  box-shadow: 0 0 0 4px rgba(49, 91, 234, 0.11);
}

html[data-theme="light"] body.hq-body .copy-number,
html[data-theme="light"] body.hq-body .copy-field-title i {
  color: #ffffff;
  background: #315bea;
}

/* Dashboard daylight composition */
html[data-theme="light"] .hq-dashboard-page {
  --web3-bg: rgba(250, 252, 250, 0.74);
  --web3-card: rgba(255, 255, 255, 0.74);
  --web3-card-soft: rgba(240, 245, 245, 0.8);
  --web3-line: rgba(29, 39, 53, 0.09);
  --web3-text: #151922;
  --web3-muted: #64707f;
  --web3-lime: #315bea;
  --web3-blue: #315bea;
  --web3-violet: #5198aa;
  color: #151922;
  color-scheme: light;
  background:
    radial-gradient(circle at 9% 8%, rgba(153, 207, 255, 0.62), transparent 29rem),
    radial-gradient(circle at 92% 11%, rgba(235, 243, 204, 0.8), transparent 34rem),
    linear-gradient(135deg, #dceaf7, #eef3ef 56%, #f3f4e8);
}

html[data-theme="light"] .hq-dashboard-page::before {
  opacity: 0.16;
  background-image:
    linear-gradient(120deg, rgba(255, 255, 255, 0.54) 1px, transparent 1px),
    linear-gradient(30deg, rgba(74, 99, 126, 0.08) 1px, transparent 1px);
}

html[data-theme="light"] .hq-web3-dashboard {
  isolation: isolate;
  border-color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 8% 8%, rgba(158, 208, 255, 0.24), transparent 24rem),
    radial-gradient(circle at 94% 12%, rgba(231, 242, 195, 0.33), transparent 30rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(247, 250, 245, 0.58));
  box-shadow: 0 36px 110px rgba(72, 88, 107, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
}

html[data-theme="light"] .hq-web3-dashboard::before {
  border-color: rgba(80, 116, 238, 0.12);
  box-shadow:
    0 0 0 54px rgba(104, 145, 255, 0.035),
    0 0 0 108px rgba(104, 145, 255, 0.022);
}

html[data-theme="light"] .hq-web3-dashboard::after {
  width: 28%;
  height: 165%;
  position: absolute;
  top: -32%;
  left: -42%;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  filter: blur(12px);
  transform: translate3d(0, 0, 0) rotate(8deg);
  animation: hq-daylight-sheen 18s cubic-bezier(0.77, 0, 0.175, 1) infinite;
  content: "";
}

html[data-theme="light"] .hq-web3-dashboard > * {
  position: relative;
  z-index: 1;
}

@keyframes hq-daylight-sheen {
  0%, 58% { transform: translate3d(0, 0, 0) rotate(8deg); }
  88%, 100% { transform: translate3d(520%, 0, 0) rotate(8deg); }
}

html[data-theme="light"] .hq-web3-heading h1,
html[data-theme="light"] .hq-web3-card-head h2,
html[data-theme="light"] .hq-web3-section-head h2,
html[data-theme="light"] .hq-dashboard-page :is(.monitoring-head h2, .panel h2) {
  color: #11161e;
}

html[data-theme="light"] .hq-dashboard-page .eyebrow {
  color: #284fda;
}

html[data-theme="light"] .hq-web3-header .button-secondary {
  border-color: rgba(29, 39, 53, 0.09);
  color: #1c2430;
  background: rgba(255, 255, 255, 0.65);
}

html[data-theme="light"] .hq-web3-header .button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #426bf1, #3156d7);
  box-shadow: 0 12px 28px rgba(49, 91, 234, 0.22);
}

html[data-theme="light"] .hq-web3-overview-card,
html[data-theme="light"] .hq-web3-tasks,
html[data-theme="light"] .hq-dashboard-page :is(.monitoring-section, .panel) {
  border-color: rgba(255, 255, 255, 0.78);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(243, 247, 245, 0.64)),
    rgba(255, 255, 255, 0.66);
  box-shadow: 0 18px 52px rgba(73, 90, 110, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
}

html[data-theme="light"] .hq-web3-overview-card {
  background:
    radial-gradient(circle at 7% 10%, rgba(123, 180, 255, 0.19), transparent 18rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(241, 247, 248, 0.66));
}

html[data-theme="light"] .hq-web3-period {
  color: #566170;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] .hq-web3-trend {
  border-color: rgba(29, 39, 53, 0.07);
  background:
    linear-gradient(rgba(66, 83, 104, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 83, 104, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
}

html[data-theme="light"] .hq-web3-metrics {
  background: rgba(29, 39, 53, 0.08);
}

html[data-theme="light"] .hq-web3-metrics > div {
  background: rgba(250, 252, 251, 0.86);
}

html[data-theme="light"] .hq-web3-metrics strong {
  color: #151922;
}

html[data-theme="light"] .hq-web3-metrics > div:nth-child(1) strong { color: #315bea; }
html[data-theme="light"] .hq-web3-metrics > div:nth-child(2) strong { color: #3f8799; }
html[data-theme="light"] .hq-web3-metrics > div:nth-child(3) strong { color: #151922; }

html[data-theme="light"] .hq-web3-revenue-card {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  background:
    radial-gradient(circle at 94% 4%, rgba(245, 228, 58, 0.22), transparent 14rem),
    linear-gradient(150deg, #416af0, #2e54d5 76%);
  box-shadow: 0 24px 64px rgba(49, 91, 234, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

html[data-theme="light"] .hq-web3-revenue-card .hq-web3-card-head h2 {
  color: #ffffff;
}

html[data-theme="light"] .hq-web3-revenue-card .eyebrow,
html[data-theme="light"] .hq-web3-revenue-total :is(span, small),
html[data-theme="light"] .hq-web3-revenue-facts dt {
  color: rgba(255, 255, 255, 0.76);
}

html[data-theme="light"] .hq-web3-live-chip {
  color: #ffffff;
  background: rgba(13, 20, 44, 0.24);
}

html[data-theme="light"] .hq-web3-live-chip i,
html[data-theme="light"] .hq-web3-revenue-orbit i {
  background: #f4e43a;
}

html[data-theme="light"] .hq-web3-revenue-facts div {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(16, 25, 58, 0.16);
}

html[data-theme="light"] .hq-dashboard-page .hq-alert-card {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.26);
  background: #171a20;
  box-shadow: 0 16px 38px rgba(70, 84, 101, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

html[data-theme="light"] .hq-dashboard-page .hq-alert-card:first-child {
  color: #151922;
  background: linear-gradient(145deg, #f7e73e, #ead82f);
}

html[data-theme="light"] .hq-dashboard-page .hq-alert-card:nth-child(2) {
  border-color: rgba(255, 255, 255, 0.24);
  background: linear-gradient(145deg, #426bf1, #3156d7);
}

html[data-theme="light"] .hq-dashboard-page .hq-alert-card:nth-child(3) {
  background: linear-gradient(145deg, #5298aa, #3f8294);
}

html[data-theme="light"] .hq-dashboard-page .hq-alert-card:nth-child(3) :is(span, small),
html[data-theme="light"] .hq-dashboard-page .hq-alert-card:nth-child(3)::after {
  color: rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .hq-dashboard-page .hq-alert-card:hover {
  border-color: rgba(49, 91, 234, 0.25);
}

html[data-theme="light"] .hq-dashboard-page .monitoring-live {
  border-color: rgba(49, 91, 234, 0.14);
  background: rgba(255, 255, 255, 0.62);
}

html[data-theme="light"] .hq-dashboard-page .monitoring-live > span {
  background: #315bea;
  box-shadow: 0 0 0 5px rgba(49, 91, 234, 0.1);
}

html[data-theme="light"] .hq-dashboard-page .monitor-card {
  border-color: rgba(29, 39, 53, 0.08);
  background: rgba(250, 252, 251, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

html[data-theme="light"] .hq-dashboard-page .monitor-card-server {
  background:
    radial-gradient(circle at 100% 0, rgba(49, 91, 234, 0.11), transparent 46%),
    rgba(250, 252, 251, 0.84);
}

html[data-theme="light"] .hq-dashboard-page .monitor-card-oss {
  background:
    radial-gradient(circle at 100% 0, rgba(82, 152, 170, 0.14), transparent 46%),
    rgba(250, 252, 251, 0.84);
}

html[data-theme="light"] .hq-dashboard-page :is(
  .monitor-title h3,
  .monitor-resource strong,
  .server-hero strong,
  .oss-capacity strong,
  .oss-detail-grid dd,
  .oss-gauge strong
) {
  color: #151922;
}

html[data-theme="light"] .hq-dashboard-page .monitor-icon {
  color: #ffffff;
  background: #315bea;
}

html[data-theme="light"] .hq-dashboard-page .monitor-icon-oss {
  color: #ffffff;
  background: #5198aa;
}

html[data-theme="light"] .hq-dashboard-page .server-hero,
html[data-theme="light"] .hq-dashboard-page .oss-detail-grid {
  background: rgba(231, 237, 241, 0.66);
}

html[data-theme="light"] .hq-dashboard-page .oss-detail-grid div {
  background: rgba(255, 255, 255, 0.58);
}

html[data-theme="light"] .hq-dashboard-page .monitor-progress {
  background: rgba(28, 37, 49, 0.08);
}

html[data-theme="light"] .hq-dashboard-page .server-pulse i,
html[data-theme="light"] .hq-dashboard-page .monitor-progress i {
  background: linear-gradient(90deg, #315bea, #56a2b5);
}

html[data-theme="light"] .hq-dashboard-page .oss-gauge {
  background: conic-gradient(#5198aa var(--monitor-gauge), rgba(28, 37, 49, 0.08) 0);
}

html[data-theme="light"] .hq-dashboard-page .oss-gauge::before {
  background: #f7faf9;
  box-shadow: inset 0 0 0 1px rgba(29, 39, 53, 0.08);
}

html[data-theme="light"] .hq-dashboard-page table {
  color: #1b2230;
}

html[data-theme="light"] .hq-dashboard-page tbody tr:hover td {
  background: rgba(49, 91, 234, 0.045);
}

html[data-theme="light"] .hq-dashboard-page .status-pill {
  border-color: rgba(29, 39, 53, 0.1);
}

html[data-theme="light"] .hq-dashboard-page .message {
  border-color: rgba(255, 255, 255, 0.82);
  color: #151922;
  background: rgba(255, 255, 255, 0.88);
}

/* Login daylight treatment */
html[data-theme="light"] .hq-login-web3-page {
  --login-shell: rgba(250, 252, 249, 0.72);
  --login-card: rgba(255, 255, 255, 0.76);
  --login-line: rgba(29, 39, 53, 0.09);
  --login-text: #151922;
  --login-muted: #657180;
  --login-lime: #315bea;
  --login-blue: #315bea;
  color: #151922;
  color-scheme: light;
  background:
    radial-gradient(circle at 7% 12%, rgba(153, 207, 255, 0.66), transparent 30rem),
    radial-gradient(circle at 91% 10%, rgba(235, 243, 204, 0.82), transparent 34rem),
    linear-gradient(135deg, #dceaf7, #eef3ef 56%, #f3f4e8);
}

html[data-theme="light"] .hq-login-web3-page::before {
  opacity: 0.14;
  background-image:
    linear-gradient(120deg, rgba(255, 255, 255, 0.58) 1px, transparent 1px),
    linear-gradient(30deg, rgba(74, 99, 126, 0.08) 1px, transparent 1px);
}

html[data-theme="light"] .hq-login-web3-layout {
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(250, 252, 249, 0.7);
  box-shadow: 0 36px 110px rgba(72, 88, 107, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
}

html[data-theme="light"] .hq-login-web3-page .hq-login-story {
  color: #151922;
  background:
    radial-gradient(circle at 4% 8%, rgba(94, 164, 255, 0.26), transparent 24rem),
    radial-gradient(circle at 94% 82%, rgba(235, 226, 97, 0.2), transparent 27rem),
    linear-gradient(145deg, rgba(231, 242, 251, 0.88), rgba(242, 247, 235, 0.68));
}

html[data-theme="light"] .hq-login-web3-page .hq-login-story::after {
  border-color: rgba(49, 91, 234, 0.12);
  box-shadow:
    0 0 0 58px rgba(93, 132, 255, 0.035),
    0 0 0 116px rgba(93, 132, 255, 0.022);
}

html[data-theme="light"] .hq-login-web3-page .brand strong,
html[data-theme="light"] .hq-login-web3-page .hq-login-story h1,
html[data-theme="light"] .hq-login-web3-page .hq-login-card h2 {
  color: #11161e;
}

html[data-theme="light"] .hq-login-web3-page .brand-mark,
html[data-theme="light"] .hq-login-card-mark {
  border-color: rgba(49, 91, 234, 0.24);
  color: #315bea;
  background: rgba(49, 91, 234, 0.09);
}

html[data-theme="light"] .hq-login-web3-page .eyebrow {
  color: #284fda;
}

html[data-theme="light"] .hq-login-signals span {
  border-color: rgba(29, 39, 53, 0.08);
  color: #566170;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .hq-login-signals span::before,
html[data-theme="light"] .hq-login-security i {
  background: #315bea;
  box-shadow: 0 0 0 4px rgba(49, 91, 234, 0.1);
}

html[data-theme="light"] .hq-login-signals span:nth-child(2)::before { background: #5198aa; }
html[data-theme="light"] .hq-login-signals span:nth-child(3)::before { background: #e3ca16; }

html[data-theme="light"] .hq-login-visual {
  border-color: rgba(255, 255, 255, 0.76);
  background:
    linear-gradient(rgba(74, 99, 126, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 99, 126, 0.045) 1px, transparent 1px),
    rgba(255, 255, 255, 0.56);
  background-size: 42px 42px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

html[data-theme="light"] .hq-login-orbit {
  border-color: rgba(49, 91, 234, 0.13);
  box-shadow: 0 0 0 25px rgba(49, 91, 234, 0.028);
}

html[data-theme="light"] .hq-login-panel {
  border-left-color: rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at 92% 8%, rgba(225, 235, 198, 0.42), transparent 22rem),
    rgba(249, 251, 246, 0.62);
}

html[data-theme="light"] .hq-login-panel::before {
  border-color: rgba(49, 91, 234, 0.1);
  box-shadow: 0 0 0 42px rgba(49, 91, 234, 0.02);
}

html[data-theme="light"] .hq-login-web3-page .hq-login-card {
  border-color: rgba(255, 255, 255, 0.82);
  background:
    radial-gradient(circle at 100% 0, rgba(105, 139, 255, 0.11), transparent 18rem),
    rgba(255, 255, 255, 0.74);
  box-shadow: 0 24px 70px rgba(72, 88, 107, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
}

html[data-theme="light"] .hq-login-web3-page .form-stack label > span {
  color: #343d4b;
}

html[data-theme="light"] .hq-login-web3-page .form-stack input {
  border-color: rgba(29, 39, 53, 0.11);
  color: #151922;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .hq-login-web3-page .form-stack input:hover {
  border-color: rgba(49, 91, 234, 0.23);
}

html[data-theme="light"] .hq-login-web3-page .form-stack input:focus {
  border-color: #315bea;
  color: #151922;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 4px rgba(49, 91, 234, 0.11), inset 0 1px 0 #ffffff;
}

html[data-theme="light"] .hq-login-web3-page .button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #426bf1, #3156d7);
  box-shadow: 0 12px 30px rgba(49, 91, 234, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

html[data-theme="light"] .hq-login-web3-page .button-primary:hover {
  background: linear-gradient(135deg, #4b72f5, #315bea);
}

html[data-theme="light"] .hq-login-web3-page .form-alert {
  border-color: rgba(180, 35, 50, 0.25);
  color: #a51e2e;
  background: rgba(255, 239, 241, 0.88);
}

html[data-theme="light"] .hq-theme-control-floating {
  border-color: rgba(255, 255, 255, 0.82);
  color: #566170;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 48px rgba(72, 88, 107, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .hq-theme-options {
  border-color: rgba(29, 39, 53, 0.08);
  background: rgba(43, 57, 75, 0.06);
}

html[data-theme="light"] .hq-theme-options button {
  color: #657180;
}

html[data-theme="light"] .hq-theme-options button[aria-pressed="true"] {
  color: #ffffff;
  background: #315bea;
  box-shadow: 0 6px 16px rgba(49, 91, 234, 0.2);
}

/* Theme changes are occasional; keep the response short and never move layout. */
html.is-theme-changing body,
html.is-theme-changing .hq-sidebar,
html.is-theme-changing :is(.panel, .form-panel, .metric-card, .hq-web3-dashboard, .hq-login-web3-layout, .hq-login-card) {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

@media (max-width: 900px) {
  html[data-theme="light"] body.hq-body .mobile-header,
  html[data-theme="light"] .hq-dashboard-page .mobile-header {
    border-color: rgba(29, 39, 53, 0.08);
    color: #151922;
    background: rgba(247, 250, 248, 0.78);
    box-shadow: 0 12px 30px rgba(72, 88, 107, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
  }

  html[data-theme="light"] body.hq-body :is(.mobile-brand, .menu-button),
  html[data-theme="light"] .hq-dashboard-page .mobile-brand {
    color: #151922;
  }

  html[data-theme="light"] body.hq-body .menu-button,
  html[data-theme="light"] .hq-dashboard-page .menu-button {
    border-color: #315bea;
    color: #ffffff;
    background: #315bea;
  }

  html[data-theme="light"] body.hq-body .sidebar-scrim {
    background: rgba(34, 44, 58, 0.42);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }

  html[data-theme="light"] .hq-dashboard-page {
    background:
      radial-gradient(circle at 10% 5%, rgba(153, 207, 255, 0.55), transparent 24rem),
      linear-gradient(145deg, #e2edf7, #f2f4e9);
  }

  html[data-theme="light"] .hq-login-web3-page {
    background:
      radial-gradient(circle at 10% 5%, rgba(153, 207, 255, 0.55), transparent 24rem),
      linear-gradient(145deg, #e2edf7, #f2f4e9);
  }

  html[data-theme="light"] .hq-login-panel {
    border-top-color: rgba(255, 255, 255, 0.72);
  }
}

@media (max-width: 680px) {
  .natural-sound-heading-actions {
    flex-wrap: wrap;
  }

  body.hq-body .natural-sound-heading-actions .button {
    max-width: calc(50% - 5px);
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }
}

@media (max-width: 620px) {
  .hq-theme-control-floating {
    top: 10px;
    right: 10px;
    padding: 7px;
    border-radius: 12px;
  }

  .hq-theme-control-floating .hq-theme-label {
    display: none;
  }

  .hq-theme-control-floating .hq-theme-options button {
    min-height: 28px;
    padding-inline: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="light"] .hq-web3-dashboard::after {
    animation: none;
    opacity: 0.22;
    transform: translate3d(230%, 0, 0) rotate(8deg);
  }

  html.is-theme-changing body,
  html.is-theme-changing .hq-sidebar,
  html.is-theme-changing :is(.panel, .form-panel, .metric-card, .hq-web3-dashboard, .hq-login-web3-layout, .hq-login-card),
  .hq-theme-options button {
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  html[data-theme="light"] body.hq-body :is(
    .panel,
    .form-panel,
    .empty-panel,
    .metric-card,
    .institution-card,
    .benefit-rule-card,
    .quota-summary-panel,
    .access-account-card,
    .access-share-card,
    .location-picker,
    .natural-upload-queue-panel,
    .copy-fields-panel
  ),
  html[data-theme="light"] .hq-web3-dashboard,
  html[data-theme="light"] .hq-login-web3-layout,
  html[data-theme="light"] .hq-login-web3-page .hq-login-card {
    background: #f8faf8;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  html[data-theme="light"] {
    --hq-color-text-secondary: #3d4652;
    --hq-color-text-tertiary: #56606d;
    --hq-color-border-default: rgba(17, 24, 34, 0.2);
    --hq-color-border-strong: rgba(17, 24, 34, 0.34);
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  html[data-theme="light"] body.hq-body :is(
    .panel,
    .form-panel,
    .empty-panel,
    .metric-card,
    .institution-card,
    .benefit-rule-card,
    .quota-summary-panel,
    .access-account-card,
    .access-share-card,
    .location-picker,
    .natural-upload-queue-panel,
    .copy-fields-panel
  ),
  html[data-theme="light"] .hq-web3-dashboard,
  html[data-theme="light"] .hq-login-web3-layout,
  html[data-theme="light"] .hq-login-web3-page .hq-login-card {
    background: rgba(249, 251, 248, 0.96);
  }
}
