/* Estilo oscuro (tipo Whop) para la cuenta del cliente, el diseñador y el panel de ANWI */
:root { --bg: #111111; --side: #0c0c0c; --card: #1a1a1a; --card-2: #202020; --line: #2b2b2b; --line-2: #3f3f46; --text: #f4f4f5; --muted: #a1a1aa; --violet: #a78bfa; --orange: #f97316; --ok: #4ade80; --err: #f87171; }
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { background: var(--bg); color: var(--text); font-family: "Inter", system-ui, sans-serif; min-height: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-family: "Outfit", sans-serif; font-weight: 900; letter-spacing: 1.5px; font-size: 1.15rem; text-decoration: none; }
.brand svg { width: 24px; height: 28px; overflow: visible; }
.logo__letter { fill: none; stroke: url(#gradA); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.logo__string { stroke: #fff; stroke-width: 1.4; stroke-linecap: round; opacity: .6; }
.logo__pivot { fill: #fff; }

/* Botones y campos */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .78rem 1.15rem; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: .95rem; cursor: pointer; text-decoration: none; transition: background .2s, transform .15s, border-color .2s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn--white { background: #fff; color: #111; }
.btn--white:hover { background: #e4e4e7; }
.btn--dark { background: #222; border-color: var(--line-2); }
.btn--dark:hover { background: #2a2a2a; }
.btn--grad { background: linear-gradient(120deg, #7c3aed, #f97316); color: #fff; }
.btn--sm { padding: .5rem .8rem; font-size: .85rem; }
.btn--block { width: 100%; }
.field { display: grid; gap: .35rem; font-size: .85rem; font-weight: 500; color: #d4d4d8; }
.field small { color: var(--muted); font-weight: 400; }
.input { width: 100%; background: #151515; border: 1px solid var(--line); border-radius: 10px; padding: .72rem .85rem; font-size: 16px; color: var(--text); transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(167, 139, 250, .18); }
textarea.input { resize: vertical; min-height: 84px; }
.err { color: var(--err); font-size: .85rem; min-height: 1.2em; }
.muted { color: var(--muted); }

/* ===== Página de registro / inicio de sesión ===== */
.auth { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.auth__top { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid #1f1f1f; }
.auth__top a.muted { font-size: .9rem; text-decoration: none; }
.auth__main { display: grid; place-items: center; padding: 32px 16px 48px; }
.auth__box { width: min(400px, 100%); display: grid; gap: 1.1rem; animation: in .5s cubic-bezier(.2, .8, .2, 1) both; }
.auth__box h1 { font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; text-align: center; }
.auth__box > p { text-align: center; color: var(--muted); margin-top: -.6rem; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; background: #151515; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.tabs2 button { border: 0; background: none; padding: .6rem; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs2 button.on { background: #262626; color: var(--text); }
.perks { display: grid; gap: .5rem; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: .88rem; color: #d4d4d8; }
.perks span::before { content: "✓ "; color: var(--violet); font-weight: 700; }
.google { display: grid; gap: 1rem; }
.google__btn { display: flex; justify-content: center; min-height: 44px; }
.divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .8rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@keyframes in { from { opacity: 0; transform: translateY(16px); } }

/* ===== App del cliente ===== */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid #1c1c1c; padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .brand { padding: 6px 10px 14px; }
.side__label { color: #71717a; font-size: .75rem; font-weight: 600; padding: 10px 10px 4px; }
.nav-item { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem .7rem; border: 0; border-radius: 9px; background: none; color: #d4d4d8; font-weight: 500; cursor: pointer; text-align: left; text-decoration: none; }
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-item:hover { background: #181818; }
.nav-item.on { background: #1f1f1f; color: #fff; }
.side__foot { margin-top: auto; border-top: 1px solid #1c1c1c; padding-top: 10px; }
.me { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .85rem; background: linear-gradient(135deg, #7c3aed, #f97316); flex: none; }
.me div { min-width: 0; }
.me b { display: block; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { display: block; color: var(--muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { min-width: 0; padding: 28px 32px 60px; }
.view { max-width: 1100px; animation: in .35s both; }
.view__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.view__head h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: .3rem; }
.card p { color: var(--muted); font-size: .9rem; }
.big-number { font-size: 2.2rem; font-weight: 700; letter-spacing: -.03em; }
.status { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; padding: .25rem .65rem; border-radius: 999px; background: #262626; color: var(--muted); }
.status.on { background: rgba(74, 222, 128, .12); color: var(--ok); }
.status.on::before { content: "●"; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.steps { display: grid; gap: 8px; margin-top: .8rem; }
.steps li { list-style: none; display: flex; align-items: center; gap: .6rem; font-size: .92rem; color: #d4d4d8; }
.steps li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; }
.steps li.done { color: var(--muted); text-decoration: line-through; }
.steps li.done::before { background: var(--ok); border-color: var(--ok); }
.progress { height: 6px; background: #262626; border-radius: 99px; overflow: hidden; margin-top: .9rem; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #7c3aed, #f97316); border-radius: 99px; transition: width .5s; }
.reco { display: flex; gap: .9rem; align-items: center; cursor: pointer; transition: background .2s, border-color .2s; text-decoration: none; }
.reco:hover { background: var(--card-2); border-color: var(--line-2); }
.reco .ico { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 1.6rem; background: #262626; flex: none; }

/* Diseñador */
.designer { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.panel { display: grid; gap: 14px; }
.sec { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 12px; }
.sec h2 { font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.emojis, .swatches, .styles { display: flex; flex-wrap: wrap; gap: 8px; }
.emojis button { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: #151515; font-size: 1.3rem; cursor: pointer; }
.emojis button.on { border-color: var(--violet); background: #221d33; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; box-shadow: 0 0 0 1px var(--line-2); }
.swatches button.on { border-color: #fff; }
.swatches input[type=color] { width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; cursor: pointer; padding: 0; }
.styles button { flex: 1; min-width: 90px; padding: .6rem; border-radius: 10px; border: 1px solid var(--line); background: #151515; cursor: pointer; font-weight: 600; font-size: .85rem; }
.styles button.on { border-color: var(--violet); background: #221d33; }
.prod { display: grid; grid-template-columns: 52px 1fr 110px 36px; gap: 8px; align-items: start; padding: 10px; background: #151515; border: 1px solid var(--line); border-radius: 12px; }
.prod .input { padding: .55rem .65rem; }
.prod .desc { grid-column: 2 / 4; }
.prod .x { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: none; cursor: pointer; color: var(--muted); }
.prod .x:hover { color: var(--err); border-color: var(--err); }
.prod .emo { text-align: center; font-size: 1.2rem; }
.saved { font-size: .82rem; color: var(--muted); }
.saved.ok { color: var(--ok); }
.phone { position: sticky; top: 20px; background: #000; border: 1px solid #2b2b2b; border-radius: 38px; padding: 12px; box-shadow: 0 30px 60px -30px rgba(124, 58, 237, .5); }
.phone iframe { width: 100%; height: 700px; border: 0; border-radius: 28px; background: #fff; display: block; }
.phone__bar { display: flex; justify-content: center; margin-bottom: 8px; }
.phone__bar i { width: 90px; height: 6px; border-radius: 99px; background: #262626; }
.mobile-toggle { display: none; }

/* Mi página */
.link-box { display: flex; gap: 8px; align-items: center; background: #151515; border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; }
.link-box a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; color: var(--violet); }
.switch { position: relative; width: 48px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #3f3f46; transition: .25s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .25s; }
.switch input:checked + span { background: #16a34a; }
.switch input:checked + span::before { transform: translateX(20px); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: #fff; color: #111; font-weight: 600; padding: .7rem 1.1rem; border-radius: 10px; transition: .3s; z-index: 90; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Celular */
.bottom-nav { display: none; }
@media (max-width: 900px) {
  .designer { grid-template-columns: 1fr; }
  .phone { display: none; position: static; }
  .designer.show-preview .panel { display: none; }
  .designer.show-preview .phone { display: block; }
  .mobile-toggle { display: grid; grid-template-columns: 1fr 1fr; background: #151515; border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 14px; }
  .mobile-toggle button { border: 0; background: none; padding: .55rem; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; }
  .mobile-toggle button.on { background: #262626; color: var(--text); }
  .phone iframe { height: 620px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 18px 16px 96px; }
  .topbar-m { display: flex !important; }
  .bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(12, 12, 12, .96); backdrop-filter: blur(10px); border-top: 1px solid #1f1f1f; padding: 6px 6px max(6px, env(safe-area-inset-bottom)); }
  .bottom-nav button { border: 0; background: none; color: var(--muted); display: grid; justify-items: center; gap: 2px; font-size: .7rem; font-weight: 600; padding: .35rem 0; cursor: pointer; }
  .bottom-nav button svg { width: 20px; height: 20px; }
  .bottom-nav button.on { color: #fff; }
  .two { grid-template-columns: 1fr; }
  .prod { grid-template-columns: 46px 1fr 36px; }
  .prod .precio { grid-column: 2 / 3; }
  .prod .desc { grid-column: 1 / 4; }
}
.topbar-m { display: none; align-items: center; justify-content: space-between; margin-bottom: 16px; }
