/* Robcor Sender - admin. Huisstijl: groen #39A935, ink #1A1A1A, grijs #6E6E6E. */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/InterVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; }
:root {
  --green: #39A935;
  --green-dark: #2C8429;
  --green-tint: #E8F5E7;
  --ink: #161816;
  --grey: #6E6E6E;
  --line: #E6E9E6;
  --bg: #F2F4F2;
  --card: #FFFFFF;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 24, 20, .05), 0 6px 22px rgba(20, 24, 20, .05);
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
body {
  margin: 0; font-family: var(--font);
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11';
}
a { color: var(--green-dark); }

.shell { display: flex; min-height: 100vh; }
.side {
  width: 258px; flex-shrink: 0;
  background: linear-gradient(180deg, #171917 0%, #101210 100%);
  color: #fff; display: flex; flex-direction: column; padding: 26px 16px;
  position: sticky; top: 0; height: 100vh;
}
.side-logo { padding: 0 10px 28px; }
.side-logo img { width: 148px; background: #fff; padding: 11px 15px; border-radius: 14px; display: block; }
.side nav { display: flex; flex-direction: column; gap: 5px; }
.side nav a {
  display: flex; align-items: center; gap: 13px;
  color: #A9AEA9; text-decoration: none; padding: 13px 15px; font-weight: 600; font-size: 15px;
  border-radius: 12px; transition: background .15s, color .15s;
}
.side nav a svg { width: 19px; height: 19px; flex-shrink: 0; opacity: .85; }
.side nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.side nav a.on { color: #fff; background: var(--green); box-shadow: 0 6px 18px rgba(57, 169, 53, .38); }
.side nav a.on svg { opacity: 1; }
.side-foot {
  margin-top: auto; padding: 18px 14px 4px; font-size: 13px; color: #7C817C;
  display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(255, 255, 255, .08);
}
.side-foot span { color: #C9CCC9; font-weight: 700; }
.side-foot a { color: #7C817C; text-decoration: none; }
.side-foot a:hover { color: #fff; }

.main { flex: 1; padding: 40px 46px 56px; max-width: 1320px; min-width: 0; }
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -.025em; margin: 0 0 28px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 30px; margin-bottom: 22px; box-shadow: var(--shadow);
}
.card h2 { font-size: 17px; font-weight: 800; letter-spacing: -.015em; margin: 0 0 16px; }
.card h3 { font-size: 12.5px; font-weight: 800; margin: 26px 0 8px; color: var(--green-dark); text-transform: uppercase; letter-spacing: .07em; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 1080px) { .grid-2 { grid-template-columns: 1fr; } }

/* KPI's */
.kpi-row { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px 22px; min-width: 158px; flex: 1; box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.kpi::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 5px;
  background: linear-gradient(180deg, var(--green), var(--green-dark));
}
.kpi-v { font-size: 33px; font-weight: 800; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi.big .kpi-v { font-size: 46px; }
.kpi-l { font-size: 12px; color: var(--grey); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }
.kpi-s { font-size: 13px; color: var(--grey); margin-top: 5px; }

/* Formulieren */
label { display: block; font-size: 14px; font-weight: 600; margin: 16px 0 6px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
input:not([type="checkbox"]):not([type="range"]):not([type="color"]), select, textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(57, 169, 53, .16);
}
input[type="checkbox"] { accent-color: var(--green); width: 18px; height: 18px; }
textarea { resize: vertical; line-height: 1.6; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inline-form { display: inline-flex; gap: 10px; align-items: center; margin: 4px 10px 4px 0; }
.inline-form input { width: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 15px; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: all .15s; font-family: inherit;
}
.btn:hover { border-color: #C4C9C4; box-shadow: var(--shadow); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid rgba(57, 169, 53, .4); outline-offset: 2px; }
.btn-danger-solid:focus-visible, .btn-danger:focus-visible { outline-color: rgba(192, 57, 43, .35); }
.btn-primary {
  background: linear-gradient(180deg, var(--green) 0%, #34A030 100%);
  border-color: var(--green-dark); color: #fff;
  box-shadow: 0 6px 16px rgba(57, 169, 53, .32);
}
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-danger { background: #fff; border-color: #EBC5C0; color: #C0392B; }
.btn-danger:hover { background: #FDECEA; border-color: #C0392B; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }
.btn-block { width: 100%; margin-top: 22px; }

/* Tabellen */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; background: #F7F9F7; color: var(--grey); padding: 12px 14px;
  font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em;
  border-bottom: 1px solid var(--line);
}
.tbl th:first-child { border-radius: 10px 0 0 10px; }
.tbl th:last-child { border-radius: 0 10px 10px 0; }
.tbl td { padding: 13px 14px; border-bottom: 1px solid #EFF1EF; vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr { transition: background .1s; }
.tbl tr:hover td { background: #FAFCFA; }
.tbl.small th, .tbl.small td { padding: 8px 11px; font-size: 13px; }
.row-btns { display: flex; gap: 8px; align-items: center; }

.status { padding: 5px 13px; border-radius: 20px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.st-draft { background: #EEF0EE; color: var(--grey); }
.st-sending, .st-queued { background: #FDF3E3; color: #B77A16; }
.st-sent { background: var(--green-tint); color: var(--green-dark); }
.st-failed { background: #FDECEA; color: #C0392B; }
.st-pending { background: #EEF0EE; color: var(--grey); }
.st-unsubscribed { background: #EEF0EE; color: var(--grey); text-decoration: line-through; }

.score-pill {
  display: inline-block; min-width: 32px; text-align: center; padding: 5px 8px;
  border-radius: 9px; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; font-size: 14px;
}
.score-pill.slow { background: #C0392B; }
.score-pill.smid { background: #E6A23C; }
.score-pill.shigh { background: var(--green); }

/* Meldingen */
.flash, .error, .notice { padding: 15px 18px; border-radius: 13px; margin-bottom: 20px; font-weight: 600; font-size: 15px; }
.flash { background: var(--green-tint); color: var(--green-dark); border: 1px solid #C9E8C7; }
.error { background: #FDECEA; color: #C0392B; border: 1px solid #F2CBC5; }
.notice { background: #FDF3E3; color: #8A5B0E; border: 1px solid #F0DCB4; margin: 14px 0; font-weight: 500; }
.muted { color: var(--grey); }
.small { font-size: 13px; }
.warn-text { color: #B77A16; font-weight: 700; }
.code-line {
  background: var(--ink); color: #B5E8B3; padding: 14px 16px; border-radius: 12px;
  font-size: 13px; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
code { background: #EEF2EE; padding: 2px 7px; border-radius: 6px; font-size: 13px; }

/* Scoreverdeling dashboard */
.dist { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding: 12px 0 0; }
.dist-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.dist-bar { width: 100%; border-radius: 7px 7px 2px 2px; min-height: 3px; transition: height .3s; }
.dist-n { font-size: 12px; color: var(--grey); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.dist-x { font-size: 12px; color: var(--grey); margin-top: 6px; font-weight: 700; }

/* NPS per week */
.wchart { display: flex; gap: 10px; align-items: stretch; padding: 6px 0 2px; }
.wcol { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.wval { font-size: 12.5px; font-weight: 800; height: 20px; font-variant-numeric: tabular-nums; }
.wtrack { position: relative; width: 100%; max-width: 46px; height: 150px; background: #F7F9F7; border-radius: 9px; overflow: hidden; }
.wmid { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #D8DCD8; }
.wbar { position: absolute; left: 14%; right: 14%; border-radius: 5px; z-index: 1; }
.wbar.pos { background: linear-gradient(180deg, var(--green), #2FA02B); }
.wbar.neg { background: linear-gradient(180deg, #D24437, #C0392B); }
.wdot { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #C9CDC9; z-index: 1; }
.wlbl { font-size: 12px; font-weight: 700; color: var(--grey); margin-top: 7px; }
.wn { font-size: 11.5px; color: #A6AAA6; font-variant-numeric: tabular-nums; height: 16px; }
@media (max-width: 900px) { .wchart { gap: 5px; } .wcol:nth-child(odd) .wval { visibility: hidden; } }

/* Filters */
.filter-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.filter-row > div { min-width: 120px; }
.filter-row label { margin-top: 0; }
.filter-actions { display: flex; gap: 10px; }

/* Batch */
.preview-frame-wrap { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 14px 0; }
.preview-frame { width: 100%; height: 460px; border: 0; display: block; background: var(--bg); }
.send-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.row-actions summary { list-style: none; cursor: pointer; display: inline-flex; }
.row-actions form { margin-top: 8px; display: flex; }

/* Templates-overzicht */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.tpl-card { display: flex; flex-direction: column; }
.tpl-card h2 { margin-bottom: 8px; }
.tpl-card > div:last-child { margin-top: auto; display: flex; gap: 10px; padding-top: 14px; }

/* Login */
.login-body {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  margin: 0; font-family: var(--font);
  background: radial-gradient(1100px 650px at 20% -10%, #E4F3E3 0%, #F2F4F2 55%);
  color: #161816; font-size: 15px;
}
.login-card {
  background: #fff; border-radius: 22px; padding: 46px; width: 420px; max-width: 92vw;
  box-shadow: 0 22px 60px rgba(20, 24, 20, .13); border: 1px solid #E6E9E6;
}
.login-logo { width: 168px; display: block; margin: 0 auto 16px; }
.login-card h1 { font-size: 21px; text-align: center; margin: 0 0 16px; letter-spacing: -.015em; }

/* Editor */
.editor-top { position: sticky; top: 14px; z-index: 5; }
.editor-meta { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.editor-meta label { margin-top: 0; }
.editor-actions { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.editor-wrap { display: grid; grid-template-columns: 1fr 350px; gap: 22px; align-items: start; }
@media (max-width: 1080px) { .editor-wrap { grid-template-columns: 1fr; } }
.editor-canvas { padding: 32px; min-height: 440px; }
.canvas-inner {
  max-width: 600px; margin: 0 auto; border-radius: 14px; padding: 22px 0;
  border-top: 6px solid var(--green); box-shadow: 0 6px 26px rgba(20, 24, 20, .09);
}
.blk-wrap { position: relative; padding: 8px 32px; border: 2px dashed transparent; border-radius: 10px; cursor: grab; transition: border-color .12s; }
.blk-wrap:hover { border-color: #CFE9CE; }
.blk-wrap.sel { border-color: var(--green); }
.blk-wrap.dragging { opacity: .4; }
.blk-tools {
  position: absolute; top: -16px; right: 8px; display: none; gap: 2px; align-items: center;
  background: var(--ink); border-radius: 9px; padding: 4px 8px; z-index: 3;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .22);
}
.blk-wrap:hover .blk-tools, .blk-wrap.sel .blk-tools { display: flex; }
.blk-type { color: #B5E8B3; font-size: 11.5px; font-weight: 700; margin-right: 7px; }
.t-btn { background: none; border: 0; color: #fff; cursor: pointer; font-size: 14px; padding: 3px 7px; border-radius: 6px; }
.t-btn:hover { background: var(--green); }
.t-del:hover { background: #C0392B; }
.blk-body .rt { outline: none; min-height: 20px; font-size: 15px; line-height: 1.6; }
.img-empty { background: #F5F7F5; border: 1px dashed #C9CCC9; border-radius: 10px; padding: 32px 12px; text-align: center; color: var(--grey); font-size: 14px; }
.spacer-vis { background: repeating-linear-gradient(45deg, #F5F7F5, #F5F7F5 6px, #ECEFEC 6px, #ECEFEC 12px); border-radius: 7px; display: flex; align-items: center; justify-content: center; color: #A6AAA6; font-size: 12px; }
.mini-nps { display: inline-block; width: 28px; height: 28px; line-height: 28px; border: 1px solid var(--line); border-radius: 7px; margin: 2px; font-size: 13px; font-weight: 700; }
.palette { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pal-btn {
  padding: 14px 10px; border: 1px solid var(--line); background: #FAFCFA; border-radius: 12px;
  font-weight: 700; cursor: pointer; font-size: 14px; font-family: inherit; transition: all .15s;
}
.pal-btn:hover { border-color: var(--green); color: var(--green-dark); background: var(--green-tint); transform: translateY(-1px); }
.prop-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.prop-row label { margin: 0; flex-shrink: 0; width: 112px; font-size: 13px; }
.prop-row input, .prop-row select { flex: 1; min-width: 0; }
.prop-row input:not([type="checkbox"]):not([type="range"]):not([type="color"]), .prop-row select { padding: 10px 12px; font-size: 14px; border-radius: 10px; }
.prop-row input[type="color"] { padding: 3px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.rt-toolbar { display: flex; gap: 8px; margin: 10px 0; }
.rt-toolbar button { padding: 8px 13px; border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; font-family: inherit; font-size: 14px; }
.rt-toolbar button:hover { border-color: var(--green); background: var(--green-tint); }

/* Bevestigingsoverlay */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(16, 18, 16, .45);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .18s; z-index: 100;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: #fff; border-radius: 20px; padding: 34px 36px 30px; width: 440px; max-width: 94vw;
  box-shadow: 0 28px 70px rgba(16, 18, 16, .28); text-align: center;
  transform: translateY(14px) scale(.97); transition: transform .18s;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-icon {
  width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
}
.modal-icon svg { width: 26px; height: 26px; }
.modal-icon.danger { background: #FDECEA; color: #C0392B; }
.modal-icon.primary { background: var(--green-tint); color: var(--green-dark); }
.modal-title { font-size: 19px; font-weight: 800; letter-spacing: -.015em; margin: 0 0 8px; }
.modal-msg { color: var(--grey); font-size: 15px; margin: 0 0 24px; white-space: pre-line; }
.modal-actions { display: flex; gap: 12px; justify-content: center; }
.modal-actions .btn { min-width: 130px; }
.btn-danger-solid {
  background: linear-gradient(180deg, #D24437, #C0392B); border-color: #A93226; color: #fff;
  box-shadow: 0 6px 16px rgba(192, 57, 43, .3);
}
.btn-danger-solid:hover { background: #A93226; border-color: #A93226; }

/* Responsief */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 12px 14px; }
  .side-logo { padding: 0 12px 0 0; }
  .side-logo img { width: 98px; padding: 7px 9px; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .side nav a { padding: 10px 12px; }
  .side nav a span { display: none; }
  .side nav a svg { width: 21px; height: 21px; }
  .side-foot { display: none; }
  .main { padding: 22px 16px 36px; }
  .page-title { font-size: 24px; }
}
