/* DUNSK KUHNER theme — cream, charcoal, amber, mint (matches the IR tracker / website) */
:root {
  --cream: #FFF6E3;
  --ink: #2D2B28;
  --amber: #FBB814;
  --amber-soft: #FFD98A;
  --mint: #00D9A3;
  --mint-soft: #6DE8C4;
  --mint-pale: #BDF1DE;
  --orange: #E8620F;
  --rust: #C2440E;
  --peach: #F8CBA6;
  --lav: #E5DCFB;
  --beige: #E8DCC8;
  --line: #F0E4CB;
  --muted: #6B655C;
  --pad: clamp(16px, 4.2vw, 84px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.55 "Nunito", system-ui, "Segoe UI", Arial, sans-serif;
  background: var(--cream); color: var(--ink);
}
a { color: inherit; text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px var(--pad) 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 64px; width: auto; display: block; }
.brand .name strong { display: block; font-size: 28px; font-weight: 900; letter-spacing: -.5px; line-height: 1; }
.brand .name small { display: block; font-size: 17px; font-weight: 700; color: #5a554d; margin-top: 3px; }
.top nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.top nav a { text-decoration: none; font-weight: 700; padding: 12px 22px; border-radius: 999px; }
.top nav a:hover { background: rgba(45,43,40,.08); }
.top nav a.on, .top nav a.amber { background: var(--amber); }
.top nav a.soft { background: rgba(45,43,40,.1); }
.top nav a.dark { background: var(--ink); color: #fff; }
.top nav a.dark:hover { background: #000; }
.chip { display: flex; align-items: center; gap: 10px; border: 3px solid var(--ink); border-radius: 999px; padding: 5px 22px 5px 6px; margin: 0 6px; background: #fff; }
.chip .av { width: 40px; height: 40px; border-radius: 50%; background: var(--mint); display: grid; place-items: center; font-weight: 900; font-size: 15px; }
.chip b { display: block; line-height: 1.1; font-weight: 800; }
.chip small { display: block; font-size: 13px; color: var(--muted); line-height: 1.2; }

main { flex: 1; width: 100%; padding: 8px var(--pad) 64px; }

/* ---------- headings ---------- */
h1.page-title { font-size: clamp(40px, 6vw, 64px); font-weight: 900; letter-spacing: -1.5px; line-height: 1.02; margin: 28px 0 8px; }
.lede, .sub { font-size: 19px; margin: 0 0 22px; color: #3d3a35; }
.card .sub { font-size: 16px; color: var(--muted); margin-bottom: 18px; }
.card h1 { font-size: 30px; font-weight: 900; letter-spacing: -.5px; line-height: 1.1; margin: 0 0 6px; }
h2 { font-size: 22px; font-weight: 900; margin: 0 0 14px; letter-spacing: -.3px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.page-head .lede { margin-bottom: 14px; }

.hero { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; gap: 12px; } }
.blob { background: var(--amber-soft); padding: 26px 34px 26px 38px; border-radius: 90px 26px 26px 60px; margin: 6px 0 24px; max-width: 560px; }
.blob h3 { margin: 0 0 6px; font-size: 22px; font-weight: 900; letter-spacing: -.3px; }
.blob p { margin: 0 0 6px; font-size: 16px; }
.logo-big { width: 190px; height: auto; display: block; margin: 18px 0 8px; }

/* ---------- cards & forms ---------- */
.card { background: #fff; border: 3px solid var(--ink); border-radius: 40px; padding: 32px 34px 34px; margin-bottom: 24px; }
label { display: block; font-weight: 800; font-size: 15px; margin: 18px 0 8px 2px; }
label:first-child { margin-top: 0; }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 13px 20px; font: inherit; color: var(--ink);
  background: var(--cream); border: 2.5px solid var(--ink); border-radius: 999px;
}
textarea { border-radius: 28px; min-height: 140px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--amber); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: #9b9388; }
input[type=file] {
  width: 100%; padding: 16px 20px; font: inherit; background: var(--cream);
  border: 2.5px dashed var(--ink); border-radius: 24px; color: var(--muted);
}
input[type=file]::file-selector-button {
  background: var(--amber); color: var(--ink); border: 0; border-radius: 999px;
  padding: 10px 22px; margin-right: 14px; font: inherit; font-weight: 800; cursor: pointer;
}
.row, .row3 { display: grid; gap: 0 18px; }
.row { grid-template-columns: 1fr 1fr; }
.row3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .row, .row3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-top: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }
.hint { color: var(--muted); font-size: 14px; margin-top: 6px; }
.hp { position: absolute; left: -9999px; }

.btn {
  display: inline-block; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--ink); color: #fff; border: 3px solid var(--ink); border-radius: 999px;
  padding: 13px 30px; font: inherit; font-weight: 800;
}
.btn:hover { background: #000; transform: translateY(-1px); }
.btn.alt { background: #fff; color: var(--ink); }
.btn.alt:hover { background: var(--amber-soft); }
.btn.amber { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.btn.sm { padding: 8px 20px; font-size: 14px; }
.btn.block { width: 100%; }
.actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.actions .btn:only-child { flex: 1; }

.flash { padding: 14px 24px; border-radius: 28px; margin: 0 0 22px; border: 2.5px solid var(--ink); font-weight: 700; }
.flash.ok { background: var(--mint-pale); }
.flash.err { background: var(--peach); }

/* ---------- stat blobs ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 20px; margin: 26px 0 30px; }
.stat { display: flex; flex-direction: column; justify-content: flex-end; min-height: 150px; padding: 22px 26px 24px; border: 3px solid var(--ink); text-decoration: none; background: #fff; transition: transform .12s; }
.stat:hover { transform: translateY(-3px); }
.stat b { font-size: 56px; font-weight: 900; letter-spacing: -2px; line-height: 1; margin-bottom: 16px; }
.stat span { font-size: 18px; font-weight: 700; }
.stat.s-open { background: var(--amber-soft); border-radius: 36px 120px 50px 36px; }
.stat.s-prog { background: var(--amber); border-radius: 36px 80px 36px 36px; }
.stat.s-hold { background: #fff; border-radius: 36px 36px 36px 110px; }
.stat.s-late { background: var(--peach); border-radius: 36px 130px 70px 36px; }
.stat.s-un   { background: var(--lav); border-radius: 110px 36px 36px 36px; }
.stat.s-res  { background: var(--mint-soft); border-radius: 36px 110px 36px 36px; }

/* ---------- filters, legend, table ---------- */
.panel { overflow-x: auto; padding: 26px 24px 20px; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 16px; }
.filters .f { display: flex; flex-direction: column; }
.filters label { margin: 0 0 6px 4px; font-size: 14px; }
.filters select, .filters input[type=text] { width: auto; min-width: 150px; padding: 10px 20px; }
.filters .f.grow { flex: 1 1 260px; }
.filters .f.grow input { width: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 30px; margin: 22px 0 6px 4px; font-weight: 700; }
.legend span { display: flex; align-items: center; gap: 10px; }
.dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: var(--beige); }
.dot.late { background: var(--rust); } .dot.soon { background: var(--amber); } .dot.done { background: var(--mint); }

table.list { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.list th { text-align: left; font-size: 15px; font-weight: 700; color: #4d4840; padding: 16px 8px; border-bottom: 3px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.list td { font-size: 15px; padding: 16px 8px; border-bottom: 2.5px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover td { background: #FFFAF0; }
table.list tr.overdue td { background: #FFEBDD; }
table.list tr.overdue:hover td { background: #FFE0CC; }
table.list td a { font-weight: 800; text-decoration: none; }
table.list td a:hover { text-decoration: underline; }
.late { color: var(--rust); font-weight: 800; }

.pager { margin: 6px 0 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-weight: 700; }
.pager a, .pager span { padding: 6px 16px; border: 2.5px solid var(--ink); border-radius: 999px; background: #fff; text-decoration: none; }
.pager span.cur { background: var(--ink); color: #fff; }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 3px 14px; border-radius: 999px; font-size: 14px; font-weight: 800; line-height: 1.5; }
.b-Open { background: var(--amber-soft); }
.b-In-Progress { background: var(--mint-pale); }
.b-On-Hold { background: var(--lav); }
.b-Resolved { background: var(--mint-soft); }
.b-Closed { background: var(--beige); }
.p-Urgent { background: var(--rust); color: #fff; }
.p-High { background: var(--amber); }
.p-Medium { background: var(--amber-soft); }
.p-Low { background: #EFE6D3; }
.a-late { background: var(--rust); color: #fff; }
.a-soon { background: var(--amber); }

/* ---------- ticket view ---------- */
.grid2 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 960px) { .grid2 { grid-template-columns: 1fr; } }
dl.meta { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; }
dl.meta dt { color: var(--muted); font-weight: 700; }
dl.meta dd { margin: 0; font-weight: 600; word-break: break-word; }
.desc { white-space: pre-wrap; word-wrap: break-word; }
.msg { background: #FFFAF0; border: 2px solid var(--line); border-radius: 24px; padding: 14px 20px; margin-bottom: 14px; }
.msg.staff { border-left: 8px solid var(--mint); }
.msg.internal { background: var(--amber-soft); border-color: var(--amber); }
.msg .by { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.timeline li { padding: 10px 0; border-bottom: 2px dashed var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline small { color: var(--muted); display: block; }
.bigno { font-size: 34px; font-weight: 900; letter-spacing: -1px; color: var(--orange); line-height: 1.1; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #fff; padding: 44px var(--pad) 34px; margin-top: auto; }
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.foot-brand img { height: 56px; width: auto; }
.foot-brand span { color: var(--amber); font-weight: 900; font-size: 28px; letter-spacing: -.5px; }
.foot-links { display: flex; gap: 40px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; font-weight: 800; }
.foot-links a:hover { color: var(--amber); }
.foot hr { border: 0; border-top: 1px solid #4a4741; margin: 28px 0 22px; }
.foot p { margin: 0; font-size: 15px; }

/* ---------- name suggestions, clickable rows, email badges ---------- */
.suggest { position: relative; }
.suggest-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 8px; list-style: none;
  background: #fff; border: 2.5px solid var(--ink); border-radius: 26px; box-shadow: 0 10px 0 rgba(45,43,40,.12); max-height: 340px; overflow-y: auto; }
.suggest-list[hidden] { display: none; }
.suggest-list li { padding: 10px 16px; border-radius: 18px; cursor: pointer; display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.suggest-list li small { color: var(--muted); font-weight: 700; white-space: nowrap; }
.suggest-list li.on, .suggest-list li:hover { background: var(--amber-soft); }
.suggest-list li.none { cursor: default; color: var(--muted); }
.suggest-list li.none:hover { background: transparent; }
input.ro { background: #F6EEDC; border-style: dashed; color: #4d4840; cursor: default; }
input.ro:focus { outline: none; }
tr.click { cursor: pointer; }
.badge.e-sent { background: var(--mint-soft); }
.badge.e-failed { background: var(--rust); color: #fff; }
.badge.e-skipped { background: var(--beige); }
.top nav a { padding-left: 16px; padding-right: 16px; }
