@import url("ua_agents_theme.css?v=20260620e");

.content-wrapper.ua-agents-page {
  background: linear-gradient(180deg, var(--ua-agent-canvas), var(--ua-agent-canvas-soft)) !important;
}
.content-wrapper.ua-agents-page .content-header {
  padding: 18px 0 10px;
  border-bottom: 1px solid var(--ua-agent-border) !important;
  background: color-mix(in srgb,var(--ua-agent-surface) 82%,transparent) !important;
}
.ua-agents-page .content-header h1 {
  color: var(--ua-agent-text);
  font-size: 24px;
  font-weight: 800;
}
.ua-agents-page .content { padding-top: 18px; }
.content-wrapper.ua-agents-page .card {
  color: var(--ua-agent-text) !important;
  border: 1px solid var(--ua-agent-border) !important;
  border-radius: 6px !important;
  background: var(--ua-agent-surface) !important;
  box-shadow: var(--ua-agent-shadow) !important;
}
.content-wrapper.ua-agents-page .card-header {
  min-height: 58px;
  color: var(--ua-agent-text) !important;
  border-bottom: 1px solid var(--ua-agent-border) !important;
  background: var(--ua-agent-surface-strong) !important;
}
.content-wrapper.ua-agents-page .card-body {
  color: var(--ua-agent-text);
  background: transparent !important;
}
.content-wrapper.ua-agents-page .card-footer {
  color: var(--ua-agent-text);
  border-top: 1px solid var(--ua-agent-border) !important;
  background: var(--ua-agent-surface-strong) !important;
}
.ua-agents-page .text-muted { color: var(--ua-agent-muted) !important; }
.ua-agents-page label { color: var(--ua-agent-muted); }
.ua-agents-page .form-control {
  color: var(--ua-agent-text) !important;
  border-color: var(--ua-agent-border) !important;
  border-radius: 5px;
  background: var(--ua-agent-field) !important;
}
.ua-agents-page .form-control::placeholder { color: #71849b; }
.ua-agents-page .form-control:disabled,
.ua-agents-page .form-control[readonly] {
  color: var(--ua-agent-muted) !important;
  background: var(--ua-agent-canvas-soft) !important;
  opacity: 1;
}
.ua-agents-page select.form-control option {
  color: var(--ua-agent-text);
  background: var(--ua-agent-field);
}
.ua-agents-page .form-control:focus {
  border-color: var(--ua-agent-green) !important;
  box-shadow: 0 0 0 2px rgba(54, 199, 144, .15) !important;
}
.ua-agents-page .btn { border-radius: 5px; }
.ua-agents-page .btn-primary { border-color: #286cb0; background: #245f9b; }
.ua-agents-page .btn-success { border-color: #238b68; background: #237d60; }
.ua-agents-page .btn-primary i { color: #70d1ac; }
.ua-agents-page .btn-success i { color: #f1c76b; }
.ua-agents-page .btn-outline-primary { color: #7db8f4; border-color: #356da6; }
.ua-agents-page .btn-outline-secondary { color: #b8c6d7; border-color: #53677e; }
.ua-agents-page .btn-outline-danger { color: #ff8998; border-color: #a94d5c; }
.ua-agents-page .btn-outline-success { color: #6ee0b3; border-color: #318b69; }
.ua-agents-page .btn-outline-primary:hover,
.ua-agents-page .btn-outline-secondary:hover,
.ua-agents-page .btn-outline-danger:hover,
.ua-agents-page .btn-outline-success:hover {
  color: var(--ua-agent-text);
  background: var(--ua-agent-surface-hover);
}
.ua-agents-page .btn-outline-primary i { color: #69a9eb; }
.ua-agents-page .btn-outline-secondary i { color: #a8b9cb; }
.ua-agents-page .btn-outline-danger i { color: #ff7185; }
.ua-agents-page .btn-outline-success i { color: #52d39f; }
.ua-agents-page .btn-warning i { color: #704d00; }

.ua-agents-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 14px 0 0;
}
.ua-agents-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  color: var(--ua-agent-muted);
  padding: 9px 13px;
  border: 1px solid transparent;
  border-bottom: 3px solid transparent;
  border-radius: 5px 5px 0 0;
}
.ua-agents-nav a:hover {
  color: var(--ua-agent-text);
  background: var(--ua-agent-surface-hover);
}
.ua-agents-nav a.active {
  color: var(--ua-agent-accent);
  border-color: var(--ua-agent-border);
  border-bottom-color: var(--ua-agent-green);
  background: var(--ua-agent-surface-strong);
  font-weight: 700;
}

.ua-agent-icon-btn {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  line-height: 1;
}
.ua-agent-icon-btn i {
  margin: 0 !important;
  font-size: 15px;
}
.ua-agent-management-stack {
  display: grid;
  gap: 16px;
}
.ua-agent-form-card { position: static; }
.ua-agent-card-heading,
.ua-agent-list-header,
.ua-agent-filter-heading,
.ua-agent-ledger-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
}
.ua-agent-card-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}
.ua-agent-card-title > i {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  color: var(--ua-agent-accent);
  border: 1px solid var(--ua-agent-border-strong);
  border-radius: 6px;
  background: var(--ua-agent-accent-soft);
}
.ua-agent-card-title strong,
.ua-agent-card-title small {
  display: block;
}
.ua-agent-card-title strong {
  color: var(--ua-agent-text);
  font-size: 14px;
}
.ua-agent-card-title small {
  margin-top: 3px;
  color: var(--ua-agent-muted);
  font-size: 11px;
  font-weight: 500;
}
.ua-agent-edit-chip,
.ua-agent-result-count {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: var(--ua-agent-accent);
  border: 1px solid var(--ua-agent-border-strong);
  border-radius: 5px;
  background: var(--ua-agent-accent-soft);
  font-size: 12px;
  font-weight: 800;
}
.ua-agent-editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 14px;
}
.ua-agent-editor-grid .form-group,
.ua-agent-adjustment-form .form-group {
  min-width: 0;
  margin: 0;
}
.ua-agent-editor-grid .form-control,
.ua-agent-adjustment-form .form-control {
  height: 40px;
}
.ua-agent-editor-grid textarea.form-control,
.ua-agent-adjustment-form textarea.form-control {
  height: auto;
  min-height: 76px;
  resize: vertical;
}
.ua-agent-editor-grid textarea.ua-agent-notes-control {
  height: 40px;
  min-height: 40px;
  padding-top: 9px;
}
.ua-agent-form-section-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  margin-top: 2px;
  padding-bottom: 7px;
  color: var(--ua-agent-text);
  border-bottom: 1px solid var(--ua-agent-border);
  font-size: 12px;
  font-weight: 800;
}
.ua-agent-form-section-title:not(:first-child) { margin-top: 5px; }
.ua-agent-form-section-title i { color: var(--ua-agent-green); }
.ua-span-2 { grid-column: span 2; }
.ua-agent-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 10px 16px;
}
.ua-agent-editor-actions,
.ua-agent-command-actions,
.ua-agent-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ua-agent-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}
.ua-agent-switches label {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 6px 10px;
  color: var(--ua-agent-text);
  border: 1px solid var(--ua-agent-border);
  border-radius: 5px;
  background: color-mix(in srgb,var(--ua-agent-field) 82%,transparent);
  cursor: pointer;
}
.ua-agent-switches input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 0 0 5px !important;
  vertical-align: -3px;
  appearance: none !important;
  border: 1px solid #60758d !important;
  border-radius: 3px !important;
  background: var(--ua-agent-field) !important;
  background-image: none !important;
  cursor: pointer;
}
.ua-agent-switches input[type="checkbox"]:checked {
  border-color: var(--ua-agent-green) !important;
  background: var(--ua-agent-green) !important;
  box-shadow: inset 0 0 0 3px var(--ua-agent-field) !important;
}
.ua-agent-switches input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--ua-agent-accent);
  outline-offset: 2px;
}
.ua-agent-list-card { overflow: hidden; }
.ua-agent-list-header {
  min-height: 74px !important;
}
.ua-agent-list-filter {
  min-width: min(720px, 64%);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 170px auto auto;
  align-items: end;
  gap: 8px;
}
.ua-agent-filter-field {
  min-width: 0;
}
.ua-agent-filter-field label {
  display: block;
  margin: 0 0 5px;
  color: var(--ua-agent-muted);
  font-size: 11px;
  font-weight: 700;
}
.ua-agent-filter-field label i {
  width: 16px;
  color: var(--ua-agent-accent);
  text-align: center;
}
.ua-agent-list-filter .form-control,
.ua-agent-ledger-filter .form-control,
.ua-agent-activity-filters .form-control {
  height: 42px;
}
.ua-agents-table td:first-child strong {
  color: var(--ua-agent-text);
  font-size: 13px;
}
.ua-agents-table td:last-child {
  width: 150px;
  text-align: center;
}

.ua-agent-filter-body {
  padding: 13px 16px !important;
  background: color-mix(in srgb,var(--ua-agent-surface-strong) 72%,transparent) !important;
  border-bottom: 1px solid var(--ua-agent-border);
}
.ua-agent-activity-filters {
  display: grid;
  grid-template-columns: 1.15fr .9fr 1.15fr .72fr auto;
  align-items: end;
  gap: 10px;
}
.ua-agent-activity-card { overflow: hidden; }

.ua-agent-balances-layout {
  display: grid;
  /*
   * The sidebar reduces the usable desktop canvas by roughly 260px.  Let the
   * adjustment panel contract before the ledger, whose table already owns a
   * horizontal scroll container, instead of forcing the whole grid outside
   * the page at common scaled-desktop widths.
   */
  grid-template-columns: minmax(300px, .78fr) minmax(0, 1.65fr);
  gap: 16px;
  align-items: start;
}
.ua-agent-adjustment-card,
.ua-agent-ledger-card {
  overflow: hidden;
}
.ua-agent-adjustment-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px !important;
}
.ua-agent-command-bar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
}
.ua-agent-command-bar > span {
  font-size: 12px;
}
.ua-agent-ledger-toolbar {
  min-height: 68px !important;
}
.ua-agent-ledger-filter {
  min-width: min(520px, 54%);
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.ua-agent-ledger-card .table th,
.ua-agent-ledger-card .table td,
.ua-agent-activity-card .table th,
.ua-agent-activity-card .table td {
  padding: 10px 11px;
}
.ua-agents-page .table {
  color: var(--ua-agent-text);
  background: transparent;
}
.ua-agents-page .table th {
  white-space: nowrap;
  border-top: 0;
  color: var(--ua-agent-text);
  background: var(--ua-agent-surface-strong);
  border-color: var(--ua-agent-border);
}
.ua-agents-page .table td {
  vertical-align: middle;
  border-color: var(--ua-agent-border);
  background: transparent;
}
.ua-agents-page .table-hover tbody tr:hover {
  color: var(--ua-agent-text);
  background: var(--ua-agent-surface-hover);
}
.ua-agent-balance {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ua-agent-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.ua-agent-kpi {
  border: 1px solid var(--ua-agent-border);
  border-right: 4px solid var(--ua-agent-green);
  border-radius: 6px;
  padding: 16px;
  background: var(--ua-agent-surface);
  box-shadow: var(--ua-agent-shadow);
}
.ua-agent-kpi .label { color: var(--ua-agent-muted); font-size: 13px; }
.ua-agent-kpi .value {
  margin-top: 4px;
  color: var(--ua-agent-text);
  font-size: 24px;
  font-weight: 800;
}
.ua-agent-ledger-debit { color: #ff8998; font-weight: 700; }
.ua-agent-ledger-credit { color: #65dcae; font-weight: 700; }

.ua-agent-preview-shell {
  overflow: hidden;
  border: 1px solid var(--ua-agent-border);
  border-radius: 6px;
  background: var(--ua-agent-canvas-soft);
  box-shadow: var(--ua-agent-shadow);
}
.ua-agent-preview-head {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: var(--ua-agent-text);
  background: #102b46;
  border-bottom: 4px solid var(--ua-agent-green);
}
.ua-agent-preview-brand,
.ua-agent-preview-owner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ua-agent-preview-brand strong,
.ua-agent-preview-owner strong {
  display: block;
  font-size: 17px;
}
.ua-agent-preview-brand span,
.ua-agent-preview-owner span {
  display: block;
  color: #b8c8da;
  font-size: 12px;
}
.ua-agent-preview-logo,
.ua-agent-preview-avatar {
  display: grid;
  place-items: center;
  color: var(--ua-agent-text);
  background: #238b68;
  font-weight: 800;
}
.ua-agent-preview-logo {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  font-size: 20px;
}
.ua-agent-preview-owner { text-align: left; }
.ua-agent-preview-owner i {
  font-size: 34px;
  color: var(--ua-agent-accent);
}
.ua-agent-preview-body {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 690px;
}
.ua-agent-preview-side {
  padding: 24px;
  background: var(--ua-agent-surface);
  border-left: 1px solid var(--ua-agent-border);
}
.ua-agent-preview-profile {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ua-agent-border);
}
.ua-agent-preview-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  font-size: 30px;
}
.ua-agent-preview-profile h2 { margin: 0; font-size: 19px; }
.ua-agent-preview-profile p {
  margin: 4px 0 0;
  color: var(--ua-agent-muted);
}
.ua-agent-preview-contact { margin: 20px 0; }
.ua-agent-preview-contact div {
  padding: 10px 0;
  border-bottom: 1px solid var(--ua-agent-border);
}
.ua-agent-preview-contact dt {
  color: var(--ua-agent-muted);
  font-size: 12px;
  font-weight: 500;
}
.ua-agent-preview-contact dt i {
  width: 18px;
  color: var(--ua-agent-accent);
}
.ua-agent-preview-contact dd {
  margin: 4px 0 0;
  font-weight: 700;
}
.ua-agent-preview-main { padding: 24px; }
.ua-agent-preview-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.ua-agent-preview-kpis > div {
  position: relative;
  padding: 17px 18px;
  background: var(--ua-agent-surface);
  border: 1px solid var(--ua-agent-border);
  border-right: 4px solid var(--ua-agent-green);
  border-radius: 5px;
}
.ua-agent-preview-kpis span {
  display: block;
  color: var(--ua-agent-muted);
  font-size: 13px;
}
.ua-agent-preview-kpis strong {
  display: inline-block;
  margin-top: 5px;
  font-size: 25px;
  color: var(--ua-agent-text);
}
.ua-agent-preview-kpis small {
  margin-right: 5px;
  color: var(--ua-agent-muted);
}
.ua-agent-preview-section {
  margin-bottom: 16px;
  background: var(--ua-agent-surface);
  border: 1px solid var(--ua-agent-border);
  border-radius: 5px;
}
.ua-agent-preview-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 65px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--ua-agent-border);
}
.ua-agent-preview-section-head h3 {
  margin: 0 0 3px;
  font-size: 16px;
}
.ua-agent-preview-section-head p {
  margin: 0;
  color: var(--ua-agent-muted);
  font-size: 12px;
}
.ua-agent-preview-section-head > i {
  color: var(--ua-agent-accent);
  font-size: 19px;
}
.ua-agent-preview-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 10px;
  padding: 18px;
}
.ua-agent-preview-customer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 18px;
}
.ua-agent-preview-customer > div {
  padding: 5px 16px;
  border-left: 1px solid var(--ua-agent-border);
}
.ua-agent-preview-customer > div:last-child { border-left: 0; }
.ua-agent-preview-customer span {
  display: block;
  color: var(--ua-agent-muted);
  font-size: 12px;
}
.ua-agent-preview-customer strong {
  display: block;
  margin-top: 5px;
}
.ua-agent-preview-table th {
  border-top: 0;
  white-space: nowrap;
}
.ua-agent-preview-table td { vertical-align: middle; }

@media (max-width: 991px) {
  .ua-agent-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ua-agent-balances-layout { grid-template-columns: 1fr; }
  .ua-agent-list-header,
  .ua-agent-filter-heading,
  .ua-agent-ledger-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .ua-agent-list-filter,
  .ua-agent-ledger-filter {
    width: 100%;
    min-width: 0;
  }
  .ua-agent-activity-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ua-agent-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
  .ua-agent-editor-grid,
  .ua-agent-adjustment-form,
  .ua-agent-activity-filters,
  .ua-agent-list-filter,
  .ua-agent-ledger-filter {
    grid-template-columns: 1fr;
  }
  .ua-span-2 { grid-column: auto; }
  .ua-agent-editor-footer,
  .ua-agent-command-bar {
    align-items: flex-start;
    flex-direction: column;
  }
  .ua-agent-kpis { grid-template-columns: 1fr; }
}
