/* ============================
   NextBuyer brand.css — GM-3 Green-Mint (Balanced)
   ============================ */

/* -------- Design tokens -------- */
:root {
    --nb-mint:        #2ADA94;  /* primary mint */
    --nb-mint-dark:   #1FB97F;  /* hover/active & "in-progress" */
    --nb-mint-soft:   #E8FFF4;  /* subtle backgrounds & pills */
    --nb-focus:       rgba(42, 218, 148, 0.35);
  
    --nb-ink-900:     #111827;
    --nb-ink-800:     #1f2937;
    --nb-ink-700:     #374151;
    --nb-ink-600:     #4b5563;
  
    --nb-gray-200:    #e5e7eb;
    --nb-gray-100:    #f3f4f6;
  
    /* Form-related tokens */
    --nb-input-border:        #9ca3af;  /* gray-400 – more visible */
    --nb-input-border-strong: #6b7280;  /* gray-500 – optional stronger */
    --nb-placeholder:         #6b7280;
  }
  
  /* Optional runtime theme toggle */
  .nb-theme-mint {
    --nb-mint:      #2ADA94;
    --nb-mint-dark: #1FB97F;
    --nb-mint-soft: #E8FFF4;
  }
  
  /* -------- Accent utilities -------- */
  .nb-accent-text { color: var(--nb-mint); }
  .nb-accent-bg   { background-color: var(--nb-mint); color: #fff; }
  .nb-accent-bg:hover { background-color: var(--nb-mint-dark); }
  .nb-accent-pill {
    background-color: var(--nb-mint-soft);
    color: var(--nb-mint);
    display: inline-flex; align-items: center; gap: .35rem;
    border-radius: 9999px; padding: .2rem .5rem; font-size: .75rem;
  }
  
  /* -------- Buttons -------- */
  .nb-btn {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .5rem .9rem; border-radius: .375rem;
    font-size: .875rem; font-weight: 500; line-height: 1;
    transition: background-color .15s ease, box-shadow .15s ease, transform .02s ease;
    vertical-align: middle;
  }
  .nb-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--nb-focus);
  }
  .nb-btn:active { transform: translateY(0.5px); }
  .nb-btn .material-icons {
    font-size: 18px; line-height: 1; display: inline-block;
  }
  
  .nb-btn-primary { background-color: var(--nb-mint); color: #fff; }
  .nb-btn-primary:hover { background-color: var(--nb-mint-dark); }
  
  .nb-btn-ghost { background-color: var(--nb-gray-100); color: var(--nb-ink-700); }
  .nb-btn-ghost:hover { background-color: #e5e7eb; }
  
  /* -------- Modal -------- */
  .nb-modal-card {
    background: #fff; border-radius: 0.75rem; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); max-height: 90vh;
    display: flex; flex-direction: column;
  }
  .nb-modal-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--nb-gray-200); background: #f9fafb;
  }
  .nb-modal-title {
    display: flex; align-items: center; gap: .5rem; margin-right: auto;
    font-size: 1rem; font-weight: 600; color: var(--nb-ink-900);
  }
  .nb-modal-title .material-icons { font-size: 20px; color: var(--nb-mint); }
  .nb-modal-footer {
    padding: .75rem 1.25rem; border-top: 1px solid var(--nb-gray-200);
    background: #fafafa; display: flex; justify-content: flex-end; gap: .5rem;
  }
  
  /* -------- Layout helpers -------- */
  .sticky-panel {
    position: sticky; top: 6rem; max-height: calc(100vh - 7rem); overflow-y: auto;
  }
  .card-hover { transition: box-shadow .2s ease; }
  .card-hover:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
  
  /* -------- Accordion -------- */
  .accordion-panel { display: none; }
  .accordion-panel.open { display: block; }
  .accordion-btn .accordion-icon { transition: transform .2s ease; }
  .accordion-btn[aria-expanded="true"] .accordion-icon { transform: rotate(180deg); }
  
  /* -------- Check rows -------- */
  .nb-checkrow {
    display: flex; align-items: center; gap: .35rem;
    font-size: .875rem; color: var(--nb-ink-900);
  }
  .nb-checkrow .material-icons { font-size: 16px; color: var(--nb-mint); }
  
  /* -------- Hide helper -------- */
  .nb-hide-outside { display: none !important; }
  
  /* ===============================================
     JOURNEY / MILESTONES (always-horizontal; mono-mint statuses)
     =============================================== */
  #journeyViewport { padding-bottom: 0.75rem; overflow: visible; }
  #journeyTrack {
    position: relative; display: flex; flex-direction: row; flex-wrap: nowrap;
    justify-content: space-between; align-items: flex-start; gap: 0; width: 100%; padding: 0 4px;
  }
  #journeyTrack::before {
    content: ""; position: absolute; top: 20px; left: 0; right: 0; height: 4px;
    background-color: var(--nb-gray-200); z-index: 0;
  }
  .milestone-node {
    position: relative; z-index: 1; flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column; align-items: center; width: auto;
  }
  .milestone-node:focus,
  .milestone-node:focus-within { outline: none; }
  
  .milestone-head {
    position: relative; height: 40px; width: 100%;
    display: flex; align-items: center; justify-content: center;
  }
  .milestone-icon {
    width: 40px; height: 40px; border-radius: 9999px;
    display: flex; align-items: center; justify-content: center; z-index: 2;
    background: var(--nb-mint); color: #fff; /* default circle */
  }
  
  /* Group label */
  .milestone-label {
    margin-top: 8px; text-align: center; font-size: 0.8rem; color: var(--nb-ink-700);
    font-weight: 600; width: 100%; max-width: 200px; line-height: 1.2; white-space: normal; overflow-wrap: break-word;
  }
  
  /* Popup */
  .group-popup {
    display: none; position: absolute; top: 56px; left: 50%; transform: translateX(-50%);
    background: #fff; border: 1px solid var(--nb-gray-200); border-radius: 10px; padding: 12px;
    width: 260px; max-width: calc(100vw - 2rem); box-shadow: 0 10px 24px rgba(0,0,0,0.08); z-index: 30; pointer-events: auto;
  }
  .milestone-node:hover .group-popup,
  .milestone-node:focus-within .group-popup { display: block; }
  .group-popup::before {
    content: ""; position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
    border-width: 0 8px 8px 8px; border-style: solid; border-color: transparent transparent #ffffff transparent;
  }
  
  .step-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
  .step-row .material-icons { font-size: 18px; }
  
  .step-title { font-size: 0.8rem; color: var(--nb-ink-700); line-height: 1.2; }
  .step-meta  { font-size: 0.7rem; color: #6b7280; }
  
  /* icon tints by status — use data-status attr in EJS if desired */
  .material-icons[data-status="complete"]    { color: var(--nb-mint); }
  .material-icons[data-status="in-progress"] { color: var(--nb-mint-dark); }
  .material-icons[data-status="pending"]     { color: #9ca3af; } /* gray-400 */
  
  /* Progress bar inside popup */
  .progress-wrap  { margin-top: 8px; }
  .progress-track {
    height: 6px; background: var(--nb-gray-200);
    border-radius: 9999px; overflow: hidden;
  }
  .progress-fill  {
    height: 100%; background: var(--nb-mint);
    width: 0%; transition: width 150ms ease;
  }
  @media (prefers-reduced-motion: reduce) {
    .progress-fill { transition: none; }
  }
  
  /* Optional completion button inside popup */
  .completion-button {
    appearance: none; background: transparent; border: none;
    padding: 0; margin: 0; cursor: pointer;
  }
  .completion-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--nb-focus);
    border-radius: 9999px;
  }
  
  /* Large screens helper from your layout */
  @media (min-width: 1024px) {
    .nb-grid-2-1 {
      display: grid;
      grid-template-columns: 2fr 1fr !important;
      gap: 2rem !important;
    }
  }
  
  /* ===============================================
     LEGACY GREEN/BLUE → MINT REMAPS (Opt-in)
     Wrap old sections with .mintize-legacy to brand them
     =============================================== */
  .mintize-legacy .bg-green-600,
  .mintize-legacy .bg-green-500,
  .mintize-legacy .bg-blue-500 {
    background-color: var(--nb-mint) !important; color: #fff !important;
  }
  .mintize-legacy .hover\:bg-green-700:hover {
    background-color: var(--nb-mint-dark) !important;
  }
  .mintize-legacy .text-green-600,
  .mintize-legacy .text-blue-500 {
    color: var(--nb-mint) !important;
  }
  .mintize-legacy .bg-green-50 {
    background-color: var(--nb-mint-soft) !important;
  }
  .mintize-legacy .text-green-800 {
    color: var(--nb-mint-dark) !important;
  }
  .mintize-legacy .border-green-500 {
    border-color: var(--nb-mint) !important;
  }
  
  /* Tailwind-like input ring helper */
  .focus\:ring-green-500:focus,
  .mintize-legacy .focus\:ring-green-500:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px var(--nb-focus) !important;
    border-color: var(--nb-mint) !important;
  }
  
  /* =========================================
     Global auth / form styles (login, register, partner)
     ========================================= */
  
  /* Card container used on auth pages */
  .nb-center {
    min-height: calc(100vh - var(--nav-h, 0px));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
  }
  
  @media (min-width: 640px) {
    .nb-center { padding: 3rem 1.5rem; }
  }
  @media (min-width: 1024px) {
    .nb-center { padding: 3rem 2rem; }
  }
  
  .nb-card {
    width: 100%;
    max-width: 28rem;
    background: #ffffff;
    border: 1px solid var(--nb-gray-200);
    border-radius: 12px;
    padding: 2rem;
    box-shadow:
      0 4px 6px -1px rgba(0,0,0,.1),
      0 2px 4px -2px rgba(0,0,0,.1);
  }
  
  @media (min-width: 640px) {
    .nb-card { padding: 2.5rem; }
  }
  
  /* Header block */
  .nb-header { margin-bottom: 1.5rem; }
  .nb-header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 1rem;
  }
  .nb-header-icon {
    color: var(--nb-mint);
    font-size: 30px;
    line-height: 1;
  }
  .nb-title {
    margin: 0;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--nb-ink-900);
  }
  .nb-subtitle {
    margin: .5rem 0 0;
    text-align: center;
    font-size: .875rem;
    color: var(--nb-ink-600);
  }
  
  /* Alerts */
  .nb-error {
    background: #fee2e2;              /* red-100 */
    border: 1px solid #f87171;        /* red-400 */
    color: #b91c1c;                   /* red-700 */
    border-radius: .5rem;
    padding: .75rem 1rem;
    margin-bottom: .75rem;
  }
  .nb-hidden { display: none !important; }
  
  /* Form & inputs */
  .nb-form { margin-top: 1rem; }
  
  /* Stronger, more visible border around stacked inputs */
  .nb-input-stack {
    border-radius: .5rem;
    overflow: hidden;
    box-shadow: 0 0 0 2px var(--nb-input-border) inset;
  }
  
  /* To vertically “join” inputs in a stack */
  .nb-input-wrap { position: relative; }
  .nb-input-top .nb-input {
    border-bottom: 1px solid var(--nb-input-border);
    border-radius: .5rem .5rem 0 0;
  }
  .nb-input-bottom .nb-input {
    border-top: none;
    border-radius: 0 0 .5rem .5rem;
  }
  
  /* Individual inputs – darker, clearly visible border */
  .nb-input {
    display: block;
    width: 100%;
    font-size: .875rem;
    color: var(--nb-ink-900);
    background: #ffffff;
    border: 1px solid var(--nb-input-border);
    padding: .75rem .75rem;
    outline: none;
  }
  .nb-input::placeholder {
    color: var(--nb-placeholder);
  }
  
  /* Focus state (mint ring + stronger border) */
  .nb-input:focus {
    border-color: var(--nb-mint);
    box-shadow: 0 0 0 2px var(--nb-focus);
  }
  
  /* Eye button inside password fields */
  .nb-input-has-button { padding-right: 2.5rem; }
  .nb-eye {
    position: absolute;
    right: .25rem;
    top: 0;
    bottom: 0;
    padding: 0 .5rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .nb-eye:hover { color: #374151; }
  .nb-eye:focus-visible {
    outline: 2px solid var(--nb-mint);
    outline-offset: 2px;
    border-radius: .375rem;
  }
  
  /* Row between link / text */
  .nb-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: .75rem;
  }
  
  /* Links */
  .nb-link {
    font-size: .875rem;
    font-weight: 600;
    color: var(--nb-mint);
    text-decoration: none;
  }
  .nb-link:hover { color: var(--nb-mint-dark); }
  
  /* Primary button */
  .nb-primary {
    margin-top: .75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: .875rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--nb-mint);
    border: 1px solid transparent;
    border-radius: .5rem;
    padding: .75rem 1rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
  }
  .nb-primary:hover { background: var(--nb-mint-dark); }
  .nb-primary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--nb-focus);
  }
  .nb-primary[disabled] {
    opacity: .6;
    cursor: not-allowed;
  }
  
  /* Divider + social (for auth with SSO) */
  .nb-divider {
    position: relative;
    margin: 1.25rem 0;
    height: 1px;
    background: var(--nb-gray-200);
  }
  .nb-divider > span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    color: #6b7280;
    font-size: .875rem;
    padding: 0 .5rem;
  }
  .nb-social {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
  }
  @media (min-width: 640px) {
    .nb-social { grid-template-columns: 1fr 1fr; }
  }
  .nb-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    font-size: .875rem;
    font-weight: 500;
    color: #6b7280;
    text-decoration: none;
    background: #ffffff;
    border: 1px solid var(--nb-input-border);
    border-radius: .5rem;
    padding: .5rem 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
  }
  .nb-social-btn:hover { background: #f9fafb; }
  .nb-social-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
  }
  
  /* Footnote line at bottom of cards */
  .nb-footnote {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    font-size: .75rem;
    color: #6b7280;
    text-align: center;
  }
  .nb-lock-icon {
    font-size: 16px;
    line-height: 1;
  }
  
  /* Helper for tiny inline error / hint messages */
  .nb-invalid {
    box-shadow: 0 0 0 2px rgba(239,68,68,.25);
    border-color: #f87171 !important;
  }
  .nb-field-error {
    margin: .25rem 0 0;
    color: #b91c1c;
    font-size: 11px;
    line-height: 1.25;
  }
  .nb-hint {
    margin: .375rem 0 0;
    color: #374151;
    font-size: 11px;
    line-height: 1.25;
    font-style: italic;
  }
    