/* Admin Panel — Taş Devri */
:root {
    --ink: #1a1614;
    --ink-soft: #2c2520;
    --ink-line: #3a312b;
    --bg: #f5f2ed;
    --surface: #ffffff;
    --surface-2: #faf8f4;
    --line: #e6e1d8;
    --accent: #b8743b;
    --accent-soft: #d89d6c;
    --text: #2c2520;
    --text-soft: #6b605a;
    --success: #2d7a4a;
    --error: #b94a4a;
    --warning: #c98a3b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif; font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-soft); }
img { max-width: 100%; }

/* ===== LOGIN ===== */
.login-body { background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-wrap { width: 100%; max-width: 420px; padding: 20px; }
.login-card { background: var(--surface); border-radius: 12px; padding: 40px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-brand { text-align: center; margin-bottom: 32px; }
.brand-mark { display: inline-flex; width: 56px; height: 56px; background: var(--accent); color: white; border-radius: 50%; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; letter-spacing: 1px; margin-bottom: 12px; }
.login-brand h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 28px; color: var(--ink); }
.login-brand p { color: var(--text-soft); font-size: 13px; }
.login-card .field { margin-bottom: 16px; }
.login-card label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--text-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.login-card input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; background: var(--surface-2); }
.login-card input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.btn-login { width: 100%; padding: 14px; background: var(--ink); color: white; border: none; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 14px; letter-spacing: 0.5px; text-transform: uppercase; transition: background 0.2s; }
.btn-login:hover { background: var(--accent); }
.login-footer { text-align: center; margin-top: 24px; font-size: 12px; color: var(--text-soft); }

/* ===== ADMIN LAYOUT ===== */
.admin-body { display: flex; min-height: 100vh; }
.admin-sidebar { width: 240px; background: var(--ink); color: #c8bfb6; flex-shrink: 0; padding: 0; }
.sidebar-brand { padding: 22px 20px; border-bottom: 1px solid var(--ink-line); display: flex; align-items: center; gap: 12px; }
.sidebar-brand .brand-mark { width: 36px; height: 36px; font-size: 13px; }
.sidebar-brand strong { display: block; color: white; font-size: 15px; font-family: 'Cormorant Garamond', Georgia, serif; }
.sidebar-brand small { color: #8a7e74; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.sidebar-nav { padding: 12px 0; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: #c8bfb6; font-size: 13px; transition: background 0.2s; border-left: 2px solid transparent; }
.sidebar-nav a:hover { background: var(--ink-soft); color: white; }
.sidebar-nav a.active { background: var(--ink-soft); color: var(--accent-soft); border-left-color: var(--accent); }
.sidebar-nav .ico { width: 18px; text-align: center; opacity: 0.7; }
.nav-group { padding: 16px 20px 6px; font-size: 10px; font-weight: 700; color: #6b605a; letter-spacing: 1.5px; }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: 18px 32px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; }
.admin-topbar h1 { font-size: 20px; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; color: var(--ink); }
.admin-user { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.admin-content { padding: 28px 32px; }

/* ===== STATS ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--surface); padding: 22px; border-radius: 10px; border: 1px solid var(--line); display: block; transition: transform 0.2s, box-shadow 0.2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.06); }
.stat-card.highlight { border-left: 3px solid var(--accent); }
.stat-label { display: block; font-size: 11px; color: var(--text-soft); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.stat-value { display: block; font-size: 32px; font-family: 'Cormorant Garamond', Georgia, serif; color: var(--ink); margin-top: 6px; font-weight: 600; }

/* ===== PANELS ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-head h2 { font-size: 15px; font-weight: 600; color: var(--ink); }
.link { font-size: 12px; color: var(--accent); }

/* ===== TABLES ===== */
.data-table { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; border-collapse: collapse; }
.data-table th { text-align: left; padding: 14px 16px; background: var(--surface-2); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-soft); font-weight: 600; border-bottom: 1px solid var(--line); }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover { background: var(--surface-2); }
.data-table tr.unread { background: rgba(184, 116, 59, 0.04); font-weight: 600; }
.data-table .empty { text-align: center; padding: 40px; color: var(--text-soft); }
.data-table .actions { white-space: nowrap; text-align: right; }
.row-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.row-thumb-wide { width: 120px; height: 60px; object-fit: cover; border-radius: 4px; }

/* ===== BUTTONS ===== */
.btn-primary, .btn-ghost, .btn-danger { display: inline-block; padding: 9px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; text-decoration: none; }
.btn-primary { background: var(--ink); color: white; }
.btn-primary:hover { background: var(--accent); color: white; }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--line); }
.btn-danger { background: transparent; color: var(--error); border: 1px solid var(--line); }
.btn-danger:hover { background: var(--error); color: white; border-color: var(--error); }

/* ===== BADGES ===== */
.badge { display: inline-block; padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.badge-on { background: rgba(45, 122, 74, 0.12); color: var(--success); }
.badge-off { background: rgba(107, 96, 90, 0.12); color: var(--text-soft); }
.badge-feat { background: rgba(184, 116, 59, 0.12); color: var(--accent); }
.badge-draft, .badge-submitted { background: rgba(201, 138, 59, 0.12); color: var(--warning); }
.badge-reviewed { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.badge-quoted { background: rgba(45, 122, 74, 0.12); color: var(--success); }
.badge-closed { background: rgba(107, 96, 90, 0.12); color: var(--text-soft); }
.badge-contact, .badge-quote, .badge-portal, .badge-career { background: rgba(184, 116, 59, 0.1); color: var(--accent); }

/* ===== FORMS ===== */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px; margin-bottom: 24px; }
.form-card h2 { font-size: 16px; margin: 24px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--ink); }
.form-card h2:first-child { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=number], .field input[type=password], .field input[type=search], .field select, .field textarea {
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; background: var(--surface-2); font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.field textarea { resize: vertical; font-family: 'SF Mono', Consolas, monospace; font-size: 12px; line-height: 1.5; }
.field .check { display: flex; align-items: center; gap: 8px; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); margin-bottom: 4px; }
.field .help { font-size: 11px; color: var(--text-soft); margin-top: 4px; }
.thumb { display: block; max-width: 200px; max-height: 140px; border-radius: 6px; margin-bottom: 10px; border: 1px solid var(--line); }
.thumb-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb-item { position: relative; }
.thumb-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.thumb-item a { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; background: rgba(185, 74, 74, 0.9); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.page-actions { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.inline-filter { margin-left: auto; }
.inline-filter select { padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 13px; }
.filter-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.filter-tabs a { padding: 10px 16px; color: var(--text-soft); font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; }
.filter-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ===== ALERTS ===== */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; }
.alert-success { background: rgba(45, 122, 74, 0.08); color: var(--success); border-left: 3px solid var(--success); }
.alert-error { background: rgba(185, 74, 74, 0.08); color: var(--error); border-left: 3px solid var(--error); }

/* ===== MESSAGE VIEW ===== */
.message-view { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.msg-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.msg-header h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; color: var(--ink); }
.msg-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 16px; background: var(--surface-2); border-radius: 6px; margin-bottom: 20px; font-size: 13px; }
.msg-meta strong { color: var(--ink); }
.msg-body { font-size: 14px; line-height: 1.7; padding: 16px; background: var(--surface-2); border-radius: 6px; min-height: 100px; }
.kv-list > div { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.kv-list > div:last-child { border-bottom: none; }
.kv-list span { color: var(--text-soft); }
.design-preview { width: 100%; border-radius: 8px; margin-bottom: 16px; }
.design-products .dp-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-bottom: 1px solid var(--line); }
.design-products .dp-row:last-child { border-bottom: none; }

@media (max-width: 768px) {
    .admin-sidebar { width: 60px; }
    .sidebar-brand strong, .sidebar-brand small, .sidebar-nav a span:not(.ico), .nav-group { display: none; }
    .admin-content { padding: 16px; }
    .form-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   v2 — i18n Tabs / AI Stats / Thumb Grid
   ============================================================================ */

/* Language Field Tabs */
.lang-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fafaf8;
  margin-bottom: 18px;
}
.lang-field > label {
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}
.lang-field .req { color: #c33; }

.lang-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.lang-tab {
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 14px;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  transition: all 0.15s;
  font-family: inherit;
}
.lang-tab:hover { background: #fff; color: var(--ink); }
.lang-tab.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.lang-pane {
  display: none;
}
.lang-pane.active {
  display: block;
}
.lang-pane[dir="rtl"] textarea,
.lang-pane[dir="rtl"] input {
  direction: rtl;
  text-align: right;
  font-family: 'Cairo', 'Amiri', sans-serif;
}

.hint {
  display: block;
  margin-top: 4px;
  color: #888;
  font-size: 12px;
}
.req { color: #c33; }

/* AI Stats */
.ai-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.ai-stat {
  background: linear-gradient(135deg, #faf8f3 0%, #fff 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}
.ai-num {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1.2;
}
.ai-label {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ai-bar {
  margin-top: 10px;
  height: 6px;
  background: #ece8e0;
  border-radius: 100px;
  overflow: hidden;
}
.ai-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #b08a4f 0%, #d4a861 100%);
  transition: width 0.5s;
}

/* Thumb Grid (gallery edit) */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.thumb-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.thumb-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}
.thumb-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: #d44;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-decoration: none;
  font-weight: bold;
}

/* Status Badges */
.badge-draft { background: #eee; color: #666; }
.badge-submitted { background: #fff3cd; color: #856404; }
.badge-reviewed { background: #d1ecf1; color: #0c5460; }
.badge-quoted { background: #d4edda; color: #155724; }
.badge-closed { background: #f8d7da; color: #721c24; }

