/* ==================================================
   HOMIEN CRAFT - DESTEK (TICKET) SİSTEMİ
   ================================================== */

.tk-page {
    --tk-bg: rgba(15, 23, 42, .72);
    --tk-bg-soft: rgba(255, 255, 255, .035);
    --tk-border: rgba(148, 163, 184, .18);
    --tk-text: #e5edf7;
    --tk-muted: #94a3b8;
    --tk-accent: #fbbf24;
    --tk-green: #34d399;
    --tk-blue: #60a5fa;
    --tk-red: #f87171;
    padding-bottom: 80px;
}

.tk-page h1 {
    margin: 6px 0 10px;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.tk-page h2 {
    margin: 6px 0 18px;
    font-size: 22px;
}

/* ---------- Kartlar ---------- */

.tk-card {
    padding: 26px;
    border: 1px solid var(--tk-border);
    border-radius: 16px;
    background: var(--tk-bg);
    backdrop-filter: blur(6px);
    min-width: 0;
}

.tk-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.tk-login-card {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

.tk-login-card h2 { margin-top: 4px; }
.tk-login-card .btn { margin-top: 10px; }

.tk-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: 1px solid rgba(251, 191, 36, .3);
    background: rgba(251, 191, 36, .08);
    color: var(--tk-accent);
    font-size: 22px;
}

.tk-staff-banner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 18px;
    padding: 12px 16px;
    border: 1px solid rgba(251, 191, 36, .25);
    border-radius: 12px;
    background: rgba(251, 191, 36, .07);
    color: var(--tk-text);
    font-size: 14px;
}

.tk-staff-banner a { color: var(--tk-accent); font-weight: 700; }

/* ---------- Form ---------- */

.tk-form label {
    display: block;
    margin: 0 0 7px;
    color: var(--tk-text);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
}

.tk-form select,
.tk-form input[type="text"],
.tk-form textarea,
.tk-search input[type="search"] {
    width: 100%;
    margin-bottom: 16px;
    padding: 13px 14px;
    border: 1px solid var(--tk-border);
    border-radius: 10px;
    background: rgba(2, 6, 23, .55);
    color: var(--tk-text);
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.tk-form textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.55;
}

.tk-form select option { background: #0b1220; color: #e5edf7; }

.tk-form select:focus,
.tk-form input:focus,
.tk-form textarea:focus,
.tk-search input:focus {
    border-color: rgba(251, 191, 36, .6);
    box-shadow: 0 0 0 3px rgba(251, 191, 36, .12);
}

.tk-form-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tk-counter { color: var(--tk-muted); font-size: 12px; }
.tk-counter.is-near { color: var(--tk-accent); }

.tk-hint {
    margin: 14px 0 0;
    color: var(--tk-muted);
    font-size: 12px;
    line-height: 1.5;
}

.tk-notice {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.55;
}

.tk-notice-warn {
    border: 1px solid rgba(251, 191, 36, .3);
    background: rgba(251, 191, 36, .08);
    color: var(--tk-text);
}

/* ---------- Rozetler ---------- */

.tk-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    white-space: nowrap;
    border: 1px solid transparent;
}

.tk-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.tk-badge.tk-open { color: var(--tk-accent); background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .3); }
.tk-badge.tk-answered { color: var(--tk-green); background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .3); }
.tk-badge.tk-closed { color: var(--tk-muted); background: rgba(148, 163, 184, .1); border-color: rgba(148, 163, 184, .25); }

.tk-new {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--tk-accent);
    color: #080d18;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    vertical-align: middle;
}

/* ---------- Talep listesi ---------- */

.tk-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tk-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--tk-border);
    border-radius: 12px;
    background: var(--tk-bg-soft);
    color: var(--tk-text);
    text-decoration: none;
    transition: border-color .15s, background .15s, transform .15s;
}

.tk-item:hover {
    border-color: rgba(251, 191, 36, .45);
    background: rgba(251, 191, 36, .05);
    transform: translateY(-1px);
}

.tk-item-closed { opacity: .65; }

.tk-item-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tk-item-main strong {
    font-size: 15px;
    overflow-wrap: anywhere;
}

.tk-item-sub {
    color: var(--tk-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.tk-item-sub b { color: var(--tk-text); font-weight: 700; }

.tk-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 26px 10px;
    text-align: center;
}

.tk-empty p { margin: 0; }

/* ---------- Talep detayı ---------- */

.tk-back {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--tk-muted);
    font-size: 14px;
    text-decoration: none;
}

.tk-back:hover { color: var(--tk-accent); }

.tk-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--tk-border);
}

.tk-head-info { min-width: 0; flex: 1 1 320px; }

.tk-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    color: var(--tk-muted);
    font-size: 13px;
}

.tk-meta strong { color: var(--tk-text); }

.tk-thread {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
    scroll-margin-top: 90px;
}

.tk-msg {
    max-width: min(760px, 92%);
    padding: 14px 18px;
    border: 1px solid var(--tk-border);
    border-radius: 14px;
    background: var(--tk-bg);
    scroll-margin-top: 90px;
}

.tk-msg-player { align-self: flex-start; border-top-left-radius: 4px; }

.tk-msg-staff {
    align-self: flex-end;
    border-top-right-radius: 4px;
    border-color: rgba(251, 191, 36, .35);
    background: rgba(251, 191, 36, .07);
}

.tk-msg-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.tk-msg-head time {
    margin-left: auto;
    color: var(--tk-muted);
    font-size: 12px;
}

.tk-staff-tag {
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--tk-accent);
    color: #080d18;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
}

.tk-msg-body {
    color: var(--tk-text);
    font-size: 15px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.tk-system {
    align-self: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .1);
    color: var(--tk-muted);
    font-size: 12px;
    text-align: center;
    scroll-margin-top: 90px;
}

.tk-reply-card { scroll-margin-top: 90px; }
.tk-reply-card .tk-form textarea { margin-bottom: 14px; }

.tk-closed-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    scroll-margin-top: 90px;
}

.tk-closed-card p { margin: 4px 0 0; font-size: 14px; }

/* ---------- Yetkili paneli ---------- */

.tk-admin-head { margin-bottom: 22px; }
.tk-admin-head p { margin: 0; }

.tk-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.tk-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid var(--tk-border);
    border-radius: 14px;
    background: var(--tk-bg);
    color: var(--tk-muted);
    font-size: 13px;
    text-decoration: none;
    transition: border-color .15s;
}

.tk-stat strong { color: var(--tk-text); font-size: 28px; line-height: 1; }
.tk-stat:hover, .tk-stat.is-active { border-color: rgba(251, 191, 36, .5); }

.tk-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.tk-tabs { display: flex; flex-wrap: wrap; gap: 6px; }

.tk-tabs a {
    padding: 8px 14px;
    border: 1px solid var(--tk-border);
    border-radius: 999px;
    color: var(--tk-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.tk-tabs a:hover { color: var(--tk-text); }

.tk-tabs a.is-active {
    border-color: rgba(251, 191, 36, .5);
    background: rgba(251, 191, 36, .1);
    color: var(--tk-accent);
}

.tk-search {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex: 1 1 280px;
    max-width: 420px;
}

.tk-search input[type="search"] { margin: 0; padding: 10px 14px; font-size: 14px; }

/* ---------- Mobil ---------- */

@media (max-width: 900px) {
    .tk-layout { grid-template-columns: 1fr; }
    .tk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .tk-card { padding: 20px 16px; }
    .tk-login-card { flex-direction: column; }
    .tk-msg { max-width: 100%; }
    .tk-item { flex-direction: column; align-items: flex-start; }
    .tk-search { max-width: none; }
}
