/* Gab Process UI — aligned with gab-pro (HYDRA) public styling */

:root {
  --gp-ink: #383c43;
  --gp-muted: #555;
  --gp-navbar-bg: #fbfbfb;
  --gp-navbar-border: #eee;
  --gp-green: #3bcd80;
  --gp-green-hover: #378e61;
  --gp-pro-badge-bg: #fed632;
  --gp-pro-badge-text: #222;
  --gp-sidebar-bg: #f8f9fa;
  --gp-pill-active: #666;
  --gp-card-header: #ddd;
  --gp-line: #e5e7eb;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.hydra {
  margin: 0;
  min-height: 100vh;
  font-family:
    system-ui,
    -apple-system,
    blinkmacsystemfont,
    "Segoe UI",
    roboto,
    ubuntu,
    "Helvetica Neue",
    sans-serif;
  color: var(--gp-ink);
  background: #fff;
  font-size: 16px;
  line-height: 1.55;
}

/* —— Top navbar (gab-pro navbar + PRO badge) —— */

.gp-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 16px;
  background: var(--gp-navbar-bg);
  border-bottom: 1px solid var(--gp-navbar-border);
}

.gp-navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1255px;
  margin: 0 auto;
  gap: 16px;
}

.gp-navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gp-green) !important;
  font-weight: 600;
  font-size: 1rem;
}

.gp-navbar-brand img {
  display: block;
  height: 30px;
  width: auto;
}

.gp-pro-highlight {
  color: var(--gp-pro-badge-text);
  background-color: var(--gp-pro-badge-bg);
  border-radius: 4px;
  padding: 4px 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.gp-navbar-tagline {
  color: var(--gp-ink);
  font-size: 0.95rem;
  font-weight: 500;
}

@media (max-width: 767px) {
  .gp-hidden-xs {
    display: none !important;
  }
}

.gp-navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gp-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 2px solid var(--gp-green);
  border-radius: 8px;
  background: transparent;
  color: var(--gp-green) !important;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.gp-btn-outline:hover {
  background: rgba(59, 205, 128, 0.08);
}

/* —— Admin shell: sidebar + main (grid matches gab-pro admin layout) —— */

.gp-admin-wrap {
  display: grid;
  min-height: calc(100vh - 58px);
  grid-template-columns: 1fr;
  grid-template-areas:
    "main"
    "sidebar";
}

@media (min-width: 992px) {
  .gp-admin-wrap {
    grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
    grid-template-areas: "sidebar main";
  }
}

.gp-sidebar {
  grid-area: sidebar;
  background: var(--gp-sidebar-bg);
  border-bottom: 1px solid var(--gp-navbar-border);
  padding: 12px 0 20px;
}

@media (min-width: 992px) {
  .gp-sidebar {
    border-bottom: none;
    border-right: 1px solid var(--gp-navbar-border);
    height: calc(100vh - 58px);
    overflow: auto;
  }
}

.gp-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
}

.gp-sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: #000 !important;
  font-weight: 500;
  font-size: 0.95rem;
}

.gp-sidebar-nav a:hover {
  background: #ddd !important;
}

.gp-sidebar-nav a.is-active {
  color: #fff !important;
  background: var(--gp-pill-active) !important;
  font-weight: 700;
}

.gp-sidebar-nav .gp-nav-icon {
  width: 1.1em;
  text-align: center;
  opacity: 0.85;
}

.gp-admin-main {
  grid-area: main;
  padding: 0;
  min-width: 0;
}

@media (min-width: 992px) {
  .gp-admin-main {
    height: calc(100vh - 58px);
    overflow: auto;
  }
}

.gp-admin-scrolling {
  padding: 24px 20px 48px;
  max-width: 1320px;
}

.gp-admin-scrolling--wide {
  max-width: none;
  width: 100%;
}

@media (min-width: 992px) {
  .gp-admin-scrolling {
    padding: 28px 32px 56px;
  }
}

/* Condensed admin page header (invoice list, etc.) */
.admin-page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 20px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--gp-line);
  border-radius: 8px;
  border-bottom: 3px solid var(--gp-green);
}

.admin-page-header--compact {
  padding: 14px 18px;
  margin-bottom: 16px;
}

.admin-page-header-text {
  flex: 1 1 14rem;
  min-width: 0;
}

.admin-page-header-aside {
  flex: 0 1 22rem;
  font-size: 0.9rem;
}

.admin-page-header-meta {
  margin: 0.4rem 0 0;
}

.admin-page-header-title {
  margin: 0 0 4px;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 700;
}

.admin-page-header-lede {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 52rem;
}

.admin-page-header-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-stat-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid var(--gp-line);
  border-radius: 6px;
  font-size: 0.9rem;
}

.admin-stat-pill--accent {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.admin-stat-label {
  color: var(--gp-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-stat-hint {
  font-size: 0.8rem;
}

.admin-invoices-panel {
  overflow-x: auto;
}

/* Single-column pages (login, checkout) */

.gp-page {
  padding: 24px 16px 56px;
  max-width: 1255px;
  margin: 0 auto;
}

.gp-page--narrow {
  max-width: 720px;
}

/* —— Content blocks (maps prior “hero / panel” components to gab-pro cards) —— */

.hero,
.panel {
  background: #fff;
  border: 1px solid var(--gp-line);
  border-radius: 8px;
  margin-bottom: 24px;
}

.hero {
  padding: 28px 24px;
  border-bottom: 4px solid var(--gp-green);
}

.panel {
  padding: 22px 24px;
}

.hero-grid,
.dashboard-grid,
.grid,
.checkout-layout,
.dashboard-stack,
.checkout-sidebar,
.hero-stats,
.mini-grid,
.stack-form,
.item-builder {
  display: grid;
  gap: 24px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

.dashboard-grid {
  grid-template-columns: minmax(340px, 500px) minmax(0, 1fr);
}

/* Single full-width column: invoice summary moved above; form is no longer beside a sidebar */
.checkout-layout {
  grid-template-columns: minmax(0, 1fr);
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 24px;
}

.mini-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
}

.hero-stats {
  gap: 14px;
}

.dashboard-stack,
.checkout-sidebar {
  align-content: start;
}

.hero-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.hero-copy {
  max-width: 720px;
}

.hero-actions {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.panel-head,
.sub-head,
.invoice-summary,
.item-footer,
.checkout-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.row > label {
  flex: 1 1 180px;
  margin: 0;
}

.row-tight > label {
  flex-basis: 140px;
}

.stat-card,
.mini-card,
.item-row,
.invoice-summary,
.notice {
  border-radius: 8px;
}

.stat-card,
.mini-card {
  padding: 8px 12px;
  background: #fafafa;
  border: 1px solid var(--gp-line);
}

.stat-card.accent {
  background: linear-gradient(180deg, rgba(59, 205, 128, 0.12), #fff);
}

.item-row {
  padding: 12px;
  border: 1px solid var(--gp-line);
  background: #fcfcfc;
}

.invoice-summary {
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(59, 205, 128, 0.1), #fff);
}

.notice {
  padding: 8px 12px;
  border: 1px solid rgba(59, 205, 128, 0.25);
  background: #f9fffc;
}

.item-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.item-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  color: var(--gp-ink);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.1;
}

h2 {
  font-size: 20px;
  line-height: 1.15;
}

h3 {
  font-size: 16px;
}

p,
li,
dd,
dt,
input,
select,
textarea,
button,
.psq-element {
  font-size: 14px;
  line-height: 1.35;
}

.eyebrow,
.stat-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gp-muted);
}

.muted,
small {
  color: var(--gp-muted);
}

small {
  display: block;
  margin-top: 4px;
}

.success {
  color: #166534;
  font-weight: 600;
}

.danger {
  color: #991b1b;
}

.stat-card strong,
.mini-card strong,
.invoice-summary strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
}

.invoice-summary strong {
  font-size: 28px;
}

.price {
  font-size: 40px;
  margin: 8px 0 10px;
  font-weight: 700;
  line-height: 1;
}

label {
  display: block;
  margin-bottom: 12px;
  color: var(--gp-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

[hidden] {
  display: none !important;
}

input,
select,
textarea,
button,
.psq-element {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #fff;
  color: var(--gp-ink);
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--gp-green);
  box-shadow: 0 0 0 3px rgba(59, 205, 128, 0.2);
}

.psq-element {
  min-height: 48px;
  display: flex;
  align-items: center;
}

button {
  background: var(--gp-green);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

button:hover:not([disabled]) {
  background: var(--gp-green-hover);
}

button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-secondary {
  background: rgba(59, 205, 128, 0.15);
  color: #2a8f59;
}

.button-inline {
  width: auto;
  min-width: 100px;
}

.button-link,
.back-link,
.link-danger {
  text-decoration: none;
  font-weight: 600;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(59, 205, 128, 0.12);
  color: #2a6f4a;
}

.back-link {
  color: var(--gp-muted);
}

.link-danger {
  color: #c0264a;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--gp-line);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gp-muted);
  background: #f3f4f6;
}

tbody tr:hover {
  background: #fafafa;
}

.badge,
.chip,
.scope-chip,
.line-total,
.step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge {
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.chip,
.scope-chip,
.line-total {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59, 205, 128, 0.15);
  color: #2a6f4a;
  font-size: 11px;
  font-weight: 600;
}

.scope-chip {
  margin: 0 6px 6px 0;
}

.line-total {
  min-width: 88px;
  font-size: 13px;
}

.chip.muted {
  background: #f3f4f6;
  color: var(--gp-muted);
}

.timeline,
.item-list,
.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline li {
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fafafa;
  border: 1px solid var(--gp-line);
}

.item-list li,
.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gp-line);
}

.item-list li:last-child,
.summary-list li:last-child {
  border-bottom: none;
}

.meta div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.meta dt {
  color: var(--gp-muted);
}

.checkbox-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.checkbox-card {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fafafa;
  border: 1px solid var(--gp-line);
  color: var(--gp-ink);
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
}

.checkbox-card input {
  width: auto;
  margin: 0;
  accent-color: var(--gp-green);
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 14px;
  border-radius: 8px;
  background: #1e2930;
  color: #ecfdf5;
  overflow: auto;
}

code {
  font-family: "Cascadia Code", consolas, monospace;
  font-size: 14px;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #f3f4f6;
}

.step {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #e5e7eb;
  color: var(--gp-muted);
  font-weight: 700;
  font-size: 14px;
}

.step.active {
  background: var(--gp-green);
  color: #fff;
}

.step-line {
  width: 36px;
  height: 1px;
  background: #d1d5db;
}

.total-panel {
  background: linear-gradient(180deg, #47d695, var(--gp-green));
  color: #fff;
}

.total-panel .eyebrow,
.total-panel .muted,
.total-panel .price {
  color: #fff;
}

.total-panel .summary-list li {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.checkout-actions button {
  width: auto;
  min-width: 140px;
}

.checkout-status {
  margin: 4px 0 0;
  min-height: 22px;
}

[data-role="checkout-status"][data-tone="error"] {
  color: #fecaca;
  font-weight: 600;
}

[data-role="checkout-status"][data-tone="success"] {
  color: #bbf7d0;
  font-weight: 600;
}

a {
  color: #2a8f59;
}

a:hover {
  color: var(--gp-green-hover);
}

@media (max-width: 980px) {
  .hero-grid,
  .dashboard-grid,
  .checkout-layout,
  .item-grid,
  .item-footer {
    grid-template-columns: 1fr;
  }

  .hero-split {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    justify-items: start;
  }
}

/* Public landing (/) — gab-pro jumbotron + card feel */

.gp-landing-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 72px;
}

.gp-landing-shell {
  overflow: hidden;
  border: 1px solid var(--gp-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(56, 60, 67, 0.08);
}

.gp-landing-hero {
  padding: 36px 28px 28px;
  border-bottom: 4px solid var(--gp-green);
}

.gp-landing-hero .lede {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--gp-muted);
  font-size: 18px;
  line-height: 1.55;
  font-weight: 500;
}

.gp-landing-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 24px;
}

.gp-landing-card {
  display: block;
  min-height: 200px;
  padding: 22px;
  border: 1px solid var(--gp-line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease;
}

.gp-landing-card:hover,
.gp-landing-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(59, 205, 128, 0.45);
  box-shadow: 0 16px 36px rgba(56, 60, 67, 0.1);
  outline: none;
}

.gp-landing-card .card-label {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(59, 205, 128, 0.12);
  color: #2a6f4a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.gp-landing-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 600;
  color: var(--gp-ink);
  letter-spacing: -0.02em;
}

.gp-landing-card p {
  margin: 0;
  color: var(--gp-muted);
  line-height: 1.6;
  font-size: 15px;
}

.gp-landing-card strong {
  display: inline-block;
  margin-top: 16px;
  color: var(--gp-green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gp-landing-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px 28px;
  color: var(--gp-muted);
  font-size: 14px;
  line-height: 1.6;
}

.gp-landing-footer a {
  color: #2a8f59;
  text-decoration: none;
  font-weight: 600;
}

/* Admin invoice list — search & filters */
.invoice-search-form {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gp-line);
}

.invoice-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.invoice-search-title {
  margin: 0;
  font-size: 1.1rem;
}

.invoice-search-hint {
  margin-top: 0;
  font-size: 0.9rem;
}

.invoice-search-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.invoice-table {
  margin-top: 0;
}

.invoice-customer-cell {
  max-width: 16rem;
  word-break: break-word;
}

.invoice-customer-cell small {
  display: block;
  color: var(--gp-muted);
  margin-top: 2px;
  font-size: 0.85rem;
}

@media (max-width: 860px) {
  .gp-landing-grid {
    grid-template-columns: 1fr;
  }

  .gp-landing-footer {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .gp-admin-scrolling,
  .gp-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero,
  .panel {
    padding: 20px 16px;
  }

  .meta div {
    grid-template-columns: 1fr;
  }

  .checkout-actions,
  .invoice-summary {
    flex-direction: column;
    align-items: stretch;
  }

  .checkout-actions button,
  .button-inline {
    width: 100%;
  }

  .stepper {
    width: 100%;
    justify-content: center;
  }
}
