/* ====== GENEL RESET ====== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  background: #f4f5f7;
  color: #2f3640;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }

/* ====== FLASH ====== */
.flash { padding: 10px 14px; border-radius: 6px; margin: 10px 0; font-size: 14px; }
.flash-success { background:#d4edda; color:#155724; border:1px solid #c3e6cb; }
.flash-danger  { background:#f8d7da; color:#721c24; border:1px solid #f5c6cb; }
.flash-warning { background:#fff3cd; color:#856404; border:1px solid #ffeeba; }
.flash-info    { background:#d1ecf1; color:#0c5460; border:1px solid #bee5eb; }

/* Flash mesaj düzeni */
.flash-messages {
  position: relative;
  z-index: 1;
  max-width: 420px;
  width: 100%;
  margin: 0 auto 12px auto;
}

/* ====== LAYOUT ====== */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ====== MODERN SIDEBAR - Orijinal collapsed sistem ====== */
.sidebar-new, .sidebar-new * { box-sizing: border-box; }
.sidebar-new ul, .sidebar-new li { list-style: none; margin: 0; padding: 0; }

.sidebar-new {
  position: fixed;
  left: 0; top: 0;
  height: 100vh;
  width: 70px !important;                 /* Collapsed genişlik */
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%) !important;
  color: rgba(255, 255, 255, 0.85);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  box-shadow: 4px 0 20px rgba(59, 130, 246, 0.15);
  backdrop-filter: blur(10px);
  transition: width 250ms ease; /* Hover genişleme */
}

/* Hover'da genişle */
.sidebar-new:hover {
  width: 280px !important;
}

.sidebar-new ul {
  list-style: none;
  margin: 0;
  padding: 0 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sidebar-item { 
  position: relative; 
  width: 100%; 
  margin-bottom: 0.5rem;
}

.sidebar-item > a {
  display: flex !important;
  align-items: center;
  justify-content: center !important; /* Collapsed'da tam merkez */
  gap: 0 !important; /* Gap kaldırıldı - ikon ortalama için */
  padding: 1rem !important;
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none;
  border-radius: 1rem !important;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Hover efekti - sadece arka plan, çerçeve kesinlikle yok */
.sidebar-item > a:hover { 
  background: rgba(255, 255, 255, 0.08) !important;
  color: white !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Hover sonrası temizlik */
.sidebar-item > a:not(:hover) {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Active state - sadece arka plan */
.sidebar-item > a.active {
  background: rgba(255, 255, 255, 0.12) !important;
  color: white !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.sidebar-icon {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
  position: absolute; /* Absolute pozisyon ile tam merkez */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Hover'da ikon pozisyonunu düzelt */
.sidebar-new:hover .sidebar-icon {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  margin-right: 1rem;
}

.sidebar-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.sidebar-label {
  opacity: 0 !important;
  visibility: hidden !important;
  width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap;
  transition: all 250ms ease;
}

/* Hover'da label göster ve hizalamayı değiştir */
.sidebar-new:hover .sidebar-label {
  opacity: 1 !important;
  visibility: visible !important;
  width: auto !important;
}

.sidebar-new:hover .sidebar-item > a {
  justify-content: flex-start !important;
}

/* Çıkış butonu */
.sidebar-item:last-child {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1rem;
}

.sidebar-item:last-child a {
  color: rgba(248, 113, 113, 0.9) !important;
}

.sidebar-item:last-child a:hover {
  background: rgba(248, 113, 113, 0.08) !important;
  color: #fca5a5 !important;
}

/* Ana içerik alanı */
.content,
.main-content {
  margin-left: 70px !important;
  padding: 24px 28px;
  min-height: 100vh;
  transition: margin-left 250ms ease;
}

.sidebar-new:hover ~ .content,
.sidebar-new:hover ~ .main-content {
  margin-left: 280px !important;
}

/* ====== TABS ====== */
.tabs {
  display: flex;
  gap: 10px;
  margin: 14px 0 22px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.tabs::-webkit-scrollbar { height: 6px; }
.tabs::-webkit-scrollbar-thumb { background:#cfd8e3; border-radius: 8px; }
.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: #e6ebf1;
  color: #2c3e50;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  transition: background .15s ease, color .15s ease, transform .06s ease, box-shadow .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.tab:hover {
  background: #dde4ec;
  box-shadow: 0 2px 8px rgba(44,62,80,.08);
}
.tab:active { transform: translateY(1px); }
.tab:focus { outline: none; border-color: #8aa4bf; box-shadow: 0 0 0 3px rgba(138,164,191,.2); }
.tab.active {
  background: #2c3e50;
  color: #fff;
  box-shadow: 0 4px 14px rgba(44,62,80,.22);
}
.tab.active:hover {
  background: #2b3a4a;
  box-shadow: 0 6px 16px rgba(44,62,80,.28);
}
.tab .badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
}

/* ====== TABLO & KART ====== */
.card {
  background:#fff;
  border:1px solid #e3e8ef;
  border-radius:10px;
  overflow:hidden;
  box-shadow: 0 6px 18px rgba(17,24,39,.04);
}
table {
  width:100%;
  border-collapse:collapse;
}
thead tr {
  background:#f8fafc;
  text-align:left;
}
th, td {
  padding:12px 14px;
  border-bottom:1px solid #eef2f7;
  font-size: 14px;
}

/* ====== FORM & KONTROLLER ====== */
input[type="text"],
input[type="email"],
input[type="password"],
select, textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  transition: border .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #2c3e50;
  box-shadow: 0 0 0 3px rgba(44,62,80,.12);
}

button, .btn {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #2c3e50;
  color: #fff;
  font-weight: 600;
  transition: filter .15s;
}
button:hover, .btn:hover { filter: brightness(1.1); }

.btn-secondary {
  background: #e6ebf1;
  color: #2c3e50;
}
.btn-secondary:hover { background:#dde4ec; }

/* ====== BENİ HATIRLA ====== */
.form-remember {
  display: flex;
  align-items: center;
  margin: 8px 0 16px 0;
}
.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.remember-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .sidebar-new { width: 280px; } /* Mobilde de full genişlik */
  .content, .main-content { margin-left: 280px; }

  .tab { height: 36px; padding: 0 12px; font-size: 13px; }
}

/* ==== Outline buton ailesi (global) ==== */
.btn-sm { padding: .45rem .8rem; font-size: 14px; border-radius: 10px; }

.btn.btn-outline,
.btn.btn-outline-secondary,
.btn.btn-outline-success {
  background: #fff;
  border: 1px solid #cfd8e3;
  color: #2c3e50;
}

.btn.btn-outline-secondary:hover { background: #f8fafc; }
.btn.btn-outline-secondary:focus { outline: none; box-shadow: 0 0 0 3px rgba(207,216,227,.35); }

.btn.btn-outline-success {
  border-color: #22C55E;
  color: #16A34A;
}
.btn.btn-outline-success:hover { background: #F0FDF4; }
.btn.btn-outline-success:focus { outline: none; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }

/* ==== Upload ekranı kompakt ayarları (genel varsayılan) ==== */
:root{ --yip-dz-h: 280px; } /* taban */

/* Genel dropzone azaltma (~%20) – diğer sayfalarda da işe yarasın */
.dropzone,
.dz,
.upload-drop,
.extra-upload-drop,
.primary-drop,
.attachments-drop {
  min-height: calc(var(--yip-dz-h) * 0.8);
  padding-top: 14px;
  padding-bottom: 14px;
}
.dropzone.attachments,
.dropzone.extra,
.dropzone-secondary {
  min-height: calc(var(--yip-dz-h) * 0.8);
}

/* Onaycı/İmzacı panelini rahatlatmak için yardımcı sınıf (sayfa tarafı ekler) */
.auto-actors {
  min-height: clamp(360px, 420px, 520px);
  display: flex;
  flex-direction: column;
}
.auto-actors .list,
.auto-actors .items,
.auto-actors .card-body,
.auto-actors .panel-body,
.auto-actors .form-group,
.auto-actors .picker,
.auto-actors .scroll {
  flex: 1 1 auto;
  max-height: none;
  overflow: auto;
}
@media (min-width: 992px){
  .auto-actors .row { display:flex; gap:12px; }
  .auto-actors .col, 
  .auto-actors .col-6, 
  .auto-actors [class*="col-"] { flex: 1 1 0; }
}

/* ==== Upload sayfası düzeltme yaması ==== */
.upload-page .form-select{ font-size: 14px; }
.upload-page #selApprover{ height:44px; min-height:44px; }
.upload-page #selSigners{ min-height:260px; max-height:420px; overflow:auto; }