/* ASGARD Ting — CRM module (parity with prototypes/ting, CRM tokens) */
:root {
  --ting-gold: #D4A843;
  --ting-gold-l: #E8C35A;
  --ting-bg0: #08090C;
  --ting-bg1: #0D1117;
  --ting-bg2: #151c24;
  --ting-line: #243040;
  --ting-t2: #8B9AAB;
  --ting-danger: #E85D5D;
  --ting-ok: #6bcf8e;
}
.ting-page {
  min-height: calc(100vh - 80px);
  font-family: "Manrope", var(--font, system-ui), sans-serif;
  color: var(--text, #E8EEF4);
}
.ting-page .ting-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}
.ting-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ting-rune {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--ting-gold-l), var(--ting-gold));
  color: #111; font-weight: 800; font-size: 18px;
}
.ting-chip {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--ting-line); color: var(--ting-t2); font-size: 12px; font-weight: 600;
}
.ting-chip.gold { border-color: var(--ting-gold); color: var(--ting-gold); }
.ting-tabs { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.ting-tabs button {
  background: transparent; border: 1px solid var(--ting-line); color: var(--ting-t2);
  padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600;
}
.ting-tabs button.on { border-color: var(--ting-gold); color: var(--ting-gold); }
.ting-cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.ting-btn {
  border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 700; cursor: pointer;
  font-family: inherit; font-size: 14px;
}
.ting-btn-primary {
  background: linear-gradient(180deg, var(--ting-gold-l), var(--ting-gold)); color: #111;
}
.ting-btn-ghost {
  background: transparent; border: 1px solid var(--ting-line); color: var(--text, #E8EEF4);
}
.ting-btn-danger { background: var(--ting-danger); color: #fff; }
.ting-btn:disabled { opacity: .5; cursor: default; }
.ting-card {
  border: 1px solid var(--ting-line); border-radius: 16px; padding: 18px;
  background: var(--ting-bg2, var(--panel, #151c24));
}
.ting-list-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--ting-line);
}
.ting-list-item:last-child { border-bottom: 0; }
.ting-dial {
  font-size: 32px; font-weight: 800; letter-spacing: .18em; color: var(--ting-gold);
  font-variant-numeric: tabular-nums;
}
.ting-link-box {
  font-family: ui-monospace, monospace; font-size: 13px; word-break: break-all;
  padding: 12px; border-radius: 10px; border: 1px solid var(--ting-line);
  color: var(--ting-gold-l); margin: 12px 0;
}
.ting-stack { display: flex; flex-direction: column; gap: 8px; }
.ting-field {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--ting-line);
  background: var(--ting-bg0, #08090C); color: inherit; font: inherit; margin-bottom: 10px;
}
.ting-muted { color: var(--ting-t2); font-size: 14px; }
.ting-room-shell {
  position: fixed; inset: 0; z-index: 9000; background: var(--ting-bg0);
  display: flex; flex-direction: column;
}
.ting-room-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; border-bottom: 1px solid var(--ting-line); background: var(--ting-bg1);
}
.ting-stage {
  flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px; padding: 12px; overflow: auto;
}
.ting-filmstrip {
  display: flex; gap: 8px; padding: 8px 12px; overflow-x: auto;
  border-top: 1px solid var(--ting-line); background: var(--ting-bg1);
  min-height: 72px;
}
.ting-filmstrip .ting-tile {
  width: 120px; min-height: 68px; flex: 0 0 auto;
}
.ting-tile {
  position: relative; min-height: 160px; border-radius: 12px; overflow: hidden;
  background: #1a222c; border: 1px solid var(--ting-line);
}
.ting-tile video { width: 100%; height: 100%; object-fit: cover; }
.ting-tile .lbl {
  position: absolute; left: 8px; bottom: 8px; font-size: 12px;
  background: rgba(0,0,0,.55); padding: 4px 8px; border-radius: 6px;
}
.ting-dock {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  padding: 14px; border-top: 1px solid var(--ting-line); background: var(--ting-bg2);
}
.ting-dock-btn {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--ting-line);
  background: #243040; color: #E8EEF4; cursor: pointer; font-size: 18px;
}
.ting-dock-btn.off { color: var(--ting-danger); border-color: rgba(232,93,93,.45); }
.ting-dock-btn.danger { background: var(--ting-danger); border-color: transparent; color: #fff; }
.ting-side {
  position: absolute; top: 52px; right: 0; bottom: 80px; width: min(340px, 100%);
  background: var(--ting-bg1); border-left: 1px solid var(--ting-line);
  padding: 12px; overflow: auto; z-index: 2;
}
.ting-consent {
  background: rgba(212,168,67,.15); border: 1px solid var(--ting-gold);
  color: var(--ting-gold-l); padding: 8px 12px; text-align: center; font-size: 13px; font-weight: 600;
}
.ting-preview {
  position: relative; height: 210px; border-radius: 16px; overflow: hidden;
  background: #0a0e12; border: 1px solid var(--ting-line); margin: 12px 0;
}
.ting-preview video { width: 100%; height: 100%; object-fit: cover; }
.ting-preview .avatar {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 42px; font-weight: 800; color: var(--ting-gold);
}
.ting-proto-doc {
  background: #f7f4ee; color: #1a1a1a; border-radius: 8px; padding: 28px;
  max-width: 720px; margin: 0 auto; box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.ting-proto-doc h1 { font-size: 22px; margin: 12px 0; }
.ting-proto-doc h2 { font-size: 15px; margin: 18px 0 8px; color: #444; }
.ting-proto-doc .meta { font-size: 13px; color: #555; }
.ting-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.65); z-index: 9500;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.ting-modal {
  width: min(420px, 100%); background: var(--ting-bg2); border: 1px solid var(--ting-line);
  border-radius: 16px; padding: 22px; text-align: center;
}
.ting-steps { text-align: left; margin: 16px 0; }
.ting-steps li { margin: 8px 0; color: var(--ting-t2); }
@media (max-width: 640px) {
  .ting-side { width: 100%; top: auto; bottom: 80px; height: 40%; }
}
