/* ============================================================
   HEYKEL İNŞAAT - Ortak Stil
   ============================================================ */
:root{
  /* HEYKEL YAPI kurumsal renkler (logodan): lacivert zemin + altın/bej vurgu */
  --bg:#0e2033; --panel:#14314d; --panel2:#1b3d5e; --line:#2a4e70;
  --text:#eef2f6; --muted:#9db2c6; --brand:#c7a876; --brand2:#dcc39a;
  --green:#2ecc71; --red:#e74c3c; --blue:#4a90c2; --orange:#e0a85a;
  --radius:12px; --shadow:0 6px 24px rgba(0,0,0,.3);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:'Segoe UI',system-ui,-apple-system,Roboto,Arial,sans-serif;
  background:var(--bg); color:var(--text); line-height:1.5;
}
a{color:var(--brand2); text-decoration:none}

/* ---- Üst bar ---- */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 22px; background:linear-gradient(90deg,#0b1b2b,#14314d);
  border-bottom:2px solid var(--brand); position:sticky; top:0; z-index:50;
}
.topbar .brand{display:flex; align-items:center; gap:12px; font-weight:700; font-size:20px}
.topbar .brand .logo{
  width:40px;height:40px;border-radius:9px;display:grid;place-items:center;
  background:var(--brand); color:#1a1a1a; font-weight:900; font-size:18px;
}
.topbar .brand small{display:block;font-weight:400;font-size:12px;color:var(--muted)}
.topbar nav{display:flex; gap:8px}
.topbar nav a{
  padding:8px 16px; border-radius:8px; color:var(--text); font-weight:600; font-size:14px;
}
.topbar nav a:hover{background:var(--panel2)}
.topbar nav a.active{background:var(--brand); color:#1a1a1a}

/* ---- Layout ---- */
.wrap{max-width:1280px; margin:0 auto; padding:22px}
.grid{display:grid; gap:18px}
.grid.cols-2{grid-template-columns:1fr 1fr}
.grid.sidebar{grid-template-columns:300px 1fr}
@media(max-width:900px){ .grid.cols-2,.grid.sidebar{grid-template-columns:1fr} }

/* ---- Kart ---- */
.card{
  background:var(--panel); border:1px solid var(--line); border-radius:var(--radius);
  box-shadow:var(--shadow); overflow:hidden;
}
.card .hd{
  padding:14px 18px; border-bottom:1px solid var(--line); font-weight:700;
  display:flex; align-items:center; justify-content:space-between; background:var(--panel2);
}
.card .bd{padding:18px}

/* ---- Form öğeleri ---- */
label{display:block; font-size:13px; color:var(--muted); margin:10px 0 4px}
input,select,textarea{
  width:100%; padding:10px 12px; border-radius:8px; border:1px solid var(--line);
  background:#0e141b; color:var(--text); font-size:14px; font-family:inherit;
}
input:focus,select:focus,textarea:focus{outline:none; border-color:var(--brand)}
textarea{min-height:72px; resize:vertical}
.row{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.row.three{grid-template-columns:1fr 1fr 1fr}
.row.four{grid-template-columns:repeat(4,1fr)}
@media(max-width:700px){ .row,.row.three,.row.four{grid-template-columns:1fr} }

/* ---- Butonlar ---- */
.btn{
  display:inline-flex; align-items:center; gap:7px; cursor:pointer; border:none;
  padding:10px 18px; border-radius:8px; font-weight:600; font-size:14px;
  background:var(--panel2); color:var(--text); transition:.15s;
}
.btn:hover{filter:brightness(1.15)}
.btn.primary{background:var(--brand); color:#1a1a1a}
.btn.green{background:var(--green); color:#06301a}
.btn.red{background:var(--red); color:#fff}
.btn.blue{background:var(--blue); color:#fff}
.btn.ghost{background:transparent; border:1px solid var(--line)}
.btn.sm{padding:6px 12px; font-size:13px}
.btn:disabled{opacity:.5; cursor:not-allowed}

/* ---- Rozetler ---- */
.badge{display:inline-block; padding:3px 10px; border-radius:20px; font-size:12px; font-weight:600}
.badge.available{background:rgba(46,204,113,.15); color:#5be89a}
.badge.reserved{background:rgba(230,126,34,.15); color:#f0a85e}
.badge.sold{background:rgba(231,76,60,.15); color:#f08478}
.badge.draft{background:rgba(149,165,166,.2); color:#c7d0d4}
.badge.sent{background:rgba(52,152,219,.15); color:#6cb6e8}
.badge.accepted{background:rgba(46,204,113,.15); color:#5be89a}
.badge.rejected{background:rgba(231,76,60,.15); color:#f08478}

/* ---- Tablo ---- */
table{width:100%; border-collapse:collapse}
th,td{padding:10px 12px; text-align:left; border-bottom:1px solid var(--line); font-size:14px}
th{color:var(--muted); font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.3px}
tr:hover td{background:rgba(255,255,255,.02)}
.num{text-align:right; font-variant-numeric:tabular-nums}

/* ---- Ağaç (sol menü) ---- */
.tree{list-style:none; margin:0; padding:0}
.tree li{margin:2px 0}
.tree .node{
  display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:7px; cursor:pointer; font-size:14px;
}
.tree .node:hover{background:var(--panel2)}
.tree .node.active{background:var(--brand); color:#1a1a1a; font-weight:600}
.tree .children{margin-left:16px; border-left:1px dashed var(--line); padding-left:8px}
.tree .muted{color:var(--muted); font-size:12px}

/* ---- Kroki / hotspot ---- */
.plan-stage{
  position:relative; width:100%; background:#0b1016; border-radius:10px; overflow:hidden;
  border:1px solid var(--line); min-height:260px;
}
.plan-stage img, .plan-stage svg{display:block; width:100%; height:auto}
.plan-empty{display:grid; place-items:center; height:320px; color:var(--muted); text-align:center; padding:20px}
.hotspot{
  position:absolute; border:2px solid var(--brand); background:rgba(201,162,39,.18);
  border-radius:6px; cursor:pointer; transition:.15s; display:flex; align-items:flex-start; justify-content:flex-start;
}
.hotspot:hover{background:rgba(201,162,39,.35)}
.hotspot.sel{border-color:var(--green); background:rgba(46,204,113,.3)}
.hotspot.sold{border-color:var(--red); background:rgba(231,76,60,.2)}
.hotspot.reserved{border-color:var(--orange); background:rgba(230,126,34,.2)}
.hotspot .tag{
  background:#1a1a1a; color:#fff; font-size:11px; font-weight:700; padding:2px 6px;
  border-radius:0 0 6px 0; pointer-events:none;
}

/* ---- Chip (özellik etiketleri) ---- */
.chips{display:flex; flex-wrap:wrap; gap:8px; margin-top:6px}
.chip{
  display:inline-flex; align-items:center; gap:6px; background:var(--panel2); border:1px solid var(--line);
  padding:5px 10px; border-radius:20px; font-size:13px;
}
.chip button{background:none;border:none;color:var(--red);cursor:pointer;font-size:15px;line-height:1;padding:0}

/* ---- Fiyat kutusu ---- */
.price-box{background:linear-gradient(135deg,#1e2a1e,#16261b); border:1px solid #2a4a30; border-radius:12px; padding:18px}
.price-box .big{font-size:30px; font-weight:800; color:#7ee6a6}
.cost-box{background:linear-gradient(135deg,#2a1e1e,#261616); border:1px solid #4a2a2a; border-radius:12px; padding:14px}
.cost-box .big{font-size:22px; font-weight:800; color:#f0a0a0}
.kv{display:flex; justify-content:space-between; padding:4px 0; font-size:14px}
.kv .k{color:var(--muted)}

/* ---- Yardımcılar ---- */
.muted{color:var(--muted)}
.right{text-align:right}
.center{text-align:center}
.mt{margin-top:14px}
.hidden{display:none !important}
.flex{display:flex; gap:10px; align-items:center}
.flex.between{justify-content:space-between}
.flex.wrap{flex-wrap:wrap}
.pill-stats{display:flex; gap:12px; flex-wrap:wrap}
.stat{background:var(--panel2); border:1px solid var(--line); border-radius:10px; padding:12px 16px; min-width:120px}
.stat .n{font-size:22px; font-weight:800}
.stat .l{font-size:12px; color:var(--muted)}

/* ---- Toast ---- */
#toast{position:fixed; right:20px; bottom:20px; z-index:999; display:flex; flex-direction:column; gap:8px}
.toast{
  background:var(--panel2); border:1px solid var(--line); border-left:4px solid var(--brand);
  padding:12px 18px; border-radius:8px; box-shadow:var(--shadow); min-width:220px; animation:slideIn .2s;
}
.toast.ok{border-left-color:var(--green)}
.toast.err{border-left-color:var(--red)}
@keyframes slideIn{from{transform:translateX(30px);opacity:0}to{transform:none;opacity:1}}

/* ---- Modal ---- */
.modal-bg{position:fixed; inset:0; background:rgba(0,0,0,.6); display:none; align-items:center; justify-content:center; z-index:200; padding:20px}
.modal-bg.show{display:flex}
.modal{background:var(--panel); border:1px solid var(--line); border-radius:14px; width:100%; max-width:760px; max-height:90vh; overflow:auto; box-shadow:var(--shadow)}
.modal .hd{padding:16px 20px; border-bottom:1px solid var(--line); font-weight:700; font-size:18px; display:flex; justify-content:space-between; align-items:center; position:sticky; top:0; background:var(--panel2)}
.modal .bd{padding:20px}
.modal .ft{padding:14px 20px; border-top:1px solid var(--line); display:flex; gap:10px; justify-content:flex-end; position:sticky; bottom:0; background:var(--panel2)}
.close-x{background:none;border:none;color:var(--muted);font-size:26px;cursor:pointer;line-height:1}

/* ============================================================
   Galeri thumbnail, opsiyon satırı, lightbox (zoom)
   ============================================================ */
.gallery{display:flex; flex-wrap:wrap; gap:10px}
.thumb{
  position:relative; width:120px; height:90px; border-radius:8px; overflow:hidden;
  border:1px solid var(--line); cursor:pointer; background:#0b1016;
}
.thumb img{width:100%; height:100%; object-fit:cover; transition:.2s}
.thumb:hover img{transform:scale(1.08)}
.thumb-cap{
  position:absolute; left:0; right:0; bottom:0; background:rgba(0,0,0,.6);
  color:#fff; font-size:11px; padding:3px 6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.thumb-zoom{position:absolute; top:4px; right:6px; font-size:14px; opacity:.8}

.opt-row{
  display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px;
  cursor:pointer; border:1px solid var(--line); margin-bottom:6px; background:#0e141b;
}
.opt-row:hover{border-color:var(--brand)}
.opt-row input{width:auto}
.opt-row .opt-name{flex:1}
.opt-row .opt-price{font-weight:700; color:#7ee6a6}

/* Lightbox */
.lightbox{
  position:fixed; inset:0; background:rgba(0,0,0,.92); z-index:500;
  display:none; align-items:center; justify-content:center;
}
.lightbox.show{display:flex}
.lb-stage{width:100%; height:100%; display:flex; align-items:center; justify-content:center; overflow:hidden}
.lb-stage img{max-width:92vw; max-height:85vh; transform-origin:center center; transition:transform .05s; user-select:none}
.lb-close{position:absolute; top:16px; right:22px; background:none; border:none; color:#fff; font-size:40px; cursor:pointer; line-height:1; z-index:3}
.lb-nav{position:absolute; top:50%; transform:translateY(-50%); background:rgba(255,255,255,.1); border:none; color:#fff; font-size:30px; padding:14px 18px; cursor:pointer; border-radius:8px; z-index:3}
.lb-nav:hover{background:rgba(255,255,255,.25)}
.lb-prev{left:18px}
.lb-next{right:18px}
.lb-zoom{position:absolute; top:16px; left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:8px; background:rgba(0,0,0,.5); padding:8px 12px; border-radius:30px; z-index:3; color:#fff}
.lb-title{position:absolute; bottom:16px; left:50%; transform:translateX(-50%); color:#fff; background:rgba(0,0,0,.5); padding:6px 16px; border-radius:20px; font-size:14px; z-index:3}

/* Teklif modalı: iskonto/KDV/durum tam genişlik satırlar */
.field-row{margin-bottom:12px}
.field-row > label{display:block; font-size:13px; color:var(--muted); margin-bottom:5px}
.field-row input, .field-row select{width:100%}
.field-row .flex{display:flex; gap:8px; align-items:center}

/* Daire görsel slotları (4 sabit tip + ek) */
.img-type-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:8px}
.img-extra-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-top:10px}
@media(max-width:700px){ .img-type-grid,.img-extra-grid{grid-template-columns:repeat(2,1fr)} }
.img-slot{border:1px solid var(--line); border-radius:8px; padding:8px; background:#0e141b; display:flex; flex-direction:column; gap:6px}
.img-slot-head{font-size:12px; font-weight:700; color:var(--brand2); text-align:center}
.img-slot-pic{width:100%; height:90px; object-fit:cover; border-radius:6px; cursor:zoom-in; background:#0b1016}
.img-slot-empty{height:90px; display:flex; align-items:center; justify-content:center; color:var(--muted); border:1px dashed var(--line); border-radius:6px}
.img-offer{display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text)}
.img-offer input{width:auto}
.img-title{width:100%; padding:4px 6px; font-size:12px}

/* Satış ekranı daire kartları (kroki yerine) */
.apt-cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px}
.apt-card{border:1px solid var(--line); border-radius:10px; overflow:hidden; cursor:pointer; background:var(--panel2); transition:.15s}
.apt-card:hover{border-color:var(--brand); transform:translateY(-2px)}
.apt-card.sold{opacity:.55}
.apt-card-thumb{height:110px; background:#0b1016; display:flex; align-items:center; justify-content:center}
.apt-card-thumb img{width:100%; height:100%; object-fit:cover}
.apt-card-body{padding:8px 10px}
.apt-card-code{font-weight:700; display:flex; align-items:center; gap:6px; justify-content:space-between}
