/* Theo Properties RC1.0.15.129.8 — Admin Growth + Referrals Mobile/Tablet Premium SaaS Lock
   Presentation authority for Acquisition CRM, Referrals/Rewards, Affiliate administration,
   and the combined Referrals & Affiliates hub. No commercial/referral/acquisition logic changed. */

:root{
  --g1298-navy:#10344b;
  --g1298-navy-2:#17465f;
  --g1298-gold:#bd7e22;
  --g1298-gold-soft:#fff8ec;
  --g1298-blue:#4f87cf;
  --g1298-blue-soft:#f2f7fd;
  --g1298-teal:#2d967e;
  --g1298-teal-soft:#eff9f6;
  --g1298-violet:#7466b6;
  --g1298-violet-soft:#f5f3fb;
  --g1298-line:#d9e5ec;
  --g1298-muted:#748997;
  --g1298-shadow:0 12px 34px rgba(15,48,70,.055),0 2px 7px rgba(15,48,70,.025);
}

/* --------------------------------------------------------------------------
   Acquisition / Owner Growth Pipeline — shared premium primitives
   -------------------------------------------------------------------------- */
.theo-admin .acq-admin-page{
  min-width:0;
}
.theo-admin .acq-admin-page .acq-admin-head h2{
  letter-spacing:-.035em;
}
.theo-admin .acq-admin-page .acq-metrics>div,
.theo-admin .acq-admin-page .acq-stage,
.theo-admin .acq-admin-page .acq-toolbar,
.theo-admin .acq-admin-page .acq-table-wrap,
.theo-admin .acq-admin-page .acq-panel{
  box-shadow:var(--g1298-shadow);
}
.theo-admin .acq-admin-page .acq-metrics>div,
.theo-admin .acq-admin-page .acq-stage{
  position:relative;
  overflow:hidden;
}
.theo-admin .acq-admin-page .acq-metrics>div::before,
.theo-admin .acq-admin-page .acq-stage::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:3px;
  border-radius:0 999px 999px 0;
  background:var(--g1298-blue);
}
.theo-admin .acq-admin-page .acq-metrics>div:nth-child(2)::before,
.theo-admin .acq-admin-page .acq-stage:nth-child(2)::before{background:var(--g1298-teal)}
.theo-admin .acq-admin-page .acq-metrics>div:nth-child(3)::before,
.theo-admin .acq-admin-page .acq-stage:nth-child(3)::before{background:var(--g1298-gold)}
.theo-admin .acq-admin-page .acq-metrics>div:nth-child(4)::before,
.theo-admin .acq-admin-page .acq-stage:nth-child(4)::before{background:var(--g1298-violet)}
.theo-admin .acq-admin-page .acq-metrics>div:nth-child(5)::before,
.theo-admin .acq-admin-page .acq-stage:nth-child(5)::before{background:#5b9f8a}
.theo-admin .acq-admin-page .acq-metrics>div:nth-child(6)::before,
.theo-admin .acq-admin-page .acq-stage:nth-child(6)::before{background:#c68b36}
.theo-admin .acq-admin-page .acq-stage:nth-child(7)::before{background:#287f67}

/* --------------------------------------------------------------------------
   Tablet — 701–1180px
   -------------------------------------------------------------------------- */
@media (min-width:701px) and (max-width:1180px){
  .theo-admin .acq-admin-page{gap:16px!important}
  .theo-admin .acq-admin-head{
    align-items:flex-start!important;
    gap:18px!important;
    padding:20px 21px!important;
    border:1px solid var(--g1298-line)!important;
    border-radius:18px!important;
    background:linear-gradient(135deg,#fff 0%,#fbfdfe 74%,#fff8ec 100%)!important;
    box-shadow:var(--g1298-shadow)!important;
  }
  .theo-admin .acq-admin-head>div:first-child{min-width:0;max-width:760px}
  .theo-admin .acq-admin-head h2{font-size:32px!important;margin-top:6px!important}
  .theo-admin .acq-admin-head p{font-size:14px!important;line-height:1.55!important}
  .theo-admin .acq-head-actions{flex:0 0 auto!important;align-self:flex-end!important}
  .theo-admin .acq-head-actions .table-btn,
  .theo-admin .acq-head-actions .primary{min-height:43px!important;padding:0 15px!important}

  .theo-admin .acq-metrics{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:10px!important;
    border:0!important;
    background:transparent!important;
    overflow:visible!important;
  }
  .theo-admin .acq-metrics>div{
    min-height:112px!important;
    padding:17px 17px 15px 19px!important;
    border:1px solid var(--g1298-line)!important;
    border-radius:15px!important;
    background:linear-gradient(145deg,#fff,#f7fbfe)!important;
  }
  .theo-admin .acq-metrics>div:nth-child(2),
  .theo-admin .acq-metrics>div:nth-child(5){background:linear-gradient(145deg,#fff,var(--g1298-teal-soft))!important}
  .theo-admin .acq-metrics>div:nth-child(3),
  .theo-admin .acq-metrics>div:nth-child(6){background:linear-gradient(145deg,#fff,var(--g1298-gold-soft))!important}
  .theo-admin .acq-metrics>div:nth-child(4){background:linear-gradient(145deg,#fff,var(--g1298-violet-soft))!important}
  .theo-admin .acq-metrics strong{font-size:25px!important;margin-top:8px!important}

  .theo-admin .acq-funnel{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important}
  .theo-admin .acq-stage{min-height:94px!important;padding:14px 13px 12px 16px!important;border-radius:14px!important}
  .theo-admin .acq-stage strong{font-size:22px!important}

  .theo-admin .acq-toolbar{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:10px!important;
    padding:14px!important;
    border-radius:16px!important;
  }
  .theo-admin .acq-toolbar .acq-search{grid-column:1/-1!important;min-width:0!important}
  .theo-admin .acq-toolbar input,
  .theo-admin .acq-toolbar select{width:100%!important;min-width:0!important;min-height:44px!important}

  /* Tablet lead cards instead of a 1000px-wide compressed table */
  .theo-admin .acq-table-wrap{overflow:visible!important;padding:12px!important;border-radius:16px!important}
  .theo-admin .acq-table{min-width:0!important;display:block!important}
  .theo-admin .acq-table thead{display:none!important}
  .theo-admin .acq-table tbody{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .theo-admin .acq-table tbody tr{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px 14px!important;padding:15px!important;border:1px solid #e0e9ee!important;border-radius:14px!important;background:#fff!important;box-shadow:0 5px 16px rgba(15,48,70,.025)!important;min-width:0!important}
  .theo-admin .acq-table tbody td{display:block!important;padding:0!important;border:0!important;min-width:0!important;overflow-wrap:anywhere!important}
  .theo-admin .acq-table tbody td::before{display:block!important;margin-bottom:4px!important;color:#8798a4!important;font-size:9px!important;line-height:1.15!important;font-weight:800!important;letter-spacing:.08em!important;text-transform:uppercase!important}
  .theo-admin .acq-table tbody td:nth-child(1)::before{content:"Lead"}
  .theo-admin .acq-table tbody td:nth-child(2)::before{content:"Service / Property"}
  .theo-admin .acq-table tbody td:nth-child(3)::before{content:"Source"}
  .theo-admin .acq-table tbody td:nth-child(4)::before{content:"Stage"}
  .theo-admin .acq-table tbody td:nth-child(5)::before{content:"Next Action"}
  .theo-admin .acq-table tbody td:nth-child(6)::before{content:"Value"}
  .theo-admin .acq-table tbody td:nth-child(7){grid-column:1/-1!important}
  .theo-admin .acq-table tbody td:nth-child(7)::before{content:none!important}
  .theo-admin .acq-table tbody td:nth-child(7) .acq-table-btn{width:100%!important;min-height:40px!important}
  .theo-admin .acq-table tbody tr:has(.acq-empty){grid-column:1/-1!important;display:block!important;padding:0!important;border:0!important;box-shadow:none!important;background:transparent!important}
  .theo-admin .acq-table tbody tr:has(.acq-empty) td{display:block!important}
  .theo-admin .acq-table tbody tr:has(.acq-empty) td::before{content:none!important}
  .theo-admin .acq-table .acq-empty{margin:0!important;padding:34px 18px!important;text-align:center!important;border:1px dashed #cfdee6!important;border-radius:14px!important;background:linear-gradient(135deg,#fbfdfe,#f7fafc)!important;color:#768b98!important}

  .theo-admin .acq-grid-two{grid-template-columns:1fr 1fr!important;gap:12px!important}
  .theo-admin .acq-panel{padding:17px!important;border-radius:16px!important}

  /* Referral / Affiliate admin surfaces */
  .theo-admin .ref32-admin-page,
  .theo-admin .aff-admin-page{gap:15px!important;min-width:0!important}
  .theo-admin .ref32-admin-page>.page-head,
  .theo-admin .aff-admin-page>.page-head{
    padding:19px 20px!important;
    border:1px solid var(--g1298-line)!important;
    border-radius:18px!important;
    background:linear-gradient(135deg,#fff,#fbfdfe 70%,#fff8ed)!important;
    box-shadow:var(--g1298-shadow)!important;
  }
  .theo-admin .ref32-admin-kpis,
  .theo-admin .aff-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .theo-admin .ref32-admin-kpis article,
  .theo-admin .aff-kpis article{min-height:105px!important;border-radius:15px!important;padding:16px!important;box-shadow:var(--g1298-shadow)!important}
  .theo-admin .ref32-tabs,
  .theo-admin .aff-admin-tabs{padding:6px!important;border-radius:14px!important;scrollbar-width:none!important}
  .theo-admin .ref32-tabs::-webkit-scrollbar,
  .theo-admin .aff-admin-tabs::-webkit-scrollbar{display:none!important}
}

/* --------------------------------------------------------------------------
   Mobile — <=700px
   -------------------------------------------------------------------------- */
@media (max-width:700px){
  .theo-admin #content:has(.acq-admin-page),
  .theo-admin #content:has(.ref32-admin-page),
  .theo-admin #content:has(.aff-admin-page),
  .theo-admin #content:has(.theo-ref-aff-hub){padding-bottom:116px!important}

  /* Owner Growth Pipeline */
  .theo-admin .acq-admin-page{gap:12px!important}
  .theo-admin .acq-admin-head{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:16px!important;
    padding:17px!important;
    border:1px solid var(--g1298-line)!important;
    border-radius:18px!important;
    background:linear-gradient(145deg,#fff 0%,#fbfdfe 72%,#fff8ec 100%)!important;
    box-shadow:var(--g1298-shadow)!important;
  }
  .theo-admin .acq-admin-head h2{font-size:29px!important;line-height:1.02!important;margin:6px 0 8px!important;letter-spacing:-.04em!important}
  .theo-admin .acq-admin-head p{font-size:13px!important;line-height:1.52!important;color:#6f8594!important}
  .theo-admin .acq-kicker{font-size:9px!important;letter-spacing:.15em!important}
  .theo-admin .acq-head-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;width:100%!important}
  .theo-admin .acq-head-actions .table-btn,
  .theo-admin .acq-head-actions .primary{width:100%!important;min-height:44px!important;border-radius:11px!important;padding:0 11px!important;font-size:12px!important}

  .theo-admin .acq-metrics{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    border:0!important;
    background:transparent!important;
    overflow:visible!important;
  }
  .theo-admin .acq-metrics>div{
    min-height:108px!important;
    padding:15px 13px 13px 16px!important;
    border:1px solid var(--g1298-line)!important;
    border-radius:15px!important;
    background:linear-gradient(145deg,#fff,var(--g1298-blue-soft))!important;
  }
  .theo-admin .acq-metrics>div:nth-child(2),
  .theo-admin .acq-metrics>div:nth-child(5){background:linear-gradient(145deg,#fff,var(--g1298-teal-soft))!important}
  .theo-admin .acq-metrics>div:nth-child(3),
  .theo-admin .acq-metrics>div:nth-child(6){background:linear-gradient(145deg,#fff,var(--g1298-gold-soft))!important}
  .theo-admin .acq-metrics>div:nth-child(4){background:linear-gradient(145deg,#fff,var(--g1298-violet-soft))!important}
  .theo-admin .acq-metrics span{font-size:8.5px!important;letter-spacing:.08em!important;line-height:1.25!important}
  .theo-admin .acq-metrics strong{font-size:25px!important;margin-top:9px!important}
  .theo-admin .acq-metrics small{font-size:10px!important;line-height:1.3!important;margin-top:5px!important}

  .theo-admin .acq-funnel{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .theo-admin .acq-stage{min-height:92px!important;padding:13px 12px 11px 15px!important;border-radius:14px!important;box-shadow:0 5px 15px rgba(15,48,70,.03)!important}
  .theo-admin .acq-stage span{font-size:8.5px!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:anywhere!important}
  .theo-admin .acq-stage strong{font-size:22px!important;margin-top:6px!important}
  .theo-admin .acq-stage small{font-size:9.5px!important;white-space:normal!important;line-height:1.25!important}
  .theo-admin .acq-stage:last-child:nth-child(odd){grid-column:1/-1!important}

  .theo-admin .acq-toolbar{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:9px!important;
    padding:12px!important;
    border-radius:16px!important;
  }
  .theo-admin .acq-toolbar label{min-width:0!important;font-size:8.5px!important}
  .theo-admin .acq-toolbar .acq-search{grid-column:1/-1!important;min-width:0!important}
  .theo-admin .acq-toolbar label:last-child:nth-child(even){grid-column:1/-1!important}
  .theo-admin .acq-toolbar input,
  .theo-admin .acq-toolbar select{width:100%!important;min-width:0!important;min-height:43px!important;padding:10px 11px!important;font-size:12px!important;border-radius:10px!important}

  .theo-admin .acq-table-wrap{overflow:visible!important;padding:10px!important;border-radius:16px!important}
  .theo-admin .acq-table{min-width:0!important;display:block!important}
  .theo-admin .acq-table thead{display:none!important}
  .theo-admin .acq-table tbody{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  .theo-admin .acq-table tbody tr{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px 12px!important;padding:14px!important;border:1px solid #dfe9ee!important;border-radius:14px!important;background:#fff!important;box-shadow:0 5px 16px rgba(15,48,70,.026)!important;min-width:0!important}
  .theo-admin .acq-table tbody td{display:block!important;padding:0!important;border:0!important;min-width:0!important;overflow-wrap:anywhere!important;font-size:11px!important}
  .theo-admin .acq-table tbody td::before{display:block!important;margin-bottom:3px!important;color:#8999a5!important;font-size:8px!important;font-weight:800!important;letter-spacing:.075em!important;text-transform:uppercase!important}
  .theo-admin .acq-table tbody td:nth-child(1)::before{content:"Lead"}
  .theo-admin .acq-table tbody td:nth-child(2)::before{content:"Service / Property"}
  .theo-admin .acq-table tbody td:nth-child(3)::before{content:"Source"}
  .theo-admin .acq-table tbody td:nth-child(4)::before{content:"Stage"}
  .theo-admin .acq-table tbody td:nth-child(5)::before{content:"Next Action"}
  .theo-admin .acq-table tbody td:nth-child(6)::before{content:"Value"}
  .theo-admin .acq-table tbody td:nth-child(5),
  .theo-admin .acq-table tbody td:nth-child(7){grid-column:1/-1!important}
  .theo-admin .acq-table tbody td:nth-child(7)::before{content:none!important}
  .theo-admin .acq-table tbody td:nth-child(7) .acq-table-btn{width:100%!important;min-height:39px!important}
  .theo-admin .acq-table tbody tr:has(.acq-empty){display:block!important;padding:0!important;border:0!important;box-shadow:none!important;background:transparent!important}
  .theo-admin .acq-table tbody tr:has(.acq-empty) td::before{content:none!important}
  .theo-admin .acq-table .acq-empty{margin:0!important;padding:27px 15px!important;text-align:center!important;border:1px dashed #cfdee6!important;border-radius:13px!important;background:linear-gradient(135deg,#fbfdfe,#f7fafc)!important;color:#768b98!important;font-size:12px!important}

  .theo-admin .acq-grid-two{grid-template-columns:1fr!important;gap:10px!important}
  .theo-admin .acq-panel{padding:14px!important;border-radius:15px!important}
  .theo-admin .acq-panel-head{padding:0 0 11px!important;margin-bottom:5px!important}
  .theo-admin .acq-panel h3{font-size:15px!important}
  .theo-admin .acq-panel-head span{font-size:10px!important}
  .theo-admin .acq-list-row{padding:10px 0!important;gap:8px!important}

  /* Referrals & Rewards admin */
  .theo-admin .ref32-admin-page,
  .theo-admin .aff-admin-page{gap:12px!important;min-width:0!important}
  .theo-admin .ref32-admin-page>.page-head,
  .theo-admin .aff-admin-page>.page-head{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
    padding:16px!important;
    border:1px solid var(--g1298-line)!important;
    border-radius:17px!important;
    background:linear-gradient(145deg,#fff,#fbfdfe 72%,#fff8ec)!important;
    box-shadow:var(--g1298-shadow)!important;
  }
  .theo-admin .ref32-admin-page>.page-head h1,
  .theo-admin .aff-admin-page>.page-head h1{font-size:28px!important;line-height:1.02!important;letter-spacing:-.035em!important;margin:5px 0 7px!important}
  .theo-admin .ref32-admin-page>.page-head p,
  .theo-admin .aff-admin-page>.page-head p{font-size:12px!important;line-height:1.48!important}
  .theo-admin .aff-link{width:max-content!important;max-width:100%!important;padding:9px 11px!important;font-size:11px!important}

  .theo-admin .ref32-admin-kpis,
  .theo-admin .aff-kpis{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .theo-admin .ref32-admin-kpis article,
  .theo-admin .aff-kpis article{
    min-height:102px!important;
    padding:14px 13px!important;
    border:1px solid var(--g1298-line)!important;
    border-radius:14px!important;
    background:linear-gradient(145deg,#fff,#f5f9fc)!important;
    box-shadow:0 5px 16px rgba(15,48,70,.03)!important;
  }
  .theo-admin .ref32-admin-kpis article:nth-child(2),
  .theo-admin .aff-kpis article:nth-child(2){background:linear-gradient(145deg,#fff,var(--g1298-teal-soft))!important}
  .theo-admin .ref32-admin-kpis article:nth-child(3),
  .theo-admin .aff-kpis article:nth-child(3){background:linear-gradient(145deg,#fff,var(--g1298-gold-soft))!important}
  .theo-admin .ref32-admin-kpis article:nth-child(4),
  .theo-admin .aff-kpis article:nth-child(4){background:linear-gradient(145deg,#fff,var(--g1298-violet-soft))!important}
  .theo-admin .ref32-admin-kpis article span,
  .theo-admin .aff-kpis article span{font-size:8px!important;line-height:1.2!important;letter-spacing:.075em!important}
  .theo-admin .ref32-admin-kpis article strong,
  .theo-admin .aff-kpis article strong{font-size:24px!important;margin:8px 0 4px!important}
  .theo-admin .ref32-admin-kpis article small,
  .theo-admin .aff-kpis article small{font-size:9.5px!important;line-height:1.3!important}

  .theo-admin .ref32-tabs,
  .theo-admin .aff-admin-tabs{
    display:flex!important;
    gap:5px!important;
    padding:5px!important;
    border-radius:13px!important;
    overflow-x:auto!important;
    overscroll-behavior-inline:contain!important;
    scrollbar-width:none!important;
    box-shadow:0 5px 15px rgba(15,48,70,.025)!important;
  }
  .theo-admin .ref32-tabs::-webkit-scrollbar,
  .theo-admin .aff-admin-tabs::-webkit-scrollbar{display:none!important}
  .theo-admin .ref32-tabs button,
  .theo-admin .aff-admin-tabs button{flex:0 0 auto!important;padding:9px 11px!important;font-size:10px!important;border-radius:8px!important}
  .theo-admin .ref32-panel,
  .theo-admin .aff-admin-panel{padding:14px!important;border-radius:15px!important;box-shadow:var(--g1298-shadow)!important}

  /* Combined Referrals & Affiliates hub — class added by the presentation helper. */
  .theo-admin .theo-ref-aff-hub{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
    min-width:0!important;
  }
  .theo-admin .theo-ref-aff-hub .theo-ref-aff-card{
    position:relative!important;
    overflow:hidden!important;
    padding:16px!important;
    border:1px solid var(--g1298-line)!important;
    border-radius:17px!important;
    background:linear-gradient(145deg,#fff,#fbfdfe)!important;
    box-shadow:var(--g1298-shadow)!important;
  }
  .theo-admin .theo-ref-aff-hub .theo-ref-aff-card::before{
    content:"";
    position:absolute;
    top:0;left:18px;
    width:54px;height:3px;
    border-radius:0 0 999px 999px;
    background:var(--g1298-gold);
  }
  .theo-admin .theo-ref-aff-hub .theo-ref-aff-card.is-affiliate::before{background:var(--g1298-teal)}
  .theo-admin .theo-ref-aff-hub .theo-growth-stat{
    min-width:0!important;
    padding:12px 11px!important;
    border:1px solid #e1e9ed!important;
    border-radius:12px!important;
    background:#f8fafb!important;
  }
  .theo-admin .theo-ref-aff-hub .theo-growth-action{
    width:100%!important;
    min-height:44px!important;
    margin-top:10px!important;
    border-radius:11px!important;
    font-weight:750!important;
  }
}

@media (max-width:390px){
  .theo-admin .acq-admin-head h2,
  .theo-admin .ref32-admin-page>.page-head h1,
  .theo-admin .aff-admin-page>.page-head h1{font-size:26px!important}
  .theo-admin .acq-metrics>div{min-height:102px!important;padding:13px 11px 11px 14px!important}
  .theo-admin .acq-metrics strong{font-size:23px!important}
  .theo-admin .acq-stage{min-height:88px!important;padding:12px 10px 10px 13px!important}
  .theo-admin .acq-toolbar{grid-template-columns:1fr!important}
  .theo-admin .acq-toolbar .acq-search,
  .theo-admin .acq-toolbar label:last-child:nth-child(even){grid-column:auto!important}
  .theo-admin .ref32-admin-kpis article,
  .theo-admin .aff-kpis article{min-height:96px!important;padding:12px 11px!important}
}
