/* Webless Dashboard: a webless.hu arculatara hangolva
   (melyzold + lime + krem, Bricolage Grotesque / Dela Gothic One) */

:root {
  --bg: #f0f7e5;
  --surface: #ffffff;
  --cream: #f6f6ce;
  --cream-soft: #fbfbe3;
  --text: #071e18;
  --ink: #071e18;
  --muted: #51695d;
  --line: #d9e4cc;
  --accent: #31574b;
  --accent-deep: #0f2c23;
  --lime: #d8f69f;
  --lime-strong: #c9f07e;
  --green: #79cc9e;
  --orange: #ff8717;
  --warn: #c05f00;
  --error: #b91c1c;
  --ok: #1c5c40;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}
main { max-width: 1100px; margin: 0 auto; padding: 26px 20px 70px; }
a { color: var(--accent); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }
h1 { font-family: "Dela Gothic One", "Bricolage Grotesque", system-ui, sans-serif; font-size: 23px; font-weight: 400; margin: 0 0 8px; letter-spacing: .01em; }
h2 { font-size: 19px; font-weight: 700; margin: 32px 0 12px; }
h3 { font-size: 16px; font-weight: 700; margin: 18px 0 8px; }
.muted { color: var(--muted); }

.topnav {
  background: var(--accent-deep);
  padding: 12px 22px;
  display: flex;
  gap: 22px;
  align-items: center;
  border-bottom: 3px solid var(--lime);
}
.topnav a { color: #d3e3d6; font-weight: 600; font-size: 14.5px; }
.topnav a:hover { color: var(--lime); text-decoration: none; }
.topnav .brand { font-family: "Dela Gothic One", system-ui, sans-serif; font-weight: 400; font-size: 16px; color: #fff; margin-right: 16px; }
.topnav .brand span { color: var(--lime); margin-left: 5px; font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 500; }
.topnav .spacer { flex: 1; }
.topnav .nav-user { color: #7f9d8c; font-size: 13.5px; }
.nav-links { display: flex; align-items: center; gap: 22px; flex: 1; }
.nav-toggle { display: none; background: none; border: none; color: #d3e3d6; font-size: 26px; line-height: 1; cursor: pointer; padding: 0; margin-left: auto; }
.nav-toggle:hover { color: var(--lime); }
.topnav button.linklike { background: none; border: none; color: #d3e3d6; cursor: pointer; font-size: 14.5px; font-weight: 600; padding: 0; font-family: inherit; }
.topnav button.linklike:hover { color: var(--lime); }

.flash { padding: 11px 15px; border-radius: 10px; margin-bottom: 18px; background: #e8f5de; border: 1.5px solid var(--green); color: var(--ok); font-weight: 500; }
.flash.error { background: #fdeeee; border-color: #efb0ac; color: var(--error); }

.back-link { display: inline-block; margin-bottom: 14px; font-weight: 700; color: var(--accent); }
.back-link:hover { color: var(--accent-deep); text-decoration: none; }

.page-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.page-head .actions { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-block;
  background: var(--lime);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  padding: 8px 17px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .08s, box-shadow .08s, background .08s;
}
.btn:hover { background: var(--lime-strong); color: var(--ink); text-decoration: none; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.btn.secondary { background: var(--cream); }
.btn.secondary:hover { background: #f1edb8; }
.btn.danger { background: #ffe3e0; color: var(--error); }
.btn.danger:hover { background: #ffd2cd; }
.btn.small { padding: 4px 11px; font-size: 13px; box-shadow: 1.5px 1.5px 0 var(--ink); border-width: 1.2px; }
.btn.small:hover { box-shadow: 2.5px 2.5px 0 var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: 2px 2px 0 var(--ink); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.card-title-row { display: flex; align-items: center; gap: 10px; }
.client-logo { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: #fff; flex: none; }
.client-logo-lg { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1.5px solid var(--ink); background: #fff; vertical-align: -12px; margin-right: 10px; }
.card { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 14px; padding: 16px 18px; box-shadow: 3px 3px 0 rgba(7, 30, 24, .12); }
.card-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.card-title { font-size: 17px; font-weight: 700; color: var(--accent-deep); }
.kpis { display: flex; gap: 14px; flex-wrap: wrap; margin: 12px 0; font-size: 13px; color: var(--muted); }
.kpis b { color: var(--text); font-size: 15px; }
.kpis .warn, .warn { color: var(--warn); }
.card-actions { display: flex; gap: 8px; }

.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 99px;
  padding: 2px 10px;
  background: #e9efdd;
  color: var(--muted);
}
.badge.svc { background: var(--lime); color: var(--accent-deep); }
.badge.st-draft { background: #e9efdd; color: #4b5d52; }
.badge.st-review { background: #f1edb8; color: #6d5200; }
.badge.st-changes_requested { background: #ffe4c7; color: #9a4c00; }
.badge.st-approved { background: #d7efc2; color: var(--ok); }
.badge.st-scheduled { background: #dbeafe; color: #1e40af; }
.badge.st-published { background: #98d7b7; color: #0f3d2a; }
.badge.st-failed { background: #fee2e2; color: #991b1b; }
.badge.pl-facebook { background: #dbeafe; color: #1d4ed8; }
.badge.pl-instagram { background: #fce7f3; color: #be185d; }
.badge.pl-both { background: #e8f5de; color: #31574b; }

table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; box-shadow: 3px 3px 0 rgba(7, 30, 24, .12); }
th, td { text-align: left; padding: 9px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #ecf3df; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.sev-error td:nth-child(2) { color: var(--error); font-weight: 700; }
tr.sev-warning td:nth-child(2) { color: var(--warn); font-weight: 700; }

form.inline { display: inline; }
label { display: block; font-weight: 700; font-size: 13.5px; margin: 14px 0 4px; color: var(--accent-deep); }
input[type=text], input[type=url], input[type=number], input[type=date],
input[type=datetime-local], input[type=password], select, textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1.5px solid #b9c9ab;
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(49, 87, 75, .15); }
textarea { min-height: 120px; resize: vertical; }
textarea.tall { min-height: 320px; }
.checks { display: flex; gap: 18px; margin: 6px 0; flex-wrap: wrap; }
.checks label { display: flex; gap: 6px; align-items: center; margin: 0; font-weight: 500; color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.panel { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; box-shadow: 3px 3px 0 rgba(7, 30, 24, .12); }
.panel.info { background: #e8f5de; border-color: var(--green); box-shadow: 3px 3px 0 rgba(49, 87, 75, .15); }
.panel.warning { background: #fff3e2; border-color: var(--orange); box-shadow: 3px 3px 0 rgba(255, 135, 23, .2); }

.post-text { white-space: pre-wrap; background: #fafcf5; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.brief { background: var(--cream-soft); border: 1.5px solid #d9d590; border-radius: 14px; padding: 12px 16px; font-size: 14px; }
.brief b { color: var(--accent-deep); }

.copy-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; margin: 6px 0; }
.copy-row button { flex: none; }
.copy-row input, .copy-row textarea { flex: 1; border: none; padding: 2px 4px; background: transparent; }
.copy-row input:focus, .copy-row textarea:focus { outline: 1px solid var(--accent); border-radius: 4px; background: #fff; box-shadow: none; }
.copy-row.selected { border: 1.5px solid var(--accent); background: #f0fbe2; }

.edit-only { display: none; }
form.editing .edit-only { display: inline-block; }
form.editing .edit-start { display: none; }
textarea[readonly], input[readonly] { background: #f4f7ee; cursor: default; }
.copy-row input[readonly], .copy-row textarea[readonly] { background: transparent; }
.panel, .brief { position: relative; }
.corner-actions { position: absolute; top: 12px; right: 14px; display: flex; gap: 8px; z-index: 5; }

.row-actions { white-space: nowrap; }
.row-actions form { display: inline; }

.emoji-bar { position: relative; display: inline-block; margin-bottom: 6px; }
.emoji-panel { display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: 380px; max-height: 320px; overflow-y: auto; flex-wrap: wrap; align-content: flex-start; gap: 2px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 12px; padding: 8px; box-shadow: 4px 4px 0 rgba(7, 30, 24, .18); }
.emoji-panel.open { display: flex; }
.emoji-group-title { width: 100%; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 6px 2px 2px; }
.emoji-group-title:first-child { margin-top: 0; }
.emoji-panel button { font-size: 19px; background: none !important; border: none !important; cursor: pointer; padding: 4px 6px; border-radius: 6px; line-height: 1; box-shadow: none !important; }
.emoji-panel button:hover { background: #eef5e3 !important; }

.dropzone { border: 2px dashed #a9bd97; border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; background: #f7faf1; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: #edf8db; }
.dropzone img.preview { max-width: 240px; max-height: 180px; display: block; margin: 10px auto 0; border-radius: 8px; }

.image-list { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0; }
.image-item { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; width: 160px; }
.image-item .preview { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; cursor: zoom-in; display: block; }
.image-pos { position: absolute; top: 5px; left: 5px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; width: 21px; height: 21px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.image-controls { display: flex; gap: 4px; margin-top: 6px; justify-content: center; }
.image-controls form { display: inline; }
.review-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.review-imgs img { width: 130px; height: 130px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }

.step { display: flex; gap: 14px; align-items: flex-start; }
.step-num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--lime); color: var(--ink); border: 1.5px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }

.idea-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 10px; }
@media (max-width: 800px) { .idea-grid { grid-template-columns: 1fr; } }
.idea-card { position: relative; margin-bottom: 0; padding-top: 22px; padding-right: 110px; }
.idea-card .idea-cat { position: absolute; top: 12px; right: 12px; }
.badge.cat-edu { background: #dbeafe; color: #1d4ed8; }
.badge.cat-offer { background: var(--lime); color: var(--accent-deep); }
.badge.cat-trust { background: #ede9fe; color: #6d28d9; }
.badge.cat-engage { background: #ffe4c7; color: #9a4c00; }
.badge.cat-inspire { background: #fce7f3; color: #be185d; }
.badge.slot-orange { background: #ffedd5; color: #9a3412; border: 1px solid var(--orange); }
.badge.slot-red { background: #fee2e2; color: #991b1b; border: 1px solid var(--error); }

.cal-slot { display: block; margin: 2px 0; padding: 2px 6px; border: 1px dashed var(--orange); border-radius: 5px; font-size: 11px; color: #9a3412; background: #fff7ed; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment-item.unseen { background: #fff7ed; border-radius: 8px; padding-left: 8px; padding-right: 8px; }
.dropzone-static { cursor: default; }

.btn.loading { position: relative; opacity: .85; }
.btn.loading::after { content: ""; display: inline-block; width: 13px; height: 13px; margin-left: 8px; border: 2px solid rgba(7, 30, 24, .25); border-top-color: var(--ink); border-radius: 50%; vertical-align: -2px; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { font-size: 12px; font-weight: 800; color: var(--accent); text-transform: uppercase; padding: 4px 6px; }
.cal-day { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 92px; padding: 6px 8px; font-size: 12.5px; }
.cal-day.other { opacity: .45; }
.cal-day.today { border: 1.5px solid var(--ink); box-shadow: 2px 2px 0 var(--lime); }
.cal-day .daynum { font-weight: 800; font-size: 13px; margin-bottom: 4px; }
.cal-day a.cal-post { display: block; margin: 2px 0; padding: 2px 6px; border-radius: 5px; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-post.st-scheduled { background: #dbeafe; color: #1e40af; }
.cal-post.st-published { background: #98d7b7; color: #0f3d2a; }
.cal-post.st-failed { background: #fee2e2; color: #991b1b; }
.cal-nav { display: flex; gap: 14px; align-items: center; margin: 14px 0; flex-wrap: wrap; }

.totals { display: flex; gap: 14px; flex-wrap: wrap; margin: 12px 0 16px; }
.totals .tile { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 12px; padding: 12px 18px; min-width: 130px; box-shadow: 2px 2px 0 rgba(7, 30, 24, .12); }
.totals .tile b { display: block; font-size: 20px; color: var(--accent-deep); }
.totals .tile span { font-size: 12.5px; color: var(--muted); }
a.tile { text-decoration: none; }
a.tile:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(7, 30, 24, .18); text-decoration: none; }
.tile.tile-bad { background: #fdeeee; border-color: var(--error); }
.tile.tile-bad b { color: var(--error); }
.tile.tile-warn { background: #fff3e2; border-color: var(--orange); }
.tile.tile-warn b { color: var(--warn); }
.tile.tile-go { background: #f0fbe2; border-color: var(--green); }
.tile.tile-go b { color: var(--ok); }

.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } }
.client-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 99px; padding: 5px 14px 5px 6px; margin: 0 8px 8px 0; font-weight: 700; color: var(--accent-deep); box-shadow: 2px 2px 0 rgba(7, 30, 24, .12); }
.client-pill:hover { text-decoration: none; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(7, 30, 24, .18); }
.client-pill .client-logo { width: 28px; height: 28px; border-radius: 50%; }

.review-card { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; box-shadow: 3px 3px 0 rgba(7, 30, 24, .12); }
.review-img { display: block; max-width: 300px; max-height: 380px; margin: 12px 0; border-radius: 10px; border: 1px solid var(--line); }
.approve-box { margin-top: 14px; padding: 12px 14px; background: #f0fbe2; border: 1.5px solid var(--green); border-radius: 10px; }
.approver-list { display: inline-flex; gap: 10px; flex-wrap: wrap; margin: 8px 8px; }
.approver { font-size: 13.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 3px 11px; }
.approver.ok { color: var(--ok); border-color: var(--green); background: #e8f5de; font-weight: 700; }

.comments { margin-top: 12px; }
.comment-item { padding: 8px 0; border-bottom: 1px dashed #d9c79a; }
.comment-item:last-child { border-bottom: none; }

.auth-box { max-width: 430px; margin: 60px auto 0; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 16px; padding: 28px 30px; box-shadow: 5px 5px 0 var(--lime); }
.auth-box h1 { font-size: 20px; }

.post-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; display: block; }
.thumb-count { position: absolute; bottom: -4px; right: -4px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 700; border-radius: 99px; padding: 1px 5px; }
.post-thumb:hover { border-color: var(--accent); }
.lightbox-overlay { display: none; position: fixed; inset: 0; background: rgba(7, 30, 24, .78); z-index: 120; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 92vw; max-height: 88vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }

.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(7, 30, 24, .5); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border: 1.5px solid var(--ink); border-radius: 14px; padding: 22px 24px; max-width: 440px; width: calc(100% - 40px); box-shadow: 6px 6px 0 rgba(7, 30, 24, .3); }
.modal p { margin: 0; font-size: 15px; }

@media (max-width: 640px) {
  main { padding: 16px 12px 50px; }
  h1 { font-size: 19px; }
  h2 { font-size: 17px; margin-top: 22px; }
  .topnav { gap: 10px 14px; padding: 12px 16px; flex-wrap: wrap; }
  .topnav .brand { margin-right: 0; }
  .nav-toggle { display: block; }
  .nav-links { display: none; flex: 0 0 100%; flex-direction: column; align-items: flex-start; width: 100%; gap: 14px; padding-top: 8px; }
  .nav-links.open { display: flex; }
  .nav-links .spacer { display: none; }
  .nav-links .nav-user { margin-top: 2px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .page-head .actions { flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; }
  .idea-grid { grid-template-columns: 1fr; }
  .idea-card { padding-right: 20px; }
  .idea-card .idea-cat { position: static; display: inline-block; margin-bottom: 6px; }
  /* a tablakat vizszintesen gorgethetove tesszuk, hogy ne lojjenek ki */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .totals .tile { flex: 1 1 42%; min-width: 0; }
  .copy-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .corner-actions { position: static; margin-bottom: 10px; }
  .emoji-panel { width: calc(100vw - 40px); }
  .client-pill { font-size: 13px; }
  .auth-box { margin-top: 24px; padding: 22px 18px; }
}

@media print {
  .topnav, .no-print, .flash { display: none !important; }
  body { background: #fff; }
  main { max-width: none; padding: 0; }
  .panel, table, .totals .tile, .card { border-color: #999; box-shadow: none; }
}
