/* Evolution Visa — formlar, kullanıcı paneli, yönetim paneli, sohbet, sınav, duyarlı düzen */

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-weight: 600; color: var(--ink); font-size: .95rem; }
.field > span em { font-weight: 400; font-style: normal; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid #8a939e; border-radius: 4px; background: var(--white); color: var(--ink); font-size: 1rem; }
.field textarea { resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--focus); outline-offset: 0; box-shadow: inset 0 0 0 2px var(--ink); border-color: var(--ink); }
.field input:disabled { background: var(--bg); color: var(--muted); border-color: var(--line-strong); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: .9rem; color: var(--muted); margin-top: -8px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex-shrink: 0; }
.form-error { color: var(--err); background: var(--err-bg); border-left: 4px solid var(--err); padding: 10px 14px; font-weight: 600; font-size: .95rem; }
.form-section { font-size: 1.1rem; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-top: 8px; }
.form-section:first-child { margin-top: 0; }
fieldset { border: 0; min-width: 0; }
.card-legend { float: left; width: 100%; font-weight: 700; font-size: 1.1rem; color: var(--ink); padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.card-legend + * { clear: both; }

/* App shell */
.count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--err); color: #fff; font-size: .78rem; font-weight: 700; display: inline-grid; place-items: center; }
.app-main { padding: 32px 40px 64px; min-width: 0; max-width: 1240px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 1.85rem; }
.page-head .muted { margin-top: 4px; }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 8px; color: var(--muted); font-size: .95rem; }
.app-main .crumbs { margin-bottom: 12px; }
.back { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; min-width: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font-size: 1.15rem; }
.card-head.pad, .pad { padding: 18px 24px 0; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.alert { display: flex; gap: 12px; padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; border: 1px solid; }
.alert > .i { margin-top: 2px; width: 20px; height: 20px; }
.alert p { margin-top: 2px; }
.alert-err { background: var(--err-bg); border-color: #f1c2bd; color: #7a1a12; }
.alert-info { background: var(--info-bg); border-color: #c4d6f1; color: #173f7d; }
.alert-ok { background: var(--ok-bg); border-color: #b9dcc7; color: #134d2c; }
.alert a { color: inherit; font-weight: 700; }

.empty { text-align: center; padding: 44px 20px; }
.empty h3 { margin-bottom: 6px; }

/* Tables */
.table { font-size: .95rem; }
.table th { text-align: left; font-size: .82rem; font-weight: 600; color: var(--muted); padding: 10px 14px; background: #f8f9fa; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table th:first-child, .table td:first-child { padding-left: 24px; }
.row-link { cursor: pointer; }
.row-link:hover td { background: #f7f9fc; }
.card:not(.card-flush) .table-scroll { margin: 0 -24px; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 4px; font-size: .8rem; font-weight: 700; white-space: nowrap; line-height: 1.5; }
.badge-muted { background: #eceef1; color: #4a525c; }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-err { background: var(--err-bg); color: var(--err); }
.tag { font-size: .78rem; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 6px; font-weight: 600; }
.level { display: inline-grid; place-items: center; min-width: 42px; height: 34px; padding: 0 8px; border-radius: 4px; background: var(--brand); color: #fff; font-weight: 700; }
.meter { display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: #e3e7ec; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand); }
.meter-l { width: 200px; height: 8px; }
.completion { text-align: right; } .completion small { display: block; color: var(--muted); margin-top: 4px; }

.todo { list-style: none; }
.todo li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.todo li:last-child { border-bottom: 0; }
.todo-mark { width: 22px; height: 22px; border: 2px solid var(--line-strong); border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; margin-top: 1px; }
.todo li.done .todo-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.todo-mark .i { width: 13px; height: 13px; stroke-width: 3; }
.todo a { font-weight: 600; }
.todo li.done a { color: var(--muted); }
.todo small { display: block; color: var(--muted); font-size: .88rem; }

/* New application */
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; left: 16px; top: 18px; width: 20px; height: 20px; accent-color: var(--brand); }
.choice > span { display: block; padding: 14px 16px 14px 48px; border: 1px solid var(--line-strong); border-radius: var(--radius); height: 100%; }
.choice b { display: block; color: var(--ink); }
.choice small { display: block; color: var(--muted); }
.choice em { display: block; font-style: normal; font-size: .85rem; color: var(--muted); margin-top: 6px; }
.choice:hover > span { border-color: #8a939e; }
.choice input:checked + span { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--brand-50); }

/* Documents */
.docs { list-style: none; border-top: 1px solid var(--line); }
.doc { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.doc:last-child { border-bottom: 0; }
.doc.is-drag { background: var(--brand-50); outline: 2px dashed var(--brand); outline-offset: -2px; }
.doc.is-uploading { opacity: .7; }
.doc-main { min-width: 0; flex: 1; }
.doc-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.doc-title b { color: var(--ink); }
.doc-hint { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.doc-file { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .9rem; margin-top: 4px; }
.doc-file > span:first-of-type { color: var(--ink); overflow-wrap: anywhere; }
.doc-file .i { width: 16px; height: 16px; color: var(--muted); }
.doc-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: .9rem; color: var(--err); font-weight: 600; }
.doc.is-approved .doc-note { color: var(--muted); font-weight: 400; }
.doc-note .i { width: 16px; height: 16px; margin-top: 3px; }
.doc.is-missing .doc-title b { color: var(--muted); font-weight: 600; }
.doc-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.doc-actions label.btn { cursor: pointer; }
.doc-actions label.btn:focus-within { outline: 3px solid var(--focus); box-shadow: 0 0 0 5px var(--ink); }
.progress { height: 4px; background: #e3e7ec; border-radius: 2px; margin-top: 8px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .2s; }

.checklist { list-style: none; }
.checklist li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .i { width: 20px; height: 20px; color: var(--err); stroke-width: 2.4; margin-top: 2px; }
.checklist li.ok .i { color: var(--ok); }
.checklist b { display: block; color: var(--ink); font-size: .98rem; }
.checklist small { color: var(--muted); font-size: .88rem; }
.text-err { color: var(--err); }

.kv { display: grid; }
.kv > div { display: grid; grid-template-columns: 42% 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--ink); overflow-wrap: anywhere; }

.timeline { list-style: none; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--line-strong); }
.timeline li.t-ok::before { border-color: var(--ok); background: var(--ok); }
.timeline li.t-err::before { border-color: var(--err); background: var(--err); }
.timeline li.t-info::before, .timeline li.t-warn::before { border-color: var(--brand); background: var(--brand); }
.t-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.t-head b { color: var(--ink); font-size: .95rem; }
.t-head time { color: var(--muted); font-size: .85rem; }
.timeline p { font-size: .92rem; margin-top: 2px; }
.timeline small { color: var(--muted); font-size: .82rem; }

.result-list { list-style: none; }
.result-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.result-list li:last-child { border-bottom: 0; }
.result-list li > div { flex: 1; }
.result-list b { display: block; color: var(--ink); }
.result-list small { color: var(--muted); }

/* Admin */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: var(--text); }
.kpi:hover { border-color: var(--brand); color: var(--text); }
.kpi b { display: block; font-size: 1.9rem; color: var(--ink); line-height: 1.1; }
.kpi span { font-size: .92rem; color: var(--muted); }
.kpi.is-hot { border-left: 4px solid var(--err); }
.status-list { list-style: none; }
.status-list li { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.status-list li:last-child { border-bottom: 0; }
.status-list a { text-decoration: none; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs a { padding: 7px 12px; border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.tabs a:hover { background: #e7eaee; }
.tabs a[aria-current] { background: var(--ink); color: #fff; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid #8a939e; border-radius: 4px; padding: 0 10px; min-width: 280px; }
.search-box input { border: 0; outline: 0; min-height: 40px; flex: 1; background: transparent; }
.search-box:focus-within { outline: 3px solid var(--focus); box-shadow: inset 0 0 0 1px var(--ink); }
.search-box .i { color: var(--muted); }
.chip { display: inline-block; font-size: .82rem; padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 4px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.chip:hover { border-color: var(--brand); color: var(--brand); }

/* Chat */
.chat-card { padding: 0; display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 460px; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-head b { display: block; color: var(--ink); }
.chat-head small { color: var(--muted); }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; flex-shrink: 0; }
.chat-avatar.is-brand { background: var(--ink); }
.chat-avatar.initials { background: var(--brand-50); color: var(--brand); font-weight: 700; }
.chat-head-links { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.chat-log { flex: 1; overflow-y: auto; padding: 20px; background: #f7f8fa; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { margin: auto; text-align: center; color: var(--muted); max-width: 380px; padding: 30px 10px; }
.chat-empty b { display: block; color: var(--ink); margin-bottom: 4px; }
.chat-empty.tall { height: 100%; display: flex; flex-direction: column; justify-content: center; }
.chat-day { text-align: center; margin: 8px 0; }
.chat-day span { font-size: .8rem; color: var(--muted); background: #eceef1; padding: 2px 10px; border-radius: 10px; }
.msg { max-width: 72%; display: flex; flex-direction: column; }
.msg-mine { align-self: flex-end; align-items: flex-end; }
.msg-theirs { align-self: flex-start; }
.msg-bubble { padding: 10px 14px; border-radius: 12px; font-size: .98rem; line-height: 1.45; overflow-wrap: anywhere; }
.msg-mine .msg-bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 3px; }
.msg-theirs .msg-bubble { background: var(--white); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 3px; }
.msg-meta { font-size: .78rem; color: var(--muted); margin-top: 3px; }
.composer { display: flex; gap: 10px; padding: 12px 16px 4px; border-top: 1px solid var(--line); background: var(--white); align-items: flex-end; }
.composer textarea { flex: 1; resize: none; min-height: 44px; max-height: 180px; padding: 10px 12px; border: 1px solid #8a939e; border-radius: 4px; line-height: 1.4; }
.composer textarea:focus { outline: 3px solid var(--focus); box-shadow: inset 0 0 0 2px var(--ink); border-color: var(--ink); }
.composer-hint { font-size: .78rem; color: var(--muted); padding: 2px 16px 10px; background: var(--white); }
.inbox { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100vh - 190px); min-height: 500px; }
.inbox-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.inbox-search { padding: 12px; border-bottom: 1px solid var(--line); }
.inbox-search input { width: 100%; min-height: 38px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 4px; }
#threads { overflow-y: auto; flex: 1; }
.thread { position: relative; display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.thread:hover { background: #f7f9fc; color: var(--text); }
.thread.is-active { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--brand); }
.thread-top { display: flex; justify-content: space-between; gap: 8px; }
.thread-top b { color: var(--ink); }
.thread-top time { font-size: .8rem; color: var(--muted); }
.thread p { font-size: .88rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 28px; }
.thread .count { position: absolute; right: 14px; bottom: 12px; }
.inbox-thread { display: flex; flex-direction: column; min-height: 0; }

/* Exam */
.exam-langs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.exam-card h2 { font-size: 1.6rem; }
.facts-inline { list-style: none; display: flex; gap: 18px; margin: 12px 0 18px; color: var(--muted); }
.facts-inline li + li::before { content: '·'; margin-right: 18px; }
.bullets { padding-left: 20px; display: grid; gap: 8px; }
.exam-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.exam-bar h1 { font-size: 1.7rem; }
.timer { display: inline-flex; align-items: center; gap: 8px; font-size: 1.2rem; font-variant-numeric: tabular-nums; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--white); }
.timer.is-low { border-color: var(--err); color: var(--err); background: var(--err-bg); }
.exam-progress { height: 6px; background: #e3e7ec; border-radius: 3px; overflow: hidden; margin-bottom: 18px; }
.exam-progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .25s; }
.q-card { padding: 32px; }
.q-level { font-size: .88rem; color: var(--muted); font-weight: 600; }
.q-text { font-size: 1.6rem; color: var(--ink); font-weight: 600; margin: 8px 0 22px; line-height: 1.3; }
.options { display: grid; gap: 10px; }
.option { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; font-size: 1.05rem; color: var(--ink); }
.option input { position: absolute; opacity: 0; }
.option:hover { border-color: #8a939e; }
.option:focus-within { outline: 3px solid var(--focus); box-shadow: 0 0 0 5px var(--ink); }
.option.is-selected { border-color: var(--brand); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--brand); }
.option-key { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex-shrink: 0; }
.option.is-selected .option-key { background: var(--brand); border-color: var(--brand); color: #fff; }
.q-dots { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.q-dot { width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--white); cursor: pointer; font-weight: 600; color: var(--muted); }
.q-dot.is-answered { background: var(--brand-50); color: var(--brand); border-color: #b8c9e2; }
.q-dot.is-current { background: var(--brand); color: #fff; border-color: var(--brand); }



/* Modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 20, 26, .55); display: grid; place-items: center; padding: 16px; z-index: 80; }
.modal { position: relative; background: var(--white); border-radius: 8px; padding: 26px 28px; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); outline: none; }
.modal-wide { max-width: 980px; }
.modal h3 { font-size: 1.3rem; padding-right: 30px; }
.modal-x { position: absolute; right: 12px; top: 12px; background: none; border: 0; padding: 6px; cursor: pointer; color: var(--muted); border-radius: 4px; }
.modal-x:hover { background: var(--bg); color: var(--ink); }
.preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-right: 36px; margin-bottom: 14px; }
.preview { background: #e9ebee; border-radius: 4px; display: grid; place-items: center; min-height: 300px; }
.preview-frame { width: 100%; height: 70vh; border: 0; }
.preview-img { max-height: 70vh; object-fit: contain; }
#toast-root { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 8px; z-index: 90; max-width: calc(100vw - 40px); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: 420px; font-size: .95rem; transition: opacity .3s, transform .3s; }
.toast .i { margin-top: 2px; }
.toast-ok .i { color: #7fd3a1; } .toast-err { background: var(--err); } .toast-info .i { color: #ffbf47; }
.toast.out { opacity: 0; transform: translateY(6px); }

/* Responsive (yalnızca panel bileşenleri; herkese açık sayfalar site.css içinde) */
@media (max-width: 1080px) {
  .dash-grid, .detail-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .inbox { grid-template-columns: 1fr; height: auto; }
  .inbox-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 260px; }
  .inbox-thread { height: 70vh; }
}
@media (max-width: 640px) {
  .grid-2, .choice-grid, .exam-langs, .kpis { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 1.5rem; }
  .card { padding: 18px 16px; }
  .card:not(.card-flush) .table-scroll { margin: 0 -16px; }
  .doc { flex-direction: column; align-items: stretch; }
  .doc-actions { justify-content: flex-end; }
  .msg { max-width: 88%; }
  .chat-card { height: calc(100vh - 190px); }
  .search-box { min-width: 0; width: 100%; }
  .q-card { padding: 22px 16px; }
  .q-text { font-size: 1.3rem; }
  .kv > div { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }
