/* ═══════════════════════════════════════════
   TemasGo Platform Admin — Stylesheet
   Koyu indigo tema — işletme panelinden ayırt etmek için
   ═══════════════════════════════════════════ */

:root {
  --sidebar-w: 260px;
  --topbar-h: 64px;

  --bg-sidebar: #0f172a;
  --bg-sidebar-hover: rgba(99, 102, 241, 0.1);
  --bg-sidebar-active: rgba(99, 102, 241, 0.15);
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --bg-input: #f8fafc;

  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-primary-light: #a5b4fc;
  --color-text: #1e293b;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-text-sidebar: #cbd5e1;
  --color-text-sidebar-muted: #64748b;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;

  --color-success: #22c55e;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
  background: var(--bg-body);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--color-primary-dark); text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */
#app { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
#sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  color: var(--color-text-sidebar);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.3s ease;
}
#sidebar::-webkit-scrollbar { width: 4px; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.2); border-radius: 4px; }

.sidebar-brand {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(99,102,241,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-brand-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary);
}
.sidebar-brand-text h3 {
  font-size: 15px; font-weight: 700;
  color: #f1f5f9; line-height: 1.2;
}
.sidebar-brand-text small {
  font-size: 11px;
  color: var(--color-text-sidebar-muted);
}

.sidebar-nav { flex: 1; padding: 12px 0; }
.sidebar-section { padding: 0 16px; margin-bottom: 4px; }
.sidebar-section-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-text-sidebar-muted);
  padding: 12px 8px 6px;
  font-weight: 600;
}

.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-sidebar);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.sidebar-link:hover {
  background: var(--bg-sidebar-hover);
  color: #f1f5f9;
}
.sidebar-link.active {
  background: var(--bg-sidebar-active);
  color: var(--color-primary-light);
}
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(99,102,241,0.1);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(99,102,241,0.15);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary-light);
  font-size: 14px; font-weight: 700;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 13px; font-weight: 600; color: #f1f5f9;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role { font-size: 11px; color: var(--color-text-sidebar-muted); }
.sidebar-logout {
  background: none; border: none;
  color: var(--color-text-sidebar-muted);
  cursor: pointer; padding: 6px;
  border-radius: 6px; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.sidebar-logout:hover { color: var(--color-danger); background: rgba(239,68,68,0.1); }

/* ── Main Content ── */
#main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Topbar ── */
#topbar {
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--color-border);
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-title h1 { font-size: 18px; font-weight: 700; color: var(--color-text); }
.topbar-title p { font-size: 12px; color: var(--color-text-secondary); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.btn-menu-toggle {
  display: none;
  background: none; border: none;
  color: var(--color-text); cursor: pointer;
  padding: 8px; border-radius: var(--radius-sm);
}
.btn-menu-toggle:hover { background: var(--bg-input); }

/* ── Page Content ── */
#page-content { flex: 1; padding: 24px 28px; }

/* ═══════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--color-border-light);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.card-header h2 { font-size: 15px; font-weight: 700; }
.card-body { padding: 20px; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--color-border-light);
  display: flex; align-items: center; justify-content: space-between;
}

/* ═══════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex; align-items: flex-start; gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-info { flex: 1; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--color-text); line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
.stat-sub { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border: none; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1.4;
}
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-secondary { background: var(--bg-input); color: var(--color-text); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: var(--color-border-light); border-color: var(--color-text-muted); }
.btn-success { background: var(--color-success); color: white; }
.btn-success:hover { background: #16a34a; }
.btn-danger { background: var(--color-danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--color-warning); color: white; }
.btn-warning:hover { background: #d97706; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon {
  background: none; border: none;
  color: var(--color-text-secondary); cursor: pointer;
  padding: 6px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.btn-icon:hover { background: var(--bg-input); color: var(--color-text); }

.btn-group { display: flex; gap: 6px; }

/* ═══════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--color-text-secondary); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--color-text);
  font-size: 14px;
  transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
}
.form-textarea { min-height: 80px; resize: vertical; }
.form-help { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ═══════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary);
  background: var(--bg-input);
  border-bottom: 1px solid var(--color-border);
}
tbody td {
  padding: 14px 16px;
  font-size: 13px;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
}
tbody tr:hover { background: rgba(99,102,241,0.02); }
tbody tr:last-child td { border-bottom: none; }

/* ═══════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.3px;
}
.badge-success { background: rgba(34,197,94,0.1); color: #16a34a; }
.badge-warning { background: rgba(245,158,11,0.1); color: #d97706; }
.badge-danger { background: rgba(239,68,68,0.1); color: #dc2626; }
.badge-info { background: rgba(59,130,246,0.1); color: #2563eb; }
.badge-primary { background: rgba(99,102,241,0.1); color: #4f46e5; }
.badge-muted { background: rgba(148,163,184,0.15); color: #64748b; }

/* ═══════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════ */
#modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center; justify-content: center;
}
#modal-overlay.active { display: flex; }
#modal-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 90%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  transform: scale(0.95); opacity: 0;
  transition: all 0.2s ease;
}
#modal-container.active { transform: scale(1); opacity: 1; }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border-light);
  display: flex; gap: 8px; justify-content: flex-end;
}

/* ═══════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════ */
#toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 2000;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  font-size: 13px; font-weight: 500;
  min-width: 280px;
  animation: slideIn 0.3s ease;
}
.toast.success { border-left: 3px solid var(--color-success); }
.toast.success svg { color: var(--color-success); }
.toast.error { border-left: 3px solid var(--color-danger); }
.toast.error svg { color: var(--color-danger); }
.toast.warning { border-left: 3px solid var(--color-warning); }
.toast.warning svg { color: var(--color-warning); }
.toast.info { border-left: 3px solid var(--color-info); }
.toast.info svg { color: var(--color-info); }

@keyframes slideIn {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ═══════════════════════════════════════════
   SKELETON / LOADING
   ═══════════════════════════════════════════ */
.skeleton-row { display: flex; gap: 12px; padding: 14px 0; }
.skeleton-cell {
  height: 14px; border-radius: 6px;
  background: linear-gradient(90deg, var(--color-border-light) 25%, var(--color-border) 50%, var(--color-border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; }
.skeleton-card { height: 120px; border-radius: var(--radius-md); background: linear-gradient(90deg, var(--color-border-light) 25%, var(--color-border) 50%, var(--color-border-light) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.skeleton-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 16px; }
.skeleton-stat { height: 80px; border-radius: var(--radius-md); background: linear-gradient(90deg, var(--color-border-light) 25%, var(--color-border) 50%, var(--color-border-light) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }

@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--color-text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

.inline-error {
  display: flex; align-items: center; gap: 10px;
  padding: 16px; background: rgba(239,68,68,0.05);
  border-radius: var(--radius-sm); color: var(--color-danger);
}
.inline-error-icon { font-size: 18px; }

/* ═══════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════ */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
  padding: 20px;
}
.login-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: rgba(99,102,241,0.1);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-primary);
  margin-bottom: 16px;
}
.login-logo h1 {
  font-size: 22px; font-weight: 800;
  color: var(--color-text);
}
.login-logo p {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}
.login-error {
  display: none;
  padding: 10px 14px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-sm);
  color: var(--color-danger);
  font-size: 13px;
  margin-bottom: 16px;
}
.login-error.show { display: block; }

/* ═══════════════════════════════════════════
   TOOLBAR
   ═══════════════════════════════════════════ */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px; }
.toolbar-right { display: flex; align-items: center; gap: 8px; }

.search-box {
  position: relative; flex: 1; max-width: 360px;
}
.search-box input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 13px;
}
.search-box input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.search-box svg {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 13px;
  color: var(--color-text);
}

/* ═══════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════ */
.pagination {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--color-text-secondary);
}
.pagination-info { margin-right: auto; }
.pagination button {
  padding: 6px 12px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); background: var(--bg-card);
  cursor: pointer; font-size: 12px;
  transition: all 0.2s;
}
.pagination button:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  #sidebar { transform: translateX(-100%); }
  #sidebar.open { transform: translateX(0); }
  #main-content { margin-left: 0; }
  .btn-menu-toggle { display: flex; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .search-box { max-width: 100%; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  #page-content { padding: 16px; }
}

/* ═══════════════════════════════════════════
   PLAN CARDS (Paketler sayfası)
   ═══════════════════════════════════════════ */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.plan-card {
  position: relative;
  background: var(--bg-card, #fff);
  border: 2px solid var(--color-border-light);
  border-radius: 16px;
  padding: 22px 22px 20px;
  display: flex; flex-direction: column;
  transition: all .2s;
}
.plan-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.plan-card.featured { border-color: var(--color-primary); box-shadow: 0 4px 18px rgba(99,102,241,0.12); }
.plan-card.featured::before {
  content: 'ÖNERİLEN';
  position: absolute; top: -10px; right: 18px;
  background: var(--color-primary); color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: 0.5px;
  padding: 4px 12px; border-radius: 100px;
}
.plan-card.inactive { opacity: 0.55; }
.plan-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 6px;
}
.plan-card-name { font-size: 18px; font-weight: 800; color: var(--color-text); }
.plan-card-desc { font-size: 12px; color: var(--color-text-muted); margin-bottom: 16px; line-height: 1.45; }
.plan-card-price { font-size: 28px; font-weight: 800; color: var(--color-text); margin-bottom: 2px; }
.plan-card-price small { font-size: 13px; font-weight: 500; color: var(--color-text-muted); }
.plan-card-price-yearly { font-size: 11px; color: var(--color-text-muted); margin-bottom: 16px; }
.plan-card-price-yearly strong { color: var(--color-success, #16a34a); }
.plan-card-limits {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  background: rgba(148,163,184,0.06); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 14px;
}
.plan-limit { font-size: 11px; }
.plan-limit-val { font-weight: 700; font-size: 14px; color: var(--color-text); }
.plan-limit-label { color: var(--color-text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px; }
.plan-card-features {
  list-style: none; padding: 0; margin: 0 0 16px;
  font-size: 12px;
}
.plan-card-features li {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 5px 0;
  color: var(--color-text-secondary);
}
.plan-card-features li.included { color: var(--color-text); }
.plan-card-features li.excluded { color: var(--color-text-muted); text-decoration: line-through; opacity: 0.65; }
.plan-card-features .feat-ic { flex-shrink: 0; margin-top: 1px; }
.plan-card-foot {
  margin-top: auto;
  display: flex; gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}
.plan-card-usage {
  font-size: 11px; color: var(--color-text-muted);
  display: flex; align-items: center; gap: 6px;
}
.plan-card-usage strong { color: var(--color-primary); font-size: 13px; }

/* ═══════════════════════════════════════════
   CONTRACTS (Sözleşmeler)
   ═══════════════════════════════════════════ */
.contract-doc {
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 13px;
  line-height: 1.7;
  color: #1a1a1a;
  background: #fff;
  padding: 40px 50px;
  max-width: 820px;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.contract-doc h1 {
  font-size: 22px; font-weight: 700;
  margin: 0 0 24px;
  border-bottom: 2px solid #1a1a1a;
  padding-bottom: 12px;
}
.contract-doc h2 {
  font-size: 14px; font-weight: 700;
  margin: 24px 0 10px;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.contract-doc p { margin: 8px 0; }
.contract-doc ul { margin: 8px 0 8px 20px; padding-left: 0; }
.contract-doc li { margin: 4px 0; }
.contract-doc table { border-collapse: collapse; }

/* Şablon editöründe placeholder işaretleyici */
.tpl-var {
  display: inline-block;
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
  padding: 1px 6px;
  margin: 0 2px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  font-weight: 600;
  user-select: all;
  cursor: pointer;
}
.tpl-var:hover {
  background: rgba(245, 158, 11, 0.32);
}

/* Contenteditable belge — direkt düzenleme */
.contract-editable {
  outline: none;
  cursor: text;
  transition: box-shadow 0.15s;
  position: relative;
}
.contract-editable:hover {
  box-shadow: 0 0 0 2px rgba(99,102,241,0.15), 0 2px 12px rgba(0,0,0,0.06);
}
.contract-editable:focus {
  box-shadow: 0 0 0 2px var(--color-primary), 0 4px 16px rgba(99,102,241,0.15);
}
.contract-editable [contenteditable="false"] {
  user-select: none;
}

/* Variable highlighter (editörde) */
.contract-editor-preview .var-placeholder {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-family: monospace;
  font-size: 12px;
}

/* Variables panel */
.var-panel {
  background: rgba(99,102,241,0.04);
  border: 1px solid rgba(99,102,241,0.15);
  border-radius: 12px;
  padding: 14px 16px;
}
.var-panel-title {
  font-size: 13px; font-weight: 700;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
  color: var(--color-primary);
}
.var-row {
  display: grid;
  grid-template-columns: 140px 1fr 28px;
  gap: 8px;
  margin-bottom: 6px;
  align-items: center;
}
.var-row label {
  font-size: 11px; font-weight: 600;
  color: var(--color-text-secondary);
}
.var-row input {
  font-size: 12px; padding: 5px 8px;
  border: 1px solid var(--color-border-light); border-radius: 6px;
}
.var-row .var-auto-badge {
  font-size: 9px; padding: 2px 5px;
  background: rgba(99,102,241,0.12); color: var(--color-primary);
  border-radius: 4px; text-transform: uppercase;
  letter-spacing: 0.4px; font-weight: 700;
}

/* Editör layout */
.contract-edit-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  height: calc(100vh - 180px);
}
.contract-edit-panel {
  overflow-y: auto;
  padding-right: 8px;
}
.contract-edit-preview-wrap {
  overflow-y: auto;
  background: #f5f5f5;
  border-radius: 12px;
  padding: 20px;
}
@media (max-width: 900px) {
  .contract-edit-layout { grid-template-columns: 1fr; height: auto; }
}

/* Print */
@media print {
  body * { visibility: hidden; }
  .contract-print, .contract-print * { visibility: visible; }
  .contract-print { position: absolute; left: 0; top: 0; width: 100%; }
  .contract-doc { box-shadow: none; padding: 20mm; }
}

/* Status badges already in main */
.contract-status-draft     { background: rgba(148,163,184,0.15); color: #64748b; }
.contract-status-sent      { background: rgba(59,130,246,0.12); color: #2563eb; }
.contract-status-signed    { background: rgba(34,197,94,0.12); color: #16a34a; }
.contract-status-cancelled { background: rgba(239,68,68,0.12); color: #dc2626; }
.contract-status-expired   { background: rgba(245,158,11,0.12); color: #d97706; }

/* Feature editör tablosu */
.feature-row {
  display: grid; grid-template-columns: 1fr 1fr 80px 40px;
  gap: 8px; align-items: center; padding: 6px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.feature-row:last-child { border-bottom: none; }
.feature-row input[type=text] {
  font-size: 12px; padding: 6px 10px;
  border: 1px solid var(--color-border-light); border-radius: 8px;
}
.feature-row select {
  font-size: 12px; padding: 6px 10px;
  border: 1px solid var(--color-border-light); border-radius: 8px;
}
