/* ============================================================
   Katalog Sistemi — Ana CSS v1.2
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary:   #1a3c6e;
  --primary-l: #2357a8;
  --accent:    #c8a84b;
  --accent-l:  #e2c069;
  --bg:        #f0f2f5;
  --card-bg:   #ffffff;
  --border:    #e2e8f0;
  --text:      #1e293b;
  --text-2:    #64748b;
  --text-3:    #94a3b8;
  --radius:    10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 4px 12px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.08);
  --header-h:  58px;
  --font:      'Inter', 'Segoe UI', system-ui, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
  height: var(--header-h);
  background: var(--primary);
  display: flex; align-items: center;
  padding: 0 24px; gap: 0;
  position: fixed; top:0; left:0; right:0; z-index:1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.navbar-brand {
  font-size: 17px; font-weight: 800; color: var(--accent);
  text-decoration: none; letter-spacing: -.3px; margin-right: 8px;
}
.navbar-nav { display:flex; gap:2px; list-style:none; }
.navbar-nav a {
  color: rgba(255,255,255,.75); text-decoration:none;
  padding: 7px 14px; border-radius: 6px; font-size: 13.5px; font-weight:500;
  transition: all .15s;
}
.navbar-nav a:hover { background: rgba(255,255,255,.12); color:#fff; }
.navbar-nav a.active { background: rgba(255,255,255,.18); color:#fff; font-weight:600; }

/* ── Layout ─────────────────────────────────────────────────── */
.page-wrap { padding-top: var(--header-h); min-height: 100vh; }
.container  { max-width: 1440px; margin: 0 auto; padding: 28px 24px; }

/* ── Kartlar ─────────────────────────────────────────────────── */
.card {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 22px; margin-bottom: 20px;
  border: 1px solid var(--border);
}
.card-title {
  font-size: 15px; font-weight: 700; color: var(--primary);
  margin-bottom: 18px; padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: space-between;
}

/* ── Stat kartları ───────────────────────────────────────────── */
.stats-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(170px,1fr)); gap:14px; margin-bottom:24px; }
.stat-card {
  background: var(--card-bg); border-radius: var(--radius); padding:22px 20px;
  text-align:center; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border); border-top: 3px solid var(--accent);
  transition: transform .15s, box-shadow .15s;
}
.stat-card:hover { transform:translateY(-2px); box-shadow:var(--shadow); }
.stat-card .num { font-size: 34px; font-weight: 800; color: var(--primary); line-height:1; }
.stat-card .lbl { font-size: 12px; color: var(--text-2); margin-top: 6px; font-weight:500; }

/* ── Butonlar ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: 7px; border: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600; transition: all .15s;
  text-decoration: none; line-height: 1; font-family: var(--font);
  white-space: nowrap;
}
.btn-primary  { background: var(--primary); color:#fff; }
.btn-primary:hover { background: var(--primary-l); box-shadow: 0 2px 8px rgba(26,60,110,.3); }
.btn-accent   { background: var(--accent); color:#fff; }
.btn-accent:hover { background: #b89035; box-shadow: 0 2px 8px rgba(200,168,75,.3); }
.btn-success  { background: #16a34a; color:#fff; }
.btn-success:hover { background: #15803d; }
.btn-danger   { background: #dc2626; color:#fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline  { background:transparent; border:1.5px solid var(--primary); color:var(--primary); }
.btn-outline:hover { background:var(--primary); color:#fff; }
.btn-sm       { padding: 5px 12px; font-size: 12.5px; border-radius: 5px; }
.btn-xs       { padding: 3px 9px; font-size: 11.5px; border-radius: 4px; }
.btn:disabled { opacity:.5; cursor:not-allowed; pointer-events:none; }

/* ── Form ────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display:block; font-size:13px; font-weight:600; margin-bottom:6px; color:var(--text-2); }
.form-control {
  width:100%; padding: 9px 13px; border: 1.5px solid var(--border);
  border-radius: 7px; font-size: 14px; outline:none; color:var(--text);
  background: #fff; transition: border-color .15s, box-shadow .15s;
  font-family: var(--font);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,60,110,.1); }
select.form-control { cursor:pointer; }

/* ── Tablo ───────────────────────────────────────────────────── */
.table-wrap { overflow-x:auto; border-radius:8px; border: 1px solid var(--border); }
table { width:100%; border-collapse:collapse; font-size:13.5px; }
thead { background: var(--primary); }
th { color:#fff; padding: 12px 14px; text-align:left; font-weight:600; font-size:13px; white-space:nowrap; }
th:first-child { border-radius:8px 0 0 0; }
th:last-child  { border-radius:0 8px 0 0; }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align:middle; color:var(--text); }
tr:last-child td { border-bottom:none; }
tbody tr:hover td { background: #f8faff; }

.badge { display:inline-block; padding:3px 9px; border-radius:20px; font-size:11.5px; font-weight:700; }
.badge-ok { background:#dcfce7; color:#166534; }
.badge-no { background:#fee2e2; color:#991b1b; }
.badge-info { background:#dbeafe; color:#1e40af; }

/* ── Upload alanı ────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border); border-radius: 10px; padding: 44px;
  text-align:center; cursor:pointer; transition:all .2s; background:#fafbfc;
}
.upload-zone:hover, .upload-zone.drag-over { border-color:var(--primary); background:#eff6ff; }
.upload-zone .icon { font-size: 44px; margin-bottom: 12px; }
.upload-zone input[type=file] { display:none; }

/* ── Progress ────────────────────────────────────────────────── */
.progress { height:8px; background:#e2e8f0; border-radius:99px; overflow:hidden; margin:8px 0; }
.progress-bar { height:100%; background:linear-gradient(90deg, var(--accent), var(--accent-l)); transition:width .3s; border-radius:99px; }
.progress-text { font-size:12.5px; color:var(--text-2); margin-top:4px; }

/* ── Alert ───────────────────────────────────────────────────── */
.alert { padding:13px 16px; border-radius:8px; margin-bottom:16px; font-size:13.5px; border-left:4px solid; }
.alert-success { background:#f0fdf4; color:#15803d; border-color:#16a34a; }
.alert-error   { background:#fef2f2; color:#b91c1c; border-color:#dc2626; }
.alert-info    { background:#eff6ff; color:#1d4ed8; border-color:#3b82f6; }
.alert-warning { background:#fffbeb; color:#b45309; border-color:#d97706; }

/* ── Sayfalama ───────────────────────────────────────────────── */
.pagination { display:flex; gap:4px; align-items:center; margin-top:18px; flex-wrap:wrap; }
.pagination a, .pagination span {
  padding: 7px 13px; border-radius:6px; border:1.5px solid var(--border);
  color:var(--primary); text-decoration:none; font-size:13px; font-weight:500;
  cursor:pointer; transition:all .15s;
}
.pagination a:hover { background:var(--primary); color:#fff; border-color:var(--primary); }
.pagination .active { background:var(--primary); color:#fff; border-color:var(--primary); }
.pagination .disabled { color:var(--text-3); cursor:default; }

/* ── Ürün Kartları (products.php grid) ───────────────────────── */
.product-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px,1fr)); gap:18px; }

.product-card {
  background:var(--card-bg); border-radius: 10px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  overflow:hidden; cursor:pointer;
  transition: transform .2s, box-shadow .2s;
  display:flex; flex-direction:column;
}
.product-card:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.product-card .img-wrap {
  height: 160px; background: #f8fafc;
  display:flex; align-items:center; justify-content:center;
  overflow:hidden; border-bottom: 1px solid var(--border);
  position:relative;
}
.product-card .img-wrap img {
  max-width:90%; max-height:90%; object-fit:contain;
  transition: transform .25s;
}
.product-card:hover .img-wrap img { transform: scale(1.05); }
.product-card .img-placeholder { color:#cbd5e1; font-size: 44px; }
.product-card .info { padding: 14px; flex:1; display:flex; flex-direction:column; gap:4px; }
.product-card .code {
  font-size: 11.5px; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: .4px;
}
.product-card .name {
  font-size: 13px; color: var(--text); font-weight:500;
  display: -webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; line-height:1.4;
}
.product-card .group-tag {
  margin-top:auto; padding-top:8px;
  font-size: 11px; color: var(--text-3); font-weight:500;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.product-card .has-img-dot {
  position:absolute; bottom:6px; right:6px;
  width:8px; height:8px; border-radius:50%; background:#16a34a;
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay { display:none; position:fixed; inset:0; background:rgba(15,23,42,.5); z-index:2000; align-items:center; justify-content:center; backdrop-filter:blur(2px); }
.modal-overlay.open { display:flex; }
.modal { background:#fff; border-radius:14px; max-width:600px; width:90%; max-height:90vh; overflow-y:auto; box-shadow:0 20px 60px rgba(0,0,0,.25); }
.modal-header { padding:18px 22px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; }
.modal-title  { font-size:16px; font-weight:700; color:var(--primary); }
.modal-close  { background:none; border:none; font-size:22px; cursor:pointer; color:var(--text-3); line-height:1; border-radius:50%; width:32px; height:32px; display:flex; align-items:center; justify-content:center; transition:background .15s; }
.modal-close:hover { background:#f1f5f9; color:var(--text); }
.modal-body   { padding: 22px; }
.modal-footer { padding:14px 22px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:8px; }

/* ── Yardımcı ────────────────────────────────────────────────── */
.flex { display:flex; } .gap-8 { gap:8px; } .gap-12 { gap:12px; }
.justify-between { justify-content:space-between; } .align-center { align-items:center; }
.mt-8 { margin-top:8px; } .mt-16 { margin-top:16px; } .mt-24 { margin-top:24px; }
.text-muted { color:var(--text-2); } .text-center { text-align:center; }
.fw-bold { font-weight:700; } .fw-800 { font-weight:800; }
.text-small { font-size:12.5px; } .text-xs { font-size:11.5px; }
.hidden { display:none !important; }
