/* =============================================
   ADMIN.CSS ADMIN EKRANI VE MODAL ICIN OLUSTURULAN DUZENI TEMSIL EDER
   ============================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f4f4;
  color: #1d1d1f;
  min-height: 100vh;
  line-height: 1.5;
}

/* ====================== NAVBAR ====================== */
.navbar {
  height: 60px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo.back-home {
  font-size: 19px;
  font-weight: 600;
  color: #0071e3;
  text-decoration: none;
  letter-spacing: -0.022em;
}

.logo.back-home:hover {
  color: #0066cc;
}

.admin-link {
  background: none;
  border: none;
  color: #0071e3;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 980px;
  transition: all 0.2s ease;
}

.admin-link:hover {
  background: rgba(0, 113, 227, 0.08);
}

/* ====================== MAIN WRAPPER ====================== */
.admin-wrap {
  padding-top: 80px;
  padding-bottom: 60px;
  max-width: 1600px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ====================== LOGIN CARD ====================== */
.login-card {
  max-width: 420px;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 52px 40px 44px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
}

.login-logo {
  margin-bottom: 28px;
}

.login-logo img {
  width: 96px;
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.18));
}

.login-card h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1.8px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #1d1d1f, #0071e3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-card .sub {
  font-size: 17.5px;
  color: #6e6e73;
  margin-bottom: 36px;
  font-weight: 500;
}

#loginForm {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#loginForm input {
  height: 58px;
  padding: 0 22px;
  border: 1.5px solid #d2d2d7;
  border-radius: 14px;
  font-size: 17px;
  background: #f9f9f9;
  transition: all 0.25s ease;
}

#loginForm input:focus {
  outline: none;
  border-color: #0071e3;
  box-shadow: 0 0 0 5px rgba(0, 113, 227, 0.18);
  background: white;
}

#loginForm button {
  height: 58px;
  background: linear-gradient(90deg, #0071e3, #0061cc);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 17.5px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.3s ease;
}

#loginForm button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 113, 227, 0.35);
}

#loginMsg,
#changeMsg {
  margin-top: 20px;
  font-size: 15px;
  color: rgb(117, 117, 117);
  font-weight: bold;
}

#rules {
  font-size: 14px;
  text-align: left;
  margin-top: 12px;
}

/* ====================== ADMIN PANEL ====================== */
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding: 0 8px;
}

.admin-who .muted {
  font-size: 13px;
  color: #6e6e73;
  font-weight: 500;
}

.admin-name {
  font-size: 50px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ====================== TABS ====================== */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.admin-tab {
  padding: 10px 18px;
  background: white;
  border: 1px solid #d2d2d7;
  border-radius: 10px;
  font-size: 15.5px;
  font-weight: 600;
  color: #1d1d1f;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.admin-tab:hover {
  background: #f5f5f7;
}

.admin-tab.is-active {
  background: #0071e3;
  color: white;
  border-color: #0071e3;
}

/* Tab Badge */
.tab-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  color: white;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#badge-pending  { background: #ffcc00; color: #000; }
#badge-approved { background: #34c759; }
#badge-rejected { background: #ff3b30; }
#badge-returned { background: #af52de; }

.admin-tab:hover .tab-badge {
  transform: scale(1.15);
}

.tab-badge:empty,
.tab-badge[textContent="0"] {
  display: none;
}

/* ====================== COLUMNS & LISTS ====================== */
.admin-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: flex-start;
}

.admin-col {
  background: white;
  border-radius: 18px;
  padding: 24px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 380px;
  flex: 1 1 380px;
  min-height: 200px;
}

.admin-h1, .admin-h2, .admin-h3, .admin-h4 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-left: 4px;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-list > div {
  background: #ffffff;
  border: 1px solid #d2d2d7;
  border-radius: 14px;
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.admin-list > div:hover {
  transform: translateY(-3px);
  border-color: #b163ff;
  box-shadow: 0 12px 32px rgba(0, 113, 227, 0.15);
}

.admin-list > div::after {
  content: "→";
  font-size: 22px;
  color: #0071e3;
  opacity: 0.4;
}

.admin-list > div:hover::after {
  opacity: 1;
  transform: translateX(5px);
}

.empty {
  text-align: center;
  color: #8e8e93;
  font-size: 17px;
  padding: 80px 20px;
}

/* ====================== MODALS ====================== */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.admin-modal:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.admin-card {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  position: relative;
  padding: 32px 28px;
}

.admin-close {
  position: absolute;
  top: 35px;
  right: 18px;
  width: 38px;
  height: 48px;
  border: none;
  background: #f1f1f1;
  border-radius: 25%;
  font-size: 26px;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.admin-close:hover {
  background: #ff3b30;
  color: white;
}

.admin-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: -0.5px;
}

/* Modal İçerik */
.track-row {
  padding: 8px 0;
  font-size: 106px;
  display: flex;
  justify-content: space-between;
}
.track-row-status {
  font-weight: bold;
}

.status-pill {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}

.status-pending  { background: rgba(255, 193, 7, 0.15); color: #b47b00; }
.status-approved { background: rgba(52, 199, 89, 0.15); color: #1c7c3c; }
.status-rejected { background: rgba(255, 59, 48, 0.15); color: #a10f0f; }
.status-returned { background: rgba(175, 82, 222, 0.15); color: #6b2fa0; }

.track-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.track-item:last-child {
  border-bottom: none;
}

.track-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
}

.track-item-name {
  font-weight: 500;
}

.track-item-qty {
  color: #6e6e73;
  font-size: 14px;
  font-weight: bold;
}

/* Chat Box */
#chatBox {
  margin: 24px 0;
  padding: 16px;
  background: #f8f8f8;
  border-radius: 14px;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid #e5e5ea;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 12px;
  font-size: 16px;
}

.chat-send-btn {
  padding: 12px 20px;
  background: #0071e3;
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}

.mini-btn {
  height: 50px;
  min-width: 150px;
  padding: 0 28px;
  border: none;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.mini-btn:hover {
  color: white;
  background-color: green;
}

.mini-btn.success { background: #34c759; color: white; }
.mini-btn.success:hover { background: #2eb350; }

.mini-btn.danger { background: #ff3b30; color: white; }
.mini-btn.danger:hover { background: #e02b22; }

/* ====================== PRODUCTS SECTION ====================== */

#productsTable .admin-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center; /* ortalar */
}

#productsTable {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
}

.product-card {
  width: calc(33.33% - 16px);
  max-width: 320px;

  background: #fff;
  border-radius: 18px;
  padding: 16px;

  display: flex;
  flex-direction: column;

  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  transition: all 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

@media (max-width: 1024px) {
  .product-card {
    width: calc(50% - 16px);
  }
}

@media (max-width: 600px) {
  .product-card {
    width: 100%;
  }
}

/* ====================== RESPONSIVE ====================== */

@media (max-width: 1024px) {
  #productsTable .admin-col {
    width: calc(50% - 16px); /* tablet */
  }
}

@media (max-width: 600px) {
  #productsTable .admin-col {
    width: 100%; /* mobil */
  }
}

/* ====================== PRODUCT IMAGE - PRO LEVEL ====================== */

.product-image-container {
  width: 100%;
  max-width: 240px;
  aspect-ratio: 1 / 1; /* her zaman kare */
  
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(0,0,0,0.06);

  box-shadow:
    0 8px 24px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.6);

  transition: all 0.25s ease;
  position: relative;
}

/* hover container */
.product-image-container:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 32px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,0.6);
}

/* image */
.product-image-container img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  object-position: center;

  transition: transform 0.3s ease, opacity 0.2s ease;
}

/* hover image */
.product-image-container:hover img {
  transform: scale(1.06);
}

/* loading efekti (opsiyonel ama PRO hissi verir) */
.product-image-container::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255,255,255,0.5) 50%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s;
}

.product-image-container:hover::before {
  opacity: 1;
}

/* MOBILE */
@media (max-width: 768px) {
  .product-image-container {
    max-width: 100%;
    border-radius: 16px;
  }

  .product-image-container img {
    width: 88%;
    height: 88%;
  }
}


.card-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* TEXT */
.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1d1d1f;
  letter-spacing: -0.3px;
}

.card-sub {
  color: #8e8e93;
  font-size: 13px;
  font-weight: 500;
}

/* ACTIONS */
.card-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

/* BASE BUTTON */
.btn {
  padding: 8px 14px;
  border: none;
  border-radius: 10px; /*  pill */
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  transition: all 0.2s ease;

  backdrop-filter: blur(10px);
}

/* EDIT */
.btn-edit {
  background: rgba(0, 122, 255, 0.08);
  color: #4b4b4b;
}

.btn-edit:hover {
  background: #007aff;
  color: white;
  box-shadow: 0 4px 14px rgba(0, 122, 255, 0.35);
  transform: translateY(-1px);
}

/* DELETE */
.btn-delete {
  background: rgba(255, 59, 48, 0.08);
  color: #ff3b30;
}

.btn-delete:hover {
  background: #ff3b30;
  color: white;
  box-shadow: 0 4px 14px rgba(255, 59, 48, 0.35);
  transform: translateY(-1px);
}

/* CLICK FEEDBACK */
.btn:active {
  transform: scale(0.96);
  box-shadow: none;
}
/* ====================== LOGS ====================== */
#orderLogs {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.log-card {
  padding: 16px;
  border-radius: 14px;
  background: white;
  border: 1px solid #ededed;
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.log-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 19%;
  font-size: 13px;
  font-weight: 600;
}

.log-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.log-chip.approve { background: rgba(52, 199, 89, 0.15); color: #1c7c3c; }
.log-chip.approve .dot { background: #34c759; }

.log-chip.reject { background: rgba(255, 59, 48, 0.15); color: #a10f0f; }
.log-chip.reject .dot { background: #ff3b30; }

.log-date {
  font-size: 13px;
  color: #6e6e73;
}

.log-desc {
  font-size: 15px;
  margin-top: 4px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serifno;
}

.log-reason {
  margin-top: 10px;
  padding: 10px;
  background: rgba(255, 59, 48, 0.08);
  border-radius: 8px;
  color: #b00020;
  font-size: 14px;
}

/* ====================== PRODUCT MODAL ====================== */
.input-error {
  color: #ff3b30;
  font-size: 14px;
  margin-top: 4px;
}


/* **************+++++++++ ADMIN sifre degistirme kosullari */

.rules {
  display: flex;
  flex-direction: column;
  align-items: center;
}



.rule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  width: 280px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  transition: all 0.25s ease;
  justify-content: flex-start;
}

/* DOT BASE */
.rule-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  position: relative;
  transition: all 0.3s ease;
}

/* FAIL */
.rule-fail .rule-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

/* SUCCESS */
.rule-success {
  color: #16a34a;
}

.rule-success .rule-dot {
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.7);
}

/*  GLOW RING */
.rule-success .rule-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.2);
  animation: pulse 1.5s infinite;
}

/* ANIMATION */
@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  70% {
    transform: scale(1.4);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* HOVER */
.rule-item:hover {
  transform: translateX(4px);
}

/* parolayi goster */

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 16px;
  opacity: 0.6;
  transition: 0.2s;
}

.toggle-password:hover {
  opacity: 1;
}

/* ==================== TRACKING MODAL (Güncellenmiş + Scroll Sorunu Çözüldü) ==================== */

.tracking-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9999;
}

.tracking-modal.hidden {
  display: none;
}

/* Ana Kart - Scroll burada aktif ve sınırlı */
.tracking-card {
  background: #fefefe96;
  color: black;
  border-radius: 18px;                    /* daha premium görünüm */
  width: 90%;
  max-width: 520px;
  max-height: 88vh;                       /* ← EN ÖNEMLİ: Scroll'u garanti eder */
  overflow-y: auto;                       /* ← Scroll buradan çalışıyor */
  padding: 32px 28px 40px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.28);
  position: relative;
  
  
  /* Açılma animasyonu */
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  transition: 
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.25s ease;
}

.tracking-modal:not(.hidden) .tracking-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Güzel ince scrollbar (Chrome, Edge, Safari) */
.tracking-card::-webkit-scrollbar {
  width: 6px;
}
.tracking-card::-webkit-scrollbar-track {
  background: transparent;
}
.tracking-card::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
}
.tracking-card::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* Firefox için scrollbar */
.tracking-card {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.25) transparent;
}

/* Close butonu */
.tracking-close {
  position: absolute;
  top: 15px;
  right: 22px;
  font-size: 26px;
  border: 1px solid;
  border-radius: 15px;
  background: none;
  cursor: pointer;
  color: #444;
  z-index: 10;
}

.tracking-close:hover {
  background: red;
  color: white;
}

/* İçerik stilleri (senin mevcut kodların korunuyor) */
.track-row {
  justify-content: space-between;
  padding: 6px 0;
  font-size: 15px;
}

.track-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

.track-item:last-child {
  border-bottom: none;
}

.track-item img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: #f2f2f200;
}

.track-item-info {
  display: flex;
  flex-direction: column;
}

.track-item-name {
  font-size: 14px;
  font-weight: 500;
}

.track-item-qty {
  font-size: 13px;
  color: #6e6e73;
}



.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  backdrop-filter: blur(10px);
}

/* Status renkleri */
.status-pending  { background: rgba(255, 193, 7, 0.15); color: #b47b00; }
.status-approved { background: rgba(52, 199, 89, 0.15); color: #1c7c3c; }
.status-rejected { background: rgba(255, 59, 48, 0.15); color: #a10f0f; }
.status-returned { background: rgba(175, 82, 222, 0.15); color: #6b2fa0; }

.track-reject-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 59, 48, 0.08);
  color: #b00020;
  font-size: 14px;
}

.track-reject-box strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

/* ==================== TRACKING MODAL SON ==================== */

