/* Colours copied from Postiz's dark theme so both tools feel the same. */
:root {
  --bg: #0e0e0e; --panel: #1a1919; --line: #212121; --border: #252525; --hover: #201f1f;
  --btn: #313030; --primary: #612bd3; --primary-h: #7236f1; --muted: #999; --muted2: #777b7f;
  --th: #1e1d1d; --col: #161515; --green: #32d583; --orange: #ffac30; --red: #f97066; --blue: #8b90ff;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: #fff; }
body { font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif; font-size: 14px; line-height: 1.45; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

/* layout */
.layout { display: flex; min-height: 100vh; }
.side { width: 224px; flex: none; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px;
        position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; padding: 4px 10px 22px; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
         color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--hover); color: #fff; }
.nav a.on { background: var(--panel); color: #fff; }
.nav svg { width: 19px; height: 19px; flex: none; }
.nav .count { margin-left: auto; background: var(--primary); color: #fff; border-radius: 999px;
              font-size: 11px; padding: 1px 8px; min-width: 22px; text-align: center; }
.side .bottom { margin-top: auto; }
.main { flex: 1; min-width: 0; padding: 14px 14px 14px 0; }
.panel { background: var(--panel); border-radius: 16px; padding: 26px 30px 40px; min-height: calc(100vh - 28px); }

.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 700; }
h2 { font-size: 16px; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px;
       border-radius: 9px; border: 0; background: var(--btn); color: #fff; font-weight: 600; cursor: pointer;
       text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.15); }
.btn.primary { background: var(--primary); }
.btn.primary:hover { background: var(--primary-h); filter: none; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn.ghost:hover { color: #fff; background: var(--hover); }
.btn.green { background: #1f6f4a; }
.btn.small { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: default; }

/* status strip */
.strip { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; background: var(--col); border: 1px solid var(--border);
         border-radius: 12px; padding: 11px 16px; margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.strip b { color: #fff; font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; background: var(--muted2); }
.dot.ok { background: var(--green); } .dot.bad { background: var(--red); } .dot.wait { background: var(--orange); }
.strip a { color: var(--blue); }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.chip { height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--border); background: transparent;
        color: var(--muted); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 600; font-size: 13px; }
.chip:hover { color: #fff; background: var(--hover); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.sep { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }
select.sel { height: 32px; border-radius: 9px; background: var(--btn); border: 0; padding: 0 10px; font-weight: 600; font-size: 13px; }

/* creator cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.card { background: var(--col); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex;
        flex-direction: column; gap: 12px; transition: opacity .25s, transform .25s; }
.card.gone { opacity: 0; transform: scale(.97); }
.top { display: flex; gap: 12px; align-items: center; }
.avatar { width: 46px; height: 46px; border-radius: 50%; flex: none; object-fit: cover; background: var(--btn);
          display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.who { min-width: 0; flex: 1; }
.user { font-weight: 700; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user:hover { color: var(--blue); }
.name { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score { flex: none; text-align: center; background: var(--th); border-radius: 10px; padding: 5px 10px; }
.score b { display: block; font-size: 18px; line-height: 1.1; }
.score span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.b { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--btn); color: #ddd; }
.b.green { background: #12392a; color: var(--green); } .b.orange { background: #3d2c10; color: var(--orange); }
.b.red { background: #3d1a17; color: var(--red); } .b.blue { background: #22244a; color: var(--blue); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: var(--th); border-radius: 10px; padding: 10px 6px; }
.stats div { text-align: center; }
.stats b { display: block; font-size: 15px; }
.stats span { font-size: 11px; color: var(--muted); }
.topics { font-size: 13px; color: var(--muted); }
.topics b { color: #ddd; font-weight: 600; }
.proof { display: block; font-size: 13px; color: #cfd; background: #0f2a1f; border-left: 3px solid var(--green); padding: 8px 10px;
         border-radius: 6px; text-decoration: none; }
.proof:hover { background: #12352a; }
.proof small { display: block; color: var(--green); font-weight: 600; margin-bottom: 2px; }
.bio { font-size: 13px; color: var(--muted2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.actions { display: flex; gap: 8px; margin-top: auto; }
.actions .btn { flex: 1; }
.links { display: flex; gap: 14px; font-size: 12px; }
.links a, .links button { color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.links a:hover, .links button:hover { color: #fff; }

/* empty state */
.empty { border: 1px dashed var(--sep, #454444); border-radius: 14px; padding: 36px; text-align: center; color: var(--muted); }
.empty h2 { color: #fff; margin-bottom: 8px; }
.empty ol { text-align: left; display: inline-block; margin: 10px 0 0; }

/* send today */
.list { display: flex; flex-direction: column; gap: 14px; }
.send { display: grid; grid-template-columns: 290px 1fr; gap: 18px; background: var(--col); border: 1px solid var(--border);
        border-radius: 14px; padding: 16px; transition: opacity .25s; }
.send.gone { opacity: 0; }
.send .left { display: flex; flex-direction: column; gap: 10px; }
.send .mini { color: var(--muted); font-size: 13px; }
textarea.msg { width: 100%; min-height: 350px; resize: vertical; background: var(--th); border: 1px solid var(--border);
               border-radius: 10px; padding: 12px 14px; line-height: 1.5; }
textarea:focus, input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.steps { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tip { background: var(--col); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; color: var(--muted);
       margin-bottom: 16px; font-size: 13px; }
.tip b { color: #fff; }
.pill { background: var(--th); border-radius: 10px; padding: 8px 14px; text-align: center; }
.pill b { display: block; font-size: 20px; }
.pill span { color: var(--muted); font-size: 12px; }

/* deals board */
.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--col); border: 1px solid var(--border); border-radius: 14px; padding: 12px; min-height: 300px; }
.col h3 { font-size: 13px; margin: 2px 4px 12px; display: flex; justify-content: space-between; color: #ddd; }
.col h3 span { color: var(--muted); }
.deal { background: var(--th); border: 1px solid var(--border); border-radius: 11px; padding: 11px; margin-bottom: 10px;
        display: flex; flex-direction: column; gap: 8px; }
.deal .top .avatar { width: 34px; height: 34px; font-size: 12px; }
.deal input { width: 100%; height: 32px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 0 9px; font-size: 13px; }
.deal .moves { display: flex; gap: 6px; }
.deal .moves .btn { flex: 1; }
.deal .when { font-size: 11px; color: var(--muted2); }

/* settings */
.sections { display: flex; flex-direction: column; gap: 16px; max-width: 860px; }
.box { background: var(--col); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; scroll-margin-top: 20px; }
.box .row.space { justify-content: space-between; }
.state { font-weight: 600; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.state.ok { background: #12392a; color: var(--green); } .state.bad { background: #3d1a17; color: var(--red); }
.state.off { background: var(--btn); color: var(--muted); }
ol.howto { color: #ccc; padding-left: 20px; margin: 14px 0; }
ol.howto li { margin-bottom: 7px; }
ol.howto a { color: var(--blue); }
code { background: var(--th); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; color: #e9d5ff; }
label.f { display: block; font-weight: 600; margin: 14px 0 6px; }
label.f small { color: var(--muted); font-weight: 500; margin-left: 6px; }
input.in, textarea.in, select.in { width: 100%; background: var(--th); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; }
input.in { height: 40px; }
textarea.in { min-height: 120px; resize: vertical; line-height: 1.5; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; background: var(--th); border: 1px solid var(--border); border-radius: 9px; padding: 8px 12px; cursor: pointer; }
.check input { accent-color: var(--primary); width: 16px; height: 16px; }
.preview { white-space: pre-wrap; background: var(--th); border-radius: 10px; padding: 14px; color: #ddd; font-size: 13px; border: 1px solid var(--border); }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.events { list-style: none; padding: 0; margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.events li { padding: 4px 0; border-bottom: 1px solid var(--line); }

/* flash + toast */
.flash { border-radius: 10px; padding: 11px 14px; margin-bottom: 16px; font-weight: 600; }
.flash.ok { background: #12392a; color: var(--green); } .flash.err { background: #3d1a17; color: var(--red); }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: #fff; color: #111;
         padding: 11px 18px; border-radius: 10px; font-weight: 600; opacity: 0; transition: .2s; pointer-events: none; z-index: 50; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--red); color: #fff; }

/* dialog */
dialog { background: var(--panel); color: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 22px; width: min(560px, 92vw); }
dialog::backdrop { background: rgba(0,0,0,.6); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; }
.login form { background: var(--panel); border-radius: 16px; padding: 30px; width: min(380px, 92vw); display: flex; flex-direction: column; gap: 12px; }
.login .brand { padding: 0 0 8px; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .brand { padding: 4px 10px; }
  .side .bottom { margin-top: 0; }
  .main { padding: 0 8px 8px; }
  .panel { padding: 18px; }
  .send { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
}
