* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #090a1a;
  color: #e8ebff;
}
a { color: inherit; text-decoration: none; }
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px;
  background: #11142b;
  border-right: 1px solid #23284b;
  padding: 18px 14px;
}
.brand {
  font-weight: 800;
  font-size: 22px;
  color: #4fc3f7;
  margin-bottom: 14px;
}
.brand small { color: #9ab3cc; font-size: 12px; margin-left: 8px; }
.menu a {
  display: block;
  padding: 11px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  color: #b9c5e3;
  font-weight: 600;
}
.menu a.active, .menu a:hover {
  background: #1d2548;
  color: #4fc3f7;
}
.content { flex: 1; padding: 20px; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.title { font-size: 28px; font-weight: 800; margin: 0; }
.muted { color: #8d9ab8; }
.card {
  background: #12172f;
  border: 1px solid #252d52;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 12px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.price-unit-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
}
label { display: block; margin-bottom: 6px; font-size: 13px; color: #9ab3cc; }
input, textarea, select {
  width: 100%;
  background: #0e1330;
  color: #e8ebff;
  border: 1px solid #2a335f;
  border-radius: 10px;
  padding: 10px 12px;
}
textarea { min-height: 90px; resize: vertical; }
.btn {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: #00bcd4; color: #041018; }
.btn-success { background: #0e7490; color: #fff; }
.btn-danger { background: #e94560; color: #fff; }
.btn-secondary { background: #fff; color: #0891b2; border: 1.5px solid rgba(0, 188, 212, 0.4); }
.row { display: flex; gap: 8px; align-items: center; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { border-bottom: 1px solid #252d52; padding: 10px 8px; text-align: left; }
.table th { color: #9ab3cc; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.alert { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-weight: 600; }
.alert-ok { background: rgba(76,175,80,.15); border: 1px solid rgba(76,175,80,.4); color: #98ef9b; }
.alert-error { background: rgba(233,69,96,.15); border: 1px solid rgba(233,69,96,.4); color: #ff96a7; }
.auth-wrap { max-width: 460px; margin: 40px auto; }
.preview {
  width: 100%;
  height: 140px;
  border-radius: 12px;
  background: #0e1330 center/cover no-repeat;
  border: 1px dashed #304079;
}
.badge { padding: 3px 8px; border-radius: 999px; font-size: 12px; background: #1f2a54; color: #4fc3f7; }
.hint { color: #7f90bb; font-size: 12px; margin: 6px 0 0 0; }
.location-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.map-canvas {
  width: 100%;
  height: 280px;
  border-radius: 12px;
  border: 1px solid #2f3a67;
  overflow: hidden;
  background: #0e1330;
}
.address-suggestions {
  margin-top: 6px;
  border: 1px solid #2a335f;
  border-radius: 10px;
  overflow: hidden;
  background: #0e1330;
}
.address-suggestion-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #1f274b;
  background: #0e1330;
  color: #dce5ff;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
}
.address-suggestion-item:hover {
  background: #17204a;
}
.address-suggestion-item:last-child {
  border-bottom: 0;
}
.schedule-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.schedule-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 8px;
  align-items: center;
}
.schedule-day {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.product-preview { height: 170px; }
.size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.size-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border: 1px solid #2a335f;
  border-radius: 10px;
  background: #0e1330;
}
.size-item span {
  color: #c9d4f3;
  font-weight: 600;
  font-size: 12px;
}
.size-item input {
  padding: 8px 10px;
}
.extras-editor {
  margin-top: 4px;
}
.extras-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 4px;
}
.extra-line-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  margin-bottom: 8px;
  background: #0e1330;
  border: 1px solid #2a335f;
  border-radius: 10px;
}
.extra-line-field input {
  margin-bottom: 0;
}
.extra-line-label {
  display: block;
  font-size: 11px;
  color: #9ab3cc;
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.extra-line-remove {
  padding: 10px 14px;
  font-size: 13px;
  white-space: nowrap;
}
.extras-add-btn {
  margin-top: 4px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.gallery-card {
  background: #0e1330;
  border: 1px solid #2a335f;
  border-radius: 12px;
  overflow: hidden;
  padding: 10px;
}
.gallery-thumb-wrap {
  border-radius: 10px;
  overflow: hidden;
  background: #12172f;
  aspect-ratio: 4 / 3;
}
.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-caption {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: #c9d4f3;
  line-height: 1.35;
}
.gallery-card-actions {
  margin-top: 10px;
}
.gallery-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.gallery-preview-item {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2a335f;
  flex-shrink: 0;
}
.gallery-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.table-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #2d3865;
  display: block;
}
.table-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0e1330;
  color: #8d9ab8;
  font-weight: 700;
}
/* --- Landing pública (comerciantes) --- */
.public-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid #23284b;
  background: rgba(17, 20, 43, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.public-nav-brand {
  font-weight: 800;
  font-size: 20px;
  color: #4fc3f7;
}
.public-nav-brand span {
  color: #9ab3cc;
  font-weight: 600;
  font-size: 14px;
  margin-left: 6px;
}
.public-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.public-nav-link {
  color: #b9c5e3;
  font-weight: 600;
  padding: 8px 12px;
}
.public-nav-link:hover {
  color: #4fc3f7;
}
.landing {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}
.landing-hero {
  margin-bottom: 40px;
}
.landing-kicker {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #4fc3f7;
}
.landing-title {
  margin: 0 0 16px;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  color: #f0f3ff;
}
.landing-lead {
  margin: 0 0 22px;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #b9c5e3;
  max-width: 52rem;
}
.landing-lead strong {
  color: #e8ebff;
}
.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.landing-cta-main {
  padding: 12px 20px;
  font-size: 15px;
}
.landing-section {
  margin-bottom: 36px;
}
.landing-h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 800;
}
.landing-p {
  margin: 0 0 18px;
  line-height: 1.55;
}
.landing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.landing-card {
  background: #12172f;
  border: 1px solid #252d52;
  border-radius: 14px;
  padding: 18px;
}
.landing-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #e8ebff;
}
.landing-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}
.landing-band {
  background: linear-gradient(135deg, #12172f 0%, #151a3d 100%);
  border: 1px solid #252d52;
  border-radius: 16px;
  padding: 22px 22px 18px;
}
.landing-list {
  margin: 0;
  padding-left: 1.2rem;
  color: #b9c5e3;
  line-height: 1.65;
}
.landing-list li {
  margin-bottom: 8px;
}
.landing-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  color: #c9d4f3;
  line-height: 1.6;
}
.landing-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.landing-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #1d2548;
  border: 1px solid #304079;
  color: #4fc3f7;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.landing-footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid #23284b;
  font-size: 13px;
}
.auth-back {
  max-width: 460px;
  margin: 24px auto 0;
  padding: 0 16px;
}
.auth-back a {
  color: #7f9fd4;
  font-weight: 600;
  font-size: 14px;
}
.auth-back a:hover {
  color: #4fc3f7;
}
.public-nav-btn {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 8px 12px;
}
body.modal-open {
  overflow: hidden;
}

/* Popup login en landing: id + clases propias para no chocar con `.modal` de otros CSS */
#login-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#login-modal.is-open {
  display: flex;
}
#login-modal .login-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 18, 0.75);
  backdrop-filter: blur(4px);
}
#login-modal .login-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 0;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
#login-modal .login-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
#login-modal .login-modal-head h3 {
  margin: 0;
  font-size: 1.15rem;
}
#login-modal .login-modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: #252d4f;
  color: #d7def7;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
#login-modal .login-modal-close:hover {
  background: #323a66;
  color: #fff;
}
#login-modal .login-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .landing-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .location-meta { grid-template-columns: 1fr; }
  .schedule-row { grid-template-columns: 1fr; }
  .extra-line-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .extra-line-remove {
    justify-self: start;
  }
  .price-unit-pair {
    grid-template-columns: 1fr;
  }
}
