/* Saqrion Marketing — neumorphic theme matching Saqrion ERP (same tokens: dark, light, warm) */
:root {
  --bg: #1f2633; --surface: #273041; --surface-2: #2c3647; --sunk: #232b39; --line: #3a465a;
  --fg: #dfe5ee; --muted: #a0abbd; --accent: #f0727d; --accent-soft: rgba(240,114,125,.16); --accent-fg: #fff;
  --data: #6cc6d6; --data-soft: rgba(108,198,214,.15); --good: #6fcf9f; --good-soft: rgba(111,207,159,.15);
  --warn: #e9bb67; --warn-soft: rgba(233,187,103,.16); --crit: #ee7d88; --crit-soft: rgba(238,125,136,.17);
  --hi: #2b3546; --sh: #141a24;
  --side: #161c27; --side-2: #1d2533; --side-line: #2b3443; --side-fg: #c3cbd8; --side-mute: #7f8a9c;
  --f-ui: "Segoe UI", "Segoe UI Variable", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-num: "Cascadia Mono", Consolas, ui-monospace, "SFMono-Regular", Menlo, monospace;
  --r: 8px; --rl: 14px;
  --raise: -5px -5px 11px var(--hi), 5px 5px 12px var(--sh);
  --raise-sm: -3px -3px 6px var(--hi), 3px 3px 6px var(--sh);
  --press: inset 2px 2px 5px var(--sh), inset -2px -2px 5px var(--hi);
  --press-sm: inset 1px 1px 2px var(--sh), inset -1px -1px 2px var(--hi);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef1f6; --surface: #fff; --surface-2: #fbfcfd; --sunk: #e3e8f0; --line: #d6dde6; --fg: #16202e; --muted: #5b6878;
  --accent: #c8102e; --accent-soft: #fbe4e7; --data: #0b7fb3; --data-soft: #e1f2fa; --good: #1d7a4f; --good-soft: #dff2e8;
  --warn: #9a6200; --warn-soft: #fbefd6; --crit: #b4322b; --crit-soft: #fbe3e1; --hi: #fff; --sh: #cdd4df;
  --side: #12161d; --side-2: #1f2631; --side-line: #2a313c; --side-fg: #c9cfd8; --side-mute: #7c8596; color-scheme: light;
}
:root[data-theme="warm"] {
  --bg: #ece4d8; --surface: #f8f2e9; --surface-2: #fbf7f0; --sunk: #e1d8c8; --line: #d6cbb7; --fg: #44392d; --muted: #7c7062;
  --accent: #c8102e; --accent-soft: #f2dbd5; --data: #1f6f8b; --data-soft: #e2eef2; --good: #5c7a28; --good-soft: #e9edd7;
  --warn: #9a6200; --warn-soft: #f6ead0; --crit: #b4322b; --crit-soft: #f6ddd7; --hi: #fffaf1; --sh: #cdc1ad;
  --side: #12161d; --side-2: #1f2631; --side-line: #2a313c; --side-fg: #c9cfd8; --side-mute: #7c8596; color-scheme: light;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.5 var(--f-ui); }
a { color: var(--data); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0; text-wrap: balance; }
h2 { font-size: 12.5px; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
h3 { font-size: 15px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
::selection { background: var(--accent-soft); }

/* ---------- layout: dark rail like the ERP ---------- */
.layout { display: flex; min-height: 100vh; }
.side { width: 232px; flex-shrink: 0; background: var(--side); border-right: 1px solid var(--side-line); color: var(--side-fg);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; }
.brand .mark { flex: 0 0 auto; border-radius: 10px; box-shadow: 0 4px 14px -6px rgba(220,38,38,.55); }
.brand b { display: block; font-size: 15px; color: #fff; line-height: 1.15; }
.brand span { display: block; font-size: 10.5px; color: var(--side-mute); letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.side nav { flex: 1; overflow: auto; padding: 4px 10px; display: flex; flex-direction: column; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 8px 12px; min-height: 38px; border-radius: 12px;
  color: var(--side-mute); font-size: 13.5px; font-weight: 500; transition: background .15s, color .15s; }
.side nav a svg { width: 18px; height: 18px; flex: 0 0 auto; }
.side nav a:hover { background: var(--side-2); color: var(--side-fg); text-decoration: none; }
.side nav a.on { background: var(--accent-soft); color: var(--accent); }
.side nav a .badge { margin-left: auto; }
.side nav .sep { margin: 14px 12px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--side-mute); opacity: .8; }
.badge { min-width: 18px; height: 18px; line-height: 18px; padding: 0 6px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.side .foot { padding: 12px 16px 14px; font-size: 12px; color: var(--side-mute); border-top: 1px solid var(--side-line); }
.side .foot a { color: var(--side-fg); }
.side select { width: 100%; margin-bottom: 8px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--side-line); background: var(--side-2); color: var(--side-fg); }

main { flex: 1; min-width: 0; padding: 24px 28px 60px; max-width: 1280px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.head .muted { margin-top: 2px; }

/* theme switch (segmented, pressed-in like the ERP) */
.cos { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg); box-shadow: var(--press); }
.cos button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.cos button[aria-pressed="true"] { background: var(--bg); color: var(--fg); box-shadow: -2px -2px 4px var(--hi), 2px 2px 4px var(--sh); }
.side .cos { background: var(--side-2); box-shadow: none; margin-top: 10px; }
.side .cos button { color: var(--side-mute); }
.side .cos button[aria-pressed="true"] { background: var(--side); color: #fff; box-shadow: none; }

/* ---------- surfaces ---------- */
.card { background: var(--bg); border-radius: var(--rl); padding: 18px 20px; margin-bottom: 22px; box-shadow: var(--raise); }
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.stat { position: relative; overflow: hidden; background: var(--bg); border-radius: var(--rl); padding: 14px 16px; box-shadow: var(--raise);
  display: flex; flex-direction: column; gap: 2px; transition: transform .25s, box-shadow .25s; }
.stat:hover { transform: translateY(-2px); box-shadow: -6px -6px 13px var(--hi), 6px 6px 14px var(--sh); }
.stat::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, var(--accent), var(--data)); opacity: .9; }
.stat b { font-family: var(--f-num); font-size: 24px; font-weight: 500; letter-spacing: -.01em; }
.stat span { color: var(--muted); font-size: 12px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--bg); color: var(--fg); border-radius: var(--r);
  padding: 8px 14px; font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; box-shadow: var(--raise-sm);
  transition: box-shadow .15s, filter .15s; }
.btn:hover { text-decoration: none; box-shadow: -2px -2px 5px var(--hi), 2px 2px 6px var(--sh); }
.btn:active { box-shadow: var(--press); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.gold, .btn.primary { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 75%, #e9a06a)); color: var(--accent-fg);
  box-shadow: -3px -3px 6px var(--hi), 3px 3px 8px var(--sh); }
.btn.gold:hover, .btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--bg); color: var(--fg); }
.btn.danger { color: var(--crit); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.inline { display: inline; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- forms: pressed-in fields ---------- */
label { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin: 14px 0 6px; }
label .hint { font-weight: 400; opacity: .85; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=datetime-local], input[type=time], input[type=file], select, textarea {
  width: 100%; padding: 9px 12px; border: 0; border-radius: var(--r); font: inherit; color: var(--fg); background: var(--bg); box-shadow: var(--press); outline: none; }
input:focus, select:focus, textarea:focus { box-shadow: var(--press), 0 0 0 2px var(--accent-soft); }
input[type=color] { width: 52px; height: 36px; padding: 3px; border: 0; border-radius: var(--r); background: var(--bg); box-shadow: var(--press); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
textarea.post { min-height: 260px; font-size: 14.5px; line-height: 1.55; }
::placeholder { color: var(--muted); opacity: .7; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--fg); margin: 10px 0; flex-wrap: wrap; }
.check input { width: auto; }
.days { display: flex; gap: 8px; flex-wrap: wrap; }
.days label { display: flex; gap: 6px; align-items: center; margin: 0; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; color: var(--fg);
  background: var(--bg); box-shadow: var(--raise-sm); cursor: pointer; }
.days label:has(input:checked) { color: var(--accent); box-shadow: var(--press); }

.flash { padding: 11px 16px; border-radius: var(--r); margin-bottom: 16px; box-shadow: var(--press-sm); }
.flash.ok { background: var(--good-soft); color: var(--good); }
.flash.err { background: var(--crit-soft); color: var(--crit); }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 9px 12px; background: var(--sunk); }
th:first-child { border-radius: var(--r) 0 0 var(--r); }
th:last-child { border-radius: 0 var(--r) var(--r) 0; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

/* ---------- pills and platform tags ---------- */
.pill { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--sunk); color: var(--muted); box-shadow: var(--press-sm); }
.pill.pending { background: var(--warn-soft); color: var(--warn); }
.pill.approved { background: var(--data-soft); color: var(--data); }
.pill.published { background: var(--good-soft); color: var(--good); }
.pill.failed, .pill.rejected { background: var(--crit-soft); color: var(--crit); }
.pill.publishing { background: var(--accent-soft); color: var(--accent); }
.pf { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; color: #fff; }
.pf.linkedin, .pf.linkedin_org { background: #0a66c2; }
.pf.facebook { background: #1877f2; }
.pf.instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }

/* ---------- week calendar ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.day { background: var(--bg); border-radius: var(--rl); padding: 10px; min-height: 150px; box-shadow: var(--press); }
.day.today { box-shadow: var(--press), inset 0 0 0 1px var(--accent); }
.day h4 { margin: 2px 4px 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.day.today h4 { color: var(--accent); }
.pc { background: var(--bg); border-radius: 12px; padding: 9px; margin-bottom: 12px; font-size: 13px; box-shadow: var(--raise-sm); }
.pc .t { color: var(--muted); font-size: 12px; margin: 6px 0 4px; }
.pc .pill { white-space: normal; }
.pc a b { color: var(--fg); }
.pc p { margin: 4px 0; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.pc img { width: 100%; border-radius: 8px; margin-top: 6px; max-height: 110px; object-fit: cover; }

/* ---------- media ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.mitem { background: var(--bg); border-radius: var(--rl); overflow: hidden; box-shadow: var(--raise); }
.mitem img, .mitem video { width: 100%; height: 160px; object-fit: cover; background: var(--sunk); display: block; }
.mitem .b { padding: 12px; }
.mitem textarea { min-height: 60px; font-size: 13px; margin-top: 6px; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; max-height: 340px; overflow: auto;
  border-radius: var(--r); padding: 10px; box-shadow: var(--press); }
.picker label { margin: 0; cursor: pointer; }
.picker input { display: none; }
.picker input + div { border-radius: 10px; padding: 3px; box-shadow: var(--raise-sm); }
.picker input:checked + div { box-shadow: var(--press), 0 0 0 2px var(--accent); }
.picker img, .picker video { width: 100%; height: 80px; object-fit: cover; border-radius: 8px; display: block; }
.picker .none { height: 80px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }

.preview { white-space: pre-wrap; border-radius: var(--r); padding: 14px; font-size: 14px; box-shadow: var(--press); }
.counter { font-size: 12px; color: var(--muted); text-align: right; margin-top: 6px; font-family: var(--f-num); }
.counter.over { color: var(--crit); font-weight: 600; }
.checklist { padding: 0; margin: 0; }
.checklist li { margin: 8px 0; list-style: none; display: flex; gap: 10px; align-items: center; }
.checklist .done { color: var(--good); }
.checklist .todo { color: var(--warn); }
.empty { text-align: center; color: var(--muted); padding: 30px; }
code { background: var(--sunk); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; font-family: var(--f-num); }

/* ---------- sign-in pages ---------- */
.auth { max-width: 420px; margin: 9vh auto; padding: 0 16px; }
.auth .brand { justify-content: center; padding: 0 0 22px; }
.auth .brand b { color: var(--fg); font-size: 20px; }
.auth .brand span { color: var(--muted); }

@media (max-width: 1100px) { .week { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) {
  .layout { flex-direction: column; } .side { width: 100%; height: auto; position: static; }
  .side nav { flex-direction: row; flex-wrap: wrap; } .side nav .sep, .side .foot { display: none; }
  main { padding: 18px 16px; } .g2, .g3, .g4, .week { grid-template-columns: 1fr; }
}
