/* AR-UI-INHERIT-002 · WQ visual bridge (AR IDs + AR APIs unchanged) */

[hidden] {
  display: none !important;
}

.sidebar-logo-icon.ar-logo-mark {
  padding: 0;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
}

.sidebar-logo-icon.ar-logo-mark img {
  display: block;
  width: 36px;
  height: 36px;
}

.sidebar-logo-text.ar-brand-text {
  letter-spacing: 0.08em;
}

.ar-env-badge {
  font-size: 11px;
  color: var(--text-muted);
  padding: 0 14px 8px;
  margin: 0;
}

.main-wrapper {
  min-width: 0;
}

.ar-unit-workspace {
  --sidebar-width: 116px;
  --header-height: 38px;
  background: #15191e;
}

.ar-unit-workspace .sidebar-logo {
  gap: 6px;
  padding: 0 9px;
}

.ar-unit-workspace .sidebar-logo-icon.ar-logo-mark,
.ar-unit-workspace .sidebar-logo-icon.ar-logo-mark img {
  width: 25px;
  height: 25px;
}

.ar-unit-workspace .sidebar-logo-text {
  font-size: 11px;
}

.ar-unit-workspace .sidebar-toggle-logo {
  display: none;
}

.ar-unit-workspace .sidebar-version {
  margin-inline: 4px;
  padding-inline: 5px;
  font-size: 10px;
}

.ar-unit-workspace .instance-detail-topbar-actions .btn {
  width: auto;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
}

.ar-unit-workspace .topbar,
.ar-unit-workspace .ar-main {
  padding-inline: 12px;
}

.ar-unit-workspace .ar-main {
  padding-block: 12px 22px;
}

.ar-unit-workspace .ar-main > .alert-info {
  padding: 3px 0;
  margin: 0 0 8px;
  border: 0;
  background: transparent;
  font-size: 11px;
}

.ar-unit-workspace .instance-detail-topbar {
  padding: 7px 8px;
  margin-bottom: 5px;
  background: #20262c;
  border-radius: 5px;
}

.ar-unit-workspace .ar-unit-meta {
  font-size: 12px;
  white-space: normal;
}

.ar-unit-api-state,
.ar-unit-workspace #unit-action-msg {
  margin: 6px 8px;
  font-size: 11px;
}

.ar-unit-workspace #unit-action-msg:empty,
.ar-unit-workspace #metrics-sync-meta:empty,
.ar-unit-workspace #ar-chart-hint:empty {
  display: none;
}

.ar-market-quote {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 6px;
  margin-bottom: 7px;
  background: #20262c;
  border: 1px solid #303840;
  border-radius: 5px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.ar-market-quote small {
  display: block;
  color: #9aa8b4;
  font-size: 10px;
}

.ar-market-quote .ar-quote-up {
  color: #0bc48b;
}

.ar-market-quote .ar-quote-down {
  color: #f76b82;
}

.ar-fixed-period {
  padding: 4px 8px;
  border-radius: 4px;
  background: #30334e;
  color: #d6d9ee;
}

.ar-market-source {
  margin-left: auto;
  text-align: right;
  color: var(--accent);
  font-size: 10px;
}

#chart-feed-meta {
  display: block;
  color: #9aa8b4;
}

.ar-market-frame {
  background: #1e242a;
  border: 1px solid #30414a;
  border-radius: 5px;
  overflow: hidden;
}

.ar-chart-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  padding: 5px 10px;
  border-bottom: 1px solid #303840;
  color: #a3b0bc;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.ar-unit-workspace #ar-chart-hint {
  margin: 0 0 0 auto;
  font-size: inherit;
}

.ar-chart-workspace {
  display: flex;
  align-items: stretch;
}

.ar-chart-workspace #ar-drawing-toolbar.market-drawing-toolbar {
  width: 30px;
  flex-shrink: 0;
  padding: 4px 2px;
  background: #1e242a;
}

.ar-chart-workspace .market-drawing-tool {
  width: 25px;
  height: 30px;
}

.ar-chart-workspace .market-drawing-tool svg {
  width: 15px;
  height: 15px;
}

.ar-unit-workspace #ar-chart.ar-chart {
  flex: 1;
  min-width: 0;
  height: 370px;
  min-height: 370px;
  margin: 0;
  border: none;
  border-radius: 0;
  background: #1e242a;
}

.ar-chart-readout > .hint {
  margin-block: 0;
}

.ar-chart-readout > .hint[title] {
  font-size: inherit;
}

.ar-chart-readout--drawing {
  box-sizing: border-box;
  min-height: 39px;
}

#ar-line-confirm {
  position: fixed;
  inset: 0;
  margin: auto;
  box-sizing: border-box;
  color: var(--text-primary);
}

#ar-line-confirm .btn {
  width: auto;
  white-space: nowrap;
}

#ar-line-confirm::backdrop {
  background: rgba(15, 18, 28, 0.72);
}

.ar-market-frame .ar-fixture-demo {
  margin: 4px 8px;
}

.ar-unit-workspace #ar-metrics-row {
  gap: 4px;
  margin: 9px 0;
}

.ar-unit-workspace #ar-metrics-row .stat-card {
  padding: 6px 3px;
  min-height: 48px;
  background: #1e242a;
  border-color: #303840;
  border-radius: 4px;
}

.ar-unit-workspace #ar-metrics-row .stat-label {
  font-size: 10px;
}

.ar-unit-workspace #ar-metrics-row .stat-value {
  font-size: 12px;
}

.ar-unit-workspace :is(#section-positions, #section-signals, #section-history) {
  margin: 8px 3px;
  background: #1e242a;
  border: 1px solid #303840;
  border-radius: 5px;
}

.ar-unit-workspace :is(#section-positions, #section-signals, #section-history) .panel-header {
  padding: 8px 10px;
  min-height: 35px;
}

.ar-unit-workspace :is(#section-positions, #section-signals, #section-history) .panel-body {
  padding: 9px;
}

.ar-unit-workspace :is(#section-signals, #section-history) .panel-header {
  background: linear-gradient(#20343b, #1e242a);
}

.ar-unit-workspace :is(#section-positions, #section-signals, #section-history) table {
  width: 100%;
  border-collapse: collapse;
}

.ar-unit-workspace :is(#section-positions, #section-signals, #section-history) th {
  background: #161b20;
  color: #9aa8b4;
  font-weight: 500;
}

.ar-unit-workspace :is(#section-positions, #section-signals, #section-history) :is(th, td) {
  padding: 6px 5px;
  font-size: 11px;
  text-align: center;
}

#section-positions.panel-positions .panel-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 12px;
}

#section-positions .panel-title {
  white-space: nowrap;
  flex: 0 0 auto;
}

#section-positions .panel-header-actions {
  margin-left: auto;
  flex-shrink: 0;
}

.ar-unit-workspace :is(#section-positions, #section-signals, #section-history) .ar-empty-cell {
  padding: 20px 5px;
}

.ar-history-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.ar-history-pager[hidden] {
  display: none !important;
}

.sidebar-account.ar-account-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  padding: 0 10px 8px;
}

.btn.btn-ghost {
  border: 1px solid var(--border);
  width: auto;
}

.btn.btn-ghost:hover {
  border-color: var(--border-light);
}

.sidebar-account.ar-account-card .btn-ghost {
  width: 100%;
  justify-content: center;
}

.market-toolbar-period-label {
  font-size: 12px;
  color: var(--text-muted);
}

.ar-strategy-period-strip {
  margin: 12px 0;
  gap: 6px;
}

.ar-dl-grid {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 8px 16px;
  margin: 0 0 12px;
}

.ar-dl-grid dt {
  color: var(--text-muted);
  margin: 0;
}

.ar-dl-grid dd {
  margin: 0;
}

.ar-login-wrap .login-card {
  max-width: 420px;
}

.ar-login-wrap .ar-logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 10px;
}

.ar-login-wrap .login-title.ar-wordmark {
  font-size: 1.35rem;
  letter-spacing: 0.12em;
}

/* Unit settings: delete a paused unit. */
.ar-unit-delete {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ar-unit-delete .ar-btn-danger {
  color: #f6465d;
  border-color: rgba(246, 70, 93, 0.5);
}
.ar-unit-delete .ar-btn-danger:hover {
  background: rgba(246, 70, 93, 0.12);
}

/* Unit settings: rename. The global .btn is width:100%, so size both explicitly. */
.ar-unit-rename {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ar-unit-rename .form-label {
  display: block;
  margin-bottom: 6px;
}
.ar-unit-rename-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
  max-width: 560px;
}
.ar-unit-rename-row .form-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}
.ar-unit-rename-row .btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 96px;
  justify-content: center;
  white-space: nowrap;
}
.ar-unit-rename .hint {
  margin-top: 6px;
}

/* V1.1.1 judgement records: few columns, so let the table span the panel. */
.ar-unit-workspace #section-signals table {
  display: table;
}

.ar-unit-workspace #section-signals .ar-sync-meta {
  margin: 0 0 4px;
  font-size: 11px;
}

.ar-unit-workspace #section-signals .panel-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ar-judgement-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #9aa8b4;
  cursor: pointer;
}

.ar-unit-workspace #section-signals tr.ar-judgement-signal td {
  color: #f0c36b;
}

.ar-unit-workspace #section-signals tr.ar-judgement-missing td {
  color: #e57373;
}
