/* Signed-in support page (my-tickets.html). Loaded after styles/contact.css,
   whose body tokens drive every color here. */

/* ── Dealer top nav ─────────────────────────────────────────── */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2.5rem;
  height: 60px;
  background: var(--bar);
  border-bottom: 3px solid #CC1F1F;
  flex-shrink: 0;
}

.topnav-left {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  min-width: 0;
}

.topnav .logo {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--bar-muted);
  text-decoration: none;
  border-radius: 6px;
}

.nav-link:hover {
  color: var(--bar-fg);
  background: var(--surface-2);
}

.nav-link.active {
  color: var(--accent-text);
  background: var(--accent-soft);
}

.nav-link i {
  font-size: 17px;
}

.topnav-right {
  display: flex;
  align-items: center;
}

.theme-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--bar-muted);
  font-size: 20px;
  cursor: pointer;
}

.theme-btn:hover {
  color: var(--bar-fg);
  background: var(--surface-2);
}

/* ── Your tickets ───────────────────────────────────────────── */
.tickets-section {
  padding-block: 0 24px;
}

.tickets-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tickets-head .panel-sub {
  margin-bottom: 18px;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--input);
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.15s;
}

.ticket-item:hover {
  border-color: var(--faint);
}

.ticket-item.is-done .ticket-subject {
  color: var(--muted);
}

.ticket-main {
  flex: 1;
  min-width: 0;
}

.ticket-subject {
  display: block;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.ticket-go {
  font-size: 18px;
  color: var(--faint);
}

.badge {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--surface-2);
  color: var(--muted);
}

.status-open { background: rgba(59, 130, 246, 0.14); color: #60A5FA; }
.status-in_progress { background: rgba(245, 158, 11, 0.14); color: #FBBF24; }
.status-waiting { background: rgba(139, 92, 246, 0.16); color: #A78BFA; }
.status-resolved { background: var(--ok-soft); color: var(--ok); }
.status-closed { background: var(--surface-2); color: var(--faint); }

body.light .status-open { background: #EFF6FF; color: #1D4ED8; }
body.light .status-in_progress { background: #FFFBEB; color: #B45309; }
body.light .status-waiting { background: #F5F3FF; color: #6D28D9; }

.ticket-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.ticket-empty i {
  font-size: 30px;
  color: var(--faint);
}

.ticket-empty span {
  max-width: 46ch;
}

/* ── Form tweaks for signed-in visitors ─────────────────────── */
.form-input[readonly] {
  color: var(--muted);
  cursor: default;
}

.form-input[readonly]:focus {
  border-color: var(--line);
}

.field-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--faint);
}

#messageForm {
  scroll-margin-top: 16px;
}

@media (max-width: 768px) {
  .topnav {
    padding: 0 1rem;
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 480px) {
  .ticket-item {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .ticket-main {
    flex-basis: 100%;
    order: 0;
  }

  .ticket-item .badge {
    order: 1;
  }

  .ticket-go {
    order: 2;
    margin-left: auto;
  }
}
