:root{
    --bg:#0b1320;
    --panel: rgba(255,255,255,0.05);
    --card: rgba(255,255,255,0.06);
    --border: rgba(255,255,255,0.10);
    --text: rgba(255,255,255,0.92);
    --muted: rgba(255,255,255,0.65);
    --shadow: 0 12px 30px rgba(0,0,0,0.25);
    --radius: 16px;
  }

  *{ box-sizing:border-box; }
  body{
    margin:0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background:
      radial-gradient(1200px 600px at 50% 10%, rgba(92,200,255,0.18), transparent 60%),
      radial-gradient(1000px 500px at 70% 20%, rgba(134,255,189,0.12), transparent 60%),
      var(--bg);
    min-height:100vh;
  }

  a{ color: inherit; }
  .wrap{ max-width: 980px; margin: 0 auto; padding: 26px 18px 60px; }
  .hero{ text-align:center; margin-bottom:18px; }
  .hero h1{ margin:0 0 6px; font-size:40px; letter-spacing:0.2px; }
  .hero p{ margin:0; color: var(--muted); }

  .topbar{ display:flex; justify-content:flex-end; align-items:center; margin-top:-10px; margin-bottom:10px; }
  .adminbtn{
    display:inline-block;
    padding:6px 12px;
    border:1px solid var(--border);
    border-radius:999px;
    background: rgba(255,255,255,0.04);
    color: var(--text);
    text-decoration:none;
    font-size:13px;
  }

  .panel{
    background: var(--panel);
    border:1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 14px;
    margin: 12px auto;
    max-width: 920px;
  }

  .subline{ text-align:center; color: var(--muted); margin-top:-6px; margin-bottom:10px; }

  .askrow{
    display:flex;
    gap:10px;
    align-items:center;
    justify-content:center;
    margin:0 auto;
    max-width: 920px;
  }

  input[type="text"]{
    flex:1;
    min-width:220px;
    padding:14px 16px;
    border-radius:14px;
    border:1px solid var(--border);
    background: rgba(0,0,0,0.18);
    color: var(--text);
    outline:none;
    font-size:15px;
  }
  input[type="text"]::placeholder{ color: rgba(255,255,255,0.60); }

  .btn{
    padding:12px 18px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,0.14);
    background: rgba(92,200,255,0.18);
    color: var(--text);
    font-weight:700;
    cursor:pointer;
    user-select:none;
  }

  .pills{
    display:flex; flex-wrap:wrap; gap:10px; justify-content:center; margin-top:14px;
  }
  .pill{
    padding:10px 14px;
    border-radius:999px;
    border:1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text);
    cursor:pointer;
    font-size:14px;
    display:flex; gap:8px; align-items:center;
    user-select:none;
  }

  .resultsHead{
    max-width: 920px;
    margin: 12px auto 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.18);
    color: var(--muted);
    font-size: 14px;
  }

  .barline{
    display:flex;
    gap:10px;
    align-items:center;
    justify-content:flex-start;
    flex-wrap:wrap;
    margin: 10px auto 0;
    max-width: 920px;
  }

  .pillSmall{
    padding:8px 12px;
    border-radius:999px;
    border:1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text);
    font-size:13px;
    user-select:none;
  }

  .filters{
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
    margin: 10px auto 14px;
    max-width: 920px;
  }
  .filters label{ color: var(--muted); font-size: 13px; margin-right: 6px; }
  .filters select, .filters input{
    padding:10px 12px;
    border-radius:12px;
    border:1px solid var(--border);
    background: rgba(0,0,0,0.18);
    color: var(--text);
    outline:none;
    font-size: 14px;
  }
  .filters .clearBtn{
    padding:10px 14px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: var(--text);
    cursor:pointer;
    font-weight:700;
  }

  .grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

  .card{
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--card);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  box-shadow: var(--shadow);
  border-color: rgba(0,0,0,0.35);
  }
  .card:hover{
  transform: translateY(-1px);
  }
  .card:focus{
    outline:none;
    box-shadow: 0 0 0 4px rgba(31,75,153,.14), var(--shadow);
  }

  .name{ font-weight:800; margin-bottom:6px; letter-spacing:-0.1px;}

  .row{ font-size:14px; margin:3px 0; }
  .label{ color: var(--muted); }

  /* PHASE 12B.3 — Card quick actions (reuses modal wiring; frontend-only) */
  .card-actions { display:flex; gap:10px; margin-top:10px; align-items:center; }
  .card-actions a{
    width:38px; height:34px;
    display:flex; align-items:center; justify-content:center;
    border:1px solid var(--border);
    border-radius:12px;
    background:rgba(255,255,255,0.04);
    text-decoration:none;
    color:inherit;
    user-select:none;
  }
  .card-actions a:hover { box-shadow: var(--shadow); border-color: rgba(0,0,0,0.35); }
  .card-actions a:focus { outline:none; box-shadow: 0 0 0 4px rgba(31,75,153,.14), var(--shadow); }

  .err{
    display:none;
    max-width:920px;
    margin: 10px auto 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,92,122,0.35);
    background: rgba(255,92,122,0.10);
    color: rgba(255,255,255,0.90);
  }

  /* modal */
  #backdrop{
    display:none;
    position:fixed;
    inset:0;
    background: rgba(0,0,0,0.5);
    align-items:center;
    justify-content:center;
    padding:18px;
    z-index:50;
  }
  .modal{
    width: min(720px, 96vw);
    background: rgba(15,23,40,0.92);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 18px;
    box-shadow: 0 22px 60px rgba(0,0,0,0.45);
    overflow:hidden;
  }
  .modal-head{
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    display:flex;
    justify-content:space-between;
    align-items:start;
    gap:12px;
  }
  .modal-title{ margin:0; font-size:20px; font-weight:900; }
  .modal-sub{ margin:2px 0 0; color: var(--muted); font-size:13px; }
  .x{
    border:1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.04);
    border-radius:12px;
    cursor:pointer;
    padding:8px 10px;
    color: var(--text);
    font-weight:800;
  }
  .modal-body{ padding: 14px 16px; }
  .kv{ display:grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size:14px; }
  .kv .k{ color: rgba(255,255,255,0.55); }
  .kv .v{ color: rgba(255,255,255,0.90); word-break:break-word; }
  
  /* MODAL ACTION BUTTONS */
  .modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
  }
  .modal-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.92);
    text-decoration: none;
    font-weight: 600;
    line-height: 1;
    user-select: none;
  }
  .modal-action:hover {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.22);
  }
  .modal-action .ico {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

/* RESULTS CARD – hierarchy spacing (mobile-first) */
.card .name{ margin-bottom:6px; }
.card .desc{ margin:6px 0 8px; }
.card .pills{ margin:6px 0; }
.card .meta{ margin:6px 0 8px; opacity:.85; }
.card .card-actions{ margin-top:8px; }


/* RESULTS CARD – section dividers (layout only) */
.card .name{ padding-bottom:4px; }
.card .name::after{
  content:"";
  display:block;
  height:1px;
  margin-top:4px;
  background:linear-gradient(to right, rgba(255,255,255,.18), rgba(255,255,255,.05));
}

.card .pills{ padding-top:6px; padding-bottom:6px; }
.card .pills::after{
  content:"";
  display:block;
  height:1px;
  margin-top:6px;
  background:linear-gradient(to right, rgba(255,255,255,.12), rgba(255,255,255,.04));
}

.card .meta{ padding-top:4px; padding-bottom:6px; }
.card .meta::after{
  content:"";
  display:block;
  height:1px;
  margin-top:6px;
  background:linear-gradient(to right, rgba(255,255,255,.10), rgba(255,255,255,.03));
}

.card .card-actions{ padding-top:6px; }


/* RESULTS CARD – divider depth (tiny shadow) */
.card .name::after,
.card .pills::after,
.card .meta::after{
  box-shadow: 0 1px 1px rgba(0,0,0,.12);
}



/* RESULTS CARD – hide duplicate deal-pill row (keep top pills under title) */
.card .desc ~ .pills{
  display:none !important;
}

