/* ============================================================
   MyOria — Área privada de socios
   oriatoscana.com · 2026
   Construido sobre tokens.css / components.css
   ============================================================ */

.myoria {
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--ff-sans);
}

/* ─── Página de acceso (viñedo + carteles) ─── */
.access {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--sp-8) var(--gutter);
  overflow: hidden;
}
.access__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  filter: saturate(1.06);
  z-index: 0;
}
/* Solo un viñeteo muy suave para asentar la tarjeta: se ve el viñedo en pleno. */
.access__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 42%, transparent 42%, rgba(26,18,8,0.34) 100%);
}
/* Carteles con nombres de propietarios, esparcidos sobre el viñedo */
.access__signs { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.sign {
  position: absolute;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  opacity: 0;
  transition: opacity .9s var(--ease-out);
}
.sign.sign--in { opacity: .97; }
.sign.sign--out { opacity: 0; }
.sign__post {
  width: 2px;
  height: 26px;
  margin: 0 auto -2px;
  background: linear-gradient(to bottom, #6b4f2a, #3d2c17);
  border-radius: 1px;
}
.sign__plate {
  background: linear-gradient(145deg, #efe6d2, #d9cbaa);
  color: #3d2e18;
  font-family: var(--ff-serif);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid rgba(61,46,24,0.35);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  position: relative;
}
.sign__quadro {
  display: block;
  font-family: var(--ff-sans);
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--l-gold);
  margin-bottom: 1px;
}

/* ─── Card de login ─── */
.access__card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  background: rgba(30, 22, 11, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: var(--sp-10) var(--sp-8);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.access__brand {
  font-family: var(--ff-serif);
  font-size: var(--fs-3xl);
  letter-spacing: var(--ls-wide);
  color: var(--cream);
  margin-bottom: var(--sp-1);
}
.access__brand-my { font-style: italic; font-weight: 300; color: var(--gold-light); letter-spacing: 0; }
.access__sub {
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: var(--sp-8);
}
.access__welcome {
  font-family: var(--ff-serif);
  font-size: var(--fs-lg);
  color: var(--text);
  margin-bottom: var(--sp-6);
  font-weight: 300;
}

/* ─── Formularios ─── */
.field { text-align: left; margin-bottom: var(--sp-4); }
.field label {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}
.field input, .field select, .field textarea {
  width: 100%;
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: var(--ff-sans);
  font-size: var(--fs-md);
  padding: 0.7rem 0.85rem;
  transition: border-color var(--t-base);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
}
.field input::placeholder { color: var(--text-faint); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.phone-input { display: flex; gap: var(--sp-2); }
.phone-code { flex: 0 0 74px; text-align: center; }
.phone-number { flex: 1; }

.btn-block { width: 100%; justify-content: center; margin-top: var(--sp-2); }

.link {
  color: var(--gold-light);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--ff-sans);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-decoration: none;
}
.link:hover { color: var(--gold); text-decoration: underline; }
.access__links { margin-top: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); }

.msg {
  font-size: var(--fs-sm);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-4);
  display: none;
}
.msg.show { display: block; }
.msg--error { background: rgba(150,40,30,0.25); border: 1px solid rgba(200,80,60,0.4); color: #f0c9bf; }
.msg--ok    { background: rgba(60,110,50,0.22); border: 1px solid rgba(120,180,90,0.4); color: #cfe6bf; }
.msg--info  { background: var(--gold-faint); border: 1px solid var(--border-mid); color: var(--text); }

/* ─── Dashboard / Panel ─── */
.panel { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.topbar {
  position: sticky; top: 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-4) var(--gutter);
  background: rgba(26,18,8,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar__brand { font-family: var(--ff-serif); font-size: var(--fs-2xl); letter-spacing: var(--ls-wide); color: var(--cream); text-decoration: none; }
.topbar__brand-my { font-style: italic; font-weight: 300; color: var(--gold-light); letter-spacing: 0; }
.topbar__user { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--text-muted); }
.user-chip {
  display: flex; align-items: center; gap: var(--sp-2);
  background: none; border: 1px solid transparent; border-radius: var(--radius-full);
  padding: 3px 3px 3px var(--sp-3); cursor: pointer;
  color: var(--text-muted); font-family: var(--ff-sans); font-size: var(--fs-sm);
  transition: border-color var(--t-base), color var(--t-base);
}
.user-chip:hover { color: var(--text); border-color: var(--border-mid); }
.user-chip.active { color: var(--cream); border-color: var(--gold); }
.user-chip.active .avatar { border-color: var(--gold); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  background: var(--gold-dim); border: 1px solid var(--border-mid);
  display: grid; place-items: center; font-family: var(--ff-serif); color: var(--gold-light); font-size: var(--fs-md);
}

.admin-bar {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-3) var(--gutter);
  background: linear-gradient(90deg, rgba(181,134,42,0.18), rgba(181,134,42,0.06));
  border-bottom: 1px solid var(--border-mid);
}
.admin-bar__eye { font-size: var(--fs-sm); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--gold-light); }
.admin-bar__select {
  background: rgba(0,0,0,0.3); border: 1px solid var(--border-mid); border-radius: var(--radius-sm);
  color: var(--cream); font-family: var(--ff-sans); font-size: var(--fs-base); padding: 0.4rem 0.7rem; min-width: 240px;
}
.admin-bar__viewing { font-size: var(--fs-sm); color: var(--text); font-style: italic; }

.tabs {
  display: flex; gap: var(--sp-2); flex-wrap: wrap;
  padding: var(--sp-6) 0 var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.tab {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted);
  font-family: var(--ff-sans); font-size: var(--fs-sm);
  letter-spacing: var(--ls-wide); text-transform: uppercase;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-full);
  transition: all var(--t-base);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--ink); background: var(--gold); }

.view { padding: var(--sp-8) 0 var(--sp-24); display: none; animation: fade .4s var(--ease-out); }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.view__title { font-family: var(--ff-serif); font-size: var(--fs-2xl); font-weight: 300; color: var(--cream); margin-bottom: var(--sp-2); }
.view__lead { color: var(--text-muted); font-size: var(--fs-base); margin-bottom: var(--sp-8); max-width: 60ch; }

.card {
  background: var(--gold-faint);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  margin-bottom: var(--sp-5);
}
.card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-5); }
.card__title { font-family: var(--ff-serif); font-size: var(--fs-xl); color: var(--text); font-weight: 400; }

/* Holdings (quadro / mosaico) */
.holdings { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-4); }
.holding {
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  text-align: center;
  background: linear-gradient(160deg, rgba(181,134,42,0.08), transparent);
}
.holding__label { font-size: var(--fs-xs); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--gold-light); }
.holding__value { font-family: var(--ff-serif); font-size: var(--fs-3xl); color: var(--cream); margin-top: var(--sp-2); }
.holding__value small { font-size: var(--fs-md); color: var(--text-muted); }
.chip { display: inline-block; background: var(--gold-dim); border: 1px solid var(--border-mid); color: var(--text); font-size: var(--fs-sm); padding: 2px 10px; border-radius: var(--radius-full); margin: 2px; }
.holding--wide { grid-column: 1 / -1; text-align: left; }
.cloni-q { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.cloni-q:last-child { border-bottom: none; }
.cloni-q__n { font-family: var(--ff-serif); font-size: var(--fs-lg); color: var(--cream); min-width: 110px; }

/* Perfil: foto + firma */
.profile-grid { display: grid; grid-template-columns: 220px 1fr; gap: var(--sp-8); align-items: start; }
.photo-box { text-align: center; }
.photo-preview {
  width: 160px; height: 160px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border-mid); background: var(--gold-faint);
  margin: 0 auto var(--sp-4); display: block;
}
.sig-pad {
  width: 100%; height: 180px; background: #faf7f1; border-radius: var(--radius-sm);
  border: 1px solid var(--border-mid); touch-action: none; cursor: crosshair; display: block;
}
.sig-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-3); }

/* Tablas / listados */
.list { display: flex; flex-direction: column; gap: var(--sp-3); }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.15);
}
.row__main { display: flex; flex-direction: column; gap: 2px; }
.row__title { color: var(--cream); font-size: var(--fs-md); }
.row__meta { color: var(--text-muted); font-size: var(--fs-sm); }
.row__side { text-align: right; }
.badge { font-size: var(--fs-xs); letter-spacing: var(--ls-wide); text-transform: uppercase; padding: 3px 10px; border-radius: var(--radius-full); border: 1px solid var(--border-mid); }
.badge--pending   { color: #e6c98a; border-color: rgba(200,160,80,.5); }
.badge--confirmed, .badge--paid { color: #cfe6bf; border-color: rgba(120,180,90,.5); }
.badge--shipped   { color: #bfd7e6; border-color: rgba(90,150,180,.5); }
.badge--cancelled { color: #e6bfbf; border-color: rgba(180,90,90,.5); }

/* Compras (tienda) */
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-5); }
.product { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-5); background: var(--gold-faint); display: flex; flex-direction: column; }
.product.locked { opacity: 0.55; }
.product__name { font-family: var(--ff-serif); font-size: var(--fs-lg); color: var(--cream); margin-bottom: var(--sp-2); }
.product__desc { font-size: var(--fs-sm); color: var(--text-muted); line-height: var(--lh-normal); flex: 1; margin-bottom: var(--sp-4); }
.product__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.product__price { font-family: var(--ff-serif); font-size: var(--fs-xl); color: var(--gold-light); }
.product__price small { font-size: var(--fs-sm); color: var(--text-muted); }
.qty { display: flex; align-items: center; gap: var(--sp-2); }
.qty button { width: 28px; height: 28px; border-radius: var(--radius-sm); border: 1px solid var(--border-mid); background: rgba(0,0,0,.2); color: var(--cream); cursor: pointer; font-size: var(--fs-md); }
.qty span { min-width: 22px; text-align: center; color: var(--cream); }
.lock-note { font-size: var(--fs-xs); color: var(--gold-light); margin-top: var(--sp-3); }

.cart-bar {
  position: sticky; bottom: 0; z-index: var(--z-above);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  margin-top: var(--sp-8);
  padding: var(--sp-4) var(--sp-6);
  background: rgba(26,18,8,0.95);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
}
.cart-bar__total { font-family: var(--ff-serif); font-size: var(--fs-lg); color: var(--cream); }

/* Experiencias */
.exp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-5); }
.exp-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-6); background: linear-gradient(160deg, rgba(181,134,42,0.09), var(--gold-faint)); display: flex; flex-direction: column; }
.exp-card__type { font-size: var(--fs-xs); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--gold-light); margin-bottom: var(--sp-2); }
.exp-card__title { font-family: var(--ff-serif); font-size: var(--fs-xl); color: var(--cream); margin-bottom: var(--sp-3); line-height: var(--lh-tight); }
.exp-card__meta { display: flex; flex-wrap: wrap; gap: var(--sp-4); font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-4); }
.exp-card__desc { font-size: var(--fs-base); color: var(--text-muted); line-height: var(--lh-normal); flex: 1; margin-bottom: var(--sp-5); }
.exp-card__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.exp-card__reserve { display: flex; align-items: center; gap: var(--sp-2); }
.exp-card__reserve label { font-size: var(--fs-xs); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--text-muted); }
.exp-qty { width: 56px; background: rgba(0,0,0,0.28); border: 1px solid var(--border-mid); border-radius: var(--radius-sm); color: var(--cream); font-family: var(--ff-sans); font-size: var(--fs-md); padding: 0.4rem 0.5rem; text-align: center; }

.archive { margin-top: var(--sp-8); border-top: 1px solid var(--border); padding-top: var(--sp-4); }
.archive summary { cursor: pointer; color: var(--text-muted); font-size: var(--fs-sm); letter-spacing: var(--ls-wide); text-transform: uppercase; list-style: none; padding: var(--sp-2) 0; transition: color var(--t-base); }
.archive summary:hover { color: var(--text); }
.archive summary::-webkit-details-marker { display: none; }
.archive summary::before { content: "▸  "; color: var(--gold-light); }
.archive[open] summary::before { content: "▾  "; }

.voucher { font-family: var(--ff-mono); font-size: var(--fs-sm); color: var(--gold-light); letter-spacing: 0.06em; margin-top: 4px; }
.reservas-h { font-family: var(--ff-serif); font-size: var(--fs-xl); font-weight: 400; color: var(--text); margin-bottom: var(--sp-4); }
.badge--registrado { color: #e6c98a; border-color: rgba(200,160,80,.5); }
.badge--experience, .badge--pending { color: #e6c98a; border-color: rgba(200,160,80,.5); }

/* Mi propiedad */
.prop-layout { display: grid; grid-template-columns: 230px 1fr; gap: var(--sp-8); align-items: start; }
.subtabs { display: flex; flex-direction: column; gap: var(--sp-2); position: sticky; top: 84px; }
.subtab { text-align: left; background: none; border: 1px solid transparent; border-radius: var(--radius-md); color: var(--text-muted); font-family: var(--ff-sans); font-size: var(--fs-base); letter-spacing: .03em; padding: var(--sp-3) var(--sp-4); cursor: pointer; transition: all var(--t-base); }
.subtab:hover { color: var(--text); border-color: var(--border); }
.subtab.active { color: var(--cream); background: var(--gold-faint); border-color: var(--gold); }
.prop-hero { height: 230px; background-size: cover; background-position: center; border-radius: var(--radius-lg); position: relative; display: flex; align-items: flex-end; padding: var(--sp-6); overflow: hidden; }
.prop-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(26,18,8,.85), transparent 60%); }
.prop-hero__title { position: relative; z-index: 1; font-family: var(--ff-serif); font-size: var(--fs-2xl); color: var(--cream); }
.prop-desc { color: var(--text-muted); line-height: var(--lh-normal); margin: var(--sp-5) 0; max-width: 70ch; }
.prop-block { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-5); background: var(--gold-faint); margin-bottom: var(--sp-5); }
.prop-block__label { font-size: var(--fs-xs); letter-spacing: var(--ls-wider); text-transform: uppercase; color: var(--gold-light); margin-bottom: var(--sp-3); }
.prop-chips { display: flex; flex-wrap: wrap; }
.prop-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--sp-4); }
.fact { border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--sp-4); background: rgba(0,0,0,.12); }
.fact__label { display: block; font-size: var(--fs-xs); letter-spacing: var(--ls-wide); text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--sp-2); }
.fact__val { font-family: var(--ff-serif); font-size: var(--fs-lg); color: var(--cream); }
.fact__pending { color: var(--text-faint); font-style: italic; font-size: var(--fs-base); }
.muted-lead { color: var(--text-muted); }
.antecedente { font-size: var(--fs-base); color: var(--text); padding: var(--sp-2) 0; border-bottom: 1px solid var(--border); }
.antecedente:last-child { border-bottom: none; }
.expand-cta {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-6); flex-wrap: wrap;
  margin-top: var(--sp-10); padding: var(--sp-6) var(--sp-8);
  border: 1px solid var(--border-mid); border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(181,134,42,0.16), var(--gold-faint));
}
.expand-cta__text { display: flex; flex-direction: column; gap: 4px; }
.expand-cta__text strong { font-family: var(--ff-serif); font-size: var(--fs-xl); color: var(--cream); font-weight: 400; }
.expand-cta__text span { color: var(--text-muted); font-size: var(--fs-base); max-width: 60ch; }
@media (max-width: 720px) { .prop-layout { grid-template-columns: 1fr; } .subtabs { flex-direction: row; flex-wrap: wrap; position: static; } }

.empty { text-align: center; padding: var(--sp-16) var(--sp-4); color: var(--text-muted); }
.empty__icon { font-size: 2.4rem; opacity: .5; margin-bottom: var(--sp-3); }

.spinner { width: 26px; height: 26px; border: 2px solid var(--border-mid); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; margin: var(--sp-16) auto; }
@keyframes spin { to { transform: rotate(360deg); } }

.hint { font-size: var(--fs-xs); color: var(--text-faint); margin-top: var(--sp-2); }

@media (max-width: 720px) {
  .profile-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .row { flex-direction: column; align-items: flex-start; }
  .row__side { text-align: left; }
  .sign__plate { font-size: 0.62rem; padding: 3px 7px; }
}
