* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #0c0c0d;
  --ink-soft: #444;
  --muted: #888;
  --bg: #fdfaf3;
  --bg-2: #f3efe6;
  --line: #e7e0d0;
  --accent: #d97706;
  --green: #2c8048;
  --red: #c8261b;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Header === */
.lt-sup-header {
  background: var(--ink);
  color: #fff;
  padding: 16px 0;
}
.lt-sup-header__inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lt-sup-header__logo {
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.lt-sup-header__logo:hover { text-decoration: none; }
.lt-sup-header__title {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 24px;
}
.lt-sup-header__sub {
  font-size: 12px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.lt-sup-header__nav { display: flex; gap: 16px; align-items: center; }
.lt-sup-header__nav a { color: #ccc; font-size: 14px; }
.lt-sup-header__nav a:hover { color: #fff; }
.lt-sup-header__admin {
  padding: 4px 12px;
  background: var(--accent);
  color: #fff !important;
  border-radius: 6px;
  font-size: 12px !important;
}
.lt-sup-header__user { color: #fff; font-size: 13px; }

/* === Main === */
.lt-sup-main { flex: 1; padding: 30px 20px 60px; }
.lt-sup-wrap { max-width: 720px; margin: 0 auto; }

/* Hero */
.lt-sup-hero {
  text-align: center;
  margin-bottom: 30px;
}
.lt-sup-hero h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: 42px;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.lt-sup-hero p { color: var(--muted); }

/* Card */
.lt-sup-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 18px;
}
.lt-sup-card h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: 26px;
  margin-bottom: 6px;
}
.lt-sup-card h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  font-size: 22px;
  margin-bottom: 14px;
}

.lt-sup-back {
  font-size: 13px;
  color: var(--muted);
  display: inline-block;
  margin-bottom: 12px;
}
.lt-sup-meta { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.lt-sup-hint { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

/* Messages */
.lt-sup-msg {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}
.lt-sup-msg--ok { background: #d1fae5; color: #065f46; }
.lt-sup-msg--err { background: #fee2e2; color: #991b1b; }

/* Form */
.lt-sup-form label,
.lt-sup-reply label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}
.lt-sup-form input[type="text"],
.lt-sup-form input[type="email"],
.lt-sup-form textarea,
.lt-sup-reply textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: var(--bg);
  resize: vertical;
}
.lt-sup-form input:focus,
.lt-sup-form textarea:focus,
.lt-sup-reply textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.lt-sup-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.lt-sup-row label { margin-bottom: 0; }

.lt-sup-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.lt-sup-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.lt-sup-btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.lt-sup-btn--ghost:hover { background: var(--bg-2); }
.lt-sup-btn-danger {
  padding: 8px 16px;
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}
.lt-sup-btn-danger:hover { background: var(--red); color: #fff; }

/* Tickets list */
.lt-sup-tickets { list-style: none; }
.lt-sup-tickets li {
  border-bottom: 1px solid var(--line);
}
.lt-sup-tickets li:last-child { border-bottom: none; }
.lt-sup-tickets a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  color: inherit;
}
.lt-sup-tickets a:hover { text-decoration: none; background: var(--bg-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 6px; }
.lt-sup-tickets__id {
  font-family: monospace;
  font-size: 12px;
  color: var(--muted);
  min-width: 50px;
}
.lt-sup-tickets__subj { flex: 1; font-weight: 500; font-size: 14px; }
.lt-sup-tickets__user { font-size: 12px; color: var(--muted); }

/* Admin list — расширенная */
.lt-sup-tickets--admin a {
  display: block;
  padding: 14px 12px;
}
.lt-sup-tickets--admin a > div:first-child {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}
.lt-sup-tickets__preview {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}
.lt-sup-tickets__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.lt-sup-tickets__time { color: var(--muted); margin-left: auto; }
.lt-sup-tickets a.is-waiting {
  background: linear-gradient(90deg, #fef3c7 0%, transparent 60%);
  border-radius: 8px;
}

/* Tags */
.lt-sup-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lt-sup-tag--green { background: #d1fae5; color: #065f46; }
.lt-sup-tag--orange { background: #fef3c7; color: #92400e; }
.lt-sup-tag--gray { background: #e5e7eb; color: #4b5563; }
.lt-sup-tag--waiting { background: #fde68a; color: #78350f; }

/* Chat */
.lt-sup-chat {
  margin: 20px 0;
  padding: 16px;
  background: var(--bg-2);
  border-radius: 12px;
}
.lt-sup-msg-row {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
}
.lt-sup-msg-row.is-admin {
  background: #fef3c7;
  margin-right: 30px;
}
.lt-sup-msg-row.is-user {
  background: #fff;
  margin-left: 30px;
}
.lt-sup-msg-who {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lt-sup-msg-who strong { color: var(--ink); font-weight: 600; }
.lt-sup-msg-body { font-size: 14px; line-height: 1.5; word-wrap: break-word; }

.lt-sup-reply { margin-top: 12px; }

/* FAQ */
.lt-sup-card details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.lt-sup-card details:last-child { border-bottom: none; }
.lt-sup-card summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  position: relative;
  padding-right: 24px;
  list-style: none;
}
.lt-sup-card summary::-webkit-details-marker { display: none; }
.lt-sup-card summary::after {
  content: '+';
  position: absolute; right: 0; top: -2px;
  font-size: 18px;
  color: var(--muted);
}
.lt-sup-card details[open] summary::after { content: '−'; }
.lt-sup-card details p {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

/* Filters */
.lt-sup-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.lt-sup-filters a {
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lt-sup-filters a:hover { background: var(--bg-2); text-decoration: none; }
.lt-sup-filters a.is-on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.lt-sup-filters a span {
  font-size: 11px;
  padding: 1px 7px;
  background: rgba(255,255,255,0.2);
  border-radius: 99px;
}
.lt-sup-filters a:not(.is-on) span {
  background: var(--bg-2);
  color: var(--muted);
}

/* Footer */
.lt-sup-footer {
  padding: 24px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.lt-sup-footer a { color: var(--muted); }
.lt-sup-footer a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .lt-sup-hero h1 { font-size: 32px; }
  .lt-sup-row { grid-template-columns: 1fr; }
  .lt-sup-msg-row.is-admin, .lt-sup-msg-row.is-user { margin-left: 0; margin-right: 0; }
}
