/* ═══════════════════════════════════════════════════
   Tümkamu – Auth Forms (Giriş & Kayıt)
   Renk paleti: Navy #091E3A | Blue #1B4FDB | Gold #F59E0B
   ═══════════════════════════════════════════════════ */

/* ─── WRAP ───────────────────────────────────────── */
.tk-auth-wrap {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 16px 60px;
    min-height: 60vh;
}

.tk-auth-card {
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 40px 44px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 4px 24px rgba(9, 30, 58, .08);
}

.tk-auth-wrap--register .tk-auth-card {
    max-width: 560px;
}

/* ─── HEADER ─────────────────────────────────────── */
.tk-auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.tk-auth-header img.custom-logo {
    max-height: 48px;
    width: auto;
    margin-bottom: 16px;
}

.tk-auth-site-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: #091E3A;
    margin-bottom: 14px;
    letter-spacing: -.3px;
}

.tk-auth-title {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #091E3A !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    border: none !important;
}

.tk-auth-subtitle {
    color: #64748B;
    font-size: .92rem;
    margin: 0;
}

/* ─── ALERTS ─────────────────────────────────────── */
.tk-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: .88rem;
    margin-bottom: 20px;
    line-height: 1.5;
}
.tk-auth-alert p { margin: 0; }
.tk-auth-alert svg { flex-shrink: 0; margin-top: 1px; }

.tk-auth-alert--error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.tk-auth-alert--success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.tk-auth-alert--info    { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ─── FORM ALANLARI ──────────────────────────────── */
.tk-auth-form { display: flex; flex-direction: column; gap: 18px; }

.tk-auth-field { display: flex; flex-direction: column; gap: 6px; }

.tk-auth-field > label {
    font-size: .85rem;
    font-weight: 700;
    color: #0F172A;
    display: flex;
    align-items: center;
    gap: 6px;
}
.tk-auth-field > label .req { color: #EF4444; }
.tk-auth-field-hint { font-weight: 400; color: #94A3B8; font-size: .78rem; }

.tk-auth-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tk-auth-forgot { font-size: .8rem; color: #1B4FDB; text-decoration: none; }
.tk-auth-forgot:hover { text-decoration: underline; }

/* ─── INPUT WRAPPER ──────────────────────────────── */
.tk-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.tk-auth-input-icon {
    position: absolute;
    left: 14px;
    color: #94A3B8;
    pointer-events: none;
    z-index: 1;
}

.tk-auth-input-prefix {
    position: absolute;
    left: 14px;
    color: #64748B;
    font-weight: 700;
    font-size: .95rem;
    pointer-events: none;
    z-index: 1;
}

.tk-auth-input {
    width: 100%;
    height: 46px;
    border: 1.5px solid #CBD5E1;
    border-radius: 10px;
    padding: 0 14px;
    font-size: .93rem;
    color: #0F172A;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
    box-sizing: border-box;
    outline: none;
}

.tk-auth-input-icon ~ .tk-auth-input,
.tk-auth-input-icon ~ .tk-auth-input--pw {
    padding-left: 42px;
}
.tk-auth-input-prefix ~ .tk-auth-input--prefixed {
    padding-left: 28px;
}

.tk-auth-input:focus {
    border-color: #1B4FDB;
    box-shadow: 0 0 0 3px rgba(27,79,219,.12);
}
.tk-auth-input:invalid:not(:placeholder-shown):not(:focus) {
    border-color: #F87171;
}

/* Şifre göster/gizle */
.tk-auth-input--pw { padding-right: 44px; }

.tk-auth-pw-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #94A3B8;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color .15s;
}
.tk-auth-pw-toggle:hover { color: #1B4FDB; }

/* Davet kodu büyük harf */
.tk-auth-input--upper { text-transform: uppercase; letter-spacing: .04em; }

/* Davet kodu durum ikonları */
.tk-invite-status {
    position: absolute;
    right: 12px;
    font-size: 18px;
    line-height: 1;
}

/* ─── ALAN NOTU ──────────────────────────────────── */
.tk-auth-field-note {
    font-size: .78rem;
    color: #64748B;
    margin-top: 2px;
}
.tk-auth-field-note.is-error   { color: #DC2626; }
.tk-auth-field-note.is-success { color: #059669; }

/* ─── 2 SÜTUN ────────────────────────────────────── */
.tk-auth-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ─── ŞİFRE GÜCÜ ─────────────────────────────────── */
.tk-auth-pw-strength { margin-top: 8px; }
.tk-auth-pw-bar {
    height: 4px;
    background: #E2E8F0;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 4px;
}
.tk-auth-pw-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    transition: width .3s, background .3s;
}
.tk-auth-pw-label { font-size: .75rem; color: #64748B; }

/* ─── HATIRLA ─────────────────────────────────────── */
.tk-auth-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    color: #475569;
    cursor: pointer;
}

/* ─── SEPARATör ──────────────────────────────────── */
.tk-auth-separator {
    border: none;
    border-top: 1px solid #F1F5F9;
    margin: 4px 0;
}

/* ─── SÖZLEŞME ONAYLARI ──────────────────────────── */
.tk-auth-contracts { display: flex; flex-direction: column; gap: 14px; }

.tk-auth-contract-item {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 12px 14px;
    transition: border-color .18s, background .18s;
}
.tk-auth-contract-item:has(input:checked) {
    border-color: #1B4FDB;
    background: #EFF6FF;
}
.tk-auth-contract-item:has(input:invalid:not(:indeterminate)) {
    border-color: #E2E8F0;
}

.tk-auth-check-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.tk-auth-check-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.tk-auth-checkmark {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #CBD5E1;
    border-radius: 5px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .18s, background .18s;
}
.tk-auth-checkmark::after {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    /* [v1.5.1] Tik işaretini kutunun yatay+dikey tam ortasında konumlandır */
    transform: translate(-1px, -1px) rotate(-45deg) scaleX(0);
    transform-origin: center center;
    transition: transform .15s;
}

.tk-auth-check-label input:checked ~ .tk-auth-checkmark {
    background: #1B4FDB;
    border-color: #1B4FDB;
}
.tk-auth-check-label input:checked ~ .tk-auth-checkmark::after {
    transform: translate(-1px, -1px) rotate(-45deg) scaleX(1);
}

.tk-auth-check-text {
    font-size: .87rem;
    color: #334155;
    line-height: 1.5;
}

.tk-auth-contract-link {
    color: #1B4FDB;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.tk-auth-contract-link:hover { color: #1644C4; }

.tk-auth-contract-error {
    font-size: .78rem;
    color: #DC2626;
    margin-top: 8px;
    padding-left: 32px;
}

/* ─── SUBMIT BUTON ───────────────────────────────── */
.tk-auth-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #1B4FDB 0%, #1644C4 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, opacity .15s;
    box-shadow: 0 4px 14px rgba(27,79,219,.3);
    margin-top: 4px;
}
.tk-auth-btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(27,79,219,.38);
}
.tk-auth-btn-primary:active { transform: translateY(0); }
.tk-auth-btn-primary:disabled {
    opacity: .6;
    cursor: not-allowed;
}
.btn-arrow { transition: transform .2s; }
.tk-auth-btn-primary:hover .btn-arrow { transform: translateX(3px); }

/* ─── FOOTER ─────────────────────────────────────── */
.tk-auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: .88rem;
    color: #64748B;
}
.tk-auth-footer p { margin: 0; }
.tk-auth-link { color: #1B4FDB; font-weight: 700; text-decoration: none; }
.tk-auth-link:hover { text-decoration: underline; }

/* ─── NOTICE ─────────────────────────────────────── */
.tk-auth-notice { color: #475569; padding: 20px 0; font-size: .95rem; }
.tk-auth-notice a { color: #1B4FDB; }

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 560px) {
    .tk-auth-card { padding: 28px 20px; border-radius: 12px; }
    .tk-auth-row-2col { grid-template-columns: 1fr; }
}

/* ─── SELECT (MESLEK) ────────────────────────────── */
.tk-auth-select-wrap { position: relative; }
.tk-auth-select {
    appearance: none;
    -webkit-appearance: none;
    padding-left: 44px !important;
    padding-right: 36px !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}
.tk-auth-select:focus { border-color: #1B4FDB; box-shadow: 0 0 0 3px rgba(27,79,219,.12); }
.tk-auth-select optgroup { font-weight: 700; color: #091E3A; }
.tk-auth-select option { font-weight: 400; color: #1E293B; }

/* ══════════════════════════════════════
   ZATEN GİRİŞ YAPILDI UYARISI
══════════════════════════════════════ */
.tk-auth-already-logged {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 32px;
    max-width: 480px;
    margin: 60px auto;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(9,30,58,.08);
}
.tk-auth-already-icon {
    margin-bottom: 20px;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(27,79,219,.18));
}
.tk-auth-already-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 99px;
    background: #D1FAE5;
    color: #065F46;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.tk-auth-already-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10B981;
    animation: tk-pulse 1.5s ease-in-out infinite;
}
@keyframes tk-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(.7); }
}
.tk-auth-already-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 10px;
    letter-spacing: -.02em;
}
.tk-auth-already-desc {
    font-size: .88rem;
    color: #64748B;
    line-height: 1.7;
    margin: 0 0 28px;
    max-width: 320px;
}
.tk-auth-already-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1B4FDB, #2563EB);
    color: #fff;
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
    transition: box-shadow .2s, transform .15s;
    box-shadow: 0 4px 18px rgba(27,79,219,.35);
}
.tk-auth-already-btn:hover {
    box-shadow: 0 8px 28px rgba(27,79,219,.45);
    transform: translateY(-2px);
    color: #fff;
}
.tk-auth-already-btn svg {
    flex-shrink: 0;
}

/* ══════════════════════════════════════
   ŞİFREMİ UNUTTUM / ŞİFRE SIFIRLA
══════════════════════════════════════ */
.tk-reset-wrap .tk-auth-box {
    max-width: 460px;
    margin: 60px auto;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 44px 40px;
    box-shadow: 0 8px 40px rgba(9,30,58,.08);
}
.tk-reset-wrap .tk-auth-logo {
    text-align: center;
    margin-bottom: 20px;
}
.tk-reset-wrap .tk-auth-title {
    font-size: 1.5rem;
    font-weight: 900;
    color: #091E3A;
    text-align: center;
    margin: 0 0 10px;
}
.tk-reset-wrap .tk-auth-subtitle {
    font-size: .88rem;
    color: #64748B;
    text-align: center;
    line-height: 1.7;
    margin: 0 0 24px;
}
/* Başarı ekranı */
.tk-reset-success {
    text-align: center;
    padding: 10px 0 20px;
}
.tk-reset-success svg {
    display: block;
    margin: 0 auto 16px;
}
.tk-reset-success h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #091E3A;
    margin: 0 0 10px;
}
.tk-reset-success p {
    font-size: .88rem;
    color: #475569;
    line-height: 1.7;
    margin: 0 0 24px;
}
/* Süresi dolmuş */
.tk-reset-expired {
    text-align: center;
    padding: 10px 0 20px;
}
.tk-reset-expired svg { display: block; margin: 0 auto 16px; }
.tk-reset-expired h2  { font-size: 1.3rem; font-weight: 800; color: #091E3A; margin: 0 0 10px; }
.tk-reset-expired p   { font-size: .88rem; color: #475569; line-height: 1.7; margin: 0 0 24px; }

.tk-auth-bottom-link {
    text-align: center;
    margin-top: 18px;
    font-size: .85rem;
    color: #64748B;
}

@media (max-width: 560px) {
    .tk-reset-wrap .tk-auth-box { margin: 20px auto; padding: 28px 20px; }
}

/* [v1.6.0] Davet kodu artik opsiyonel — etiket rozeti */
.tk-auth-optional{
    font-size:12px;
    font-weight:500;
    color:#64748B;
    background:#F1F5F9;
    border-radius:6px;
    padding:2px 7px;
    margin-left:4px;
    letter-spacing:.01em;
}
.tk-auth-field-note strong{ color:#1B4FDB; font-weight:600; }
