/* ==========================================================================
   RESTOPOS Admin Theme
   Kurumsal kimlik: Brand kırmızı (#E31E24) çerçevede, antrasit (#2D2D2D) iç yapıda
   ========================================================================== */

/* ==========================================================================
   1. Design Tokens
   ========================================================================== */

:root {
  /* Font */
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Spacing (8px grid) */
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;

  /* Brand — sadece çerçeve (header, footer, sidebar brand) */
  --brand: #E31E24;
  --brand-dark: #C41A1F;
  --brand-light: #FDE8E8;

  /* Primary — iç yapı (butonlar, linkler, aktif state) */
  --primary: #2D2D2D;
  --primary-light: #F0F0F0;
  --primary-soft: #E5E5E5;
  --primary-dark: #1A1A1A;
  --primary-darker: #111111;

  /* Surfaces */
  --body-bg: #F5F5F5;
  --card-bg: #FFFFFF;
  --sidebar-bg: #FFFFFF;
  --sidebar-text: #1F1F1F;
  --sidebar-active: #1F1F1F;
  --sidebar-hover-bg: #F3F4F6;
  --sidebar-active-bg: #F0F0F0;
  --header-bg: #FFFFFF;
  --footer-bg: #FAFAFA;

  /* Status */
  --success: #22C55E;
  --success-light: #DCFCE7;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --danger: #EF4444;
  --danger-light: #FEE2E2;
  --info: #3B82F6;
  --info-light: #DBEAFE;

  /* Text */
  --text-heading: #111111;
  --text-primary: #1A1A1A;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --text-white: #FFFFFF;

  /* Border */
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --border-dark: #D1D5DB;

  /* Radius */
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;
  --radius-full: 50rem;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);

  /* Layout */
  --sidebar-w: 260px;
  --sidebar-mini-w: 72px;
  --header-h: 56px;
  --footer-h: 40px;
}

/* ==========================================================================
   2. Dark Mode
   ========================================================================== */

[data-theme="dark"] {
  --body-bg: #111111;
  --card-bg: #1A1A1A;
  --sidebar-bg: #0D0D0D;
  --header-bg: #1A1A1A;
  --footer-bg: #141414;
  --text-heading: #E5E5E5;
  --text-primary: #D4D4D4;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --border: #333333;
  --border-light: #262626;
  --border-dark: #444444;
  --primary-light: #333333;
  --primary-soft: #2A2A2A;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
}

/* ==========================================================================
   3. Base
   ========================================================================== */

body {
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: 1.6;
  font-weight: var(--fw-normal);
  background: var(--body-bg);
  color: var(--text-primary);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* Metronic offcanvas panelleri sidebar ustunde gosterilmeli */
#kt_quick_user {
  z-index: 1050 !important;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-base);
  font-weight: var(--fw-bold);
  color: var(--text-heading);
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

h1, .h1 { font-size: 1.5rem; }
h2, .h2 { font-size: 1.375rem; }
h3, .h3 { font-size: 1.125rem; }
h4, .h4 { font-size: 1rem; }
h5, .h5 { font-size: 0.9375rem; }
h6, .h6 { font-size: 0.875rem; }

p {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

label {
  font-size: 0.9375rem;
  font-weight: var(--fw-medium);
  color: var(--text-heading); 
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

small, .small {
  font-size: 0.8125rem;
}

strong, b {
  font-weight: var(--fw-semibold);
}

i {
    font-size: 1.4rem;
    color: #000000;
}
/* ==========================================================================
   4. Layout
   ========================================================================== */
.tm2-main {
    flex: 1;
    min-width: 0;
    overflow: scroll;
}
.app-wrapper {
  min-height: 100vh;
}

.app-main {
  margin-left: var(--sidebar-w) !important;
  min-height: 100vh;
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
  min-width: 0 !important;
  width: calc(100% - var(--sidebar-w)) !important;
}

.app-content {
  padding: var(--sp-lg) var(--sp-xl);
  flex: 1;
}

/* ==========================================================================
   5. Sidebar — Açık tema varsayılan, 3 mod destekli
   Mod 1: Geniş (260px) — varsayılan
   Mod 2: İki katman (60px ikon + 200px alt menü)
   Mod 3: Mini (60px sadece ikon)
   ========================================================================== */

.app-sidebar {
  width: var(--sidebar-w) !important;
  max-width: var(--sidebar-w) !important;
  min-width: var(--sidebar-w) !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  z-index: 1040;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
  overflow: visible;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-sidebar::-webkit-scrollbar { width: 4px; }
.app-sidebar::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 4px; }

/* ---- Brand ---- */
.sidebar-brand {
  height: var(--header-h);
  min-height: 57px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}

.sidebar-brand > a {
  flex: 1;
  min-width: 0;
}

.sidebar-brand-logo {
  height: 24px;
  width: auto;
}

.sidebar-brand-mini {
  display: none;
  height: 24px;
  width: auto;
}

/* ---- Search ---- */
.sidebar-search {
  padding: 12px 16px;
  flex-shrink: 0;
}

.sidebar-search-wrap {
  position: relative;
}

.sidebar-search-input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  background: var(--border-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.sidebar-search-input::placeholder {
  color: var(--text-muted);
}

.sidebar-search-input:focus {
  border-color: var(--border-dark);
  background: var(--card-bg);
}

.sidebar-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

/* ---- Collapse/Expand Button (sidebar sağ kenar ortası) ---- */
.sidebar-toggle-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1041;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: color 0.15s, background 0.15s;
}

.sidebar-toggle-btn:hover {
  color: var(--text-heading);
  background: var(--border-light);
}

.sidebar-toggle-btn i {
  font-size: 16px;
}

/* ---- Nav ---- */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-dark); border-radius: 4px; }

.sidebar-nav .nav-label {
  display: block;
  font-size: 10.5px;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 6px 12px;
  margin-top: 16px;
  margin-bottom: 4px;
}

.sidebar-nav .nav-label:first-child {
  margin-top: 4px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  color: var(--sidebar-text);
  border-radius: var(--radius-md);
  margin-bottom: 2px;
  transition: all 0.15s;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.sidebar-nav .nav > *:last-child > .nav-link,
.sidebar-nav .nav > .nav-link:last-child {
  border-bottom: none;
}

.sidebar-nav .nav-link:hover {
  background: var(--sidebar-hover-bg);
  color: var(--text-heading);
}

.sidebar-nav .nav-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
  font-weight: var(--fw-semibold);
}

.nav-link-icon {
  width: 22px;
  height: 22px;
  margin-right: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--sidebar-text);
  font-size: 18px;
}

.nav-link:hover .nav-link-icon {
  color: var(--text-heading);
}

.nav-link.active .nav-link-icon {
  color: var(--brand);
}

.nav-link-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-link-chevron {
  margin-left: auto;
  font-size: 15px;
  color: var(--sidebar-text);
  transition: transform 0.2s, color 0.15s, background 0.15s;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  cursor: pointer;
  opacity: 0.7;
  background: var(--border-light);
}

.nav-link:hover .nav-link-chevron {
  opacity: 1;
  color: var(--text-heading);
}

.nav-link-chevron:hover {
  background: var(--border-light);
  opacity: 1;
}

.nav-link[aria-expanded="true"] .nav-link-chevron {
  transform: rotate(90deg);
  color: var(--text-heading);
  opacity: 1;
}

/* ---- Submenu ---- */
.sidebar-nav .collapse {
  display: none;
  border-left: 1px solid var(--border);
  margin-left: 24px;
  margin-top: 2px;
  margin-bottom: 4px;
}

.sidebar-nav .collapse.show {
  display: block;
}

.sidebar-nav .collapse .nav-link,
.sidebar-nav .collapsing .nav-link {
  padding: 7px 12px 7px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  position: relative;
}

.sidebar-nav .collapse .nav-link:hover {
  color: var(--text-heading);
  background: var(--border-light);
}

.sidebar-nav .collapse .nav-link.active {
  color: var(--text-heading);
  background: transparent;
  font-weight: var(--fw-semibold);
}

.sidebar-nav .collapse .nav-link.active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
}

/* ---- Merchant info ---- */
.sidebar-merchant {
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-merchant-code {
  font-size: 11px;
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
}

.sidebar-merchant-cancel {
  font-size: 11px;
  color: var(--danger);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.sidebar-merchant-cancel:hover {
  color: var(--danger);
  opacity: 0.8;
}

/* Mini modda merchant gizle */
.app-sidebar.sidebar-mini .sidebar-merchant { display: none !important; }
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-merchant { display: block !important; }

/* ---- User area ---- */
.sidebar-user {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}

.sidebar-user:hover {
  background: var(--border-light);
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--text-white);
  font-size: 12px;
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--text-muted);
}

.sidebar-user-chevron {
  margin-left: auto;
  font-size: 14px;
  color: var(--text-muted);
}

/* User dropdown */
.sidebar-user-menu {
  position: absolute;
  bottom: 100%;
  left: 12px;
  right: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  display: none;
  margin-bottom: 4px;
}

.sidebar-user-menu.show {
  display: block;
}

.sidebar-user-menu .dropdown-item {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: background 0.1s;
}

.sidebar-user-menu .dropdown-item:hover {
  background: var(--border-light);
}

.sidebar-user-menu .dropdown-item i {
  font-size: 16px;
  color: var(--text-muted);
}

.sidebar-user-menu .dropdown-divider {
  margin: 4px 0;
  border-color: var(--border);
}

/* Mini modda user menu: sidebar dışına, sağ tarafa flyout */
.app-sidebar.sidebar-mini .sidebar-user-menu {
  left: 100%;
  right: auto;
  bottom: 0;
  top: auto;
  width: 200px;
  margin-left: 8px;
  margin-bottom: 0;
}

/* Hover-expand'de user menu: normal pozisyon (yukarı açılır) */
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-user-menu {
  left: 12px;
  right: 12px;
  bottom: 100%;
  width: auto;
  margin-left: 0;
  margin-bottom: 4px;
}

/* ---- Mod 2: İki katman ---- */
.app-sidebar.sidebar-two-col {
  width: var(--sidebar-w) !important;
  flex-direction: row !important;
}

.sidebar-icon-strip {
  width: 60px;
  background: var(--border-light);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-icon-strip .icon-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 4px;
  transition: all 0.15s;
  font-size: 20px;
}

.sidebar-icon-strip .icon-item:hover {
  background: var(--border);
  color: var(--text-heading);
}

.sidebar-icon-strip .icon-item.active,
.sidebar-icon-strip .icon-item.active i {
  background: var(--brand);
  color: var(--text-white);
}

.sidebar-sub-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-sub-panel-title {
  padding: 14px;
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sub-panel-back {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.15s;
}

.sub-panel-back:hover {
  background: var(--border);
  color: var(--text-heading);
}

.sidebar-sub-panel-links {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}

    .sidebar-sub-panel-links a {
        display: block;
        padding: 8px 12px;
        font-size: 13px;
        color: var(--text-secondary);
        text-decoration: none;
        border-radius: var(--radius-md);
        transition: all 0.15s;
        border-bottom: dotted 1px #e0e0e0;
        border-radius: 0;
    }

.sidebar-sub-panel-links a:hover {
  background: var(--border-light);
  color: var(--text-heading);
}

.sidebar-sub-panel-links a.active {
  color: var(--text-heading);
  font-weight: var(--fw-semibold);
  background: var(--sidebar-active-bg);
}

/* Mod 2: Mod 1 içeriklerini gizle */
.app-sidebar.sidebar-two-col > .sidebar-brand,
.app-sidebar.sidebar-two-col > .sidebar-search,
.app-sidebar.sidebar-two-col > .sidebar-toggle-btn,
.app-sidebar.sidebar-two-col > .sidebar-nav,
.app-sidebar.sidebar-two-col > .sidebar-merchant,
.app-sidebar.sidebar-two-col > .sidebar-user {
  display: none !important;
}

/* Icon strip ek elemanlar */
.sidebar-icon-strip .strip-brand {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: var(--text-white);
  font-size: 14px;
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 8px;
}

.sidebar-icon-strip .strip-divider {
  width: 28px;
  height: 1px;
  background: var(--border);
  margin: 4px 0 8px;
  flex-shrink: 0;
}

.sidebar-icon-strip .strip-collapse-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  font-size: 18px;
  margin-top: auto;
  flex-shrink: 0;
  transition: all 0.15s;
}

.sidebar-icon-strip .strip-collapse-btn:hover {
  background: var(--border);
  color: var(--text-heading);
}

.sidebar-icon-strip .strip-user {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--text-white);
  font-size: 11px;
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 8px;
  margin-bottom: 4px;
}

/* ---- Mod 3: Mini ---- */
.app-sidebar.sidebar-mini {
  width: 60px;
  overflow: hidden;
}

.app-sidebar.sidebar-mini .sidebar-brand-logo { display: none; }
.app-sidebar.sidebar-mini .sidebar-brand-mini-icon { display: flex; }

/* Mini brand icon */
.sidebar-brand-mini-icon {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: var(--text-white);
  font-size: 16px;
  font-weight: var(--fw-bold);
  align-items: center;
  justify-content: center;
}
.app-sidebar.sidebar-mini .sidebar-search,
.app-sidebar.sidebar-mini .sidebar-toggle-btn,
.app-sidebar.sidebar-mini .nav-link-title,
.app-sidebar.sidebar-mini .nav-link-chevron,
.app-sidebar.sidebar-mini .nav-label,
.app-sidebar.sidebar-mini .collapse,
.app-sidebar.sidebar-mini .sidebar-user-name,
.app-sidebar.sidebar-mini .sidebar-user-role,
.app-sidebar.sidebar-mini .sidebar-user-chevron { display: none !important; }

.app-sidebar.sidebar-mini .sidebar-brand {
  padding: 0;
  justify-content: center;
}

.app-sidebar.sidebar-mini .sidebar-brand > a {
  display: none;
}

.app-sidebar.sidebar-mini .sidebar-nav { padding: 8px 12px; }

.app-sidebar.sidebar-mini .sidebar-nav .nav-link {
  justify-content: center;
  padding: 10px;
  position: relative;
  border-bottom: 1px solid transparent;
}

/* Mini mod tooltip */
.app-sidebar.sidebar-mini .sidebar-nav .nav-link:hover::after {
  content: attr(title);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 8px;
  padding: 5px 10px;
  background: var(--primary);
  color: var(--text-white);
  font-size: 12px;
  font-weight: var(--fw-medium);
  white-space: nowrap;
  border-radius: var(--radius-sm);
  z-index: 1050;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

/* Mini mod tooltip ok isareti */
.app-sidebar.sidebar-mini .sidebar-nav .nav-link:hover::before {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 4px;
  border: 4px solid transparent;
  border-right-color: var(--primary);
  z-index: 1050;
  pointer-events: none;
}

.app-sidebar.sidebar-mini .nav-link-icon {
  margin-right: 0;
}

.app-sidebar.sidebar-mini .sidebar-user {
  justify-content: center;
  padding: 12px;
}

/* mini modda toggle zaten display:none */

/* Mini modda margin-left güncelleme */
.app-sidebar.sidebar-mini ~ .app-main {
  margin-left: 60px !important;
  width: calc(100% - 60px) !important;
}

.app-sidebar.sidebar-mini {
  width: 60px !important;
  max-width: 60px !important;
  min-width: 60px !important;
  transition: none;
}

/* ---- Mod 3: Hover-Expand (Unfoldable) ---- */
.app-sidebar.sidebar-mini.sidebar-mini-hover {
  width: var(--sidebar-w) !important;
  max-width: var(--sidebar-w) !important;
  min-width: var(--sidebar-w) !important;
  box-shadow: var(--shadow-lg);
  overflow: visible;
  transition: none;
}

/* Hover-expand: gizlenen elemanları geri göster */
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-brand > a { display: block !important; }
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-brand-logo { display: block !important; }
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-brand-mini-icon { display: none !important; }
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-search { display: block !important; }
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-toggle-btn { display: flex !important; }
.app-sidebar.sidebar-mini.sidebar-mini-hover .nav-link-title { display: inline !important; }
.app-sidebar.sidebar-mini.sidebar-mini-hover .nav-link-chevron { display: block !important; }
.app-sidebar.sidebar-mini.sidebar-mini-hover .collapse { display: none; }
.app-sidebar.sidebar-mini.sidebar-mini-hover .collapse.show { display: block !important; }
.app-sidebar.sidebar-mini.sidebar-mini-hover .nav-label { display: block !important; }
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-user-name { display: block !important; }
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-user-role { display: block !important; }
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-user-chevron { display: block !important; }

/* Hover-expand: layout düzeltmeleri */
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-brand {
  padding: 0 16px;
  justify-content: flex-start;
}

.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-nav { padding: 8px 12px; }

.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-nav .nav-link {
  justify-content: flex-start;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-nav .nav > *:last-child > .nav-link,
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-nav .nav > .nav-link:last-child {
  border-bottom: none;
}

.app-sidebar.sidebar-mini.sidebar-mini-hover .nav-link-icon {
  margin-right: 11px;
}

.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-user {
  justify-content: flex-start;
  padding: 12px 16px;
}

/* hover-expand'de toggle brand içinde, özel konum gerekmez */

/* Hover-expand: tooltip gizle (artık başlık görünüyor) */
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-nav .nav-link:hover::after,
.app-sidebar.sidebar-mini.sidebar-mini-hover .sidebar-nav .nav-link:hover::before {
  display: none;
}

/* ---- Mobile overlay ---- */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1039;
  display: none;
}

.sidebar-backdrop.show {
  display: block;
}

/* ---- Dark mode sidebar ---- */
[data-theme="dark"] .app-sidebar {
  background: var(--sidebar-bg);
  border-right-color: var(--border);
}

[data-theme="dark"] .sidebar-search-input {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
  color: var(--text-white);
}

[data-theme="dark"] .sidebar-search-input::placeholder {
  color: rgba(255,255,255,0.3);
}

[data-theme="dark"] .sidebar-icon-strip {
  background: rgba(255,255,255,0.03);
  border-right-color: var(--border);
}

/* ==========================================================================
   6. Header
   ========================================================================== */

.app-header {
  height: var(--header-h);
  min-height: 57px;
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-lg);
  display: flex;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-right {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 4px;
}

.sidebar-toggle {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 20px;
}

.sidebar-toggle:hover {
  background: var(--border-light);
}

/* Breadcrumb */
.app-header .breadcrumb {
  margin: 0;
  font-size: 13px;
  padding: 0;
  background: transparent;
}

.app-header .breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
}

.app-header .breadcrumb-item a:hover {
  color: var(--text-primary);
}

.app-header .breadcrumb-item + .breadcrumb-item::before {
  content: ">";
  color: var(--text-muted);
}

.app-header .breadcrumb-item.active {
  color: var(--text-heading);
  font-weight: var(--fw-medium);
}

/* Header buttons */
.header-btn {
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  font-size: 20px;
  transition: all 0.15s;
}

.header-btn:hover {
  background: var(--border-light);
  color: var(--text-heading);
}

.header-btn .badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--header-bg);
}

/* ==========================================================================
   7. Footer
   ========================================================================== */

.app-footer {
    height: var(--footer-h);
    padding: 0 var(--sp-lg);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 12px;
    color: #6b728073;
    flex-shrink: 0;
}

/* ==========================================================================
   8. Page Header
   ========================================================================== */

.page-header {
  margin-bottom: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

/* Card wrapper for list pages (layout) */
.cardfx {
  background: var(--card-bg);
  border: none;
  border-radius: 6px;
  overflow: hidden;
}

.card-bodyfx {
  background: var(--body-bg);
}

.page-title {
  font-size: 1.5rem;
  color: var(--text-heading);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.page-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 2px 0 0;
}

.page-actions {
  flex-shrink: 0;
}

.page-body {
  /* Ana icerik alani */
}

.page-help {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.page-help a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.page-help a:hover {
  color: var(--text-heading);
}

.page-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   9. Cards
   ========================================================================== */

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  /*box-shadow: var(--shadow-sm);*/
}

.card-hover {
  transition: box-shadow 0.2s, transform 0.2s;
}

.card-hover:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
}

.card-title {
  font-size: 1.125rem;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  margin: 0;
}

.card-toolbar {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-body {
  padding: 20px;
}

.card-body.p-0 {
  padding: 0 !important;
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--border-light);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ==========================================================================
   10. KPI / Stat Cards
   ========================================================================== */

.stat-card {
  padding: 20px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}

.stat-label {
  font-size: 12.5px;
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  color: var(--text-heading);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: var(--fw-semibold);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 8px;
}

.stat-trend-up   { color: var(--success); background: var(--success-light); }
.stat-trend-down { color: var(--danger);  background: var(--danger-light); }

/* ==========================================================================
   11. Tables
   ========================================================================== */

.table {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 0;
}

.table thead th {
  font-size: 11.5px;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  white-space: nowrap;
  background: var(--border-light);
}

.table tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

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

.table-hover tbody tr:hover {
  background: rgba(0,0,0,0.015);
}

[data-theme="dark"] .table-hover tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

/* User cell */
.cell-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cell-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cell-user-name {
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  font-size: 13.5px;
}

.cell-user-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   12. Forms
   ========================================================================== */

/* ---- Label ---- */
.form-label {
  font-size: 15px;
  font-weight: var(--fw-semibold);
  margin-bottom: 6px;
  color: var(--text-heading);
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.form-label .required,
.form-label .text-danger {
  color: var(--danger);
  font-weight: var(--fw-bold);
  margin-left: 2px;
}

/* ---- Input / Select / Textarea ---- */
.form-control,
.form-select {
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--card-bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,45,45,0.1);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:disabled,
.form-select:disabled {
  background: var(--border-light);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.form-control:read-only {
  background: var(--border-light);
  border-color: var(--border);
}

textarea.form-control {
  height: auto;
  min-height: 80px;
  resize: vertical;
}

/* ---- Validation: Invalid ---- */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: var(--danger);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.invalid-feedback {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- Validation: Valid ---- */
.form-control.is-valid,
.form-select.is-valid {
  border-color: var(--success);
}

.form-control.is-valid:focus,
.form-select.is-valid:focus {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

.valid-feedback {
  font-size: 12px;
  color: var(--success);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- Help text ---- */
.form-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

/* ---- Checkbox ---- */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: auto;
  padding-left: 0;
}

.form-check-input {
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  background-color: var(--card-bg);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.form-check-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,45,45,0.1);
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-check-input[type="radio"] {
  border-radius: 50%;
}

.form-check-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-check-label {
  font-size: 13.5px;
  font-weight: var(--fw-normal);
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
}

.form-check-input:disabled ~ .form-check-label {
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ---- Switch / Toggle ---- */
.form-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 0;
}

.form-switch .form-check-input {
  width: 38px;
  height: 22px;
  border-radius: var(--radius-full);
  background-color: var(--border-dark);
  border: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E");
  background-position: left 3px center;
  background-size: 16px;
  background-repeat: no-repeat;
  transition: background-color 0.2s, background-position 0.2s;
  cursor: pointer;
}

.form-switch .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(45,45,45,0.1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E");
}

.form-switch .form-check-input:checked {
  background-color: var(--primary);
  background-position: right 3px center;
}

/* ---- Input Group (prefix/suffix) ---- */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-control {
  border-radius: 0;
}

.input-group .form-control:first-child,
.input-group > :first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group .form-control:last-child,
.input-group > :last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  background: var(--border-light);
  border: 1px solid var(--border-dark);
  white-space: nowrap;
}

.input-group-text i {
  font-size: 16px;
  color: var(--text-muted);
}

.input-group:focus-within .input-group-text {
  border-color: var(--primary);
}

/* ---- Search Input (toolbar) ---- */
.toolbar-search {
  position: relative;
  min-width: 280px;
  max-width: 400px;
}

.toolbar-search .form-control {
  padding-left: 38px;
  height: 36px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.toolbar-search .form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(227, 30, 36, 0.08);
}

.toolbar-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

/* input-group tabanli arama (Products vb. — form serialize icin DOM korunuyor) */
.page-actions .input-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  overflow: hidden;
}

.page-actions .input-group:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(227, 30, 36, 0.08);
}

.page-actions .input-group .input-group-prepend {
  display: flex;
  align-items: center;
  padding: 0 4px 0 10px;
  background: transparent;
  border: none;
}

.page-actions .input-group .form-control {
  border: none;
  box-shadow: none;
  height: 36px;
  font-size: 13px;
  padding-left: 4px;
}

.page-actions .input-group .form-control:focus {
  box-shadow: none;
}

/* page-actions icindeki form-row tek satira sigdir */
.page-actions .form-row {
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}

.page-actions .form-row > .col-12.col-lg-4 {
  flex: 0 0 auto;
  width: auto;
  max-width: 280px;
}

.page-actions .form-row > .mr-2 {
  flex-shrink: 0;
}

.page-actions .mb-2 {
  margin-bottom: 0 !important;
}

/* ---- Password Toggle ---- */
.input-password {
  position: relative;
}

.input-password .form-control {
  padding-right: 42px;
}

.input-password .password-toggle {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 40px;
  border: none;
  background: transparent;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: color 0.15s;
}

.input-password .password-toggle:hover {
  color: var(--text-heading);
}

/* ---- Form Layout Helpers ---- */
.form-group {
  margin-bottom: 16px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}

.form-section-title {
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ---- Dark mode form overrides ---- */
[data-theme="dark"] .form-check-input {
  background-color: var(--border);
  border-color: var(--border-dark);
}

[data-theme="dark"] .form-check-input:checked {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
}

[data-theme="dark"] .form-switch .form-check-input {
  background-color: var(--border-dark);
}

[data-theme="dark"] .form-switch .form-check-input:checked {
  background-color: var(--primary-light);
}

[data-theme="dark"] .input-group-text {
  background: var(--border);
  border-color: var(--border-dark);
}

[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-select:disabled {
  background: var(--border);
}

/* ---- Solid Input (filled background — Metronic pattern) ---- */
.form-control-solid,
.form-select-solid {
  background: var(--border-light);
  border-color: var(--border-light);
}

.form-control-solid:focus,
.form-select-solid:focus {
  background: var(--card-bg);
  border-color: var(--primary);
}

[data-theme="dark"] .form-control-solid,
[data-theme="dark"] .form-select-solid {
  background: var(--border);
  border-color: var(--border);
}

[data-theme="dark"] .form-control-solid:focus,
[data-theme="dark"] .form-select-solid:focus {
  background: var(--card-bg);
  border-color: var(--primary-light);
}

/* ---- Separator ---- */
.separator {
  height: 0;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.separator-dashed {
  border-top-style: dashed;
}

/* ==========================================================================
   13. Badges
   ========================================================================== */

.badge {
  font-size: 11.5px;
  font-weight: var(--fw-semibold);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger  { background: var(--danger-light);  color: var(--danger); }
.badge-info    { background: var(--info-light);    color: var(--info); }
.badge-neutral { background: var(--primary-light); color: var(--text-secondary); }

/* ==========================================================================
   14. Buttons
   ========================================================================== */

.btn {
  font-size: 14px;
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-md);
  padding: 6px 14px;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-align: center;
    justify-content: center;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--text-white);
}

.btn-outline-secondary {
  border-color: var(--border-dark);
  color: var(--text-secondary);
}

.btn-outline-secondary:hover {
  background: var(--border-light);
  color: var(--text-heading);
}

.btn-outline-secondary.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-white);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--border-light);
  color: var(--text-heading);
}

/* ==========================================================================
   15. Dropdown
   ========================================================================== */

.dropdown-menu {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 6px;
  background: var(--card-bg);
}

.dropdown-item {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dropdown-item:hover {
  background: var(--border-light);
}

.dropdown-item i {
  font-size: 16px;
  color: var(--text-muted);
}

.dropdown-divider {
  margin: 4px 0;
  border-color: var(--border);
}

/* ==========================================================================
   16. Pagination
   ========================================================================== */

.pagination .page-link {
  font-size: 13px;
  font-weight: var(--fw-medium);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  margin: 0 2px;
}

.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-white);
}

/* ==========================================================================
   17. Background Utilities
   ========================================================================== */

.bg-info-lt    { background: var(--info-light);    color: var(--info); }
.bg-success-lt { background: var(--success-light); color: var(--success); }
.bg-warning-lt { background: var(--warning-light); color: var(--warning); }
.bg-danger-lt  { background: var(--danger-light);  color: var(--danger); }
.bg-brand-lt   { background: var(--brand-light);   color: var(--brand); }
.bg-neutral-lt { background: var(--primary-light);  color: var(--text-secondary); }

.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.fw-semibold    { font-weight: var(--fw-semibold) !important; }

/* ==========================================================================
   18. Chart placeholder
   ========================================================================== */

.chart-placeholder {
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  background: repeating-linear-gradient(
    0deg,
    var(--border-light),
    var(--border-light) 1px,
    transparent 1px,
    transparent 40px
  );
  border-radius: var(--radius-md);
}

.chart-placeholder i {
  font-size: 28px;
  opacity: 0.35;
}

/* ==========================================================================
   18. Login Page (standalone — sidebar/header yok)
   ========================================================================== */

.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f5f6f8;
  padding: 0;
  position: relative;
  overflow: hidden;
}

/* v3: Topografi dalgalari — ust bolge */
.login-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 220px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='200' viewBox='0 0 800 200'%3E%3Cpath d='M0 80c120-40 240 30 360-10s240-50 360-10' fill='none' stroke='%23c8c8c0' stroke-width='0.8' opacity='0.35'/%3E%3Cpath d='M0 110c130-30 220 40 350 0s260-40 370-10' fill='none' stroke='%23c8c8c0' stroke-width='0.8' opacity='0.3'/%3E%3Cpath d='M0 140c100-35 200 25 320-15s280-30 400 5' fill='none' stroke='%23c8c8c0' stroke-width='0.8' opacity='0.25'/%3E%3Cpath d='M0 50c110-25 230 20 340 0s250-45 380-15' fill='none' stroke='%23c8c8c0' stroke-width='0.8' opacity='0.2'/%3E%3C/svg%3E");
  background-size: 800px 200px;
  background-repeat: repeat-x;
  background-position: center top;
  pointer-events: none;
  z-index: 0;
}

/* v3: Topografi dalgalari — alt bolge */
.login-page::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 220px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='200' viewBox='0 0 800 200'%3E%3Cpath d='M0 120c120-40 240 30 360-10s240-50 360-10' fill='none' stroke='%23c8c8c0' stroke-width='0.8' opacity='0.35'/%3E%3Cpath d='M0 90c130-30 220 40 350 0s260-40 370-10' fill='none' stroke='%23c8c8c0' stroke-width='0.8' opacity='0.3'/%3E%3Cpath d='M0 60c100-35 200 25 320-15s280-30 400 5' fill='none' stroke='%23c8c8c0' stroke-width='0.8' opacity='0.25'/%3E%3Cpath d='M0 150c110-25 230 20 340 0s250-45 380-15' fill='none' stroke='%23c8c8c0' stroke-width='0.8' opacity='0.2'/%3E%3C/svg%3E");
  background-size: 800px 200px;
  background-repeat: repeat-x;
  background-position: center bottom;
  pointer-events: none;
  z-index: 0;
}

/* v3: Dikey kirmizi cizgi — ust */
.login-page .line-top {
  width: 2px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, #E31E24);
  animation: breathe 4s ease-in-out infinite;
  flex-shrink: 0;
}

/* v3: Dikey kirmizi cizgi — alt */
.login-page .line-bottom {
  width: 2px;
  height: 56px;
  background: linear-gradient(to bottom, #E31E24, transparent);
  animation: breathe 4s ease-in-out infinite;
  animation-delay: 2s;
  flex-shrink: 0;
}

@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* v3: Logo */
.login-logo {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 8px;
  animation: fadeIn 0.6s ease both 0.1s;
}

.login-logo img {
  height: 32px;
  margin-bottom: 8px;
}

.login-logo .subtitle {
  display: block;
  font-size: 11px;
  color: #666;
  letter-spacing: 0.5px;
}

/* v3: Form alani */
.login-form-area {
  width: 340px;
  margin-top: 32px;
  animation: fadeIn 0.6s ease both 0.2s;
}

.login-page .form-label-top {
  font-size: 10px;
  color: #777;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-weight: 600;
}

/* v3: Hata mesaji */
.login-page .alert-error {
  background: #FDE8E8;
  border-left: 3px solid #E31E24;
  color: #8B1A1A;
  padding: 10px 14px;
  font-size: 14px;
  margin-bottom: 20px;
  border-radius: 0 2px 2px 0;
}

/* v3: Input (underline) */
.login-form .form-group {
  margin-bottom: 20px;
}

.login-page .input-row {
  display: flex;
  align-items: center;
  border-bottom: 1.5px solid #d5d5d0;
  padding-bottom: 8px;
  transition: border-color 0.3s;
}

.login-page .input-row:focus-within {
  border-color: #2D2D2D;
}

.login-page .input-row i {
  font-size: 16px;
  color: #999;
  margin-right: 10px;
  transition: color 0.3s;
  flex-shrink: 0;
}

.login-page .input-row:focus-within i {
  color: #2D2D2D;
}

.login-page .input-row input {
  border: none;
  outline: none;
  background: transparent;
  color: #2D2D2D;
  width: 100%;
  padding: 6px 0;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}

.login-page .input-row input::placeholder {
  color: #888;
  font-weight: 300;
}

.login-page .input-row .password-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #999;
  font-size: 16px;
  transition: color 0.3s;
  flex-shrink: 0;
}

.login-page .input-row .password-toggle:hover {
  color: #2D2D2D;
}

/* v3: Beni hatirla */
.login-page .remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: #777;
}

.login-page .remember-row input[type="checkbox"] {
  accent-color: #2D2D2D;
}

/* v3: Login butonu */
.login-page .btn-login {
  width: 100%;
  height: 44px;
  background: #2D2D2D;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Inter', sans-serif;
}

.login-page .btn-login:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(45,45,45,0.2);
}

/* v3: Spinner */
.login-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  font-size: 13px;
  color: #777;
}

.login-spinner i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* v3: Dil secimi (footer area) */
.login-footer-area {
  margin-top: 32px;
  animation: fadeIn 0.6s ease both 0.3s;
}

.login-lang {
  display: flex;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
}

.login-lang a {
  color: #999;
  text-decoration: none;
  transition: color 0.15s;
}

.login-lang a:hover,
.login-lang a.active {
  color: #2D2D2D;
}

.login-lang .sep {
  color: #ccc;
}

/* v3: Copyright (sag alt, fixed) */
.login-page .page-corner-right {
  position: fixed;
  bottom: 20px;
  right: 24px;
  font-size: 12px;
  color: #999;
}

/* Login responsive */
@media (max-width: 575.98px) {
  .login-page .login-form-area {
    width: 90%;
    padding: 0 16px;
  }
  .login-page .line-top,
  .login-page .line-bottom {
    height: 36px;
  }
  .login-page .page-corner-right {
    position: static;
    text-align: center;
    margin-top: 24px;
  }
}

/* Login dark mode */
[data-theme="dark"] .login-page {
  background-color: #1a1a1a;
}

[data-theme="dark"] .login-page .input-row {
  border-color: #444;
}

[data-theme="dark"] .login-page .input-row input {
  color: #e0e0e0;
}

[data-theme="dark"] .login-page .btn-login {
  background: #e0e0e0;
  color: #1a1a1a;
}

/* ==========================================================================
   19. Merchant Select Page (standalone)
   ========================================================================== */

.merchant-page {
  min-height: 100vh;
  background: var(--body-bg);
  display: flex;
  flex-direction: column;
}

.merchant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--text-heading);
}

.merchant-header i {
  font-size: 18px;
  color: var(--brand);
}

.merchant-logout {
  color: var(--text-muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.merchant-logout:hover {
  color: var(--danger);
}

.merchant-content {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

.merchant-search {
  position: relative;
  margin-bottom: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.merchant-search i { 
  color: var(--text-muted);
  flex-shrink: 0;
}

.merchant-search input {
  width: 100%;
  height: 44px;
  border: none;
  background: transparent;
  padding: 0 12px; 
  color: var(--text-primary);
  outline: none;
  font-family: var(--font-base);
}

.merchant-search input::placeholder {
  color: var(--text-muted);
}

.merchant-table-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.merchant-table {
  width: 100%;
  border-collapse: collapse; 
}

.merchant-table tr {
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.1s;
}

.merchant-table tr:last-child {
  border-bottom: none;
}

.merchant-table tr:hover {
  background: rgba(0,0,0,0.015);
}

.merchant-table td {
  padding: 8px 14px;
  vertical-align: middle;
}

.merchant-id {
  width: 120px;
  font-weight: var(--fw-bold); 
  text-align: center;
}

.merchant-name {
  font-weight: var(--fw-medium);
  color: var(--text-heading);
}

.merchant-code {
    width: 100px;
    color: var(--text-secondary);
    text-align: right;
}

.merchant-action {
  width: 60px;
  text-align: right;
}

/* Parent row — pastel arka plan, belirgin */
.merchant-table .row-parent td {
  background: var(--info-light);
}

.merchant-table .row-parent .merchant-id {
  color: var(--info);
  font-weight: var(--fw-bold);
}

.merchant-table .row-parent .merchant-name {
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
}

/* Child row — beyaz, girintili */
.merchant-table .row-child .merchant-id {
  color: var(--text-muted);
}

.merchant-table .row-child .merchant-name {
  padding-left: 24px;
  font-weight: var(--fw-normal);
  color: var(--text-primary);
}

/* Select button — pastel */
.btn-select {
  padding: 5px 16px;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  border: none;
  border-radius: var(--radius-sm);
  background: var(--success-light);
  color: var(--success);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-select:hover {
  background: var(--success);
  color: var(--text-white);
}

/* Merchant dark mode */
[data-theme="dark"] .merchant-header {
  background: var(--card-bg);
  border-color: var(--border);
}

[data-theme="dark"] .merchant-search {
  background: var(--card-bg);
  border-color: var(--border);
}

[data-theme="dark"] .merchant-table-wrap {
  background: var(--card-bg);
  border-color: var(--border);
}

[data-theme="dark"] .merchant-table tr:hover {
  background: rgba(255,255,255,0.03);
}

[data-theme="dark"] .merchant-table .row-parent td {
  background: rgba(59,130,246,0.08);
}

/* Merchant responsive */
@media (max-width: 575.98px) {
  .merchant-content { padding: 12px; }
  .merchant-code { display: none; }
  .merchant-id { width: 80px; font-size: 11px; }
}

/* ==========================================================================
   20. Alerts
   ========================================================================== */

.alert-custom {
  background: var(--info-light);
  border: 1px solid var(--info);
  border-radius: var(--radius-md);
  color: var(--info);
  font-size: 13px;
  padding: 12px 16px;
}

.alert-custom i {
  font-size: 18px;
  flex-shrink: 0;
}

/* ==========================================================================
   21. Selectable Table (merchant select, vb.)
   ========================================================================== */

.table-selectable tbody tr {
  cursor: pointer;
}

.table-selectable tbody tr:hover {
  background: rgba(0,0,0,0.025);
}

.row-parent td {
  font-weight: var(--fw-semibold);
  background: var(--success-light);
  color: var(--text-heading);
}

.row-child td {
  padding-left: 32px;
}

    .row-child td:first-child {
        padding-left: 32px;
        text-align: left;
    }

/* Parent satır: beyaz arka plan, sol 3px brand accent */
.merchant-table .row-parent td {
    background: transparent;
}

    .merchant-table .row-parent td:first-child {
        box-shadow: inset 3px 0 0 var(--brand);
        text-align: left;
    }

.merchant-table .row-parent .merchant-id {
    color: var(--brand);
    font-weight: var(--fw-bold);
}

.merchant-table .row-parent .merchant-name {
    font-weight: var(--fw-semibold);
}
[data-theme="dark"] .row-parent td {
  background: rgba(34,197,94,0.08);
}

[data-theme="dark"] .table-selectable tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

/* ==========================================================================
   23. Modals & Drawers
   ========================================================================== */

/* --- Modal Override --- */
.modal-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header .modal-title {
  font-size: 1rem;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
}

.modal-header .btn-close {
  opacity: 0.5;
  padding: 0.75rem;
}

.modal-body {
  padding: 1.5rem;
  color: var(--text-primary);
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--body-bg);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  gap: 0.5rem;
}

.modal-content {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  background: var(--card-bg);
}

/* Confirm danger modal */
.modal-confirm-danger .modal-header {
  border-bottom: none;
  padding-bottom: 0;
}

.modal-confirm-danger .modal-body {
  text-align: center;
  padding-top: 1.5rem;
}

.modal-confirm-danger .confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 1rem;
}

.modal-confirm-danger .confirm-icon.icon-danger {
  background: var(--danger-light);
  color: var(--danger);
}

.modal-confirm-danger .confirm-icon.icon-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.modal-confirm-danger .confirm-icon.icon-success {
  background: var(--success-light);
  color: var(--success);
}

.modal-confirm-danger .confirm-title {
  font-size: 1.125rem;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.modal-confirm-danger .confirm-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.modal-confirm-danger .modal-footer {
  justify-content: center;
  border-top: none;
  background: var(--card-bg);
  padding-top: 0;
}

/* --- Offcanvas / Drawer Override --- */
.offcanvas {
  background: var(--card-bg);
  border-color: var(--border);
  color: var(--text-primary);
}

.offcanvas-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.offcanvas-header .offcanvas-title {
  font-size: 1rem;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
}

.offcanvas-body {
  padding: 1.5rem;
}

.offcanvas-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--body-bg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Genis drawer varyanti */
.offcanvas-wide {
  width: 480px !important;
}

@media (max-width: 575.98px) {
  .offcanvas-wide {
    width: 100% !important;
  }
}

/* --- Dark Mode --- */
[data-theme="dark"] .modal-content {
  background: var(--card-bg);
  border-color: var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

[data-theme="dark"] .modal-header {
  background: var(--card-bg);
  border-color: var(--border);
}

[data-theme="dark"] .modal-footer {
  background: var(--body-bg);
  border-color: var(--border);
}

[data-theme="dark"] .modal-header .btn-close {
  filter: invert(1);
}

[data-theme="dark"] .offcanvas {
  background: var(--card-bg);
  border-color: var(--border);
}

[data-theme="dark"] .offcanvas-header {
  border-color: var(--border);
}

[data-theme="dark"] .offcanvas-footer {
  background: var(--body-bg);
  border-color: var(--border);
}

/* ==========================================================================
   24. Accordion & Permission Matrix
   ========================================================================== */

/* --- Accordion Override (BS5) --- */
.accordion-dept .accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: var(--card-bg);
}

.accordion-dept .accordion-button {
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  background: var(--card-bg);
  box-shadow: none;
  gap: 0.5rem;
}

.accordion-dept .accordion-button:not(.collapsed) {
  background: var(--primary-light);
  color: var(--text-heading);
}

.accordion-dept .accordion-button::after {
  width: 1rem;
  height: 1rem;
  background-size: 1rem;
}

.accordion-dept .accordion-button:focus {
  box-shadow: none;
  border-color: var(--border);
}

.accordion-dept .accordion-body {
  padding: 0;
}

/* Departman header status icon */
.dept-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  flex-shrink: 0;
}

.dept-status.assigned {
  background: var(--success-light);
  color: var(--success);
}

.dept-status.unassigned {
  background: var(--danger-light);
  color: var(--danger);
}

/* Accordion icerisindeki alert bar */
.dept-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border);
}

.dept-alert.alert-assigned {
  background: var(--success-light);
  color: var(--success);
}

.dept-alert.alert-unassigned {
  background: var(--warning-light);
  color: var(--warning);
}

/* --- Permission Matrix Table --- */
.permission-matrix {
  width: 100%;
  margin: 0;
  font-size: 0.8125rem;
}

.permission-matrix thead th {
  font-size: 0.6875rem;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  padding: 0.625rem 0.75rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.permission-matrix thead .th-auth {
  width: 75px;
  text-align: center;
}

.permission-matrix thead .th-num {
  width: 36px;
}

.permission-matrix thead .th-status {
  width: 65px;
}

.permission-matrix tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.permission-matrix tbody tr:last-child td {
  border-bottom: none;
}

.permission-matrix tbody tr:hover {
  background: rgba(0,0,0,0.015);
}

.permission-matrix .cell-auth {
  text-align: center;
  width: 75px;
}

.permission-matrix .cell-num {
  color: var(--text-muted);
  width: 36px;
}

/* Hiyerarsik modul indent */
.module-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.module-name .module-path {
  font-size: 0.6875rem;
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  background: var(--primary-light);
  padding: 1px 6px;
  border-radius: var(--radius-xs);
}

.module-indent-1 { padding-left: 1.5rem; }
.module-indent-2 { padding-left: 3rem; }

/* Parent module row — bold separator */
.permission-matrix .row-parent-module td {
  background: var(--body-bg);
  font-weight: var(--fw-semibold);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
}

/* User info card (top of page) */
.user-info-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.user-info-bar .user-avatar-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: var(--fw-semibold);
  flex-shrink: 0;
}

/* --- Dark Mode --- */
[data-theme="dark"] .accordion-dept .accordion-item {
  border-color: var(--border);
  background: var(--card-bg);
}

[data-theme="dark"] .accordion-dept .accordion-button {
  background: var(--card-bg);
  color: var(--text-heading);
}

[data-theme="dark"] .accordion-dept .accordion-button:not(.collapsed) {
  background: rgba(255,255,255,0.04);
}

[data-theme="dark"] .permission-matrix tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

[data-theme="dark"] .permission-matrix .row-parent-module td {
  background: rgba(255,255,255,0.03);
}

[data-theme="dark"] .user-info-bar {
  background: var(--card-bg);
  border-color: var(--border);
}

[data-theme="dark"] .dept-alert.alert-assigned {
  background: rgba(34,197,94,0.1);
}

[data-theme="dark"] .dept-alert.alert-unassigned {
  background: rgba(245,158,11,0.1);
}

/* ==========================================================================
   25. Branch Grid (Dual Panel)
   ========================================================================== */

.branch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-hd {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.panel-hd .panel-title {
  font-size: 0.9375rem;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  margin: 0;
}

.panel-hd .panel-search {
  margin-left: auto;
  max-width: 200px;
}

.panel-body {
  padding: 0;
}

.scroll-wrap {
  max-height: 480px;
  overflow-y: auto;
}

.scroll-wrap table {
  margin: 0;
}

.scroll-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--card-bg);
}

/* Sol panelde atanmis satirlar soluk */
.is-assigned-in-left td {
  opacity: 0.5;
}

.is-assigned-in-left td .form-check-input {
  opacity: 1;
}

/* Panel alt aciklama */
.panel-hint {
  padding: 0.5rem 1.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

/* --- Dark Mode --- */
[data-theme="dark"] .panel {
  background: var(--card-bg);
  border-color: var(--border);
}

[data-theme="dark"] .panel-hd {
  border-color: var(--border);
}

[data-theme="dark"] .scroll-wrap thead th {
  background: var(--card-bg);
}

/* ==========================================================================
   26. Error Pages
   ========================================================================== */

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--body-bg);
  padding: 2rem;
}

.error-container {
  text-align: center;
  max-width: 480px;
}

.error-icon {
  font-size: 64px;
  margin-bottom: 1rem;
  line-height: 1;
}

.error-code {
  font-size: 5rem;
  font-weight: var(--fw-bold);
  color: var(--text-heading);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-title {
  font-size: 1.25rem;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.error-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.error-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

/* Showcase switcher (only for prototype) */
.error-switcher {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: 0.5rem;
  z-index: 100;
}

[data-theme="dark"] .error-page {
  background: var(--body-bg);
}

/* ==========================================================================
   27. Diff Table (Confirm Changes)
   ========================================================================== */

.diff-table {
  width: 100%;
  font-size: 0.8125rem;
  margin: 0;
}

.diff-table th {
  font-size: 0.6875rem;
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  padding: 0.625rem 0.75rem;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.diff-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.diff-table .diff-label {
  font-weight: var(--fw-medium);
  color: var(--text-heading);
  width: 25%;
  background: var(--body-bg);
}

.diff-table .diff-old {
  background: var(--danger-light);
  color: var(--danger);
  text-decoration: line-through;
}

.diff-table .diff-arrow {
  width: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
}

.diff-table .diff-new {
  background: var(--success-light);
  color: var(--success);
  font-weight: var(--fw-medium);
}

[data-theme="dark"] .diff-table .diff-label {
  background: rgba(255,255,255,0.03);
}

[data-theme="dark"] .diff-table .diff-old {
  background: rgba(239,68,68,0.1);
}

[data-theme="dark"] .diff-table .diff-new {
  background: rgba(34,197,94,0.1);
}

/* ==========================================================================
   22. Responsive
   ========================================================================== */

/* Tablet: sidebar modu kullanıcı kararıyla (class bazlı), media query zorlaması yok */

@media (max-width: 991.98px) {
  .app-sidebar {
    display: none;
    width: var(--sidebar-w);
  }
  .app-sidebar.show {
    display: flex;
    box-shadow: var(--shadow-lg);
  }
  .app-main { margin-left: 0; }
  .app-content { padding: var(--sp-md); }
  .app-header { padding: 0 var(--sp-md); }
}

/* ==========================================================================
   RS Custom Panels & Modals (v2)
   ========================================================================== */

/* Overlay */
.rs-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1045;
}

.rs-overlay.show { display: block; }

/* Quick Access Panel (sağ offcanvas) */
.rs-offcanvas-right {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  z-index: 1050;
  background: var(--card-bg);
  box-shadow: var(--shadow-lg);
  transition: right 0.25s ease;
  overflow-y: auto;
}

.rs-offcanvas-right.show { right: 0; }

/* Shortcut Modal */
.rs-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1060;
}

.rs-modal-overlay.show { display: block; }

.rs-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.rs-modal-content {
  position: relative;
  width: 520px;
  max-width: calc(100% - 24px);
  margin: 8vh auto;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Merchant list item hover */
.merchant-list-item:hover {
  background: var(--border-light);
}

.cursor-pointer { cursor: pointer; }

/* ==========================================================================
   Section 28: Table Components (v2)
   ========================================================================== */

/* ---- DataTable v2 override ---- */
.dvdataTable .dataTables_info,
.dvdataTable .dataTables_paginate,
.dvdataTable .dataTables_filter,
.dvdataTable .dataTables_length { display: none !important; }

.dvdataTable .dataTables_wrapper { padding: 0; }

/* dataTables.css eski Metronic kurallarini ez (Card Row uyumu) */
.dvdataTable .dataTables_wrapper table,
.dvdataTable table.table.dataTable {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  clear: none !important;
}

.dvdataTable table.table.dataTable thead .sorting,
.dvdataTable table.table.dataTable thead .sorting_asc,
.dvdataTable table.table.dataTable thead .sorting_desc,
.dvdataTable table.table.dataTable thead .sorting_asc_disabled,
.dvdataTable table.table.dataTable thead .sorting_desc_disabled {
  background: #f8f9fb !important;
}

/* Card Row v3 */
.dvdataTable .table {
  table-layout: auto !important;
  border-collapse: separate !important;
  border-spacing: 0 6px !important;
}

.dvdataTable .table thead th {
  padding: 8px 10px !important;
  font-size: 11px !important;
  font-weight: var(--fw-semibold) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: var(--text-muted) !important;
  border: none !important;
  white-space: nowrap !important;
  background: #f8f9fb !important;
  vertical-align: middle !important;
}

.dvdataTable .table tbody td {
  padding: 6px 10px !important;
  vertical-align: middle !important;
  border: none !important;
  font-size: 13.5px !important;
  color: var(--text-primary) !important;
  line-height: 1.4 !important;
}

.dvdataTable .table tbody td:first-child {
  border-radius: 8px 0 0 8px !important;
}

.dvdataTable .table tbody td:last-child {
  border-radius: 0 8px 8px 0 !important;
}

.dvdataTable .table tbody tr {
  background: var(--card-bg) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
  transition: all 0.15s ease !important;
}

.dvdataTable .table tbody tr:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
  transform: translateY(-1px) !important;
}

/* ---- Toolbar ---- */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  min-height: 52px;
  justify-content: space-between;
}

.table-toolbar .toolbar-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.table-toolbar .toolbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Filter button */
.btn-filter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: var(--fw-medium);
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s;
    margin: 1px;
}

.btn-filter:hover {
  border-color: var(--border-dark);
  color: var(--text-heading);
}

.btn-filter.active {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(227, 30, 36, 0.04);
}

.btn-filter .filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: var(--fw-bold);
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
}

/* Filter chips */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 16px 10px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 10px;
  font-size: 12px;
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  background: var(--body-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.filter-chip strong {
  color: var(--text-heading);
  font-weight: var(--fw-semibold);
}

.filter-chip .chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  border-radius: 50%;
}

.filter-chip .chip-remove:hover {
  background: var(--danger);
  color: #fff;
}

/* ---- Status Pill ---- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: var(--fw-medium);
  border-radius: 999px;
  white-space: nowrap;
}

.status-pill .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-pill-success        { background: rgba(34,197,94,0.10); color: #15803d; }
.status-pill-success .status-dot { background: #22c55e; }

.status-pill-danger         { background: rgba(239,68,68,0.10); color: #b91c1c; }
.status-pill-danger .status-dot  { background: #ef4444; }

.status-pill-warning        { background: rgba(249,115,22,0.10); color: #c2410c; }
.status-pill-warning .status-dot { background: #f97316; }

.status-pill-muted          { background: rgba(0,0,0,0.05); color: var(--text-muted); }
.status-pill-muted .status-dot   { background: var(--text-muted); }

/* ---- Stock Pill ---- */
.stock-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.stock-ok       { background: rgba(34,197,94,0.12); color: #16a34a; }
.stock-zero     { background: rgba(249,115,22,0.12); color: #c2410c; }
.stock-negative { background: rgba(239,68,68,0.12); color: #b91c1c; }

/* ---- PLU Badge ---- */
.plu-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: var(--fw-medium);
  background: rgba(54, 153, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 6px;
}

/* ---- Type Icon Box ---- */
.type-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.06);
  font-size: 14px;
}

.type-icon-box.type-raw      { background: rgba(59,130,246,0.08); color: #3b82f6; }
.type-icon-box.type-semi     { background: rgba(139,92,246,0.08); color: #8b5cf6; }
.type-icon-box.type-product  { background: rgba(34,197,94,0.08);  color: #22c55e; }
.type-icon-box.type-discount { background: rgba(249,115,22,0.08); color: #f97316; }
.type-icon-box.type-service  { background: rgba(15,23,42,0.08);   color: #0f172a; }
.type-icon-box.type-logistic { background: rgba(100,116,139,0.08);color: #64748b; }

/* ---- Count Badge ---- */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: var(--fw-bold);
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.count-badge:hover {
  opacity: 0.85;
  color: #fff;
}

.count-badge-muted {
  background: rgba(0,0,0,0.06);
  color: var(--text-muted);
  cursor: default;
}

.count-badge-muted:hover {
  opacity: 1;
  color: var(--text-muted);
}

/* ---- Tag Badge ---- */
.tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11.5px;
  font-weight: var(--fw-medium);
  background: rgba(0,0,0,0.04);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Cell Layouts ---- */
.cell-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cell-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: var(--fw-bold);
  color: #fff;
  flex-shrink: 0;
}

.cell-user-name {
  font-weight: var(--fw-medium);
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-user-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.cell-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--body-bg);
  border: 1px solid var(--border);
}

.cell-secondary {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.cell-ellipsis {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Row Actions ---- */
.row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: flex-end;
}

.btn-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s;
  padding: 0;
}

.btn-row-action:hover {
  background: rgba(0,0,0,0.06);
  color: var(--text-heading);
}

/* ---- Table Legend ---- */
.table-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px dashed var(--border);
  background: rgba(0,0,0,0.015);
  font-size: 12px;
  color: var(--text-muted);
}

.table-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ---- Table Footer ---- */
.table-footer {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.table-footer .footer-info {
  color: var(--text-muted) !important;
  font-size: 13px;
}

.table-footer .footer-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.page-size-select {
  width: auto;
  min-width: 64px;
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-primary);
}

/* ---- Column width helpers ---- */
.col-w-xs   { width: 36px; }
.col-w-sm   { width: 48px; }
.col-w-md   { width: 80px; }
.col-w-lg   { width: 120px; }
.col-w-xl   { width: 170px; }
.col-w-action { width: 44px; }

/* ---- Products tablo ozel ---- */

/* Detay sayfasi scope — Faz 1 (iskelet) */
.detay-banner {
    padding: 14px 20px;
    background: #f2f3f6;
    border-bottom: 1px solid var(--border-light);
    border-left: 3px solid var(--brand);
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 4px;
}

    .detay-banner .detay-plu {
        font-size: 22px;
        font-weight: 800;
        color: var(--brand);
        letter-spacing: 0.5px;
    }

    .detay-banner .detay-title {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-heading);
    }

/* Tab nav font/spacing ayari */
#genelGovde .nav-tabs .nav-link {
    font-size: 13px;
    padding: 10px 14px;
}

    #genelGovde .nav-tabs .nav-link i {
        font-size: 16px;
    }

    #genelGovde .nav-tabs .nav-link span {
        font-size: 13px !important;
    }
/* Panel host zaten relative (#searchFormWrapper) */
#searchFormWrapper {
    position: relative;
}

/* Öneri paneli: akış dışına, input’un altına yapışık */
.search-suggest-panel {
    position: absolute; /* kritik: artık akış Dışı */
    top: 100%; /* input'un hemen altı */
    left: 0;
    right: 0;
    z-index: 2140; /* modal(1050), dropdown(1000) üstüne çıkması için yüksek tut */
    display: none;
    max-height: 60vh; /* taşmayı engelle */
    overflow: auto;
    background: #fff;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: .5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}

    /* Satırlar */
    .search-suggest-panel .suggest-item {
        display: grid;
        grid-template-columns: 48px 1fr auto;
        gap: .75rem;
        align-items: center;
        padding: .6rem .75rem;
        cursor: pointer;
    }

        .search-suggest-panel .suggest-item:hover {
            background: #f8f9fa;
        }

    .search-suggest-panel .suggest-thumb img {
        width: 48px;
        height: 48px;
        object-fit: cover;
        border-radius: .35rem;
    }

    .search-suggest-panel .suggest-title mark {
        background: #ffec99;
        padding: 0 .15em;
        border-radius: .2em;
    }

    .search-suggest-panel .suggest-empty,
    .search-suggest-panel .suggest-hint,
    .search-suggest-panel .suggest-footer {
        padding: .65rem .75rem;
    }

/* Giriş alanı kenarlarını birleştirip tek blok gibi göstermek istersen: */
#searchInput.is-open {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}
.aside-product-img {
    border-radius: 8px;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    background: #fff;
    padding: 6px;
}

.aside-status {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.2;
}

.aside-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-heading);
    line-height: 1.3;
}

.aside-type-link {
    text-decoration: none !important;
}

.aside-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-dark);
    background: #f5f6f8;
    color: var(--text-heading);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.aside-type-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid var(--border-dark);
    background: #fff;
    color: var(--text-secondary);
}

    .aside-type-edit:hover {
        background: var(--brand);
        color: #fff;
        border-color: var(--brand);
    }

.aside-action-btn {
    border-radius: 4px;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 12px;
}

.aside-section-title {
    font-size: 11px;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--brand);
    font-weight: 700;
}

.platform-title {
    font-weight: 600;
    color: var(--text-heading);
    font-size: 12px;
    line-height: 1.2;
}

.platform-sub {
    font-size: 11px;
    line-height: 1.2;
}
/* ===== tabproduct3 — v3 (Faz 4A) ===== */

/* Section header — Urun Yapilari basligi + Save buton */
#tabproduct3 .tp3-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: #f2f3f6;
    border-left: 3px solid #E31E24;
    border-radius: 4px;
}

    #tabproduct3 .tp3-header .tp3-title {
        margin: 0;
        font-size: 14px;
        font-weight: 700;
        color: #1a1a2e;
    }

    #tabproduct3 .tp3-header .tp3-subtitle {
        margin: 2px 0 0 0;
        font-size: 12px;
        color: #64748b;
    }

/* Form fields — v3 stacked */
#tabproduct3 .form-shell {
    margin-top: 0;
}

#tabproduct3 .form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eef0f3;
}

    #tabproduct3 .form-row.no-divider {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

#tabproduct3 .form-col-half {
    flex: 0 0 calc(50% - 6px);
}

#tabproduct3 .form-col-full {
    flex: 0 0 100%;
}

#tabproduct3 .form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 3px;
}

    #tabproduct3 .form-label .help-icon {
        color: #94a3b8;
        margin-left: 4px;
        font-size: 11px;
    }

#tabproduct3 .form-control,
#tabproduct3 .form-select,
#tabproduct3 select.form-control {
    display: block;
    width: 100%;
    height: 36px;
    padding: 6px 12px;
    font-size: 13px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

/* ============ ÜRÜN YAPILARI — div+flex liste (AddProduct Istisna 1 pattern) ============ */
#tabproduct3 .prop-list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
}

#tabproduct3 .prop-row {
    display: flex;
    border-bottom: 1px solid var(--border-light);
}

    #tabproduct3 .prop-row:last-child {
        border-bottom: none;
    }

#tabproduct3 .prop-label {
    width: 200px;
    flex-shrink: 0;
    background: #f5f6f8;
    border-right: 1px solid var(--border-light);
    cursor: pointer;
    user-select: none;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

    #tabproduct3 .prop-label strong {
        font-size: 12px;
        line-height: 1.3;
    }

    #tabproduct3 .prop-label .prop-meta {
        display: flex;
        gap: 4px;
        flex-wrap: wrap;
        align-items: center;
    }

#tabproduct3 .badge-genel {
    font-size: 9px;
    background: rgba(0,0,0,0.08);
    color: var(--text-muted);
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}

#tabproduct3 .badge-req {
    font-size: 9px;
    background: rgba(220,53,69,0.1);
    color: var(--brand);
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}

#tabproduct3 .toggle-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 14px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

#tabproduct3 .prop-content {
    flex: 1;
    padding: 8px 14px;
    min-width: 0;
}

/* Kapali state */
#tabproduct3 .prop-row.collapsed {
    background: #fafbfc;
}

    #tabproduct3 .prop-row.collapsed .toggle-icon {
        top: 50%;
        transform: translateY(-50%) rotate(-90deg);
    }

    #tabproduct3 .prop-row.collapsed .prop-label {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 10px;
        padding: 10px 14px;
        background: transparent;
        border-right: none;
    }

        #tabproduct3 .prop-row.collapsed .prop-label strong {
            flex-shrink: 0;
        }

        #tabproduct3 .prop-row.collapsed .prop-label .prop-meta {
            margin-left: auto;
            margin-right: 24px;
            flex-wrap: nowrap;
        }

    #tabproduct3 .prop-row.collapsed .prop-content {
        display: none;
    }

    #tabproduct3 .prop-row.collapsed:hover {
        background: #f2f3f6;
    }

/* Checkbox/Radio: 3 sutun (her zaman) */
#tabproduct3 .prop-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 12px;
}

#tabproduct3 .prop-grid-scroll {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px 12px;
    max-height: 240px;
    overflow-y: auto;
    border: 1px dashed var(--border-light);
    border-radius: 4px;
    padding: 8px;
}

#tabproduct3 .check-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    cursor: pointer;
    padding: 3px 0;
    margin: 0;
}

    #tabproduct3 .check-item input {
        margin: 0;
    }

/* Inputtype 3: Inline grid + gri pill label */
#tabproduct3 .prop-inline {
    display: grid;
    gap: 6px 16px;
}

    #tabproduct3 .prop-inline.cols-1 {
        grid-template-columns: 1fr;
    }

    #tabproduct3 .prop-inline.cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #tabproduct3 .prop-inline .prop-input-cell {
        display: flex;
        align-items: center;
        min-width: 0;
    }

        #tabproduct3 .prop-inline .prop-input-cell label {
            font-size: 11px;
            font-weight: 600;
            color: var(--text-heading);
            text-transform: uppercase;
            min-width: 130px;
            max-width: 130px;
            text-align: right;
            background: #eef0f3;
            padding: 7px 10px;
            border: 1px solid var(--border-dark);
            border-right: none;
            border-radius: 4px 0 0 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 0;
        }

        #tabproduct3 .prop-inline .prop-input-cell input {
            flex: 1;
            height: 30px;
            padding: 4px 10px;
            font-size: 12px;
            border: 1px solid var(--border-dark);
            border-radius: 0 4px 4px 0;
            min-width: 0;
        }

    #tabproduct3 .prop-inline.single .prop-input-cell {
        max-width: 320px;
    }

/* ============ SAĞ PANEL — Ürün Grubu (AddProduct alert-cat pattern) ============ */
#tabproduct3 .right-panel {
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

    #tabproduct3 .right-panel .right-head {
        padding: 10px 12px;
        background: #f5f6f8;
        border-bottom: 1px solid var(--border-light);
        border-left: 3px solid var(--brand);
    }

        #tabproduct3 .right-panel .right-head .font-weight-bolder {
            font-size: 13px;
            font-weight: 600;
        }

#tabproduct3 #KategoriSecimDetay {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

#tabproduct3 .right-panel .right-body {
    padding: 8px;
}

#tabproduct3 #kategoriAramaKutusu {
    height: 32px;
    font-size: 12px;
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    margin-bottom: 8px;
}

#tabproduct3 #dvkategorisecList {
    max-height: 600px;
    overflow-y: auto;
    border: none;
    padding: 0;
    background: transparent;
}

    #tabproduct3 #dvkategorisecList .alert-cat {
        background: #f5f6f8;
        border: 1px solid var(--border-light);
        border-radius: 4px;
        margin-bottom: 4px;
        padding: 5px 10px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

        #tabproduct3 #dvkategorisecList .alert-cat:hover {
            background: #ecedf1;
        }

    #tabproduct3 #dvkategorisecList .cat-left {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
        flex: 1;
    }

    #tabproduct3 #dvkategorisecList .cat-meta {
        font-size: 10px;
        background: rgba(0,0,0,0.05);
        color: var(--text-muted);
        padding: 1px 5px;
        border-radius: 3px;
        flex-shrink: 0;
    }

    #tabproduct3 #dvkategorisecList .cat-name {
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #tabproduct3 #dvkategorisecList .cat-action a {
        font-size: 11px;
        color: var(--brand);
        font-weight: 600;
        text-decoration: none;
        flex-shrink: 0;
    }

/* ============ Danger area — v3 ============ */
#tabproduct3 .danger-box {
    margin-top: 16px;
    border: 1px solid #fca5a5;
    background: #FDE8E8;
    border-radius: 6px;
    padding: 12px 14px;
}

    #tabproduct3 .danger-box .danger-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    #tabproduct3 .danger-box .danger-title {
        margin: 0 0 4px 0;
        font-size: 13px;
        font-weight: 700;
        color: #8B1A1A;
    }

    #tabproduct3 .danger-box p {
        margin: 0;
        color: #8B1A1A;
        font-size: 12px;
    }

    #tabproduct3 .danger-box .btn {
        border-radius: 4px;
        font-weight: 600;
        font-size: 12px;
        white-space: nowrap;
    }
/* === DetayDataDashboard — v3 scope === */
.metric-tile {
    border-radius: 6px !important;
    border: 1px solid #e5e7eb !important;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
    height: 100%;
}

    .metric-tile .card-body {
        padding: 12px !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        min-height: 110px;
        gap: 4px;
        background-color: #f5f6f8;
        border: 2px dotted #f2f3f6;
        border-radius: 6px;
    }

.metric-icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f6f8;
    border: 1px solid #e5e7eb;
    margin-bottom: 2px;
}

    .metric-icon .svg-icon svg {
        width: 20px !important;
        height: 20px !important;
    }

.metric-title {
    font-size: 11px;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #E31E24;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.metric-value {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.15;
    margin: 0;
    white-space: nowrap;
}

.metric-sub {
    font-size: 11px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.2;
}

.metric-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #1a1a2e;
    text-decoration: none !important;
    transition: background .12s ease, border-color .12s ease;
}

    .metric-link:hover {
        background: #f5f6f8;
        border-color: #94a3b8;
    }

.stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.stock-ok {
    color: #16a34a;
    border-color: rgba(22,163,74,.25);
    background: rgba(22,163,74,.06);
}

.stock-zero {
    color: #c2410c;
    border-color: rgba(194,65,12,.25);
    background: rgba(194,65,12,.06);
}

.stock-negative {
    color: #b91c1c;
    border-color: rgba(185,28,28,.25);
    background: rgba(185,28,28,.06);
}

.metric-currency i {
    font-size: 16px !important;
    line-height: 1;
}

/* === Depo tablosu (#tblListe) — sticky + kompakt === */
#tblListe {
    font-size: 12px;
}

    #tblListe thead th {
        position: sticky;
        top: 0;
        background: #f2f3f6;
        border-bottom: 2px solid #d1d5db;
        padding: 8px 6px;
        font-size: 11px;
        font-weight: 700;
        color: #1a1a2e;
        text-transform: uppercase;
        z-index: 2;
    }

    #tblListe tbody td {
        padding: 6px 8px;
        border-bottom: 1px solid #eef0f3;
        vertical-align: middle;
    }

    #tblListe tbody tr:hover {
        background: #fafbfc;
    }

    #tblListe tbody tr td:first-child {
        font-size: 11px;
        color: #64748b;
        text-transform: uppercase;
        font-weight: 600;
    }

/* Urun resmi */
.dvdataTable .product-img {
  margin: 1px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, .06);
}

/* Urun adi */
.dvdataTable .product-title {
  display: block;
  line-height: 1.2;
  font-size: 16px;
}

/* PLU badge genislik */
.dvdataTable .plu-badge {
  width: 100%;
}

/* Tur ikon kutusu (Products ozel boyut) */
.dvdataTable .type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(0,0,0,.02);
}

.dvdataTable .type-icon i {
  font-size: 14px;
  opacity: .9;
}

/* Grup kolonu ellipsis */
.dvdataTable .group-col {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(0,0,0,.75);
}

/* Tablo icerik background-clip */
.dvdataTable .table tbody tr td {
  background-clip: padding-box;
}

/* Metronic label border-radius override */
.dvdataTable .label {
  border-radius: 10px !important;
}

/* ---- Tur renkleri (type-color-*) ---- */
.type-color-raw      { color: #3b82f6; }
.type-color-semi     { color: #8b5cf6; }
.type-color-product  { color: #22c55e; }
.type-color-discount { color: #f97316; }
.type-color-service  { color: #0f172a; }
.type-color-logistic { color: #64748b; }
.type-color-default  { color: #6b7280; }

/* ---- Products legend ---- */
.type-legend {
  border: 1px dashed rgba(0,0,0,.12);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0,0,0,.015);
}

.type-legend .item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
  margin-bottom: 6px;
  font-size: 12px;
  white-space: nowrap;
  color: rgba(0,0,0,.65);
}

/* ==========================================================================
   Section 29: Form v3 — Stacked Section Card
   ========================================================================== */

/* ---- Form Body Wrapper ---- */
.form-body {
  padding: 0;
  background: var(--body-bg);
}

.form-body > .form-layout {
  padding: 0;
}

/* Form select & control — BS4 + v3 zorla */
.section-body select.form-control,
.section-body .form-select,
.section-body .form-control {
  height: 38px !important;
  padding: 6px 12px !important;
  font-size: 14px !important;
  border: 1px solid var(--border-dark) !important;
  border-radius: 4px !important;
  background: var(--card-bg) !important;
}

.section-body select.form-control:focus,
.section-body .form-select:focus,
.section-body .form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(45,45,45,0.1) !important;
  outline: none !important;
}

/* ---- Form Layout (sol main + sag side panel) ---- */
.form-layout {
  display: flex;
  gap: 20px;
}

.form-main {
  flex: 1;
  min-width: 0;
}

.form-side {
  width: 340px;
  flex-shrink: 0;
}

/* ---- Section Card ---- */
.section-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 20px;
  overflow: hidden;
}

.section-card:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: #f2f3f6;
  border-left: 3px solid var(--brand);
}

.section-title {
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  margin: 0;
}

.section-body {
  padding: 20px;
}

/* ---- Form Row & Column ---- */
.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-col {
  flex: 1;
  min-width: 0;
}

.form-col-half  { flex: 0 0 calc(50% - 8px); min-width: 0; }
.form-col-third { flex: 0 0 calc(33.333% - 11px); min-width: 0; }
.form-col-full  { flex: 0 0 100%; min-width: 0; }

/* ---- Form Label ---- */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--brand);
  margin-left: 2px;
}

.form-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---- Form Footer (sticky) ---- */
.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}

/* ---- Check Group (checkbox/radio listesi) ---- */
.check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.check-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
}

.check-item input[type="checkbox"],
.check-item input[type="radio"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* ---- Image Upload (dashed alan) ---- */
.image-upload {
  width: 120px;
  height: 120px;
  border: 2px dashed var(--border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.image-upload:hover {
  border-color: var(--primary);
  color: var(--text-secondary);
}

.image-upload i {
  font-size: 28px;
  margin-bottom: 4px;
}

/* ---- Category Tree (sag panel) ---- */
.category-tree {
  padding: 0;
  list-style: none;
  margin: 0;
}

.category-tree li {
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s;
}

.category-tree li:hover {
  background: rgba(0,0,0,0.03);
}

.category-tree li.active {
  background: rgba(45,45,45,0.06);
  font-weight: var(--fw-semibold);
}

.category-tree .sub {
  padding-left: 20px;
  list-style: none;
}

.category-tree .sub li {
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* ---- Form responsive ---- */
@media (max-width: 768px) {
  .form-layout { flex-direction: column; }
  .form-side { width: 100%; }
  .form-row { flex-direction: column; gap: 0; }
  .form-row > [class^="form-col"] { flex: 0 0 100%; margin-bottom: 16px; }
  .form-body { padding: 16px; }
}

/* ==========================================================================
   PRODUCT PAGE — pp-* SECTION (Detay v3 Standardı)
   Spec: .github/ai_products/2026-04-09-detay-v3-standard.md
   Skill: .claude/skills/15-products-detay.md
   Namespace: pp-* (Product Page)
   Kapsam: Detay.cshtml ve 20 bagimli dosya (21 toplam)
   ========================================================================== */

/* ----- 1. pp-header — Section basligi (brand-accent border-left) ----- */
.pp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  padding: 12px 14px;
  margin-top: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-lg);
}
.pp-header-title {
  margin: 0;
  font-size: 16px;
  font-weight: var(--fw-bold);
  color: var(--text-heading);
  letter-spacing: -.2px;
}
.pp-header-sub {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
.pp-header-actions {
  display: flex;
  gap: var(--sp-sm);
  align-items: center;
}
.pp-header--warning  { border-left-color: var(--warning); }
.pp-header--danger   { border-left-color: var(--danger); }
.pp-header--info     { border-left-color: var(--info); }
.pp-header--success  { border-left-color: var(--success); }

/* ----- 2. pp-section — Icerik karti (border + body) ----- */
.pp-section {
  margin-top: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pp-section-body {
  padding: 12px 14px;
}

/* ----- 3. pp-section-head — Section ic basligi (uppercase + ikon) ----- */
.pp-section-head {
  padding: 10px 14px;
  background: var(--border-light);
  border-bottom: 1px solid var(--border-light);
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pp-section-head i {
  font-size: 16px;
  color: var(--text-secondary);
}

/* ----- 4. pp-search — Search input + buton (flexbox) ----- */
.pp-search {
  display: flex;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-md);
}
.pp-search input.form-control,
.pp-search > input {
  flex: 1;
}
.pp-search button.btn {
  white-space: nowrap;
}

/* ----- 5. pp-pill — Status pill (5 varyant) ----- */
.pp-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: var(--fw-semibold);
  line-height: 1.4;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  white-space: nowrap;
}
.pp-pill--success  { background: var(--success-light); color: var(--success); border-color: var(--success-light); }
.pp-pill--warning  { background: var(--warning-light); color: var(--warning); border-color: var(--warning-light); }
.pp-pill--danger   { background: var(--danger-light);  color: var(--danger);  border-color: var(--danger-light); }
.pp-pill--info     { background: var(--info-light);    color: var(--info);    border-color: var(--info-light); }
.pp-pill--neutral  { background: var(--border-light);  color: var(--text-secondary); border-color: var(--border); }

/* ----- 6. pp-stock-pill — Stok rengi (3 varyant) ----- */
.pp-stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: var(--fw-bold);
  line-height: 1.4;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  white-space: nowrap;
}
.pp-stock-pill--ok       { background: var(--success-light); color: var(--success); }
.pp-stock-pill--zero     { background: var(--warning-light); color: var(--warning); }
.pp-stock-pill--negative { background: var(--danger-light);  color: var(--danger); }

/* ----- 7. pp-banner — Bilgi/uyari banner (4 varyant) ----- */
.pp-banner {
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--text-muted);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  text-align: center;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-top: 14px;
}
.pp-banner--success { border-left-color: var(--success); background: var(--success-light); color: var(--text-heading); }
.pp-banner--warning { border-left-color: var(--warning); background: var(--warning-light); color: var(--text-heading); }
.pp-banner--danger  { border-left-color: var(--danger);  background: var(--danger-light);  color: var(--text-heading); }
.pp-banner--info    { border-left-color: var(--info);    background: var(--info-light);    color: var(--text-heading); }

/* ----- 8. pp-empty-state — Bos durum (ikon + mesaj) ----- */
.pp-empty-state {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  background: var(--border-light);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--warning);
}
.pp-empty-state-icon {
  font-size: 36px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 8px;
}
.pp-empty-state-title {
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.pp-empty-state-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* ----- 9. pp-table — Card Row v3 satir kartlari (border-spacing) ----- */
.pp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  margin: 0;
}
.pp-table thead th {
  background: transparent;
  border: 0;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  white-space: nowrap;
}
.pp-table tbody tr {
  background: var(--card-bg);
  box-shadow: var(--shadow-xs);
  transition: box-shadow .15s, transform .15s;
}
.pp-table tbody tr:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.pp-table tbody td {
  padding: 8px 10px;
  font-size: 13px;
  border: 0;
  vertical-align: middle;
  color: var(--text-primary);
}
.pp-table tbody td:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.pp-table tbody td:last-child  { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* ----- 10. pp-metric-tile — KPI tile (Dashboard) ----- */
.pp-metric-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--border-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  height: 100%;
  transition: box-shadow .15s;
}
.pp-metric-tile:hover {
  box-shadow: var(--shadow-sm);
}
.pp-metric-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--border-light);
  color: var(--brand);
  font-size: 22px;
  flex-shrink: 0;
}
.pp-metric-body { flex: 1; min-width: 0; }
.pp-metric-label {
  font-size: 11px;
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 2px;
}
.pp-metric-value {
  font-size: 20px;
  font-weight: var(--fw-bold);
  color: var(--text-heading);
  line-height: 1.2;
}
.pp-metric-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.pp-metric-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-heading);
  text-decoration: none;
}
.pp-metric-link:hover {
  color: var(--brand);
  text-decoration: none;
}
.pp-metric-link i {
  font-size: 14px;
  color: var(--text-muted);
}

/* ----- 11. pp-form-row — Form satiri (label + input/select) ----- */
.pp-form-row {
  margin-bottom: var(--sp-md);
}
.pp-form-label {
  display: block;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  margin-bottom: 6px;
}
.pp-form-label .required {
  color: var(--brand);
  margin-left: 2px;
}

/* ----- 12. pp-modal-body — Bootbox content normalize ----- */
.pp-modal-body {
  padding: 4px;
  font-size: 13px;
  color: var(--text-primary);
}
.pp-modal-body .pp-modal-section {
  margin-bottom: var(--sp-md);
}
.pp-modal-body .pp-modal-section:last-child {
  margin-bottom: 0;
}
.pp-modal-title {
  font-size: 15px;
  font-weight: var(--fw-bold);
  color: var(--text-heading);
  margin: 0 0 8px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

/* ----- 13. pp-recipe-grid — Recete kart grid (3 sutun, responsive) ----- */
.pp-recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}
@media (max-width: 1199px) {
  .pp-recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 767px) {
  .pp-recipe-grid {
    grid-template-columns: 1fr;
  }
}

/* ----- 14. pp-tab-nav — Detay tab navigation ----- */
.pp-tab-nav-wrap {
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
    padding: 0;
    background: transparent;
    background: #ffffff;
}
.pp-tab-nav.nav-tabs {
    border-bottom: none;
    gap: 0;
    align-items: center;
    justify-content: center;
}
.pp-tab-nav .nav-item {
  margin: 0;
}
.pp-tab-nav .nav-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: var(--fw-semibold);
  font-size: 14px;
  text-decoration: none;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  transition: color 0.15s, border-color 0.15s;
}
.pp-tab-nav .nav-link:hover {
  color: var(--text-heading);
  background: transparent;
  border-color: transparent;
  border-bottom-color: var(--border);
}
.pp-tab-nav .nav-link.active {
  color: var(--brand);
  border-color: transparent;
  border-bottom-color: var(--brand);
  background: transparent;
}
.pp-tab-nav .nav-link i {
  margin-right: 6px;
  font-size: 18px;
}
.pp-tab-nav .nav-text {
  font-size: 14px;
}

/* ----- 15. pp-detay-layout — sol aside + sag content ----- */
.pp-detay-layout {
  display: flex;
  gap: 20px;
}
.pp-detay-aside {
  width: 300px;
  flex-shrink: 0;
}
.pp-detay-content {
  flex: 1;
  min-width: 0;
}
@media (max-width: 991px) {
  .pp-detay-layout {
    flex-direction: column;
  }
  .pp-detay-aside {
    width: 100%;
  }
}

/* ==========================================================================
   PRODUCT PRICE — matrix SECTION (ProductPriceLoad v3)
   ========================================================================== */

.matrix-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px; 
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
}
.matrix-title {
  margin: 0;
  font-size: 16px;
  font-weight: var(--fw-bold);
  color: var(--text-heading);
  letter-spacing: -.2px;
}
.matrix-sub {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: var(--text-muted);
}
#btnSecilileriEkle {
  border-radius: var(--radius-md);
  padding: 7px 12px !important;
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}
.matrix-banner {
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  text-align: center;
  margin-top: 14px;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  background: var(--card-bg);
}
.matrix-banner.is-warning {
  border-left-color: var(--warning);
  background: var(--warning-light);
}
.matrix-table-wrap {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card-bg);
  margin-top: 10px;
}
.matrix-scroll {
  overflow: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
table.matrix-table {
  margin: 0;
  width: 100%;
  min-width: 860px;
  table-layout: fixed;
}
table.matrix-table th,
table.matrix-table td {
  vertical-align: middle !important;
  padding: 6px 6px !important;
  border-color: var(--border-light) !important;
}
table.matrix-table thead th,
table.matrix-table thead td {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--border-light);
  color: var(--text-heading);
  font-weight: var(--fw-semibold);
}
table.matrix-table thead tr:nth-child(1) td { top: 0; z-index: 5; }
table.matrix-table thead tr:nth-child(2) td { top: 44px; z-index: 5; }
table.matrix-table thead tr:nth-child(3) td { top: 88px; z-index: 4; }
table.matrix-table input.form-control-sm {
  border-radius: var(--radius-sm);
  height: 28px;
  padding: 0 6px !important;
}
table.matrix-table input.p-0 {
  height: 28px;
  border-radius: var(--radius-sm);
}
.matrix-col-name {
  width: 320px;
  min-width: 260px;
  position: sticky;
  left: 0;
  z-index: 6;
  background: var(--card-bg);
}
table.matrix-table thead .matrix-col-name {
  background: var(--border-light);
  z-index: 7;
}
table.matrix-table tbody tr:hover {
  background: rgba(0, 0, 0, .02);
}
.bg-warning-o-30 {
  background: var(--warning-light) !important;
}
.matrix-print-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--brand);
}
.matrix-print-btn:hover {
  background: var(--brand-light);
  border-color: var(--brand);
}
.copyDownAll {
  border-radius: var(--radius-sm) !important;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--brand-light);
  color: var(--brand);
}
.copyDownAll:hover {
  background: var(--brand);
  color: var(--text-white);
}
.matrix-branch-wrap {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card-bg);
  margin-top: 10px;
}
.matrix-branch-scroll {
  overflow: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
table.matrix-branch-table {
  margin: 0;
  width: 100%;
  table-layout: auto;
}
table.matrix-branch-table th,
table.matrix-branch-table td {
  vertical-align: middle !important;
  padding: 6px 6px !important;
  border-color: var(--border-light) !important;
}
table.matrix-branch-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--border-light);
  color: var(--text-heading);
  font-weight: var(--fw-semibold);
}
table.matrix-branch-table tbody tr:hover {
  background: rgba(0, 0, 0, .02);
}
.matrix-ico {
  width: 44px;
  text-align: center;
}
.pp-pill-brand {
  background: var(--brand-light);
  color: var(--brand);
}
.pp-cell-warn { background: var(--warning-light) !important; }
.pp-cell-danger-soft { background: var(--danger-light) !important; }
.pp-row-inactive { background: var(--danger-light) !important; }
@media (max-width: 768px) {
  .matrix-col-name { width: 220px; }
  table.matrix-table { min-width: 820px; }
}

/* ==========================================================================
   END — PRODUCT PRICE SECTION
   ========================================================================== */

/* ----- Products List Compact (kolon kaybini onler — dar ekran sigmasi) ----- */
.products-list-compact {
  font-size: 11.5px;
}
.products-list-compact thead th {
  padding: 6px 4px !important;
  font-size: 10px;
  letter-spacing: .2px;
  white-space: nowrap;
}
.products-list-compact tbody td {
  padding: 4px !important;
  font-size: 11.5px;
  vertical-align: middle;
}
.products-list-compact .product-img {
  width: 28px;
  height: 28px;
}
.products-list-compact .plu-badge {
  font-size: 10px;
  padding: 2px 5px;
}
.products-list-compact .stock-pill,
.products-list-compact .pp-stock-pill {
  font-size: 10px;
  padding: 2px 5px;
}
.products-list-compact .product-title {
  white-space: normal;
  word-break: break-word;
}
.products-list-compact .group-col {
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
}
.products-list-compact .type-icon i {
  font-size: 16px;
}
.products-list-compact .count-badge {
  font-size: 10px;
  padding: 1px 5px;
}

/* ==========================================================================
   END — PRODUCT PAGE pp-* SECTION
   ========================================================================== */
