.tkt-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; min-width: 0; flex-wrap: wrap; }
.tkt-title { font-size: 20px; font-weight: 700; letter-spacing: 0; }
.tkt-stat-txt { font-size: 13px; color: var(--text2); margin-top: 3px; }
.tkt-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  margin-bottom: 10px;
  padding: 16px 18px 15px 20px;
  cursor: pointer;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  border: 1px solid rgba(10, 24, 54, .08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.tkt-card:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(15,23,42,.09); border-color: rgba(0,122,255,.22); }
.tkt-card-accent { position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: 16px 0 0 16px; background: var(--blue); }
.tkt-card-accent.st-new { background: var(--blue); }
.tkt-card-accent.st-inprogress { background: var(--orange); }
.tkt-card-accent.st-resolved { background: var(--green); }
.tkt-card-accent.st-closed { background: #c7c7cc; }
.tkt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.tkt-main { min-width: 0; display: grid; gap: 4px; }
.tkt-id-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tkt-id { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--text3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tkt-id .ios-ico { width: 13px; height: 13px; color: var(--blue); }
.tkt-subj { font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tkt-preview { font-size: 13px; line-height: 1.45; color: var(--text2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tkt-preview-author { color: var(--text); font-weight: 650; }
.tkt-wait-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(255,59,48,.12); flex-shrink: 0; }
.tkt-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tkt-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f5f7fb;
  color: var(--text2);
  font-size: 11px;
  line-height: 1;
}
.tkt-meta-pill .ios-ico { width: 12px; height: 12px; color: var(--blue); }
.tkt-stat-chip { font-size: 10px; font-weight: 700; padding: 5px 8px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; flex-shrink: 0; }
.st-new        { background: var(--blue-light);   color: #005CC5; }
.st-inprogress { background: var(--orange-light);  color: var(--orange-dark); }
.st-resolved   { background: var(--green-light);   color: var(--green-dark); }
.st-closed     { background: #F2F2F7;              color: var(--text3); }
.tkt-empty {
  text-align: center;
  max-width: 480px;
  margin: 12px auto;
  padding: 36px 28px 32px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-l);
  box-shadow: 0 12px 34px rgba(10,99,214,.07);
}
.tkt-empty-badge {
  width: 74px; height: 74px; margin: 0 auto 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #0a84ff, #0a63d6);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  box-shadow: 0 12px 26px rgba(10,99,214,.32);
}
.tkt-empty-badge .ios-ico { --ios-icon-color: #fff; }
.tkt-empty-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 8px; letter-spacing: -.01em; line-height: 1.25; }
.tkt-empty-desc  { font-size: 14px; color: var(--text2); line-height: 1.5; max-width: 380px; margin: 0 auto 22px; }
.tkt-empty-perks { display: flex; flex-direction: column; gap: 11px; text-align: left; max-width: 340px; margin: 0 auto 24px; }
.tkt-perk { display: flex; align-items: center; gap: 11px; font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.35; }
.tkt-perk .ios-ico { font-size: 19px; --ios-icon-color: var(--green); flex-shrink: 0; }
.tkt-empty-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 30px; border: none; border-radius: 14px; cursor: pointer;
  background: linear-gradient(135deg, #0a84ff, #0a63d6); color: #fff;
  font-size: 15.5px; font-weight: 700; font-family: inherit;
  box-shadow: 0 10px 22px rgba(10,99,214,.26);
  transition: transform .1s, box-shadow .18s;
}
.tkt-empty-cta .ios-ico { font-size: 18px; --ios-icon-color: #fff; }
.tkt-empty-cta:hover { box-shadow: 0 14px 30px rgba(10,99,214,.34); }
.tkt-empty-cta:active { transform: scale(.98); }

.tkt-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(10px);
}

.tkt-modal-dialog {
  width: min(760px, 100%);
  max-height: min(84vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .30);
}

.tkt-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 16px;
  background:
    radial-gradient(circle at 0 0, rgba(0,122,255,.12), transparent 34%),
    linear-gradient(180deg, #fff 0%, #f7faff 100%);
  border-bottom: 1px solid rgba(10, 24, 54, .08);
  flex-shrink: 0;
}

.tkt-modal-heading { min-width: 0; display: grid; gap: 6px; }
.tkt-modal-kicker { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tkt-kicker-id { font-size: 12px; font-weight: 700; color: var(--text3); }
.tkt-modal-title {
  min-width: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tkt-modal-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 12px; color: var(--text2); }
.tkt-modal-meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.tkt-modal-meta .ios-ico { width: 13px; height: 13px; color: var(--blue); }

.tkt-modal-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f2f2f7;
  color: var(--text2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.tkt-modal-close:hover { background: #e5e5ea; color: var(--text); }

.tkt-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(0,122,255,.34) transparent;
}
.tkt-modal-body::-webkit-scrollbar { width: 10px; }
.tkt-modal-body::-webkit-scrollbar-track { background: transparent; }
.tkt-modal-body::-webkit-scrollbar-thumb { background: rgba(0,122,255,.28); border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }

.tkt-modal-body > div:last-child { margin-bottom: 0 !important; }

.tkt-msg-empty { padding: 30px 18px; text-align: center; color: var(--text3); font-size: 14px; }
.tkt-msg-error { color: var(--red); }
.tkt-msg-row { display: flex; align-items: flex-end; gap: 9px; margin-bottom: 14px; min-width: 0; }
.tkt-msg-row.is-client { flex-direction: row-reverse; }
.tkt-msg-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: #edf4ff;
  color: var(--blue);
}
.tkt-msg-row.is-client .tkt-msg-avatar { background: var(--blue); color: #fff; }
.tkt-msg-avatar .ios-ico { width: 15px; height: 15px; }
.tkt-msg-stack { max-width: min(78%, 520px); min-width: 0; }
.tkt-msg-row.is-client .tkt-msg-stack { display: flex; flex-direction: column; align-items: flex-end; }
.tkt-msg-bubble {
  padding: 11px 13px;
  border-radius: 16px 16px 16px 6px;
  background: #fff;
  border: 1px solid rgba(10,24,54,.08);
  box-shadow: 0 5px 16px rgba(15,23,42,.05);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tkt-msg-row.is-client .tkt-msg-bubble {
  border-color: transparent;
  border-radius: 16px 16px 6px 16px;
  background: linear-gradient(180deg, #0a84ff, #007aff);
  color: #fff;
}
.tkt-msg-meta { margin-top: 5px; padding: 0 4px; color: var(--text3); font-size: 11px; }

.tkt-modal-closed {
  display: none;
  padding: 12px 18px;
  border-top: 1px solid rgba(10,24,54,.08);
  background: #f5f7fb;
  color: var(--text2);
  font-size: 13px;
  text-align: center;
}

.tkt-modal-reply {
  display: flex;
  gap: 8px;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(10,24,54,.08);
  background: #fff;
  flex-shrink: 0;
}

.tkt-modal-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d9e0ec;
  border-radius: 14px;
  background: #f8faff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.tkt-modal-input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(0,122,255,.10); }

.tkt-modal-send {
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.tkt-modal-send:disabled { opacity: .65; cursor: default; }

@media (max-width: 640px) {
  .tkt-modal-backdrop {
    padding: 12px;
    align-items: center;
  }

  .tkt-modal-dialog {
    max-height: 86vh;
    border-radius: 16px;
  }

  .tkt-modal-head {
    padding: 15px;
    align-items: flex-start;
  }

  .tkt-modal-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .tkt-modal-reply {
    flex-wrap: wrap;
  }

  .tkt-msg-stack {
    max-width: calc(100% - 44px);
  }

  .tkt-modal-send {
    width: 100%;
  }
}
