:root {
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    --bg: #17181c; --card: #1e1f24; --card-2: #25262c; --border: #33353d;
    --text: #f4f5f7; --muted: #8d9099; --accent: #0a84ff; --warn: #ff9f0a; --ok: #30d158; --bad: #ff453a;
  }
  html { scroll-padding-top: env(safe-area-inset-top, 0px); }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--bg); color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex; justify-content: center; padding: 48px 16px; }
  body.admin-on { padding-bottom: 120px; }
  [hidden] { display: none !important; }
  #app { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 16px; }
  .card { background: linear-gradient(180deg, #202126, #1c1d21); border: 1px solid var(--border); border-radius: 32px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.35); }
  .banner { height: 120px; background: linear-gradient(180deg, #0d4a8f 0%, #08213d 70%, #061526 100%); border-bottom: 1px solid #12335a; }
  .profile { padding: 0 28px 28px; text-align: center; margin-top: -52px; }
  .avatar-wrap { position: relative; width: 104px; height: 104px; margin: 0 auto; }
  .avatar { width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #3aa0ff, #0b3a78 70%); border: 3px solid #0c2848; box-shadow: 0 0 30px rgba(10,132,255,.4); display: flex; align-items: center; justify-content: center; font-size: 40px; }
  .dot { position: absolute; right: 4px; bottom: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); border: 2px solid #1c1d21; }
  h1 { margin: 16px 0 6px; font-size: 26px; letter-spacing: -.5px; overflow-wrap: anywhere; }
  .handle { color: var(--muted); font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
  .check { width: 17px; height: 17px; border-radius: 50%; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
  .check svg { width: 10px; height: 10px; }
  .pill { display: inline-block; margin-top: 14px; padding: 6px 14px; border-radius: 999px; background: #12304f; border: 1px solid #1d4b7c; color: #cfe6ff; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
  .stat { margin-top: 18px; border: 1px solid var(--border); background: var(--card); border-radius: 20px; padding: 22px 12px; }
  .stat b { display: block; font-size: 24px; }
  .stat span { color: var(--muted); font-size: 12px; letter-spacing: .5px; }
  .btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 50px; border-radius: 25px; font-size: 16px; font-weight: 700; border: 1px solid var(--border); color: var(--text); cursor: pointer; margin-top: 16px; font-family: inherit; text-decoration: none; background: none; }
  .btn.primary { background: linear-gradient(180deg, #2a96ff, #0a7bff); border-color: #0a84ff; box-shadow: 0 8px 24px rgba(10,132,255,.35); }
  .btn.ghost { background: var(--card-2); margin-top: 10px; }
  .btn .ico { display: inline-flex; }
  .btn svg { width: 18px; height: 18px; }
  .btn:focus-visible, .in:focus-visible, .btn-s:focus-visible, .icon-btn:focus-visible, .search:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

  .catalog { padding: 24px 22px 22px; }
  .eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; padding: 0 6px; }
  .head { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 14px; }
  .head h2 { margin: 0; font-size: 22px; letter-spacing: -.4px; }
  .head small { color: var(--muted); font-size: 12px; }
  .search { width: 100%; height: 44px; border-radius: 14px; border: 1px solid var(--border); background: var(--card-2); color: var(--text); padding: 0 14px; font-size: 15px; font-family: inherit; }
  .search::placeholder, .in::placeholder { color: #6d7079; }
  .list { margin-top: 16px; max-height: 620px; overflow-y: auto; padding-right: 4px; }
  body.admin-on .list { max-height: none; }
  .cat { margin: 14px 4px 10px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #cfd8ea; }
  .cat.destacadas { color: var(--warn); }
  .store { background: var(--card-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; }
  .store.editing { border-color: var(--accent); }
  .store .name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
  .store .nm { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .req-box { margin-top: 10px; border-radius: 10px; border: 1px dashed #43454e; background: #1b1c20; color: #c9ccd4; padding: 9px 12px; font-size: 13px; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
  .req-box.vacio { color: #6d7079; font-style: italic; }
  .empty, .hint { color: var(--muted); text-align: center; padding: 18px 0; font-size: 14px; }
  .empty { display: none; }

  .cat-head { display: flex; align-items: center; gap: 8px; margin: 14px 4px 10px; }
  .cat-head .cat { margin: 0; flex: 1; }
  .acts { display: flex; gap: 6px; flex: none; }
  .icon-btn { height: 30px; min-width: 30px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--border); background: #1b1c20; color: var(--text); font-size: 14px; cursor: pointer; font-family: inherit; }
  .icon-btn.on { border-color: var(--warn); color: var(--warn); }
  .icon-btn.danger { border-color: #7a2630; background: #3a1a1f; color: #ffb4bb; font-size: 12px; font-weight: 700; padding: 0 10px; }

  .panel { margin-top: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: #1a1b1f; display: flex; flex-direction: column; gap: 10px; }
  .panel.flat { margin-top: 0; border: 0; padding: 0; background: none; }
  .panel h3 { margin: 0; font-size: 14px; }
  .row { display: flex; gap: 8px; }
  .in { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: #1b1c20; color: var(--text); padding: 0 12px; font: inherit; font-size: 14px; }
  textarea.in { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; }
  .in.emo { width: 64px; flex: none; text-align: center; }
  .chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #cfd2da; }
  .btn-s { height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-2); color: var(--text); font: inherit; font-weight: 700; font-size: 13px; padding: 0 14px; cursor: pointer; white-space: nowrap; }
  .btn-s.primary { background: var(--accent); border-color: var(--accent); }
  .btn-s:disabled { opacity: .45; cursor: not-allowed; }
  .settings { padding: 22px 22px 24px; }
  .settings h2 { margin: 0 0 14px; font-size: 18px; }
  .fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
  .lbl { font-size: 12px; color: var(--muted); }
  .admin-bar { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: rgba(23,24,28,.97); border-top: 1px solid var(--border); display: none; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; z-index: 10; }
  .bar-msg { font-size: 13px; color: #cfd2da; }

  .empty { display: block; }
  .hint-l { color: var(--muted); font-size: 14px; margin: 0 0 14px; line-height: 1.5; }
  .hint-l a { color: var(--accent); }
  .auth { padding: 0; }
  .auth-in { padding: 36px 28px 32px; }
  .auth-in h1 { margin: 0 0 8px; font-size: 22px; text-align: left; }
  .auth-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
  .btn-s.wide { width: 100%; height: 44px; font-size: 15px; }
  .err { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: #3a1a1f; border: 1px solid #7a2630; color: #ffb4bb; font-size: 14px; }
  .logout { margin-top: 4px; }
  .req-box.vacio { color: #6d7079; font-style: italic; }
