/* Shared components for the upgraded owner portal and client dashboard (added 2026-11).
   Uses the colours of theme.css so old and new pages look like one product. */
.pro-card { background: rgba(18, 16, 28, .92); border: 1px solid var(--line, #2e2340); border-radius: 14px; padding: 1.1rem 1.25rem; }
.pro-card h3 { font-weight: 600; font-size: .95rem; color: var(--text, #f7f4fb); }
.pro-sub { font-size: .75rem; color: var(--muted, #aaa4b7); }
.pro-kpi { display: flex; flex-direction: column; gap: .2rem; }
.pro-kpi .label { font-size: .72rem; letter-spacing: .02em; color: var(--muted, #aaa4b7); text-transform: uppercase; }
.pro-kpi .value { font-size: 1.7rem; font-weight: 700; color: var(--text, #f7f4fb); font-variant-numeric: tabular-nums; line-height: 1.15; }
.pro-kpi .meta { font-size: .75rem; color: var(--muted, #aaa4b7); }
.pro-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pro-grid-2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.pro-badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.pro-badge::before { content: ''; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; }
.pro-badge.ok { color: #6ee7a8; background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .35); }
.pro-badge.warn { color: #fcd34d; background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); }
.pro-badge.err { color: #fca5a5; background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .35); }
.pro-badge.info { color: #93c5fd; background: rgba(59, 130, 246, .12); border-color: rgba(59, 130, 246, .35); }
.pro-badge.muted { color: #c4bdd2; background: rgba(148, 130, 170, .1); border-color: rgba(148, 130, 170, .3); }
.pro-badge.brand { color: #e9c7ff; background: rgba(168, 85, 247, .15); border-color: rgba(168, 85, 247, .4); }

.pro-table { width: 100%; font-size: .84rem; border-collapse: collapse; }
.pro-table th { text-align: left; font-weight: 500; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted, #aaa4b7); padding: .55rem .6rem; border-bottom: 1px solid var(--line, #2e2340); white-space: nowrap; }
.pro-table td { padding: .6rem; border-bottom: 1px solid rgba(46, 35, 64, .6); vertical-align: top; color: #e7e2ef; }
.pro-table tr.click:hover td { background: rgba(168, 85, 247, .06); cursor: pointer; }
.pro-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pro-scroll { overflow-x: auto; }

.pro-input, .pro-select, .pro-textarea { width: 100%; background: rgba(8, 7, 13, .6); border: 1px solid var(--line, #2e2340); border-radius: 10px; padding: .5rem .7rem; font-size: .85rem; color: var(--text, #f7f4fb); }
.pro-input:focus, .pro-select:focus, .pro-textarea:focus { outline: none; border-color: #a855f7; box-shadow: 0 0 0 3px rgba(168, 85, 247, .2); }
.pro-select option { background: #12101c; color: #f7f4fb; }
.pro-label { display: block; font-size: .72rem; color: var(--muted, #aaa4b7); margin-bottom: .25rem; }
.pro-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 10px; font-size: .82rem; font-weight: 600; border: 1px solid var(--line, #2e2340); background: rgba(26, 21, 38, .9); color: var(--text, #f7f4fb); cursor: pointer; transition: background .15s, border-color .15s; }
.pro-btn:hover:not(:disabled) { border-color: #a855f7; background: rgba(168, 85, 247, .15); }
.pro-btn:disabled { opacity: .5; cursor: not-allowed; }
.pro-btn.primary { background: linear-gradient(180deg, #b26bff, #9333ea); border-color: #9333ea; color: #fff; }
.pro-btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.pro-btn.danger { color: #fca5a5; }
.pro-btn.danger:hover:not(:disabled) { border-color: #ef4444; background: rgba(239, 68, 68, .12); }
.pro-btn.sm { padding: .25rem .6rem; font-size: .75rem; }

.pro-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pro-tabs button { padding: .4rem .85rem; border-radius: 999px; font-size: .8rem; border: 1px solid var(--line, #2e2340); color: #d6cfe3; }
.pro-tabs button.on { background: #a855f7; border-color: #a855f7; color: #fff; }

/* Bar chart: one hue, labelled values, accessible title on every bar. */
.pro-bars { display: flex; align-items: flex-end; gap: 3px; height: 130px; padding-top: .5rem; }
.pro-bars .bar { flex: 1; min-width: 4px; display: flex; flex-direction: column-reverse; border-radius: 3px 3px 0 0; overflow: hidden; background: rgba(148, 130, 170, .08); height: 100%; }
.pro-bars .seg { width: 100%; }
.pro-bars .seg.a { background: #a855f7; }
.pro-bars .seg.b { background: #f87171; }
.pro-bars .seg.c { background: #fbbf24; }
.pro-bars .seg.d { background: #6ee7a8; }
.pro-axis { display: flex; justify-content: space-between; font-size: .68rem; color: var(--muted, #aaa4b7); margin-top: .3rem; }
.pro-legend { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .72rem; color: var(--muted, #aaa4b7); }
.pro-legend i { display: inline-block; width: .6rem; height: .6rem; border-radius: 2px; margin-right: .3rem; vertical-align: middle; }

.pro-meter { height: 8px; border-radius: 999px; background: rgba(148, 130, 170, .15); overflow: hidden; }
.pro-meter > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #9333ea, #c06bff); transition: width .4s; }

.pro-steps li { display: flex; gap: .65rem; align-items: flex-start; padding: .45rem 0; font-size: .85rem; }
.pro-steps .dot { flex: none; width: 1.35rem; height: 1.35rem; border-radius: 50%; display: grid; place-items: center; font-size: .65rem; border: 1px solid var(--line, #2e2340); color: var(--muted, #aaa4b7); }
.pro-steps .done .dot { background: #10b981; border-color: #10b981; color: #fff; }

.pro-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; background: rgba(0, 0, 0, .6); overflow-y: auto; }
.pro-modal > div { width: 100%; max-width: 640px; background: #12101c; border: 1px solid var(--line, #2e2340); border-radius: 16px; padding: 1.25rem; }
.pro-note { font-size: .78rem; color: #c9c1d8; background: rgba(59, 130, 246, .08); border: 1px solid rgba(59, 130, 246, .25); border-radius: 10px; padding: .6rem .8rem; }
.pro-empty { text-align: center; padding: 2rem 1rem; color: var(--muted, #aaa4b7); font-size: .85rem; }

/* ---------- Marketplace hub ("channel map"), client dashboard + owner portal ----------
   Dark "control room" canvas matching the dashboard: glowing grid, glass channel cards with neon edges,
   a glowing Elytelecom core in the middle and animated data lines. */
.hub { position: relative; height: 660px; border-radius: 18px; overflow: hidden; color: var(--text, #f7f4fb);
  border: 1px solid rgba(168, 85, 247, .28);
  background:
    radial-gradient(ellipse at 50% 50%, rgba(147, 51, 234, .22) 0, transparent 45%),
    radial-gradient(ellipse at 85% 10%, rgba(236, 56, 213, .10) 0, transparent 35%),
    linear-gradient(rgba(168, 85, 247, .07) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(168, 85, 247, .07) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(180deg, #0d0a16, #08070d);
  box-shadow: inset 0 0 60px rgba(147, 51, 234, .12), 0 0 40px rgba(156, 55, 213, .08); }
.hub::before { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(192, 107, 255, .7), transparent) top / 100% 1px no-repeat; }
.hub-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hub-lines line { stroke: rgba(192, 132, 252, .45); stroke-width: 1.3; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; animation: hub-flow 1.6s linear infinite; }
.hub-lines line.ok { stroke: #34d399; }
.hub-lines line.error { stroke: #f87171; }
@keyframes hub-flow { to { stroke-dashoffset: -16; } }
@media (prefers-reduced-motion: reduce) { .hub-lines line { animation: none; } }
.hub-node { position: absolute; transform: translate(-50%, -50%); }
.hub-center { width: 300px; border-radius: 16px; color: #fff; overflow: hidden; position: relative;
  background: linear-gradient(160deg, rgba(168, 85, 247, .95), rgba(109, 40, 217, .95) 60%, rgba(76, 29, 149, .95));
  border: 1px solid rgba(233, 199, 255, .45);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, .12), 0 0 40px rgba(168, 85, 247, .45), inset 0 1px 0 rgba(255, 255, 255, .35); }
.hub-center .top { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 1.4rem 1rem; font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; text-shadow: 0 0 18px rgba(255, 255, 255, .35); }
.hub-center .top img { width: 38px; height: 38px; background: #fff; border-radius: 9px; padding: 3px; box-shadow: 0 0 16px rgba(255, 255, 255, .35); }
.hub-center .stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(255, 255, 255, .2); background: rgba(8, 7, 13, .18); }
.hub-center .stats > div { padding: .8rem .5rem; text-align: center; font-size: .95rem; font-weight: 600; }
.hub-center .stats > div + div { border-left: 1px solid rgba(255, 255, 255, .2); }
.hub-center .stats i { display: block; font-size: 1.25rem; margin-bottom: .3rem; opacity: .95; }
.hub-card { width: 178px; border-radius: 14px; cursor: pointer; text-align: left; color: var(--text, #f7f4fb); overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 24, 46, .92), rgba(18, 16, 28, .92));
  border: 1px solid var(--line, #2e2340);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .05);
  transition: transform .15s, box-shadow .15s, border-color .15s; }
.hub-card:hover, .hub-card:focus-visible { transform: translate(-50%, -50%) scale(1.04); border-color: rgba(192, 107, 255, .75); box-shadow: 0 0 0 1px rgba(168, 85, 247, .35), 0 10px 30px -5px rgba(168, 85, 247, .45); outline: none; }
.hub-card .logo { position: relative; height: 62px; display: flex; align-items: center; justify-content: center; padding: .6rem .9rem; border-bottom: 1px solid var(--line, #2e2340); background: radial-gradient(ellipse at 50% 0%, rgba(168, 85, 247, .12), transparent 70%); }
.hub-card .logo img { max-height: 34px; max-width: 100%; }
.hub-card .dot { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #4b3f5e; }
.hub-card .dot.ok { background: #10b981; box-shadow: 0 0 8px #10b981; }
.hub-card .dot.warn { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.hub-card .dot.error { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.hub-card .row { display: flex; align-items: center; justify-content: center; gap: .45rem; font-size: .72rem; color: #d5d0df; padding: .42rem .4rem; border-bottom: 1px solid rgba(46, 35, 64, .7); font-variant-numeric: tabular-nums; }
.hub-card .row i { color: #c98bff; font-size: .7rem; }
.hub-card .split { display: grid; grid-template-columns: 1fr 1fr; padding: 0; border-bottom: 0; }
.hub-card .split > span { padding: .42rem .4rem; text-align: center; }
.hub-card .split > span + span { border-left: 1px solid rgba(46, 35, 64, .7); }
.hub-card .bad { color: #fca5a5; font-weight: 700; }
.hub-card.off { opacity: .55; }
.hub-card.off .row { color: #9d96ad; }
.hub-card.off .row i { color: #7c7290; }
.hub-card .connect { display: block; text-align: center; font-size: .72rem; font-weight: 600; color: #e9c7ff; padding: .55rem .4rem; }
.hub-shop { width: 185px; border-radius: 14px; padding: 1rem 1.2rem; color: var(--text, #f7f4fb);
  background: linear-gradient(180deg, rgba(30, 24, 46, .92), rgba(18, 16, 28, .92)); border: 1px solid var(--line, #2e2340);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.hub-shop h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: .45rem; color: var(--text, #f7f4fb); }
.hub-shop li { font-size: .76rem; color: #d5d0df; padding: .12rem 0; list-style: disc; margin-left: 1rem; }
.hub-shop li::marker { color: #a855f7; }
.hub-shop li button { color: #d5d0df; text-decoration: none; }
.hub-shop li button:hover { color: #e9c7ff; text-decoration: underline; }
.hub-add { display: inline-flex; align-items: center; gap: .4rem; color: #fff; font-size: .78rem; font-weight: 700; padding: .55rem 1.05rem; border-radius: 999px; white-space: nowrap;
  background: linear-gradient(180deg, #b26bff, #9333ea); border: 1px solid rgba(233, 199, 255, .4);
  box-shadow: 0 0 18px rgba(168, 85, 247, .45), inset 0 1px 0 rgba(255, 255, 255, .3); }
.hub-add:hover { filter: brightness(1.1); }
.hub-legend { display: flex; flex-wrap: wrap; gap: .9rem; position: absolute; left: 14px; top: 8px; font-size: .68rem; color: var(--muted, #aaa4b7); }
.hub-legend i { margin-right: .25rem; color: #c98bff; }
.hub-logo-lg { height: 40px; background: rgba(26, 21, 38, .9); border: 1px solid var(--line, #2e2340); border-radius: 10px; padding: 6px 12px; }
/* Narrow containers (phones, tablets, dashboard with sidebar): stacked grid instead of the map. */
.hub-wrap { container-type: inline-size; }
@container (max-width: 860px) {
  .hub { height: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .8rem; padding: 1rem 1rem 2.4rem; }
  .hub-lines { display: none; }
  .hub-node { position: static; transform: none; }
  .hub-card { width: auto; }
  .hub-card:hover, .hub-card:focus-visible { transform: scale(1.02); }
  .hub-center, .hub-shop { grid-column: 1 / -1; width: auto; }
  .hub-center { order: -2; } .hub-shop { order: -1; }
  .hub-add-wrap { grid-column: 1 / -1; }
  .hub-legend { top: auto; bottom: 10px; }
}

/* AI Sales Prospecting → Email Account Settings: sending-method choice cards */
.pro-method { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pro-method button { text-align: left; padding: .85rem 1rem; border-radius: 14px; border: 1px solid var(--line, #2e2340); background: rgba(18, 16, 28, .85); color: inherit; transition: border-color .15s, box-shadow .15s; }
.pro-method button:hover { border-color: rgba(168, 85, 247, .55); }
.pro-method button.on { border-color: #a855f7; box-shadow: 0 0 0 1px #a855f7, 0 0 18px rgba(168, 85, 247, .25); }
.pro-method h4 { font-size: .9rem; font-weight: 600; margin: 0 0 .25rem; display: flex; gap: .5rem; align-items: center; }
.pro-method p { font-size: .75rem; color: var(--muted, #aaa4b7); margin: 0; }
.pro-warn { font-size: .78rem; color: #fde68a; background: rgba(245, 158, 11, .08); border: 1px solid rgba(245, 158, 11, .3); border-radius: 10px; padding: .6rem .8rem; }

/* ---------- Owner sidebar groups ---------- */
.nav-group { padding: 1rem 1rem .3rem; font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #8f88a0); }
.nav-group.first { padding-top: .2rem; }

/* ---------- System health (green circle = healthy) ---------- */
.health-dot { position: relative; display: inline-block; flex: none; width: 1rem; height: 1rem; border-radius: 50%; background: #9ca3af; }
.health-dot.sm { width: .6rem; height: .6rem; }
.health-dot.lg { width: 4.5rem; height: 4.5rem; display: grid; place-items: center; color: #06140c; font-size: 1.6rem; }
.health-dot.ok { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .18), 0 0 18px rgba(34, 197, 94, .55); }
.health-dot.warning { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245, 158, 11, .18), 0 0 18px rgba(245, 158, 11, .5); }
.health-dot.problem { background: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .2), 0 0 18px rgba(239, 68, 68, .55); color: #fff; }
.health-dot.ok::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #22c55e; animation: health-pulse 2.2s ease-out infinite; }
@keyframes health-pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .health-dot.ok::after { animation: none; } }
.health-chart { width: 100%; height: 150px; display: block; }
.health-chart .grid { stroke: rgba(148, 130, 170, .18); stroke-width: 1; }
.health-chart .line { fill: none; stroke: #22c55e; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.health-chart .area { fill: rgba(34, 197, 94, .12); }
.health-chart .bar.ok { fill: rgba(34, 197, 94, .7); }
.health-chart .bar.err { fill: rgba(239, 68, 68, .85); }
.health-chart .pt.ok { fill: #22c55e; } .health-chart .pt.warning { fill: #f59e0b; } .health-chart .pt.problem { fill: #ef4444; }
.health-check { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line, #2e2340); font-size: .85rem; }
.health-check:last-child { border-bottom: 0; }
