/* =========================================================
   dashboard.css (FINAL) – Görsel-3 (Sidebar + White Topbar)
   - Sol sidebar sabit
   - Üst bar beyaz
   - İçerik alanı gri + kart/panel görünümü
   - Eski arkaplan dalga / desktop / sürükleme mantığı yok
   ========================================================= */

:root{
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e6eaf2;
  --primary: #1d4ed8;

  --sidebar: #0b1f3a;
  --sidebar2: #071a30;
  --sidebarText: rgba(255,255,255,.92);
  --sidebarMuted: rgba(255,255,255,.55);

  --topbarH: 64px;
  --sidebarW: 260px;
  --sidebarWCollapsed: 78px;
  --radius: 14px;
  --shadow: 0 10px 24px rgba(15,23,42,.08);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Eski dalga div'i varsa gizle */
.bg-waves{ display:none !important; }

/* =========================================
   ✅ MODERN EDIT POPUP (Teslimat Düzenle)
   ========================================= */

.edit-overlay{
  position: fixed;
  inset: 0;
  display: none;             /* JS open class ile açacak */
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.35);       /* koyu şeffaf */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.edit-overlay.open{
  display: flex;
}

.edit-box{
  width: min(560px, 96vw);
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.18),
    0 2px 10px rgba(15, 23, 42, 0.06);
  padding: 18px 18px 16px;
  position: relative;
}

/* Başlık */
.edit-box h3{
  margin: 2px 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: .2px;
}

/* X kapatma butonu */
.edit-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: rgba(15, 23, 42, 0.04);
  color: #0f172a;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: .15s ease;
}

.edit-close:hover{
  background: rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

/* Form satırları */
.edit-form-row{
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.edit-form-row label{
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.edit-form-row input,
.edit-form-row select,
.edit-form-row textarea{
  width: 100%;
  height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  outline: none;
  font-size: 13px;
  color: #0f172a;
  background: #fff;
  transition: .15s ease;
}

.edit-form-row textarea{
  height: auto;
  min-height: 90px;
  resize: vertical;
}

.edit-form-row input:focus,
.edit-form-row select:focus,
.edit-form-row textarea:focus{
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

/* Alt buton alanı */
.edit-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

/* Eğer btn-small sınıfların varsa onları bozmadan,
   edit popup içindeki butonları daha modern gösterelim */
.edit-actions .btn-small{
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}

/* Mobilde daha iyi hizalama */
@media (max-width: 520px){
  .edit-box{
    padding: 14px 14px 12px;
    border-radius: 16px;
  }
  .edit-form-row{
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .edit-form-row label{
    font-size: 12px;
  }
}



/* =========================================================
   APP LAYOUT
   ========================================================= */
.erp-layout{
  height:100vh;
  width:100%;
  display:flex;
  overflow:hidden;
}

/* Sidebar */
.erp-side-menu-panel{
  width: var(--sidebarW);
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar2));
  color: var(--sidebarText);
  display:flex;
  flex-direction:column;
  padding: 16px 12px;
  gap: 12px;
  position:relative;
  transition: width .18s ease;
}

/* Collapsed state (body’ye class veriyoruz) */
body.sidebar-collapsed .erp-side-menu-panel{
  width: var(--sidebarWCollapsed);
}

/* Sidebar header */
.erp-side-menu-header{
  height: 44px;
  display:flex;
  align-items:center;
  padding: 0 10px;
  font-weight:700;
  letter-spacing:.2px;
  border-radius: 10px;
  color: var(--sidebarText);
  background: rgba(255,255,255,.06);
}

/* Menü list */
.erp-side-menu-list{
  display:flex;
  flex-direction:column;
  gap: 6px;
  padding: 4px 0;
}

.erp-side-menu-item{
  width:100%;
  border:none;
  background: transparent;
  color: var(--sidebarText);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  cursor:pointer;
  transition: background .14s ease, transform .14s ease;
}

.erp-side-menu-item .icon{
  width: 28px;
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--sidebarText);
  opacity: .95;
}
.erp-side-menu-item .text{
  flex:1;
  text-align:left;
  font-size: 13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.erp-side-menu-item .arrow{
  opacity:.5;
}

.erp-side-menu-item:hover{
  background: rgba(255,255,255,.08);
  transform: translateX(1px);
}

.erp-side-menu-item.active{
  background: rgba(29,78,216,.25);
  box-shadow: inset 0 0 0 1px rgba(29,78,216,.35);
}

body.sidebar-collapsed .erp-side-menu-item .text,
body.sidebar-collapsed .erp-side-menu-item .arrow,
body.sidebar-collapsed .erp-side-menu-header{
  overflow:hidden;
  white-space:nowrap;
}
body.sidebar-collapsed .erp-side-menu-item .text{ display:none; }
body.sidebar-collapsed .erp-side-menu-item .arrow{ display:none; }
body.sidebar-collapsed .erp-side-menu-header{
  justify-content:center;
}

/* =========================================================
   MAIN AREA
   ========================================================= */
.erp-main{
  flex:1;
  display:flex;
  flex-direction:column;
  min-width:0;
}

/* Topbar (white) */
.erp-topbar{
  height: var(--topbarH);
  background: #fff;
  border-bottom: 1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 18px;
}

/* Left icons (burger) */
.erp-left-icons{
  display:flex;
  align-items:center;
  gap: 10px;
}

.burger{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color: #0f172a;
  background: #f3f6fb;
  border: 1px solid #e8edf7;
  transition: transform .12s ease, box-shadow .12s ease;
}
.burger i{ font-size:18px; }
.burger:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15,23,42,.08);
}

/* Right icons */
.erp-right-icons{
  display:flex;
  align-items:center;
  gap: 10px;
}

.erp-top-icon{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color: #0f172a;
  background: transparent;
  transition: background .12s ease, transform .12s ease;
}
.erp-top-icon i{ font-size:18px; }
.erp-top-icon:hover{
  background: #f3f6fb;
  transform: translateY(-1px);
}

/* Separator */
.erp-top-separator{
  width:1px;
  height: 26px;
  background: #e6eaf2;
  margin: 0 6px;
}

/* Search (topbar) */
.erp-search{
  position:relative;
  width: 320px;
  height: 40px;
  background:#f3f6fb;
  border: 1px solid #e8edf7;
  border-radius: 999px;
  display:flex;
  align-items:center;
  padding: 0 14px 0 40px;
  transition: box-shadow .14s ease, border-color .14s ease, background .14s ease;
}
.erp-search .search-icon{
  position:absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color:#64748b;
}
.erp-search input{
  width:100%;
  border:none;
  outline:none;
  background:transparent;
  color:#0f172a;
  font-size: 13px;
}
.erp-search input::placeholder{ color:#94a3b8; }
.erp-search:focus-within{
  background:#fff;
  border-color:#d8e2fb;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
}

/* Search panel */
.search-panel{
  position:absolute;
  left:0; right:0;
  top: 46px;
  display:none;
  z-index: 9999;
}
.search-panel-inner{
  background:#fff;
  border: 1px solid #e8edf7;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px 14px;
  color:#0f172a;
}
.search-empty-title{ font-weight:700; margin-bottom:6px; }
.search-empty-text{ color:#64748b; font-size: 13px; }

.search-result-item{
  padding: 10px 10px;
  border-radius: 12px;
  cursor:pointer;
}
.search-result-item:hover{ background:#f3f6fb; }
.search-result-title{ font-weight:700; }
.search-result-sub{ color:#64748b; font-size:12px; }
.search-result-tag{ float:right; color:#94a3b8; font-size:11px; }

/* Content wrapper */
.erp-main-content{
  flex:1;
  min-height:0;
  padding: 18px;
  overflow:auto;
}

/* =========================================================
   PAGE / WINDOW
   ========================================================= */
.erp-page{
  width:100%;
  height: calc(100vh - var(--topbarH) - 36px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  color: var(--text);
}

/* Eski absolute pencere mantığını kapat */
.erp-window{
  position: relative !important;
  top: auto !important;
  left: auto !important;
  z-index: auto !important;

  /* ❗ bunları kaldırıyoruz ki .erp-page yüksekliği ezilmesin */
  /* width:auto !important; */
  /* height:auto !important; */
}


/* Header */
.erp-page-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background:#fff;
}

.erp-breadcrumb{
  display:flex;
  align-items:center;
  gap: 8px;
  font-size: 13px;
  color:#334155;
}
.erp-breadcrumb strong{ color:#0f172a; }

/* Kapat dot */
.erp-home-dot{
  width: 12px; height:12px;
  border-radius: 50%;
  background:#ff5f57;
  box-shadow: 0 0 0 1px rgba(0,0,0,.12);
  cursor:pointer;
  display:inline-block;
  margin-right: 4px;
}
.erp-page-actions{ display:flex; gap:8px; }

/* Buttons */
.btn-small{
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #d8e2fb;
  background: #f3f6fb;
  color:#0f172a;
  font-size: 12px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-small:hover{
  background:#fff;
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
  transform: translateY(-1px);
}
.btn-primary{
  background: var(--primary);
  border-color: var(--primary);
  color:#fff;
}
.btn-primary:hover{
  background:#1e40af;
  border-color:#1e40af;
}
.btn-secondary{
  background:#fff;
  border-color: #e6eaf2;
}
.btn-back{ border-radius: 999px; }

/* Alerts */
.alert-msg{
  margin: 12px 16px 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid transparent;
}
.alert-success{ background:#dcfce7; color:#166534; border-color:#bbf7d0; }
.alert-error{ background:#fee2e2; color:#991b1b; border-color:#fecaca; }

/* Table area */
.erp-table-wrapper{
  flex:1;
  min-height:0;
  overflow:auto;
  background:#fff;
}
table.erp-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  font-size: 13px;
}
table.erp-table thead{
  position:sticky;
  top:0;
  z-index:2;
  background:#f8fafc;
  border-bottom: 1px solid var(--line);
}
table.erp-table th,
table.erp-table td{
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-align:left;
}
table.erp-table th{
  font-size: 12px;
  text-transform:none;
  letter-spacing:.2px;
  color:#334155;
}
table.erp-table tbody tr:hover{ background:#f3f6fb; }

/* Footer */
.erp-page-footer{
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background:#fff;
  color:#94a3b8;
  font-size: 12px;
  text-align:right;
}

/* Form */
.form-container{
  flex:1;
  min-height:0;
  overflow:auto;
  padding: 16px 16px 20px;
}
.form-row{
  display:flex;
  gap: 14px;
  flex-wrap:wrap;
  margin-bottom: 12px;
}
.form-group{ flex:1; min-width:240px; }
.form-group label{
  display:block;
  font-size: 12px;
  color:#334155;
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea{
  width:100%;
  border-radius: 12px;
  border: 1px solid #e6eaf2;
  background:#fff;
  padding: 10px 12px;
  font-size: 13px;
  outline:none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus{
  border-color:#c7d2fe;
  box-shadow: 0 0 0 4px rgba(99,102,241,.10);
}
.form-actions{ display:flex; gap:10px; margin-top: 6px; }

/* =========================================================
   PROFILE DROPDOWN
   ========================================================= */
.profile-dropdown-wrapper{ position:relative; }

.profile-dropdown{
  position:absolute;
  right:0;
  top: 48px;
  width: 240px;
  background:#fff;
  border: 1px solid #e8edf7;
  border-radius: 14px;
  box-shadow: var(--shadow);
  display:none;
  z-index: 9999;
  overflow:hidden;
  color:#0f172a;
}

.profile-dropdown-header{
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
  font-weight:700;
}
.profile-dropdown-header small{
  display:block;
  margin-top:4px;
  color:#64748b;
  font-weight:500;
}

.profile-dropdown-item{
  padding: 10px 12px;
  display:flex;
  align-items:center;
  gap: 10px;
  cursor:pointer;
}
.profile-dropdown-item:hover{ background:#f3f6fb; }
.profile-dropdown-divider{ height:1px; background: var(--line); }

/* =========================================================
   OVERLAYS (edit/status/calendar/profile/lock/game)
   (Mevcut HTML’in ID/class’larıyla uyumlu kalsın)
   ========================================================= */
.edit-overlay,
.calendar-overlay,
.profile-overlay,
.lock-overlay,
.game-overlay{
  position:fixed;
  inset:0;
background: rgba(7, 26, 48, .55);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
  display:none;
  align-items:center;
  justify-content:center;
  z-index: 60000;
}

.edit-box,
.calendar-box,
.profile-window,
.lock-box{
  width: 440px;
  max-width: 92vw;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.92);
  box-shadow: 0 24px 60px rgba(0,0,0,.18);
  position: relative;
  z-index: 60001;
}


.lock-digits{ gap: 12px; }

.lock-digit-input{
  width: 56px;
  height: 56px;
  text-align:center;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.12);
  font-size: 20px;
  font-weight: 800;
  outline: none;
  background: #fff;
  transition: .15s ease;
}

.lock-digit-input:focus{
  border-color: rgba(29,78,216,.55);
  box-shadow: 0 0 0 4px rgba(29,78,216,.14);
  transform: translateY(-1px);
}


/* lock */
.lock-box{
  width: 420px;
  max-width: 92vw;
  padding: 18px;
}
.lock-title{ font-weight:800; font-size:16px; margin-bottom: 6px; }
.lock-subtitle{ color:#64748b; font-size: 13px; margin-bottom: 12px; }
.lock-digits{ display:flex; gap: 10px; margin: 10px 0 12px; }
.lock-digit-input{
  width: 54px; height: 54px;
  text-align:center;
  border-radius: 14px;
  border: 1px solid #e6eaf2;
  font-size: 18px;
}
.lock-error{ color:#b91c1c; font-size: 12px; margin-bottom: 10px; }

/* calendar box */
.calendar-box{
  width: 640px;
  max-width: 95vw;
  overflow:hidden;
}
.calendar-tabs{
  display:flex;
  background:#f8fafc;
  border-bottom: 1px solid var(--line);
}
.calendar-tab{
  flex:1;
  text-align:center;
  padding: 12px 8px;
  cursor:pointer;
  font-size: 12px;
  color:#334155;
}
.calendar-tab.active{
  background:#fff;
  font-weight:800;
  color: var(--primary);
}
.calendar-body{ padding: 14px 16px; }
.calendar-row{ margin-bottom: 12px; }
.calendar-row label{ display:block; font-size:12px; color:#334155; margin-bottom:6px; }
.calendar-row input,
.calendar-row textarea{
  width:100%;
  border-radius: 12px;
  border: 1px solid #e6eaf2;
  padding: 10px 12px;
  font-size: 13px;
}
.calendar-row-double{ display:flex; gap: 12px; }
.calendar-row-double .calendar-row-inner{ flex:1; }
.calendar-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  background:#f8fafc;
  border-top: 1px solid var(--line);
}
.calendar-btn{
  height: 34px;
  border-radius: 12px;
  border: 1px solid #e6eaf2;
  background:#fff;
  padding: 0 12px;
  cursor:pointer;
}
.calendar-btn-primary{
  background: var(--primary);
  border-color: var(--primary);
  color:#fff;
}
.calendar-close-x{
  position:absolute;
  right: 10px;
  top: 8px;
  border:none;
  background:transparent;
  font-size: 18px;
  cursor:pointer;
  color:#64748b;
}
.calendar-close-x:hover{ color:#0f172a; }

/* profile overlay */
.profile-window{
  width: 980px;
  max-width: 96vw;
  height: 640px;
  max-height: 92vh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.profile-window-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background:#f8fafc;
}
.profile-window-body{
  display:flex;
  flex:1;
  min-height:0;
}
.profile-sidebar{
  width: 280px;
  border-right: 1px solid var(--line);
  background:#fff;
  padding: 14px;
}
.profile-content{
  flex:1;
  min-width:0;
  padding: 14px 16px;
  overflow:auto;
}

/* =========================
   CALV2 (calendar.php iframe)
========================= */
.calv2-body, .calv2-body html{
  margin:0;
}
html, body.calv2-body{
  height:100%;
}

.calv2-root{
  height:100%;
  width:100%;
  padding:12px;
  box-sizing:border-box;
  background: transparent;
  font-family: inherit;
}

.calv2-panel{
  height:100%;
  width:100%;
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid #e6eaf3;
  border-radius:14px;
  overflow:hidden;
}

.calv2-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 14px;
  border-bottom:1px solid #e6eaf3;
  background:#fff;
}

.calv2-bc{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  color:#111827;
}
.calv2-dot{
  width:12px;height:12px;border-radius:50%;
  background:#ff5f57;
  box-shadow:0 0 0 1px rgba(0,0,0,.18);
}

.calv2-right{ display:flex; align-items:center; gap:12px; }
.calv2-count{ font-size:12px; color:#6b7280; }

.calv2-tabs{
  padding:10px 14px;
  border-bottom:1px solid #e6eaf3;
  background:#f7f9ff;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.calv2-tab{
  text-decoration:none;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid #e1e6f2;
  background:#fff;
  color:#1f2a44;
}
.calv2-tab:hover{ background:#f2f6ff; }
.calv2-tab.active{
  background:#e7efff;
  border-color:#cfe0ff;
  font-weight:700;
}

.calv2-formwrap{
  padding:12px 14px;
  background:#f5f7fb;
  border-bottom:1px solid #e6eaf3;
}
.calv2-formtitle{
  font-size:13px;
  font-weight:700;
  margin-bottom:10px;
  color:#111827;
}

.calv2-form{ display:block !important; }

.calv2-grid{
  display:grid;
  grid-template-columns: 1.3fr 220px 220px;
  gap:10px;
}

.calv2-field label{
  display:block;
  font-size:11px;
  color:#6b7280;
  margin-bottom:4px;
}

.calv2-field input,
.calv2-field textarea{
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;

  width:100%;
  border:1px solid #cfd4e4;
  border-radius:10px;
  padding:8px 10px;
  font-size:13px;
  box-sizing:border-box;
  background:#fff;
  outline:none;
  min-height: 38px;
}

.calv2-field textarea{
  min-height:70px;
  resize:vertical;
}

.calv2-full{ margin-top:10px; }

.calv2-actions{
  display:flex;
  gap:8px;
  margin-top:10px;
}

.calv2-list{
  flex:1;
  overflow:auto;
  background:#fff;
  min-height: 220px; /* tablo asla kaybolmasın */
}

.calv2-table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
}
.calv2-table th,
.calv2-table td{
  padding:10px 12px;
  border-bottom:1px solid #eef1f7;
  text-align:left;
  vertical-align:top;
}
.calv2-table thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:#f9fafc;
  border-bottom:1px solid #e6eaf3;
  font-size:12px;
  color:#374151;
}
.calv2-table tbody tr:hover{ background:#f6f9ff; }

.calv2-subject{ font-weight:700; color:#111827; }
.calv2-desc{
  color:#4b5563;
  max-width:520px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.calv2-edit{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  border-radius:10px;
  border:1px solid #e1e6f2;
  background:#fff;
  color:#1f2a44;
}
.calv2-edit:hover{ background:#f3f6ff; }

/* =========================
   TAKVİM (calendar.php iframe) - BOYUT DÜZELTME
========================= */
.calendar-frame-wrapper{
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: transparent;
  padding: 0;
}

.calendar-frame{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* =========================================================
   TESLİMAT LİSTESİ - FİLTRE OVERLAY (GÖRÜNÜR OLMASIN DİYE)
   ========================================================= */

.filter-overlay{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.35);
  display: none;                 /* 👈 EN ÖNEMLİSİ: varsayılan gizli */
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

/* JS açınca bunu kullanabilirsin (istersen) */
.filter-overlay.is-open{
  display: flex;
}

.filter-box{
  width: 980px;
  max-width: 96vw;
  max-height: 90vh;
  background: #fff;
  border: 1px solid #e8edf7;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
}

.filter-left{
  width: 260px;
  background: #f7f9ff;
  border-right: 1px solid #e6eaf2;
  padding: 14px;
}

.filter-left-header{
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 10px;
  color: #0f172a;
}

.filter-left-list{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-field-btn{
  text-align: left;
  border: 1px solid #e1e6f2;
  background: #fff;
  border-radius: 12px;
  padding: 10px 10px;
  cursor: pointer;
  font-size: 12px;
}

.filter-field-btn.active{
  background: #e7efff;
  border-color: #cfe0ff;
  font-weight: 800;
}

.filter-right{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.filter-right-header{
  padding: 12px 14px;
  border-bottom: 1px solid #e6eaf2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
}

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

.filter-apply-btn{
  height: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #d8e2fb;
  background: #f3f6fb;
  cursor: pointer;
  font-size: 12px;
}

.filter-close-dot{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid #e6eaf2;
  background: #fff;
  cursor: pointer;
}

.filter-search{
  padding: 12px 14px;
  border-bottom: 1px solid #e6eaf2;
  background: #f8fafc;
}

.filter-search input{
  width: 100%;
  border-radius: 12px;
  border: 1px solid #e6eaf2;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  background: #fff;
}

.filter-values{
  padding: 12px 14px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

/* =========================
   TESLİMAT LİSTESİ / TRACK - SCROLL FIX
   ========================= */
.delivery-track-layout{
  flex: 1;
  min-height: 0;
  display: flex;
}

.delivery-track-left{
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* tablo sarmalayıcı zaten overflow:auto ama yüksekliği alabilsin */
.delivery-track-left .erp-table-wrapper{
  flex: 1;
  min-height: 0;
  overflow: auto;
}

/* =========================
   TESLİMAT LİSTESİ: içerik tam görünsün
   ========================= */
#teslimatPage table.erp-table{
  table-layout: auto;          /* fixed yerine */
}

#teslimatPage table.erp-table th,
#teslimatPage table.erp-table td{
  white-space: normal;         /* satır kır */
  overflow: visible;           /* kesme */
  text-overflow: clip;         /* ... kapat */
  word-break: break-word;      /* uzun kelimeleri kır */
}

/* =========================================================
   TESLİMAT TAKİP - TESLİMAT DETAY OVERLAY (POPUP)
   ========================================================= */

.delivery-detail-overlay{
  position: fixed;
  inset: 0;
  display: none;                 /* ✅ varsayılan gizli */
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10000;
  background: rgba(15,23,42,.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.delivery-detail-overlay.open{
  display: flex;                 /* ✅ sadece open olunca görünür */
}

.delivery-detail-box{
  width: min(760px, 96vw);
  background: #fff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  box-shadow:
    0 24px 60px rgba(15,23,42,.18),
    0 2px 10px rgba(15,23,42,.06);
  padding: 18px 18px 16px;
  position: relative;
}

.delivery-detail-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(15,23,42,0.04);
  color: #0f172a;
  border-radius: 10px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: .15s ease;
}
.delivery-detail-close:hover{
  background: rgba(15,23,42,0.08);
  transform: translateY(-1px);
}

.delivery-detail-title{
  margin: 2px 0 14px;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: .2px;
}

.delivery-detail-grid{
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 14px;
  align-items: start;
}

.delivery-detail-label{
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.delivery-detail-value{
  font-size: 13px;
  color: #0f172a;
  padding: 10px 12px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 12px;
  background: #fff;
}

.delivery-detail-note{
  grid-column: 1 / -1;
  margin-top: 4px;
}

.delivery-detail-note-box{
  margin-top: 6px;
  min-height: 90px;
  padding: 10px 12px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  white-space: pre-wrap;
}

@media (max-width: 520px){
  .delivery-detail-grid{
    grid-template-columns: 1fr;
  }
}

/* =========================
   ✅ Teslimat Detay - Ürünler alanı scroll fix
   ========================= */

/* Popup ekrana sığsın */
.delivery-detail-box{
  max-height: 92vh;      /* ekranı taşırmasın */
  overflow: hidden;      /* iç scroll alanları kontrol bizde */
  display: flex;
  flex-direction: column;
}

/* Grid alanı (başlık dışında) kaydırılabilir olsun */
.delivery-detail-grid{
  flex: 1;
  min-height: 0;
  overflow: auto;        /* çok uzarsa burada scroll da olur */
}

/* Ürünler kutusu kendi içinde scroll */
.delivery-detail-products-box{
  margin-top: 6px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 12px;
  background: #fff;

  max-height: 260px;     /* burayı istersen 320 yap */
  overflow: auto;
}

/* Ürün tablosu daha düzgün dursun */
.delivery-detail-products-box table{
  width: 100%;
  border-collapse: collapse;
}

.delivery-detail-products-box th,
.delivery-detail-products-box td{
  padding: 8px 6px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

/* Başlık sabit kalsın */
.delivery-detail-products-box thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}


/* ✅ Modern Edit (Kalem) ikon butonu */
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e6ebf5;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 160ms ease;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  color: #64748b; /* modern gri */
}

.icon-btn:hover {
  background: #f6f8ff;
  border-color: #d7def0;
  transform: translateY(-1px);
}

.icon-btn:active {
  transform: translateY(0);
}

.icon-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59,130,246,.18);
}

/* mevcut butonun içindeki ikon varsa (FA) onu da toparlamak için */
.row-edit-btn.icon-btn i {
  font-size: 16px;
}


.track-status-select{
    height:34px;
    border-radius:999px;
    border:1px solid rgba(0,0,0,0.12);
    background:#fff;
    padding:0 38px 0 14px;
    font-size:13px;
    outline:none;

    /* modern görünüm */
    appearance:none;
    -webkit-appearance:none;
    -moz-appearance:none;

    /* sağda ok ikon */
    background-image:
      linear-gradient(45deg, transparent 50%, #64748b 50%),
      linear-gradient(135deg, #64748b 50%, transparent 50%),
      linear-gradient(to right, transparent, transparent);
    background-position:
      calc(100% - 18px) 14px,
      calc(100% - 12px) 14px,
      0 0;
    background-size:
      6px 6px,
      6px 6px,
      100% 100%;
    background-repeat:no-repeat;

    transition: box-shadow .2s ease, border-color .2s ease;
}

.track-status-select:hover{
    box-shadow: 0 0 8px rgba(0,0,0,0.08);
}

.track-status-select:focus{
    border-color: rgba(59,130,246,0.55);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.18);
}

/* ==============================
   Teslimat Takip - Assign Form (layout fix)
   ============================== */

.delivery-assign-wrapper{
  margin: 12px 0 10px;
  padding: 14px 14px 12px;
  border: 1px solid #e6eefc;
  border-radius: 14px;
  background: #ffffff;
}

.delivery-assign-row{
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;              /* daralınca alta geçsin */
}

.delivery-assign-row .form-group{
  flex: 1 1 220px;              /* min genişlik -> full width olmasın */
  min-width: 220px;
}

.delivery-assign-row .form-group label{
  display:block;
  font-size: 12px;
  color:#4b5563;
  margin: 0 0 6px;
}

.delivery-assign-row .form-group input,
.delivery-assign-row .form-group select{
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #e6eefc;
  padding: 0 12px;
  outline: none;
  background: #fff;
}

.delivery-assign-row .form-group.note-full{
  flex: 1 1 100%;
  min-width: 100%;
}

.delivery-assign-row .form-group textarea{
  width: 100%;
  min-height: 80px;
  border-radius: 12px;
  border: 1px solid #e6eefc;
  padding: 10px 12px;
  outline: none;
  background: #fff;
  resize: vertical;
}

.delivery-assign-actions{
  margin-top: 10px;
}

/* ==============================
   İş Ortağı Autocomplete (MUTLAKA LAZIM)
   ============================== */

.partner-autocomplete-group{
  position: relative; /* ✅ listeyi input altına bağlar */
}

.partner-autocomplete-list{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 9999;
  display: none; /* JS açıyor */
  background: #fff;
  border: 1px solid #e6eefc;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  max-height: 240px;
  overflow: auto;
}

.partner-autocomplete-item{
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #0f172a;
}

.partner-autocomplete-item:hover,
.partner-autocomplete-item.active{
  background: #f1f6ff;
}

/* ==============================
   "Tüm durumlar" select modernleştirme
   ============================== */

.track-status-select{
  height: 40px;
  border-radius: 12px;
  border: 1px solid #e6eefc;
  padding: 0 36px 0 12px;
  background: #fff;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 16px,
    calc(100% - 12px) 16px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* =========================
   Sidebar Logo (DTS Pro)
   ========================= */

.erp-side-menu-header{
  justify-content: center;
  gap: 6px;
  font-size: 14px;      /* 🔽 biraz küçülttük */
  font-weight: 800;
}

.logo-icon{
  display: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .5px;
}

/* Sidebar daraltılınca */
body.sidebar-collapsed .logo-text{
  display: none;
}

body.sidebar-collapsed .logo-icon{
  display: block;
}

.status-badge{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
}

/* Planlandı → gri */
.status-planlandi{ background:#f1f3f5; color:#495057; }

/* Ambara verildi → turuncu */
.status-ambara-verildi{ background:#fff4e6; color:#d9480f; }

/* Teslim edildi → yeşil */
.status-teslim-edildi{ background:#e6fcf5; color:#087f5b; }

/* Kargoya verildi → mor */
.status-kargoya-verildi{ background:#f3f0ff; color:#5f3dc4; }

/* İptal edildi → kırmızı */
.status-iptal-edildi{ background:#fff5f5; color:#c92a2a; }


/* =========================
   ✅ PIN Required Modal
   ========================= */
.dts-modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 26, 48, .55);
  backdrop-filter: blur(10px);
}


.dts-modal-overlay.open{
  display: flex;
}


.dts-modal{
  width: min(520px, 94vw);
  background: #fff;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0,0,0,.22);
  padding: 18px 18px 16px;
  position: relative;
  animation: dtsPop .16s ease-out;
}

@keyframes dtsPop{
  from{ transform: translateY(8px) scale(.98); opacity: .0; }
  to  { transform: translateY(0) scale(1); opacity: 1; }
}

.dts-modal-x{
  position:absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(15,23,42,.04);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #0f172a;
}
.dts-modal-x:hover{ background: rgba(15,23,42,.08); }

.dts-modal-icon{
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #f3f6fb;
  border: 1px solid #e8edf7;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom: 10px;
  color: #1d4ed8;
}
.dts-modal-icon i{ font-size: 20px; }

.dts-modal-title{
  font-size: 16px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 6px;
}

.dts-modal-text{
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
}

.dts-modal-actions{
  display:flex;
  gap: 10px;
  justify-content:flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(15,23,42,.08);
}

/* =========================
   GLOBAL LOADER (EnterERP)
   ========================= */

.dts-loader-overlay{
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(243,246,251,.55);
  backdrop-filter: blur(3px);
}

.dts-loader-overlay.active{
  display: flex;
}

.dts-loader-box{
  background: rgba(255,255,255,.95);
  border: 1px solid #e6eaf2;
  border-radius: 18px;
  padding: 16px 22px 14px;
  box-shadow: 0 24px 60px rgba(15,23,42,.18);
  text-align: center;
}

.dts-loader-text{
  margin-top: 10px;
  font-size: 13px;
  color: #64748b;
  font-weight: 600;
}

/* EnterERP bar animasyonu */
.dts-loader-bars{
  height: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dts-loader-bars span{
  width: 6px;
  height: 10px;
  border-radius: 999px;
  background: #1d4ed8;
  animation: dtsLoaderPulse .9s infinite ease-in-out;
}

.dts-loader-bars span:nth-child(2){ animation-delay:.12s }
.dts-loader-bars span:nth-child(3){ animation-delay:.24s }
.dts-loader-bars span:nth-child(4){ animation-delay:.36s }

@keyframes dtsLoaderPulse{
  0%,100%{ height:10px; opacity:.45 }
  50%{ height:22px; opacity:1 }
}



/* ==============================
   Teslimat Takip - Ürün Grid
============================== */
.tt-products-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.tt-products-actions{
  display:flex;
  gap:8px;
}

.tt-products-box{
  border:1px solid #e6edf7;
  border-radius:12px;
  background:#fff;
  padding:10px;
}

.tt-products-table-wrap{
  max-height:180px;            /* ürünleri görecek kadar */
  overflow:auto;
  border-radius:10px;
}

.tt-products-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:13px;
}

.tt-products-table thead th{
  position:sticky;
  top:0;
  background:#f7faff;
  z-index:1;
  text-align:left;
  padding:10px;
  border-bottom:1px solid #e6edf7;
}

.tt-products-table td{
  padding:8px 10px;
  border-bottom:1px solid #f0f4fb;
  vertical-align:middle;
}

.tt-products-table input{
  width:100%;
  border:1px solid #e6edf7;
  border-radius:10px;
  padding:8px 10px;
  outline:none;
}

.tt-suggest-item{
  padding:10px 12px;
  cursor:pointer;
  border-bottom:1px solid #f1f5ff;
}
.tt-suggest-item:hover{
  background:#f6f9ff;
}
.tt-suggest-item strong{
  font-weight:700;
}



.tt-products-exit:hover{
  background: #f6f9ff;
  transform: translateY(-1px);
}


/* ✅ Autocomplete listesi artık fixed olarak ekrana basılacak */
.tt-prod-suggest{
  /* JS bunu fixed + body altına taşıyacak */
  position: fixed !important;
  z-index: 30000 !important;
  max-height: 260px;
  overflow: auto;
}

/* ✅ TTProducts fullscreen toolbar */
.tt-products-box.is-fullscreen .tt-products-fsbar{
  position: sticky;
  top: 0;
  z-index: 99999;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border-bottom: 1px solid #e6eaf2;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

/* Backdrop varsa tıklanabilir olsun */
#ttProductsBackdrop{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  z-index: 29990;
}



/* içerideki tablo alanı full ekranda büyüsün */
.tt-products-box.is-fullscreen .tt-products-table-wrap{
  max-height: calc(100vh - 160px);
}


#ttProductsBackdrop{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 19999;

  /* 🔥 TÜM TIKLAMA SORUNUNUN ÇÖZÜMÜ */
  pointer-events: none;
}


body.tt-products-fullscreen {
  overflow: hidden;
}

/* ✅ TT Products gerçek fullscreen */
.tt-products-box.is-fullscreen{
  position: fixed;
  left: calc(var(--sidebarW) + 18px); /* sidebar açıkken */
  top: calc(var(--topbarH) + 18px);
  right: 18px;
  bottom: 18px;
  z-index: 30001;
  box-shadow: 0 24px 60px rgba(15,23,42,.18);
}

/* Sidebar collapsed durumunda sol boşluğu düzelt */
body.sidebar-collapsed .tt-products-box.is-fullscreen{
  left: calc(var(--sidebarWCollapsed) + 18px);
}

/* Fullscreen toolbar üstte dursun */
.tt-products-box.is-fullscreen .tt-products-fsbar{
  position: sticky;
  top: 0;
  z-index: 30002;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border-bottom: 1px solid #e6eaf2;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

/* İç tablo alanı büyüsün */
.tt-products-box.is-fullscreen .tt-products-table-wrap{
  max-height: calc(100% - 56px);
}


/* ==============================
   ✅ TT Products - Satır altı Autocomplete Panel
============================== */
.tt-suggest-row td{
  padding: 0 !important;
  border-bottom: 1px solid #f0f4fb;
  background: transparent;
}

.tt-suggest-panel{
  margin: 6px 10px 10px;
  border: 1px solid #e6edf7;
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
  overflow: hidden;
}

.tt-suggest-item{
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eef2ff;
}

.tt-suggest-item:last-child{
  border-bottom: none;
}

.tt-suggest-item:hover{
  background: #eef6ff;
}

.tt-suggest-item strong{
  font-weight: 800;
}

.delivery-detail-products-box td:nth-child(3){
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ==============================
   İSTATİSTİK (istatistik.php)
   ============================== */

#istatistikPage{
  display:flex;
  flex-direction:column;
  min-height: 0;
}

/* Body artık flex kolon olacak */
#istatistikPage .erp-page-body{
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 14px 16px 16px;
  display: flex;              /* ✅ EKLENDİ */
  flex-direction: column;
  gap: 10px;
  overflow: hidden;           /* ✅ scroll tablo alanında olacak */
}

/* Filtre alanı düzeni */
#istatistikPage .istatistik-filters{
  display:grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap:12px;
  align-items:end;
  margin-bottom:12px;
}

#istatistikPage .istatistik-field label{
  font-size:12px;
  color:#475569;
  display:block;
  margin-bottom:6px;
}

#istatistikPage .istatistik-input,
#istatistikPage .istatistik-select{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  outline:none;
}

#istatistikPage .istatistik-input:focus,
#istatistikPage .istatistik-select:focus{
  border-color: rgba(29,78,216,.45);
  box-shadow: 0 0 0 3px rgba(29,78,216,.12);
}

#istatistikPage .istatistik-actions{
  display:flex;
  align-items:end;
}

/* Mobil */
@media (max-width: 1100px){
  #istatistikPage .istatistik-filters{
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}
@media (max-width: 640px){
  #istatistikPage .istatistik-filters{
    grid-template-columns: 1fr;
  }
}

/* Toplam pill */
#istatistikPage .istatistik-summary{
  color:#64748b;
  font-size:12px;
  margin-top:6px;
}

#istatistikPage .istatistik-pill{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  background:#eef2ff;
  color:#1d4ed8;
  font-size:12px;
  margin: 0 4px;
}

/* ✅ Tablo alanı: scroll burada */
#istatistikPage .istatistik-table-wrap{
  flex: 1;                   /* ✅ kalan alanı kapla */
  min-height: 0;             /* ✅ overflow çalışsın */
  margin-top: 10px;
  overflow: auto;            /* ✅ Dikey scroll */
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background:#fff;
}

#istatistikPage .istatistik-table{
  width:100%;
  border-collapse:collapse;
  font-size:13px;
  min-width: 900px;          /* yatay scroll için */
}

#istatistikPage .istatistik-table thead th{
  position:sticky;
  top:0;
  background:#f8fafc;
  color:#334155;
  font-weight:600;
  padding:10px;
  border-bottom:1px solid #eef2f7;
  text-align:left;
  z-index: 2;
}

#istatistikPage .istatistik-table td{
  padding:10px;
  border-bottom:1px solid #eef2f7;
}

#istatistikPage .istatistik-table td.right,
#istatistikPage .istatistik-table th.right{
  text-align:right;
}

#istatistikPage .istatistik-table tbody tr:hover{
  background:#f8fafc;
}

/* ✅ Collapsed iken width animasyonu olmasın (flash hissini öldürür) */
body.sidebar-collapsed .erp-side-menu-panel{
  transition: none !important;
}

/* ✅ Overlay açıkken footer yazısı görünmesin */
.edit-overlay.open ~ .erp-page-footer,
.delivery-detail-overlay.open ~ .erp-page-footer,
.filter-overlay.is-open ~ .erp-page-footer{
  opacity: 0 !important;
  pointer-events: none !important;
}




@media (max-width: 1000px){
  .calv2-grid{ grid-template-columns: 1fr; }
}


@media (max-width: 1000px){
  .calendar-grid{
    grid-template-columns: 1fr;
  }
}


/* copyright kaldır (görsel-3 gibi temiz) */
.erp-global-copyright{ display:none !important; }
