/* Magify Admin UI (Phase 1) - Shared Styles
   Version: 1.0.4
   Timestamp (America/Jamaica): 2026-01-20
   Change log:
   - Improve campaigns table spacing + column sizing; add compact Select button styling (no color changes).
 *  - Add top menu link styles and pagination controls (no color changes).
   - Add dashboard two-column layout utilities (60–70% campaigns left, stacked cards right) without changing color system or max widths.
   - Add auth UI helpers: password reveal toggles and centered button-like links.
   Signature: — Nova, Senior Developer
*/

:root{
  --bg: #0b1220;
  --card: #0f1b33;
  --card2:#0b162c;
  --text:#e9eefc;
  --muted:#aab7da;
  --border: rgba(255,255,255,0.12);
  --accent:#3b82f6;
  --accent2:#22c55e;
  --danger:#ef4444;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 10% 10%, rgba(59,130,246,.35), transparent 60%),
    radial-gradient(900px 500px at 90% 20%, rgba(34,197,94,.22), transparent 55%),
    radial-gradient(700px 500px at 60% 90%, rgba(168,85,247,.18), transparent 55%),
    var(--bg);
  padding: 28px 16px;
}

.hidden{display:none !important;}

.container{max-width:1100px;margin:0 auto;}
.card{
  width:100%;
  max-width:520px;  /* fixes "too wide" */
  margin: 32px auto;
  background: linear-gradient(180deg, var(--card), var(--card2));
  border:1px solid var(--border);
  border-radius:16px;
  padding:22px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.card.wide{max-width:980px;}

h1{margin:0 0 6px 0; font-size:22px;}
p.sub{margin:0 0 18px 0;color:var(--muted);font-size:13px;line-height:1.4;}

label{display:block; font-size:13px; color:var(--muted); margin: 10px 0 6px;}
input{
  width:100%;
  padding: 12px 12px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color:var(--text);
  outline: none;
}
input:focus{border-color: rgba(59,130,246,.75); box-shadow: 0 0 0 3px rgba(59,130,246,.2);}

.btnrow{display:flex; gap:10px; margin-top:14px; flex-wrap:wrap;}
button{
  appearance:none;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 14px;
  cursor:pointer;
  font-weight:600;
}
button.primary{background: rgba(59,130,246,.9); border-color: rgba(59,130,246,.9);}
button.success{background: rgba(34,197,94,.9); border-color: rgba(34,197,94,.9);}
button.danger{background: rgba(239,68,68,.85); border-color: rgba(239,68,68,.85);}
button:disabled{opacity:.6; cursor:not-allowed;}

/* Password reveal toggle */
.pw-wrap{position:relative;}
.pw-wrap input{padding-right:44px;}
.pw-toggle{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:34px;
  height:34px;
  padding:0;
  border-radius:10px;
  background: rgba(255,255,255,0.06);
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--text);
}

.pw-toggle svg{
  width:18px;
  height:18px;
  fill: currentColor;
}

/* Centered bottom links on auth cards */
.btnrow.center{justify-content:center;}
a.btnlike{
  display:inline-block;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  text-decoration:none;
  font-weight:600;
}
a.btnlike:hover{filter:brightness(1.05);}

.forgot-link{margin-top:12px; text-align:center;}
.forgot-link a{font-size:14px; color:var(--muted); text-decoration:none;}
.forgot-link a:hover{text-decoration:underline;}

.forgot-password {
  margin-top: 12px;
  text-align: center;
}

.forgot-password a {
  font-size: 14px;
  color: #777;
  text-decoration: none;
}

.forgot-password a:hover {
  text-decoration: underline;
}

.msg{
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.20);
  color: var(--text); /* fixes white-on-white / unreadable */
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 18px;
  border:1px solid var(--border);
  border-radius:16px;
  background: rgba(0,0,0,.18);
  margin: 0 auto 18px auto;
  max-width: 980px;
}
.badge{font-size:12px; padding:6px 10px; border-radius:999px; border:1px solid var(--border); color:var(--muted);}
.grid{display:grid; gap:14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); max-width:980px; margin:0 auto;}

.dash-layout{
  display:grid;
  gap:14px;
  grid-template-columns: 2.2fr 1fr; /* ~68% / 32% */
  max-width:980px;
  margin:0 auto;
}
.dash-side{display:flex; flex-direction:column; gap:14px;}
.campaigns-panel{min-height: 420px;}

@media (max-width: 860px){
  .dash-layout{grid-template-columns: 1fr;}
  .campaigns-panel{min-height: auto;}
}

.panel{border:1px solid var(--border); border-radius:16px; background: rgba(0,0,0,.18); padding:14px;}
.panel h3{margin:0 0 8px 0; font-size:14px;}
.panel p{margin:0; color:var(--muted); font-size:13px; line-height:1.45;}
a{color:var(--text);}


/* --- Dashboard/Campaigns pagination + top menu (Phase 1) --- */
.topbar-right{ display:flex; gap:12px; align-items:center; }
.topnav{
  display:flex; gap:10px; align-items:center;
  margin-right: 6px;
}
.topnav a{
  text-decoration:none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.12);
  color: var(--text);
}
.topnav a:hover{ background: rgba(0,0,0,.20); }

.card-footer{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.pager{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap: wrap;
}
.pager .page-btn{
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.12);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}
.pager .page-btn:hover{ background: rgba(0,0,0,.20); }
.pager .page-btn[disabled]{
  opacity: .45;
  cursor: default;
}
.pager .page-btn.is-active{
  background: rgba(255,255,255,.10);
}
.select-small{
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.12);
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
}
.fullwidth-btn {
  width: 30%;
  display: inline-flex;
  align-items: center;
  justify-content: center; 
}


/* --- Tables (Campaign lists) --- */
.table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  color: var(--text);
}
.table thead th{
  text-align:left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: .2px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table tbody td{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  vertical-align: middle;
  white-space: nowrap;
}
.table tbody tr:last-child td{ border-bottom: 0; }
/* Allow the campaign name to take the most space */
.table .col-campaign{ min-width: 190px; }
.table .col-business{ min-width: 180px; }
.table .col-contact{ min-width: 150px; }
.table .col-starts{ min-width: 110px; }
.table .col-status{ min-width: 90px; }
.table .col-action{ width: 92px; }
/* Compact select buttons only (keep fullwidth-btn for Add New Campaign) */
.btn-select{
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}
