/* outreach.eduardradu.ro — Instantly-style UI. No inline styles (strict CSP). */
:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-2: #fbfcfe;
  --border: #eaecf2;
  --border-strong: #dfe3ec;
  --text: #0f1729;
  --muted: #667085;
  --muted-2: #98a2b3;
  --accent: #2b7fff;
  --accent-hover: #1366f0;
  --accent-soft: #eef4ff;
  --green: #12b76a;
  --green-soft: #e9fbf1;
  --amber: #f79009;
  --red: #f04438;
  --dark: #1d2939;
  --radius: 12px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05);
  --shadow: 0 1px 3px rgba(16,24,40,.07), 0 1px 2px rgba(16,24,40,.04);
  --shadow-lg: 0 12px 40px rgba(16,24,40,.16);
  --sidebar-w: 72px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; font-size: 14px; cursor: pointer; }
input, select, textarea {
  font-family: inherit; font-size: 14px; width: 100%; padding: 10px 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
textarea { resize: vertical; min-height: 150px; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(43,127,255,.12); }
label { display: block; font-weight: 600; margin-bottom: 7px; color: #344054; font-size: 13.5px; }
.field { margin-bottom: 18px; }
.hint { color: var(--muted); font-size: 12.5px; font-weight: 400; margin-top: 5px; }
.hidden { display: none !important; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: #fff; color: var(--text); font-weight: 600; transition: .12s; white-space: nowrap; }
.btn:hover { background: var(--panel-2); border-color: var(--muted-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--red); border-color: #f6cec9; background: #fff; }
.btn.danger:hover { background: #fef3f2; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn.icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--panel-2); }
.btn svg { width: 16px; height: 16px; }

/* login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(1200px 600px at 50% -10%, #eef4ff 0%, #ffffff 55%); }
.login-card { background: var(--panel); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 38px; width: 100%; max-width: 392px; }
.login-card h1 { font-size: 21px; margin: 0; letter-spacing: -.01em; }
.login-card .brand { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), #6aa8ff); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(43,127,255,.35); }
.brand-mark svg { width: 21px; height: 21px; color: #fff; }
.err { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 16px; }

/* app shell */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; flex-shrink: 0; padding: 14px 0; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), #6aa8ff); display: flex; align-items: center; justify-content: center; margin-bottom: 22px; box-shadow: 0 4px 12px rgba(43,127,255,.32); }
.sidebar .logo svg { width: 22px; height: 22px; color: #fff; }
.nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav a { position: relative; width: 44px; height: 44px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: var(--muted); transition: .12s; }
.nav a svg { width: 21px; height: 21px; }
.nav a:hover { background: var(--panel-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.nav a .tip { position: absolute; left: 54px; top: 50%; transform: translateY(-50%); background: var(--dark); color: #fff; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 50; }
.nav a:hover .tip { opacity: 1; }
.sidebar .bottom { display: flex; flex-direction: column; gap: 6px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 68px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 30px; position: sticky; top: 0; z-index: 20; }
.topbar h2 { font-size: 20px; margin: 0; font-weight: 700; letter-spacing: -.02em; }
.acct-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text); font-weight: 600; font-size: 13px; }
.acct-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.content { padding: 28px 30px; flex: 1; max-width: 1180px; width: 100%; margin: 0 auto; }

/* cards & stat tiles */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat .k { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .v { font-size: 28px; font-weight: 750; margin-top: 8px; letter-spacing: -.02em; }
.stat .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-head { padding: 17px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 650; }
.panel-body { padding: 20px; }

/* toolbar / filters row */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar.flat { margin: 0; }
.spacer { flex: 1; }
.search { position: relative; flex: 1; max-width: 360px; }
.search input { padding-left: 38px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted-2); }

/* campaign list — Instantly-style spaced card rows */
.clist { display: flex; flex-direction: column; gap: 12px; }
.crow { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px 22px; display: grid; grid-template-columns: 2.4fr 1fr 1.3fr .8fr .8fr 1fr auto; align-items: center; gap: 16px; cursor: pointer; transition: .12s; }
.crow:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.crow .cname { font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.crow .col { min-width: 0; }
.crow .col .lbl { display: none; }
.crow .metric { font-weight: 650; }
.crow .metric small { color: var(--muted); font-weight: 500; margin-left: 5px; }
.chead { display: grid; grid-template-columns: 2.4fr 1fr 1.3fr .8fr .8fr 1fr auto; gap: 16px; padding: 4px 22px 6px; color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.rowacts { display: flex; gap: 6px; justify-content: flex-end; }

/* progress */
.prog { display: flex; align-items: center; gap: 10px; }
.prog .pct { font-weight: 650; font-size: 13px; min-width: 34px; }
.bar { flex: 1; height: 7px; background: #eef0f4; border-radius: 999px; overflow: hidden; min-width: 46px; }
.bar > span { display: block; height: 100%; background: var(--green); border-radius: 999px; }

/* tables (analytics detail) */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); }
th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: none; }
tbody tr.row-link { cursor: pointer; }
tbody tr.row-link:hover { background: var(--panel-2); }

/* badges / status pills (solid, Instantly-style) */
.badge { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 650; letter-spacing: .01em; }
.badge.active { background: var(--accent); color: #fff; }
.badge.completed { background: var(--green); color: #fff; }
.badge.paused { background: var(--dark); color: #fff; }
.badge.draft { background: #f2f4f7; color: #475467; }
.badge.drafts_created { background: var(--accent-soft); color: var(--accent-hover); }
.badge.replied { background: var(--green); color: #fff; }
.badge.bounced { background: var(--amber); color: #fff; }

/* tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.tabs button { background: none; border: none; padding: 12px 18px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: .12s; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

/* sequence steps */
.step { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.step-head { background: var(--panel-2); padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.step-head .t { font-weight: 700; display: flex; align-items: center; gap: 9px; }
.step-num { width: 24px; height: 24px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.step-body { padding: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border: 1px solid var(--border-strong); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; transition: .12s; }
.chip:hover { border-color: var(--accent); }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-hover); }
.chip.var { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.checkbox { display: flex; align-items: center; gap: 10px; }
.checkbox input { width: auto; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.varbar { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; }
.varbar .vh { font-weight: 650; font-size: 12.5px; color: var(--muted); margin-bottom: 9px; display: flex; align-items: center; gap: 7px; }
.empty { text-align: center; color: var(--muted); padding: 46px 20px; }
.empty svg { width: 40px; height: 40px; color: var(--muted-2); margin-bottom: 12px; }

/* editor header */
.ehead { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.ehead .title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }

/* toast */
.toast { position: fixed; right: 22px; bottom: 22px; background: var(--dark); color: #fff; padding: 13px 18px; border-radius: 11px; box-shadow: var(--shadow-lg); z-index: 100; opacity: 0; transform: translateY(8px); transition: .2s; font-weight: 500; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { background: var(--red); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(16,24,40,.5); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 90; padding: 24px; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 620px; max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal.wide { max-width: 720px; }
.modal-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; background: #fff; }
.xbtn { background: none; border: none; color: var(--muted); font-size: 22px; line-height: 1; padding: 4px 8px; border-radius: 8px; }
.xbtn:hover { background: var(--panel-2); color: var(--text); }

/* preview */
.pv-mail { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.pv-mail .pv-sub { padding: 13px 18px; background: var(--panel-2); border-bottom: 1px solid var(--border); font-weight: 700; }
.pv-mail .pv-body { padding: 18px; white-space: pre-wrap; line-height: 1.65; }
.pv-mail .pv-step { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 18px 0; font-weight: 700; }
.pv-missing { background: #fef3f2; color: #b42318; padding: 1px 5px; border-radius: 5px; font-weight: 600; }

/* unibox */
.reply-item { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.reply-item:last-child { border-bottom: none; }
.reply-item .from { font-weight: 700; }
.reply-item .snip { color: var(--muted); margin-top: 5px; }
.reply-item.reviewed { opacity: .55; }

/* accounts */
.alias-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.alias-row:last-child { border: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }

/* popover */
.pop { position: absolute; background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 10px; z-index: 60; max-width: 320px; }

@media (max-width: 860px) {
  .crow, .chead { grid-template-columns: 1fr auto; }
  .crow .col.hide-sm, .chead .hide-sm { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
