/*
Theme Name: Orch Suite Portal
Theme URI: https://promptandprosperai.com
Author: Prompt & Prosper
Description: Front door for two tool families — the Claude Orch construction suite (FormWorks, Markup, PlanHub, Takeoff, TwinView, Schedule, Money Maker, Portal) running on a host PC, and Prompt & Prosper's tools (Claude Corp, Dash Data) — in the Prompt & Prosper navy / electric-blue / gold theme. Fully self-contained accounts (independent of WordPress users) with a styled login, and a front-end Console page for host-PC settings, tools & ports, and member management. Bundles the Data Dash member app and serves it at /dash-data/ (portal-gated), so the whole portal deploys as one theme.
Version: 1.6.2
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: orch-portal
*/

/* ============================================================
   Theme tokens — from the promptandprosper.ai theme.
   ============================================================ */
:root {
  --ink: #010810;
  --navy: #041324;
  --navy-panel: #072040;
  --navy-panel-2: #0a2a52;
  --blue-deep: #003DA8;
  --blue: #005CFF;
  --blue-bright: #2B7AFF;
  --sky: #5AAAFF;
  --gold: #FFB648;
  --gold-deep: #E8933A;
  --gold-pale: #FFE4B8;
  --paper: #EDF3FF;
  --text-dim: #9FB6D9;
  --text-mute: #7994BC;
  --line: rgba(90, 170, 255, 0.18);
  --line-strong: rgba(90, 170, 255, 0.32);
  --shadow-glow: 0 0 40px rgba(0, 92, 255, 0.25);
  --green: #5fe0a0;
  --red: #ff7a70;
  --radius: 18px;
  --radius-sm: 10px;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--paper);
  background: linear-gradient(180deg, #010810 0%, #041324 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.55;
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
a { color: var(--sky); text-decoration: none; }
a:hover { color: var(--paper); }
::selection { background: var(--gold); color: #241300; }

.op-wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* Brand */
.op-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.op-brand-word { font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: 0.08em; color: var(--paper); }
.op-brand-word em { font-style: normal; color: var(--gold); }
.op-tagline { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-mute); margin-left: 4px; }

/* Header */
.op-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(4, 19, 36, 0.9), rgba(4, 19, 36, 0.4));
  position: sticky; top: 0; backdrop-filter: blur(8px); z-index: 5;
}
.op-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; }
.op-header-links { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.op-user-pill {
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px;
}
.op-signout {
  background: transparent; color: var(--paper); border: 1.5px solid var(--line-strong);
  border-radius: 10px; padding: 7px 14px; font-size: 13px; font-weight: 600; font-family: var(--body);
  cursor: pointer; text-decoration: none;
}
.op-signout:hover { border-color: var(--gold); color: var(--gold); }

/* Hero */
.op-hero { padding: 48px 0 6px; }
.op-hero h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; color: var(--paper); margin-bottom: 10px; }
.op-accent {
  background: linear-gradient(120deg, var(--sky), var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.op-hero p { margin: 0 0 12px; font-size: 16px; color: var(--text-dim); max-width: 680px; }
.op-hero-rule { font-family: var(--mono); font-size: 12px; color: var(--text-mute); letter-spacing: 0.04em; }
.op-hero-rule strong { color: var(--paper); }

/* Connection banner */
.op-conn {
  margin: 30px 0 4px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(160deg, var(--navy-panel), rgba(4, 19, 36, 0.7));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 12.5px; color: var(--text-dim);
}
.op-conn code { color: var(--gold); background: transparent; font-family: var(--mono); }
.op-text-dim { color: var(--text-mute); }

/* Status dots */
.op-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-mute); flex: 0 0 auto;
  display: inline-block;
}
.op-dot.is-checking { animation: op-pulse 1.2s ease-in-out infinite; }
.op-dot.is-online { background: var(--green); box-shadow: 0 0 8px rgba(95, 224, 160, 0.5); }
.op-dot.is-offline { background: var(--red); }
.op-dot.is-unknown { background: var(--gold); }
@keyframes op-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* Series (tool family) headers */
.op-series-h {
  margin: 34px 0 0;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

/* Grid */
.op-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
  padding: 18px 0 22px;
}
.op-grid:last-of-type { padding-bottom: 60px; }

/* Tiles */
.op-tile {
  --accent: var(--blue);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 9px;
  padding: 22px 20px 18px;
  background: linear-gradient(160deg, var(--navy-panel), rgba(4, 19, 36, 0.7));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--paper);
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  min-height: 138px;
}
.op-tile::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.op-tile:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-glow); color: var(--paper); }
.op-tile--pp { --accent: var(--gold); }
.op-tile.is-featured { border-color: rgba(255, 182, 72, 0.45); box-shadow: 0 0 0 1px rgba(255, 182, 72, 0.35) inset; }
.op-tile-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.op-tile h3 { margin: 0; font-size: 17.5px; color: var(--paper); }
.op-tile p { margin: 0; font-size: 13.5px; color: var(--text-dim); flex: 1; }
.op-tile .op-tile-url {
  font-size: 11.5px; color: var(--text-mute);
  font-family: var(--mono);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.op-badge {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: #241300; background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  border-radius: 20px; padding: 2px 9px; font-weight: 700;
}

/* Locked / setup notices */
.op-notice {
  margin: 40px 0 60px;
  padding: 30px;
  background: linear-gradient(160deg, var(--navy-panel), var(--navy));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glow);
  max-width: 560px;
}
.op-notice h2 { margin-top: 0; color: var(--paper); font-size: 20px; }
.op-notice p { color: var(--text-dim); }
.op-btn {
  display: inline-block; margin-top: 8px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep)); color: #241300 !important;
  padding: 10px 22px; border-radius: 12px; font-family: var(--display); font-weight: 700; font-size: 14px;
  box-shadow: 0 8px 24px rgba(255, 182, 72, 0.28);
}
.op-btn:hover { box-shadow: 0 12px 30px rgba(255, 182, 72, 0.4); }

/* ---------- login ---------- */
.op-login { min-height: calc(100vh - 140px); display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.op-login-card {
  width: 100%; max-width: 400px;
  background: linear-gradient(160deg, var(--navy-panel), var(--navy));
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-glow); padding: 34px 30px 28px;
}
.op-login-card .op-brand { margin-bottom: 22px; }
.op-login-lede {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--text-mute);
  background: rgba(0, 92, 255, 0.08); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 11px; margin-bottom: 18px;
}
.op-login-lede b { color: var(--gold); font-weight: 600; }
.op-login-card label {
  display: block; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-mute); margin: 14px 0 5px;
}
.op-login-card input[type="text"],
.op-login-card input[type="password"] {
  width: 100%; height: 44px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong);
  background: rgba(1, 8, 16, 0.6); padding: 0 13px; font-size: 14.5px; color: var(--paper); outline: none;
  font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
.op-login-card input::placeholder { color: #4b678f; }
.op-login-card input:focus { border-color: var(--blue-bright); box-shadow: 0 0 0 3px rgba(43, 122, 255, 0.18); }
.op-remember {
  display: flex !important; align-items: center; gap: 8px;
  text-transform: none !important; letter-spacing: 0.04em !important; margin-top: 16px !important;
  cursor: pointer;
}
.op-remember input { width: auto; height: auto; }
.op-btn-gold {
  display: inline-block; width: 100%; height: 46px; line-height: 46px; margin-top: 20px; border: none;
  border-radius: 12px; background: linear-gradient(180deg, var(--gold), var(--gold-deep)); color: #241300;
  font-family: var(--display); font-size: 15px; font-weight: 700; cursor: pointer; text-align: center;
  text-decoration: none; box-shadow: 0 8px 24px rgba(255, 182, 72, 0.28); transition: transform 0.12s, box-shadow 0.12s;
  padding: 0;
}
.op-btn-gold:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(255, 182, 72, 0.4); }
.op-err, .op-msg {
  margin-bottom: 4px; font-size: 13px; border-radius: var(--radius-sm); padding: 9px 12px;
}
.op-err { color: #ffd7a1; background: rgba(255, 182, 72, 0.1); border: 1px solid rgba(255, 182, 72, 0.3); }
.op-msg { color: var(--green); background: rgba(95, 224, 160, 0.08); border: 1px solid rgba(95, 224, 160, 0.25); }
.op-login-foot { margin-top: 22px; text-align: center; font-size: 11px; color: var(--text-mute); font-family: var(--mono); }
.op-login-foot a { color: var(--text-dim); }
.op-login-foot a:hover { color: var(--gold); }

/* Iframe overlay */
.op-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--ink);
  display: none; flex-direction: column;
}
.op-overlay.is-open { display: flex; }
.op-overlay-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; background: var(--navy);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.op-overlay-bar .op-overlay-title { color: var(--gold); font-family: var(--display); font-weight: 700; }
.op-overlay-bar button {
  background: none; border: 1.5px solid var(--line-strong); color: var(--paper);
  border-radius: 8px; padding: 4px 14px; cursor: pointer; font-size: 13px; font-family: var(--body);
}
.op-overlay-bar button:hover { border-color: var(--gold); color: var(--gold); }
.op-overlay iframe { flex: 1; border: 0; width: 100%; background: #fff; }

/* ---------- console ---------- */
.op-flash {
  margin: 20px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px;
}
.op-flash-ok { color: var(--green); background: rgba(95, 224, 160, 0.08); border: 1px solid rgba(95, 224, 160, 0.25); }
.op-flash-err { color: #ffd7a1; background: rgba(255, 182, 72, 0.1); border: 1px solid rgba(255, 182, 72, 0.3); }
.op-flash-note { display: block; margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--text-mute); }
.op-invite-url {
  width: 100%; margin-top: 8px; height: 38px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong); background: rgba(1, 8, 16, 0.6);
  padding: 0 11px; font-family: var(--mono); font-size: 12px; color: var(--gold-pale);
}

.op-panel {
  margin: 24px 0 0;
  background: linear-gradient(160deg, var(--navy-panel), rgba(4, 19, 36, 0.7));
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.op-panel:last-of-type { margin-bottom: 60px; }
.op-panel-h { padding: 16px 22px; border-bottom: 1px solid var(--line); }
.op-panel-h h2 { font-size: 17px; color: var(--paper); }
.op-panel-b { padding: 18px 22px 22px; }

.op-fields { display: flex; flex-wrap: wrap; gap: 18px; }
.op-field { min-width: 150px; }
.op-field-wide { flex: 1; min-width: 260px; }
.op-field label, .op-subform label {
  display: block; font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-mute); margin: 0 0 5px;
}
.op-field input[type="text"], .op-subform input[type="text"], .op-subform input[type="email"] {
  width: 100%; height: 40px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong);
  background: rgba(1, 8, 16, 0.6); padding: 0 12px; font-size: 14px; color: var(--paper);
  outline: none; font-family: inherit;
}
.op-field input:focus, .op-subform input:focus { border-color: var(--blue-bright); box-shadow: 0 0 0 3px rgba(43, 122, 255, 0.18); }
.op-radios { display: inline-flex; align-items: center; gap: 14px; height: 40px; font-size: 13.5px; color: var(--text-dim); }
.op-radios label { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: 13.5px; margin: 0; color: var(--text-dim); }
.op-help { font-size: 12.5px; color: var(--text-mute); max-width: 760px; margin: 14px 0 0; }
.op-mini-btn {
  background: transparent; color: var(--paper); border: 1.5px solid var(--line-strong);
  border-radius: 8px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; font-family: var(--body); cursor: pointer;
}
.op-mini-btn:hover { border-color: var(--gold); color: var(--gold); }
#op-test-result { font-family: var(--mono); font-size: 11.5px; margin-left: 6px; }

.op-btn-inline { width: auto; padding: 0 22px; margin-top: 16px; }
.op-btn-danger {
  display: inline-block; height: 46px; line-height: 46px; margin-top: 16px; border: 1.5px solid rgba(255, 122, 112, 0.5);
  border-radius: 12px; background: transparent; color: var(--red);
  font-family: var(--display); font-size: 14px; font-weight: 700; cursor: pointer; padding: 0 22px;
}
.op-btn-danger:hover { background: rgba(255, 122, 112, 0.1); }

.op-table-wrap { overflow-x: auto; margin: 4px 0 0; }
.op-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.op-table th {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-mute); text-align: left;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.op-table td { padding: 10px; border-bottom: 1px solid rgba(90, 170, 255, 0.08); vertical-align: middle; }
.op-table tr:last-child td { border-bottom: 0; }
.op-td-check, .op-th-tool { text-align: center !important; }
.op-td-actions { white-space: nowrap; font-size: 12.5px; }
.op-dim { color: var(--text-mute); }
.mono-sm { font-family: var(--mono); font-size: 11.5px; }
.op-port { width: 78px; height: 34px; text-align: center; border-radius: 8px; border: 1.5px solid var(--line-strong); background: rgba(1, 8, 16, 0.6); color: var(--paper); font-family: var(--mono); font-size: 12.5px; }
.op-url { width: 100%; min-width: 170px; height: 34px; border-radius: 8px; border: 1.5px solid var(--line-strong); background: rgba(1, 8, 16, 0.6); color: var(--paper); font-family: var(--mono); font-size: 12px; padding: 0 10px; }
.op-role-sel, .op-subform select {
  height: 34px; border-radius: 8px; border: 1.5px solid var(--line-strong);
  background: rgba(1, 8, 16, 0.6); color: var(--paper); font-family: var(--body); font-size: 13px; padding: 0 8px;
}
.op-role-chip { font-family: var(--mono); font-size: 11px; color: var(--gold); border: 1px solid rgba(255, 182, 72, 0.35); border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.op-subgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.op-subform h3 { font-size: 15px; color: var(--paper); margin-bottom: 10px; }
.op-subform label { margin-top: 10px; }
.op-subform select { width: 100%; height: 40px; }

/* Generic content (index.php fallback) */
.op-content { padding: 40px 0 80px; }
.op-content h1, .op-content h2 { color: var(--paper); }
.op-content p { color: var(--text-dim); }

/* Footer */
.op-footer {
  border-top: 1px solid var(--line);
  background: rgba(4, 19, 36, 0.6);
  padding: 18px 0; font-family: var(--mono); font-size: 11.5px; color: var(--text-mute);
}

@media (max-width: 640px) {
  .op-header-inner { flex-direction: column; gap: 10px; align-items: flex-start; }
  .op-hero h1 { font-size: 26px; }
  .op-login { min-height: calc(100vh - 200px); }
}
