/*
 * Agent theme — scoped component library for the Agent product pages
 * (account, checkout-success, and the agent sections of the landing page).
 *
 * Deliberately does NOT restyle Bootstrap's .card/.btn/etc globally: those
 * classes are shared with the apprenticeship, legal, and admin pages, so
 * everything here uses an `ag-` prefix and only applies where the markup
 * opts in. Palette keys off the Grayscale theme's teal (#64a19d) pushed
 * toward a more saturated, higher-tech mint/cyan.
 */

:root {
  --ag-bg: #0b1210;
  --ag-panel: rgba(19, 28, 26, 0.72);
  --ag-panel-solid: #131c1a;
  --ag-border: rgba(126, 231, 196, 0.14);
  --ag-border-strong: rgba(126, 231, 196, 0.38);
  --ag-text: #e8f1ee;
  --ag-muted: #93a8a1;
  --ag-accent: #4fd1a5;
  --ag-accent-2: #38b2ac;
  --ag-accent-glow: rgba(79, 209, 165, 0.35);

  /* Secondary palette — gives buttons/badges real color variety beyond mint,
     while staying in the same cool, high-tech family. */
  --ag-violet: #9b8cf2;
  --ag-violet-2: #7c6ce8;
  --ag-violet-glow: rgba(155, 140, 242, 0.35);
  --ag-info: #58b8e8;
  --ag-info-2: #3ea0d4;
  --ag-info-glow: rgba(88, 184, 232, 0.35);
  --ag-danger: #e07a76;
  --ag-danger-2: #d1615c;
  --ag-danger-glow: rgba(224, 122, 118, 0.35);
  --ag-warning: #e4c662;
  --ag-warning-2: #d4b34a;
  --ag-warning-glow: rgba(228, 198, 98, 0.32);
  --ag-slate: #2a3532;
  --ag-slate-2: #1c2523;

  --ag-radius: 14px;
  --ag-radius-sm: 9px;
  --ag-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* ---- Page scaffold ---------------------------------------------------- */

.ag-page {
  color: var(--ag-text);
}

.ag-page-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 2px;
}

.ag-page-sub {
  color: var(--ag-muted);
  font-size: 0.95rem;
}

.ag-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ag-accent);
  margin: 0 0 14px;
}

.ag-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--ag-border-strong), transparent);
}

/* ---- Panels (replaces white .card) ------------------------------------ */

.ag-panel {
  background: var(--ag-panel);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius);
  backdrop-filter: blur(10px);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.ag-panel--hero {
  border-color: var(--ag-border-strong);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(79, 209, 165, 0.10) 0%, transparent 45%),
    var(--ag-panel);
}

.ag-panel--hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ag-accent), var(--ag-accent-2) 55%, transparent);
}

/* ---- Status chips ------------------------------------------------------ */

.ag-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid var(--ag-border-strong);
  color: var(--ag-accent);
  background: rgba(79, 209, 165, 0.08);
  white-space: nowrap;
}

.ag-chip .ag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ag-accent);
  box-shadow: 0 0 8px var(--ag-accent-glow);
}

.ag-chip--muted {
  color: var(--ag-muted);
  border-color: rgba(147, 168, 161, 0.3);
  background: rgba(147, 168, 161, 0.07);
}

.ag-chip--muted .ag-dot {
  background: var(--ag-muted);
  box-shadow: none;
}

.ag-chip--warn {
  color: var(--ag-warning);
  border-color: rgba(228, 198, 98, 0.4);
  background: rgba(228, 198, 98, 0.08);
}

.ag-chip--warn .ag-dot {
  background: var(--ag-warning);
  box-shadow: 0 0 8px rgba(228, 198, 98, 0.35);
}

/* ---- License key display ---------------------------------------------- */

.ag-key {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(6, 12, 10, 0.85);
  border: 1px dashed var(--ag-border-strong);
  border-radius: var(--ag-radius-sm);
  padding: 12px 16px;
  font-family: var(--ag-font-mono);
  font-size: 1.02rem;
  letter-spacing: 0.06em;
  color: #b9f3dd;
}

.ag-key__copy {
  border: 1px solid var(--ag-border);
  background: transparent;
  color: var(--ag-muted);
  border-radius: 7px;
  font-size: 0.75rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.ag-key__copy:hover {
  color: var(--ag-accent);
  border-color: var(--ag-border-strong);
}

/* ---- Buttons ----------------------------------------------------------- */

.ag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, border-color 0.15s;
}

.ag-btn:focus-visible {
  outline: 2px solid var(--ag-accent);
  outline-offset: 2px;
}

.ag-btn--primary {
  background: linear-gradient(135deg, var(--ag-accent) 0%, var(--ag-accent-2) 100%);
  color: #04140d;
  box-shadow: 0 4px 18px var(--ag-accent-glow);
}

.ag-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--ag-accent-glow);
  color: #04140d;
}

.ag-btn--ghost {
  background: transparent;
  color: var(--ag-text);
  border-color: var(--ag-border-strong);
}

.ag-btn--ghost:hover {
  border-color: var(--ag-accent);
  color: var(--ag-accent);
}

.ag-btn--danger-ghost {
  background: transparent;
  color: var(--ag-danger);
  border-color: rgba(224, 122, 118, 0.4);
  font-size: 0.8rem;
  padding: 6px 14px;
}

.ag-btn--danger-ghost:hover {
  border-color: var(--ag-danger);
  color: var(--ag-danger);
  background: rgba(224, 122, 118, 0.08);
}

.ag-btn.is-loading {
  pointer-events: none;
  opacity: 0.75;
}

/* Solid color variants — replace btn-secondary/btn-dark/btn-light/btn-danger/
   btn-warning/btn-info/btn-success everywhere. Deliberately opaque (not
   translucent like --ghost) so these read correctly on BOTH the dark ag-page
   shell and legacy white .card backgrounds (admin, forms) without a separate
   light/dark variant of each. */

.ag-btn--secondary {
  background: linear-gradient(135deg, var(--ag-violet) 0%, var(--ag-violet-2) 100%);
  color: #fff;
  box-shadow: 0 4px 16px var(--ag-violet-glow);
}

.ag-btn--secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px var(--ag-violet-glow);
  color: #fff;
}

.ag-btn--info {
  background: linear-gradient(135deg, var(--ag-info) 0%, var(--ag-info-2) 100%);
  color: #04140d;
  box-shadow: 0 4px 16px var(--ag-info-glow);
}

.ag-btn--info:hover {
  transform: translateY(-1px);
  color: #04140d;
}

.ag-btn--warning {
  background: linear-gradient(135deg, var(--ag-warning) 0%, var(--ag-warning-2) 100%);
  color: #241d02;
  box-shadow: 0 4px 16px var(--ag-warning-glow);
}

.ag-btn--warning:hover {
  transform: translateY(-1px);
  color: #241d02;
}

.ag-btn--danger {
  background: linear-gradient(135deg, var(--ag-danger) 0%, var(--ag-danger-2) 100%);
  color: #fff;
  box-shadow: 0 4px 16px var(--ag-danger-glow);
}

.ag-btn--danger:hover {
  transform: translateY(-1px);
  color: #fff;
}

.ag-btn--dark {
  background: var(--ag-slate-2);
  color: var(--ag-text);
  border-color: var(--ag-border);
}

.ag-btn--dark:hover {
  border-color: var(--ag-border-strong);
  color: #fff;
}

.ag-btn--light {
  background: #eef5f2;
  color: #0b1210;
  border-color: rgba(11, 18, 16, 0.08);
}

.ag-btn--light:hover {
  background: #ffffff;
  color: #0b1210;
}

/* Ghost on a light/white background (admin cards, forms) — the default
   .ag-btn--ghost assumes a dark backdrop and is unreadable on white. */
.ag-btn--ghost.ag-btn--on-light {
  color: var(--ag-slate-2);
  border-color: rgba(11, 18, 16, 0.18);
}

.ag-btn--ghost.ag-btn--on-light:hover {
  border-color: var(--ag-accent-2);
  color: var(--ag-accent-2);
  background: rgba(56, 178, 172, 0.06);
}

/* Size modifiers — mirror Bootstrap's btn-sm/btn-lg so swapping classes
   doesn't also require restructuring markup. */
.ag-btn--sm {
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: 8px;
}

.ag-btn--lg {
  padding: 13px 28px;
  font-size: 1.02rem;
}

.ag-btn--block {
  display: flex;
  width: 100%;
}

/* ---- Badges -------------------------------------------------------------- */

.ag-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.ag-badge--success { background: rgba(79, 209, 165, 0.15); color: var(--ag-accent-2); }
.ag-badge--secondary { background: rgba(155, 140, 242, 0.15); color: var(--ag-violet-2); }
.ag-badge--info { background: rgba(88, 184, 232, 0.15); color: var(--ag-info-2); }
.ag-badge--warning { background: rgba(228, 198, 98, 0.18); color: #8a6d1a; }
.ag-badge--danger { background: rgba(224, 122, 118, 0.15); color: var(--ag-danger-2); }
.ag-badge--dark { background: rgba(11, 18, 16, 0.08); color: var(--ag-slate-2); }

/* On a dark ag-page background, the light-text badges above need lighter
   text to stay legible (badge--warning/--dark specifically assume a light
   backdrop by default, matching their most common use in white admin cards). */
.ag-page .ag-badge--warning { color: var(--ag-warning); }
.ag-page .ag-badge--dark { background: rgba(255, 255, 255, 0.08); color: var(--ag-text); }

/* ---- Builder: step rail ------------------------------------------------ */

.ag-steps {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.ag-step {
  flex: 1 1 200px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  background: rgba(19, 28, 26, 0.5);
}

.ag-step__num {
  font-family: var(--ag-font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ag-accent);
  border: 1px solid var(--ag-border-strong);
  border-radius: 7px;
  padding: 2px 8px;
  flex-shrink: 0;
}

.ag-step__title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ag-text);
  margin: 0 0 2px;
}

.ag-step__desc {
  font-size: 0.8rem;
  color: var(--ag-muted);
  margin: 0;
}

/* ---- Builder: billing toggle ------------------------------------------- */

.ag-toggle {
  display: inline-flex;
  border: 1px solid var(--ag-border-strong);
  border-radius: 999px;
  padding: 4px;
  background: rgba(6, 12, 10, 0.6);
  gap: 4px;
}

.ag-toggle button {
  border: none;
  background: transparent;
  color: var(--ag-muted);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 7px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ag-toggle button.active {
  background: linear-gradient(135deg, var(--ag-accent), var(--ag-accent-2));
  color: #04140d;
}

.ag-toggle__hint {
  font-size: 0.78rem;
  color: var(--ag-muted);
  margin-top: 8px;
}

.ag-toggle__save {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(79, 209, 165, 0.18);
  color: var(--ag-accent);
}

.ag-toggle button.active .ag-toggle__save {
  background: rgba(4, 20, 13, 0.18);
  color: #04140d;
}

/* Secondary one-time section — visually quieter than the primary
   Monthly/Annual tier cards above it, on purpose. */

.ag-onetime-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ag-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.ag-onetime-divider::before,
.ag-onetime-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ag-border);
}

.ag-tier--onetime {
  padding: 20px 22px;
  background: rgba(19, 28, 26, 0.45);
}

.ag-tier--onetime:hover {
  transform: none;
  box-shadow: none;
}

.ag-tier--onetime .price-onetime .amount {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.ag-tier--onetime .price-onetime .cycle {
  color: var(--ag-muted);
  font-size: 0.78rem;
}

/* ---- Builder: tier cards ------------------------------------------------ */

.ag-tier {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--ag-panel);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius);
  padding: 26px 24px 24px;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.2s ease;
}

.ag-tier:hover {
  transform: translateY(-4px);
  border-color: var(--ag-border-strong);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.ag-tier--highlight {
  border-color: var(--ag-border-strong);
  background:
    radial-gradient(130% 100% at 50% 0%, rgba(79, 209, 165, 0.12) 0%, transparent 55%),
    var(--ag-panel);
  box-shadow: 0 0 0 1px var(--ag-border-strong), 0 12px 40px rgba(0, 0, 0, 0.4);
}

.ag-tier__flag {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--ag-accent), var(--ag-accent-2));
  color: #04140d;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 14px;
  white-space: nowrap;
}

.ag-tier__name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}

.ag-tier__desc {
  color: var(--ag-muted);
  font-size: 0.86rem;
  min-height: 2.6em;
  margin-bottom: 14px;
}

.ag-tier__price {
  margin-bottom: 18px;
}

.ag-tier__price .amount {
  font-size: 2.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.ag-tier__price .cycle {
  color: var(--ag-muted);
  font-size: 0.88rem;
}

.ag-tier__features {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  flex-grow: 1;
  text-align: left;
}

.ag-tier__features li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 0.87rem;
  color: var(--ag-text);
  padding: 5px 0;
}

.ag-tier__features li::before {
  content: "\2713";
  color: var(--ag-accent);
  font-weight: 700;
  flex-shrink: 0;
}

.ag-tier__features li.is-support {
  color: #cdeee1;
}

.ag-tier__features li.is-support::before {
  content: "\2605"; /* star — support entitlement stands out from checkmarks */
}

/* ---- Plugins ------------------------------------------------------------ */

.ag-plugin {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--ag-panel);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  padding: 16px 18px;
  transition: border-color 0.15s;
}

.ag-plugin:hover {
  border-color: var(--ag-border-strong);
}

.ag-plugin__icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: rgba(79, 209, 165, 0.1);
  border: 1px solid var(--ag-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ag-accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ag-plugin__body {
  flex: 1;
  min-width: 0;
}

.ag-plugin__name {
  font-weight: 700;
  color: var(--ag-text);
  font-size: 0.95rem;
  margin: 0;
}

.ag-plugin__desc {
  color: var(--ag-muted);
  font-size: 0.8rem;
  margin: 2px 0 0;
}

.ag-plugin__price {
  font-weight: 800;
  color: #fff;
  font-size: 0.95rem;
  white-space: nowrap;
}

.ag-plugin__action {
  flex-shrink: 0;
}

/* ---- Misc --------------------------------------------------------------- */

.ag-note {
  font-size: 0.82rem;
  color: var(--ag-muted);
}

.ag-note a {
  color: var(--ag-accent);
}

.ag-divider {
  border: none;
  height: 1px;
  background: var(--ag-border);
  margin: 20px 0;
}

.ag-support-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--ag-border-strong);
  border-radius: var(--ag-radius-sm);
  background: rgba(79, 209, 165, 0.06);
  padding: 14px 16px;
  font-size: 0.87rem;
}

.ag-support-callout i {
  color: var(--ag-accent);
  margin-top: 2px;
}

@keyframes ag-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.ag-pulse {
  animation: ag-pulse 1.6s ease-in-out infinite;
}

@media (max-width: 576px) {
  .ag-panel { padding: 18px; }
  .ag-tier { padding: 22px 18px 18px; }
}

/* ---- Site chrome: header ------------------------------------------------ */
/* Public navbar (#mainNav, Grayscale) + logged-in navbar (.ag-nav, Breeze). */

#mainNav,
.ag-nav {
  background: rgba(9, 15, 13, 0.82) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ag-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

/* Grayscale's scroll-shrink JS re-adds a white bg via .navbar-shrink — keep it dark. */
#mainNav.navbar-shrink {
  background: rgba(9, 15, 13, 0.94) !important;
}

#mainNav .navbar-brand img,
.ag-nav .ag-nav__logo img {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

#mainNav .nav-link,
#mainNav .nav-link strong {
  color: var(--ag-text) !important;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-shadow: none !important;
}

#mainNav .nav-link:hover,
#mainNav .nav-link:hover strong {
  color: var(--ag-accent) !important;
}

#mainNav .navbar-toggler {
  color: var(--ag-text);
  border: 1px solid var(--ag-border-strong);
  border-radius: 8px;
  font-size: 0.8rem;
}

#mainNav .nav-cta {
  background: linear-gradient(135deg, var(--ag-accent), var(--ag-accent-2));
  color: #04140d !important;
  border-radius: 999px;
  padding: 8px 18px !important;
  font-weight: 700;
  box-shadow: 0 4px 16px var(--ag-accent-glow);
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}

#mainNav .nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px var(--ag-accent-glow);
  color: #04140d !important;
}

#mainNav .nav-cta span,
#mainNav .nav-cta strong {
  color: #04140d !important;
  text-shadow: none !important;
}

@media (max-width: 991.98px) {
  #mainNav .navbar-collapse {
    background: rgba(9, 15, 13, 0.97);
    border: 1px solid var(--ag-border);
    border-radius: var(--ag-radius-sm);
    padding: 12px 16px;
    margin-top: 10px;
  }
}

/* Logged-in (Breeze) nav — replaces the old bg-white Tailwind styling. */
.ag-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.ag-nav .ag-nav__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 18px;
}

.ag-nav .ag-nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.ag-nav a.ag-nav__link {
  color: var(--ag-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}

.ag-nav a.ag-nav__link:hover {
  color: var(--ag-text);
  background: rgba(79, 209, 165, 0.08);
}

.ag-nav a.ag-nav__link.is-active {
  color: var(--ag-accent);
  background: rgba(79, 209, 165, 0.1);
}

.ag-nav .ag-nav__user {
  position: relative;
}

.ag-nav .ag-nav__user-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--ag-border);
  color: var(--ag-text);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s;
}

.ag-nav .ag-nav__user-btn:hover {
  border-color: var(--ag-border-strong);
}

.ag-nav .ag-nav__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: var(--ag-panel-solid);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-sm);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  padding: 6px;
  display: none;
  z-index: 1040;
}

.ag-nav .ag-nav__menu.open {
  display: block;
}

.ag-nav .ag-nav__menu a,
.ag-nav .ag-nav__menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--ag-text);
  font-size: 0.85rem;
  padding: 9px 12px;
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
}

.ag-nav .ag-nav__menu a:hover,
.ag-nav .ag-nav__menu button:hover {
  background: rgba(79, 209, 165, 0.1);
  color: var(--ag-accent);
}

/* ---- Site chrome: footer ------------------------------------------------ */

.ag-footer {
  background: #070d0b;
  border-top: 1px solid var(--ag-border);
  color: var(--ag-muted);
  padding: 44px 0 28px;
  font-size: 0.88rem;
}

.ag-footer h6 {
  color: var(--ag-text);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.ag-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ag-footer ul li {
  margin-bottom: 8px;
}

.ag-footer a {
  color: var(--ag-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.ag-footer a:hover {
  color: var(--ag-accent);
}

.ag-footer .ag-footer__brand {
  color: var(--ag-text);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.ag-footer .ag-footer__tag {
  max-width: 300px;
  line-height: 1.55;
}

.ag-footer .ag-footer__bottom {
  border-top: 1px solid rgba(126, 231, 196, 0.08);
  margin-top: 30px;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.78rem;
}

.ag-footer .ag-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--ag-border);
  border-radius: 50%;
  margin-left: 8px;
  transition: border-color 0.15s, color 0.15s;
}

.ag-footer .ag-footer__social a:hover {
  border-color: var(--ag-accent);
}

/* ---- Homepage: hero terminal mock ---------------------------------------- */

.ag-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--ag-border-strong);
  border-radius: 999px;
  color: var(--ag-accent);
  background: rgba(79, 209, 165, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 16px;
  margin-bottom: 18px;
}

.masthead .ag-hero-title {
  font-weight: 800;
  font-size: clamp(2.1rem, 4.5vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-transform: none;
  text-wrap: balance;
  max-width: 14ch;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, #b8f5df 0%, var(--ag-accent) 45%, var(--ag-accent-2) 100%);
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.masthead .ag-hero-title__line {
  display: block;
}

@media (min-width: 992px) {
  .masthead .ag-hero-title {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    font-size: clamp(2.5rem, 3.2vw, 3.5rem);
  }
}

.ag-terminal {
  background: rgba(7, 13, 11, 0.92);
  border: 1px solid var(--ag-border-strong);
  border-radius: var(--ag-radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(79, 209, 165, 0.06);
  text-align: left;
  overflow: hidden;
  font-family: var(--ag-font-mono);
  font-size: 0.82rem;
}

.ag-terminal__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ag-border);
  background: rgba(19, 28, 26, 0.8);
}

.ag-terminal__bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.ag-terminal__bar i:nth-child(1) { background: #e0837f; }
.ag-terminal__bar i:nth-child(2) { background: #e4c662; }
.ag-terminal__bar i:nth-child(3) { background: var(--ag-accent); }

.ag-terminal__bar span {
  margin-left: 10px;
  color: var(--ag-muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.ag-terminal__body {
  padding: 16px 18px 18px;
  line-height: 1.75;
}

.ag-terminal__body .t-user { color: #cdeee1; }
.ag-terminal__body .t-user::before { content: "you \203A "; color: var(--ag-accent); font-weight: 700; }
.ag-terminal__body .t-agent { color: var(--ag-muted); }
.ag-terminal__body .t-agent::before { content: "agent \203A "; color: var(--ag-accent-2); font-weight: 700; }
.ag-terminal__body .t-ok { color: var(--ag-accent); }
.ag-terminal__body .t-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--ag-accent);
  vertical-align: text-bottom;
  animation: ag-pulse 1.1s steps(2) infinite;
}

/* ---- Auth pages (Breeze guest layout) ------------------------------------ */
/* One wrapper class on layouts/guest.blade.php restyles every auth screen
   (login, register, forgot/reset password, confirm) — the Breeze form
   components keep their Tailwind classes, we just out-cascade them. */

.ag-auth {
  color: var(--ag-text);
  background: radial-gradient(90% 60% at 50% 0%, #12201c 0%, #0b1210 60%);
}

.ag-auth .ag-auth__card {
  background: var(--ag-panel);
  border: 1px solid var(--ag-border-strong);
  border-radius: var(--ag-radius);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.ag-auth .ag-auth__card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ag-accent), var(--ag-accent-2) 55%, transparent);
}

.ag-auth .ag-auth__brand {
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.ag-auth .ag-auth__sub {
  color: var(--ag-muted);
  font-size: 0.85rem;
}

.ag-auth label {
  color: var(--ag-text) !important;
  font-size: 0.85rem;
  font-weight: 600;
}

.ag-auth input[type="text"],
.ag-auth input[type="email"],
.ag-auth input[type="password"] {
  background: rgba(6, 12, 10, 0.7) !important;
  border: 1px solid var(--ag-border) !important;
  border-radius: var(--ag-radius-sm) !important;
  color: var(--ag-text) !important;
  padding: 10px 14px;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ag-auth input[type="text"]:focus,
.ag-auth input[type="email"]:focus,
.ag-auth input[type="password"]:focus {
  outline: none;
  border-color: var(--ag-accent) !important;
  box-shadow: 0 0 0 3px rgba(79, 209, 165, 0.18) !important;
}

.ag-auth input[type="checkbox"] {
  accent-color: var(--ag-accent);
}

.ag-auth button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--ag-accent) 0%, var(--ag-accent-2) 100%) !important;
  color: #04140d !important;
  box-shadow: 0 4px 18px var(--ag-accent-glow);
  transition: transform 0.12s ease, box-shadow 0.2s ease;
}

.ag-auth button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--ag-accent-glow);
}

.ag-auth a {
  color: var(--ag-accent) !important;
  text-decoration: none;
}

.ag-auth a:hover {
  text-decoration: underline;
}

/* Breeze's muted text spans (remember me, helper copy, validation notes). */
.ag-auth .text-gray-600,
.ag-auth .text-gray-400,
.ag-auth .text-sm.text-gray-600 {
  color: var(--ag-muted) !important;
}

/* Validation errors — keep them loud and readable on dark. */
.ag-auth .text-red-600,
.ag-auth .text-red-400 {
  color: var(--ag-danger) !important;
}

/* ---- Docs site --------------------------------------------------------- */

.ag-docs {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 80px;
  align-items: start;
}

@media (max-width: 860px) {
  .ag-docs { grid-template-columns: 1fr; }
  .ag-docs-side { display: none; }
}

.ag-docs-side {
  position: sticky;
  top: 24px;
}

.ag-docs-side h6 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ag-muted);
  font-weight: 700;
  margin: 20px 0 8px;
}

.ag-docs-side h6:first-child { margin-top: 0; }

.ag-docs-side ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ag-docs-side a {
  display: block;
  padding: 6px 10px;
  margin-left: -10px;
  border-radius: var(--ag-radius-sm);
  color: var(--ag-muted);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.35;
}

.ag-docs-side a:hover { color: var(--ag-text); background: rgba(255,255,255,0.04); }

.ag-docs-side a.is-active {
  color: var(--ag-accent);
  background: rgba(79, 209, 165, 0.1);
  font-weight: 600;
}

.ag-docs-hero {
  margin-bottom: 28px;
}

.ag-docs-hero h1 {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.ag-docs-hero p {
  color: var(--ag-muted);
  font-size: 1.02rem;
  max-width: 60ch;
  margin: 0;
}

.ag-docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.ag-docs-card {
  display: block;
  background: var(--ag-panel);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius);
  padding: 16px 18px;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.ag-docs-card:hover {
  border-color: var(--ag-border-strong);
  transform: translateY(-1px);
}

.ag-docs-card .cat {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ag-accent);
  font-weight: 700;
  margin-bottom: 6px;
}

.ag-docs-card h3 {
  color: var(--ag-text);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.ag-docs-card p {
  color: var(--ag-muted);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.45;
}

.ag-docs-article {
  color: var(--ag-text);
}

.ag-docs-article .eyebrow {
  font-family: var(--ag-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ag-accent);
  margin-bottom: 8px;
}

.ag-docs-article h1 {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.ag-docs-article h2 {
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  margin: 32px 0 12px;
}

.ag-docs-article h2:first-of-type { margin-top: 0; }

.ag-docs-article p {
  color: var(--ag-text);
  opacity: 0.92;
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 68ch;
  margin: 0 0 14px;
}

.ag-docs-article ul,
.ag-docs-article ol {
  color: var(--ag-text);
  opacity: 0.92;
  font-size: 0.98rem;
  line-height: 1.7;
  max-width: 68ch;
  margin: 0 0 14px;
  padding-left: 22px;
}

.ag-docs-article li { margin-bottom: 6px; }

.ag-docs-article code {
  font-family: var(--ag-font-mono);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--ag-border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.85em;
  color: var(--ag-accent);
}

.ag-docs-note {
  display: flex;
  gap: 12px;
  background: rgba(88, 184, 232, 0.08);
  border: 1px solid rgba(88, 184, 232, 0.28);
  border-radius: var(--ag-radius-sm);
  padding: 14px 16px;
  margin: 18px 0;
  max-width: 68ch;
}

.ag-docs-note i { color: var(--ag-info); margin-top: 3px; }
.ag-docs-note p { margin: 0; }

.ag-docs-warn {
  display: flex;
  gap: 12px;
  background: rgba(228, 198, 98, 0.1);
  border: 1px solid rgba(228, 198, 98, 0.32);
  border-radius: var(--ag-radius-sm);
  padding: 14px 16px;
  margin: 18px 0;
  max-width: 68ch;
}

.ag-docs-warn i { color: var(--ag-warning); margin-top: 3px; }
.ag-docs-warn p { margin: 0; }

.ag-docs-cta {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--ag-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ag-docs-cta p {
  color: var(--ag-muted);
  font-size: 0.875rem;
  margin: 0;
}
