/* ============================================================
   Clark Forklift — Yönetim Paneli stilleri
   ============================================================ */
:root {
    --navy: #1c1c1c; --navy-600: #3a3a3a; --accent: #bed600; --accent-600: #a7bd00;
    --ink: #1f2937; --muted: #6b7686; --line: #e4e8ee; --bg: #f1f4f8; --card: #fff;
    --green: #16a34a; --red: #dc2626; --radius: 12px; --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(16,32,57,.08), 0 1px 2px rgba(16,32,57,.06);
    --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
body.admin, body.adm-login { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; }
a { color: var(--navy-600); text-decoration: none; }
h1, h2, h3 { color: var(--navy); margin: 0 0 .5em; }

/* ---- Layout ---- */
.admin { display: flex; min-height: 100vh; }
.adm-sidebar { width: 256px; background: var(--navy); color: #b9c8dc; flex-shrink: 0; position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 50; }
.adm-main { margin-left: 256px; flex: 1; min-width: 0; display: flex; flex-direction: column; width: calc(100% - 256px); }
.adm-brand { padding: 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.adm-brand img { height: 38px; }
.adm-nav { padding: 12px 0 40px; }
.adm-nav__heading { padding: 16px 20px 6px; font-size: .7rem; letter-spacing: .12em; color: #9aa0a8; text-transform: uppercase; font-weight: 700; }
.adm-nav__link { display: flex; align-items: center; justify-content: space-between; padding: 11px 20px; color: #b9c8dc; font-weight: 500; font-size: .95rem; border-left: 3px solid transparent; }
.adm-nav__link:hover { background: rgba(255,255,255,.06); color: #fff; }
.adm-nav__link.is-active { background: rgba(190,214,0,.18); color: #fff; border-left-color: var(--accent); }
.adm-badge { background: var(--accent); color: #1a1a1a; font-size: .72rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; }

.adm-topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 0 24px; height: 62px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 40; }
.adm-topbar__title { font-weight: 800; color: var(--navy); font-size: 1.1rem; }
.adm-topbar__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.adm-toplink { font-size: .88rem; color: var(--muted); }
.adm-userchip { font-weight: 600; color: var(--navy); font-size: .9rem; }
.adm-burger { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--navy); }
.adm-content { padding: 28px 24px 60px; max-width: 1180px; width: 100%; }
.adm-backdrop { display: none; position: fixed; inset: 0; background: rgba(8,22,40,.5); z-index: 45; }

/* ---- Stat cards ---- */
.adm-grid--stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }
.adm-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); transition: .15s; }
.adm-stat:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,32,57,.1); }
.adm-stat__num { font-size: 2rem; font-weight: 900; color: var(--navy); line-height: 1; }
.adm-stat__label { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.adm-stat--accent { background: var(--navy); }
.adm-stat--accent .adm-stat__num { color: var(--accent); }
.adm-stat--accent .adm-stat__label { color: #b9c8dc; }

/* ---- Cards ---- */
.adm-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 22px; }
.adm-card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.adm-card__head h2 { margin: 0; font-size: 1.15rem; }
.adm-quicklinks { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Buttons ---- */
.adm-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; color: var(--navy); font-weight: 600; font-size: .9rem; cursor: pointer; transition: .15s; font-family: inherit; }
.adm-btn:hover { background: var(--bg); border-color: #cdd5df; }
.adm-btn--primary { background: var(--accent); border-color: var(--accent); color: #1a1a1a; }
.adm-btn--primary:hover { background: var(--accent-600); border-color: var(--accent-600); }
.adm-btn--navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.adm-btn--navy:hover { background: var(--navy-600); }
.adm-btn--danger { background: #fff; border-color: #f3c0bd; color: var(--red); }
.adm-btn--danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.adm-btn--ghost { background: transparent; }
.adm-btn--sm { padding: 6px 12px; font-size: .82rem; }
.adm-btn--block { display: flex; width: 100%; justify-content: center; }

/* ---- Tables ---- */
.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.adm-table th, .adm-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table th { color: var(--muted); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; background: #fafbfc; }
.adm-table tbody tr:hover { background: #fafbfc; }
.adm-row--unread { background: #fffaf0; }
.adm-row--unread td:first-child { border-left: 3px solid var(--accent); }
.adm-tag { background: var(--bg); color: var(--navy-600); padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.adm-tag--green { background: #ecfdf3; color: #067647; }
.adm-tag--muted { background: #f1f4f8; color: var(--muted); }
.adm-thumb { width: 48px; height: 38px; object-fit: contain; background: var(--bg); border-radius: 6px; border: 1px solid var(--line); }
.adm-link { color: var(--navy-600); font-weight: 600; }
.adm-actions { display: flex; gap: 8px; align-items: center; white-space: nowrap; }

/* ---- Forms ---- */
.adm-field { margin-bottom: 16px; }
.adm-field label { display: block; font-weight: 600; font-size: .88rem; color: var(--navy); margin-bottom: 6px; }
.adm-field .adm-hint { font-weight: 400; color: var(--muted); font-size: .8rem; }
.adm-field input[type=text], .adm-field input[type=email], .adm-field input[type=url], .adm-field input[type=number],
.adm-field input[type=password], .adm-field input[type=tel], .adm-field select, .adm-field textarea, .adm-input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; color: var(--ink); background: #fff;
}
.adm-field input:focus, .adm-field select:focus, .adm-field textarea:focus, .adm-input:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(27,62,99,.1); }
.adm-field textarea { min-height: 120px; resize: vertical; }
.adm-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.adm-check { display: flex; align-items: center; gap: 8px; }
.adm-check input { width: auto; }
.adm-form-actions { display: flex; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.req { color: var(--red); }

/* ---- Rich text editor ---- */
.rte-toolbar { display: flex; gap: 4px; flex-wrap: wrap; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; padding: 6px; background: #fafbfc; }
.rte-toolbar button { border: 1px solid var(--line); background: #fff; border-radius: 5px; padding: 5px 10px; cursor: pointer; font-size: .85rem; font-weight: 600; }
.rte-toolbar button:hover { background: var(--bg); }
.rte-area { min-height: 220px; border: 1px solid var(--line); border-radius: 0 0 var(--radius-sm) var(--radius-sm); padding: 14px; background: #fff; overflow-y: auto; }
.rte-area:focus { outline: none; border-color: var(--navy-600); }
.rte-area h2 { font-size: 1.3rem; } .rte-area h3 { font-size: 1.1rem; }

/* ---- Repeatable spec rows ---- */
.spec-rows { display: flex; flex-direction: column; gap: 8px; }
.spec-row { display: grid; grid-template-columns: 1fr 1fr 1.2fr auto; gap: 8px; align-items: center; }
.spec-row .adm-input { margin: 0; }
.spec-del { background: #fff; border: 1px solid #f3c0bd; color: var(--red); border-radius: 6px; width: 36px; height: 36px; cursor: pointer; font-size: 1.1rem; }

/* ---- Media grid ---- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.media-item { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.media-item__img { aspect-ratio: 4/3; background: var(--bg); display: grid; place-items: center; }
.media-item__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.media-item__foot { padding: 8px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.media-item__path { font-size: .72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn { cursor: pointer; border: 1px solid var(--line); background: #fff; border-radius: 5px; padding: 3px 7px; font-size: .72rem; }

/* ---- Alerts (flash) ---- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .92rem; border: 1px solid; display: flex; gap: 8px; align-items: center; }
.alert--success { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.alert--error { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.alert--info { background: #eff8ff; border-color: #b2ddff; color: #175cd3; }
.alert .ico-svg { width: 18px; height: 18px; flex-shrink: 0; }
.alert ul { margin: 0; }

.adm-muted { color: var(--muted); }
.adm-pagebar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.adm-pagebar h1 { margin: 0; font-size: 1.5rem; }
.adm-pagination { display: flex; gap: 6px; margin-top: 20px; }
.adm-pagination a, .adm-pagination span { padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-weight: 600; font-size: .85rem; }
.adm-pagination .is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.ico-svg { width: 20px; height: 20px; vertical-align: middle; }
.adm-help { background: #eff8ff; border: 1px solid #b2ddff; color: #175cd3; padding: 10px 14px; border-radius: var(--radius-sm); font-size: .85rem; margin-bottom: 16px; }

/* ---- Settings tabs ---- */
.adm-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.adm-fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.adm-fieldset legend { font-weight: 800; color: var(--navy); padding: 0 8px; }

/* ---- Login ---- */
.adm-login { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(135deg, #1c1c1c, #2b2b2b); padding: 20px; }
.adm-login__card { background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.adm-login__logo { height: 46px; margin-bottom: 20px; }
.adm-login h1 { font-size: 1.4rem; margin-bottom: 4px; }
.adm-login .adm-field input { padding: 12px 14px; }

/* ---- Responsive ---- */
@media (max-width: 980px) {
    .adm-sidebar { transform: translateX(-100%); transition: transform .25s; }
    .adm-sidebar.is-open { transform: translateX(0); }
    .adm-main { margin-left: 0; width: 100%; }
    .adm-burger { display: block; }
    .adm-backdrop.is-open { display: block; }
    .adm-row2, .adm-settings-grid { grid-template-columns: 1fr; }
    .spec-row { grid-template-columns: 1fr 1fr; }
}

/* ===== Sidebar nav ikonları (mükemmelleştirme) ===== */
.adm-nav__link { gap: 11px; justify-content: flex-start; }
.adm-nav__ico { display: inline-flex; align-items: center; flex-shrink: 0; opacity: .78; }
.adm-nav__ico .ico-svg { width: 18px; height: 18px; }
.adm-nav__label { flex: 1; }
.adm-nav__link:hover .adm-nav__ico { opacity: 1; }
.adm-nav__link.is-active .adm-nav__ico { opacity: 1; color: var(--accent); }

/* ===== Dashboard stat kart ikonları ===== */
.adm-stat { position: relative; overflow: hidden; }
.adm-stat__ico { position: absolute; top: 16px; right: 16px; opacity: .18; color: var(--navy); }
.adm-stat__ico .ico-svg { width: 30px; height: 30px; }
.adm-stat--accent .adm-stat__ico { color: var(--accent); opacity: .55; }

/* ===== Liste araçları: arama + durum filtresi ===== */
.adm-listtools { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.adm-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; flex: 1 1 240px; min-width: 200px; }
.adm-search .ico-svg { width: 17px; height: 17px; color: var(--muted); flex-shrink: 0; }
.adm-search input { border: 0; outline: 0; background: transparent; width: 100%; font: inherit; color: var(--navy); }
.adm-fchips { display: flex; gap: 6px; }
.adm-chip { border: 1px solid var(--line); background: #fff; color: var(--navy); padding: 6px 13px; border-radius: 999px; font-size: .82rem; font-weight: 600; cursor: pointer; }
.adm-chip:hover { border-color: var(--navy); }
.adm-chip.is-active { background: var(--accent); border-color: var(--accent); color: #1a1a1a; }
.adm-listcount { margin-left: auto; color: var(--muted); font-size: .85rem; }
.adm-listcount span { color: var(--navy); font-weight: 700; }
.adm-list-empty { padding: 22px; text-align: center; }

/* ===== Toplu işlem çubuğu ===== */
.adm-bulkbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: var(--navy); color: #fff; border-radius: 10px; padding: 10px 16px; margin-bottom: 12px; }
.adm-bulkbar__count { font-size: .9rem; }
.adm-bulkbar__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-bulkbar .adm-btn { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
.adm-bulkbar .adm-btn:hover { background: rgba(255,255,255,.22); }
.adm-bulkbar .adm-btn--danger { background: #ef4444; }
.adm-bulkbar .adm-btn--danger:hover { background: #dc2626; }

/* ===== Seçim + sürükle sütunları ===== */
.adm-th-check, .adm-td-check { width: 36px; text-align: center; }
.adm-th-check input, .adm-td-check input { width: 16px; height: 16px; accent-color: var(--accent-600, #a7bd00); cursor: pointer; }
.adm-th-drag, .adm-td-drag { width: 30px; text-align: center; }
.adm-drag { color: #c2c8d0; cursor: grab; font-size: 1.1rem; line-height: 1; user-select: none; }
table[data-sortable] tr[data-row] { cursor: default; }
table[data-sortable]:not(.is-filtered) tr[data-row] .adm-drag:hover { color: var(--navy); }
table[data-sortable].is-filtered .adm-drag { opacity: .35; cursor: not-allowed; }
tr.is-dragging { opacity: .5; background: var(--navy-50, #f3f6e3); }
table.reorder-saved { outline: 2px solid var(--accent); outline-offset: -2px; transition: outline-color .4s; }

/* ===== Dashboard 14 gün talep grafiği (saf CSS, JS-siz) ===== */
.adm-chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 18px; }
.adm-chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.adm-chart__track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.adm-chart__bar { width: 70%; max-width: 32px; background: var(--accent); border-radius: 5px 5px 0 0; position: relative; min-height: 3px; transition: background .2s; }
.adm-chart__bar.is-zero { background: var(--line); }
.adm-chart__bar:hover { background: var(--accent-600, #a7bd00); }
.adm-chart__val { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-size: .72rem; font-weight: 800; color: var(--navy); }
.adm-chart__lbl { font-size: .67rem; color: var(--muted); white-space: nowrap; }

/* [hidden] düzeltmesi: display:flex, UA hidden'ı ezdiği için */
.adm-bulkbar[hidden] { display: none; }

/* ===== SEO İçerik Asistanı ===== */
.adm-seo .adm-card__head { align-items: center; }
.adm-seo__score { display: inline-flex; align-items: baseline; gap: 2px; padding: 6px 14px; border-radius: 999px; font-weight: 900; font-size: 1.25rem; background: var(--line); color: var(--navy); }
.adm-seo__score small { font-size: .7rem; font-weight: 700; opacity: .7; }
.adm-seo__score.is-good { background: #dcfce7; color: #15803d; }
.adm-seo__score.is-ok { background: #fef9c3; color: #a16207; }
.adm-seo__score.is-bad { background: #fee2e2; color: #b91c1c; }
.adm-seo__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 8px; }
.adm-seo__checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.adm-seo__checks li { display: flex; gap: 8px; align-items: flex-start; font-size: .86rem; color: var(--navy); }
.adm-seo__checks li span { font-weight: 900; flex-shrink: 0; width: 16px; text-align: center; }
.adm-seo__checks li.ok span { color: #16a34a; }
.adm-seo__checks li.no span { color: #dc2626; }
.adm-seo__checks li.no { color: var(--muted); }
.adm-seo__serp-label { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.serp { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: #fff; }
.serp__title { color: #1a0dab; font-size: 1.05rem; line-height: 1.3; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp__url { color: #006621; font-size: .8rem; margin-bottom: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp__desc { color: #4d5156; font-size: .84rem; line-height: 1.5; }
@media (max-width: 720px) { .adm-seo__cols { grid-template-columns: 1fr; } }

/* ===== AI taslak üret satırı ===== */
.adm-ai-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; padding: 12px 14px; background: var(--navy-50, #f3f6e3); border-radius: 10px; }
.adm-ai-row .adm-hint { margin: 0; flex: 1; min-width: 220px; }
