/* Audit corrections shared by the storefront and owner workspace. */

/* Shared purchase guarantees stay available on every product and screen size. */
#time-card .product-hint,
#gold-form .product-hint { display: block; }
#gold-form .product-hint { margin: 0; padding-top: 0; }
#gold-form .hint-trigger { min-height: 30px; font-size: .8125rem; }
.hint-popover[popover] { margin: 0; inset: auto; }

/* Region and faction are equivalent choices, with the same control metrics. */
.app-shell .gold-region-choices .gold-region-choice,
.app-shell .gold-faction-choices .choice > span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 15px;
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
}

.app-shell .gold-faction-choices .choice b {
  font: inherit;
}

.app-shell .gold-faction-choices .choice:hover > span {
  transform: none;
}

.app-shell .gold-region-choices .gold-region-choice:hover:not([aria-checked=true]) {
  background: var(--surface);
}

/* Give growing forms and the request table a bounded, accessible scroll area. */
.admin-shell #view-team > .view-intro,
.admin-shell #view-gold > .view-intro,
.admin-shell #view-gold > .gold-admin-tabs,
.admin-shell .admin-main > .admin-feedback {
  flex: none;
}

.admin-shell #team-form,
.admin-shell #gold-rates-form {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  max-width: 860px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scroll-padding-block: 12px;
  padding: 0 6px 20px 0;
}

.admin-shell .form-view {
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scroll-padding-block: 12px;
}

.admin-shell #gold-admin-requests {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.admin-shell #gold-requests-table {
  min-width: 0;
  min-height: 0;
}

.admin-shell #gold-admin-requests > .pager {
  flex: none;
  flex-wrap: wrap;
}

.admin-shell .gold-admin-tabs {
  gap: 8px;
  margin-bottom: 0;
}

.admin-shell .gold-admin-tabs button {
  min-height: 44px;
  padding: 9px 16px;
  border-radius: 16px;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.4;
}

/* Match form fields and keep labels and controls inside narrow columns. */
.admin-shell .form-view input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.admin-shell .form-view select,
.admin-shell #team-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.admin-shell #team-form select,
.admin-shell #gold-rates-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.admin-shell #gold-rates-form select {
  min-width: 0;
  min-height: 48px;
  border-radius: 14px;
}

.admin-shell .settings-fields > div,
.admin-shell .team-fields > label,
.admin-shell .gold-rate-row > div {
  min-width: 0;
}

.admin-shell #view-team .field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-shell #view-team .field-grid label {
  min-width: 0;
  margin-bottom: 0;
}

.admin-shell .team-roles .check-line {
  align-items: center;
  min-height: 40px;
  margin: 0 !important;
}

.admin-shell .team-restrictions > summary {
  min-height: 40px;
  padding-block: 10px;
  line-height: 1.5;
}

.admin-shell .orders-toolbar .filter-tabs {
  min-width: 0;
  max-width: 100%;
  flex-shrink: 1;
}

.admin-shell .filter-tabs button {
  flex: none;
}

.admin-shell .admin-topbar > div:first-child {
  min-width: 0;
}

.admin-shell .admin-topbar h1,
.admin-shell .stat-card strong,
.admin-shell .connection-label,
.admin-shell .setting-note {
  overflow-wrap: anywhere;
}

/* The gold dialog uses admin-order-dialog, including its stacked action forms. */
.admin-order-dialog #gold-admin-quote,
.admin-order-dialog #gold-admin-complete {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

/* Owner access uses the same identity and clear keyboard focus. */
.access-page .access-brand .hyjal-mark {
  width: 40px;
  height: 40px;
  stroke: none;
}

.access-page .access-language button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  font-size: .75rem;
}

.access-page .access-link,
.access-page .access-back {
  min-height: 44px;
}

.access-page .access-back {
  display: flex;
  align-items: center;
  justify-content: center;
}

.access-page .access-card input:focus-visible,
.access-page .access-link:focus-visible,
.access-page .access-back:focus-visible,
.access-page .access-language button:focus-visible,
.access-page .primary-button:focus-visible {
  outline: 2px solid var(--title-accent);
  outline-offset: 3px;
}

@media (min-width: 621px) and (max-width: 900px) {
  .admin-shell .price-grid-heading,
  .admin-shell .price-row {
    grid-template-columns: minmax(0, 1fr) minmax(90px, .6fr) minmax(90px, .6fr) 50px;
  }
}

@media (max-width: 700px) {
  .app-shell .gold-region-choices .gold-region-choice,
  .app-shell .gold-faction-choices .choice > span {
    min-height: 44px;
    padding: 10px 12px;
    font-size: .875rem;
  }
}

@media (max-width: 700px) and (max-height: 700px) {
  .app-shell .gold-region-choices .gold-region-choice,
  .app-shell .gold-faction-choices .choice > span {
    min-height: 38px;
    padding-block: 7px;
  }
}

@media (max-width: 620px) {
  .admin-shell .form-view input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  .admin-shell .form-view select,
  .admin-shell #team-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  .admin-shell #team-form select,
  .admin-shell #gold-rates-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  .admin-shell #gold-rates-form select {
    min-height: 44px;
    padding: 9px 12px;
    font-size: 1rem;
    line-height: 1.5;
  }

  .admin-shell #view-team .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-shell .admin-topbar {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .admin-shell .admin-topbar > div:first-child {
    flex: 1 1 150px;
  }

  .admin-shell .admin-top-actions {
    min-width: 0;
    max-width: 100%;
    margin-left: auto;
  }

  .admin-shell .team-roles .check-line {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .access-page .access-brand .hyjal-mark {
    width: 32px;
    height: 32px;
  }
}

/* Telegram connection actions stay readable on narrow screens. */
.telegram-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center}.telegram-actions a.secondary-button{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}.telegram-actions [hidden]{display:none!important}

/* Product ownership and compact client inbox. */
.product-operator-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.product-operator-grid label{display:flex;flex-direction:column;gap:8px}.inbox-heading{font-size:15px!important;margin:0;display:flex;align-items:center;gap:8px}.inbox-heading span{background:var(--button);color:var(--button-ink);font-size:12px;padding:3px 7px;border-radius:8px}.crm-client-tabs{display:flex;gap:6px;overflow:auto;padding:10px 14px;min-height:56px;flex-shrink:0;border-bottom:1px solid var(--line)}.crm-client-tab{display:flex;flex-shrink:0;gap:0;background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden}.crm-client-tab button{border:0;background:transparent;color:var(--ink);font:inherit;cursor:pointer;padding:10px;white-space:nowrap;font-size:12px;max-width:210px;text-overflow:ellipsis;overflow:hidden}.crm-client-tab button[aria-selected=true]{background:var(--picked);color:var(--picked-ink)}.crm-client-tab .crm-tab-close{min-width:34px;font-size:19px}.crm-reply-target{font-size:12px;margin:0;padding:8px 16px;background:var(--surface);border-top:1px solid var(--line);color:var(--muted);flex-shrink:0}.thread-response-state{display:block;font-size:11px;opacity:.75;margin-top:8px}.thread-item:has(b){box-shadow:inset 3px 0 var(--title-accent)}.admin-chat-notice{position:fixed;right:20px;bottom:20px;z-index:30;min-height:48px;padding:12px 18px;border-radius:16px;background:var(--button);color:var(--button-ink);border:1px solid var(--line);font:inherit;font-size:13px;cursor:pointer;box-shadow:0 8px 30px #0002}.admin-chat-notice[hidden]{display:none}.crm-contextbar{padding:8px 16px!important}.crm-contextbar label{font-size:11px!important}.crm-message-context{min-height:30px}
@media(max-width:620px){.product-operator-grid{grid-template-columns:1fr}.crm-client-tabs{padding:8px;min-height:48px}.crm-client-tab button{max-width:155px}.admin-chat-notice{right:10px;left:10px;bottom:10px;text-align:center}.crm-reply-target{padding:6px 12px}}

@media(min-width:621px){.crm-shell{grid-template-columns:270px minmax(0,1fr);position:relative}.crm-contact{display:none;position:absolute;right:0;top:0;bottom:0;width:340px;z-index:4;box-shadow:-12px 0 35px #0002}.crm-shell.contact-open .crm-contact{display:block}.crm-conversation-head #toggle-contact{display:inline-flex}}

/* Keep the application frame fixed; long navigation and work areas scroll inside it. */
body:has(.admin-shell){overflow:hidden}.admin-shell{overflow:hidden}
@media(min-width:901px){.admin-sidebar{overflow-y:auto;overflow-x:hidden}}

.seller-access-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0;border-bottom:1px solid var(--line)}.seller-access-row p{font-size:12px;color:var(--muted);margin:6px 0}.seller-access-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.seller-access-actions a{display:inline-flex;align-items:center;text-decoration:none}#seller-credentials-dialog .order-dialog-body{padding:24px}#seller-credentials{font:14px/1.7 monospace;resize:vertical;width:100%;margin:14px 0}#seller-access-list{margin-top:16px}@media(max-width:620px){.seller-access-row{align-items:flex-start;flex-direction:column}.seller-access-actions{width:100%}}
