/* ═══════════════════════════════════════════════════════════════
   CAFÉ SIGLO DE ORO — Customer Portal CSS
   Matches main site dark aesthetic with gold accents
═══════════════════════════════════════════════════════════════ */
.portal-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  min-height: calc(100vh - var(--header-h));
  padding-top: var(--header-h);
}
@media (max-width: 900px) {
  .portal-wrap { grid-template-columns: 1fr; }
  .portal-sidebar { display: none; }
  .portal-sidebar.open { display: block; }
}

/* ── Sidebar ─────────────────────────────────────────────── */
.portal-sidebar {
  background: #110f0b;
  border-right: 1px solid rgba(212,168,48,.1);
  padding: 1.5rem 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.portal-nav { display: flex; flex-direction: column; }

.portal-nav-item {
  display: flex; align-items: center; gap: .65rem;
  padding: .7rem 1.25rem;
  color: var(--ivory);
  font-size: .85rem;
  border-left: 2px solid transparent;
  transition: all .15s;
  text-decoration: none;
}
.portal-nav-item:hover { color: var(--cream); background: rgba(212,168,48,.05); }
.portal-nav-item.active { color: var(--gold); border-left-color: var(--gold); background: rgba(212,168,48,.06); font-weight: 500; }
.portal-nav-item svg { flex-shrink: 0; }
.portal-nav-logout { margin-top: auto; color: var(--gold-dark); }
.portal-nav-logout:hover { color: #fca5a5; }

/* ── Main content area ───────────────────────────────────── */
.portal-main { padding: 2rem 1.75rem; overflow-y: auto; }
@media (max-width: 767px) { .portal-main { padding: 1.25rem 1rem; } }

/* ── Portal cards ────────────────────────────────────────── */
.pcard {
  background: #1a1508;
  border: 1px solid rgba(212,168,48,.12);
  border-radius: 12px;
  overflow: hidden;
}
.pcard-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(212,168,48,.1);
  display: flex; align-items: center; justify-content: space-between;
}
.pcard-header h2 { font-size: 1rem; margin: 0; font-family: var(--font-serif); }
.pcard-body { padding: 1.25rem; }

/* ── Stats grid ──────────────────────────────────────────── */
.portal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .85rem;
  margin-bottom: 1.5rem;
}
.pstat {
  background: #1a1508;
  border: 1px solid rgba(212,168,48,.12);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}
.pstat-label { font-size: .72rem; color: var(--gold-dark); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .35rem; }
.pstat-val { font-family: var(--font-serif); font-size: 1.75rem; font-weight: 700; color: var(--gold); line-height: 1; }
.pstat-sub { font-size: .72rem; color: var(--ivory); margin-top: .25rem; }

/* ── Machine Journey ─────────────────────────────────────── */
.journey-card {
  background: linear-gradient(135deg, #1a1508, #0f0d06);
  border: 1px solid rgba(212,168,48,.25);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.journey-title { font-family: var(--font-serif); font-size: 1.15rem; color: var(--cream); margin: 0 0 .35rem; }
.journey-sub   { font-size: .82rem; color: var(--ivory); margin: 0 0 1.25rem; }

.journey-bar-wrap {
  background: rgba(255,255,255,.06);
  border-radius: 8px;
  height: 12px;
  overflow: hidden;
  margin-bottom: .65rem;
  position: relative;
}
.journey-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #D4A830, #EDD24A);
  border-radius: 8px;
  transition: width 1.2s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 0 10px rgba(212,168,48,.4);
}
.journey-labels {
  display: flex; justify-content: space-between;
  font-size: .72rem; color: var(--ivory); margin-bottom: 1rem;
}
.journey-milestones {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: .35rem;
  margin-bottom: 1rem;
}
@media (max-width: 479px) { .journey-milestones { grid-template-columns: repeat(3,1fr); } }
.journey-month {
  text-align: center;
  padding: .45rem .2rem;
  border-radius: 6px;
  font-size: .7rem;
}
.journey-month.done     { background: rgba(212,168,48,.15); color: var(--gold); font-weight: 600; }
.journey-month.current  { background: rgba(212,168,48,.25); color: var(--gold); font-weight: 700; border: 1px solid rgba(212,168,48,.4); }
.journey-month.pending  { background: rgba(255,255,255,.04); color: var(--gold-dark); }
.journey-month.earned   { background: rgba(34,197,94,.12); color: #86efac; font-weight: 700; border: 1px solid rgba(34,197,94,.25); }

.journey-gift-box {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(34,197,94,.06);
  border: 1px solid rgba(34,197,94,.18);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}
.journey-machine-estimate {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(212,168,48,.05);
  border: 1px solid rgba(212,168,48,.15);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}

/* ── Order items list ────────────────────────────────────── */
.order-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 0;
  border-bottom: 1px solid rgba(212,168,48,.08);
  gap: .75rem;
}
.order-row:last-child { border-bottom: none; }
.order-status {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: .18rem .55rem; border-radius: 10px;
}
.status-confirmed { background: rgba(147,197,253,.1); color: #93c5fd; border: 1px solid rgba(147,197,253,.18); }
.status-shipped   { background: rgba(234,179,8,.1);   color: #fde047; border: 1px solid rgba(234,179,8,.18); }
.status-delivered { background: rgba(34,197,94,.1);   color: #86efac; border: 1px solid rgba(34,197,94,.18); }

/* ── Subscription status ─────────────────────────────────── */
.sub-active   { background: rgba(34,197,94,.08); border: 1px solid rgba(34,197,94,.2); }
.sub-inactive { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); }

/* ── Form inputs (portal style) ─────────────────────────── */
.p-input {
  width: 100%;
  background: rgba(26,21,8,.8);
  border: 1px solid rgba(212,168,48,.18);
  border-radius: 8px;
  padding: .75rem .9rem;
  color: var(--cream);
  font-size: .88rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.p-input:focus { border-color: var(--gold); }
.p-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--ivory);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .4rem;
}
.p-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
@media (max-width: 479px) { .p-form-row { grid-template-columns: 1fr; } }
.p-form-group { margin-bottom: .85rem; }

/* ── Toast ───────────────────────────────────────────────── */
#portal-toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: #1a1508; border: 1px solid rgba(212,168,48,.3);
  border-radius: 10px; padding: .75rem 1.1rem;
  font-size: .82rem; color: var(--cream);
  z-index: 9999; transform: translateY(80px); opacity: 0;
  transition: .25s; max-width: 300px;
  display: flex; align-items: center; gap: .65rem;
  pointer-events: none; box-shadow: 0 4px 24px rgba(0,0,0,.5);
}
