.thpm { max-width: 1200px; margin: 0 auto; padding: 16px; font-size: 15px; color: #222; box-sizing: border-box; }
.thpm * { box-sizing: border-box; }
.thpm-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.thpm-top h2 { margin: 0; }
.thpm h3 { margin: 18px 0 6px; }
.thpm-hint { color: #666; margin: 0 0 10px; font-size: 13px; }
.thpm-link { color: var(--accent, #6b1226); text-decoration: underline; }
.thpm-notice { background: #e8f6ec; border: 1px solid #9bd3aa; padding: 10px 14px; border-radius: 6px; margin: 10px 0; }


.thpm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.thpm table { width: 100%; border-collapse: collapse; }
.thpm th, .thpm td { padding: 8px; border-bottom: 1px solid #eee; text-align: left; vertical-align: top; }
.thpm th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #555; white-space: nowrap; }
.thpm .thp-rep td:nth-child(1) input { min-width: 150px; }
.thpm .thp-rep td:nth-child(2) input { min-width: 170px; }
.thpm .thp-rep textarea { min-width: 220px; }
.thpm .thp-rep input[type=number] { min-width: 80px; }
.thpm input[type=text], .thpm input[type=number], .thpm input[type=email], .thpm input[type=date], .thpm select, .thpm textarea,
.thpm-login input[type=text], .thpm-login input[type=password] {
  width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 6px; font: inherit; background: #fff;
}
.thpm .form-table th { width: 220px; font-size: 14px; text-transform: none; letter-spacing: 0; color: #222; }
.thpm .description { color: #666; font-size: 12px; margin: 4px 0 0; }
.thpm input[type=color] { width: 60px; height: 36px; padding: 2px; border: 1px solid #ccc; border-radius: 6px; }

.thpm-btn, .thpm .button { display: inline-block; border: 1px solid #ccc; background: #f6f6f6; padding: 8px 14px; border-radius: 6px; cursor: pointer; font: inherit; }
.thpm .thp-pick { margin-top: 6px; }
.thpm-btn-main { background: var(--gold, #c8962e); border-color: var(--gold, #c8962e); color: #fff; font-weight: 600; padding: 12px 28px; }
.thpm-btn-danger { color: #a00; border-color: #e0b4b4; background: #fff; }
.thpm-savebar { position: sticky; bottom: 0; background: rgba(255,255,255,.96); border-top: 1px solid #eee; padding: 12px 0; margin-top: 18px; }
.thpm details summary { cursor: pointer; color: var(--accent, #6b1226); }
.thpm pre { white-space: pre-wrap; background: #faf6ee; padding: 10px; border-radius: 6px; font-size: 13px; max-width: 420px; }
.thpm-pager { margin-top: 12px; }
.thpm-login { max-width: 380px; margin: 0 auto; }
.thpm-login input[type=submit] { background: var(--gold, #c8962e); color: #fff; border: 0; padding: 10px 22px; border-radius: 6px; cursor: pointer; }
.thpm-login label { display: block; margin: 8px 0 4px; }

@media (max-width: 640px) {
  .thpm .form-table th, .thpm .form-table td { display: block; width: 100%; }
}

.thpm .thp-cards { display: grid; gap: 16px; }
.thpm .thp-tcard { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 14px; }
.thpm .thp-tc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #eee; }
.thpm .thp-tc-head b { flex: 1; font-size: 15px; }
.thpm .thp-tc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.thpm .thp-tc-f label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 4px; }
.thpm .thp-tc-f small { display: block; color: #666; font-size: 12px; margin-top: 3px; }
.thpm .thp-tc-wide { grid-column: 1 / -1; }
.thpm .thp-tc-show input { width: auto; }
@media (max-width: 700px) { .thpm .thp-tc-grid { grid-template-columns: 1fr; } }

.thpm .thp-sub { margin: 24px 0 4px; padding-top: 12px; border-top: 1px solid #eee; font-size: 15px; }
.thpm .thp-mtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.thpm .thp-mtabs .thp-mt.is-on { background: var(--accent, #6b1226); border-color: var(--accent, #6b1226); color: #fff; }
.thpm .thp-menuedit h3 { font-size: 14px; margin: 14px 0 4px; }
.thpm .thp-menuedit input[type=text] { min-width: 0; }

/* ===== Dashboard + one page per thing (no tabs) ===== */
.thpm-topl { display: flex; flex-direction: column; gap: 4px; }
.thpm-back { display: inline-block; font-size: 14px; font-weight: 600; color: var(--accent, #6b1226); text-decoration: none; }
.thpm-back:hover { text-decoration: underline; }
.thpm-dash { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.thpm-card { display: block; background: #fff; border: 1px solid #e3d9c4; border-left: 5px solid var(--gold, #c8962e); border-radius: 10px; padding: 16px 18px; text-decoration: none; color: #222; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.thpm-card:hover { border-color: var(--accent, #6b1226); box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.thpm-card b { display: block; font-size: 16px; color: var(--accent, #6b1226); margin-bottom: 4px; }
.thpm-card small { display: block; color: #555; font-size: 12px; line-height: 1.45; }
.thpm .button-primary { background: var(--accent, #6b1226); border-color: var(--accent, #6b1226); color: #fff; }
.thpm a.button { text-decoration: none; color: inherit; }
.thpm a.button.button-primary { color: #fff; }
.thpm-topr { white-space: nowrap; font-size: 14px; }

/* ===== Product-wise screens ===== */
.thpm-bad { background: #fdecea; border-color: #e0a4a0; }
.thpm-crumb { margin: 6px 0 4px; font-size: 14px; color: #555; }
.thpm-crumb a { color: var(--accent, #6b1226); font-weight: 600; text-decoration: none; }
.thpm-crumb a:hover { text-decoration: underline; }
.thpm-ptitle { margin: 4px 0 2px; font-size: 22px; color: var(--accent, #6b1226); }
.thpm-pc { display: flex; flex-direction: column; gap: 12px; }
.thpm-pc-main { text-decoration: none; color: inherit; display: block; }
.thpm-pc-main b { display: block; font-size: 17px; color: var(--accent, #6b1226); margin-bottom: 4px; }
.thpm-pc-main small { display: block; color: #555; font-size: 12px; }
.thpm-pc-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.thpm-add { margin-top: 26px; padding: 14px 16px; background: #fff; border: 1px dashed #c8962e; border-radius: 10px; }
.thpm-add h3 { margin: 0 0 10px; }
.thpm-add-row { display: grid; grid-template-columns: 1.2fr 1.2fr auto; gap: 10px; align-items: center; }
@media (max-width: 700px) { .thpm-add-row { grid-template-columns: 1fr; } }
.thpm .thp-tcard .thp-tc-f input.widefat, .thpm .thp-tcard .thp-tc-f select { width: 100%; }
.thpm .thp-tc-show { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.thpm-embed { margin: 0; background: #fff; }
.thpm-embed .thpm { padding: 12px; }
