/* ═══════════════════════════════════════════════════════════
   MOBILYAPRO — style.css
   KesApp-inspired dark professional CAD UI theme
═══════════════════════════════════════════════════════════ */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Backgrounds */
  --bg:         #0d1117;
  --bg2:        #111827;
  --bg3:        #161b22;
  --bg4:        #1c2230;
  --bg5:        #252d3d;
  --surface:    rgba(255,255,255,0.04);

  /* Borders */
  --border:     rgba(255,255,255,0.07);
  --border2:    rgba(255,255,255,0.12);

  /* Text */
  --text:       #e8e9f0;
  --text2:      #c0c8d8;
  --muted:      #8892a4;
  --muted2:     #5a6272;

  /* Accent colors */
  --teal:       #00b4a6;
  --teal-dim:   rgba(0,180,166,0.15);
  --orange:     #f59e0b;
  --orange-dim: rgba(245,158,11,0.15);
  --purple:     #8b5cf6;
  --purple-dim: rgba(139,92,246,0.15);
  --blue:       #3b82f6;
  --blue-dim:   rgba(59,130,246,0.15);
  --green:      #10b981;
  --green-dim:  rgba(16,185,129,0.15);
  --red:        #ef4444;
  --red-dim:    rgba(239,68,68,0.15);

  /* Layout */
  --topbar-h:   44px;
  --sidebar-w:  56px;
  --modbar-h:   130px;

  /* UI */
  --radius:     10px;
  --shadow:     0 8px 32px rgba(0,0,0,0.5);
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border2); }

/* ══════════════════════════════════════════════════════════
   APP SHELL
══════════════════════════════════════════════════════════ */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* ══════════════════════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════════════════════ */
.top-bar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #090d14;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 100;
  gap: 0;
  padding: 0 6px 0 0;
}

.tb-menu-btn {
  width: var(--sidebar-w);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--teal);
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.tb-menu-btn:hover { background: var(--teal-dim); }

/* Dimension fields row */
.tb-dims {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: 1;
  padding: 0 8px;
  overflow: hidden;
}

.tb-dim-field {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg4);
  border: 1.5px solid var(--bg5);
  border-radius: 6px;
  padding: 3px 7px;
  height: 30px;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.tb-dim-field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(0,180,166,0.15); }
.tb-dim-field.is-primary { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(0,180,166,0.12); }

.tb-dim-lbl {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
}

.tb-dim-field input {
  background: transparent;
  border: none;
  outline: none;
  color: #e0d8b8;
  font-size: 13px;
  font-weight: 700;
  width: 46px;
  font-family: 'Inter', monospace;
  letter-spacing: -0.3px;
}
.tb-dim-field.is-primary input { color: #a8f0e8; }
.tb-dim-field input::-webkit-inner-spin-button,
.tb-dim-field input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.tb-ozel-btn {
  background: var(--bg4);
  border: 1.5px solid var(--bg5);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  height: 30px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.tb-ozel-btn:hover { border-color: var(--orange); color: var(--orange); }

/* Top actions */
.tb-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.tb-icon-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.tb-icon-btn:hover { background: var(--surface); color: var(--text2); }
.tb-icon-btn.active { background: var(--blue-dim); color: var(--blue); }

/* ══════════════════════════════════════════════════════════
   WORKSPACE
══════════════════════════════════════════════════════════ */
.workspace {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* ══════════════════════════════════════════════════════════
   LEFT SIDEBAR (Drawer Style)
══════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg3);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  gap: 0;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 50;
  scrollbar-width: none;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar:hover, .sidebar.expanded {
  width: 220px;
  box-shadow: 4px 0 15px rgba(0,0,0,0.3);
}

.sb-category {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 18px 4px 18px;
  margin-top: 4px;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.sidebar:hover .sb-category, .sidebar.expanded .sb-category {
  opacity: 1;
}

.sb-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 0;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}
.sb-group:last-child { border-bottom: none; }

.sb-btn {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 19px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  border: none;
  border-left: 3px solid transparent;
  transition: all 0.2s;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}
.sb-btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  transition: color 0.2s;
}
.sb-label {
  margin-left: 16px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s;
}
.sidebar:hover .sb-label, .sidebar.expanded .sb-label {
  opacity: 1;
  transform: translateX(0);
}

.sb-btn:hover { background: rgba(255,255,255,0.04); color: #fff; }
.sb-btn:hover svg { color: var(--teal); }
.sb-btn.active { background: rgba(0, 180, 166, 0.08); color: #fff; border-left-color: var(--teal); }
.sb-btn.active svg { color: var(--teal); }

/* Badge */
.sb-badge {
  position: absolute;
  top: 10px;
  left: 32px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--bg3);
}

/* ══════════════════════════════════════════════════════════
   SLIDE PANELS
══════════════════════════════════════════════════════════ */
.slide-panel {
  position: relative; /* Docked instead of absolute */
  height: 100%;
  width: 320px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  z-index: 40;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  /* Removed absolute slide animation in favor of simple display toggle or width transition */
}
.slide-panel.hidden {
  display: none;
}

@keyframes slideInPanel {
  from { transform: translateX(-20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.sp-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sp-ttl {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.sp-cls {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  width: 26px;
  height: 26px;
  min-width: 36px;
  min-height: 36px;
  touch-action: manipulation;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.sp-cls:hover { background: var(--surface); color: var(--text); }

.sp-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px;
}

.sp-field {
  margin-bottom: 13px;
}
.sp-field label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 5px;
}

.sp-inp {
  width: 100%;
  background: var(--bg4);
  border: 1px solid var(--bg5);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sp-inp:focus { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(0,180,166,0.15); }
.sp-inp::placeholder { color: var(--muted2); }

.sp-ta { min-height: 70px; resize: vertical; }
.mb12 { margin-bottom: 12px; }

.sp-sel {
  width: 100%;
  background: var(--bg4);
  border: 1px solid var(--bg5);
  border-radius: 7px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.sp-sel option { background: var(--bg3); }

.sp-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.sp-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--teal), #009488);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.sp-btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.sp-btn {
  width: 100%;
  background: var(--bg4);
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
}
.sp-btn:hover { background: var(--bg5); border-color: var(--border2); }
.sp-btn.danger:hover { background: var(--red-dim); border-color: var(--red); }

.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }

.sp-sec-ttl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--teal);
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}

/* No second slide-panel absolute rule needed */
.acc-lbl {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text2);
  font-size: 12px;
}
.acc-lbl input[type="checkbox"] {
  accent-color: var(--teal);
  cursor: pointer;
  width: 14px;
  height: 14px;
}

.sp-divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0;
}

.sp-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 30px 0;
}

/* Material grid */
.mat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.mat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 6px 6px;
  background: var(--bg4);
  border: 1.5px solid var(--bg5);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s;
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
}
.mat-item:hover { border-color: var(--border2); color: var(--text2); }
.mat-item.active { border-color: var(--teal); color: var(--teal); background: rgba(0,180,166,0.08); }

.mat-sw {
  width: 40px;
  height: 28px;
  border-radius: 5px;
  transition: transform 0.2s;
}
.mat-item:hover .mat-sw { transform: scale(1.05); }

/* Panel type row */
.ptype-row { display: flex; gap: 6px; }
.ptype-btn {
  flex: 1;
  padding: 7px;
  background: var(--bg4);
  border: 1px solid var(--bg5);
  border-radius: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
}
.ptype-btn.active { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }

/* Door style grid */
.door-style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.door-btn {
  padding: 7px; background: var(--bg4); border: 1px solid var(--bg5);
  border-radius: 7px; color: var(--muted); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: all 0.18s; font-family: inherit; text-align: center;
}
.door-btn.active { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }

/* Counter colors */
.counter-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.cc-btn {
  width: 32px; height: 32px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.18s;
}
.cc-btn.active { border-color: var(--teal); transform: scale(1.1); }

/* Accessory */
.acc-row { margin-bottom: 8px; }
.acc-lbl { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; color: var(--text2); }
.acc-lbl input { accent-color: var(--teal); }

/* Handle grid */
.handle-grid { display: flex; gap: 6px; }
.handle-btn {
  flex: 1; padding: 7px;
  background: var(--bg4); border: 1px solid var(--bg5);
  border-radius: 7px; color: var(--muted); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: all 0.18s; font-family: inherit;
}
.handle-btn.active { border-color: var(--orange); color: var(--orange); background: var(--orange-dim); }

/* Filter row */
.filter-row { margin-bottom: 7px; }

/* Slider */
.slider-row { display: flex; align-items: center; gap: 10px; }
input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: var(--bg5);
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--teal);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,180,166,0.4);
}
.slider-val { min-width: 36px; text-align: right; font-weight: 700; color: var(--teal); font-size: 12px; }

/* View presets */
.view-preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vp-btn { padding: 8px; background: var(--bg4); border: 1px solid var(--bg5); border-radius: 7px; color: var(--text2); font-size: 12px; cursor: pointer; transition: all 0.18s; font-family: inherit; }
.vp-btn:hover { border-color: var(--blue); color: var(--blue); }

/* Project list */
.sp-proj-list { display: flex; flex-direction: column; gap: 4px; }
.sp-proj-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; background: var(--bg4); border: 1px solid var(--bg5);
  border-radius: 7px; cursor: pointer; transition: all 0.18s; font-size: 12px; color: var(--text2);
}
.sp-proj-item:hover { border-color: var(--teal); color: var(--text); }
.sp-proj-date { font-size: 10px; color: var(--muted); }

/* Cost card */
.cost-card {
  background: rgba(245,158,11,0.05);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 10px;
  padding: 14px;
  margin-top: 14px;
}
.cc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12px; color: var(--muted);
}
.cc-row:last-child { border-bottom: none; }
.cc-row span:last-child { font-weight: 700; color: var(--text2); }
.cc-total { padding-top: 10px; }
.cc-total span { font-size: 16px !important; color: var(--orange) !important; }

/* Stats grid */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-box {
  background: var(--bg4); border: 1px solid var(--bg5); border-radius: 8px;
  padding: 12px 10px; text-align: center;
}
.stat-val { display: block; font-size: 22px; font-weight: 800; color: var(--teal); font-family: 'Space Grotesk', sans-serif; }
.stat-lbl { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }

/* Module list panel */
.mod-list-panel { display: flex; flex-direction: column; gap: 4px; }
.mod-list-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 10px; background: var(--bg4); border-radius: 6px;
  font-size: 11px; color: var(--text2); border: 1px solid transparent;
  cursor: pointer; transition: all 0.15s;
}
.mod-list-item:hover { border-color: var(--border); }
.mod-list-item .mod-cat-badge {
  font-size: 9px; font-weight: 700; padding: 1px 5px;
  border-radius: 4px; text-transform: uppercase;
}
.cat-badge-ust { background: var(--teal-dim); color: var(--teal); }
.cat-badge-alt { background: var(--orange-dim); color: var(--orange); }
.cat-badge-boy { background: var(--purple-dim); color: var(--purple); }
.cat-badge-tepe { background: var(--blue-dim); color: var(--blue); }

/* System info */
.system-info { display: flex; flex-direction: column; gap: 6px; }
.si-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); padding: 5px 0; border-bottom: 1px solid var(--border); }
.si-val { font-weight: 600; color: var(--text2); }

/* ══ Library — Premium Kartlar ══ */
.lib-cats { display: flex; gap: 5px; margin-bottom: 10px; flex-wrap: wrap; }
.lib-cat-btn {
  padding: 5px 10px; background: var(--bg4); border: 1px solid var(--bg5);
  border-radius: 6px; color: var(--muted); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.lib-cat-btn.active { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }

.lib-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}
.lib-card {
  background: linear-gradient(145deg, #1a2135, #141b2a);
  border: 1.5px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 10px 6px 8px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.lib-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
.lib-card:hover {
  border-color: rgba(0,180,166,0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,180,166,0.12), 0 0 0 1px rgba(0,180,166,0.1);
}
.lib-icon {
  width: 50px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6a7a95;
  transition: color 0.2s, transform 0.2s;
}
.lib-card:hover .lib-icon { color: var(--teal); transform: scale(1.1); }
.lib-icon svg { width: 46px; height: 44px; }
.lib-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--text2);
  display: block;
  line-height: 1.2;
}
.lib-dims {
  font-size: 9px;
  color: var(--muted2);
  display: block;
  font-weight: 600;
  font-family: 'Inter', monospace;
}
.lib-cat-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.lib-card[data-cat="ust"]  .lib-cat-badge { background: var(--teal); }
.lib-card[data-cat="alt"]  .lib-cat-badge { background: var(--orange); }
.lib-card[data-cat="boy"]  .lib-cat-badge { background: var(--purple); }
.lib-card[data-cat="tepe"] .lib-cat-badge { background: var(--blue); }
.lib-card[data-cat="yboy"] .lib-cat-badge { background: #e879f9; }

/* ══════════════════════════════════════════════════════════
   3D CANVAS AREA
══════════════════════════════════════════════════════════ */
.canvas-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg1);
  min-width: 0;
  min-height: 0;
}

#mainCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* Tutorial card */
.tutorial-card {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 310px;
  background: #1e2843;
  border: 1px solid #2a3d5e;
  border-radius: 14px;
  padding: 16px 18px;
  z-index: 50;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7);
  animation: tcFadeIn 0.3s ease;
}

@keyframes tcFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tc-top {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.tc-tag {
  font-size: 9px;
  font-weight: 800;
  background: var(--orange-dim);
  color: var(--orange);
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.tc-step {
  font-size: 9px;
  color: var(--muted);
  margin-left: auto;
  font-weight: 600;
}

.tc-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 7px;
}

.tc-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 14px;
}

.hi-y  { color: var(--orange); font-weight: 700; }
.hi-b  { color: var(--teal); font-weight: 700; }

.tc-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tc-dots { display: flex; gap: 4px; flex: 1; }
.tc-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--bg5);
  transition: all 0.3s;
}
.tc-dot.active { background: var(--blue); width: 14px; border-radius: 3px; }

.tc-skip {
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  font-size: 11px; padding: 5px 8px;
  border-radius: 5px; transition: color 0.2s; font-family: inherit;
}
.tc-skip:hover { color: var(--text2); }

.tc-next {
  background: var(--blue);
  color: #fff; border: none;
  border-radius: 7px; padding: 6px 14px;
  font-size: 12px; font-weight: 700;
  cursor: pointer; transition: background 0.2s; font-family: inherit;
}
.tc-next:hover { background: #2563eb; }

/* ══ Selected Module Bar — Right Docked ══ */
.sel-bar {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  background: rgba(14, 18, 28, 0.97);
  border-left: 1px solid rgba(255,255,255,0.08);
  z-index: 80;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}
.sel-bar.hidden { 
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
}

.sel-bar-name {
  font-size: 13px;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: -0.2px;
}

.sel-bar-dims {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  font-family: 'Inter', monospace;
  letter-spacing: 0.3px;
}

.sel-bar-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 7px; width: 30px; height: 30px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 13px; transition: all 0.18s; color: var(--text2);
}
.sel-bar-btn:hover { background: rgba(255,255,255,0.1); }
.sel-bar-btn.danger:hover { background: var(--red-dim); border-color: var(--red); color: var(--red); }

/* ── Sel-bar Sekmeler ── */
.sel-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 12px;
  flex-shrink: 0;
  background: rgba(0,0,0,0.2);
}
.sel-tab {
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--muted2);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  transition: all 0.18s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.sel-tab:hover { color: var(--text2); }
.sel-tab.active { color: #fbbf24; border-bottom-color: #fbbf24; }

.sel-tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.sel-tab-pane { display: none; }
.sel-tab-pane.active { display: block; }

/* Boyut input group */
.sel-dim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
  margin-bottom: 8px;
}
.sel-dim-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sel-dim-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.sel-dim-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: 'Inter', monospace;
  padding: 4px 6px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  text-align: center;
}
.sel-dim-input:focus { border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.05); }
.sel-dim-input::-webkit-inner-spin-button,
.sel-dim-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Bölme listesi */
.bolme-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
}
.bolme-item {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 11px;
}
.bolme-item-lbl { color: var(--muted); font-weight: 700; flex-shrink: 0; min-width: 22px; font-size: 10px; }
.bolme-item-w {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  color: var(--text2);
  font-size: 11px;
  font-weight: 600;
  font-family: 'Inter', monospace;
  padding: 2px 5px;
  width: 52px;
  text-align: center;
  outline: none;
}
.bolme-item-type {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 5px;
  color: var(--text2);
  font-size: 10px;
  padding: 2px 4px;
  outline: none;
  font-family: inherit;
}
.bolme-add-btn {
  width: 100%;
  padding: 5px;
  background: rgba(0,180,166,0.07);
  border: 1px dashed rgba(0,180,166,0.25);
  border-radius: 7px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  font-family: inherit;
}
.bolme-add-btn:hover { background: rgba(0,180,166,0.12); border-color: rgba(0,180,166,0.4); }

/* Bileşen checkboxlar */
.bilesen-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 8px;
}
.bilesen-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 7px;
  padding: 6px 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.bilesen-item:hover { background: rgba(255,255,255,0.06); }
.bilesen-item.active { border-color: rgba(0,180,166,0.3); background: rgba(0,180,166,0.07); color: var(--teal); }
.bilesen-item input { display: none; }

/* Kulp / pozisyon seçici */
.kulp-row {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.kulp-btn {
  flex: 1;
  padding: 5px 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-align: center;
}
.kulp-btn:hover { background: rgba(255,255,255,0.08); color: var(--text2); }
.kulp-btn.active { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.3); color: var(--orange); }

/* Sel-bar section title */
.sel-sec-ttl {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted2);
  margin-bottom: 5px;
  margin-top: 8px;
}
.sel-sec-ttl:first-child { margin-top: 0; }

/* Canvas status */
.canvas-status {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 14, 24, 0.85);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 18px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.canvas-status .danger { color: var(--red); font-weight: 700; }

/* ══════════════════════════════════════════════════════════
   BOTTOM MODULE BAR — Premium Upgrade
══════════════════════════════════════════════════════════ */
.mod-bar {
  background: #080c15;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden;
  height: 130px;
}

/* ── Kategori Tab Satırı ── */
.mod-tab-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 12px 0;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.mod-tab-row::-webkit-scrollbar { display: none; }

.mod-tab {
  padding: 4px 12px 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: var(--muted2);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  font-family: inherit;
  flex-shrink: 0;
  position: relative;
  bottom: -1px;
}
.mod-tab:hover { color: var(--text2); background: rgba(255,255,255,0.04); }
.mod-tab.active {
  background: #0f1520;
  border-color: rgba(255,255,255,0.08);
  border-bottom-color: #0f1520;
  color: var(--text);
}
.mod-tab.tab-ust.active  { color: var(--teal);   border-top: 2px solid var(--teal); }
.mod-tab.tab-alt.active  { color: var(--orange); border-top: 2px solid var(--orange); }
.mod-tab.tab-boy.active  { color: var(--purple); border-top: 2px solid var(--purple); }
.mod-tab.tab-tepe.active { color: var(--blue);   border-top: 2px solid var(--blue); }
.mod-tab.tab-yboy.active { color: #e879f9;       border-top: 2px solid #e879f9; }
.mod-tab.tab-cihaz.active  { color: #a3a3a3;    border-top: 2px solid #a3a3a3; }
.mod-tab.tab-kapama.active { color: var(--green);border-top: 2px solid var(--green); }
.mod-tab.tab-serbest.active{ color: #facc15;     border-top: 2px solid #facc15; }

/* ── Modül Carousel ── */
.mod-carousel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.08) transparent;
  background: #0f1520;
}
.mod-carousel::-webkit-scrollbar { height: 3px; }
.mod-carousel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.mod-carousel-group {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,0.04);
  backdrop-filter: blur(4px);
}

.mod-carousel-lbl {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  text-align: center;
  margin: 0 4px 0 1px;
  user-select: none;
  opacity: 0.7;
}
.cat-ust   { color: var(--teal); }
.cat-alt   { color: var(--orange); }
.cat-boy   { color: var(--purple); }
.cat-tepe  { color: var(--blue); }
.cat-yboy  { color: #e879f9; }
.cat-cihaz { color: #a3a3a3; }
.cat-mimari{ color: #8892b0; }
.cat-kapama{ color: var(--green); }
.cat-serbest{ color: #facc15; }

/* ── Modül Butonu — Premium ── */
.mod-btn {
  width: 82px;
  height: 82px;
  background: linear-gradient(145deg, #1a2135, #141b2a);
  border: 1.5px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  color: #5a6a82;
  position: relative;
  padding: 6px 4px 5px;
  overflow: hidden;
}
.mod-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.mod-btn:hover {
  border-color: rgba(255,255,255,0.15);
  background: linear-gradient(145deg, #20293d, #192236);
  color: #b0bdd0;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06);
}
.mod-btn.selected {
  border-color: var(--orange);
  background: linear-gradient(145deg, rgba(245,158,11,0.15), rgba(245,158,11,0.08));
  color: var(--orange);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(245,158,11,0.3), 0 4px 16px rgba(245,158,11,0.2);
}
.mod-btn.selected::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--orange);
  border-radius: 1px;
  box-shadow: 0 0 6px rgba(245,158,11,0.6);
}
.mod-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mod-btn-icon svg {
  width: 38px;
  height: 36px;
  transition: transform 0.22s;
}
.mod-btn:hover .mod-btn-icon svg {
  transform: scale(1.08);
}
.mod-btn-name {
  font-size: 8px;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
  color: var(--muted);
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  letter-spacing: 0.2px;
}
.mod-btn.selected .mod-btn-name { color: var(--orange); }
.mod-btn:hover .mod-btn-name { color: var(--text2); }

/* ══════════════════════════════════════════════════════════
   MODALS
══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeOverlay 0.2s ease;
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden { display: none; }

@keyframes fadeOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: #151c2e;
  border: 1px solid #2a3960;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-sm  { width: 420px; }
.modal-xl  { width: min(920px, 95vw); }

.modal-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.modal-ttl {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  flex: 1;
}

.modal-cls {
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--muted);
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}
.modal-cls:hover { background: rgba(255,255,255,0.12); color: var(--text); }

.modal-bdy {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
}

.modal-ftr {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 22px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.modal-ftr .sp-btn, .modal-ftr .sp-btn-primary { width: auto; padding: 8px 18px; }

/* Cutting tabs */
.cut-tab-row { display: flex; gap: 6px; }
.cut-tab {
  padding: 5px 12px;
  background: var(--bg4); border: 1px solid var(--bg5);
  border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.18s; font-family: inherit;
}
.cut-tab.active { border-color: var(--teal); color: var(--teal); background: var(--teal-dim); }

.cut-stats-bar {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg4);
  border-radius: 7px;
  padding: 8px 12px;
  margin-bottom: 12px;
  border: 1px solid var(--bg5);
}

.cut-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.cut-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.cut-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 8px 12px;
  background: var(--bg4);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cut-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text2);
  white-space: nowrap;
}

.cut-table tr:hover td { background: rgba(255,255,255,0.02); }

.cut-table .band-y { color: var(--teal); font-weight: 700; }
.cut-table .band-n { color: var(--muted2); }

/* Nesting container */
#nestContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.nest-sheet-wrap { }
.nest-sheet-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.nest-canvas {
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}

/* Render modal */
.render-styles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 4px; }
.rs-btn {
  padding: 8px; background: var(--bg4); border: 1.5px solid var(--bg5);
  border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.18s; font-family: inherit;
}
.rs-btn.active { border-color: var(--purple); color: var(--purple); background: var(--purple-dim); }

.render-lights { display: flex; gap: 6px; margin-bottom: 12px; }
.rl-btn {
  flex: 1; padding: 7px 4px; background: var(--bg4); border: 1.5px solid var(--bg5);
  border-radius: 7px; color: var(--muted); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: all 0.18s; font-family: inherit; text-align: center;
}
.rl-btn.active { border-color: var(--orange); color: var(--orange); background: var(--orange-dim); }

.render-preview-box {
  background: var(--bg4);
  border: 1px solid var(--bg5);
  border-radius: 10px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.render-empty { text-align: center; color: var(--muted); }
.re-ico { font-size: 40px; margin-bottom: 8px; }
.render-empty p { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.render-empty span { font-size: 11px; }

.render-result-img { width: 100%; height: 100%; object-fit: cover; }

.render-progress {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10,14,24,0.85);
  gap: 12px;
}
.rp-bar-wrap { width: 80%; height: 4px; background: var(--bg5); border-radius: 2px; }
.rp-bar { height: 100%; background: var(--teal); border-radius: 2px; transition: width 0.5s ease; }
.rp-text { font-size: 12px; color: var(--muted); }

.w-full { width: 100%; }

/* Welcome modal */
.welcome-modal { text-align: center; padding-bottom: 8px; }
.wm-logo {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 22px 0 16px;
}
.wm-brand { font-size: 22px; font-weight: 800; color: var(--text); font-family: 'Space Grotesk', sans-serif; }
.wm-title { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.wm-text { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 16px; padding: 0 8px; }
.wm-features { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 4px; }
.wm-feat {
  background: var(--bg4); border: 1px solid var(--bg5);
  border-radius: 20px; padding: 5px 12px;
  font-size: 12px; font-weight: 600; color: var(--text2);
}
.wm-copy { font-size: 10px; color: var(--muted2); margin-top: 14px; }

/* ══════════════════════════════════════════════════════════
   PRINT STYLES
══════════════════════════════════════════════════════════ */
@media print {
  .app-shell, .top-bar, .workspace, .mod-bar { display: none !important; }
  #printSection { display: block !important; }
  body { background: #fff; color: #000; }
}

/* ══════════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.5; }
}
.animate-pulse { animation: pulse 1.5s ease infinite; }

/* ══════════════════════════════════════════════════════════
   MOD SETTINGS PANEL — KesApp Sekme Yapısı
══════════════════════════════════════════════════════════ */
.sp-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin: -14px -14px 12px;
  padding: 0 8px;
  background: rgba(0,0,0,0.2);
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.sp-tabs::-webkit-scrollbar { display: none; }

.sp-tab {
  padding: 9px 11px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--muted2);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  transition: all 0.18s;
  white-space: nowrap;
  margin-bottom: -1px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sp-tab:hover { color: var(--text2); }
.sp-tab.active { color: var(--teal); border-bottom-color: var(--teal); }

.sp-tab-pane { display: none; }
.sp-tab-pane.active { display: block; }

/* Aksesuar sayaç inputları (KesApp tarzı adet satırları) */
.acc-count-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.acc-count-row:last-child { border-bottom: none; }
.acc-count-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  flex: 1;
}
.acc-count-unit {
  font-size: 9px;
  color: var(--muted2);
  font-weight: 600;
  margin-right: 6px;
}
.acc-count-input {
  width: 54px;
  background: var(--bg4);
  border: 1px solid var(--bg5);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  font-family: 'Inter', monospace;
  padding: 3px 6px;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
}
.acc-count-input:focus { border-color: var(--teal); }
.acc-count-input::-webkit-inner-spin-button,
.acc-count-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Sub-section header */
.sp-sub-hdr {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted2);
  padding: 8px 0 4px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  margin-bottom: 6px;
}

/* Cam / LED / Alüm grup kartı */
.acc-group-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.acc-group-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════════════════
   UTILITY
══════════════════════════════════════════════════════════ */
.hidden { display: none !important; }

/* Floating Details UI */
.sel-bar-header { display: flex; justify-content: space-between; width: 100%; align-items: flex-start; margin-bottom: 8px; }
.sel-bar-body { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.sel-box { background: rgba(0,0,0,0.2); border-radius: 6px; padding: 10px; width: 100%; font-size: 13px; color: #cbd5e1; }
.sel-row { margin-bottom: 6px; display: flex; align-items: center; }
.sel-row label { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.sel-row-lbl { margin-bottom: 4px; color: #94a3b8; font-size: 12px; }
.sel-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 8px 0; }
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-group label { display: flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; }
.sel-select { background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.1); color: #fff; padding: 4px; border-radius: 4px; width: 100%; outline: none; }
.mb8 { margin-bottom: 8px; }

/* ═══════════════════════════════════════════════════════════
   RENDER GALERİSİ
═══════════════════════════════════════════════════════════ */
.render-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  max-height: 65vh;
  overflow-y: auto;
  padding: 4px;
}
.rg-item {
  position: relative;
  background: #161b22;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.rg-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,180,166,0.2);
  border-color: rgba(0,180,166,0.4);
}
.rg-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.rg-info {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  font-size: 10px;
  color: #7a8498;
}
.rg-proj {
  padding: 0 8px 6px;
  font-size: 10px;
  color: #00b4a6;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rg-delete {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #ef4444;
  border-radius: 4px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.rg-item:hover .rg-delete { opacity: 1; }
/* PROJE LİSTESİ GÜNCELLEMELERİ */
.sp-proj-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s;
  border: 1px solid transparent;
}
.sp-proj-item:hover { background: rgba(0,180,166,0.08); border-color: rgba(0,180,166,0.2); }
.sp-proj-item.active { background: rgba(0,180,166,0.15); border-color: rgba(0,180,166,0.35); }
.sp-proj-thumb { width: 42px; height: 32px; object-fit: cover; border-radius: 4px; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.08); }
.sp-proj-info { flex: 1; min-width: 0; overflow: hidden; }
.sp-proj-name { font-size: 12px; font-weight: 600; color: #c0c8d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-proj-meta { font-size: 10px; color: #5a6272; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-proj-del { background: none; border: none; color: #5a6272; cursor: pointer; padding: 2px 4px; border-radius: 4px; font-size: 12px; flex-shrink: 0; transition: color 0.15s; }
.sp-proj-del:hover { color: #ef4444; }
.sp-empty { color: #5a6272; text-align: center; padding: 16px; font-size: 12px; }

/* ══════════════════════════════════════════════════════════
   SIDEBAR BACKDROP (tablet overlay)
══════════════════════════════════════════════════════════ */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 150;
  backdrop-filter: blur(1px);
  animation: fadeIn 0.2s ease;
}
.sidebar-backdrop.active {
  /* display: block; Moved to media query below */
}

/* ══════════════════════════════════════════════════════════
   TABLET RESPONSIVE  ≤ 1024px
══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  
  .sidebar-backdrop.active {
    display: block;
  }

  /* ── Layout değişkenleri ── */
  :root {
    --topbar-h:  52px;
    --sidebar-w: 0px;
    --modbar-h:  140px;
  }

  /* ── Sidebar: overlay drawer ── */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 230px;
    transform: translateX(-100%);
    z-index: 200;
    padding-top: calc(var(--topbar-h) + 8px);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.65);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
  /* Hover genişlemesini tablet'te iptal et */
  .sidebar:hover {
    width: 230px;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.65);
  }
  /* Toggle ile açılıyor */
  .sidebar.expanded {
    transform: translateX(0);
  }
  /* Sidebar label'lar her zaman görünür */
  .sidebar.expanded .sb-label,
  .sidebar:hover .sb-label {
    opacity: 1;
    transform: translateX(0);
  }
  .sidebar.expanded .sb-category,
  .sidebar:hover .sb-category {
    opacity: 1;
  }

  /* ── Top bar ── */
  .top-bar {
    height: var(--topbar-h);
  }
  .tb-menu-btn {
    width: 52px;
    height: 52px;
    border-right: 1px solid var(--border);
  }
  /* Boyut inputlarını gizle — tablet ekranı dar */
  .tb-dims {
    display: none;
  }
  /* Üst ikonlar daha büyük dokunma hedefi */
  .tb-icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }
  .tb-actions {
    gap: 4px;
    padding-right: 4px;
  }

  /* ── Sol sidebar butonları ── */
  .sb-btn {
    height: 52px;
    padding: 0 20px;
  }
  .sb-btn svg {
    width: 20px;
    height: 20px;
  }

  /* ── Workspace ── */
  #workspace {
    height: calc(100vh - var(--topbar-h) - var(--modbar-h)) !important;
  }

  /* ── Modül alt barı ── */
  .mod-bar {
    height: var(--modbar-h);
  }
  .mod-carousel {
    gap: 10px;
    padding: 0 14px;
  }
  .mod-carousel-group {
    padding: 10px;
    gap: 8px;
  }
  .mod-btn {
    width: 82px;
    height: 82px;
    border-radius: 12px;
    touch-action: manipulation;
  }
  .mod-btn-icon svg {
    width: 38px;
    height: 36px;
  }
  .mod-btn-name {
    font-size: 9px;
  }
  .mod-carousel-lbl {
    font-size: 9px;
  }

  /* ── Slide panel (özellikler paneli) ── */
  .slide-panel {
    width: min(340px, 88vw);
    top: var(--topbar-h);
  }

  /* ── Panel kapatma butonu ── */
  .sp-cls {
    min-width: 44px;
    min-height: 44px;
    font-size: 18px;
    touch-action: manipulation;
  }

  /* ── Seçili modül bilgi kutusu ── */
  .sel-bar {
    right: 12px;
    top: 12px;
    width: 210px;
    padding: 10px 12px;
  }
  .sel-bar-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 16px;
    touch-action: manipulation;
  }

  /* ── Modal ── */
  .modal-sm {
    width: min(420px, 95vw);
  }
  .modal-xl {
    width: 97vw;
  }
  .modal-box {
    border-radius: 14px;
    max-height: 92vh;
  }
  .modal-hdr {
    padding: 16px 18px 12px;
  }
  .modal-cls {
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-radius: 10px;
    touch-action: manipulation;
  }
  .modal-bdy {
    padding: 14px 18px;
  }
  .modal-ftr {
    padding: 10px 18px;
  }

  /* ── Canvas status ── */
  .canvas-status {
    font-size: 11px;
    padding: 5px 14px;
  }

  /* ── Tutorial card ── */
  .tutorial-card {
    left: 12px;
    top: 12px;
    width: calc(100vw - 24px);
    max-width: 340px;
  }

  /* ── Input alanları dokunma boyutu ── */
  .sp-inp,
  .sp-sel,
  .sel-select {
    min-height: 40px;
    font-size: 14px;
    touch-action: manipulation;
  }
  input[type="range"]::-webkit-slider-thumb {
    width: 22px;
    height: 22px;
  }

  /* ── Genel buton dokunma boyutu ── */
  .sp-btn,
  .sp-btn-primary {
    min-height: 44px;
    font-size: 14px;
    touch-action: manipulation;
  }
  .lib-cat-btn,
  .cut-tab,
  .ptype-btn,
  .door-btn,
  .handle-btn {
    min-height: 40px;
    touch-action: manipulation;
  }
  .mat-item {
    padding: 10px 8px;
  }
  .mat-sw {
    width: 44px;
    height: 32px;
  }

  /* ── Aksesuarlar checkbox/radio büyüt ── */
  .acc-lbl input[type="checkbox"],
  .acc-lbl input[type="radio"] {
    width: 18px;
    height: 18px;
  }
  .radio-group label {
    font-size: 13px;
    gap: 6px;
    padding: 4px 0;
  }
  .sel-row label {
    font-size: 13px;
    gap: 8px;
    padding: 4px 0;
  }

  /* ── Render gallery ── */
  .render-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

/* ══════════════════════════════════════════════════════════
   KÜÇÜK TABLET / GENİŞ TELEFON  ≤ 768px
══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  :root {
    --modbar-h: 130px;
  }

  /* ── Slide panel: bottom sheet ── */
  .slide-panel {
    position: fixed;
    top: auto !important;
    left: 0;
    right: 0;
    bottom: var(--modbar-h);
    width: 100% !important;
    height: 52vh;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border2);
    border-radius: 18px 18px 0 0;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
    z-index: 120;
  }
  .slide-panel.hidden {
    transform: translateY(110%);
  }
  /* Bottom sheet tutma çubuğu */
  .slide-panel::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--bg5);
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }
  .sp-hdr {
    padding: 8px 16px 10px;
  }

  /* ── Seçili modül bilgi kutusu: top full width ── */
  .sel-bar {
    left: 8px;
    right: 8px;
    top: 8px;
    width: auto;
    max-height: 40vh;
  }

  /* ── Mod butonları daha büyük ── */
  .mod-btn {
    width: 88px;
    height: 88px;
  }
  .mod-carousel {
    gap: 8px;
    padding: 0 10px;
  }
  .mod-carousel-group {
    padding: 8px 6px;
    gap: 6px;
  }

  /* ── Top bar: sadece menü + aksiyon butonları ── */
  .tb-actions {
    gap: 2px;
  }
  /* Bazı aksiyon butonlarını gizle (daha az öncelikli) */
  #btnRenderGallery,
  #btnGridView {
    display: none;
  }

  /* ── Modal: tam ekran ── */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-box {
    width: 100vw !important;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
  }

  /* ── Tutorial card full width ── */
  .tutorial-card {
    left: 8px;
    right: 8px;
    width: auto;
    max-width: none;
  }

  /* ── Workspace height ── */
  #workspace {
    height: calc(100vh - var(--topbar-h) - var(--modbar-h)) !important;
  }

  /* ── Font boyutları ── */
  body {
    font-size: 14px;
  }
  .sp-ttl {
    font-size: 14px;
  }
}
/* ==========================================================
   MOBILE CAMERA TOOLS
========================================================== */
.mobile-cam-tools {
  display: none; /* Desktop'ta gizli */
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px;
  border-radius: 20px;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.mobile-cam-tools .cam-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.mobile-cam-tools .cam-btn.active {
  background: #00b4a6;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 180, 166, 0.4);
}

@media (max-width: 1024px) {
  .mobile-cam-tools {
    display: flex; /* Mobilde göster */
    gap: 4px;
  }
}
.bilesen-panel-ui { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.b-row { display: flex; gap: 6px; }
.b-btn { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text-2); border-radius: 20px; padding: 8px 12px; font-size: 13px; font-family: inherit; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; }
.b-btn:hover { background: rgba(255, 255, 255, 0.1); }
.b-btn.active { background: #739373; border-color: #5d785d; color: #111; font-weight: 500; }
.b-main { flex: 1; min-width: 80px; }
.b-sub { flex: 0 0 auto; }
