/* ===== التذاكر (tickets*.js) — shares chips and filters with tasks.css (.tk-*) ===== */
.tt { display: flex; flex-direction: column; gap: 12px; }
.tt-list { display: flex; flex-direction: column; gap: 8px; }
.tt-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-inline-start: 4px solid #cbd5e1; border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.tt-row:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, .08); border-color: #cbd5e1; }
.tt-row:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.tt-row.is-unread { border-inline-start-color: #2563eb; background: #f8fbff; }
.tt-row.is-late { border-inline-start-color: var(--red); }
.tt-ic { font-size: 1.4rem; flex: none; width: 2rem; text-align: center; }
.tt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tt-main b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-main small, .tt-side small { color: var(--muted); font-size: .76rem; }
.tt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.tt-side > :first-child { display: inline-flex; }
.tt-st { padding: .1rem .55rem; border-radius: 6px; font-size: .72rem; font-weight: 800; white-space: nowrap; background: #eef2ff; color: #3730a3; }
.tt-st.is-new { background: #dbeafe; color: #1d4ed8; }
.tt-st.is-waiting { background: #fef3c7; color: #92400e; }
.tt-st.is-resolved { background: #dcfce7; color: #166534; }
.tt-st.is-rejected, .tt-st.is-withdrawn { background: #e2e8f0; color: #475569; }
/* the form */
.tt-modal { width: min(860px, 96vw) !important; max-width: 96vw !important; padding: 18px 22px !important; max-height: 92vh; overflow: auto; }
.tt-new, .tt-d { display: flex; flex-direction: column; gap: 12px; font-size: 1rem; }
.tt-new-h { display: flex; align-items: center; gap: 10px; }
.tt-new-h h3 { margin: 0; flex: 1; font-size: 1.15rem; }
.tt-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tt-type { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: start; font: inherit; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.tt-type:hover, .tt-type:focus-visible { border-color: #2563eb; box-shadow: 0 0 0 3px #dbeafe; outline: none; }
.tt-type span { font-size: 1.5rem; }
.tt-type small { color: var(--muted); font-size: .78rem; line-height: 1.6; }
.tt-hint { margin: 0; background: #f0f9ff; border: 1px solid #bae6fd; color: #075985; border-radius: 10px; padding: 8px 12px; font-size: .88rem; }
.tt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tt-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tt-wide { grid-column: 1 / -1; }
.tt-lbl { font-size: .84rem; font-weight: 800; color: #334155; }
.tt-req { color: var(--red); font-style: normal; }
.tt-f input, .tt-f select, .tt-f textarea, .tt-d textarea { font: inherit; font-size: .95rem; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); width: 100%; box-sizing: border-box; }
.tt-f input:focus, .tt-f select:focus, .tt-f textarea:focus, .tt-d textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }
.tt-money { display: flex; gap: 6px; }
.tt-money input { flex: 1; }
.tt-money select { width: auto; flex: none; }
.tt-drop { display: flex; align-items: center; gap: 8px; border: 1.5px dashed #94a3b8; border-radius: 10px; padding: 10px 12px; cursor: pointer; color: #334155; font-weight: 700; font-size: .88rem; background: #f8fafc; transition: border-color .15s, background .15s; }
.tt-drop:hover { border-color: #2563eb; background: #eff6ff; }
.tt-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tt-drop:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }
.tt-files { display: flex; flex-wrap: wrap; gap: 6px; }
.tt-file { display: inline-flex; align-items: center; gap: 6px; background: #eef2ff; color: #3730a3; border-radius: 999px; padding: .15rem .3rem .15rem .6rem; font-size: .78rem; font-weight: 700; max-width: 100%; }
.tt-file button { border: 0; background: #c7d2fe; color: #3730a3; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: .7rem; flex: none; }
.tt-ccard { font-size: .84rem; color: #166534; min-height: 1em; }
/* one ticket */
.tt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .84rem; }
.tt-meta select { font: inherit; font-size: .82rem; padding: .25rem .5rem; border: 1px solid var(--line); border-radius: 8px; }
.tt-warn { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; border-radius: 10px; padding: 8px 12px; font-size: .88rem; font-weight: 700; display: flex; flex-direction: column; gap: 4px; }
.tt-contract { display: flex; align-items: center; gap: 10px; justify-content: space-between; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: .9rem; }
.tt-contract small { color: var(--muted); }
.tt-desc { margin: 0; white-space: pre-wrap; line-height: 1.7; }
.tt-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.tt-fact { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tt-fact > span { font-size: .76rem; color: var(--muted); font-weight: 700; }
.tt-fact > div { overflow-wrap: anywhere; }
.tt-iban { letter-spacing: .02em; }
.tt-copy { border: 1px solid var(--line); background: #fff; border-radius: 6px; font: inherit; font-size: .72rem; padding: 0 .4rem; cursor: pointer; }
.tt-att { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tt-thumb { display: block; width: 104px; height: 104px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #f1f5f9; }
.tt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tt-doc { display: inline-flex; align-items: center; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 8px; font-size: .82rem; font-weight: 700; color: #1d4ed8; text-decoration: none; background: #fff; }
.tt-done { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 10px 14px; font-size: .9rem; }
.tt-done p { margin: 4px 0; white-space: pre-wrap; }
.tt-done small { color: var(--muted); }
.tt-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tt-danger { color: var(--red) !important; }
.tt-panel { border: 1px solid #bfdbfe; background: #f8fbff; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.tt-panel h4, .tt-conv h4 { margin: 0; font-size: .95rem; }
.tt-conv { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.tt-msg { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; max-width: 88%; align-self: flex-start; }
.tt-msg.is-req { background: #eff6ff; border-color: #bfdbfe; align-self: flex-end; }
.tt-msg small { color: var(--muted); font-size: .72rem; }
.tt-msg p { margin: 4px 0 0; white-space: pre-wrap; line-height: 1.7; }
.tt-reply { display: flex; flex-direction: column; gap: 8px; }
.tt-reply-b { display: flex; align-items: flex-end; gap: 8px; }
.tt-reply-b .tt-f { flex: 1; }
.tt-log summary { cursor: pointer; font-weight: 800; font-size: .85rem; color: var(--muted); }
.tt-log div { font-size: .8rem; padding: 3px 0; }
.tt-log small { color: var(--muted); }
@media (max-width: 640px) {
  .tt-grid, .tt-facts { grid-template-columns: 1fr; }
  .tt-row { flex-wrap: wrap; }
  .tt-side { flex-direction: row; flex-wrap: wrap; align-items: center; width: 100%; padding-inline-start: 2.75rem; }
  .tt-modal { padding: 14px !important; }
  .tt-msg { max-width: 100%; }
}
