/* Simay Kutu Harf & Tabela Tasarım Stüdyosu - ZERO-SCROLL COCKPIT UI */
:root {
  --bg-dark: #0a0e14;
  --bg-panel: #121822;
  --bg-panel-alt: #1a2230;
  --bg-card: rgba(255, 255, 255, 0.04);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #3b82f6;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.35);
  --accent-gold: #f59e0b;
  --accent-success: #10b981;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100vh;
  width: 100vw;
  overflow: hidden; /* Kesinlikle sayfa kaydırması yok */
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
}

/* TOP NAVBAR (Kompakt: 52px) */
.studio-navbar {
  height: 52px;
  min-height: 52px;
  background: rgba(18, 24, 34, 0.98);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-badge {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.brand-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* MODULAR TABS IN NAVBAR */
.product-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.product-tab {
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.product-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.product-tab.active {
  color: #fff;
  background: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-icon.active-glow {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  border-color: rgba(245, 158, 11, 0.4);
}

.btn-auth {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-auth:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* MAIN COCKPIT LAYOUT (100% Height - No Scroll) */
.studio-layout {
  display: flex;
  flex: 1;
  height: calc(100vh - 52px - 62px); /* Navbar: 52px, Bottombar: 62px */
  overflow: hidden;
  position: relative;
}

/* LEFT CONTROLS: DUAL-PANEL (Vertical Tabs Rail + Tab Content Pane) */
.controls-sidebar {
  width: 410px;
  min-width: 410px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: row;
  overflow: hidden;
  z-index: 10;
}

/* 1. Dikey Kategori İkon Şeridi */
.category-rail {
  width: 68px;
  min-width: 68px;
  background: #0d1219;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0;
  gap: 8px;
}

.rail-btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.1;
  padding: 4px 2px;
}

.rail-btn i {
  font-size: 1.1rem;
}

.rail-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.rail-btn.active {
  color: #fff;
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.rail-btn.active i {
  color: #60a5fa;
}

/* 2. Aktif Sekme İçerik Alanı (Kaydırma yok, her panel tam boy) */
.tab-content-pane {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden; /* Scroll engellendi */
  justify-content: flex-start;
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.tab-pane.active {
  display: flex;
  animation: fadeIn 0.18s ease;
}

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

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.pane-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pane-title i {
  color: var(--accent);
}

.pane-badge {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 12px;
}

/* FORM ELEMANLARI */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

.form-input, .form-select {
  background: rgba(10, 14, 20, 0.85);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 8px 10px;
  font-size: 0.84rem;
  font-family: inherit;
  transition: all 0.15s;
  width: 100%;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* HIZLI BOYUT BUTONLARI */
.quick-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.quick-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 7px 6px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.quick-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.quick-btn.active {
  background: rgba(37, 99, 235, 0.2);
  border-color: var(--accent);
  color: #fff;
}

/* MATERIAL & LIGHTING CARDS */
.option-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.option-card {
  background: rgba(10, 14, 20, 0.6);
  border: 1px solid var(--border-color);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.15s;
}

.option-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.option-card.active {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.15);
}

.opt-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}

.opt-desc {
  font-size: 0.67rem;
  color: var(--text-muted);
  line-height: 1.2;
}

/* COLOR PALETTE */
.color-palette-compact {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.color-chip {
  height: 32px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.color-chip:hover {
  transform: scale(1.05);
}

.color-chip.active {
  border-color: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.color-chip.active::after {
  content: '✓';
  color: #000;
  font-weight: 900;
  font-size: 0.75rem;
}

.color-chip.dark-chip.active::after {
  color: #fff;
}

/* UPLOAD DROPZONE COMPACT */
.dropzone-compact {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dropzone-compact:hover, .dropzone-compact.drag-over {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

.dropzone-icon {
  font-size: 1.4rem;
  color: var(--accent);
}

.dropzone-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
}

.dropzone-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* CENTER CANVAS VIEWPORT */
.studio-canvas-area {
  flex: 1;
  background: #0b0f15;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.canvas-toolbar {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 24, 34, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 4px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 20;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.tool-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.tool-divider {
  width: 1px;
  height: 16px;
  background: var(--border-color);
}

.viewport-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  user-select: none;
  perspective: 1200px;
  perspective-origin: center center;
  cursor: grab;
}

.viewport-container.is-dragging {
  cursor: grabbing;
}

.wall-facade {
  position: absolute;
  inset: 0;
  transition: background 0.4s ease, filter 0.4s ease;
  background-size: cover;
  background-position: center;
}

.wall-facade.anthracite {
  background-color: #1a1e24;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 70px 70px;
}

.wall-facade.brick {
  background-color: #4a2824;
  background-image: repeating-linear-gradient(0deg, rgba(0,0,0,0.4) 0, rgba(0,0,0,0.4) 2px, transparent 2px, transparent 40px),
                    repeating-linear-gradient(90deg, rgba(0,0,0,0.2) 0, rgba(0,0,0,0.2) 2px, transparent 2px, transparent 80px);
}

.wall-facade.concrete {
  background: radial-gradient(circle at 50% 50%, #2f3542 0%, #1e2229 100%);
}

.wall-facade.wood {
  background: repeating-linear-gradient(180deg, #382415, #382415 28px, #26170d 28px, #26170d 32px);
}

.wall-facade.luxury-marble {
  background: radial-gradient(circle at 30% 30%, #2c3440 0%, #141820 100%);
}

.studio-canvas-area.night-mode .wall-facade {
  filter: brightness(0.26) contrast(1.15);
}

.night-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, rgba(0,0,0,0) 35%, rgba(0,0,0,0.85) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 5;
}

.studio-canvas-area.night-mode .night-vignette {
  opacity: 1;
}

.interactive-stage {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 92%;
  max-height: 90%;
  transform-style: preserve-3d;
  transition: transform 0.08s ease-out;
  will-change: transform;
}

.letter-sign-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transform-style: preserve-3d;
}

.rendered-sign-text {
  font-size: 72px;
  font-weight: 800;
  white-space: pre-wrap;
  text-align: center;
  line-height: 1.15;
  letter-spacing: 4px;
  position: relative;
  transform: translateZ(12px);
  transform-style: preserve-3d;
  transition: color 0.25s ease, text-shadow 0.25s ease, filter 0.25s ease, font-size 0.2s ease;
  user-select: none;
}

.measure-dimension-tag {
  position: absolute;
  background: rgba(15, 20, 28, 0.9);
  color: #38bdf8;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 16px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  pointer-events: none;
  white-space: nowrap;
}

.measure-width {
  bottom: -26px;
  left: 50%;
  transform: translateX(-50%);
}

.measure-height {
  right: -52px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
}

.measure-guide-box {
  position: absolute;
  inset: -8px;
  border: 1px dashed rgba(56, 189, 248, 0.4);
  border-radius: 6px;
  pointer-events: none;
}

.custom-graphic-container {
  position: relative;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  transform-style: preserve-3d;
  overflow: visible;
}

.pdf-3d-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  overflow: visible;
}

.custom-graphic-yanak-canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  transform-style: preserve-3d;
  z-index: 1;
  background: transparent !important;
  box-shadow: none !important;
  will-change: transform, filter;
  overflow: visible;
}

.custom-graphic-canvas {
  background: transparent !important;
  box-shadow: none !important;
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
  transition: filter 0.25s ease;
  will-change: transform;
  overflow: visible;
}

/* LIGHTING SIMULATION */
.light-front {
  filter: drop-shadow(0 0 14px var(--light-color-rgba));
}

.light-halo {
  text-shadow: 0 0 25px var(--light-color-rgba),
               0 0 50px var(--light-color-rgba),
               0 0 80px var(--light-color-rgba);
}

.light-dual {
  filter: drop-shadow(0 0 12px var(--light-color-rgba));
  text-shadow: 0 0 20px var(--light-color-rgba),
               0 0 40px var(--light-color-rgba);
}

.light-none {
  filter: none;
  text-shadow: none;
}

/* BOTTOM SUMMARY & PRICE BAR (Kompakt: 62px) */
.studio-bottombar {
  height: 62px;
  min-height: 62px;
  background: rgba(18, 24, 34, 0.98);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 30;
}

.specs-summary-list {
  display: flex;
  align-items: center;
  gap: 18px;
}

.spec-item {
  display: flex;
  flex-direction: column;
}

.spec-title {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.spec-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.price-order-action {
  display: flex;
  align-items: center;
  gap: 14px;
}

.price-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.price-label {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.price-amount {
  font-size: 1.35rem;
  font-weight: 800;
  color: #34d399;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.price-tax {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.btn-secondary {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-primary {
  padding: 9px 20px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border: none;
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 10px var(--accent-glow);
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
}

/* MODAL STYLES */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 540px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  overflow: hidden;
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
