:root{
  --bg:#f6f8fc;
  --dark:#0b1220;
  --dark2:#111827;
  --blue:#2563eb;
  --text:#111827;
  --muted:#64748b;
  --border:#e5eaf2;
  --white:#ffffff;
  --green:#16a34a;
  --red:#dc2626;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Inter,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

.sidebar{
  width:270px;
  height:100vh;
  background:linear-gradient(180deg,#0b1220,#111827);
  color:#fff;
  position:fixed;
  top:0;
  left:0;
  padding:24px;
}

.brand{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:34px;
}

.logo{
  background:linear-gradient(135deg,#2563eb,#7c3aed);
  width:46px;
  height:46px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  box-shadow:0 10px 25px rgba(37,99,235,.35);
}

.brand h2{font-size:19px;margin:0}
.brand span{font-size:12px;color:#94a3b8}

.sidebar a{
  display:flex;
  align-items:center;
  gap:10px;
  color:#dbeafe;
  text-decoration:none;
  padding:13px 15px;
  border-radius:12px;
  margin-bottom:8px;
  transition:.2s;
}

.sidebar a:hover{
  background:rgba(255,255,255,.08);
  transform:translateX(4px);
}

.logout{
  margin-top:28px;
  color:#fecaca!important;
}

.main{
  margin-left:270px;
  padding:34px;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:28px;
}

.topbar h1{
  margin:0;
  font-size:28px;
}

.muted{color:var(--muted)}

.grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:20px;
}

.card,.panel{
  background:var(--white);
  border-radius:20px;
  padding:24px;
  box-shadow:0 12px 35px rgba(15,23,42,.07);
  border:1px solid var(--border);
}

.card h3{
  margin:0;
  color:var(--muted);
  font-size:14px;
  font-weight:600;
}

.card p{
  font-size:36px;
  font-weight:800;
  margin:14px 0 0;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
}

input,textarea,select{
  width:100%;
  padding:13px 14px;
  border:1px solid var(--border);
  border-radius:12px;
  margin-bottom:12px;
  background:#fff;
  outline:none;
}

input:focus,textarea:focus,select:focus{
  border-color:var(--blue);
  box-shadow:0 0 0 4px rgba(37,99,235,.12);
}

textarea{min-height:110px}

.btn,button{
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
  color:#fff;
  border:0;
  padding:12px 18px;
  border-radius:12px;
  text-decoration:none;
  cursor:pointer;
  display:inline-block;
  font-weight:700;
}

.btn:hover,button:hover{
  filter:brightness(.95);
}

.btn.secondary{background:#111827}
.btn.green{background:var(--green)}
.btn.red{background:var(--red)}

table{
  width:100%;
  border-collapse:collapse;
  background:#fff;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 12px 35px rgba(15,23,42,.07);
  border:1px solid var(--border);
}

th,td{
  padding:15px;
  border-bottom:1px solid #eef2f7;
  text-align:left;
  font-size:14px;
}

th{
  background:#f8fafc;
  color:#475569;
  font-weight:800;
}

tr:hover td{
  background:#f9fbff;
}

.login-page{
  display:flex;
  align-items:center;
  justify-content:center;
  height:100vh;
  background:radial-gradient(circle at top,#1d4ed8,#0f172a 45%);
}

.login-box{
  width:390px;
  background:#fff;
  padding:38px;
  border-radius:22px;
  box-shadow:0 25px 70px rgba(0,0,0,.25);
}

.login-box h1{
  margin-top:0;
  font-size:28px;
}

.error{color:var(--red)}
.success{color:var(--green)}

.actions{
    display:flex !important;
    gap:10px !important;
    flex-wrap:wrap !important;
}

.searchbar{
  display:flex;
  gap:12px;
  margin-bottom:20px;
}

.searchbar input,.searchbar select{margin:0}

.badge{
  padding:6px 10px;
  border-radius:999px;
  background:#e0f2fe;
  color:#0369a1;
  font-size:12px;
  font-weight:700;
}

@media(max-width:900px){
  .sidebar{
    position:relative;
    width:100%;
    height:auto;
  }
  .main{margin-left:0}
  .grid,.form-grid{grid-template-columns:1fr}
}

/* CARD FIX */
.lead-card-grid{
    display:grid !important;
    grid-template-columns:repeat(2,1fr) !important;
    gap:18px !important;
}




.lead-card{
    position:relative;
    background:#fff !important;
    border:1px solid #e5eaf2 !important;
    border-radius:18px !important;
    padding:22px !important;
    box-shadow:0 12px 30px rgba(15,23,42,.06) !important;
    margin-bottom:0 !important;
}

.lead-card h3{
    margin-top:0 !important;
}

.lead-card p{
  color:#334155;
  line-height:1.5;
}

.lead-card .actions{
  margin-top:18px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.lead-card form{
  margin:0;
}

@media(max-width:900px){
    .lead-card-grid{
        grid-template-columns:1fr !important;
    }
}

.top-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
}

.credit-box{
    display:flex;
    align-items:center;
    gap:15px;
    background:#fff;
    padding:12px 20px;
    border-radius:14px;
    box-shadow:0 5px 20px rgba(0,0,0,.08);
}

.credit-icon{
    width:50px;
    height:50px;
    border-radius:50%;
    background:#2563eb;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
}

.credit-title{
    color:#666;
    font-size:13px;
}

.credit-number{
    font-size:26px;
    font-weight:bold;
    color:#2563eb;
}


.app-topbar{
    display:flex !important;
    justify-content:space-between !important;
    align-items:center !important;
    background:#fff !important;
    padding:16px 22px !important;
    margin-bottom:28px !important;
    border-radius:18px !important;
    box-shadow:0 8px 25px rgba(15,23,42,.08) !important;
}




.app-user{
    font-size:16px;
    color:#334155;
}

.app-user strong{
    color:#111827;
}

.app-credit{
    display:flex;
    align-items:center;
    gap:12px;
    background:#f8fafc;
    border:1px solid #e2e8f0;
    padding:10px 18px;
    border-radius:14px;
}

.app-credit span{
    font-size:26px;
}

.app-credit small{
    display:block;
    color:#64748b;
    font-size:12px;
}

.app-credit strong{
    display:block;
    color:#2563eb;
    font-size:24px;
}

/* ==========================
   TOP HEADER
========================== */

.app-topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#fff;
    padding:16px 22px;
    margin-bottom:28px;
    border-radius:18px;
    box-shadow:0 8px 25px rgba(15,23,42,.08);
}

.top-left{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:20px;
    font-weight:700;
}

.top-right{
    display:flex;
    align-items:center;
    gap:10px;
}

.top-pill{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:10px 14px;
    border-radius:999px;
    background:#f1f5f9;
    color:#334155;
    text-decoration:none;
    font-size:14px;
    font-weight:600;
}

.top-pill:hover{
    background:#2563eb;
    color:#fff;
}

.credit-pill{
    background:#2563eb;
    color:#fff;
}

.user-pill{
    background:#111827;
    color:#fff;
}

.app-topbar{
    display:flex !important;
    justify-content:space-between;
    align-items:center;
    background:#fff;
    padding:16px 22px;
    margin-bottom:28px;
    border-radius:18px;
    box-shadow:0 8px 25px rgba(15,23,42,.08);
}

.top-page-title{
    font-size:22px;
    font-weight:800;
    color:#111827;
}



.top-actions{
    display:flex !important;
    gap:10px !important;
    align-items:center !important;
}


.top-pill{
    display:inline-flex !important;
    padding:10px 14px !important;
    border-radius:999px !important;
    background:#f1f5f9 !important;
    color:#334155 !important;
    text-decoration:none !important;
    font-weight:700 !important;
}


.top-credit{
    background:#2563eb !important;
    color:#fff !important;
}

.top-account{
    background:#111827 !important;
    color:#fff !important;
}

.campaign-actions{
    display:flex;
    gap:12px;
    margin-top:20px;
    flex-wrap:wrap;
}

.note-item{
    background:#f8fafc;
    border:1px solid #e2e8f0;
    padding:15px;
    border-radius:12px;
    margin-bottom:12px;
}

.progress-wrap{
    width:120px;
    height:10px;
    background:#e5e7eb;
    border-radius:999px;
    overflow:hidden;
    margin-bottom:5px;
}

.progress-bar{
    height:100%;
    background:#2563eb;
    border-radius:999px;
}





.business-tags .badge{
    display:inline-block;
    margin:3px;
}

.business-tags{
    margin:15px 0;
}


/* ==========================
   Priority Ribbon
========================== */

.priority-ribbon{

    position:absolute;

    top:15px;

    right:15px;

    padding:6px 14px;

    border-radius:30px;

    color:#fff;

    font-size:12px;

    font-weight:700;

    box-shadow:0 4px 10px rgba(0,0,0,.15);

}

/* ==========================
   Business Tags
========================== */

.business-tags{
    margin:15px 0;
}

.tag-pill{

    display:inline-block;

    padding:5px 12px;

    border-radius:20px;

    color:#fff;

    font-size:12px;

    font-weight:600;

    margin-right:6px;

    margin-bottom:6px;

}


.remarketing-stats{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));

    gap:18px;

    margin:25px 0;

}

.stat-card{

    background:#fff;

    border-radius:14px;

    padding:20px;

    box-shadow:0 8px 20px rgba(0,0,0,.08);

    border-left:6px solid #2563eb;

}

.stat-card span{

    display:block;

    color:#6b7280;

    font-size:14px;

}

.stat-card h2{

    margin-top:10px;

    font-size:32px;

    color:#111827;

}

.stat-card.blue{

    border-left-color:#2563eb;

}

.stat-card.red{

    border-left-color:#ef4444;

}

.stat-card.orange{

    border-left-color:#f59e0b;

}

.stat-card.green{

    border-left-color:#10b981;

}

.stat-card.purple{

    border-left-color:#7c3aed;

}
