/* REH_UNIFIED_ACCOUNT_WORKSPACE_V1 */

/*
 * Shared typography/theme contract for public REH and Agent.host account workspaces.
 * Public REH remains the visual reference; Agent.host is normalised to the same scale.
 */
.reh-account-workspace,
.ah-tools-dialog{
  --rau-bg:var(--reh-surface,#242524);
  --rau-soft:var(--reh-soft,#303230);
  --rau-border:var(--reh-border,#474b48);
  --rau-text:var(--reh-ink,#f5f6f5);
  --rau-muted:var(--reh-muted,#b1b7b3);
  --rau-green:var(--reh-green,#19b97a);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:14px!important;
  line-height:1.45!important;
  color:var(--rau-text)!important;
  background:var(--rau-bg)!important;
}

.reh-account-workspace button,
.reh-account-workspace input,
.reh-account-workspace select,
.reh-account-workspace textarea,
.ah-tools-dialog button,
.ah-tools-dialog input,
.ah-tools-dialog select,
.ah-tools-dialog textarea{
  font:inherit!important;
}

.ah-tools-dialog{
  width:min(820px,calc(100vw - 32px))!important;
  max-height:min(78vh,820px)!important;
  border:1px solid var(--rau-border)!important;
  border-radius:18px!important;
  box-shadow:0 24px 70px rgba(0,0,0,.34)!important;
}

.ah-tools-head{
  min-height:80px!important;
  padding:20px 24px!important;
  border-bottom:1px solid var(--rau-border)!important;
  background:var(--rau-bg)!important;
}
.ah-tools-head strong{
  font-size:13px!important;
  font-weight:700!important;
  letter-spacing:0!important;
}
.ah-tools-main{
  grid-template-columns:180px minmax(0,1fr)!important;
  background:var(--rau-bg)!important;
}
.ah-tools-nav,
.reh-account-sidebar{
  background:var(--rau-bg)!important;
}
.ah-tools-nav{
  padding:14px 10px!important;
  border-right:1px solid var(--rau-border)!important;
}
.ah-tools-body{
  padding:20px 22px!important;
  background:var(--rau-bg)!important;
}

/* Exact same account-navigation typography and interaction treatment. */
.ah-tools-nav button,
.ah-tools-nav a,
.reh-account-tabs button,
.reh-account-tabs a,
.reh-account-contract-item,
.reh-account-support-entry{
  min-height:38px!important;
  padding:9px 10px!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  color:var(--rau-text,var(--reh-ink,#f5f6f5))!important;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:13px!important;
  font-weight:650!important;
  line-height:1.25!important;
  letter-spacing:0!important;
  text-align:left!important;
  text-decoration:none!important;
  cursor:pointer!important;
}
.ah-tools-nav button:hover,
.ah-tools-nav a:hover,
.reh-account-tabs button:hover,
.reh-account-tabs a:hover{
  background:var(--rau-soft,var(--reh-soft,#303230))!important;
}
.ah-tools-nav button.active,
.ah-tools-nav a.active,
.reh-account-tabs button.active,
.reh-account-tabs button[aria-current="page"]{
  background:var(--rau-soft,var(--reh-soft,#303230))!important;
  color:var(--rau-text,var(--reh-ink,#f5f6f5))!important;
}

/* Unified internal section design. */
.reh-account-unified-section{
  display:grid;
  gap:16px;
  color:var(--rau-text,var(--reh-ink,#f5f6f5));
}
.reh-account-unified-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.reh-account-unified-head>div>span{
  display:block;
  color:var(--rau-muted,var(--reh-muted,#b1b7b3));
  font-size:10px;
  font-weight:800;
  letter-spacing:.1em;
  margin-bottom:4px;
}
.reh-account-unified-head h1,
.reh-account-unified-head h2{
  margin:0 0 5px!important;
  font-size:24px!important;
  line-height:1.15!important;
  color:var(--rau-text,var(--reh-ink,#f5f6f5))!important;
}
.reh-account-unified-head h2{font-size:20px!important}
.reh-account-unified-head p,
.reh-account-muted{
  margin:0!important;
  color:var(--rau-muted,var(--reh-muted,#b1b7b3))!important;
}
.reh-account-unified-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.reh-account-unified-stats article,
.reh-account-unified-card,
.reh-account-price-grid article{
  border:1px solid var(--rau-border,var(--reh-border,#474b48));
  background:var(--rau-bg,var(--reh-surface,#242524));
  border-radius:12px;
}
.reh-account-unified-stats article{
  padding:14px;
  display:grid;
  gap:3px;
}
.reh-account-unified-stats strong{font-size:21px}
.reh-account-unified-stats span{font-size:12px;color:var(--rau-muted,var(--reh-muted,#b1b7b3))}
.reh-account-unified-card{padding:16px}
.reh-account-unified-card-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:13px}
.reh-account-unified-card-head h2{font-size:17px!important;margin:0 0 4px!important}
.reh-account-unified-card-head p{margin:0;color:var(--rau-muted,var(--reh-muted,#b1b7b3));font-size:12px}
.reh-account-unified-list{display:grid;gap:8px}
.reh-account-unified-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:11px 0;
  border-top:1px solid var(--rau-border,var(--reh-border,#474b48));
}
.reh-account-unified-row:first-child{border-top:0}
.reh-account-unified-row>div{display:grid;gap:2px}
.reh-account-unified-row span,
.reh-account-unified-row small{color:var(--rau-muted,var(--reh-muted,#b1b7b3));font-size:11px}
.reh-account-unified-form{
  display:grid;
  grid-template-columns:1fr 1fr 1.15fr;
  gap:10px;
  margin:0 0 14px;
}
.reh-account-unified-form label{
  display:grid;
  gap:5px;
  color:var(--rau-muted,var(--reh-muted,#b1b7b3));
  font-size:11px;
  font-weight:700;
}
.reh-account-unified-form input{
  width:100%;
  border:1px solid var(--rau-border,var(--reh-border,#474b48))!important;
  border-radius:9px!important;
  background:transparent!important;
  color:var(--rau-text,var(--reh-ink,#f5f6f5))!important;
  padding:9px 10px!important;
}
.reh-account-unified-form-actions{
  grid-column:1/-1;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  color:var(--rau-muted,var(--reh-muted,#b1b7b3));
  font-size:11px;
}
.reh-account-primary,
.reh-account-secondary{
  border-radius:999px!important;
  padding:9px 13px!important;
  font-size:12px!important;
  font-weight:800!important;
  cursor:pointer!important;
}
.reh-account-primary{
  border:0!important;
  background:var(--rau-green,var(--reh-green,#19b97a))!important;
  color:#062519!important;
}
.reh-account-secondary{
  border:1px solid var(--rau-border,var(--reh-border,#474b48))!important;
  background:transparent!important;
  color:var(--rau-text,var(--reh-ink,#f5f6f5))!important;
}
.reh-account-table-wrap{overflow:auto}
.reh-account-table-wrap table{width:100%;border-collapse:collapse;font-size:12px}
.reh-account-table-wrap th,
.reh-account-table-wrap td{
  padding:9px 8px;
  border-top:1px solid var(--rau-border,var(--reh-border,#474b48));
  text-align:left;
  white-space:nowrap;
}
.reh-account-table-wrap th{color:var(--rau-muted,var(--reh-muted,#b1b7b3));font-size:10px;text-transform:uppercase}
.reh-account-price-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.reh-account-price-grid article{padding:12px;display:grid;gap:3px}
.reh-account-price-grid span{font-weight:800}
.reh-account-price-grid small{color:var(--rau-muted,var(--reh-muted,#b1b7b3))}
.reh-account-unified-loading,
.reh-account-unified-error{
  border:1px solid var(--rau-border,var(--reh-border,#474b48));
  border-radius:12px;
  padding:18px;
  color:var(--rau-muted,var(--reh-muted,#b1b7b3));
}

/* Public conversations embedded inside the existing Account window. */
.reh-account-external-embed{
  height:100%;
  display:grid;
  grid-template-rows:auto minmax(320px,1fr);
  gap:12px;
}
.reh-account-external-embed iframe{
  width:100%;
  min-height:440px;
  height:100%;
  border:1px solid var(--rau-border,var(--reh-border,#474b48));
  border-radius:12px;
  background:transparent;
}

/* Support remains outside the workspace and the old floating launcher remains retired. */
#reh-support-entry-v1{display:none!important}

@media(max-width:760px){
  .ah-tools-dialog{width:100vw!important;max-height:100vh!important;border-radius:0!important}
  .ah-tools-main{grid-template-columns:1fr!important}
  .ah-tools-nav{display:flex!important;overflow:auto!important;border-right:0!important;border-bottom:1px solid var(--rau-border)!important}
  .ah-tools-body{padding:14px!important}
  .reh-account-unified-stats,.reh-account-price-grid{grid-template-columns:1fr!important}
  .reh-account-unified-form{grid-template-columns:1fr!important}
}

.reh-account-contract-item{
  display:flex!important;
  align-items:center!important;
  width:100%!important;
  box-sizing:border-box!important;
}


/* Support inbox: high-visibility external account destination. */
.ah-tools-nav>a#reh-account-support-entry.reh-support-inbox-link,
.reh-account-tabs>a#reh-account-support-entry.reh-support-inbox-link{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  width:100%!important;
  min-height:42px!important;
  padding:8px 10px 8px 14px!important;
  margin:4px 0!important;
  border:0!important;
  border-radius:999px!important;
  background:#e4b449!important;
  color:#2d2104!important;
  box-shadow:none!important;
  font-size:13px!important;
  font-weight:850!important;
  line-height:1!important;
  text-decoration:none!important;
  cursor:pointer!important;
}
.ah-tools-nav>a#reh-account-support-entry.reh-support-inbox-link:hover,
.reh-account-tabs>a#reh-account-support-entry.reh-support-inbox-link:hover{
  background:#efc45f!important;
  color:#211803!important;
}
.reh-support-inbox-label{
  display:block!important;
  white-space:nowrap!important;
}
.reh-support-inbox-count{
  min-width:24px!important;
  height:24px!important;
  padding:0 7px!important;
  border-radius:999px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  background:#8d2e12!important;
  color:#fff!important;
  font-size:11px!important;
  font-weight:900!important;
  line-height:1!important;
}
.reh-support-inbox-count[hidden]{display:none!important}
