/* ================= ADMIN PANEL ================= */
.admin-page {
  background: var(--light, #f1f5f9);
  min-height: 100vh;
}

.admin-header {
  background: var(--white);
  border-bottom: 1px solid #e2e8f0;
  /* iOS PWA + viewport-fit=cover: logo çentik/kameranın altında kalsın */
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
  padding-bottom: 18px;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  width: 100%;
  box-sizing: border-box;
}

/* style.css genel `header { display:flex }` admin sayfalarında logo ile nav satırını yan yana zorlar; sıfırla */
header.admin-header {
  display: block;
  position: relative;
  flex-wrap: unset;
  justify-content: unset;
  align-items: unset;
}

/* Üstte ortalanmış logo, altta tam genişlikte: Sol | Başlık | Sağ */
.admin-header-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  position: relative;
}

.admin-logo {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  width: 100%;
  text-decoration: none;
}

.admin-logo img {
  height: 44px;
  max-width: min(440px, 100%);
  width: auto;
  display: block;
  object-fit: contain;
}

.admin-header-center {
  position: static;
  left: auto;
  transform: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 16px;
  width: 100%;
  box-sizing: border-box;
  pointer-events: auto;
}

.admin-header-center > .admin-back-link {
  grid-column: 1;
  justify-self: start;
}

.admin-header-center > .admin-title {
  grid-column: 2;
  justify-self: center;
  text-align: center;
  margin: 0;
}

.admin-header-center > .admin-header-logout {
  grid-column: 3;
  justify-self: end;
}

.admin-back-link {
  font-size: 14px;
  color: var(--gray);
  text-decoration: none;
  white-space: nowrap;
}

.admin-back-link:hover {
  color: var(--primary);
}

.admin-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-dark);
  margin: 0;
  white-space: nowrap;
}

.admin-header-logout {
  font-size: 14px;
  color: var(--gray);
  text-decoration: none;
  white-space: nowrap;
}

.admin-header-logout:hover {
  color: #dc2626;
}

/* Mobil / dar tablet: aynı iki satır düzeni; başlık dar alanda küçülür */
@media (max-width: 1024px) {
  .admin-header {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    padding-bottom: 16px;
    padding-left: max(14px, env(safe-area-inset-left, 0px));
  }
  .admin-header-inner {
    gap: 10px;
  }
  .admin-logo img {
    height: 36px;
    max-width: min(280px, 92vw);
  }
  .admin-header-center {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px 8px;
    padding: 0 2px;
  }
  .admin-header-center > .admin-title {
    font-size: 14px;
    max-width: 46vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .admin-header-center > .admin-back-link,
  .admin-header-center > .admin-header-logout {
    font-size: 12px;
  }
}

/* Hamburger menü - barın en sağında */
.admin-hamburger-wrap {
  flex-shrink: 0;
  position: relative;
}

.admin-hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
  cursor: pointer;
  color: var(--gray-dark);
  transition: background 0.2s, border-color 0.2s;
}

.admin-hamburger-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--primary);
}

.admin-hamburger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.admin-hamburger-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  min-width: 220px;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 6px 0;
  z-index: 1000;
}

.admin-hamburger-wrap.is-open .admin-hamburger-menu {
  display: block;
}

.admin-hamburger-menu a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--gray-dark);
  text-decoration: none;
  white-space: nowrap;
}

.admin-hamburger-menu a:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.admin-hamburger-menu a.active {
  font-weight: 600;
  color: var(--primary);
  background: #f8fafc;
}

.admin-hamburger-menu a[href*="pending-approvals"] {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 8px;
}
.admin-pending-badge,
.admin-translation-pending-badge,
.admin-file-inbound-badge {
  flex-shrink: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  color: #fff;
  background: #e53935;
  border-radius: 10px;
  text-align: center;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* İki sütun: tabloların min-width:1100px kuralı grid’i bozmasın — sütunlar eşit kalsın, kaydırma tablo içinde */
.admin-file-share-split {
  display: grid;
  /* Orta sütun: tam yükseklikte 1px çizgi (içerik yüksekliği fark etmez) */
  grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
  gap: 0;
  row-gap: 28px;
  max-width: min(1680px, 100%);
  margin: 0 auto;
  padding: 0 20px 48px;
  align-items: stretch;
}
.admin-file-share-split-rule {
  background: #e2e8f0;
  align-self: stretch;
  min-height: 100%;
  width: 100%;
}
.admin-file-share-col {
  min-width: 0;
}
/* Çizgi iki yana ~28px toplam boşluk */
.admin-file-share-col:first-child {
  padding-right: 13px;
}
.admin-file-share-col:last-child {
  padding-left: 14px;
}
@media (max-width: 1100px) {
  .admin-file-share-split {
    grid-template-columns: 1fr;
    row-gap: 0;
  }
  .admin-file-share-split-rule {
    display: none;
  }
  .admin-file-share-col:first-child {
    padding-right: 0;
    padding-bottom: 28px;
    border-bottom: 1px solid #e2e8f0;
  }
  .admin-file-share-col:last-child {
    padding-left: 0;
    padding-top: 28px;
  }
}
.admin-file-share-col .admin-panel-centered {
  max-width: none;
}

.admin-file-receive-cta {
  min-height: 44px;
  padding-left: 20px;
  padding-right: 20px;
  font-weight: 600;
}
.admin-file-share-col .admin-form-row-2 {
  flex-direction: column;
}
@media (min-width: 520px) {
  .admin-file-share-col .admin-form-row-2 {
    flex-direction: row;
    align-items: flex-start;
  }
}
.admin-file-receive-bottom-actions {
  margin-top: 16px;
  padding-top: 16px;
}
.admin-file-receive-form-hint {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
}
.admin-receive-link-row-clickable {
  cursor: pointer;
}
.admin-receive-link-row-clickable:hover {
  background: #f8fafc !important;
}
.admin-receive-link-row-selected td {
  background: #eef2ff !important;
}
.admin-receive-link-row-selected {
  box-shadow: inset 3px 0 0 0 var(--primary, #0e0c47);
}

.admin-file-inbound-unseen {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  background: #e53935;
  color: #fff;
  vertical-align: middle;
}

.admin-hamburger-menu .admin-hamburger-sub {
  padding-left: 28px;
  font-size: 13px;
  color: var(--gray);
}

.admin-hamburger-menu .admin-hamburger-sub:hover {
  color: var(--primary);
}

.admin-hamburger-menu .admin-hamburger-sub.active {
  font-weight: 600;
  color: var(--primary);
}

.admin-hamburger-log-section {
  border-top: 1px solid #e2e8f0;
  margin-top: 4px;
  padding-top: 6px;
}
.admin-hamburger-log-section:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.admin-hamburger-log-section .admin-hamburger-label {
  display: block;
  padding: 6px 18px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-badge-products,
.admin-category-from-products {
  font-size: 11px;
  color: var(--gray);
  font-weight: normal;
}
.admin-badge-products {
  margin-left: 4px;
}

.admin-hamburger-log-section a {
  padding-left: 28px;
  font-size: 13px;
}

/* Eski nav/dropdown stilleri - hamburger içinde kullanılmıyor artık, geriye dönük uyumluluk */
.admin-header-nav {
  display: none;
}

.admin-nav-dropdown {
  position: relative;
}
.admin-nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  padding: 6px 12px;
  border-radius: var(--radius, 6px);
}
.admin-nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 160px;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 4px 0;
  z-index: 1000;
}
.admin-nav-dropdown.is-open .admin-nav-dropdown-menu {
  display: block;
}
.admin-nav-dropdown-trigger:hover {
  background: #f1f5f9;
  color: var(--primary);
}
.admin-nav-dropdown-trigger.active {
  font-weight: 600;
  color: var(--primary);
}
.admin-nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  white-space: nowrap;
  border-radius: 0;
  text-decoration: none;
  color: inherit;
}
.admin-nav-dropdown-menu a:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.admin-header-actions {
  display: none;
}

.admin-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px;
  box-sizing: border-box;
}

/* ================= ADMIN DASHBOARD (Ana Menü) ================= */
.admin-dashboard-page .admin-main {
  padding: 32px 24px;
}
.admin-dashboard-main {
  max-width: 960px;
  margin: 0 auto;
}
.admin-dashboard-welcome {
  margin-bottom: 28px;
}
.admin-dashboard-greeting {
  font-size: 16px;
  color: var(--gray-dark);
  margin: 0;
}
.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.admin-dashboard-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 20px;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 8px);
  text-decoration: none;
  color: var(--gray-dark);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  min-height: 140px;
  box-sizing: border-box;
}
.admin-dashboard-card:hover {
  border-color: var(--primary, #2563eb);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
  transform: translateY(-2px);
  color: var(--primary);
}
.admin-dashboard-card:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.admin-dashboard-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary, #2563eb);
  opacity: 0.9;
}
.admin-dashboard-card:hover .admin-dashboard-card-icon {
  opacity: 1;
}
.admin-dashboard-card-label {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}
.admin-dashboard-card-admin .admin-dashboard-card-label {
  position: relative;
}
.admin-dashboard-card-admin .admin-pending-badge {
  margin-left: 4px;
}
.admin-dashboard-card-sync {
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.admin-dashboard-card-sync:hover {
  border-color: #22c55e;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}
.admin-dashboard-card-sync .admin-dashboard-card-icon {
  color: #16a34a;
}
.admin-dashboard-card-sync .admin-dashboard-card-label {
  color: #15803d;
}
.admin-dashboard-card-disabled {
  opacity: 0.5;
  filter: grayscale(0.6);
}
.admin-dashboard-card-disabled:hover {
  opacity: 0.65;
  filter: grayscale(0.4);
}
@media (max-width: 600px) {
  .admin-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .admin-dashboard-card {
    padding: 20px 14px;
    min-height: 120px;
  }
  .admin-dashboard-card-icon svg {
    width: 40px;
    height: 40px;
  }
}

.admin-main-split {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}
.admin-main-split .admin-main-left {
  flex: 1;
  min-width: 300px;
}
.admin-main-divider {
  width: 1px;
  min-width: 1px;
  background: #e2e8f0;
  margin: 0 12px;
}
.admin-main-split .admin-main-right {
  flex: 1;
  min-width: 280px;
}

/* Kullanıcı yönetimi: üst sekmeler — yalnızca seçili panel görünür */
.admin-users-tabbed-main {
  max-width: 960px;
  margin: 0 auto;
}
.admin-users-section-nav {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 16px 0;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  overflow: hidden;
  gap: 0;
}
.admin-users-nav-btn {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #334155;
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-right: 1px solid #e2e8f0;
  background: transparent;
  transition: background 0.15s, color 0.15s;
}
.admin-users-nav-btn:last-child {
  border-right: none;
}
.admin-users-nav-btn:hover,
.admin-users-nav-btn:focus {
  background: #f1f5f9;
  color: var(--primary, #2563eb);
  outline: none;
}
.admin-users-nav-btn.is-active {
  background: #fff;
  color: var(--primary, #2563eb);
  box-shadow: inset 0 -2px 0 0 var(--primary, #2563eb);
}
.admin-users-nav-btn:focus-visible {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: -2px;
  z-index: 1;
  position: relative;
}
.admin-users-section-panel {
  min-width: 0;
}
.admin-site-ip-panel {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
#section-users,
#section-admin-ip,
#section-site-ip {
  scroll-margin-top: 16px;
}
.admin-users-page .admin-toolbar {
  margin-bottom: 12px;
}
@media (max-width: 768px) {
  .admin-users-section-nav {
    position: sticky;
    top: 0;
    z-index: 6;
  }
  .admin-users-nav-btn {
    padding: 10px 6px;
    font-size: 12px;
  }
  .admin-users-page.admin-main {
    padding: 16px 12px;
  }
  .admin-users-page .admin-toolbar {
    margin-bottom: 6px;
  }
  .admin-users-page .admin-ip-toolbar {
    margin-bottom: 10px;
  }
  .admin-users-page .admin-ip-toggle-wrap {
    margin-bottom: 12px;
    padding: 10px 12px;
  }
  .admin-users-page .admin-title {
    max-width: min(200px, 52vw);
  }
}
html[data-admin-theme="dark"] .admin-users-section-nav {
  background: #0f172a;
  border-color: #334155;
}
html[data-admin-theme="dark"] .admin-users-nav-btn {
  color: #cbd5e1;
  border-right-color: #334155;
}
html[data-admin-theme="dark"] .admin-users-nav-btn:hover,
html[data-admin-theme="dark"] .admin-users-nav-btn:focus {
  background: #1e293b;
  color: #93c5fd;
}
html[data-admin-theme="dark"] .admin-users-nav-btn.is-active {
  background: #1e293b;
  color: #93c5fd;
  box-shadow: inset 0 -2px 0 0 #60a5fa;
}
.admin-ip-whitelist-panel .admin-panel-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: #1e293b;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.admin-ip-whitelist-panel .admin-panel-desc {
  font-size: 12px;
  color: var(--gray);
  margin: 0 0 16px 0;
  line-height: 1.45;
}
.admin-ip-toggle-wrap {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.admin-ip-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-dark);
}
.admin-ip-toggle-input {
  width: 40px;
  height: 22px;
  accent-color: var(--primary);
  cursor: pointer;
}
.admin-ip-toggle-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--gray);
  line-height: 1.4;
}
.admin-approval-toggle-wrap {
  margin-bottom: 20px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.admin-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: inherit;
  resize: vertical;
}
.admin-approval-actions {
  padding: 16px 24px;
  padding-top: 0;
  margin-top: 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.admin-ip-toolbar {
  margin-bottom: 16px;
}
.admin-ip-table-wrap {
  overflow-x: auto;
  max-width: 100%;
}
.admin-ip-table-wrap .admin-table-ip {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}
.admin-ip-table-wrap .admin-table-ip th,
.admin-ip-table-wrap .admin-table-ip td {
  padding: 8px 10px;
}
.admin-ip-table-wrap .admin-table-ip th:first-child,
.admin-ip-table-wrap .admin-table-ip td.admin-ip-cell {
  width: auto;
  min-width: 0;
  white-space: nowrap;
}
.admin-ip-table-wrap .admin-table-ip td.admin-ip-cell {
  padding-right: 12px;
}
.admin-ip-table-wrap .admin-table-ip th.admin-th-actions,
.admin-ip-table-wrap .admin-table-ip td.admin-ip-actions-cell {
  width: 160px;
  white-space: nowrap;
  text-align: right;
}
.admin-ip-table-wrap .admin-table-ip td .product-actions {
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}
.admin-ip-table-wrap .admin-empty {
  padding: 24px 16px;
  font-size: 13px;
}

.admin-brand-logo-wrap.admin-images-list .admin-image-preview-square {
  width: 80px;
  height: 80px;
}
.admin-brand-logo-wrap.admin-images-list .admin-image-preview-square img {
  object-fit: contain;
}
.admin-brand-logo-wrap {
  margin-bottom: 10px;
}
.admin-brand-logo-preview {
  width: 80px;
  height: 80px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-brand-logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.admin-announcements-page .admin-panel-desc {
  margin: 0 24px 16px;
}
.admin-announcements-page .admin-toolbar {
  margin: 0 24px 16px;
}
.admin-announcements-page .admin-table-wrap {
  margin: 0 24px;
}

/* Duyurular: genel tablo min-width:1100px bu sayfada taşmayı tetiklemesin */
.admin-table.admin-table-announcements {
  min-width: 0;
  width: 100%;
  table-layout: auto;
}

.admin-announcement-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Mobil / dar tablet: satırlar kart; yatay kaydırma gerekmez */
@media (max-width: 900px) {
  .admin-announcements-page .admin-panel-desc {
    margin-left: 12px;
    margin-right: 12px;
  }
  .admin-announcements-page .admin-toolbar {
    margin-left: 12px;
    margin-right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .admin-announcements-page .admin-toolbar .admin-btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
  .admin-announcements-page .admin-table-wrap {
    margin-left: 12px;
    margin-right: 12px;
    overflow-x: visible;
    border-radius: 10px;
  }
  .admin-announcements-page .admin-table.admin-table-announcements {
    display: block;
    width: 100%;
  }
  .admin-announcements-page .admin-table-announcements thead {
    display: none;
  }
  .admin-announcements-page .admin-table-announcements tbody {
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: var(--white, #fff);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  }
  .admin-announcements-page .admin-table-announcements tbody tr {
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    box-shadow: none;
  }
  .admin-announcements-page .admin-table-announcements tbody tr + tr {
    border-top: 1px solid #e2e8f0;
  }
  .admin-announcements-page .admin-table-announcements td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    text-align: right;
    word-break: break-word;
  }
  .admin-announcements-page .admin-table-announcements td:last-child {
    border-bottom: none;
  }
  .admin-announcements-page .admin-table-announcements td::before {
    content: attr(data-label);
    flex-shrink: 0;
    max-width: 42%;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #64748b;
    text-align: left;
    line-height: 1.35;
    padding-top: 2px;
  }
  .admin-announcements-page .admin-table-announcements td[data-label="Önizleme"]::before {
    padding-top: 4px;
  }
  .admin-announcements-page .admin-table-announcements .admin-announcement-actions-cell {
    align-items: center;
  }
  .admin-announcements-page .admin-table-announcements .admin-announcement-actions {
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
  }
  .admin-announcements-page .admin-table-announcements .admin-announcement-actions .admin-btn {
    flex: 1 1 auto;
    min-width: calc(50% - 4px);
    justify-content: center;
  }
  .admin-announcements-page .admin-table-announcements .admin-table-thumb {
    max-width: 120px;
    height: auto !important;
    max-height: 72px;
  }
}

html[data-admin-theme="dark"] .admin-announcements-page .admin-table-announcements tbody {
  background: #1e293b;
  border-color: #334155;
}
html[data-admin-theme="dark"] .admin-announcements-page .admin-table-announcements tbody tr + tr {
  border-top-color: #334155;
}
html[data-admin-theme="dark"] .admin-announcements-page .admin-table-announcements td {
  border-bottom-color: #334155;
}
html[data-admin-theme="dark"] .admin-announcements-page .admin-table-announcements td::before {
  color: #94a3b8;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.admin-toolbar-pending .admin-toolbar-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}
.admin-btn-approve {
  background: #22c55e;
  color: var(--white);
}
.admin-btn-approve:hover {
  background: #16a34a;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius, 6px);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.admin-btn-primary {
  background: var(--primary, #0e0c47);
  color: var(--white);
}

.admin-btn-primary:hover {
  background: var(--primary-dark, #0a0828);
}

.admin-btn-secondary {
  background: var(--white);
  color: var(--gray-dark);
  border-color: #cbd5e1;
}

.admin-btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--primary);
}

.admin-display-type-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Duyurular modal: Yayında / Kapalı (Gösterim tipi ile aynı buton dili) */
.admin-announce-enabled-hint {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #64748b;
}
.admin-announce-enabled-btns {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  vertical-align: top;
}
.admin-announce-enabled-btns .admin-announce-enabled-btn {
  position: relative;
  z-index: 0;
  min-width: 108px;
  justify-content: center;
}
.admin-announce-enabled-btns .admin-announce-enabled-btn:first-of-type {
  border-radius: var(--radius, 6px) 0 0 var(--radius, 6px);
}
.admin-announce-enabled-btns .admin-announce-enabled-btn:last-of-type {
  border-radius: 0 var(--radius, 6px) var(--radius, 6px) 0;
  margin-left: -1px;
}
.admin-announce-enabled-btns .admin-announce-enabled-btn:focus {
  z-index: 2;
}
.admin-announce-enabled-btns .admin-announce-enabled-btn.active.admin-btn-primary {
  z-index: 1;
}

.admin-btn-danger {
  background: #dc2626;
  color: var(--white);
}

.admin-btn-danger:hover {
  background: #b91c1c;
}

/* Medya / dosya yükle–kaldır — NEC-v1.4.1 yedeği ile aynı (outline + admin-btn-upload-doc satırları) */
.admin-btn-outline-upload {
  box-sizing: border-box;
  color: var(--primary, #0e0c47);
  background: #fff;
  border: 1px solid var(--primary, #0e0c47);
  font-weight: 500;
  border-radius: var(--radius, 6px);
  -webkit-appearance: none;
  appearance: none;
}
.admin-btn-outline-upload:hover {
  background: #f0f9ff;
}
.admin-btn-outline-upload:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.admin-btn-outline-remove {
  box-sizing: border-box;
  color: #dc2626;
  background: transparent;
  border: 1px solid #fecaca;
  font-weight: 500;
  border-radius: var(--radius, 6px);
  -webkit-appearance: none;
  appearance: none;
}
.admin-btn-outline-remove:hover {
  background: #fef2f2;
}

.admin-btn-success {
  background: #dcfce7;
  color: #166534;
}

.admin-btn-success:hover {
  background: #bbf7d0;
  color: #166534;
}

.admin-sync-icon {
  display: block;
  flex-shrink: 0;
}
.admin-sync-text {
  margin-right: 6px;
}
.admin-btn-icon {
  padding: 10px 14px;
}

.admin-btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* v1.4.1 yedeğindeki .admin-doc-row butonları: 8px 12px, 13px (admin-btn-sm’den sonra) */
.admin-btn-sm.admin-btn-outline-upload,
.admin-btn-sm.admin-btn-outline-remove {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius, 6px);
}

.admin-filter-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-filter-category-wrap {
  display: none;
}

.admin-filter-category-wrap.is-visible {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-hidden,
.admin-video-file-input,
.admin-doc-file-input,
.admin-image-file-input,
.variant-image-file-input {
  display: none !important;
}

/* ===== Utilities (inline style replacement) ===== */
.admin-panel-980 { max-width: 980px; }
.admin-panel-centered { margin-left: auto; margin-right: auto; }
.admin-mt-22 { margin-top: 22px; }

.admin-form-actions-left { justify-content: flex-start; }

.admin-flex-row { display: flex; }
.admin-flex-wrap { flex-wrap: wrap; }
.admin-gap-10 { gap: 10px; }
.admin-align-center { align-items: center; }
.admin-grow-1 { flex: 1; }
.admin-minw-320 { min-width: 320px; }

.admin-form-compact-pad { padding: 20px 24px; }
.admin-panel-desc-compact { margin: 0 0 16px; }
.admin-form-actions-modal {
  padding: 0 24px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: none;
  margin-top: 0;
}

.admin-filter-label {
  font-size: 14px;
  color: var(--gray-dark);
  font-weight: 500;
  white-space: nowrap;
}

.admin-select {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
  background: var(--white);
  color: var(--gray-dark);
  min-width: 120px;
}

.admin-select:focus {
  outline: none;
  border-color: var(--primary);
}

.admin-search-wrap {
  flex: 1;
  max-width: 280px;
}

.admin-search {
  width: 100%;
  padding: 10px 16px;
  font-size: 14px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
  background: var(--white);
}

.admin-search:focus {
  outline: none;
  border-color: var(--primary);
}

.admin-table-wrap {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
}

.admin-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  font-size: 14px;
}

/* Dosya Paylaşımı iki sütun: global 1100px min tabloyu sütundan taşırıp sağ kolonu eziyor */
.admin-file-share-split .admin-table-wrap .admin-table {
  min-width: 520px;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.admin-table th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--gray-dark);
}
.admin-table th.admin-th-sortable {
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
.admin-table th.admin-th-sortable:hover {
  background: #f1f5f9;
}
.admin-table th.admin-th-sortable::after {
  content: ' ⇅';
  font-size: 11px;
  color: #94a3b8;
  font-weight: normal;
}
.admin-table th.admin-th-sortable.is-sorted-asc::after {
  content: ' ▲';
  color: var(--primary);
}
.admin-table th.admin-th-sortable.is-sorted-desc::after {
  content: ' ▼';
  color: var(--primary);
}

.admin-table tbody tr:hover {
  background: #fafafa;
}

.admin-table .product-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  background: #f1f5f9;
}

.admin-table .product-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-table .admin-cell-truncate {
  max-width: 320px;
  min-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-table .admin-cell-small {
  max-width: 220px;
  min-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-table .admin-cell-small code {
  font-size: 12px;
}
.admin-table .admin-cell-id {
  font-weight: 600;
  font-size: 12px;
}
.admin-table td:nth-child(7),
.admin-table td:nth-child(8) {
  min-width: 100px;
}
.admin-table td:nth-child(9),
.admin-table td:nth-child(10) {
  min-width: 140px;
}

/* Ürün listesi: yalnızca mobil tarayıcı + mobil PWA (JS: .admin-table--product-compact) */
.admin-table.admin-table--product-compact {
  min-width: 0;
  width: 100%;
  table-layout: auto;
}
.admin-table.admin-table--product-compact [data-product-col="brand"],
.admin-table.admin-table--product-compact [data-product-col="category"],
.admin-table.admin-table--product-compact [data-product-col="subcategory"],
.admin-table.admin-table--product-compact [data-product-col="slug"],
.admin-table.admin-table--product-compact [data-product-col="manuel"],
.admin-table.admin-table--product-compact [data-product-col="file"],
.admin-table.admin-table--product-compact [data-product-col="features"],
.admin-table.admin-table--product-compact [data-product-col="explanation"] {
  display: none;
}

.admin-video-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 12px;
  background: #e0e7ff;
  color: #4338ca;
  border-radius: 4px;
}

.admin-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--gray);
  font-size: 14px;
  margin: 0;
  display: none;
}

.admin-table-wrap.has-empty .admin-table {
  display: none;
}

.admin-table-wrap.has-empty .admin-empty {
  display: block;
}

/* Compact tables: az sütunlu tablolar için boşluk azaltma ve butonların görünürlüğü */
.admin-table-wrap-compact {
  overflow-x: auto;
  max-width: 100%;
}
.admin-table-compact {
  min-width: 560px;
  table-layout: fixed;
  width: 100%;
}
.admin-table-compact th,
.admin-table-compact td {
  padding: 10px 12px;
}
.admin-table-compact .admin-th-logo {
  width: 64px;
  min-width: 64px;
}
.admin-table-compact .admin-th-name {
  width: 180px;
  min-width: 140px;
}
.admin-table-compact:not(.admin-table-users) td:nth-child(2) {
  width: 180px;
  min-width: 140px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.admin-table-compact .admin-th-slug {
  width: 140px;
  min-width: 100px;
}
.admin-table-compact:not(.admin-table-users) td:nth-child(3) {
  width: 140px;
  min-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-table-compact .admin-th-actions {
  width: 200px;
  white-space: nowrap;
  text-align: right;
}
.admin-table-compact td:last-child {
  text-align: right;
  white-space: nowrap;
}
.admin-table-compact .product-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
}
.admin-toolbar-category-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-category-brand-hint {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--gray-dark, #334155);
  line-height: 1.4;
}
html[data-admin-theme="dark"] .admin-category-brand-hint {
  color: #e2e8f0;
}
tbody#brandTableBody .admin-brand-table-row {
  cursor: pointer;
}
tbody#brandTableBody .admin-brand-table-row:hover:not(.is-brand-selected) {
  background: #f8fafc;
}
tbody#brandTableBody .admin-brand-table-row.is-brand-selected {
  background: #eef2ff;
  box-shadow: inset 3px 0 0 0 var(--primary, #4f46e5);
}
html[data-admin-theme="dark"] tbody#brandTableBody .admin-brand-table-row.is-brand-selected {
  background: rgba(99, 102, 241, 0.22);
  box-shadow: inset 3px 0 0 0 #818cf8;
}
html[data-admin-theme="dark"] tbody#brandTableBody .admin-brand-table-row:hover:not(.is-brand-selected) {
  background: rgba(51, 65, 85, 0.5);
}
.admin-table-users .admin-th-rol {
  width: 90px;
  min-width: 90px;
}
.admin-table-users th:nth-child(1),
.admin-table-users td:nth-child(1) {
  width: auto;
}
.admin-table-users .admin-th-actions {
  width: 160px;
}

.admin-role-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f5f9;
  color: #334155;
}
.admin-role-admin {
  background: #dbeafe;
  color: #1d4ed8;
}
.admin-role-user {
  background: #f1f5f9;
  color: #475569;
}
.admin-log-success {
  background: #dcfce7;
  color: #166534;
}
.admin-log-fail {
  background: #fee2e2;
  color: #991b1b;
}
.admin-log-op-edit {
  background: #dbeafe;
  color: #1e40af;
}
.admin-log-op-delete {
  background: #fee2e2;
  color: #991b1b;
}
.admin-log-op-sync {
  background: #fef3c7;
  color: #92400e;
}
.admin-log-op-user_add {
  background: #dcfce7;
  color: #166534;
}
.admin-log-op-user_delete {
  background: #fee2e2;
  color: #991b1b;
}
.admin-log-op-user_role {
  background: #ede9fe;
  color: #5b21b6;
}
.admin-log-op-user_password {
  background: #ffedd5;
  color: #c2410c;
}
.admin-log-op-user_username {
  background: #ccfbf1;
  color: #0f766e;
}
.admin-log-op-ip_add {
  background: #dbeafe;
  color: #1e40af;
}
.admin-log-op-ip_edit {
  background: #e0e7ff;
  color: #3730a3;
}
.admin-log-op-ip_delete {
  background: #fee2e2;
  color: #991b1b;
}
.admin-log-op-product_add {
  background: #dcfce7;
  color: #166534;
}
.admin-log-op-announcement_add {
  background: #dcfce7;
  color: #166534;
}
.admin-log-op-announcement_edit {
  background: #dbeafe;
  color: #1e40af;
}
.admin-log-op-announcement_delete {
  background: #fee2e2;
  color: #991b1b;
}
.admin-log-op-brand_add,
.admin-log-op-category_add {
  background: #dcfce7;
  color: #166534;
}
.admin-log-op-brand_edit,
.admin-log-op-category_edit {
  background: #dbeafe;
  color: #1e40af;
}
.admin-log-op-brand_delete,
.admin-log-op-category_delete {
  background: #fee2e2;
  color: #991b1b;
}
.admin-log-op-site_info_update {
  background: #e0e7ff;
  color: #3730a3;
}
.admin-log-op-sync_site_info {
  background: #fef3c7;
  color: #92400e;
}
.admin-log-op-sync_category_pages {
  background: #fef3c7;
  color: #92400e;
}
.admin-log-op-signature_sent {
  background: #dbeafe;
  color: #1e40af;
}
.admin-log-op-translations_edit {
  background: #e0e7ff;
  color: #4338ca;
}
.admin-log-op-file_share_upload {
  background: #cffafe;
  color: #0e7490;
}
.admin-log-op-file_share_delete {
  background: #fce7f3;
  color: #9d174d;
}
.admin-log-op-file_receive_create,
.admin-log-op-file_receive_revoke {
  background: #d1fae5;
  color: #047857;
}
.admin-log-op-file_receive_delete_link,
.admin-log-op-file_receive_delete_file {
  background: #fee2e2;
  color: #991b1b;
}

.admin-log-op-subcategory_add {
  background: #dcfce7;
  color: #166534;
}
.admin-log-op-subcategory_edit {
  background: #dbeafe;
  color: #1e40af;
}
.admin-log-op-subcategory_delete {
  background: #fee2e2;
  color: #991b1b;
}

/* İşlemler logu tablo kolon genişlikleri */
.admin-table-log th:nth-child(1),
.admin-table-log td:nth-child(1) { min-width: 140px; }
.admin-table-log th:nth-child(2),
.admin-table-log td:nth-child(2) { min-width: 120px; }
.admin-table-log th:nth-child(3),
.admin-table-log td:nth-child(3) { min-width: 90px; }
.admin-table-log th:nth-child(4),
.admin-table-log td:nth-child(4) { min-width: 180px; }

/* Log detay tooltip - imleç üzerine gelince tam metin */
.admin-log-details-cell {
  position: relative;
  cursor: help;
  overflow: visible;
}
.admin-log-details-cell.admin-cell-truncate {
  overflow: visible;
}
.admin-log-details-cell .admin-log-details-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}
.admin-log-details-tooltip {
  visibility: hidden;
  position: fixed;
  z-index: 9999;
  max-width: 520px;
  max-height: 70vh;
  padding: 12px 14px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  pointer-events: none;
  overflow-y: auto;
}
.admin-log-details-cell:hover .admin-log-details-tooltip {
  visibility: visible;
}

/* ================= ADMIN NOTIFY (alert/confirm) ================= */
.admin-notify-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.admin-notify-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.admin-notify-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.admin-notify-box {
  position: relative;
  background: #1e293b;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  max-width: 420px;
  width: 100%;
  overflow: hidden;
}
.admin-notify-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.admin-notify-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: #f8fafc;
}
.admin-notify-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-notify-close:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}
.admin-notify-body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #e2e8f0;
}
.admin-notify-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.admin-notify-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.admin-notify-btn-ok {
  background: #3b82f6;
  color: #fff;
  border-color: #2563eb;
}
.admin-notify-btn-ok:hover {
  background: #2563eb;
}
.admin-notify-btn-cancel {
  background: #334155;
  color: #e2e8f0;
  border-color: #475569;
}
.admin-notify-btn-cancel:hover {
  background: #475569;
}
.admin-notify-btn-confirm {
  background: var(--primary, #0e0c47);
  color: #fff;
  border-color: #1e293b;
}
.admin-notify-btn-confirm:hover {
  background: #1e293b;
}
.admin-notify-btn-danger {
  background: #dc2626;
  color: #fff;
  border-color: #b91c1c;
}
.admin-notify-btn-danger:hover {
  background: #b91c1c;
}

/* ================= MODAL ================= */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.admin-modal.is-open {
  opacity: 1;
  visibility: visible;
}

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

.admin-modal-box {
  position: relative;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.admin-modal-box-sm {
  max-width: 400px;
}
.admin-modal-box-lg {
  max-width: 720px;
}
.admin-modal-box-xl {
  max-width: 980px;
}

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

.admin-modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: var(--gray-dark);
}

.admin-modal-header-start {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.admin-modal-header-start h2 {
  flex: 1;
  min-width: 0;
}

.admin-modal-header-start > .admin-modal-tab-ai-btn {
  margin-left: 0;
  flex-shrink: 0;
}

/* Duyurular: başlık solda, AI butonu aynı satırda sağda */
.admin-modal-header-start--announce-ai-end {
  justify-content: flex-start;
}
.admin-modal-header-start--announce-ai-end h2 {
  flex: 1;
  min-width: 0;
}
.admin-modal-header-start--announce-ai-end > .admin-modal-tab-ai-btn {
  margin-left: auto;
  flex-shrink: 0;
}

/* Ürün modalı: sekme satırında «AI ile doldur» */
.admin-modal-tab-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  flex-shrink: 0;
}

.admin-modal-tab-ai-btn .admin-ai-tab-icon {
  flex-shrink: 0;
  opacity: 0.92;
}

html[data-admin-theme="dark"] .admin-modal-tab-ai-btn.admin-btn-secondary {
  background: rgba(51, 65, 85, 0.6);
  border-color: #475569;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-modal-tab-ai-btn.admin-btn-secondary:hover {
  background: rgba(71, 85, 105, 0.85);
  border-color: #64748b;
  color: #f8fafc;
}

.admin-ai-import-hint {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.admin-ai-import-nameonly-wrap {
  margin-bottom: 12px;
}

.admin-ai-import-mode-hint {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.4;
  color: #64748b;
}

.admin-ai-import-mode-toggle {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-ai-import-mode-toggle .admin-btn {
  flex: 1 1 auto;
  min-width: min(160px, 46%);
  justify-content: center;
}

.admin-ai-import-mode-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.admin-ai-import-focus-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
}

#aiImportNameOnlyFields .admin-ai-import-context-label {
  display: block;
  margin-top: 10px;
}

html[data-admin-theme="dark"] .admin-ai-import-mode-hint {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-ai-import-focus-hint {
  color: #94a3b8;
}

.admin-ai-import-actions {
  margin-bottom: 12px;
}

.admin-ai-import-status {
  font-size: 13px;
  color: var(--gray-dark);
  margin: 8px 0 0;
}

.admin-ai-import-status.is-error {
  color: #b91c1c;
}

.admin-ai-import-target-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
}

.admin-ai-import-apply-fields {
  margin: 14px 0 0;
  padding: 12px 12px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-ai-import-apply-fields-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.admin-ai-apply-field {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: #0f172a;
  cursor: pointer;
}

.admin-ai-apply-field input {
  margin-top: 2px;
  flex-shrink: 0;
}

.admin-variant-panel.ai-import-frozen {
  position: relative;
  pointer-events: none;
  opacity: 0.72;
  filter: grayscale(0.06);
}

.admin-variant-panel.ai-import-frozen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: rgba(248, 250, 252, 0.35);
}

.admin-ai-import-preview-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.admin-ai-preview-heading {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.admin-ai-preview-dl {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.admin-ai-preview-dl dt {
  font-weight: 600;
  color: #475569;
  margin-top: 10px;
}

.admin-ai-preview-dl dt:first-child {
  margin-top: 0;
}

.admin-ai-preview-dl dd {
  margin: 4px 0 0;
  color: #0f172a;
  word-break: break-word;
}

.admin-ai-preview-dd-features {
  white-space: pre-line;
}

.admin-ai-preview-dd-html {
  max-height: 160px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  background: #f8fafc;
}

.admin-ai-preview-dd-url {
  word-break: break-all;
  font-size: 12px;
  color: #475569;
}

.admin-ai-import-apply-wrap {
  margin-top: 16px;
}

.admin-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--gray);
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.admin-modal-close:hover {
  background: #f1f5f9;
  color: var(--gray-dark);
}

/* Gelen dosya önizleme (file-share) */
.admin-receive-preview-wrap {
  padding: 0 24px 24px;
  min-height: 0;
}
.admin-receive-preview-frame {
  width: 100%;
  height: min(72vh, 720px);
  border: 0;
  display: block;
  background: #f1f5f9;
  border-radius: 4px;
}
.admin-receive-preview-fallback {
  padding: 12px 0;
  max-height: min(72vh, 720px);
  overflow: auto;
}
.admin-receive-docx-html {
  font-size: 14px;
  line-height: 1.55;
  color: var(--gray-dark);
  max-width: 100%;
}
.admin-receive-docx-html p { margin: 0 0 0.75em; }
.admin-receive-docx-html h1, .admin-receive-docx-html h2, .admin-receive-docx-html h3 {
  margin: 0.6em 0 0.35em;
  font-weight: 700;
}
.admin-receive-docx-html table { border-collapse: collapse; width: 100%; font-size: 13px; }
.admin-receive-docx-html td, .admin-receive-docx-html th {
  border: 1px solid #e2e8f0;
  padding: 4px 8px;
}

/* ================= FORM ================= */
.admin-form {
  padding: 24px;
}

/* Site Info - iki sütun: sol Logolar+Sosyal Medya, sağ İletişim Bilgileri */
.admin-site-info-page .admin-main.admin-site-info-centered {
  max-width: 1120px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}
.admin-site-info-toolbar.admin-toolbar-global {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}
.admin-site-info-lead.admin-panel-desc {
  margin: 0 0 16px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
/* Formdan itibaren: içerik sağa dayalı; iki sütun grubu sağda toplanır */
.admin-site-info-form {
  max-width: 1100px;
  width: 100%;
  margin-left: auto;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}
.admin-site-info-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
}
.admin-site-info-left {
  flex: 1;
  min-width: 320px;
  max-width: 600px;
}
.admin-site-info-right {
  flex: 0 0 340px;
  min-width: 280px;
}
.admin-site-info-actions {
  display: flex;
  gap: 48px;
  align-items: center;
  width: 100%;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}
.admin-site-info-actions-spacer {
  flex: 1;
  min-width: 0;
}
.admin-site-info-actions .admin-btn {
  flex-shrink: 0;
}
@media (max-width: 900px) {
  .admin-site-info-page .admin-site-info-form {
    margin-left: auto;
    margin-right: auto;
  }
  .admin-site-info-layout {
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
  }
  .admin-site-info-left,
  .admin-site-info-right {
    flex: 1 1 auto;
    min-width: 0 !important;
    max-width: 100%;
    width: 100%;
  }
}

.admin-form-group {
  margin-bottom: 20px;
}

.admin-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-dark);
  margin-bottom: 6px;
}

.admin-form-group input,
.admin-form-group select,
.admin-form-group textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
  font-family: inherit;
}

.admin-form-group input:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.admin-form-group input[readonly] {
  background: #f8fafc;
  color: #64748b;
  cursor: default;
}

.admin-form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.admin-form-group small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--gray);
}

/* Çeviri bekleyenler listesi */
.admin-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-dark);
  margin: 0 0 8px 0;
}
.admin-translation-pending-section {
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
  padding: 16px;
}
.admin-translation-pending-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.admin-translation-pending-head .admin-section-title {
  margin-bottom: 0;
}
.admin-translation-pending-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-translation-pending-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.admin-translation-pending-meta {
  flex: 1 1 100%;
  font-size: 12px;
  color: var(--gray);
}
.admin-translation-pending-type {
  font-weight: 600;
  color: var(--primary);
}
.admin-translation-pending-field {
  margin-left: 6px;
}
.admin-translation-pending-preview {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--gray-dark);
  line-height: 1.4;
}

/* Çeviri satırları - her çeviri ayrı satır, Türkçe readonly, İngilizce düzenlenebilir */
.admin-translations-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
  overflow: hidden;
}
.admin-translation-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  min-height: 44px;
}
.admin-translation-row:last-child {
  border-bottom: none;
}
.admin-translation-row-blank {
  min-height: 8px;
  padding: 4px 14px;
  background: #f8fafc;
}
/* Açılıp kapanabilir bölümler */
.admin-translation-section {
  border-bottom: 1px solid #e2e8f0;
}
.admin-translation-section:last-child {
  border-bottom: none;
}
.admin-translation-section-header {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 0.15s ease;
}
.admin-translation-section-header:hover {
  background: #e2e8f0 !important;
}
.admin-translation-section-header:focus {
  outline: 2px solid var(--primary, #3b82f6);
  outline-offset: -2px;
}
.admin-translation-chevron {
  flex-shrink: 0;
  display: inline-flex;
  transition: transform 0.2s ease;
}
.admin-translation-section-expanded .admin-translation-chevron {
  transform: rotate(0deg);
}
.admin-translation-section-collapsed .admin-translation-chevron {
  transform: rotate(-90deg);
}
.admin-translation-section-collapsed .admin-translation-section-content {
  display: none;
}

.admin-translation-row-comment {
  background: #f1f5f9;
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}
.admin-translation-section-header.admin-translation-row-comment {
  justify-content: space-between;
  gap: 8px;
}
.admin-translation-section-header .admin-translation-empty-dot {
  flex-shrink: 0;
}
.admin-translation-comment {
  flex: 1;
}
.admin-translation-row-item {
  gap: 16px;
}
.admin-translation-key {
  flex: 0 0 180px;
  font-size: 12px;
  color: #64748b;
  font-family: monospace;
  word-break: break-all;
}
.admin-translation-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: inherit;
}
.admin-translation-input:focus {
  outline: none;
  border-color: var(--primary);
}
.admin-translation-tr {
  background: #f8fafc;
  color: #475569;
  cursor: default;
  flex: 1;
  min-width: 120px;
}
.admin-translation-en-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.admin-translation-empty-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
}
.admin-translation-empty-dot-hidden {
  display: none;
}
.admin-translation-en {
  flex: 1;
  min-width: 120px;
  background: var(--white);
}
.admin-translation-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  opacity: 0.8;
}
.admin-translation-arrow svg {
  width: 20px;
  height: 20px;
}
@media (max-width: 768px) {
  .admin-translation-row-item {
    flex-wrap: wrap;
  }
  .admin-translation-key {
    flex: 1 1 100%;
  }
  .admin-translation-tr,
  .admin-translation-en {
    flex: 1 1 calc(50% - 30px);
    min-width: 0;
  }
}

/* Özellikler: sol kutu 4 standart, sağda ek özellikler (başlık + açıklama + Kaldır) */
.admin-features-hint {
  font-size: 12px;
  color: var(--gray);
  margin: 0 0 10px 0;
}
.admin-features-list {
  margin-bottom: 10px;
}
.admin-feature-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.admin-feature-row .product-feature-title {
  flex: 0 0 140px;
  min-width: 0;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
  font-family: inherit;
}
.admin-feature-row .product-feature-desc {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
  font-family: inherit;
}
.admin-feature-row .product-feature-title:focus,
.admin-feature-row .product-feature-desc:focus {
  outline: none;
  border-color: var(--primary);
}
.admin-feature-row .admin-btn-outline-remove {
  flex-shrink: 0;
}

/* Explanation editörü: Bold / Italic / Font / Font size barı */
.admin-editor-wrap {
  width: 100%;
  min-width: 0;
}
.admin-editor-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 8px 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  border-radius: var(--radius, 6px) var(--radius, 6px) 0 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.admin-editor-toolbar .admin-editor-sep {
  width: 1px;
  height: 24px;
  background: #e2e8f0;
  margin: 0 4px;
  flex-shrink: 0;
}
.admin-editor-btn {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  color: var(--gray-dark);
}
.admin-editor-btn:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}
.admin-editor-align-wrap {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 2px;
}
.admin-editor-align-wrap .admin-editor-btn {
  padding: 6px 8px;
  min-width: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.admin-editor-align-wrap .admin-editor-btn svg {
  display: block;
}
.admin-editor-select {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
  color: var(--gray-dark);
  cursor: pointer;
}
.admin-editor-size-wrap {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
  overflow: visible;
}
.admin-editor-size-wrap .admin-editor-btn {
  padding: 6px 12px;
  min-width: 36px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  border: none;
  border-radius: 0;
  flex-shrink: 0;
}
.admin-editor-size-wrap .admin-editor-btn:first-child {
  border-right: 1px solid #e2e8f0;
}
.admin-editor-size-wrap .admin-editor-btn:last-child {
  border-left: 1px solid #e2e8f0;
}
.admin-editor-size-wrap .admin-editor-btn:hover {
  background: #e2e8f0;
}
.admin-editor-size-label,
.admin-editor-size-value {
  display: inline-block;
  padding: 6px 14px;
  min-width: 52px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-dark);
  text-align: center;
  flex-shrink: 0;
}
.admin-editor-content {
  width: 100%;
  min-height: 160px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid #e2e8f0;
  border-radius: 0 0 var(--radius, 6px) var(--radius, 6px);
  background: #fff;
  overflow-y: auto;
  overflow-x: hidden;
  outline: none;
  box-sizing: border-box;
  resize: none;
  -ms-overflow-style: none;
}
@supports (scrollbar-width: none) {
  .admin-editor-content {
    scrollbar-width: none;
  }
}
.admin-editor-content::-webkit-scrollbar {
  display: none;
}
.admin-editor-content:focus {
  border-color: var(--primary);
}
.admin-editor-content[data-placeholder]:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
}

.admin-image-preview-wrap {
  margin-bottom: 10px;
}
.admin-image-preview {
  max-width: 200px;
  max-height: 120px;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}

.admin-form-row {
  display: flex;
  gap: 16px;
}

.admin-form-row-2 .admin-form-group {
  flex: 1;
}

/* İki sütunlu satır (duyuru başlangıç/bitiş vb.): mobilde üst üste */
@media (max-width: 768px) {
  .admin-form-row.admin-form-row-2 {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .admin-form-row.admin-form-row-2 .admin-form-group {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }
}

.admin-form input[type="datetime-local"],
.admin-modal .admin-form input[type="datetime-local"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.admin-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: normal;
  cursor: pointer;
}
.admin-checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}

.admin-announcement-status {
  font-size: 0.9em;
}
.admin-announcement-status--visible {
  color: #15803d;
  font-weight: 500;
}
.admin-announcement-status--hidden {
  color: #64748b;
}

.admin-images-list {
  margin-bottom: 10px;
}
.admin-image-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

/* admin-upload-dropzone.js: tüm sürükle-bırak hedefleri — geniş, kesik çerçeve, sürüklerken güçlü vurgu */
.admin-upload-dz-target {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 14px 16px;
  border: 2px dashed #8896a8;
  border-radius: 12px;
  background: linear-gradient(180deg, #ebeef2 0%, #dfe6ee 100%);
  transition: border-color 0.2s ease, border-style 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.admin-upload-dz-target.is-dragover {
  border-color: var(--primary, #0e0c47);
  border-style: solid;
  background: #dbeafe;
  box-shadow:
    inset 0 0 0 2px rgba(14, 12, 71, 0.18),
    0 6px 20px rgba(14, 12, 71, 0.1);
}
.admin-image-actions.admin-upload-dz-target,
.admin-social-actions.admin-upload-dz-target {
  cursor: pointer;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  margin-bottom: 10px;
}
.admin-social-actions.admin-upload-dz-target {
  margin-bottom: 0;
  margin-top: 4px;
}

/* Görsel / video satırı (ürün, duyuru vb.) */
.admin-image-row.admin-upload-dz-target {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  row-gap: 10px;
  margin-bottom: 12px;
  min-height: 56px;
}
.admin-image-row.admin-upload-dz-target::after {
  content: 'Dosyayı buraya sürükleyip bırakın veya yükle butonunu kullanın';
  flex: 1 1 100%;
  order: 99;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
  margin: 0;
  padding-top: 4px;
  pointer-events: none;
}

.admin-image-actions.admin-upload-dz-target::after {
  content: 'Dosyayı buraya sürükleyip bırakın veya yükle butonunu kullanın';
  flex: 1 1 100%;
  order: 99;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
  margin: 0;
  padding-top: 2px;
  pointer-events: none;
}

.admin-social-actions.admin-upload-dz-target::after {
  content: 'İkonu buraya sürükleyip bırakın veya «İkon Yükle» ile seçin';
  flex: 1 1 100%;
  order: 99;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
  margin: 0;
  padding-top: 2px;
  pointer-events: none;
}

/* Manuel / döküman satırı */
.admin-doc-row.admin-upload-dz-target {
  flex-wrap: wrap;
  align-items: center;
  row-gap: 8px;
  margin-bottom: 12px;
}
.admin-doc-row.admin-upload-dz-target.is-dragover {
  box-shadow:
    inset 0 0 0 2px rgba(14, 12, 71, 0.2),
    0 6px 20px rgba(14, 12, 71, 0.1);
}
.admin-doc-row.admin-upload-dz-target::after {
  content: 'Dosyayı bu alana sürükleyip bırakın veya «Dosya Yükle» ile seçin';
  flex: 1 1 100%;
  order: 99;
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
  margin: 0;
  padding-top: 4px;
  /* ::after üstte çizildiğinde tıklamaları yutmasın (Kaldır / Dosya Yükle vb.) */
  pointer-events: none;
}
/* Sürükle-bırak kutusu içindeki kontroller her zaman tıklanabilir kalsın */
.admin-doc-row.admin-upload-dz-target > .product-doc-display,
.admin-doc-row.admin-upload-dz-target > .product-doc-path,
.admin-doc-row.admin-upload-dz-target > .admin-btn-upload-doc,
.admin-doc-row.admin-upload-dz-target > .admin-btn-remove {
  position: relative;
  z-index: 1;
}

/* Sosyal medya listesi */
.admin-social-list {
  margin-bottom: 16px;
}
.admin-social-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  background: #f8fafc;
}
.admin-social-item-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-social-item-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.admin-social-item-row .product-image-url {
  flex: 1;
  min-width: 0;
}
.admin-form-group-inline {
  margin-bottom: 0;
}
.admin-form-group-inline label {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}
.admin-social-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Bilgi yönetimi (site-info): önizleme + yükleme tek sürükle-bırak bölgesinde */
.admin-site-info-media-zone,
.admin-site-info-social-zone,
.admin-announcements-media-zone {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.admin-site-info-media-zone .admin-image-actions,
.admin-site-info-social-zone .admin-social-actions,
.admin-announcements-media-zone .admin-image-actions {
  margin-bottom: 0;
}
.admin-site-info-media-zone.admin-upload-dz-target::after {
  content: 'Görseli bu alana (önizleme dahil) sürükleyip bırakın veya «Logo Yükle» / «Favicon Yükle» kullanın';
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
  margin-top: 2px;
  order: 99;
}
.admin-site-info-social-zone.admin-upload-dz-target::after {
  content: 'İkonu bu alana (önizleme dahil) sürükleyip bırakın veya «İkon Yükle» kullanın';
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
  margin-top: 2px;
  order: 99;
}

/* Duyurular modal: görsel / video sürükle-bırak */
.admin-announcements-media-zone--image.admin-upload-dz-target::after {
  content: 'Görseli buraya (önizleme dahil) sürükleyip bırakın veya «Görsel Yükle» kullanın';
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
  margin-top: 2px;
  order: 99;
}
.admin-announcements-media-zone--video.admin-upload-dz-target::after {
  content: 'Video dosyasını buraya sürükleyip bırakın, «Video Yükle» kullanın veya alttaki alana embed URL yazın';
  font-size: 12px;
  line-height: 1.4;
  color: #64748b;
  margin-top: 2px;
  order: 99;
}

/* Dosya gönder (file-share): kart + kesik alan; altta Dosya ekle / Tümünü kaldır; Yükle form aksiyonlarında */
.admin-share-upload-card {
  background: #eef2f6;
  border: 1px solid #d1dae4;
  border-radius: 14px;
  padding: 16px;
}
.admin-share-dropzone {
  display: block;
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  padding: 28px 20px;
  background: #e8edf3;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}
.admin-share-dropzone:hover,
.admin-share-dropzone.is-dragover {
  border-color: var(--primary, #0e0c47);
  background: #dbeafe;
}
.admin-share-dropzone:focus-visible {
  outline: 2px solid var(--primary, #0e0c47);
  outline-offset: 2px;
}
.admin-share-dropzone-inner strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary, #0e0c47);
  margin-bottom: 6px;
}
.admin-share-dropzone-sub {
  display: block;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}
.admin-share-after-drop {
  margin-top: 12px;
}
.admin-share-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.admin-share-card-actions {
  margin-top: 18px;
  margin-bottom: 0;
  gap: 12px;
}
.admin-share-card-actions .admin-btn {
  flex: 1 1 140px;
  min-height: 46px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  justify-content: center;
  -webkit-appearance: none;
  appearance: none;
}
.admin-btn-share-add {
  box-sizing: border-box;
  color: var(--primary, #0e0c47);
  background: #fff;
  border: 1px solid var(--primary, #0e0c47);
}
.admin-btn-share-add:hover:not(:disabled) {
  background: #f0f9ff;
}
.admin-btn-share-clear {
  box-sizing: border-box;
  color: #334155;
  background: #fff;
  border: 1px solid #cbd5e1;
}
.admin-btn-share-clear:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
}
.admin-btn-share-add:disabled,
.admin-btn-share-clear:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
/* Dosya paylaşımı: ana «Yükle» (outline) genişliği — yükleme sırasında spinner */
#btnUploadShare.admin-btn-outline-upload.admin-btn-loading {
  min-width: 7.5rem;
}

/* Manual / File çoklu dosya listesi */
.admin-docs-list {
  margin-bottom: 8px;
}
.admin-doc-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.admin-doc-row .product-doc-display {
  flex: 0 0 160px;
  min-width: 0;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
}
.admin-doc-row .product-doc-path {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
}
.admin-doc-row .product-doc-path[readonly] {
  background: #f8fafc;
  color: #64748b;
  cursor: default;
}
.admin-doc-row .product-doc-path--pending::placeholder {
  color: #64748b;
}
.product-image-url.product-image-url--pending::placeholder,
.product-video-url.product-video-url--pending::placeholder {
  color: #64748b;
}
/* NEC-v1.4.1: .admin-doc-row .admin-btn-upload-doc / .admin-btn-remove (admin-btn-outline-* ile birlikte) */
.admin-doc-row .admin-btn-upload-doc {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--primary);
  border-radius: var(--radius, 6px);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.admin-doc-row .admin-btn-upload-doc:hover {
  background: #f0f9ff;
}
.admin-doc-row .admin-btn-upload-doc:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.admin-doc-row .admin-btn-remove {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 13px;
  color: #dc2626;
  background: transparent;
  border: 1px solid #fecaca;
  border-radius: var(--radius, 6px);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.admin-doc-row .admin-btn-remove:hover {
  background: #fef2f2;
}
.admin-docs-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
}
/* Tarayıcı varsayılanı (gri/köşeli) bazen .admin-btn stillerini ezer; özellikle ilk butonda */
.admin-docs-actions .admin-btn {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  font: inherit;
  background: var(--white);
  color: var(--gray-dark);
  border: 1px solid #cbd5e1;
  border-radius: var(--radius, 6px);
}
.admin-docs-actions .admin-btn:hover {
  background: #f8fafc;
  border-color: var(--primary, #0e0c47);
}
.admin-docs-actions .admin-btn:focus-visible {
  outline: 2px solid var(--primary, #0e0c47);
  outline-offset: 2px;
}

/* Dosya paylaşımı: çoklu seçim listesi */
.admin-share-file-actions {
  flex-wrap: wrap;
}
.admin-share-file-list-wrap {
  margin-top: 8px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
  background: #f8fafc;
  min-height: 44px;
  padding: 8px 10px;
}
.admin-share-file-empty {
  margin: 0;
  padding: 6px 2px;
  font-size: 13px;
  color: #64748b;
}
.admin-share-file-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.admin-share-file-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 2px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
}
.admin-share-file-item:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}
.admin-share-file-name {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  color: #334155;
}
.admin-share-file-size {
  flex-shrink: 0;
  color: #64748b;
  font-size: 12px;
  padding-top: 1px;
}
.admin-share-file-item .admin-btn-outline-remove {
  margin-top: -2px;
  padding: 4px 10px;
  font-size: 12px;
}

/* Outline yükle butonları: disabled + spinner birlikte soluk kalmasın */
.admin-btn-outline-upload.admin-btn-loading:disabled {
  opacity: 1;
  cursor: wait;
}

.admin-images-list .admin-image-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.admin-image-preview-square {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-image-preview-square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-image-placeholder {
  width: 100%;
  height: 100%;
  background: #e2e8f0;
  display: block;
}
.admin-image-failed {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #94a3b8;
  text-align: center;
  padding: 4px;
  background: #f1f5f9;
}

.admin-images-list .admin-image-row input {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
}

.admin-images-list .admin-image-row .admin-btn,
.admin-images-list .admin-image-row .admin-btn-upload-image,
.admin-images-list .admin-image-row .admin-btn-upload-video {
  flex-shrink: 0;
}

.admin-images-list .admin-image-row .admin-btn-upload-image:disabled,
.admin-images-list .admin-image-row .admin-btn-upload-video:disabled,
.admin-image-actions .variant-upload-image:disabled,
.admin-btn-primary:disabled,
.admin-btn-primary.admin-btn-loading {
  opacity: 0.85;
  cursor: not-allowed;
}

/* Yükleme animasyonu */
.admin-btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.admin-btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: admin-btn-spin 0.6s linear infinite;
}

.admin-btn-primary.admin-btn-loading::after {
  border-color: rgba(255, 255, 255, 0.4);
  border-right-color: transparent;
}

.admin-btn-outline-upload.admin-btn-loading::after {
  border-color: rgba(14, 12, 71, 0.45);
  border-right-color: transparent;
}

.admin-btn-success:disabled,
.admin-btn-success.admin-btn-loading {
  opacity: 0.85;
  cursor: not-allowed;
}

.admin-btn-success.admin-btn-loading::after {
  border-color: rgba(22, 101, 52, 0.5);
  border-right-color: transparent;
}

html[data-admin-theme="dark"] .admin-btn-success.admin-btn-loading::after {
  border-color: rgba(187, 247, 208, 0.55);
  border-right-color: transparent;
}

@keyframes admin-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.admin-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
}

.admin-mt-0 {
  margin-top: 0 !important;
}

.admin-bulk-docs-body {
  padding: 18px 24px 6px;
}

.admin-bulk-selection-info {
  margin: 8px 0 0 0 !important;
  display: none;
}

.admin-bulk-search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.admin-bulk-search-row .admin-bulk-product-search {
  flex: 1;
  min-width: 220px;
}

.admin-bulk-category-filter {
  min-width: 200px;
}

.admin-bulk-mode-group {
  margin-top: 6px;
}

.admin-bulk-mode-options {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 8px;
}

.admin-radio {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  font-size: 14px;
  color: var(--gray-dark);
}

.admin-radio input[type="radio"] {
  transform: translateY(1px);
}

.admin-bulk-products-list {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 10px;
  max-height: 220px;
  overflow: auto;
  margin-top: 10px;
}

.admin-bulk-brand-hint {
  display: block;
  margin-top: 6px;
}

.admin-bulk-form-actions {
  padding: 12px 24px 22px !important;
  margin-top: 0 !important;
}

.admin-bulk-taxonomy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  justify-content: flex-end;
  align-items: center;
}

.admin-bulk-apply-mode {
  margin-right: auto;
  display: inline-flex;
  gap: 14px;
  align-items: center;
}

.admin-bulk-apply-mode--stacked {
  margin-right: 0 !important;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 28px 36px;
  width: 100%;
}

.admin-bulk-apply-mode--stacked .admin-radio {
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.admin-bulk-apply-mode--stacked .admin-radio input[type="radio"] {
  transform: none;
}

.admin-bulk-apply-mode-wrap {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid #e2e8f0;
}

.admin-bulk-apply-mode-wrap .admin-bulk-apply-mode {
  margin-right: 0;
}

.admin-bulk-panel-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  flex-wrap: wrap;
  padding: 14px 24px;
  margin-top: 0;
  border-top: 1px solid #f1f5f9;
  box-sizing: border-box;
}

.admin-bulk-apply-mode-wrap--footer {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-top: none !important;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.admin-bulk-panel-footer .admin-form-group.admin-bulk-apply-mode-wrap--footer {
  margin-bottom: 0 !important;
}

.admin-bulk-panel-footer .admin-bulk-form-actions {
  border-top: none !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto;
  align-self: center;
}

/* Toplu Düzenleme: sol menü + paneller */
.admin-modal-box--bulk-edit {
  max-width: min(1100px, calc(100vw - 48px));
}

.admin-bulk-edit-shell {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
}

.admin-bulk-edit-nav {
  flex: 0 0 212px;
  border-right: 1px solid #e2e8f0;
  padding: 12px 10px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #f8fafc;
}

.admin-bulk-edit-nav-btn {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
  line-height: 1.35;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-bulk-edit-nav-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.admin-bulk-edit-nav-btn.active {
  background: #fff;
  border-color: #cbd5e1;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.admin-bulk-edit-panels {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  max-height: min(78vh, 880px);
}

.admin-bulk-edit-placeholder {
  padding: 28px 24px 40px;
}

.admin-bulk-edit-placeholder-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.admin-bulk-edit-placeholder-text {
  margin: 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

.admin-bulk-taxonomy-body .admin-bulk-taxonomy-hint {
  margin: 6px 0 10px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.admin-product-subtitle-nested {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.admin-bulk-subtitle-nested {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
}

.admin-bulk-subtitle-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-bulk-subtitle-toggle {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.admin-mb-8 {
  margin-bottom: 8px;
}

.admin-bulk-textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
}

.admin-bulk-desc-editor-wrap .admin-editor-content {
  min-height: 280px;
}

@media (max-width: 720px) {
  .admin-bulk-edit-shell {
    flex-direction: column;
  }

  .admin-bulk-edit-nav {
    flex: none;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 8px 12px;
  }

  .admin-bulk-edit-nav-btn {
    flex: 1 1 auto;
    min-width: min(140px, 100%);
  }

  .admin-bulk-edit-panels {
    max-height: none;
  }
}

/* Onay bekleyenler – fark göstergesi: eski (kırmızı) / yeni (yeşil) */
.pa-diff-old {
  margin-top: 6px;
  font-size: 12px;
  color: #dc2626;
  background: #fef2f2;
  padding: 6px 10px;
  border-radius: 4px;
  border-left: 3px solid #dc2626;
}
.pa-diff-new,
.pa-diff-new.admin-input,
.pa-diff-new.admin-select,
.pa-diff-new.product-image-url,
.pa-diff-new.product-doc-path,
.pa-diff-new.product-feature-title,
.pa-diff-new.product-feature-desc {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}
.pa-diff-new.admin-editor-content {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}
.pa-loading {
  padding: 24px;
  text-align: center;
  color: var(--gray-dark);
}
.pa-diff-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 13px;
}
.pa-diff-legend-old { color: #dc2626; }
.pa-diff-legend-new { color: #22c55e; }

/* Bilgi güncelleme modal – sadece değişen alanlar, kırmızı eski / yeşil yeni */
.pa-site-info-diff-row { margin: 10px 0; }
.pa-site-info-diff-old { color: #dc2626; }
.pa-site-info-diff-new { color: #22c55e; }

.admin-delete-text {
  padding: 24px;
  margin: 0;
  font-size: 14px;
  color: var(--gray-dark);
}

.admin-delete-text + .admin-form-actions {
  padding: 0 24px 24px;
  border-top: none;
  margin-top: 0;
}

/* ================= ADMIN LOGIN PAGE ================= */
.admin-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

/* Giriş paneli içinde sağ üst: veritabanı bağlantı göstergesi */
.admin-db-status {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 12px;
  color: var(--gray-dark);
  z-index: 2;
}
.admin-db-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}
.admin-db-status-dot.admin-db-status-ok {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}
.admin-db-status-dot.admin-db-status-fail {
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.3);
}
.admin-db-status-label {
  white-space: nowrap;
}

.admin-login-wrap {
  width: 100%;
  max-width: 400px;
}

.admin-login-card {
  position: relative;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 40px;
  border: 1px solid #e2e8f0;
}

.admin-login-logo {
  display: block;
  text-align: center;
  margin-bottom: 24px;
}

.admin-login-logo img {
  height: 44px;
  width: auto;
}

.admin-login-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--gray-dark);
  text-align: center;
  margin: 0 0 8px 0;
}

.admin-login-desc {
  font-size: 14px;
  color: var(--gray);
  text-align: center;
  margin: 0 0 28px 0;
}

.admin-login-form .admin-form-group {
  margin-bottom: 20px;
}

.admin-login-form .admin-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-dark);
  margin-bottom: 6px;
}

.admin-login-form input[type="text"],
.admin-login-form input[type="password"] {
  display: block;
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
  box-sizing: border-box;
}

.admin-login-form input[type="text"]:focus,
.admin-login-form input[type="password"]:focus {
  outline: none;
  border-color: var(--primary);
}

.admin-login-error {
  font-size: 13px;
  color: #dc2626;
  margin: 0 0 16px 0;
  min-height: 20px;
}

.admin-login-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
}

.admin-login-back {
  display: block;
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--gray);
  text-decoration: none;
}

.admin-login-back:hover {
  color: var(--primary);
}

.admin-login-totp-modal .admin-modal-box-sm {
  max-width: 420px;
}

/* 6 kutulu TOTP + yedek kod (giriş / kullanıcı yönetimi) */
.admin-otp-form-group {
  width: 100%;
  margin-bottom: 14px;
}

.admin-otp-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-dark, #334155);
  margin-bottom: 8px;
}

.admin-otp-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: nowrap;
  margin: 0;
}

.admin-otp-cell {
  width: 44px;
  height: 48px;
  box-sizing: border-box;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  padding: 0;
  line-height: 1;
}

.admin-otp-cell:focus {
  outline: none;
  border-color: var(--primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.admin-totp-backup-field {
  width: 100%;
  max-width: 220px;
  margin-left: auto;
  margin-right: auto;
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
}

.admin-totp-disable-body {
  padding: 8px 24px 24px;
}

.admin-totp-disable-user {
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--gray-dark, #1e293b);
}

.admin-totp-disable-modal .admin-form-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-totp-alt-action {
  text-align: center;
  margin: 14px 0 0;
}

.admin-totp-link-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  margin: 0;
  font: inherit;
  font-size: 14px;
  color: var(--primary, #2563eb);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.admin-totp-link-btn:hover {
  color: #1d4ed8;
}

.admin-form-actions-totp-only {
  justify-content: center;
  margin-top: 8px;
}

.admin-totp-backup-block[hidden] {
  display: none !important;
}

@media (max-width: 380px) {
  .admin-otp-row {
    gap: 5px;
  }
  .admin-otp-cell {
    width: 38px;
    height: 44px;
    font-size: 1.1rem;
  }
}

.admin-modal-box-wide {
  max-width: 480px;
}

.admin-totp-setup-box {
  margin-left: auto;
  margin-right: auto;
}

.admin-totp-setup-body {
  padding: 8px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.admin-totp-setup-user {
  font-weight: 600;
  margin: 0 0 16px;
  width: 100%;
  color: var(--gray-dark, #1e293b);
}

.admin-totp-qr-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 0 0 20px;
}

.admin-totp-setup-qr {
  display: none;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 8px;
  box-sizing: content-box;
}

.admin-totp-secret-label,
.admin-totp-backup-title {
  font-size: 13px;
  color: var(--gray, #64748b);
  margin: 0 auto 8px;
  width: 100%;
  max-width: 420px;
  line-height: 1.45;
}

.admin-totp-backup-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 12px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 8px;
  text-align: left;
}

.admin-totp-backup-header .admin-totp-backup-title {
  flex: 1 1 200px;
  margin: 0;
  max-width: none;
}

.admin-totp-backup-header .admin-btn {
  flex: 0 0 auto;
  align-self: flex-start;
}

.admin-totp-secret-code {
  display: block;
  width: 100%;
  max-width: 420px;
  margin: 0 auto 16px;
  padding: 12px 14px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  word-break: break-all;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #0f172a;
  text-align: center;
  box-sizing: border-box;
}

.admin-totp-backup-list {
  margin: 0 auto 20px;
  padding-left: 1.25em;
  font-size: 14px;
  line-height: 1.75;
  text-align: left;
  max-width: 280px;
  color: var(--gray-dark, #334155);
}

.admin-totp-setup-body .admin-form-group {
  width: 100%;
  max-width: 280px;
  margin-bottom: 12px;
  text-align: left;
}

.admin-totp-setup-body .admin-otp-form-group,
.admin-totp-disable-modal .admin-otp-form-group {
  max-width: 360px;
}

.admin-totp-setup-body .admin-form-actions {
  width: 100%;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.admin-totp-status-on {
  color: #16a34a;
  font-weight: 600;
}

.admin-totp-status-off {
  color: #64748b;
}

.admin-totp-status-pending {
  color: #ca8a04;
  font-weight: 600;
}


/* ================= MODAL TABS ================= */
.admin-modal-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 24px 12px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0;
}

.admin-tab-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  border-radius: 4px 4px 0 0;
  flex-shrink: 0;
}

.admin-tab-btn:hover {
  color: var(--primary);
}

.admin-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.admin-tab-btn.admin-tab-add {
  color: #22c55e;
  margin-left: 4px;
}

.admin-tab-btn.admin-tab-add:hover {
  color: #16a34a;
}

.admin-variant-tabs-wrap {
  display: flex;
  gap: 2px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1;
  min-width: 0;
  max-width: 100%;
}
@supports (scrollbar-width: thin) {
  .admin-variant-tabs-wrap {
    scrollbar-width: thin;
  }
}

.admin-variant-tabs-wrap::-webkit-scrollbar {
  height: 6px;
}

.admin-variant-tabs-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.admin-variant-tabs-wrap::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 3px;
}

.admin-variant-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  border-radius: 4px 4px 0 0;
  flex-shrink: 0;
}

.admin-variant-tab:hover {
  color: var(--primary);
}

.admin-variant-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.admin-variant-tab-remove {
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
  color: #94a3b8;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 2px;
}

.admin-variant-tab-remove:hover {
  color: #dc2626;
}

.admin-variant-panels {
  min-height: 0;
}

.admin-variant-panels .admin-variant-fields {
  padding: 16px 0;
}

.admin-variant-panels .admin-variant-fields label {
  margin-top: 12px;
}

.admin-variant-panels .admin-variant-fields label:first-child {
  margin-top: 0;
}

.admin-tab-panel {
  padding: 0 24px 16px;
}

.admin-tab-panel:not(.active) {
  display: none !important;
}

/* ================= VARIANTS ================= */
.admin-variants-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-variants-header .admin-features-hint {
  flex: 1;
  min-width: 200px;
  margin: 0;
}

.admin-variants-list {
  max-height: 360px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.admin-variant-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius, 6px);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.admin-variant-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.admin-variant-card-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-dark);
}

.admin-variant-card-actions {
  display: flex;
  gap: 6px;
}

.admin-variant-fields {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.admin-variant-fields input,
.admin-variant-fields textarea {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 13px;
}

.admin-variant-fields textarea {
  min-height: 60px;
  resize: vertical;
}

.admin-variant-fields label {
  display: block;
  font-weight: 500;
  margin-bottom: 2px;
  color: #475569;
}

.admin-subcategory-panel .admin-help-text {
  margin: 0 0 10px 0;
  color: #64748b;
  font-size: 13px;
}

.admin-subcategory-panel #btnOpenSubcategoryDrawer {
  margin-top: 4px;
}

.admin-subcategory-table-wrap {
  margin-top: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

/* Çekmece dar: genel .admin-table min-width:1100px tüm sütunları sağa iter; burada sıfırla */
.admin-subcategory-table-wrap .admin-subcategory-table {
  min-width: 0;
  width: 100%;
  table-layout: fixed;
}

.admin-subcategory-table {
  font-size: 13px;
  margin-bottom: 12px;
}

.admin-subcategory-table th,
.admin-subcategory-table td {
  vertical-align: middle;
}

.admin-subcategory-table th:nth-child(1),
.admin-subcategory-table td:nth-child(1) {
  width: 52px;
}

.admin-subcategory-table th:nth-child(2),
.admin-subcategory-table td:nth-child(2) {
  width: 32%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.admin-subcategory-table th:nth-child(3),
.admin-subcategory-table td:nth-child(3) {
  width: 28%;
  word-wrap: break-word;
}

.admin-subcategory-table th.admin-th-subcategory-actions {
  text-align: right;
}

.admin-subcategory-table th:nth-child(4),
.admin-subcategory-table td:nth-child(4) {
  width: auto;
  min-width: 148px;
  white-space: nowrap;
}

.admin-subcategory-table td:nth-child(4) {
  text-align: right;
}

.admin-subcategory-table td:nth-child(4) .admin-btn {
  margin-left: 4px;
}

.admin-subcategory-table td:nth-child(4) .admin-btn:first-child {
  margin-left: 0;
}

.admin-subcategory-table .product-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.admin-subcategory-table code {
  font-size: 12px;
}

/* Kategori modalı + sağdan açılan alt kategori çekmecesi */
.admin-category-modal-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  max-width: min(1420px, calc(100vw - 48px));
}

.admin-category-modal-shell .admin-modal-box-xl {
  flex: 1 1 auto;
  min-width: 0;
  transition: border-radius 0.35s ease;
}

.admin-modal-box--with-drawer {
  border-radius: 8px 0 0 8px;
}

.admin-subcategory-drawer {
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  max-height: 90vh;
  overflow: hidden;
  background: #fff;
  border-radius: 0 8px 8px 0;
  box-shadow: none;
  opacity: 0;
  border-left: 1px solid transparent;
  transition:
    flex-basis 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    min-width 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.28s ease,
    box-shadow 0.35s ease,
    border-color 0.2s ease;
}

.admin-subcategory-drawer.is-open {
  flex: 0 0 min(420px, calc(100vw - 420px));
  min-width: min(420px, calc(100vw - 420px));
  opacity: 1;
  overflow-x: hidden;
  overflow-y: auto;
  border-left-color: #e2e8f0;
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.1);
}

.admin-subcategory-drawer.admin-ai-product-drawer.is-open {
  flex: 0 0 min(460px, calc(100vw - 380px));
  min-width: min(460px, calc(100vw - 380px));
}

.admin-subcategory-drawer-inner {
  padding: 16px 18px 20px;
  min-width: min(380px, calc(100vw - 420px));
  box-sizing: border-box;
}

.admin-subcategory-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.admin-subcategory-drawer-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
}

.admin-subcategory-drawer-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: none;
  background: #f1f5f9;
  color: #475569;
  border-radius: 6px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-subcategory-drawer-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

@media (max-width: 900px) {
  .admin-category-modal-shell {
    flex-direction: column;
    align-items: stretch;
    max-width: calc(100vw - 24px);
  }

  .admin-modal-box--with-drawer {
    border-radius: 8px 8px 0 0;
  }

  .admin-subcategory-drawer {
    border-radius: 0 0 8px 8px;
    max-height: none;
  }

  .admin-subcategory-drawer.is-open {
    flex: 0 0 auto;
    min-width: 100%;
    width: 100%;
    max-height: min(55vh, 420px);
  }

  /* AI çekmecesi: .admin-ai-product-drawer dar ekranda daha spesifik olduğu için
     calc(100vw - 380px) ile genişlik ~0 oluyordu; mutlaka tam satır genişliği */
  .admin-subcategory-drawer.admin-ai-product-drawer.is-open {
    flex: 0 0 auto;
    min-width: 100%;
    width: 100%;
    max-height: min(55vh, 420px);
  }

  .admin-subcategory-drawer-inner {
    min-width: 0;
  }

  /* Mobil/PWA: «AI ile doldur» ile yalnızca içe aktar paneli; kapatınca veya uygulayınca forma dönüş */
  .admin-category-modal-shell--ai-mobile-only .admin-modal-box-xl {
    display: none !important;
  }

  .admin-category-modal-shell--ai-mobile-only {
    max-width: min(1420px, calc(100vw - 24px));
    width: 100%;
    max-height: min(92vh, 920px);
    max-height: min(92dvh, 920px);
    align-self: center;
  }

  .admin-category-modal-shell--ai-mobile-only .admin-subcategory-drawer.admin-ai-product-drawer.is-open {
    flex: 1 1 auto;
    min-width: 100% !important;
    width: 100% !important;
    max-height: none !important;
    min-height: min(72vh, 640px);
    min-height: min(72dvh, 640px);
    border-radius: 8px;
    border-left: none;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    overflow-y: auto;
  }

  .admin-category-modal-shell--ai-mobile-only .admin-ai-product-drawer .admin-subcategory-drawer-inner {
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  }

  /* Markalar: kategori modalında «Alt kategorileri düzenle» — mobilde yalnızca alt kategori paneli */
  .admin-category-modal-shell--subcategory-mobile-only .admin-modal-box-xl {
    display: none !important;
  }

  .admin-category-modal-shell--subcategory-mobile-only {
    max-width: min(1420px, calc(100vw - 24px));
    width: 100%;
    max-height: min(92vh, 920px);
    max-height: min(92dvh, 920px);
    align-self: center;
  }

  .admin-category-modal-shell--subcategory-mobile-only .admin-subcategory-drawer.is-open:not(.admin-ai-product-drawer) {
    flex: 1 1 auto;
    min-width: 100% !important;
    width: 100% !important;
    max-height: none !important;
    min-height: min(72vh, 640px);
    min-height: min(72dvh, 640px);
    border-radius: 8px;
    border-left: none;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    overflow-y: auto;
  }

  .admin-category-modal-shell--subcategory-mobile-only .admin-subcategory-drawer:not(.admin-ai-product-drawer) .admin-subcategory-drawer-inner {
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  }
}

/* ========== Koyu tema (PWA / ADMIN_THEME) ========== */
html[data-admin-theme="dark"] {
  color-scheme: dark;
}

html[data-admin-theme="dark"] .admin-page {
  background: #0f172a;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-header {
  background: #1a2234;
  border-bottom-color: #243047;
}

html[data-admin-theme="dark"] .admin-title,
html[data-admin-theme="dark"] .admin-back-link,
html[data-admin-theme="dark"] .admin-header-logout {
  color: #f1f5f9;
}

html[data-admin-theme="dark"] .admin-back-link:hover,
html[data-admin-theme="dark"] .admin-header-logout:hover {
  color: #ffffff;
}

html[data-admin-theme="dark"] .admin-hamburger-btn {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-hamburger-btn:hover {
  background: #475569;
  border-color: #64748b;
  color: #fff;
}

html[data-admin-theme="dark"] .admin-hamburger-menu {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

html[data-admin-theme="dark"] .admin-hamburger-menu a {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-hamburger-menu a:hover {
  background: #334155;
  color: #93c5fd;
}

html[data-admin-theme="dark"] .admin-hamburger-menu a.active {
  background: #334155;
  color: #93c5fd;
}

html[data-admin-theme="dark"] .admin-table-wrap {
  background: #1e293b;
  border-color: #334155;
}

html[data-admin-theme="dark"] .admin-table th {
  background: #0f172a;
  color: #e2e8f0;
  border-bottom-color: #334155;
}

html[data-admin-theme="dark"] .admin-table td {
  border-bottom-color: #334155;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-table tbody tr:hover {
  background: #334155;
}

html[data-admin-theme="dark"] .admin-table th.admin-th-sortable:hover {
  background: #1e293b;
}

html[data-admin-theme="dark"] .admin-empty {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-toolbar {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-search,
html[data-admin-theme="dark"] .admin-form-group input,
html[data-admin-theme="dark"] .admin-form-group select,
html[data-admin-theme="dark"] .admin-form-group textarea {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-btn-secondary {
  background: #334155;
  border-color: #475569;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-btn-secondary:hover {
  background: #475569;
}

html[data-admin-theme="dark"] .admin-log-details-cell .admin-log-details-text {
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-cell-small code {
  color: #93c5fd;
  background: transparent;
}

html[data-admin-theme="dark"] .admin-login-wrap {
  background: #0f172a;
}

html[data-admin-theme="dark"] .admin-login-card {
  background: #1e293b;
  border: 1px solid #334155;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

html[data-admin-theme="dark"] .admin-db-status {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid #475569;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-db-status-label {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-db-status-dot.admin-db-status-ok {
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}

html[data-admin-theme="dark"] .admin-db-status-dot.admin-db-status-fail {
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.35);
}

html[data-admin-theme="dark"] .admin-login-title,
html[data-admin-theme="dark"] .admin-login-desc {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-login-form label {
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-login-form input {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-dashboard-greeting,
html[data-admin-theme="dark"] .admin-dashboard-card-label {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-dashboard-card {
  background: #1e293b;
  border: 1px solid #334155;
}

html[data-admin-theme="dark"] .admin-dashboard-card:hover {
  border-color: #475569;
  background: #334155;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-dashboard-card:hover .admin-dashboard-card-label {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-dashboard-card-icon,
html[data-admin-theme="dark"] .admin-dashboard-card:hover .admin-dashboard-card-icon {
  color: #ffffff;
  opacity: 1;
}

html[data-admin-theme="dark"] .admin-dashboard-card-sync {
  border-color: #166534;
  background: #14532d;
}

html[data-admin-theme="dark"] .admin-dashboard-card-sync:hover {
  border-color: #22c55e;
  background: #166534;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-dashboard-card-sync .admin-dashboard-card-icon,
html[data-admin-theme="dark"] .admin-dashboard-card-sync:hover .admin-dashboard-card-icon {
  color: #ffffff;
}

html[data-admin-theme="dark"] .admin-dashboard-card-sync .admin-dashboard-card-label,
html[data-admin-theme="dark"] .admin-dashboard-card-sync:hover .admin-dashboard-card-label {
  color: #ecfccb;
}

html[data-admin-theme="dark"] .admin-file-share-split-rule {
  background: #334155;
}

html[data-admin-theme="dark"] .admin-modal-box {
  background: #1e293b;
  border: 1px solid #334155;
  color: #e2e8f0;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

html[data-admin-theme="dark"] .admin-modal-header h2,
html[data-admin-theme="dark"] .admin-modal-body {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-modal-close {
  background: #334155;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-modal-close:hover {
  background: #475569;
}

/* TOTP kurulum modalı — koyu tema, ortalanmış içerik, okunabilir anahtar */
html[data-admin-theme="dark"] .admin-totp-setup-modal .admin-totp-setup-user {
  color: #f1f5f9;
}

html[data-admin-theme="dark"] .admin-totp-setup-modal .admin-totp-secret-label,
html[data-admin-theme="dark"] .admin-totp-setup-modal .admin-totp-backup-title {
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-totp-setup-modal .admin-totp-secret-code {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

html[data-admin-theme="dark"] .admin-totp-setup-modal .admin-totp-backup-list {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-totp-setup-modal .admin-totp-setup-qr {
  border-color: #475569;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

html[data-admin-theme="dark"] .admin-totp-setup-modal .admin-form-group label {
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-totp-setup-modal .admin-form-group input {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

html[data-admin-theme="dark"] .admin-totp-setup-modal .admin-form-group input::placeholder {
  color: #64748b;
}

html[data-admin-theme="dark"] .admin-totp-setup-modal .admin-login-error {
  color: #fca5a5;
}

html[data-admin-theme="dark"] .admin-login-totp-modal .admin-otp-label,
html[data-admin-theme="dark"] .admin-totp-disable-modal .admin-otp-label,
html[data-admin-theme="dark"] .admin-totp-setup-modal .admin-otp-label {
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-login-totp-modal .admin-otp-cell,
html[data-admin-theme="dark"] .admin-totp-disable-modal .admin-otp-cell,
html[data-admin-theme="dark"] .admin-totp-setup-modal .admin-otp-cell {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

html[data-admin-theme="dark"] .admin-login-totp-modal .admin-otp-cell:focus,
html[data-admin-theme="dark"] .admin-totp-disable-modal .admin-otp-cell:focus,
html[data-admin-theme="dark"] .admin-totp-setup-modal .admin-otp-cell:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}

html[data-admin-theme="dark"] .admin-login-totp-modal .admin-totp-backup-field,
html[data-admin-theme="dark"] .admin-totp-disable-modal .admin-totp-backup-field {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

html[data-admin-theme="dark"] .admin-totp-disable-modal .admin-totp-disable-user {
  color: #f1f5f9;
}

html[data-admin-theme="dark"] .admin-login-totp-modal .admin-form-group label {
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-login-totp-modal .admin-totp-link-btn {
  color: #93c5fd;
}

html[data-admin-theme="dark"] .admin-login-totp-modal .admin-totp-link-btn:hover {
  color: #bfdbfe;
}

/* Alt kategoriler sağ çekmecesi — koyu tema (ana modal ile aynı palet) */
html[data-admin-theme="dark"] .admin-subcategory-drawer {
  background: #1e293b;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer.is-open {
  border-left-color: #334155;
  box-shadow: -12px 0 36px rgba(0, 0, 0, 0.4);
}

html[data-admin-theme="dark"] .admin-subcategory-drawer-header {
  border-bottom-color: #334155;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer-title {
  color: #f1f5f9;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-help-text {
  color: #94a3b8;
}

/* AI ile içe aktar — durum ve önizleme (koyu tema) */
html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-import-hint {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-import-status {
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-import-status.is-error {
  color: #fca5a5;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-import-preview-wrap {
  border-top-color: #334155;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-preview-heading {
  color: #f1f5f9;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-preview-dl dt {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-preview-dl dd {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-preview-dd-html {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-preview-dd-html p,
html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-preview-dd-html li,
html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-preview-dd-html td,
html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-preview-dd-html th {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-preview-dd-html strong {
  color: #f8fafc;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-preview-dd-html a {
  color: #93c5fd;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-preview-dd-html em {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-import-target-hint {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-import-apply-fields {
  border-color: #334155;
  background: #0f172a;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-import-apply-fields-title {
  color: #f1f5f9;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-ai-apply-field {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-variant-panel.ai-import-frozen::after {
  background: rgba(15, 23, 42, 0.45);
}

html[data-admin-theme="dark"] .admin-subcategory-drawer-close {
  background: #334155;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer-close:hover {
  background: #475569;
  color: #f8fafc;
}

html[data-admin-theme="dark"] .admin-subcategory-table-wrap {
  background: transparent;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-table.admin-subcategory-table th {
  background: #0f172a;
  color: #e2e8f0;
  border-bottom-color: #334155;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-table.admin-subcategory-table td {
  color: #e2e8f0;
  border-bottom-color: #334155;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-table.admin-subcategory-table tbody tr:hover {
  background: #334155;
}

html[data-admin-theme="dark"] .admin-subcategory-table code {
  color: #93c5fd;
  background: rgba(15, 23, 42, 0.5);
  padding: 2px 6px;
  border-radius: 4px;
}

html[data-admin-theme="dark"] .admin-subcategory-drawer .admin-subcategory-table img {
  border: 1px solid #334155;
  border-radius: 4px;
  background: #0f172a;
}

html[data-admin-theme="dark"] .admin-btn-primary {
  filter: brightness(1.05);
}

html[data-admin-theme="dark"] .admin-announce-enabled-hint {
  color: #94a3b8;
}

/* Rol rozetleri (kullanıcı tablosu vb.) — işlem/giriş logu renkli etiketleri hariç */
html[data-admin-theme="dark"] .admin-role-badge:not([class*="admin-log-op-"]):not(.admin-log-success):not(.admin-log-fail) {
  background: #334155;
  color: #e2e8f0;
}

/* Giriş logu: Sonuç (Başarılı / Başarısız) — koyu tema */
html[data-admin-theme="dark"] .admin-role-badge.admin-log-success {
  background: rgba(34, 197, 94, 0.28);
  color: #86efac;
}

html[data-admin-theme="dark"] .admin-role-badge.admin-log-fail {
  background: rgba(239, 68, 68, 0.28);
  color: #fca5a5;
}

/* Koyu tema: işlem logu pill renkleri (ayrım korunur) */
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-edit,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-ip_add,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-announcement_edit,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-signature_sent,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-subcategory_edit {
  background: rgba(59, 130, 246, 0.28);
  color: #93c5fd;
}

html[data-admin-theme="dark"] .admin-table-log .admin-log-op-delete,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-user_delete,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-announcement_delete,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-ip_delete,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-brand_delete,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-category_delete,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-subcategory_delete,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-file_receive_delete_link,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-file_receive_delete_file,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-file_share_delete {
  background: rgba(239, 68, 68, 0.28);
  color: #fca5a5;
}

html[data-admin-theme="dark"] .admin-table-log .admin-log-op-sync,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-sync_site_info,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-sync_category_pages {
  background: rgba(245, 158, 11, 0.28);
  color: #fcd34d;
}

html[data-admin-theme="dark"] .admin-table-log .admin-log-op-user_add,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-product_add,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-announcement_add,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-brand_add,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-category_add,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-subcategory_add,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-file_receive_create,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-file_receive_revoke {
  background: rgba(34, 197, 94, 0.28);
  color: #86efac;
}

html[data-admin-theme="dark"] .admin-table-log .admin-log-op-user_role {
  background: rgba(139, 92, 246, 0.3);
  color: #c4b5fd;
}

html[data-admin-theme="dark"] .admin-table-log .admin-log-op-user_password {
  background: rgba(249, 115, 22, 0.28);
  color: #fdba74;
}

html[data-admin-theme="dark"] .admin-table-log .admin-log-op-user_username {
  background: rgba(20, 184, 166, 0.28);
  color: #5eead4;
}

html[data-admin-theme="dark"] .admin-table-log .admin-log-op-ip_edit,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-site_info_update,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-translations_edit {
  background: rgba(99, 102, 241, 0.28);
  color: #a5b4fc;
}

html[data-admin-theme="dark"] .admin-table-log .admin-log-op-brand_edit,
html[data-admin-theme="dark"] .admin-table-log .admin-log-op-category_edit {
  background: rgba(59, 130, 246, 0.28);
  color: #93c5fd;
}

html[data-admin-theme="dark"] .admin-table-log .admin-log-op-file_share_upload {
  background: rgba(6, 182, 212, 0.28);
  color: #67e8f9;
}

/* --- Koyu tema: formlar, etiketler, filtreler, yükleme alanları, çeviri, IP / onay --- */
html[data-admin-theme="dark"] .admin-form-group label,
html[data-admin-theme="dark"] .admin-filter-label {
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-form-group small,
html[data-admin-theme="dark"] .admin-form-group-inline label {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-form-group input[readonly] {
  background: #0f172a !important;
  color: #cbd5e1 !important;
}

html[data-admin-theme="dark"] .admin-select {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}

html[data-admin-theme="dark"] .admin-search {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}

html[data-admin-theme="dark"] .admin-btn-success {
  background: rgba(22, 163, 74, 0.35);
  color: #bbf7d0;
  border: 1px solid #166534;
}

html[data-admin-theme="dark"] .admin-btn-success:hover {
  background: rgba(22, 163, 74, 0.5);
  color: #fff;
}

html[data-admin-theme="dark"] .admin-btn-outline-upload {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #64748b;
}

html[data-admin-theme="dark"] .admin-btn-outline-upload:hover {
  background: #334155;
  border-color: #93c5fd;
  color: #f8fafc;
}

html[data-admin-theme="dark"] .admin-btn-outline-remove {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}

html[data-admin-theme="dark"] .admin-btn-outline-remove:hover {
  background: rgba(239, 68, 68, 0.12);
}

html[data-admin-theme="dark"] .admin-upload-dz-target {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  border-color: #334155;
}

html[data-admin-theme="dark"] .admin-upload-dz-target.is-dragover {
  background: rgba(30, 64, 175, 0.42);
  border-color: #3b82f6;
  box-shadow:
    inset 0 0 0 2px rgba(59, 130, 246, 0.22),
    0 6px 20px rgba(0, 0, 0, 0.45);
}

html[data-admin-theme="dark"] .admin-image-row.admin-upload-dz-target::after,
html[data-admin-theme="dark"] .admin-image-actions.admin-upload-dz-target::after,
html[data-admin-theme="dark"] .admin-social-actions.admin-upload-dz-target::after,
html[data-admin-theme="dark"] .admin-doc-row.admin-upload-dz-target::after,
html[data-admin-theme="dark"] .admin-site-info-media-zone.admin-upload-dz-target::after,
html[data-admin-theme="dark"] .admin-site-info-social-zone.admin-upload-dz-target::after,
html[data-admin-theme="dark"] .admin-announcements-media-zone--image.admin-upload-dz-target::after,
html[data-admin-theme="dark"] .admin-announcements-media-zone--video.admin-upload-dz-target::after {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-share-upload-card {
  background: #0f172a;
  border-color: #1e293b;
}

html[data-admin-theme="dark"] .admin-share-dropzone {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  border-color: #334155;
}

html[data-admin-theme="dark"] .admin-share-dropzone:hover,
html[data-admin-theme="dark"] .admin-share-dropzone.is-dragover {
  background: #172033;
  border-color: #3b82f6;
}

html[data-admin-theme="dark"] .admin-share-dropzone-inner strong {
  color: #f1f5f9;
}

html[data-admin-theme="dark"] .admin-share-dropzone-sub {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-ip-toggle-wrap,
html[data-admin-theme="dark"] .admin-approval-toggle-wrap {
  background: #1e293b;
  border: 1px solid #334155;
}

html[data-admin-theme="dark"] .admin-ip-toggle-label,
html[data-admin-theme="dark"] .admin-ip-toggle-text {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-ip-whitelist-panel .admin-panel-title,
html[data-admin-theme="dark"] .admin-site-ip-panel .admin-panel-title {
  color: #f1f5f9;
}

html[data-admin-theme="dark"] .admin-site-ip-panel {
  border-top-color: #334155;
}

html[data-admin-theme="dark"] .admin-ip-whitelist-panel .admin-panel-desc,
html[data-admin-theme="dark"] .admin-panel-desc {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-panel-title {
  color: #f1f5f9;
}

/* E-posta imza oluşturucu (signature-generator.html) — koyu tema */
html[data-admin-theme="dark"] .sig-account-item {
  background: #1e293b;
  border-color: #334155;
}
html[data-admin-theme="dark"] .sig-account-item h4 {
  color: #e2e8f0;
}
html[data-admin-theme="dark"] .sig-phone-toggle-inner,
html[data-admin-theme="dark"] .sig-phone-toggle-inner .sig-phone-label-text {
  color: #e2e8f0;
}
html[data-admin-theme="dark"] .sig-phone-input-row label {
  color: #cbd5e1 !important;
}
html[data-admin-theme="dark"] .sig-email-suffix {
  color: #94a3b8;
}
html[data-admin-theme="dark"] .sig-badge {
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d;
}
html[data-admin-theme="dark"] .sig-field-label,
html[data-admin-theme="dark"] .sig-field-label--spaced {
  color: #cbd5e1;
}
html[data-admin-theme="dark"] .sig-send-box {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
html[data-admin-theme="dark"] .sig-send-box h3 {
  color: #f1f5f9;
}
html[data-admin-theme="dark"] .sig-send-box .sig-send-desc,
html[data-admin-theme="dark"] .sig-send-hint {
  color: #94a3b8;
}
html[data-admin-theme="dark"] .sig-send-to-wrap {
  background: #0f172a;
  border-color: #475569;
}
html[data-admin-theme="dark"] .sig-send-to-wrap input {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}
html[data-admin-theme="dark"] .sig-send-to-suffix {
  background: #334155;
  color: #cbd5e1;
  border-left-color: #475569;
}
html[data-admin-theme="dark"] .sig-radio-wrap {
  color: #e2e8f0;
}
html[data-admin-theme="dark"] .sig-radio-wrap span {
  color: inherit;
}
html[data-admin-theme="dark"] .sig-actions-box {
  background: #1e293b;
  border-color: #334155;
}
html[data-admin-theme="dark"] .sig-copy-label {
  color: #cbd5e1;
}
html[data-admin-theme="dark"] .sig-preview {
  border-color: #475569;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

html[data-admin-theme="dark"] .admin-brand-logo-preview {
  background: #0f172a;
  border-color: #475569;
}

html[data-admin-theme="dark"] .admin-translation-pending-section {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html[data-admin-theme="dark"] .admin-translation-pending-item {
  background: #0f172a;
  border-color: #334155;
}

html[data-admin-theme="dark"] .admin-translation-pending-meta {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-translation-pending-preview {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-translations-list {
  background: #1e293b;
  border-color: #334155;
}

html[data-admin-theme="dark"] .admin-translation-row {
  border-bottom-color: #334155;
}

html[data-admin-theme="dark"] .admin-translation-row-blank {
  background: #0f172a;
}

html[data-admin-theme="dark"] .admin-section-title {
  color: #f1f5f9;
}

html[data-admin-theme="dark"] .admin-translation-key {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-translation-row-comment {
  background: #1e293b;
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-translation-section-header:hover {
  background: #334155 !important;
}

html[data-admin-theme="dark"] .admin-site-info-actions {
  border-top-color: #334155;
}

html[data-admin-theme="dark"] .admin-social-item {
  background: #0f172a;
  border-color: #334155;
}

html[data-admin-theme="dark"] .admin-editor-toolbar {
  background: #1e293b;
  border-color: #475569;
}

html[data-admin-theme="dark"] .admin-editor-toolbar .admin-editor-sep {
  background: #475569;
}

html[data-admin-theme="dark"] .admin-editor-btn,
html[data-admin-theme="dark"] .admin-editor-select,
html[data-admin-theme="dark"] .admin-editor-size-wrap {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-editor-btn:hover {
  background: #334155;
}

html[data-admin-theme="dark"] .admin-editor-size-wrap .admin-editor-btn:first-child {
  border-right-color: #475569;
}

html[data-admin-theme="dark"] .admin-editor-size-wrap .admin-editor-btn:last-child {
  border-left-color: #475569;
}

html[data-admin-theme="dark"] .admin-editor-content {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-editor-size-label,
html[data-admin-theme="dark"] .admin-editor-size-value {
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-image-preview,
html[data-admin-theme="dark"] .admin-image-preview-square {
  background: #0f172a;
  border-color: #475569;
}

html[data-admin-theme="dark"] .admin-image-placeholder {
  background: #334155;
}

html[data-admin-theme="dark"] .admin-image-failed {
  background: #1e293b;
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-images-list .admin-image-row input {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-main-divider {
  background: #334155;
}

html[data-admin-theme="dark"] .admin-table tbody a,
html[data-admin-theme="dark"] .admin-table .admin-cell-truncate a {
  color: #93c5fd;
}

html[data-admin-theme="dark"] .admin-table tbody a:hover {
  color: #bfdbfe;
}

html[data-admin-theme="dark"] .admin-modal-header {
  border-bottom-color: #334155;
}

html[data-admin-theme="dark"] .admin-modal-tabs {
  border-bottom-color: #334155;
}

html[data-admin-theme="dark"] .admin-tab-btn {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-tab-btn:hover,
html[data-admin-theme="dark"] .admin-tab-btn.active {
  color: #93c5fd;
}

html[data-admin-theme="dark"] .admin-tab-btn.active {
  border-bottom-color: #60a5fa;
}

html[data-admin-theme="dark"] .admin-tab-btn.admin-tab-add {
  color: #86efac;
}

html[data-admin-theme="dark"] .admin-tab-btn.admin-tab-add:hover {
  color: #bbf7d0;
}

html[data-admin-theme="dark"] .admin-variant-tabs-wrap::-webkit-scrollbar-track {
  background: #1e293b;
}

html[data-admin-theme="dark"] .admin-feature-row .product-feature-title,
html[data-admin-theme="dark"] .admin-feature-row .product-feature-desc {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-translation-input {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-translation-tr {
  background: #1e293b;
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-variant-tab {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-variant-tab:hover,
html[data-admin-theme="dark"] .admin-variant-tab.active {
  color: #93c5fd;
}

html[data-admin-theme="dark"] .admin-variant-tab.active {
  border-bottom-color: #60a5fa;
}

html[data-admin-theme="dark"] .admin-receive-preview-frame {
  background: #0f172a;
  border: 1px solid #334155;
}

html[data-admin-theme="dark"] .admin-receive-docx-html {
  color: #e2e8f0;
}

html[data-admin-theme="dark"] .admin-bulk-edit-nav {
  background: #0f172a;
  border-right-color: #334155;
}

html[data-admin-theme="dark"] .admin-bulk-edit-nav-btn {
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-bulk-edit-nav-btn:hover {
  background: #334155;
  color: #f8fafc;
}

html[data-admin-theme="dark"] .admin-bulk-edit-nav-btn.active {
  background: #1e293b;
  border-color: #475569;
  color: #f8fafc;
  box-shadow: none;
}

html[data-admin-theme="dark"] .admin-bulk-products-list {
  border-color: #334155;
  background: #0f172a;
}

html[data-admin-theme="dark"] .admin-radio {
  color: #cbd5e1;
}

html[data-admin-theme="dark"] .admin-bulk-panel-footer {
  border-top-color: #334155;
}

html[data-admin-theme="dark"] .admin-product-subtitle-nested {
  border-top-color: #334155;
}

html[data-admin-theme="dark"] .admin-bulk-subtitle-nested {
  border-top-color: #475569;
}

html[data-admin-theme="dark"] .admin-bulk-apply-mode-wrap {
  border-top-color: #334155;
}

html[data-admin-theme="dark"] .admin-bulk-edit-placeholder-title {
  color: #f1f5f9;
}

html[data-admin-theme="dark"] .admin-bulk-edit-placeholder-text {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-video-badge {
  background: rgba(99, 102, 241, 0.3);
  color: #c4b5fd;
}

html[data-admin-theme="dark"] .admin-theme-toggle {
  background: #1e293b;
  border: 1px solid #475569;
  color: #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

html[data-admin-theme="dark"] .admin-theme-toggle:hover {
  background: #334155;
  border-color: #64748b;
}

html[data-admin-theme="light"] .admin-theme-toggle-moon,
html:not([data-admin-theme]) .admin-theme-toggle-moon {
  display: inline-flex;
}

html[data-admin-theme="light"] .admin-theme-toggle-sun,
html:not([data-admin-theme]) .admin-theme-toggle-sun {
  display: none;
}

html[data-admin-theme="dark"] .admin-theme-toggle-moon {
  display: none;
}

html[data-admin-theme="dark"] .admin-theme-toggle-sun {
  display: inline-flex;
}

.admin-theme-toggle {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9998;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.admin-theme-toggle:hover {
  background: #f1f5f9;
}

.admin-theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .admin-theme-toggle {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

/* ================= Admin: toast + bildirim izin çubuğu (admin-auth.js) ================= */
.admin-toast {
  position: fixed;
  bottom: 88px;
  right: 22px;
  z-index: 10000;
  max-width: min(360px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 10px;
  background: #1e293b;
  border: 1px solid #334155;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.admin-toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast-title {
  display: block;
  font-weight: 600;
  color: #f8fafc;
  margin-bottom: 4px;
}

.admin-toast-body {
  display: block;
  font-size: 13px;
  color: #cbd5e1;
}

.admin-notif-permission-bar {
  position: fixed;
  bottom: 22px;
  left: 22px;
  right: auto;
  z-index: 9999;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.15);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-notif-permission-text {
  font-size: 13px;
  line-height: 1.45;
  color: #334155;
}

.admin-notif-permission-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 768px) {
  .admin-toast {
    bottom: 80px;
    right: 16px;
    left: 16px;
    max-width: none;
  }

  .admin-notif-permission-bar {
    left: 16px;
    right: 16px;
    bottom: 72px;
    max-width: none;
  }
}

html[data-admin-theme="dark"] .admin-notif-permission-bar {
  background: #1e293b;
  border-color: #334155;
}

html[data-admin-theme="dark"] .admin-notif-permission-text {
  color: #e2e8f0;
}

/* PWA: Chrome/Edge “Uygulama yükle” çubuğu */
.nec-pwa-install-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100002;
  padding: 12px 16px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

.nec-pwa-install-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nec-pwa-install-text {
  font-size: 14px;
  line-height: 1.45;
  color: #334155;
  flex: 1;
  min-width: 200px;
}

.nec-pwa-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

html[data-admin-theme="dark"] .nec-pwa-install-bar {
  background: #0f172a;
  border-top-color: #334155;
}

html[data-admin-theme="dark"] .nec-pwa-install-text {
  color: #e2e8f0;
}

@media (max-width: 600px) {
  .nec-pwa-install-actions {
    width: 100%;
  }
}

/* =============================================================================
   Mobil / dar ekran panel (max-width: 1024px)
   — Genel: ana içerik ve tablo hücre boşlukları sıkı; Marka&Kategori iki kolon alt alta.
   — Aşağıda “gizlenen” sütunlar yalnızca dar ekranda display:none; masaüstünde aynen görünür.
   Geri bildirim için özet (kullanıcıya iletin):
   • Marka & Kategori (sol/sağ tablolar): Slug sütunu gizli.
   • Kategori modalı > Alt kategoriler tablosu: Slug sütunu gizli.
   • İşlem günlüğü: IP Adresi, Detay gizli.
   • Giriş denemeleri günlüğü: IP, Cihaz/Platform, Denenen Şifre gizli.
   • Bekleyen onaylar: IP Adresi gizli.
   • Dosya paylaşımı — Gönderdiğim: ID, Boyut, Silinecek tarihi gizli.
   • Dosya paylaşımı — Alım linkleri: Link süresi, Dosya saklama gizli.
   • Dosya paylaşımı — Gelen dosyalar: Boyut, Silinme gizli.
   • Ürün listesi: product-panel.js dar istemcide zaten çoğu sütunu gizler (ID, Görsel, Ad, İşlemler).
   ============================================================================= */
@media (max-width: 1024px) {
  .admin-main {
    padding: 12px;
  }
  .admin-dashboard-page .admin-main {
    padding: 16px 12px;
  }
  .admin-toolbar-global {
    margin-bottom: 12px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  /* Bilgi yönetimi: global toolbar padding form ile hizayı bozuyor (öz. iPhone PWA) */
  .admin-site-info-page .admin-site-info-toolbar.admin-toolbar-global {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .admin-site-info-page .admin-main.admin-site-info-centered {
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .admin-site-info-page .admin-site-info-lead.admin-panel-desc {
    max-width: 100%;
  }
  .admin-site-info-page #siteInfoForm.admin-form.admin-site-info-form {
    padding-left: 0;
    padding-right: 0;
    padding-top: 16px;
    padding-bottom: 20px;
  }
  .admin-panel-title {
    font-size: 17px;
  }
  .admin-panel-desc {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 12px;
  }
  .admin-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
  }
  .admin-table-wrap {
    border-radius: 6px;
  }
  .admin-table th,
  .admin-table td {
    padding: 8px 10px;
    font-size: 13px;
  }
  .admin-table {
    min-width: 0;
  }
  .admin-table .product-thumb {
    width: 40px;
    height: 40px;
  }
  .admin-table .product-actions {
    gap: 6px;
  }
  .admin-table .product-actions .admin-btn-sm {
    padding: 6px 10px;
    font-size: 12px;
  }

  .admin-main-split {
    flex-direction: column;
    gap: 0;
  }
  .admin-main-divider {
    display: none;
  }
  .admin-main-split .admin-main-left,
  .admin-main-split .admin-main-right {
    min-width: 0 !important;
    width: 100%;
  }
  .admin-main-split .admin-main-right {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
  }
  .admin-main-split .admin-table-compact:not(.admin-table-users) thead th:nth-child(3),
  .admin-main-split .admin-table-compact:not(.admin-table-users) tbody td:nth-child(3) {
    display: none;
  }
  .admin-subcategory-table thead th:nth-child(3),
  .admin-subcategory-table tbody td:nth-child(3) {
    display: none;
  }

  .admin-table-operations-log thead th:nth-child(2),
  .admin-table-operations-log tbody td:nth-child(2),
  .admin-table-operations-log thead th:nth-child(5),
  .admin-table-operations-log tbody td:nth-child(5) {
    display: none;
  }

  .admin-table-login-log thead th:nth-child(2),
  .admin-table-login-log tbody td:nth-child(2),
  .admin-table-login-log thead th:nth-child(3),
  .admin-table-login-log tbody td:nth-child(3),
  .admin-table-login-log thead th:nth-child(5),
  .admin-table-login-log tbody td:nth-child(5) {
    display: none;
  }

  /* Log / onay tabloları: global min-width:1100px dar ekranda tabloyu taşırıp hizayı bozuyor */
  main .admin-table-login-log,
  main .admin-table-operations-log,
  main .admin-table-pending {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100%;
    table-layout: fixed;
  }
  main .admin-table-wrap:has(.admin-table-login-log),
  main .admin-table-wrap:has(.admin-table-operations-log),
  main .admin-table-wrap:has(.admin-table-pending) {
    overflow-x: hidden;
    max-width: 100%;
  }
  main .admin-table-login-log th,
  main .admin-table-login-log td,
  main .admin-table-operations-log th,
  main .admin-table-operations-log td,
  main .admin-table-pending th,
  main .admin-table-pending td {
    min-width: 0 !important;
  }

  .admin-table-pending thead th:nth-child(3),
  .admin-table-pending tbody td:nth-child(3) {
    display: none;
  }

  .admin-table-fs-sent thead th:nth-child(1),
  .admin-table-fs-sent tbody td:nth-child(1),
  .admin-table-fs-sent thead th:nth-child(3),
  .admin-table-fs-sent tbody td:nth-child(3),
  .admin-table-fs-sent thead th:nth-child(5),
  .admin-table-fs-sent tbody td:nth-child(5) {
    display: none;
  }
  .admin-table-fs-receive-links thead th:nth-child(3),
  .admin-table-fs-receive-links tbody td:nth-child(3),
  .admin-table-fs-receive-links thead th:nth-child(4),
  .admin-table-fs-receive-links tbody td:nth-child(4) {
    display: none;
  }
  .admin-table-fs-inbound thead th:nth-child(4),
  .admin-table-fs-inbound tbody td:nth-child(4),
  .admin-table-fs-inbound thead th:nth-child(5),
  .admin-table-fs-inbound tbody td:nth-child(5) {
    display: none;
  }

  .admin-brands-categories-page .admin-table-wrap-compact {
    overflow-x: hidden;
    max-width: 100%;
  }
  .admin-brands-categories-page .admin-table.admin-table-compact {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100%;
    table-layout: fixed;
  }
  .admin-brands-categories-page .admin-table-compact .admin-th-logo {
    width: 15% !important;
    min-width: 0 !important;
    max-width: 48px;
    padding: 8px 4px !important;
  }
  .admin-brands-categories-page .admin-table-compact td:first-child {
    width: 15% !important;
    min-width: 0 !important;
    max-width: 48px;
    padding: 8px 4px !important;
  }
  .admin-brands-categories-page .admin-table-compact .admin-th-name,
  .admin-brands-categories-page .admin-table-compact:not(.admin-table-users) td:nth-child(2) {
    width: auto !important;
    min-width: 0 !important;
    max-width: none;
    padding: 8px 6px !important;
  }
  .admin-brands-categories-page .admin-table-compact .admin-th-actions,
  .admin-brands-categories-page .admin-table-compact td:last-child {
    width: 32% !important;
    min-width: 0 !important;
    max-width: none;
    padding: 8px 4px !important;
    white-space: normal !important;
    text-align: center !important;
    vertical-align: middle;
  }
  .admin-brands-categories-page .admin-table-compact .admin-table-thumb {
    width: 32px !important;
    height: 32px !important;
  }
  .admin-brands-categories-page .admin-table-compact td:nth-child(2) {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  .admin-brands-categories-page .admin-table-compact td:last-child .product-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
    max-width: 100%;
  }
  .admin-brands-categories-page .admin-table-compact td:last-child .product-actions .admin-btn,
  .admin-brands-categories-page .admin-table-compact td:last-child .product-actions .admin-btn-sm {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
    padding: 8px 6px !important;
    font-size: 11px !important;
    line-height: 1.2;
  }
  .admin-brands-categories-page .admin-toolbar-category-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-brands-categories-page .admin-toolbar-category-panel .admin-btn-primary {
    width: 100%;
  }

  .admin-table-operations-log,
  .admin-table-login-log,
  .admin-table-pending {
    font-size: 12px;
  }
  .admin-table-operations-log th,
  .admin-table-operations-log td,
  .admin-table-login-log th,
  .admin-table-login-log td,
  .admin-table-pending th,
  .admin-table-pending td {
    word-break: break-word;
    overflow-wrap: anywhere;
    padding: 6px 8px;
  }

  /* İşlem / Sonuç sütunu rozetleri: hücreyi doldurmasın; metne göre daralsın */
  main .admin-table-operations-log td:nth-child(4),
  main .admin-table-login-log td:nth-child(6),
  main .admin-table-pending td:nth-child(4) {
    word-break: normal;
    overflow-wrap: normal;
    vertical-align: middle;
  }
  /* İşlem sütunu: uzun Türkçe etiketler dar pill içinde harf harf kırılmasın — tam genişlik + kelime kırılımı */
  main .admin-table-operations-log td:nth-child(4) .admin-role-badge,
  main .admin-table-pending td:nth-child(4) .admin-role-badge {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
    white-space: normal;
    line-height: 1.4;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 500;
    vertical-align: middle;
    text-align: center;
  }

  /* İşlem logu: Tarih / Kullanıcı dar; İşlem geniş (görünür sütunlar 1, 3, 4) */
  main .admin-table-operations-log th:nth-child(1),
  main .admin-table-operations-log td:nth-child(1) {
    width: 20%;
  }
  main .admin-table-operations-log th:nth-child(3),
  main .admin-table-operations-log td:nth-child(3) {
    width: 18%;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  main .admin-table-operations-log th:nth-child(4),
  main .admin-table-operations-log td:nth-child(4) {
    width: 62%;
    word-break: normal;
    overflow-wrap: break-word;
    vertical-align: middle;
    text-align: center;
  }

  /* Giriş logu: 3 görünür sütun (1,4,6) — dar ekran/PWA’da oran + sıkı rozet (Safari uyumu) */
  main .admin-table-login-log th:nth-child(1),
  main .admin-table-login-log td:nth-child(1) {
    width: 32%;
  }
  main .admin-table-login-log th:nth-child(4),
  main .admin-table-login-log td:nth-child(4) {
    width: 44%;
    word-break: break-word;
    overflow-wrap: anywhere;
  }
  main .admin-table-login-log th:nth-child(6),
  main .admin-table-login-log td:nth-child(6) {
    width: 24%;
    text-align: center;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
  main .admin-table-login-log td:nth-child(6) .admin-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    vertical-align: middle;
    text-align: center;
  }

  /* Giriş / işlem logu: alttaki tema düğmesi son satırı kapatmasın (PWA) */
  .admin-page main.admin-main:has(#logTableWrap) {
    padding-bottom: max(72px, calc(12px + env(safe-area-inset-bottom, 0px)));
  }
}

/* PWA: dar pencerede aynı marka/kategori tablo sığdırma */
@media (min-width: 1025px) and (max-width: 1400px) and (display-mode: standalone) {
  .admin-brands-categories-page .admin-table-wrap-compact {
    overflow-x: hidden;
    max-width: 100%;
  }
  .admin-brands-categories-page .admin-table.admin-table-compact {
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed;
  }
  .admin-brands-categories-page .admin-table-compact .admin-th-actions,
  .admin-brands-categories-page .admin-table-compact td:last-child {
    min-width: 0 !important;
    white-space: normal !important;
  }
  .admin-brands-categories-page .admin-table-compact td:last-child .product-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-brands-categories-page .admin-table-compact td:last-child .admin-btn-sm {
    width: 100%;
    box-sizing: border-box;
  }
}

/* AI ayarları — iki sütun: sol ayarlar, sağ test sohbeti */
.admin-ai-settings-page .admin-ai-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, min(480px, 44vw));
  gap: 24px 28px;
  align-items: start;
  padding: 0 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .admin-ai-settings-page .admin-ai-settings-layout {
    grid-template-columns: 1fr;
    padding: 0 16px 32px;
  }
}

.admin-ai-settings-page .admin-ai-settings-col--main {
  min-width: 0;
}

.admin-ai-settings-page .admin-ai-settings-col--test {
  min-width: 0;
}

@media (min-width: 961px) {
  .admin-ai-settings-page .admin-ai-settings-col--test {
    position: sticky;
    top: 12px;
  }
}

.admin-ai-settings-page .admin-ai-settings-intro {
  margin: 0 0 20px;
  color: var(--admin-muted, #5c6170);
  font-size: 0.95rem;
  max-width: none;
}

.admin-ai-settings-page .admin-ai-settings-toggle-wrap {
  margin: 0 0 24px;
}

.admin-ai-settings-page .admin-ai-settings-form {
  padding: 0 0 32px;
  max-width: none;
}

.admin-ai-settings-page .admin-ai-fieldset {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

html[data-admin-theme="dark"] .admin-ai-settings-page .admin-ai-fieldset {
  border-color: rgba(255, 255, 255, 0.12);
}

.admin-ai-settings-page .admin-ai-fieldset-legend {
  padding: 0 10px;
  font-size: 1rem;
  font-weight: 600;
}

/* Bağlantı türü — yatay segment (native radyo gizli, kart CSS) */
.admin-ai-settings-page .admin-ai-mode-segment {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0;
  margin: 6px 0 0;
  padding: 4px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-sizing: border-box;
}

.admin-ai-settings-page .admin-ai-mode-option {
  position: relative;
  flex: 1 1 200px;
  min-width: 0;
  margin: 0;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.admin-ai-settings-page .admin-ai-mode-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}

.admin-ai-settings-page .admin-ai-mode-option-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid transparent;
  box-sizing: border-box;
  min-height: 4.5rem;
}

.admin-ai-settings-page .admin-ai-mode-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-dark, #1e293b);
  line-height: 1.3;
}

.admin-ai-settings-page .admin-ai-mode-desc {
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
  line-height: 1.4;
}

.admin-ai-settings-page .admin-ai-mode-option:hover .admin-ai-mode-option-inner {
  background: rgba(14, 12, 71, 0.04);
}

.admin-ai-settings-page .admin-ai-mode-option--selected .admin-ai-mode-option-inner {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.12), rgba(14, 12, 71, 0.08));
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.admin-ai-settings-page .admin-ai-mode-option--selected .admin-ai-mode-title {
  color: var(--primary, #0e0c47);
}

.admin-ai-settings-page .admin-ai-mode-option:focus-within .admin-ai-mode-option-inner {
  outline: 2px solid var(--primary, #0e0c47);
  outline-offset: 2px;
}

html[data-admin-theme="dark"] .admin-ai-settings-page .admin-ai-mode-segment {
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(148, 163, 184, 0.22);
}

html[data-admin-theme="dark"] .admin-ai-settings-page .admin-ai-mode-title {
  color: #f1f5f9;
}

html[data-admin-theme="dark"] .admin-ai-settings-page .admin-ai-mode-desc {
  color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-ai-settings-page .admin-ai-mode-option:hover .admin-ai-mode-option-inner {
  background: rgba(255, 255, 255, 0.04);
}

html[data-admin-theme="dark"] .admin-ai-settings-page .admin-ai-mode-option--selected .admin-ai-mode-option-inner {
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.2), rgba(30, 41, 59, 0.9));
  border-color: rgba(96, 165, 250, 0.85);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

html[data-admin-theme="dark"] .admin-ai-settings-page .admin-ai-mode-option--selected .admin-ai-mode-title {
  color: #93c5fd;
}

.admin-ai-settings-page .admin-ai-model-title {
  margin-top: 8px;
}

/* Test sohbeti */
.admin-ai-settings-page .admin-ai-test-section {
  margin: 0;
  max-width: none;
  width: 100%;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(248, 250, 252, 0.85);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  /* Viewport içinde kal; aksi halde sayfa kayar, log kutusu iç scroll yapmaz */
  min-height: min(70vh, 520px);
  max-height: min(calc(100dvh - 96px), 900px);
  overflow: hidden;
}

.admin-ai-settings-page .admin-ai-test-section > .admin-panel-title,
.admin-ai-settings-page .admin-ai-test-section > .admin-ai-test-hint {
  flex-shrink: 0;
}

.admin-ai-settings-page .admin-ai-test-section > .admin-ai-test-compose {
  flex-shrink: 0;
}

html[data-admin-theme="dark"] .admin-ai-settings-page .admin-ai-test-section {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.2);
}

.admin-ai-settings-page .admin-ai-test-hint {
  margin: 0 0 12px;
  max-width: none;
}

.admin-ai-settings-page .admin-ai-test-log {
  flex: 1 1 0%;
  min-height: 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  font-size: 14px;
  line-height: 1.55;
}

html[data-admin-theme="dark"] .admin-ai-settings-page .admin-ai-test-log {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

.admin-ai-settings-page .admin-ai-test-msg {
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  word-break: break-word;
  min-width: 0;
}

.admin-ai-settings-page .admin-ai-test-msg-body {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

.admin-ai-settings-page .admin-ai-test-msg-body strong {
  font-weight: 700;
  color: inherit;
}

.admin-ai-settings-page .admin-ai-test-msg--user {
  background: rgba(14, 12, 71, 0.08);
  border-left: 3px solid var(--primary, #0e0c47);
}

.admin-ai-settings-page .admin-ai-test-msg--assistant {
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3b82f6;
}

html[data-admin-theme="dark"] .admin-ai-settings-page .admin-ai-test-msg--user {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: #94a3b8;
}

html[data-admin-theme="dark"] .admin-ai-settings-page .admin-ai-test-msg--assistant {
  background: rgba(59, 130, 246, 0.15);
}

.admin-ai-settings-page .admin-ai-test-msg-role {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 4px;
}

.admin-ai-settings-page .admin-ai-test-compose {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 560px) {
  .admin-ai-settings-page .admin-ai-test-compose {
    flex-direction: row;
    align-items: flex-end;
  }
  .admin-ai-settings-page .admin-ai-test-compose textarea {
    flex: 1;
  }
}

.admin-ai-settings-page .admin-ai-test-compose textarea {
  margin: 0;
  min-height: 72px;
  resize: vertical;
  font-family: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font-size: 14px;
}

html[data-admin-theme="dark"] .admin-ai-settings-page .admin-ai-test-compose textarea {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

.admin-ai-settings-page .admin-ai-test-compose .admin-btn {
  flex-shrink: 0;
}

/* Giriş: form FOUC öncesi gizli */
.admin-login-form.admin-login-form-pending {
  visibility: hidden;
}

.admin-login-desc-flush {
  margin-top: 0;
}

/* Bilgi yönetimi — bölüm aralığı */
.admin-site-info-page .admin-site-info-social-title {
  margin-top: 32px;
}

/* Marka & kategori — üst senkronize çubuğu */
.admin-brands-categories-page .admin-toolbar-brands-sync-end {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 24px;
  width: 100%;
  box-sizing: border-box;
}

/* Çeviriler sayfası */
.admin-translations-toolbar.admin-toolbar {
  align-items: center;
}
.admin-translations-toolbar-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.admin-translations-toolbar-end .admin-btn-secondary.admin-btn-loading::after {
  border-color: rgba(14, 12, 71, 0.45);
  border-right-color: transparent;
}
html[data-admin-theme="dark"] .admin-translations-toolbar-end .admin-btn-secondary.admin-btn-loading::after {
  border-color: rgba(226, 232, 240, 0.45);
  border-right-color: transparent;
}

.admin-translations-toggle-wrap {
  margin: 0 24px 24px;
}

.admin-translation-pending-section-margins {
  margin: 0 24px 24px;
}

.admin-translations-form-padded {
  padding: 0 24px 24px;
}

/* E-posta imzası — gönder kutusu */
.sig-send-actions-wrap {
  margin-top: 20px;
}

.sig-send-recipient-label {
  display: block;
  margin-bottom: 8px;
}

.sig-send-type-row {
  margin-bottom: 14px;
}

/* Kullanıcı yönetimi */
.admin-users-totp-lead {
  margin-bottom: 16px;
}

.admin-form-actions-mb-12 {
  margin-bottom: 12px;
}
