/* Haber Merkezi — Yönetim paneli */
:root {
  --side: #151b26; --side-2: #1d2533; --side-txt: #aab3c2; --side-hi: #fff;
  --acc: #ed0d0d; --acc-d: #c50a0a; --acc-bg: #fdecec;
  --bg: #f3f4f7; --card: #fff; --line: #e3e6ec; --line-2: #eef0f4;
  --txt: #1d2330; --muted: #6b7385; --faint: #98a0b0;
  --blue: #1f63d6; --blue-bg: #e8f0fd; --green: #16803c; --green-bg: #e6f5ec;
  --orange: #b85c00; --orange-bg: #fff2e0; --red: #c81e1e; --red-bg: #fdeaea; --gray-bg: #eef0f3;
  --r: 6px; --topbar: 52px; --sidew: 236px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--txt); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 600; }
h1 { font-size: 20px; } h2 { font-size: 16px; } h3 { font-size: 14px; }
p { margin: 0 0 10px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
img { max-width: 100%; }
code, kbd { font-family: var(--mono); font-size: 12px; background: var(--gray-bg); padding: 1px 5px; border-radius: 3px; }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
.nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kabuk ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--sidew); background: var(--side); color: var(--side-txt); display: flex; flex-direction: column; z-index: 40; }
.side-brand { height: var(--topbar); display: flex; align-items: center; gap: 8px; padding: 0 18px; color: #fff; font-weight: 800; letter-spacing: .3px; font-size: 16px; border-bottom: 1px solid rgba(255,255,255,.06); flex: none; }
.side-brand:hover { text-decoration: none; }
.side-brand b { background: var(--acc); color: #fff; padding: 2px 6px; border-radius: 3px; }
.side-brand small { font-weight: 500; color: var(--side-txt); font-size: 11px; letter-spacing: 0; margin-left: auto; text-transform: uppercase; }
.side-nav { flex: 1; overflow-y: auto; padding: 8px 0 24px; scrollbar-width: thin; scrollbar-color: #2c3647 transparent; }
.nav-group { padding: 14px 18px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #6d7890; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 18px; color: var(--side-txt); font-size: 13.5px; border-left: 3px solid transparent; }
.nav-item:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--side-2); color: #fff; border-left-color: var(--acc); }
.nav-item.active svg.i { color: var(--acc); }
.nav-item span.lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge { background: var(--acc); color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 0 7px; line-height: 18px; min-width: 20px; text-align: center; }
.nav-badge.gray { background: #3a4558; }
.main { margin-left: var(--sidew); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 20px; }
.topbar .spacer { flex: 1; }
.topbar a.tb-link, .topbar button.tb-link { display: inline-flex; align-items: center; gap: 6px; color: var(--txt); font-size: 13px; padding: 6px 10px; border-radius: var(--r); background: none; border: 0; cursor: pointer; font-family: inherit; white-space: nowrap; }
.topbar a.tb-link:hover, .topbar button.tb-link:hover { background: var(--bg); text-decoration: none; }
.tb-user { display: inline-flex; align-items: center; gap: 8px; padding-left: 10px; margin-left: 4px; border-left: 1px solid var(--line); }
.tb-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--side); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; overflow: hidden; flex: none; }
.tb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tb-name { line-height: 1.2; font-size: 13px; }
.tb-name small { display: block; color: var(--muted); font-size: 11px; }
.topbar button.hamburger { display: none; }
.tb-new { position: relative; }
.dropdown { position: absolute; top: calc(100% + 6px); left: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 24px rgba(20,27,38,.12); min-width: 190px; padding: 4px; z-index: 50; }
.dropdown a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; color: var(--txt); border-radius: 4px; font-size: 13px; }
.dropdown a:hover { background: var(--bg); text-decoration: none; }
.content { padding: 20px 24px 48px; flex: 1; width: 100%; max-width: 1600px; }
.side-backdrop { display: none; }

@media (max-width: 1000px) {
  .side { transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
  body.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  body.nav-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(10,14,22,.45); z-index: 35; }
  .main { margin-left: 0; }
  .topbar button.hamburger { display: inline-flex; }
  .topbar { padding: 0 12px; gap: 4px; }
  .content { padding: 16px 16px 40px; }
}
@media (max-width: 640px) {
  .tb-hide-sm { display: none !important; }
  .tb-name { display: none; }
  .tb-user { padding-left: 6px; }
}

/* ---------- Sayfa başı ---------- */
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin-right: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head h1 small { font-size: 13px; font-weight: 400; color: var(--muted); }
.page-head .actions, .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.breadcrumb a { color: var(--muted); }

/* ---------- Kart ve ızgara ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); min-height: 46px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 14px; margin-right: auto; }
.card-head .actions { margin-left: auto; }
.card-body { padding: 16px; }
.card-body.p0, .card > .table-wrap { padding: 0; }
.card-foot { padding: 10px 16px; border-top: 1px solid var(--line); background: #fafbfc; border-radius: 0 0 var(--r) var(--r); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2 > .card + .card, .grid-3 > .card + .card, .grid-4 > .card + .card { margin-top: 0; }
@media (max-width: 1200px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.grid-21 { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-21 > .card + .card { margin-top: 0; }
@media (max-width: 1000px) { .grid-21 { grid-template-columns: minmax(0, 1fr); } }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.layout-side > .card + .card { margin-top: 0; }
@media (max-width: 1100px) { .layout-side { grid-template-columns: minmax(0, 1fr); } }
.sticky-side { position: sticky; top: calc(var(--topbar) + 16px); }
@media (max-width: 1100px) { .sticky-side { position: static; } }

/* ---------- Araç çubuğu / boş durum ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.card .toolbar { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.toolbar input[type=search], .toolbar input[type=text] { min-width: 200px; }
.toolbar .grow { flex: 1; }
.toolbar select, .toolbar input { width: auto; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty svg.i { width: 36px; height: 36px; color: #c3c9d4; display: block; margin: 0 auto 8px; }
.empty strong { display: block; color: var(--txt); font-size: 15px; margin-bottom: 4px; }

/* ---------- Form ---------- */
label { font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=number], input[type=tel],
input[type=date], input[type=datetime-local], input[type=time], select, textarea {
  width: 100%; font: inherit; color: var(--txt); background: #fff; border: 1px solid #cfd4dd; border-radius: 5px; padding: 7px 10px; min-height: 36px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: #6b8fd6; box-shadow: 0 0 0 3px rgba(31,99,214,.12); }
input[readonly], input:disabled, select:disabled, textarea:disabled { background: #f6f7f9; color: var(--muted); }
input[type=color] { width: 48px; height: 36px; padding: 2px; border: 1px solid #cfd4dd; border-radius: 5px; background: #fff; cursor: pointer; }
select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7385' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
select[multiple] { background-image: none; padding-right: 10px; }
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: var(--mono); font-size: 12.5px; min-height: 160px; tab-size: 2; white-space: pre; }
.input-sm, input.input-sm, select.input-sm { min-height: 30px; padding: 4px 8px; font-size: 13px; }
select.input-sm { padding-right: 26px; }
.form-row { margin-bottom: 14px; }
.form-row > label, .form-row > .label { display: block; margin-bottom: 5px; font-size: 13px; }
.form-row > label .req, .req { color: var(--acc); }
.form-row > label.switch { display: inline-flex; margin-bottom: 0; }
.form-row.has-error input, .form-row.has-error select, .form-row.has-error textarea { border-color: var(--red); }
.field-error { color: var(--red); font-size: 12px; margin-top: 4px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.form-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-inline > * { width: auto; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 6px; }
.card .form-actions { border-top: 1px solid var(--line); padding: 12px 16px; margin: 16px -16px -16px; background: #fafbfc; border-radius: 0 0 var(--r) var(--r); }
.input-group { display: flex; }
.input-group > input { border-radius: 5px 0 0 5px; flex: 1; min-width: 0; }
.input-group > .addon, .input-group > .btn { border-radius: 0 5px 5px 0; margin-left: -1px; }
.input-group > .addon { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid #cfd4dd; background: #f6f7f9; color: var(--muted); font-size: 12px; white-space: nowrap; }
.input-group > .prefix { border-radius: 5px 0 0 5px; margin: 0 -1px 0 0; }
.input-group > .prefix + input { border-radius: 0 5px 5px 0; }
.counter { float: right; font-weight: 400; font-size: 11.5px; color: var(--faint); }
.counter.warn { color: var(--orange); } .counter.over { color: var(--red); font-weight: 600; }
label.check { display: inline-flex; align-items: center; gap: 7px; font-weight: 400; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 15px; height: 15px; accent-color: var(--acc); margin: 0; cursor: pointer; }

/* Anahtar (switch) */
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 400; user-select: none; line-height: 20px; margin: 3px 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch > span { position: relative; width: 34px; height: 20px; border-radius: 12px; background: #c8ced8; transition: background .15s; flex: none; }
.switch > span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--acc); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(237,13,13,.2); }
.switch input:disabled + span { opacity: .5; }
.switch-list { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Düğmeler ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 500; line-height: 1; min-height: 34px; padding: 0 14px; border-radius: 5px; border: 1px solid #cfd4dd; background: #fff; color: var(--txt); cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s; }
.btn:hover { background: #f4f5f8; border-color: #b9c0cc; }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn svg.i { width: 16px; height: 16px; }
.btn-primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn-primary:hover { background: var(--acc-d); border-color: var(--acc-d); }
.btn-danger { color: var(--red); border-color: #efc4c4; }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--gray-bg); border-color: transparent; color: var(--txt); }
.btn-dark { background: var(--side); border-color: var(--side); color: #fff; }
.btn-dark:hover { background: #262f40; }
.btn-sm { min-height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-xs { min-height: 22px; padding: 0 7px; font-size: 11.5px; border-radius: 4px; }
.btn-icon { padding: 0; width: 34px; }
.btn-sm.btn-icon { width: 28px; }
.btn-block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid currentColor; border-color: #999 #999 #999 transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Tablo ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
table.table th, table.table td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
table.table th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.table th a { color: inherit; }
table.table tbody tr:hover { background: #fafbfd; }
table.table tbody tr:last-child td { border-bottom: 0; }
table.table td.num, table.table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.table td.check, table.table th.check { width: 34px; padding-right: 0; }
table.table-compact th, table.table-compact td { padding: 6px 10px; }
table.table tr.row-muted td { opacity: .6; }
table.table tr.row-hl { background: #fffbea; }
.card > table.table, .card > .table-wrap > table.table { border-radius: 0 0 var(--r) var(--r); }
.t-title { font-weight: 600; color: var(--txt); display: block; line-height: 1.35; }
.t-title:hover { color: var(--blue); }
.t-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.row-actions { display: flex; gap: 2px 10px; flex-wrap: wrap; font-size: 12px; margin-top: 3px; }
.row-actions a, .row-actions button { color: var(--muted); background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.row-actions a:hover, .row-actions button:hover { color: var(--blue); text-decoration: underline; }
.row-actions .danger:hover { color: var(--red); }
.row-actions form { display: inline; }
.thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 4px; background: var(--gray-bg); display: block; flex: none; }
.thumb-empty { width: 56px; height: 40px; border-radius: 4px; background: var(--gray-bg); display: flex; align-items: center; justify-content: center; color: #b7bec9; }
.drag { cursor: grab; color: #a8afbb; width: 28px; text-align: center; }
.drag:active { cursor: grabbing; }
.sortable-ghost { opacity: .45; background: #eef4ff !important; }
.sortable-chosen { background: #f5f8ff; }
.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.1); }

/* ---------- Rozetler ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; line-height: 18px; padding: 0 7px; border-radius: 3px; background: var(--gray-bg); color: #4b5465; white-space: nowrap; vertical-align: middle; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-gray { background: var(--gray-bg); color: #5c6576; }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-solid { background: var(--acc); color: #fff; }
.flags { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.flag { font-size: 10px; font-weight: 700; line-height: 16px; padding: 0 4px; border-radius: 3px; border: 1px solid currentColor; }
.flag-m { color: var(--acc); } .flag-ym { color: var(--blue); } .flag-sd { color: #fff; background: var(--acc); border-color: var(--acc); } .flag-gk { color: var(--orange); } .flag-sp { color: #7b3fb8; }

/* ---------- Sekmeler ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.card > .tabs { margin-bottom: 0; padding: 0 12px; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.tab:hover { color: var(--txt); }
.tab.active { color: var(--txt); border-bottom-color: var(--acc); font-weight: 600; }
.tab .count { background: var(--gray-bg); color: var(--muted); font-size: 11px; border-radius: 9px; padding: 0 6px; line-height: 17px; font-weight: 600; }
.tab.active .count { background: var(--acc-bg); color: var(--acc); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------- Sayfalama ---------- */
.pagination { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; justify-content: center; padding: 14px 0 0; }
.card .pagination { padding: 12px 16px; border-top: 1px solid var(--line); justify-content: space-between; }
.pagination .pages { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination a, .pagination span.cur, .pagination span.gap { min-width: 30px; height: 30px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; border: 1px solid var(--line); background: #fff; color: var(--txt); font-size: 13px; }
.pagination a:hover { border-color: #b9c0cc; text-decoration: none; }
.pagination span.cur { background: var(--side); border-color: var(--side); color: #fff; font-weight: 600; }
.pagination span.gap { border: 0; background: none; min-width: 16px; }
.pagination .info { color: var(--muted); font-size: 12px; }

/* ---------- Uyarı kutuları ---------- */
.alert { padding: 10px 14px; border-radius: var(--r); border: 1px solid; margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.alert > .alert-txt { flex: 1; min-width: 0; }
.alert .close { background: none; border: 0; cursor: pointer; color: inherit; opacity: .6; padding: 0 2px; font-size: 18px; line-height: 1; }
.alert .close:hover { opacity: 1; }
.alert-info { background: var(--blue-bg); border-color: #c6d8f7; color: #184ea8; }
.alert-warn { background: var(--orange-bg); border-color: #f3d3a6; color: #8a4600; }
.alert-err { background: var(--red-bg); border-color: #f2c1c1; color: #a31616; }
.alert-ok { background: var(--green-bg); border-color: #b9e1c7; color: #11652f; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.flash-wrap .alert { box-shadow: 0 1px 2px rgba(0,0,0,.03); }

/* ---------- Bildirim (toast) ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { background: #1d2533; color: #fff; padding: 10px 14px; border-radius: var(--r); box-shadow: 0 8px 24px rgba(0,0,0,.2); font-size: 13px; min-width: 220px; max-width: 420px; border-left: 4px solid #3fb96b; animation: tin .18s ease; }
.toast.err { border-left-color: var(--acc); }
.toast.warn { border-left-color: #f0a030; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Pencere (modal) ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10,14,22,.55); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 8px; width: 100%; max-width: 560px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal.lg { max-width: 1100px; height: calc(100vh - 40px); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin-right: auto; font-size: 15px; }
.modal-head [data-close] { font-size: 22px; color: var(--muted); }
.modal-body { padding: 16px; overflow: auto; flex: 1; min-height: 0; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; background: #fafbfc; border-radius: 0 0 8px 8px; }
.modal-foot .grow { flex: 1; }
@media (max-width: 640px) { .modal-back { padding: 0; } .modal, .modal.lg { max-height: 100vh; height: 100%; border-radius: 0; } }

/* ---------- Medya ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.media-item { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; cursor: pointer; display: flex; flex-direction: column; }
.media-item .mi-img { aspect-ratio: 4 / 3; background: #eef0f3 center/cover no-repeat; display: block; width: 100%; object-fit: cover; }
.media-item .mi-meta { padding: 6px 8px; font-size: 11.5px; color: var(--muted); line-height: 1.35; min-width: 0; }
.media-item .mi-meta b { display: block; color: var(--txt); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.media-item:hover { border-color: #aab4c4; }
.media-item.selected { outline: 3px solid var(--acc); outline-offset: -3px; border-color: var(--acc); }
.media-item.selected::after { content: ""; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--acc) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat; box-shadow: 0 0 0 2px #fff; }
.media-item .mi-raw { position: absolute; top: 6px; left: 6px; }
.media-picker .media-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
.dropzone { border: 2px dashed #c6ccd6; border-radius: 8px; padding: 18px; text-align: center; color: var(--muted); background: #fafbfc; transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--acc); background: var(--acc-bg); color: var(--acc); }
.dropzone svg.i { width: 26px; height: 26px; display: block; margin: 0 auto 6px; color: #9aa3b2; }
.dropzone .btn { margin-top: 8px; }
.upload-progress { font-size: 12px; color: var(--muted); margin-top: 6px; }
.media-detail { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
.media-detail .md-img { background: #eef0f3 repeating-conic-gradient(#e6e9ee 0 25%, #f4f5f8 0 50%) 0 0/16px 16px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; min-height: 220px; }
.media-detail .md-img img { max-height: 60vh; object-fit: contain; }
.media-detail dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12.5px; margin: 0 0 12px; }
.media-detail dt { color: var(--muted); } .media-detail dd { margin: 0; word-break: break-all; }
@media (max-width: 760px) { .media-detail { grid-template-columns: minmax(0, 1fr); } }

/* Görsel alanı */
.image-field { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.image-field .image-preview { width: 100%; border: 1px dashed #c6ccd6; border-radius: var(--r); background: #fafbfc; min-height: 90px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--faint); font-size: 12px; position: relative; }
.image-field .image-preview img { display: block; max-width: 100%; max-height: 220px; object-fit: contain; }
.image-field .image-preview.has { border-style: solid; background: #eef0f3 repeating-conic-gradient(#e6e9ee 0 25%, #f4f5f8 0 50%) 0 0/16px 16px; }
.image-field .image-preview .ip-url { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(21,27,38,.72); color: #fff; font-size: 11px; padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-field.busy .image-preview::after { content: "Yükleniyor…"; position: absolute; inset: 0; background: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; color: var(--txt); font-weight: 600; }

/* ---------- Genel bakış ---------- */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 1300px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; gap: 12px; align-items: center; color: var(--txt); min-width: 0; }
a.stat:hover { border-color: #b9c0cc; text-decoration: none; }
.stat .st-ico { width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--gray-bg); color: #4b5465; }
.stat .st-ico svg.i { width: 20px; height: 20px; }
.stat .st-ico.red { background: var(--acc-bg); color: var(--acc); } .stat .st-ico.blue { background: var(--blue-bg); color: var(--blue); } .stat .st-ico.green { background: var(--green-bg); color: var(--green); } .stat .st-ico.orange { background: var(--orange-bg); color: var(--orange); }
.stat .st-val { font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .st-lbl { font-size: 12px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
@media (max-width: 560px) { .stat { padding: 10px; gap: 8px; } .stat .st-ico { width: 32px; height: 32px; } .stat .st-val { font-size: 18px; } }
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: #f07a7a; } .chart .bar:hover, .chart .bar.today { fill: var(--acc); }
.chart .grid { stroke: #eef0f4; } .chart text { fill: #8b93a3; font-size: 10px; font-family: var(--font); }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); color: var(--txt); font-weight: 500; font-size: 13px; }
.quick a:hover { border-color: var(--acc); color: var(--acc); text-decoration: none; }
.quick a svg.i { color: var(--acc); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 10px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.list > li:last-child { border-bottom: 0; }
.list .l-main { flex: 1; min-width: 0; }
.list .l-title { display: block; font-weight: 500; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .l-title.wrap { white-space: normal; }
.list .l-sub { font-size: 12px; color: var(--muted); }
.list .l-num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank { width: 22px; height: 22px; border-radius: 4px; background: var(--gray-bg); color: var(--muted); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.list > li:nth-child(-n+3) .rank { background: var(--acc); color: #fff; }

/* ---------- İçerik formu ---------- */
.title-input { font-size: 18px !important; font-weight: 600; padding: 10px 12px !important; }
.slug-row { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.slug-row input { width: auto; flex: 1; min-width: 160px; min-height: 28px; padding: 3px 8px; font-size: 12.5px; }
.editor-wrap { border: 1px solid #cfd4dd; border-radius: 5px; background: #fff; }
.editor-wrap .ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid var(--line); position: sticky; top: var(--topbar); background: #fafbfc; z-index: 5; border-radius: 5px 5px 0 0; padding: 6px 8px; }
.editor-wrap .ql-container.ql-snow { border: 0; font-family: var(--font); font-size: 16px; color: #1d2330; }
.editor-wrap .ql-editor.ql-blank::before { font-style: normal; color: #a0a7b4; }
.editor-wrap .ql-editor { min-height: 380px; line-height: 1.7; padding: 16px 18px; }
.editor-wrap .ql-editor h2 { font-family: var(--font); font-size: 22px; margin: .6em 0 .3em; }
.editor-wrap .ql-editor h3 { font-family: var(--font); font-size: 18px; margin: .6em 0 .3em; }
.editor-wrap .ql-editor img { max-width: 100%; height: auto; }
.editor-wrap .ql-editor iframe { width: 100%; max-width: 100%; border: 0; background: #000; display: block; margin: 8px 0; }
.editor-wrap .ql-editor blockquote { border-left: 4px solid var(--acc); padding-left: 14px; color: #3b4252; font-style: italic; }
.editor-wrap .ql-snow .ql-tooltip { z-index: 6; }
/* Quill arayüz metinleri Türkçe */
.ql-snow .ql-picker.ql-header .ql-picker-label::before, .ql-snow .ql-picker.ql-header .ql-picker-item::before { content: 'Paragraf'; }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { content: 'Ara başlık (H2)'; }
.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: 'Alt başlık (H3)'; }
.ql-snow .ql-picker.ql-header { width: 128px; }
.ql-snow .ql-tooltip::before { content: 'Bağlantı:'; }
.ql-snow .ql-tooltip[data-mode=link]::before { content: 'Bağlantı adresi:'; }
.ql-snow .ql-tooltip[data-mode=video]::before { content: 'Video adresi:'; }
.ql-snow .ql-tooltip a.ql-action::after { content: 'Düzenle'; }
.ql-snow .ql-tooltip.ql-editing a.ql-action::after { content: 'Kaydet'; }
.ql-snow .ql-tooltip a.ql-remove::before { content: 'Kaldır'; }
.editor-wrap .ql-toolbar button.ql-embed, .editor-wrap .ql-toolbar button.ql-html { width: auto; padding: 3px 6px; font-size: 12px; font-weight: 600; color: #444; font-family: var(--font); }
.editor-wrap .ql-toolbar button.ql-html.ql-active { color: var(--acc); }
.editor-wrap textarea.code { border: 0; border-radius: 0 0 5px 5px; min-height: 420px; white-space: pre-wrap; display: block; box-shadow: none; }
.editor-status { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 5px 10px; border-top: 1px solid var(--line-2); background: #fafbfc; border-radius: 0 0 5px 5px; }
.side-box .card-body { padding: 14px; }
.side-box .form-row:last-child { margin-bottom: 0; }
.pub-meta { font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; margin-bottom: 12px; }
.pub-meta b { color: var(--txt); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px; border: 1px solid #cfd4dd; border-radius: 5px; background: #fff; min-height: 36px; align-items: center; position: relative; cursor: text; }
.chips:focus-within { border-color: #6b8fd6; box-shadow: 0 0 0 3px rgba(31,99,214,.12); }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--gray-bg); border-radius: 3px; padding: 2px 4px 2px 8px; font-size: 12.5px; }
.chip button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 3px; }
.chip button:hover { color: var(--red); }
.chips input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 90px; min-height: 24px; padding: 2px 4px; }
.suggest { position: absolute; left: -1px; right: -1px; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 0 0 5px 5px; box-shadow: 0 8px 20px rgba(0,0,0,.1); z-index: 20; max-height: 240px; overflow: auto; }
.suggest div { padding: 7px 10px; cursor: pointer; font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.suggest div.on, .suggest div:hover { background: var(--bg); }
.suggest div small { color: var(--muted); }
.serp { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: #fff; font-family: Arial, sans-serif; max-width: 640px; }
.serp .s-url { font-size: 12.5px; color: #202124; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp .s-title { color: #1a0dab; font-size: 19px; line-height: 1.3; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp .s-desc { color: #4d5156; font-size: 13.5px; line-height: 1.5; }
.gallery-list { display: flex; flex-direction: column; gap: 8px; }
.g-item { display: grid; grid-template-columns: 26px 120px minmax(0, 1fr) auto; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; background: #fff; }
.g-item .drag { padding-top: 30px; }
.g-item img { width: 120px; height: 80px; object-fit: cover; border-radius: 4px; background: var(--gray-bg); }
.g-item textarea { min-height: 80px; font-size: 13px; }
.g-item .g-no { font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
@media (max-width: 640px) { .g-item { grid-template-columns: 22px 80px minmax(0, 1fr); } .g-item img { width: 80px; height: 60px; } .g-item .g-act { grid-column: 2 / -1; } }
.video-preview { margin-top: 8px; border-radius: var(--r); overflow: hidden; background: #000; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: #aaa; font-size: 12px; }
.video-preview iframe, .video-preview video { width: 100%; height: 100%; border: 0; }
.embed-preview { margin-top: 8px; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; font-size: 12px; color: var(--muted); }
.embed-preview iframe { width: 100%; border: 0; display: block; }

/* ---------- Manşet ---------- */
.hl-search { position: relative; }
.hl-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0,0,0,.12); z-index: 20; max-height: 420px; overflow: auto; }
.hl-results .hr { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.hl-results .hr:last-child { border-bottom: 0; }
.hl-results .hr .l-main { flex: 1; min-width: 0; }
.pos { font-weight: 700; color: var(--muted); width: 28px; text-align: center; font-variant-numeric: tabular-nums; }
tr.over-limit td { background: #fff6f6; }

/* ---------- Yorumlar ---------- */
.c-text { white-space: pre-wrap; word-break: break-word; max-width: 640px; }
.c-reply { margin-top: 8px; }
.c-reply textarea { min-height: 70px; }
.c-parent { font-size: 12px; color: var(--muted); border-left: 3px solid var(--line); padding-left: 8px; margin-bottom: 6px; }

/* ---------- Giriş ---------- */
body.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--side); padding: 20px; background-image: radial-gradient(circle at 20% 10%, #232d3f 0, transparent 45%), radial-gradient(circle at 90% 90%, #2a1418 0, transparent 40%); }
.login-box { width: 100%; max-width: 380px; }
.login-brand { text-align: center; color: #fff; font-weight: 800; font-size: 24px; letter-spacing: .5px; margin-bottom: 18px; }
.login-brand b { background: var(--acc); padding: 2px 8px; border-radius: 4px; margin-right: 4px; }
.login-brand img { max-height: 54px; max-width: 260px; }
.login-card { background: #fff; border-radius: 10px; padding: 26px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login-card h1 { font-size: 18px; margin-bottom: 4px; }
.login-card p.muted { margin-bottom: 18px; font-size: 13px; }
.login-card .btn { width: 100%; min-height: 40px; font-size: 14px; }
.login-foot { text-align: center; margin-top: 16px; font-size: 12px; }
.login-foot a { color: #9aa5b8; }
.err-page { max-width: 560px; margin: 40px auto; text-align: center; }
.err-page .err-code { font-size: 54px; font-weight: 800; color: var(--acc); line-height: 1; margin-bottom: 8px; }

/* Yardımcılar */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.link-muted { color: var(--muted); }
.divider-v { width: 1px; height: 22px; background: var(--line); }
.text-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bulkbar select { width: auto; }
.sel-count { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .toolbar input[type=search], .toolbar input[type=text] { min-width: 0; flex: 1 1 100%; }
  .toolbar select { flex: 1 1 45%; }
  .page-head h1 { font-size: 18px; }
  table.table th, table.table td { padding: 8px; }
  .hide-sm { display: none !important; }
}
@media (max-width: 1000px) { .hide-md { display: none !important; } }
.show-sm { display: none; }
@media (max-width: 640px) { .show-sm { display: inline; } }

/* Demo modu: giriş düğmesi ve panel şeridi */
.login-demo { margin-top: 18px; }
.login-or { display: flex; align-items: center; gap: 10px; color: #8a93a3; font-size: 12px; margin-bottom: 14px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: #e3e6eb; }
.btn-demo { width: 100%; justify-content: center; background: #151b26; color: #fff; border-color: #151b26; padding: 11px 16px; font-weight: 700; }
.btn-demo:hover { background: #262f3f; color: #fff; }
.login-demo .muted { font-size: 12.5px; margin: 10px 0 0; text-align: center; }
.demo-strip { background: #fff4cc; color: #6b4d00; border-bottom: 1px solid #f0d77a; padding: 8px 16px; font-size: 13px; font-weight: 600; text-align: center; }
