/* ==========================================================
   Sisya Destek Portalı
   ========================================================== */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e4e8ef;
  --line-2: #eef1f5;
  --brand: #1e3a5f;
  --accent: #2563eb;
  --accent-ink: #1d4ed8;
  --accent-soft: #eaf1ff;
  --success: #15803d;
  --success-soft: #e8f6ee;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --warn: #b45309;
  --warn-soft: #fff5e6;
  --side: #0f1c2e;
  --side-2: #16263c;
  --side-ink: #c4cfdd;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .05);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .18);
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 14.5px; line-height: 1.55; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-ink); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
.ik { flex: none; display: inline-block; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Yerleşim ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  /* Girişteki dalgalı arka plan; menü yazıları okunsun diye üstü hafif koyulaştırılır */
  background:
    linear-gradient(180deg, rgba(10, 24, 48, .86) 0%, rgba(10, 24, 48, .78) 50%, rgba(10, 24, 48, .70) 100%),
    #062253 url("img/giris-arkaplan.webp") 88% 100% / cover no-repeat;
  color: var(--side-ink);
  padding: 22px 14px 16px; z-index: 30;
}
.side__logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.side__logo img { height: 30px; width: auto; }
.side__logo span { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #7f93ad; border-left: 1px solid #2a3d57; padding-left: 10px; }
.side__group { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #6b7f99; padding: 18px 12px 8px; }
.side__nav { display: flex; flex-direction: column; gap: 2px; }
.side__link {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
  color: var(--side-ink); font-weight: 500; transition: background .15s, color .15s;
}
.side__link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side__link.is-active { background: rgba(96, 145, 255, .16); color: #fff; box-shadow: inset 3px 0 0 #6b9bff; }
.side__link .ik { opacity: .9; }
.side__foot { margin-top: auto; padding: 12px; border-top: 1px solid #22344d; font-size: 12px; color: #6b7f99; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 32px; background: rgba(243, 245, 249, .85); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.top .top__menu { display: none; }
.top__search { flex: 1; max-width: 460px; position: relative; }
.top__search .ik { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.top__search input { padding-left: 38px; background: var(--surface); }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.user { position: relative; }
.user__btn {
  display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; color: var(--ink);
}
.user__btn:hover { border-color: #cfd6e1; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #3b6fd8, #1e3a5f); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.avatar--lg { width: 40px; height: 40px; font-size: 14px; }
.user__name { font-weight: 600; font-size: 13.5px; line-height: 1.1; text-align: left; }
.user__name small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.user__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none;
}
.user.is-open .user__menu { display: block; }
.user__menu a, .user__menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2);
  font: inherit; background: none; border: 0; cursor: pointer; text-align: left;
}
.user__menu a:hover, .user__menu button:hover { background: var(--surface-2); color: var(--ink); }
.user__menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

.content { padding: 8px 32px 48px; width: 100%; }

/* ---------- Sayfa başlığı ---------- */
.ph { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 10px 0 22px; }
.ph__text { flex: 1; min-width: 240px; }
.ph h1 { font-size: 24px; font-weight: 700; }
.ph p { margin: 4px 0 0; color: var(--muted); }
.ph__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.crumb:hover { color: var(--ink); }

/* ---------- Kart ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card__head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.card__head h2 { font-size: 15.5px; font-weight: 650; }
.card__head .more { margin-left: auto; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.card__body { padding: 22px; }
.content > .card + .card { margin-top: 18px; }

/* ---------- İstatistik ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 18px; }
.stat {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 20px 22px; color: inherit; overflow: hidden;
}
.stat:hover { color: inherit; border-color: #d3dbe7; }
.stat__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.stat__label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat__value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat__go { margin-left: auto; color: #b3bdcc; transition: transform .15s, color .15s; }
.stat:hover .stat__go { color: var(--accent); transform: translateX(3px); }
.tone-blue { background: #eaf1ff; color: #2563eb; }
.tone-green { background: #e7f6ee; color: #15803d; }
.tone-violet { background: #f1ecff; color: #6d28d9; }
.tone-amber { background: #fff4e5; color: #b45309; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack > * + * { margin-top: 18px; }

/* ---------- Bar listesi (dağılım) ---------- */
.bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.bars__row span:first-child { min-width: 0; }
.bars__row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.bars__row span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.bars__row b { font-variant-numeric: tabular-nums; }
.bars__track { height: 6px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.bars__fill { height: 100%; border-radius: 99px; background: var(--accent); }

/* ---------- Ticket listesi ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl__item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 16px 22px; border-bottom: 1px solid var(--line-2); transition: background .12s;
}
.tl__item:last-child { border-bottom: 0; }
.tl__item:hover { background: #fafbfd; }
.tl__title { font-weight: 600; color: var(--ink); font-size: 14.5px; display: block; }
.tl__title:hover { color: var(--accent); }
.tl__id { color: #9aa6b8; font-weight: 500; font-variant-numeric: tabular-nums; margin-right: 6px; }
.tl__desc { color: var(--muted); font-size: 13.5px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tl__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12.5px; color: var(--muted); align-items: center; }
.tl__meta span { display: inline-flex; align-items: center; gap: 5px; }
.tl__actions { display: flex; gap: 6px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 550;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap;
}
.chip--blue { background: #eef4ff; border-color: #d9e5ff; color: #1d4ed8; }
.chip--violet { background: #f4f0ff; border-color: #e6ddff; color: #6d28d9; }
.chip--green { background: #ecf8f1; border-color: #d3efdf; color: #15803d; }
.chip--amber { background: #fff6e8; border-color: #fbe5c2; color: #b45309; }
.chip--slate { background: #f1f4f8; border-color: #e2e8f0; color: #475569; }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th {
  text-align: left; font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  padding: 12px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.t td { padding: 13px 18px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: #fafbfd; }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.t .act { text-align: right; white-space: nowrap; width: 1%; }
.t .muted { color: var(--muted); }
.person { display: flex; align-items: center; gap: 12px; }
.person b { display: block; font-weight: 600; }
.person small { color: var(--muted); font-size: 12.5px; }

/* ---------- Buton ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; white-space: nowrap; text-decoration: none;
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, .25); }
.btn--primary:hover { background: var(--accent-ink); color: #fff; }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn--ghost:hover { border-color: #cbd3df; color: var(--ink); background: var(--surface-2); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { background: #b91c1c; color: #fff; }
.btn--sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); cursor: pointer; transition: all .15s;
}
.icon-btn:hover { color: var(--ink); border-color: #cbd3df; background: var(--surface-2); }
.icon-btn--danger:hover { color: var(--danger); border-color: #f3c2c2; background: var(--danger-soft); }
form.inline { display: inline; margin: 0; }

/* ---------- Form ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.req { color: var(--danger); }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 13px; border-radius: var(--radius-sm); border: 1px solid #d8dee8; background: var(--surface);
  font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 120px; padding: 10px 13px; resize: vertical; }
.input:hover { border-color: #c3ccd9; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.input-validation-error, .input.input-validation-error { border-color: var(--danger) !important; }
.field-validation-error { color: var(--danger); font-size: 12.5px; font-weight: 500; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 6px; border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 18px; }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { width: 40px; height: 23px; border-radius: 99px; background: #cbd3df; position: relative; transition: background .15s; flex: none; }
.switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s;
}
.switch input:checked ~ .switch__track { background: var(--accent); }
.switch input:checked ~ .switch__track::after { transform: translateX(17px); }
.switch input:focus-visible ~ .switch__track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch__text b { display: block; font-size: 14px; }
.switch__text small { color: var(--muted); font-size: 12.5px; }

.drop {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1.5px dashed #cdd5e1; border-radius: 12px;
  background: var(--surface-2); transition: border-color .15s, background .15s; cursor: pointer;
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop__icon { width: 42px; height: 42px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); flex: none; }
.drop__text b { display: block; font-size: 14px; }
.drop__text small { color: var(--muted); }

.file-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.file-card__icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.file-card__name { font-weight: 600; word-break: break-all; }
.file-card__meta { color: var(--muted); font-size: 12.5px; }
.file-card .btn, .file-card label.check { margin-left: auto; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }

/* Çoklu ek listesi */
.ek-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.file-card__name, .file-card__meta { display: block; }
.file-card__name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.file-card--link { color: inherit; transition: border-color .15s, background .15s; }
.file-card--link:hover { border-color: #c7d6f5; background: #f7f9fe; color: inherit; }
.file-card--link:hover .file-card__dl { color: var(--accent); }
.file-card__dl { margin-left: auto; color: #94a3b8; flex: none; }
.file-card__thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); flex: none; background: var(--surface-2); }
.file-card--eksik { border-color: #f6caca; background: var(--danger-soft); }
.file-card--eksik .file-card__icon { background: #fff; color: var(--danger); }
.file-card--sec { cursor: pointer; }
.file-card--sec:has(input:checked) { border-color: #f3c2c2; background: var(--danger-soft); }
.file-card--sec:has(input:checked) .file-card__name { text-decoration: line-through; color: var(--muted); }
.file-card--sec .check { margin-left: auto; flex: none; }
.ek-onizle { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; margin: 6px 0 2px 4px; }

/* Kaydetmeden önce seçilen dosyalar */
.secilen { list-style: none; margin: 0; padding: 6px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.secilen li { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 10px; border-radius: 8px; }
.secilen li:not(.secilen__ozet):hover { background: var(--surface-2); }
.secilen__ad { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.secilen__boyut { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; flex: none; }
.secilen__ozet { color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line-2); border-radius: 0 !important; margin-top: 2px; padding-top: 8px !important; }
.secilen.is-asim { border-color: #f3c2c2; }
.secilen.is-asim .secilen__ozet { color: var(--danger); font-weight: 600; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Açılır liste (bütün select'ler Tom Select ile bu görünüme geçer) ---------- */
.ts-wrapper { min-width: 0; position: relative; }
/* Tom Select, select'in "input" sınıfını dış kaba da kopyalıyor; çift çerçeve olmasın */
.ts-wrapper.input, .ts-wrapper.input:hover, .ts-wrapper.input:focus {
  height: auto; padding: 0; border: 0; background: none; box-shadow: none; appearance: none;
}
.ts-wrapper.single .ts-control, .ts-wrapper .ts-control {
  display: flex; align-items: center; flex-wrap: nowrap; min-height: 42px; padding: 0 40px 0 13px;
  border: 1px solid #d8dee8; border-radius: var(--radius-sm); background: var(--surface); box-shadow: none;
  font: inherit; color: var(--ink); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.ts-wrapper.single .ts-control:hover { border-color: #c3ccd9; }
.ts-wrapper .ts-control > .item { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ts-wrapper .ts-control > input { font: inherit; color: var(--ink); min-width: 4rem; cursor: text; }
.ts-wrapper .ts-control > input::placeholder { color: #94a3b8; }
.ts-wrapper.single.input-active .ts-control { background: var(--surface); }
.ts-wrapper.single:not(.has-items) .ts-control:not(:has(input))::before { content: attr(data-ipucu); color: #94a3b8; }
/* aşağı ok */
.ts-wrapper.single .ts-control::after {
  content: ""; position: absolute; right: 13px; top: 50%; width: 16px; height: 16px; margin: -8px 0 0; border: 0;
  background: #7b879a;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .18s;
}
.ts-wrapper.single.dropdown-active .ts-control::after { transform: rotate(180deg); margin-top: -8px; border: 0; background: var(--accent); }
.ts-wrapper.focus .ts-control, .ts-wrapper.dropdown-active .ts-control { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.ts-wrapper.input-validation-error .ts-control { border-color: var(--danger); }
.ts-wrapper.disabled .ts-control { background: var(--surface-2); color: var(--muted); cursor: not-allowed; opacity: 1; }

.ts-dropdown {
  margin-top: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06); font: inherit; color: var(--ink); z-index: 50;
  animation: dd-in .12s ease-out;
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ts-dropdown .ts-dropdown-content { max-height: 300px; scrollbar-width: thin; scrollbar-color: #cbd3df transparent; }
.ts-dropdown .option {
  position: relative; padding: 9px 34px 9px 11px; border-radius: 8px; font-size: 14px; line-height: 1.35; cursor: pointer; color: var(--ink-2);
}
.ts-dropdown .option + .option { margin-top: 1px; }
.ts-dropdown .active { background: #f1f5ff; color: var(--ink); }
.ts-dropdown .option.selected { color: var(--accent-ink); font-weight: 600; background: var(--accent-soft); }
.ts-dropdown .option.selected::after {
  content: ""; position: absolute; right: 11px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ts-dropdown .no-results { padding: 12px; color: var(--muted); font-size: 13.5px; text-align: center; }
.ts-dropdown .highlight { background: #fff1b8; color: inherit; border-radius: 3px; }

/* Tom Select yüklenmeden önceki kısa anda bile varsayılan görünüm çıkmasın */
select.input { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237b879a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 13px center / 16px no-repeat; }

/* EasyMDE uyumu */
.EasyMDEContainer .editor-toolbar { border-color: #d8dee8; border-radius: 10px 10px 0 0; background: var(--surface-2); padding: 6px; opacity: 1; }
.EasyMDEContainer .editor-toolbar button { color: var(--ink-2); border-radius: 7px; width: 32px; height: 30px; display: inline-flex; align-items: center; justify-content: center; }
.EasyMDEContainer .editor-toolbar button:hover, .EasyMDEContainer .editor-toolbar button.active { background: #e6ebf2; border-color: transparent; }
.EasyMDEContainer .CodeMirror { border-color: #d8dee8; border-radius: 0 0 10px 10px; font-family: var(--font); font-size: 14.5px; min-height: 260px; }
.EasyMDEContainer .CodeMirror-focused { border-color: var(--accent); }
.EasyMDEContainer .editor-preview { background: #fff; }
.EasyMDEContainer .editor-statusbar { color: var(--muted); }

/* ---------- Ticket detay ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.detail__title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.meta-list { list-style: none; margin: 0; padding: 0; }
.meta-list li { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.meta-list li:first-child { padding-top: 0; }
.meta-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.meta-list small { color: var(--muted); font-size: 12px; font-weight: 500; }
.meta-list b { font-weight: 600; }
.preview-img { display: block; max-width: 100%; border-radius: 10px; border: 1px solid var(--line); margin-top: 12px; }

/* Markdown içerik */
.md { font-size: 15px; line-height: 1.7; color: var(--ink-2); overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3 { color: var(--ink); margin: 1.4em 0 .5em; }
.md h1 { font-size: 22px; } .md h2 { font-size: 19px; } .md h3 { font-size: 16.5px; }
.md p { margin: 0 0 1em; }
.md ul, .md ol { padding-left: 1.4em; margin: 0 0 1em; }
.md code { font-family: var(--mono); font-size: .88em; background: #f1f4f8; border: 1px solid #e5e9f0; padding: .1em .4em; border-radius: 6px; }
.md pre { background: #0f1c2e; color: #e2e8f0; padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
.md pre code { background: none; border: 0; padding: 0; color: inherit; font-size: 13px; }
.md blockquote { margin: 0 0 1em; padding: 6px 16px; border-left: 3px solid #c7d6f5; background: #f7f9fd; color: var(--ink-2); border-radius: 0 8px 8px 0; }
.md table { border-collapse: collapse; margin: 0 0 1em; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; }
.md img { max-width: 100%; border-radius: 8px; }
.md a { text-decoration: underline; text-underline-offset: 2px; }
.md-raw { white-space: pre-wrap; }

/* ---------- Filtre çubuğu ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.toolbar .search { position: relative; flex: 1; min-width: 220px; }
.toolbar .search .ik { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar .search .input { padding-left: 38px; }
.toolbar select.input, .toolbar .ts-wrapper { width: 240px; flex: none; }
.toolbar__count { color: var(--muted); font-size: 13px; margin-left: auto; }

/* ---------- Sayfalama ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pager__info { color: var(--muted); font-size: 13px; }
.pager__pages { display: flex; gap: 4px; }
.pager__pages a, .pager__pages span {
  min-width: 34px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 500;
}
.pager__pages a:hover { border-color: #cbd3df; color: var(--ink); }
.pager__pages .is-current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager__pages .gap { border: 0; background: none; }

/* ---------- Boş durum / bildirim ---------- */
.empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty__icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: #94a3b8; }
.empty h3 { color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.empty p { margin: 0 0 16px; }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; border: 1px solid; }
.alert--error { background: var(--danger-soft); border-color: #f6caca; color: #991b1b; }
.alert--info { background: var(--accent-soft); border-color: #d4e2ff; color: #1e40af; }

.toast-wrap { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: grid; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 280px; max-width: 420px; padding: 13px 14px 13px 16px; border-radius: 12px;
  background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; animation: toast-in .25s ease-out;
}
.toast .ik { color: #4ade80; }
.toast--hata .ik { color: #fca5a5; }
.toast button { margin-left: auto; background: none; border: 0; color: #94a3b8; cursor: pointer; padding: 2px; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: all .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Onay penceresi */
.dlg { border: 0; padding: 0; border-radius: 16px; box-shadow: var(--shadow-lg); width: min(420px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
.dlg__body { padding: 24px 24px 8px; display: flex; gap: 14px; }
.dlg__icon { width: 42px; height: 42px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); display: grid; place-items: center; flex: none; }
.dlg h3 { font-size: 16.5px; margin-bottom: 4px; }
.dlg p { margin: 0; color: var(--muted); }
.dlg__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 18px 24px 22px; }

/* ---------- Giriş ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 55fr 45fr; background: var(--surface); }
.auth__art {
  position: relative; overflow: hidden; color: #dbe6f5; padding: 44px clamp(32px, 4.5vw, 64px) 40px;
  display: flex; flex-direction: column; gap: 28px;
  background: #062253 url("img/giris-arkaplan.webp") center / cover no-repeat;
}
.auth__logo { height: 40px; width: auto; align-self: flex-start; position: relative; }
.auth__panel-img { flex: 1; display: grid; place-items: center; min-height: 0; }
.auth__panel-img img {
  width: min(112%, 680px); height: auto; display: block;
  /* Yalnızca görselin en dış kenarı arka plana erisin; tabletin kendisi tam parlaklıkta kalsın */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%), linear-gradient(180deg, transparent 0, #000 6%, #000 92%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%), linear-gradient(180deg, transparent 0, #000 6%, #000 92%, transparent 100%);
  mask-composite: intersect;
}
.auth__copy h2 { font-size: clamp(28px, 2.6vw, 38px); line-height: 1.2; color: #fff; font-weight: 700; letter-spacing: -.02em; }
.auth__copy p { max-width: 520px; color: #b4c6e2; font-size: 16px; line-height: 1.6; margin: 16px 0 0; }
.auth__features { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.auth__features li { padding: 0 20px; border-left: 1px solid rgba(148, 178, 230, .22); display: flex; flex-direction: column; gap: 4px; }
.auth__features li:first-child { padding-left: 0; border-left: 0; }
.auth__ficon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 10px; color: #cfe0ff;
  background: rgba(59, 113, 220, .22); border: 1px solid rgba(120, 165, 255, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.auth__features b { color: #fff; font-size: 14.5px; }
.auth__features small { color: #9fb3d2; font-size: 13px; }

.auth__form { display: grid; place-items: center; padding: 40px 24px; background: #f6f8fc; }
.auth__box { width: 100%; max-width: 400px; }
.auth__appicon {
  width: 58px; height: 58px; border-radius: 15px; display: grid; place-items: center; margin-bottom: 26px; position: relative;
  background: linear-gradient(145deg, #2a4a86, #0d1f42); box-shadow: 0 10px 24px rgba(13, 31, 66, .28), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.auth__appicon span { color: #fff; font-size: 30px; font-weight: 700; line-height: 1; font-family: var(--font); }
.auth__appicon::before { content: ""; position: absolute; left: 12px; top: 29px; width: 14px; height: 3px; border-radius: 2px; background: #5b9dff; }
.auth__box h1 { font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.auth__lead { color: var(--muted); margin: 10px 0 30px; line-height: 1.6; }
.auth__submit { height: 48px; font-size: 15px; border-radius: 12px; margin-top: 6px; }
.auth__hint { color: var(--muted); font-size: 13px; margin: 2px 0 0; text-align: center; }
.auth__form .input { height: 46px; border-radius: 12px; background: #fff; }
.input-icon { position: relative; }
.input-icon > .ik { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8a97ab; pointer-events: none; }
.input-icon > .input { padding-left: 44px; }
.pw { position: relative; }
.pw .input { padding-right: 44px; }
.pw button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; }
.pw button:hover { color: var(--ink); }

/* ---------- Duyarlı ---------- */
@media (max-width: 1100px) {
  .grid-2, .detail { grid-template-columns: 1fr; }
  .auth__features { grid-template-columns: 1fr; gap: 14px; }
  .auth__features li { padding: 0; border-left: 0; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .app.nav-open .side { transform: none; }
  .top { padding: 0 16px; }
  .top .top__menu { display: inline-grid; }
  .content { padding: 8px 16px 40px; }
  .stats { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth__art { display: none; }
  .user__name { display: none; }
  .tl__item { grid-template-columns: 1fr; }
}
