/* 
  İrem Emlak İnşaat - Yönetim Paneli Stilleri (admin.css)
  Yönetici Arayüzü: Modern, Temiz, İşlevsel & Duyarlı
*/

:root {
  --primary: #e52521;
  --primary-hover: #c91b17;
  --primary-light: #fff1f0;
  --dark: #0f172a;
  --dark-sidebar: #1e293b;
  --gray-bg: #f1f5f9;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --font: 'Outfit', 'Inter', -apple-system, sans-serif;
  --transition: all 0.2s ease;
}

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

body {
  font-family: var(--font);
  background-color: var(--gray-bg);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 0.95rem;
}

/* ==========================================================================
   GİRİŞ EKRANI (LOGIN SCREEN)
   ========================================================================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 20px;
}

.login-card {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.35);
  text-align: center;
}

.login-logo {
  height: 52px;
  margin: 0 auto 20px;
}

.login-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  font-size: 1rem;
}

.form-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: var(--dark);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(229, 37, 33, 0.15);
}

.btn-block {
  width: 100%;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(229, 37, 33, 0.35);
  transition: var(--transition);
  margin-top: 24px;
}

.btn-block:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* ==========================================================================
   ANA YÖNETİM DÜZENİ (PANEL LAYOUT)
   ========================================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* YAN MENÜ (SIDEBAR) */
.admin-sidebar {
  width: 260px;
  background: var(--dark-sidebar);
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
  height: 38px;
  filter: brightness(1.2);
}

.sidebar-menu {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  color: #cbd5e1;
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  transition: var(--transition);
}

.nav-item i {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
  color: #94a3b8;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}

.nav-item.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(229, 37, 33, 0.3);
}

.nav-item.active i {
  color: #ffffff;
}

.sidebar-badge {
  margin-left: auto;
  background: rgba(255,255,255,0.15);
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.user-info h5 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.user-info p {
  font-size: 0.75rem;
  color: #94a3b8;
}

.btn-logout {
  width: 100%;
  padding: 9px;
  background: rgba(239, 68, 68, 0.12);
  color: #ff8c89;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-logout:hover {
  background: #ef4444;
  color: #fff;
}

/* ANA İÇERİK ALANI */
.admin-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ÜST BAŞLIK (TOPBAR) */
.admin-topbar {
  height: 70px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-title h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--dark);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-site-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  transition: var(--transition);
}

.btn-site-preview:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* İÇERİK ALANI */
.content-area {
  padding: 30px;
  flex-grow: 1;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.2s ease;
}

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

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   İSTATİSTİK KARTLARI (DASHBOARD STATS)
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 18px;
}

.stat-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon-red { background: var(--primary-light); color: var(--primary); }
.stat-icon-blue { background: #eff6ff; color: #3b82f6; }
.stat-icon-green { background: #ecfdf5; color: #10b981; }
.stat-icon-yellow { background: #fffbeb; color: #f59e0b; }

.stat-info span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-info h3 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
}

/* ==========================================================================
   TABLOLAR VE LİSTE KARTLARI
   ========================================================================== */
.panel-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 25px;
}

.panel-card-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 14px;
}

.panel-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: #f8fafc;
  padding: 14px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: #f8fafc;
}

.table-img {
  width: 58px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: #e2e8f0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-kiralik { background: #dcfce7; color: #15803d; }
.badge-satilik { background: #fee2e2; color: #b91c1c; }
.badge-featured { background: #fef3c7; color: #b45309; }

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

.action-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--dark);
  cursor: pointer;
  transition: var(--transition);
}

.action-btn:hover {
  border-color: var(--dark);
}

.action-btn.btn-edit:hover {
  background: #eff6ff;
  color: #2563eb;
  border-color: #93c5fd;
}

.action-btn.btn-delete:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* BUTONLAR */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

/* ==========================================================================
   MODALLER (MODAL FORMS)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-card {
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.25s ease;
}

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

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

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #94a3b8;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 26px;
}

.modal-footer {
  padding: 18px 26px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
  border-radius: 0 0 18px 18px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.image-preview-box {
  width: 100%;
  height: 160px;
  border-radius: 10px;
  border: 1.5px dashed var(--border);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 8px;
}

.image-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   TOAST BİLDİRİMLERİ
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--dark);
  color: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
}

.toast.toast-success { border-left: 4px solid var(--success); }
.toast.toast-error { border-left: 4px solid var(--danger); }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* DUYARLILIK (RESPONSIVE) */
@media (max-width: 900px) {
  .admin-sidebar {
    position: fixed;
    left: -260px;
  }
  .admin-sidebar.mobile-open {
    left: 0;
  }
}

/* AYARLAR BÖLÜMÜ STİLLERİ */
.settings-section {
  background: #f8fafc;
  padding: 22px;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.settings-sec-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid rgba(229, 37, 33, 0.15);
  padding-bottom: 8px;
}

.settings-sec-title i {
  color: var(--primary);
}

/* SİTE DURUM ROZETİ (TOPBAR STATUS BADGE) */
.status-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ecfdf5;
  color: #065f46;
  border: 1.5px solid #a7f3d0;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  transition: var(--transition);
}

.status-badge-live:hover {
  background: #d1fae5;
}

.status-badge-maintenance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff7ed;
  color: #9a3412;
  border: 1.5px solid #fdba74;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  animation: pulseMaintenanceBorder 2s infinite ease-in-out;
  transition: var(--transition);
}

.status-badge-maintenance:hover {
  background: #ffedd5;
}

@keyframes pulseMaintenanceBorder {
  0%, 100% { border-color: #fdba74; box-shadow: 0 0 0 rgba(234, 88, 12, 0); }
  50% { border-color: #ea580c; box-shadow: 0 0 12px rgba(234, 88, 12, 0.35); }
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.status-badge-maintenance .status-dot {
  background: #ea580c;
}

/* ==========================================================================
   KURUMSAL TEKLİF OLUŞTURMA VE CANLI A4 PDF ÖNİZLEME MODÜLÜ
   ========================================================================== */

.proposal-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.proposal-header-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.proposal-header-title i {
  color: var(--primary);
}

.proposal-header-sub {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.proposal-header-actions,
.proposal-bottom-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.proposal-bottom-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.btn-proposal-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #e52521 0%, #c81e1a 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 11px 22px;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(229, 37, 33, 0.28);
  transition: var(--transition);
}

.btn-proposal-pdf:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(229, 37, 33, 0.38);
}

.btn-proposal-pdf:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.btn-proposal-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f8fafc;
  color: #475569;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-proposal-reset:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* İki Kolonlu Ana Yerleşim: Sol Form | Sağ Canlı A4 Önizleme */
.proposal-split-layout {
  display: grid;
  grid-template-columns: minmax(480px, 1fr) minmax(520px, 1.08fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 1360px) {
  .proposal-split-layout {
    grid-template-columns: 1fr;
  }
}

.proposal-form-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.proposal-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.proposal-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1.5px solid #f1f5f9;
}

.proposal-card-head h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.proposal-card-head h4 i {
  color: var(--primary);
}

.proposal-doc-meta-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-input-sm {
  height: 34px !important;
  padding: 4px 10px !important;
  font-size: 0.82rem !important;
  width: 135px;
}

/* Dinamik Fiyatlandırma Kalemleri Tablosu (Sol Editör) */
.btn-add-item-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-item-row:hover {
  background: var(--primary);
}

.proposal-items-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.proposal-items-editor-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.proposal-items-editor-table thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
}

.proposal-items-editor-table tbody td {
  padding: 8px 6px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.proposal-items-editor-table tbody tr:last-child td {
  border-bottom: none;
}

.editor-cell-input {
  width: 100%;
  height: 36px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
  color: #0f172a;
  background: #ffffff;
  transition: var(--transition);
}

.editor-cell-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(229, 37, 33, 0.12);
}

.editor-row-total-badge {
  display: block;
  text-align: right;
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f172a;
  padding: 0 4px;
  white-space: nowrap;
}

.btn-delete-row {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: none;
  background: #fee2e2;
  color: #dc2626;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  transition: var(--transition);
}

.btn-delete-row:hover {
  background: #dc2626;
  color: #ffffff;
}

/* Sol Formun Altındaki Hesaplama Özeti Çubuğu */
.proposal-form-totals-bar {
  margin-top: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.proposal-form-total-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-right: 8px;
  border-right: 1px solid #e2e8f0;
}

.proposal-form-total-item:last-child {
  border-right: none;
  padding-right: 0;
}

.proposal-form-total-item span {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.proposal-form-total-item strong {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
}

.proposal-form-total-item.grand strong {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--primary);
}

/* ==========================================================================
   SAĞ TARAF: CANLI A4 ÖNİZLEME ALANI VE A4 ANTETLİ BELGE ŞABLONU
   ========================================================================== */

.proposal-preview-column {
  background: #1e293b;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 20px;
}

.proposal-preview-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.a4-preview-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  padding-bottom: 8px;
}

/* Gerçek A4 Boyutlu Antetli Belge (794px x 1123px @ 96DPI = 210mm x 297mm) */
.a4-sheet {
  width: 794px;
  min-width: 794px;
  min-height: 1123px;
  background: #ffffff;
  color: #0f172a;
  padding: 42px 46px 36px 46px;
  box-sizing: border-box;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: 'Outfit', 'Segoe UI', Arial, sans-serif;
}

.a4-letterhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.a4-brand-block {
  display: flex;
  align-items: center;
  gap: 16px;
}

.a4-company-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.a4-company-title {
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.2px;
}

.a4-company-detail {
  font-size: 11px;
  color: #475569;
  line-height: 1.35;
}

.a4-doc-box {
  text-align: right;
  min-width: 175px;
}

.a4-doc-type-badge {
  display: inline-block;
  background: #e52521;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.8px;
  padding: 6px 14px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.a4-doc-meta-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  font-size: 11.5px;
  color: #475569;
  line-height: 1.5;
}

.a4-doc-meta-row strong {
  color: #0f172a;
  font-weight: 800;
}

.a4-divider-line {
  height: 3px;
  background: linear-gradient(90deg, #e52521 0%, #0f172a 100%);
  border-radius: 2px;
  margin: 16px 0 18px 0;
}

/* Müşteri ve Proje Bilgi Kartları */
.a4-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.a4-info-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #e52521;
  border-radius: 6px;
  padding: 12px 14px;
}

.a4-info-card-header {
  font-size: 10px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.a4-info-main {
  font-size: 13.5px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 6px;
  line-height: 1.25;
}

.a4-info-line {
  font-size: 11px;
  color: #475569;
  line-height: 1.45;
  display: flex;
  gap: 6px;
}

.a4-info-line span {
  color: #64748b;
  min-width: 62px;
  flex-shrink: 0;
}

.a4-info-line strong {
  color: #1e293b;
  font-weight: 700;
  word-break: break-word;
}

/* Fiyatlandırma Kalemleri Tablosu (A4) */
.a4-pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.a4-pricing-table thead th {
  background: #0f172a;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 8px 10px;
}

.a4-pricing-table tbody td {
  padding: 9px 10px;
  font-size: 11.5px;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.a4-pricing-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

/* A4 Hesaplama Özeti */
.a4-summary-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.a4-summary-table {
  width: 280px;
  border-collapse: collapse;
}

.a4-summary-table td {
  padding: 5px 10px;
  font-size: 12px;
}

.a4-summary-table .sum-label {
  text-align: right;
  color: #475569;
  font-weight: 700;
}

.a4-summary-table .sum-val {
  text-align: right;
  color: #0f172a;
  font-weight: 800;
  white-space: nowrap;
}

.a4-summary-table .sum-grand-row td {
  background: #0f172a;
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 900;
  padding: 9px 10px;
  border-radius: 2px;
}

/* Şartlar ve Koşullar Kutusu */
.a4-terms-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 11px 14px;
  margin-bottom: 16px;
}

.a4-terms-title {
  font-size: 10px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.a4-terms-body {
  font-size: 11px;
  color: #334155;
  line-height: 1.5;
  white-space: pre-line;
}

/* Alt İmza ve Kaşe Alanı */
.a4-signature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 14px;
}

.a4-sig-box {
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  padding: 10px 14px;
  text-align: center;
  background: #fcfcfd;
}

.a4-sig-label {
  font-size: 9.5px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.a4-sig-company {
  font-size: 12px;
  font-weight: 900;
  color: #e52521;
}

.a4-sig-person {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2px;
}

.a4-sig-stamp {
  margin-top: 34px;
  padding-top: 5px;
  border-top: 1px solid #e2e8f0;
  font-size: 9.5px;
  color: #94a3b8;
}

.a4-sheet-footer {
  border-top: 1px solid #e2e8f0;
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
}





