/* ==========================================================================
   Genel Matris (GM) - Modern ERP & CFO Cockpit Styling
   ========================================================================== */

:root {
  --gm-sidebar-bg: #0f172a;
  --gm-sidebar-border: #1e293b;
  --gm-brand-primary: #1e40af;
  --gm-brand-blue: #2563eb;
  --gm-brand-gold: #d97706;
  --gm-brand-emerald: #059669;
  --gm-brand-purple: #475569;
  --gm-card-bg: #ffffff;
  --gm-card-border: #e2e8f0;
}

/* Base layout adjustments */
body.app-body {
  margin: 0;
  padding: 0;
  background-color: #f8fafc;
  font-family: 'Plus Jakarta Sans', Manrope, system-ui, -apple-system, sans-serif;
  color: #0f172a;
  overflow-x: hidden;
}

#main-app,
#main-app.modern-app-layout,
.modern-app-layout {
  display: flex !important;
  flex-direction: row !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  position: relative !important;
  background: #f1f5f9 !important;
}

/* Obsidian Dark Sidebar */
#mainSidebar {
  width: 270px !important;
  min-width: 270px !important;
  max-width: 270px !important;
  background-color: var(--gm-sidebar-bg) !important;
  border-right: 1px solid var(--gm-sidebar-border) !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  height: 100dvh !important;
  flex-shrink: 0 !important;
  z-index: 50 !important;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@media (max-width: 900px) {
  body.app-body {
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !important;
  }
  #main-app,
  #main-app.modern-app-layout,
  .modern-app-layout {
    flex-direction: column !important;
  }
  #mainSidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 280px !important;
    min-width: 280px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    transform: translateX(-100%) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
  }
  #mainSidebar.sidebar-open {
    transform: translateX(0) !important;
  }
}

/* Sidebar Brand */
.sidebar-brand-box {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.sidebar-logo-inner {
  width: 100%;
  height: 100%;
  background: #0f172a;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.5px;
}

/* Sidebar Navigation Items */
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
}

.sidebar-tier-label {
  padding: 10px 12px 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Sidebar Accordion Engine */
.sidebar-tier {
  margin-bottom: 6px;
}

.sidebar-tier-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
  text-align: left;
}

.sidebar-tier-toggle:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-tier.open .sidebar-tier-toggle {
  color: #93c5fd;
  background-color: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.15);
}

.sidebar-tier .tier-chevron {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-tier.open .tier-chevron {
  transform: rotate(180deg);
}

.sidebar-tier-content {
  display: none;
  padding-top: 4px;
  padding-left: 2px;
  padding-right: 2px;
}

.sidebar-tier.open .sidebar-tier-content {
  display: block;
}

.side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

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

.side-link.active {
  background: #1e293b;
  color: #ffffff;
  border-left: 3px solid #3b82f6;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.side-link.active svg {
  color: #60a5fa !important;
  filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.25));
}

.side-link-icon-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

.side-badge-orange { background: rgba(255, 106, 26, 0.2); color: #ff8c42; }
.side-badge-green { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.side-badge-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.side-badge-red { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.side-badge-purple { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }

/* Main Content Area */
#mainScrollArea {
  flex: 1 1 0% !important;
  min-width: 0 !important;
  width: calc(100vw - 270px);
  display: flex !important;
  flex-direction: column !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  position: relative !important;
  background-color: #f8fafc;
}

@media (max-width: 900px) {
  #mainScrollArea {
    width: 100vw !important;
    min-width: 100vw !important;
  }
}

/* Glass Header */
.cockpit-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
  flex-shrink: 0 !important;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Currency Switcher Buttons */
.curr-switch-group {
  display: flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.curr-switch-btn {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.curr-switch-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Quick Action Pills */
.cockpit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.cockpit-btn-primary {
  background: #1e40af;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(30, 64, 175, 0.2);
}

.cockpit-btn-primary:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.cockpit-btn-outline {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

.cockpit-btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

/* Modern Modals */
.gm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.gm-modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.gm-modal-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.gm-modal-overlay.active .gm-modal-card {
  transform: translateY(0) scale(1);
}

.gm-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gm-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.gm-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

/* Pulse animation */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
  50% { box-shadow: 0 0 0 8px rgba(249, 115, 22, 0.3); }
}

.highlight-pulse {
  animation: pulseGlow 2s infinite ease-in-out;
}

/* Toast Notification */
#gmToastBox {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.gm-toast {
  pointer-events: auto;
  padding: 12px 18px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s ease-out forwards;
}

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

/* ==========================================================================
   DESKTOP VS MOBILE DEFAULTS
   ========================================================================== */
.bottom-nav {
  display: none !important;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATIONS (iOS & Android)
   ========================================================================== */
@media (max-width: 900px) {
  /* 1. Header on Mobile */
  .cockpit-header {
    padding: 8px 12px !important;
    gap: 8px !important;
  }
  .cockpit-header .header-search-wrap {
    display: none !important;
  }
  .cockpit-header .mobile-current-title {
    display: flex !important;
    align-items: center;
    gap: 6px;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
  }
  .cockpit-header .curr-ticker {
    display: flex !important;
    padding: 3px 6px !important;
    font-size: 10px !important;
    gap: 4px !important;
    background: #f8fafc !important;
  }

  /* 2. Sidebar Drawer on Mobile */
  #mainSidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 285px !important;
    min-width: 285px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    transform: translateX(-100%) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
    z-index: 75 !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overscroll-behavior: contain;
  }
  #mainSidebar .sidebar-scroll {
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  #mainSidebar.sidebar-open {
    transform: translateX(0) !important;
  }

  /* 3. Backdrop on Mobile */
  #sidebarBackdrop {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 70 !important;
  }
  #sidebarBackdrop.active {
    display: block !important;
  }

  /* 4. Main Scroll Area on Mobile */
  #mainScrollArea {
    width: 100vw !important;
    min-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* 5. Currency Switcher on Mobile */
  .curr-switch-group {
    padding: 2px !important;
  }
  .curr-switch-btn {
    padding: 4px 7px !important;
    font-size: 11px !important;
  }

  /* 6. Modals on Mobile (Onayla/Vazgeç butonları tam görünür, bottom-nav üzerine oturmaz) */
  .gm-modal-overlay {
    padding: 8px 8px calc(72px + env(safe-area-inset-bottom, 0px)) 8px !important;
    align-items: flex-end !important;
    z-index: 105 !important;
  }
  .gm-modal-card {
    max-width: 100% !important;
    width: 100% !important;
    max-height: calc(84vh - 65px) !important;
    border-radius: 18px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45) !important;
  }
  .gm-modal-header {
    padding: 12px 14px !important;
    shrink: 0 !important;
  }
  .gm-modal-body {
    padding: 12px 14px !important;
    max-height: 52vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex: 1 !important;
  }
  .gm-modal-footer {
    padding: 10px 14px !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10 !important;
    shrink: 0 !important;
  }
  .gm-modal-footer .cockpit-btn {
    flex: 1 1 auto !important;
    min-width: 110px !important;
    padding: 10px 12px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    justify-content: center !important;
  }

  /* Prevent iOS zoom on inputs */
  .gm-modal-body input,
  .gm-modal-body select,
  .gm-modal-body textarea,
  .cockpit-header input {
    font-size: 16px !important;
  }

  /* 7. Bottom Navigation Styling (Global ERP Standart: Üstte Kurumsal Sembol + Altta Mikro Başlık) */
  .bottom-nav {
    display: flex !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 65 !important;
    height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.05) !important;
    touch-action: manipulation;
  }
  .bottom-nav-scroll {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: center !important;
    justify-items: center !important;
    width: 100% !important;
    height: 100% !important;
    gap: 0 !important;
    overflow: hidden !important;
  }
  .bottom-nav a,
  .bottom-nav button {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important;
    width: 100% !important;
    padding: 2px 0 !important;
    color: #64748b !important;
    text-decoration: none !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    transition: all 0.15s ease !important;
    gap: 3px !important;
  }
  .bottom-nav a:hover,
  .bottom-nav button:hover {
    color: #1e293b !important;
  }
  .bottom-nav a:active,
  .bottom-nav button:active {
    background-color: #f1f5f9 !important;
    transform: scale(0.96) !important;
  }
  .bottom-nav a.active,
  .bottom-nav button.active {
    color: #1e40af !important;
  }
  .bottom-nav a.active::before,
  .bottom-nav button.active::before {
    content: '' !important;
    position: absolute !important;
    top: -6px !important;
    width: 24px !important;
    height: 3px !important;
    background: #2563eb !important;
    border-radius: 0 0 3px 3px !important;
  }
  .bottom-nav .bn-svg {
    display: block !important;
    width: 21px !important;
    height: 21px !important;
    stroke-width: 2 !important;
    transition: transform 0.15s ease !important;
  }
  .bottom-nav a.active .bn-svg,
  .bottom-nav button.active .bn-svg {
    stroke-width: 2.3 !important;
    color: #2563eb !important;
    transform: translateY(-1px) !important;
  }
  .bottom-nav a span,
  .bottom-nav button span {
    display: block !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    line-height: 1 !important;
    color: inherit !important;
  }
  .bottom-nav a.active span,
  .bottom-nav button.active span {
    font-weight: 800 !important;
    color: #1e40af !important;
  }

  /* 8. Tables and Horizontal Scrolling */
  .table-responsive,
  .table-container,
  div[class*="overflow-x-auto"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
  }

  /* 9. CFO Desk Tabs on Mobile */
  #cfoDesk .flex.items-center.gap-1\.5 {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 4px !important;
    width: 100% !important;
  }

  /* 10. Toasts on Mobile */
  #gmToastBox {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    right: 12px !important;
    left: 12px !important;
  }
  .gm-toast {
    width: auto !important;
    font-size: 12px !important;
    padding: 10px 14px !important;
  }
}

/* Extra small screens (iPhone SE, smaller Android devices) */
@media (max-width: 420px) {
  .cockpit-btn span {
    display: none !important;
  }
  .cockpit-btn {
    padding: 7px 9px !important;
  }
  .curr-switch-btn {
    padding: 3px 6px !important;
    font-size: 10px !important;
  }
}

/* Global utility fallbacks */
.hidden {
  display: none !important;
}

.flex-1 {
  flex: 1 1 0% !important;
}

/* ========================================================================= */
/* 11. KURUMSAL BASKI VE ÇOKLU SAYFA PDF RAPOR TASARIMI (@media print)       */
/* ========================================================================= */
@page {
  size: A4 portrait;
  margin: 12mm 10mm 14mm 10mm;
}

@page :first {
  margin-top: 10mm;
}

@media print {
  /* Ekran arayüzü elemanlarını tamamen gizle */
  #mainSidebar,
  .modern-topbar,
  .topbar-nav,
  #sidebarBackdrop,
  .sidebar-brand-box,
  .sidebar-scroll,
  .gm-modal-overlay:not(.gm-print-active-modal),
  .bottom-nav,
  .btn-primary,
  .btn-secondary,
  .btn-submit,
  .btn-link,
  .cockpit-btn,
  .curr-switch-group,
  .curr-ticker,
  .invoice-toolbar,
  button,
  form:not(.printable-form),
  input[type="text"],
  input[type="search"],
  input[type="checkbox"],
  select,
  .no-print,
  #gmToastBox,
  .ai-bubble,
  .ai-panel,
  .mobile-nav-toggle,
  .eyebrow + .flex,
  .page-head > .flex,
  .tier-chevron,
  .bulk-bar,
  .bulk-cell,
  th.bulk-cell,
  td.bulk-cell,
  .row-actions,
  td.row-actions,
  footer,
  .app-footer {
    display: none !important;
  }

  /* Sayfa genel ayarları ve Tam Sayfa Akışı (Kesilmeleri Kesinlikle Önler) */
  html, body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Calibri, Arial, sans-serif !important;
    font-size: 8.5pt !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* TÜM ANCESTOR ELEMANLARDA HEIGHT: 100VH VE OVERFLOW: HIDDEN KIRILMASI */
  #main-app,
  #main-app.modern-app-layout,
  .modern-app-layout,
  #mainScrollArea,
  .modern-main-wrap,
  .modern-main-content,
  .page-container,
  .panel,
  .table-container,
  div[class*="overflow-x-auto"],
  div[class*="overflow-y-auto"],
  article.invoice-sheet,
  .page,
  main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    box-shadow: none !important;
    border: none !important;
    background: #ffffff !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
  }

  /* Kurumsal Antet Başlığı (Logolu Resmi Çıktı Anteti - Sayfa 1) */
  .corporate-print-banner,
  .corporate-print-banner.hidden,
  div.corporate-print-banner {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 2.5pt solid #ea580c !important;
    padding-bottom: 8pt !important;
    margin-bottom: 12pt !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }
  .corporate-print-banner .print-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 10pt !important;
  }
  .corporate-print-banner .print-header-logo {
    height: 38pt !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
  }
  .corporate-print-banner .print-corp-name {
    font-size: 12pt !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    letter-spacing: -0.01em !important;
  }
  .corporate-print-banner .print-corp-sub {
    font-size: 8pt !important;
    color: #475569 !important;
    font-weight: 600 !important;
    margin-top: 1pt !important;
  }
  .corporate-print-banner .print-corp-meta {
    font-size: 7pt !important;
    color: #64748b !important;
    margin-top: 1.5pt !important;
  }
  .corporate-print-banner .print-header-right {
    text-align: right !important;
    font-size: 7.5pt !important;
    color: #334155 !important;
    line-height: 1.4 !important;
  }
  .corporate-print-banner .print-badge {
    display: inline-block !important;
    background: #1e293b !important;
    color: #ffffff !important;
    padding: 2pt 5pt !important;
    font-size: 7pt !important;
    font-weight: bold !important;
    border-radius: 2pt !important;
    margin-bottom: 3pt !important;
    text-transform: uppercase !important;
  }
  .corporate-print-banner .print-meta-line {
    margin-top: 1pt !important;
  }
  .corporate-print-banner .print-meta-line span {
    color: #64748b !important;
  }

  /* Kurumsal Dipnot & İmza Onay Blokları */
  .corporate-print-footer,
  .corporate-print-footer.hidden,
  div.corporate-print-footer {
    display: block !important;
    margin-top: 16pt !important;
    padding-top: 8pt !important;
    border-top: 1.5pt solid #cbd5e1 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .print-sign-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 10pt !important;
    margin-bottom: 8pt !important;
  }
  .print-sign-box {
    border: 1pt solid #cbd5e1 !important;
    border-radius: 3pt !important;
    padding: 5pt !important;
    text-align: center !important;
    background: #f8fafc !important;
  }
  .print-sign-title {
    font-size: 7pt !important;
    font-weight: bold !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
  }
  .print-sign-name {
    font-size: 7.5pt !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 3pt 0 14pt 0 !important;
  }
  .print-sign-line {
    font-size: 6.5pt !important;
    color: #64748b !important;
    border-top: 1pt dashed #cbd5e1 !important;
    padding-top: 3pt !important;
  }
  .print-legal-notice {
    font-size: 6.5pt !important;
    color: #64748b !important;
    text-align: center !important;
    margin-top: 5pt !important;
  }

  /* KPI Rapor Özet Kutuları & Birim Dağılımları */
  .report-summary,
  .grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6pt !important;
    margin-bottom: 10pt !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .report-box {
    flex: 1 1 18% !important;
    min-width: 90pt !important;
    border: 1pt solid #cbd5e1 !important;
    border-radius: 4pt !important;
    background: #f8fafc !important;
    padding: 5pt 6pt !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .report-box h4 {
    font-size: 6.8pt !important;
    color: #64748b !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    margin: 0 0 2pt 0 !important;
  }
  .report-box .value {
    font-size: 11pt !important;
    font-weight: 800 !important;
    color: #0f172a !important;
  }
  .unit-breakdown {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4pt !important;
    margin: 4pt 0 8pt 0 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  .unit-chip {
    display: inline-block !important;
    padding: 2.5pt 5pt !important;
    background: #f1f5f9 !important;
    border: 1pt solid #cbd5e1 !important;
    border-radius: 3pt !important;
    font-size: 7.5pt !important;
    color: #334155 !important;
  }

  /* ÇOKLU SAYFAYA UYUMLU RAPOR TABLOLARI (Tekrarlayan Başlık & Sayfa Taşması) */
  table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
    margin-bottom: 10pt !important;
  }
  tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  thead {
    display: table-header-group !important; /* Çoklu sayfalarda her sayfanın başına başlığı yineler */
  }
  tfoot {
    display: table-footer-group !important; /* Çoklu sayfa sonlarında toplamı yineler */
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  th {
    background-color: #1e293b !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 7.5pt !important;
    padding: 4.5pt 3.5pt !important;
    border: 1px solid #475569 !important;
    text-align: left !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  th.text-right, th.num {
    text-align: right !important;
  }
  th.text-center {
    text-align: center !important;
  }
  td {
    border: 1px solid #cbd5e1 !important;
    padding: 3.5pt 3.5pt !important;
    font-size: 7.5pt !important;
    color: #1e293b !important;
    word-break: normal !important;
    overflow: visible !important;
  }
  tbody tr:nth-child(even) td {
    background-color: #f8fafc !important;
  }
  tfoot td {
    background-color: #f1f5f9 !important;
    font-weight: bold !important;
    border-top: 1.5pt solid #475569 !important;
    font-size: 8pt !important;
  }
  td.num, th.num, td.text-right, th.text-right {
    text-align: right !important;
    white-space: nowrap !important;
  }
  td.text-center, th.text-center {
    text-align: center !important;
  }

  /* Metinlerin ve açıklamaların kesilmesini (truncate / ... ) kesinlikle kaldır */
  .truncate,
  [class*="truncate"],
  .max-w-xs {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: none !important;
  }

  /* Rozet ve Metin Detayları */
  .badge, [class*="rounded"] {
    border: 0.5pt solid #cbd5e1 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Başlık ve Detaylar */
  h2, h3, h4 {
    color: #0f172a !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .panel {
    page-break-inside: auto !important;
    break-inside: auto !important;
    margin-bottom: 12pt !important;
  }
}


