/*
 * The provider console's stylesheet: the provider starter's admin UI
 * (the admin.css and login.css of daski-io/provider-full's admin UI,
 * D43), then what the console's own pages add. No external fonts or images,
 * and no inline style anywhere: the site's content security policy allows
 * only this file.
 */

:root {
  --mint-400: #34d3b1;
  --mint-500: #1cba99;
  --mint-700: #107562;
  --apricot-300: #f0a878;
  --warning: #d4961f;
  --danger: #d94560;
  --pro-bg: #0a0a0f;
  --pro-surface: #12121a;
  --pro-surface2: #1a1a26;
  --pro-border: #2a2a3a;
  --pro-border-hi: #4a4a6a;
  --fg-1: #e0e0e8;
  --fg-3: #7a7a8e;
  --fg-4: #5a5a6e;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: var(--pro-bg);
  color: var(--fg-1); font-family: var(--font-sans);
  font-size: 14px; line-height: 1.5;
}
a { color: var(--mint-400); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: 0.01em; }
.mono-caption {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-3); font-weight: 500;
}
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar {
  border-right: 1px solid var(--pro-border);
  background: var(--pro-bg);
  display: flex; flex-direction: column;
  /* As Blue T's admin: the menu and Sign out stay in view while the page scrolls. */
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
}
.brand {
  height: 56px; display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid var(--pro-border);
  font-weight: 600; letter-spacing: -0.01em;
}
.brand .tag {
  font-family: var(--font-mono); font-size: 10px;
  padding: 2px 6px; border: 1px solid var(--pro-border); border-radius: 4px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3);
}
.nav { padding: 14px 10px; display: flex; flex-direction: column; gap: 1px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 0 10px; height: 32px;
  border-radius: 6px; color: var(--fg-3); font-size: 13.5px; font-weight: 400;
}
.nav a:hover { color: var(--fg-1); text-decoration: none; }
.nav a.active {
  background: var(--pro-surface2); color: var(--fg-1); font-weight: 500;
}
.main {
  display: flex; flex-direction: column; min-width: 0;
}
.topbar {
  min-height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; border-bottom: 1px solid var(--pro-border);
  background: rgba(10,10,15,0.72); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 5;
}
.topbar h1 {
  font-size: 17px; font-weight: 600; margin: 0;
  letter-spacing: -0.01em; color: var(--fg-1);
}
.content { padding: 28px; max-width: 1200px; width: 100%; }
.card {
  background: var(--pro-surface); border: 1px solid var(--pro-border);
  border-radius: 12px; padding: 20px; margin-bottom: 16px;
}
.card h2 {
  font-size: 15px; font-weight: 600; margin: 0 0 14px;
  color: var(--fg-1); letter-spacing: -0.01em;
}
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.kpi {
  background: var(--pro-surface2); border: 1px solid var(--pro-border);
  border-radius: 8px; padding: 14px;
}
.kpi-label {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--fg-3); margin-bottom: 6px;
}
.kpi-value { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px;
  padding: 0 10px; border-radius: 999px; font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: 0.04em;
  text-transform: uppercase; border: 1px solid var(--pro-border);
}
.pill--success { color: var(--mint-400); border-color: var(--mint-700); background: rgba(28,186,153,0.12); }
.pill--warning { color: #e8b658; border-color: #8a6314; background: rgba(212,150,31,0.14); }
.pill--danger { color: #ec7a8c; border-color: #9c2e44; background: rgba(217,69,96,0.14); }
.pill--info { color: #6ba9e3; border-color: #1f5aa1; background: rgba(59,130,212,0.14); }
.pill--neutral { color: var(--fg-3); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--pro-border);
}
th {
  color: var(--fg-3); font-family: var(--font-mono); font-weight: 500;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
}
tr:last-child td { border-bottom: none; }
/* Clickable list rows — standard hover + chevron treatment across
   Transactions, Buyers, Platform log, and the buyer-detail tx table. */
tr.row-link, .row-link {
  cursor: pointer;
  transition: background-color 100ms ease;
}
tr.row-link:hover, tr.row-link:hover > td,
.row-link:hover { background: var(--pro-surface2); }
.row-chev {
  color: var(--fg-3);
  text-align: right;
  font-family: var(--font-mono);
  font-size: 14px;
  padding-right: 14px;
  width: 1%;
  white-space: nowrap;
}
.list-actions {
  padding: 14px;
  text-align: center;
  border-top: 1px solid var(--pro-border);
  background: var(--pro-bg);
}
.list-actions .dim { font-size: 11.5px; }
/* Inline filter forms — overrides the global select/input width:100%
   that's appropriate for stacked forms (login, refund) but expands
   selects to full row width when used inside a flex filter row.
   The search input keeps its inline flex:1 grow; other controls hug
   their content. */
.filter-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.filter-form select,
.filter-form .input:not(.filter-form__grow) {
  width: auto;
  min-width: 140px;
}
.filter-form__grow { flex: 1 1 240px; min-width: 200px; max-width: 460px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 120ms ease;
  border: 1px solid var(--pro-border); background: var(--pro-surface2);
  color: var(--fg-1); font-family: var(--font-sans);
}
.btn:hover { border-color: var(--pro-border-hi); }
.btn--primary {
  background: var(--mint-500); border-color: var(--mint-500); color: var(--pro-bg);
  font-weight: 600;
}
.btn--primary:hover { background: var(--mint-400); border-color: var(--mint-400); }
.input, select, textarea {
  background: var(--pro-bg); border: 1px solid var(--pro-border); border-radius: 6px;
  color: var(--fg-1); padding: 8px 10px; font-size: 13px; font-family: var(--font-sans);
  width: 100%;
}
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--mint-500); }
.row { display: flex; gap: 12px; align-items: center; }
.dim { color: var(--fg-3); }

/* The sign-in and invite pages (provider-full login.css). */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-size: 18px;
  font-weight: 600;
}
.login-brand .tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border: 1px solid var(--pro-border);
  border-radius: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.login-card h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.login-card p { color: var(--fg-3); margin: 0 0 24px; font-size: 14px; }
.error {
  background: rgba(217,69,96,0.14);
  border: 1px solid #9c2e44;
  color: #ec7a8c;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
}
#status {
  margin-top: 14px;
  font-size: 13px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* The console's own additions. */
.sidebar-account {
  margin-top: auto; padding: 14px; border-top: 1px solid var(--pro-border);
}
.sidebar-account .mono { display: block; font-size: 11.5px; color: var(--mint-400); margin-top: 6px; }
.sidebar-account .links { display: flex; gap: 12px; align-items: center; margin-top: 8px; font-size: 12px; }
.sidebar-account form { margin: 0; }
.link-button {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--fg-3);
}
.link-button:hover { color: var(--fg-1); text-decoration: underline; }
.sidebar-account a.active { color: var(--fg-1); font-weight: 500; }
.content h2 { font-size: 15px; font-weight: 600; margin: 24px 0 12px; letter-spacing: -0.01em; }
.content h3 { font-size: 14px; font-weight: 600; margin: 20px 0 8px; }
.content > h2:first-child, .card > h2:first-child { margin-top: 0; }
p { margin: 0 0 14px; }
.hint { color: var(--fg-3); }
.refused { color: #ec7a8c; }
label { display: block; font-weight: 500; margin: 0 0 6px; color: var(--fg-1); }
label.inline { display: inline; font-weight: 400; }
input[type="text"], input[type="email"], input[type="url"], input[type="number"] {
  background: var(--pro-bg); border: 1px solid var(--pro-border); border-radius: 6px;
  color: var(--fg-1); padding: 8px 10px; font-size: 13px; font-family: var(--font-sans);
  width: 100%; margin: 0 0 14px;
}
input:focus { outline: none; border-color: var(--mint-500); }
input.code { font-family: var(--font-mono); letter-spacing: 0.2em; text-transform: uppercase; font-size: 18px; }
textarea { margin: 0 0 14px; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 6px; font-size: 13px; font-family: var(--font-sans);
  cursor: pointer; background: var(--mint-500); border: 1px solid var(--mint-500);
  color: var(--pro-bg); font-weight: 600;
}
button:hover { background: var(--mint-400); border-color: var(--mint-400); }
button:disabled { opacity: 0.6; cursor: progress; }
button.secondary { background: var(--pro-surface2); border-color: var(--pro-border); color: var(--fg-1); font-weight: 500; }
button.secondary:hover { border-color: var(--pro-border-hi); }
.login-card button { width: 100%; }
.link-button, .link-button:hover, .login-card .link-button { background: none; border: 0; width: auto; padding: 0; font-weight: 400; }
.login-card .refused { color: #ec7a8c; }
.login-card h1 { font-size: 22px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.02em; }
.signout { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
code { font-family: var(--font-mono); font-size: 0.92em; overflow-wrap: anywhere; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; }
dl { margin: 0 0 14px; }
dt { color: var(--fg-3); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 10px; }
dd { margin: 4px 0 0; }
ol, ul { margin: 0 0 14px; padding-left: 20px; }
.listing { border-top: 1px solid var(--pro-border); padding-top: 12px; margin-top: 12px; }
.empty { color: var(--fg-3); padding: 28px 0; text-align: center; }

@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--pro-border); position: static; height: auto; overflow: visible; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .content { padding: 16px; }
  .topbar { padding: 0 16px; }
}
.topbar h1 { overflow-wrap: anywhere; padding: 14px 0; }

/* Transactions, Customers, Reviews and Email (console package 6). */
.card > table { margin: 0 -20px; width: calc(100% + 40px); }
.card > table th:first-child, .card > table td:first-child { padding-left: 20px; }
.card > .list-actions { margin: 0 -20px -20px; border-radius: 0 0 12px 12px; }
.list-actions .btn { margin-left: 10px; }
td.empty { padding: 28px 12px; }
td.nowrap, td.mono.dim { white-space: nowrap; }
.row.pills { gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.filter-note { gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.back { margin-bottom: 14px; }
.nav-badge { margin-left: auto; height: 18px; padding: 0 7px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
@media (max-width: 720px) {
  .card { overflow-x: auto; }
}
/* Services and the profile form (provider-full services.css,
   service-workspace.css and service-controls.css, adapted). */
.services-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.card.services-table-card { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
.services-table { min-width: 760px; }
.workspace-table { min-width: 560px; }
.services-table th, .workspace-table th { padding: 10px 16px; font-size: 10px; letter-spacing: 0.08em; white-space: nowrap; }
.services-table td, .workspace-table td { padding: 12px 16px; vertical-align: middle; }
.number-cell { text-align: right; white-space: nowrap; }
.service-row-title { display: inline-block; margin-bottom: 2px; color: var(--fg-1); font-size: 13.5px; font-weight: 600; }
.service-row-title:hover { color: var(--mint-400); }
.service-row-meta { color: var(--fg-3); font-size: 11px; }
.services-empty { padding: 28px; text-align: center; }
.services-empty p { margin: 0; }
.services-back { display: inline-flex; margin: 0 0 14px; color: var(--fg-3); font-size: 12.5px; }
.services-back:hover { color: var(--fg-1); text-decoration: none; }
.services-publish-all { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.service-actions { white-space: nowrap; }
.service-actions .hint { white-space: normal; font-size: 12px; }
.inline-form { display: inline-flex; margin: 0; }
.service-controls-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.card.workspace-card { padding: 18px; border-radius: 10px; }
.settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.settings-form input[type="text"], .settings-form input[type="url"], .settings-form input[type="email"], .settings-form textarea { margin: 0; }
.field-group { min-width: 0; margin: 0; font-weight: 400; }
.full-field { grid-column: 1 / -1; }
.field-label {
  display: block; margin-bottom: 6px; color: var(--fg-3); font-family: var(--font-mono);
  font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
}
.field-hint { display: block; margin-top: 5px; color: var(--fg-3); font-size: 11.5px; line-height: 1.55; }
.field-error { display: block; margin-top: 5px; font-size: 12px; }
.setting-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; gap: 8px; }
.compact-input { width: 120px; }
.buyer-fields { border: 1px solid var(--pro-border); border-radius: 8px; padding: 14px; margin: 0; }
.buyer-fields legend { padding: 0 6px; color: var(--fg-1); font-weight: 600; }
.buyer-field {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 10px; align-items: end;
  padding: 12px 0; border-top: 1px solid var(--pro-border);
}
.buyer-field.has-error { border-left: 2px solid #9c2e44; padding-left: 10px; }
.buyer-field-required { display: flex; align-items: center; gap: 6px; padding-bottom: 8px; white-space: nowrap; }
.buyer-field-required input { width: auto; margin: 0; }
@media (max-width: 760px) {
  .settings-form, .buyer-field { grid-template-columns: 1fr; }
}
/* Activate on-chain (D48): the readiness panel on Services. */
.readiness { list-style: none; margin: 0 0 16px; padding: 0; }
.readiness-item {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 10px 0; border-top: 1px solid var(--pro-border);
}
.readiness-item:first-child { border-top: 0; }
.readiness-item .pill { justify-self: start; }
.readiness-item p { margin: 0 0 8px; }
.order-emails { margin: 6px 0 8px; padding-left: 18px; }
.activation-calls { margin: 0 0 16px; padding-left: 20px; color: var(--fg-1); }
/* One service's page (HOSTED-53): the header, its numbers, the tabs and the
   Overview, from provider-full service-workspace.css, adapted. */
.service-workspace { max-width: 1240px; }
.card.service-hero { padding: 20px; border-radius: 10px; }
.service-identity-row { display: flex; align-items: flex-start; gap: 16px; }
.service-mark {
  display: flex; flex: 0 0 46px; align-items: center; justify-content: center; width: 46px; height: 46px;
  color: var(--mint-400); background: var(--pro-surface2); border: 1px solid var(--pro-border); border-radius: 10px;
  font-family: var(--font-mono); font-size: 18px; font-weight: 600;
}
.service-identity { flex: 1; min-width: 0; }
.service-title-line, .service-identity-meta { display: flex; align-items: center; flex-wrap: wrap; }
.service-title-line { gap: 10px; margin-bottom: 6px; }
.service-title-line h2 { margin: 0; color: var(--fg-1); font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }
.service-identity-meta { gap: 14px; color: var(--fg-3); font-size: 11.5px; }
.service-hero-actions { display: flex; flex-shrink: 0; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; max-width: 50%; }
.service-hero-actions .hint { font-size: 12px; }
.service-sales-form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.sales-state { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-3); font-size: 12px; white-space: nowrap; }
.sales-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fg-3); }
.sales-state--on::before { background: var(--mint-400); }
.sales-state--off { color: #e8b658; }
.sales-state--off::before { background: #e8b658; }
.service-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--pro-border);
}
.service-kpis > div, .service-kpis strong, .service-kpis span { display: block; }
.service-kpis .mono-caption { margin-bottom: 4px; }
.service-kpis strong { font-size: 18px; letter-spacing: -0.015em; }
.workspace-tabs { display: flex; gap: 4px; margin: 16px 0; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--pro-border); }
.workspace-tab {
  flex: 0 0 auto; margin-bottom: -1px; padding: 10px 14px; color: var(--fg-3);
  border-bottom: 2px solid transparent; font-size: 13px;
}
.workspace-tab:hover { color: var(--fg-1); text-decoration: none; }
.workspace-tab.active { color: var(--fg-1); border-color: var(--mint-400); font-weight: 500; }
.workspace-stack { display: flex; flex-direction: column; gap: 16px; }
.workspace-stack > .card, .workspace-stack > p { margin: 0; }
.workspace-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; margin-bottom: 10px; }
.workspace-copy, .service-description { max-width: 760px; margin: 0 0 14px; color: var(--fg-1); font-size: 13.5px; line-height: 1.6; }
.service-description { white-space: pre-line; }
.workspace-note { max-width: 760px; margin: 10px 0 0; color: var(--fg-3); font-size: 11.5px; line-height: 1.55; }
.service-metadata-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 14px;
  background: var(--pro-surface2); border: 1px solid var(--pro-border); border-radius: 8px;
}
.metadata-value { display: block; overflow: hidden; color: var(--fg-1); font-size: 12.5px; text-overflow: ellipsis; }
.flash { margin: 0 0 14px; padding: 11px 14px; border: 1px solid; border-radius: 8px; font-size: 13px; }
.flash--success { color: var(--mint-400); background: rgba(28,186,153,0.12); border-color: var(--mint-700); }
@media (max-width: 1000px) {
  .service-identity-row { flex-wrap: wrap; }
  .service-hero-actions { width: 100%; max-width: none; justify-content: flex-start; padding-left: 62px; }
  .service-metadata-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .service-hero-actions { padding-left: 0; }
  .service-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-metadata-grid { grid-template-columns: 1fr; }
}
/* Hidden means hidden, whatever display a rule gives the element (the Guide's Publish button). */
[hidden] { display: none !important; }
/* The Guide's chat (D62), laid out as Blue T's operator chat: on the page itself, with no card
   around it (HOSTED-60). The page scrolls as a whole; the box to type in stays at the bottom of
   the window (HOSTED-56). */
.chat { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.chat-log { display: flex; flex-direction: column; gap: 10px; min-height: 240px; padding: 8px 0 2px; }
.chat-message { display: flex; }
.chat-message--provider { justify-content: flex-end; }
.chat-bubble {
  max-width: 80%; padding: 10px 14px; border-radius: 10px; background: var(--pro-surface2);
  border: 1px solid var(--pro-border); color: var(--fg-1); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.chat-message--provider .chat-bubble { background: rgba(28,186,153,0.12); border-color: var(--mint-700); }
.chat-message--waiting .chat-bubble { color: var(--fg-3); }
.chat-bubble .btn { margin-top: 4px; }
.chat-form {
  display: flex; gap: 10px; align-items: flex-end;
  position: sticky; bottom: 0; z-index: 4;
  background: var(--pro-bg); padding: 14px 0; border-top: 1px solid var(--pro-border);
}
.chat-form textarea { flex: 1; margin: 0; resize: vertical; min-height: 44px; }
@media (max-width: 760px) {
  .chat-bubble { max-width: 92%; }
  .chat-form { flex-direction: column; align-items: stretch; }
}
