/* =========================================================
   Bursa Elektronik Hurda — Yönetim paneli teması
   ========================================================= */

:root {
  --bg: #0b1114;
  --bg-2: #0e161a;
  --surface: #121c21;
  --surface-2: #17242b;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.17);
  --text: #e9f2ef;
  --muted: #94a8a2;
  --brand: #2fe08a;
  --brand-2: #16c76f;
  --brand-dim: rgba(47, 224, 138, 0.14);
  --danger: #ff6b6b;
  --amber: #ffce5c;
  --radius: 14px;
  --font: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
.muted { color: var(--muted); }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .85em; color: var(--amber); }

.ico {
  width: 1.1em; height: 1.1em;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
  flex: 0 0 auto;
}

/* ---------------- Butonlar ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  transition: .18s;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn--primary {
  background: linear-gradient(150deg, var(--brand), var(--brand-2));
  color: #05261b;
  box-shadow: 0 8px 20px rgba(47, 224, 138, .22);
}
.btn--ghost { background: transparent; border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--sm { padding: 7px 13px; font-size: .82rem; border-radius: 9px; }
.btn--block { width: 100%; }
.btn--danger { background: rgba(255, 107, 107, .14); border-color: rgba(255, 107, 107, .4); color: #ffb3b3; }
.btn--icon { padding: 7px 9px; }

/* ---------------- Giriş ---------------- */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(600px 320px at 20% 10%, rgba(47, 224, 138, .14), transparent 70%),
    radial-gradient(500px 300px at 90% 80%, rgba(23, 199, 111, .1), transparent 70%),
    var(--bg);
}
.login__card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 30px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.login__brand { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; }
.login__brand strong { display: block; font-size: 1.08rem; }
.login__brand small { color: var(--muted); font-size: .8rem; }
.login__mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(150deg, var(--brand), var(--brand-2));
  color: #06231a;
}
.login__mark .ico { width: 24px; height: 24px; stroke-width: 2; }
.login__hint { text-align: center; color: var(--muted); font-size: .8rem; margin: 16px 0 0; }
.login__hint.err { color: var(--danger); }

/* ---------------- Alanlar ---------------- */
.fld { display: block; margin-bottom: 15px; }
.fld > span {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .03em;
}
.fld input, .fld select, .fld textarea {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: .92rem;
  transition: border-color .18s, box-shadow .18s;
}
.fld textarea { resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(47, 224, 138, .12);
}
.fld select option { background: var(--surface-2); }
.check { display: flex; align-items: center; gap: 10px; font-size: .9rem; margin-bottom: 14px; color: #cddad6; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.row-gap { display: flex; gap: 10px; }

/* ---------------- Uygulama düzeni ---------------- */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }

.side {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--line);
}
.side__brand strong { display: block; font-size: .95rem; }
.side__brand small { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; }
.side__brand .login__mark { width: 38px; height: 38px; }
.side__brand .login__mark .ico { width: 20px; height: 20px; }

.side__nav { display: flex; flex-direction: column; gap: 3px; padding: 14px 12px; overflow-y: auto; }
.side__foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }

.nav-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #c3d1cd;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: .15s;
}
.nav-btn:hover { background: var(--surface); color: #fff; }
.nav-btn.active { background: var(--brand-dim); color: var(--brand); font-weight: 600; }
.nav-btn.danger:hover { background: rgba(255, 107, 107, .12); color: #ff9c9c; }
.nav-btn .ico { width: 18px; height: 18px; }

.pill {
  margin-left: auto;
  background: var(--brand);
  color: #05261b;
  font-size: .7rem;
  font-weight: 800;
  padding: 1px 8px;
  border-radius: 100px;
}
.pill:empty, .pill[data-count="0"] { display: none; }

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  background: rgba(11, 17, 20, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 1.12rem; }
.topbar__actions { margin-left: auto; display: flex; gap: 10px; }
.dirty { color: var(--amber); font-size: .8rem; }
.burger { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--text); padding: 7px 9px; cursor: pointer; }

.content { padding: 26px; display: flex; flex-direction: column; gap: 22px; max-width: 1100px; width: 100%; }

/* ---------------- Paneller ---------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.panel__head h2 { font-size: 1rem; }
.panel.tip { background: rgba(47, 224, 138, .06); border-color: rgba(47, 224, 138, .3); }

.tips { margin: 0; padding-left: 20px; color: #c6d5d1; font-size: .9rem; display: flex; flex-direction: column; gap: 9px; }

/* ---------------- İstatistik ---------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat {
  background: linear-gradient(170deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.stat__n { display: block; font-size: 2.1rem; font-weight: 800; color: var(--brand); line-height: 1.1; }
.stat__l { color: var(--muted); font-size: .84rem; }

/* ---------------- Liste düzenleyiciler ---------------- */
.list { display: flex; flex-direction: column; gap: 12px; }
.row-item {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 12px;
}
.row-item.inline { grid-template-columns: 1fr auto; align-items: start; }
.row-item__head { display: flex; align-items: center; gap: 10px; }
.row-item__head .num {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 100px;
}
.row-item__actions { display: flex; gap: 6px; margin-left: auto; }
.row-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.row-grid .fld { margin: 0; }
.row-full { grid-column: 1 / -1; }
.empty { color: var(--muted); font-size: .9rem; text-align: center; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 12px; }

/* Fiyat satırı özel */
.price-row { grid-template-columns: 1.6fr 1fr .9fr 1fr auto; align-items: end; }
.price-row .fld { margin: 0; }

/* ---------------- Teklifler ---------------- */
.lead-list { display: flex; flex-direction: column; gap: 12px; }
.lead {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 12px;
  padding: 15px 17px;
  display: grid;
  gap: 8px;
}
.lead.unread { border-left-color: var(--brand); background: rgba(47, 224, 138, .05); }
.lead__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lead__name { font-weight: 700; font-size: .98rem; }
.lead__badge {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--brand-dim);
  color: var(--brand);
}
.lead__time { margin-left: auto; color: var(--muted); font-size: .78rem; }
.lead__meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: .86rem; color: #c3d1cd; }
.lead__meta a { display: inline-flex; align-items: center; gap: 6px; }
.lead__msg { font-size: .9rem; color: var(--muted); white-space: pre-wrap; }
.lead__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 140%);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  padding: 13px 22px;
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
  font-size: .92rem;
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  z-index: 99;
  max-width: 90vw;
  text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.ok { border-color: rgba(47, 224, 138, .5); }
.toast.err { border-color: rgba(255, 107, 107, .55); }

/* ---------------- Responsive ---------------- */
@media (max-width: 940px) {
  .app { grid-template-columns: 1fr; }
  .side {
    position: fixed;
    left: 0; top: 0;
    width: 264px;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 60;
    box-shadow: 0 0 60px rgba(0,0,0,.6);
  }
  .side.open { transform: none; }
  .burger { display: inline-flex; }
  .grid2 { grid-template-columns: 1fr; }
  .price-row { grid-template-columns: 1fr 1fr; }
  .content { padding: 18px 14px; }
  .topbar { padding: 12px 14px; }
  .topbar h1 { font-size: 1rem; }
}
