/* ============================================
   UCUZAVP — PREMIUM STYLE
   ============================================ */

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --p50:  #f5f3ff;
  --p100: #ede9fe;
  --p200: #ddd6fe;
  --p300: #c4b5fd;
  --p400: #a78bfa;
  --p500: #8b5cf6;
  --p600: #7c3aed;
  --p700: #6d28d9;
  --p800: #4c1d95;
  --p900: #2e1065;

  --bg:       #080612;
  --bg2:      #0e0a1c;
  --card:     #120d24;
  --card2:    #1a1235;
  --input:    #1e1638;
  --border:   rgba(139,92,246,0.18);
  --border2:  rgba(139,92,246,0.35);

  --text:     #f0ebff;
  --muted:    #9585c0;
  --muted2:   #6b5a9e;
}

html, body {
  min-height: 100vh;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ===== ARK PLAN ORBLARI ===== */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: orbPulse 10s ease-in-out infinite;
}
.orb1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(109,40,217,0.12) 0%, transparent 70%);
  top: -200px; left: -200px;
  animation-delay: 0s;
}
.orb2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,0.09) 0%, transparent 70%);
  bottom: -150px; right: -150px;
  animation-delay: 4s;
}
.orb3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(167,139,250,0.07) 0%, transparent 70%);
  top: 40%; left: 50%;
  transform: translate(-50%,-50%);
  animation-delay: 7s;
}
@keyframes orbPulse {
  0%,100% { transform: scale(1); opacity:1; }
  50%      { transform: scale(1.1); opacity:0.8; }
}
.orb3 { animation-name: orbPulse3; }
@keyframes orbPulse3 {
  0%,100% { transform: translate(-50%,-50%) scale(1); }
  50%      { transform: translate(-50%,-50%) scale(1.15); }
}

/* ===== GLASS CARD ===== */
.glass-card {
  background: rgba(18,13,36,0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border2);
  box-shadow:
    0 0 0 1px rgba(196,181,253,0.04) inset,
    0 20px 60px rgba(0,0,0,0.5),
    0 0 40px rgba(109,40,217,0.1);
  position: relative;
  z-index: 1;
}

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.5rem;
  background: rgba(8,6,18,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 200;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-logo {
  height: 32px;
  width: auto;
  display: block;
}

.nav-flag {
  font-size: 1.3rem;
  line-height: 1;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

#user-greeting {
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Izgara çizgileri efekti */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139,92,246,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139,92,246,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  z-index: 0;
}

.hero-content {
  text-align: center;
  padding: 3rem 2.5rem;
  max-width: 460px;
  width: calc(100% - 2rem);
  border-radius: 1.75rem;
  animation: fadeUp 0.7s ease both;
}

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

.hero-logo-img {
  height: 56px;
  width: auto;
  display: block;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 20px rgba(139,92,246,0.6));
  animation: logoPulse 3s ease-in-out infinite;
}
@keyframes logoPulse {
  0%,100% { filter: drop-shadow(0 0 20px rgba(139,92,246,0.6)); }
  50%      { filter: drop-shadow(0 0 35px rgba(167,139,250,0.9)); }
}

.hero-content h1 {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #f0e6ff 0%, #c4b5fd 40%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.hero-content p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 0;
}

.divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--p500), transparent);
  margin: 1.75rem auto;
  border-radius: 99px;
}

/* ===== AUTH PAGES ===== */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
}

.auth-card {
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  animation: fadeUp 0.6s ease both;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-icon {
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(109,40,217,0.35), rgba(139,92,246,0.15));
  border: 1.5px solid var(--border2);
  box-shadow: 0 0 30px rgba(109,40,217,0.2);
  margin-bottom: 1.1rem;
}

.auth-card h2 {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #f0e6ff, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.3rem;
}

.subtitle {
  color: var(--muted);
  font-size: 0.875rem;
}

/* ===== FORM ===== */
.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--p400);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--p400);
  opacity: 0.6;
  pointer-events: none;
}

.form-group input,
.input-wrapper input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-group input:not(.input-wrapper input),
.form-group input[style] {
  padding-left: 1rem;
}

.form-group input:focus,
.input-wrapper input:focus {
  border-color: var(--p500);
  background: rgba(30,22,56,0.9);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12), 0 0 20px rgba(109,40,217,0.1);
}

.form-group input::placeholder,
.input-wrapper input::placeholder {
  color: var(--muted2);
}

input[type="email"] {
  text-transform: none;
  -webkit-text-size-adjust: 100%;
}

/* Select */
.modal select,
.form-group select {
  width: 100%;
  padding: 0.8rem 2.5rem 0.8rem 1rem;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a78bfa' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-color: var(--input);
}
.modal select:focus,
.form-group select:focus {
  border-color: var(--p500);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}

/* ===== BUTTONS ===== */
.btn-group {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}
.btn:hover::after { opacity: 1; }

.btn-primary {
  background: linear-gradient(135deg, var(--p600), var(--p700));
  color: #fff;
  box-shadow: 0 4px 20px rgba(109,40,217,0.4), 0 1px 0 rgba(255,255,255,0.1) inset;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--p500), var(--p600));
  box-shadow: 0 6px 25px rgba(139,92,246,0.55);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: rgba(139,92,246,0.08);
  color: var(--p300);
  border: 1.5px solid var(--border2);
}
.btn-outline:hover {
  background: rgba(139,92,246,0.15);
  border-color: var(--p500);
  color: var(--p200);
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
  margin-top: 0.25rem;
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
}

.btn-danger {
  background: rgba(220,38,38,0.12);
  color: #fca5a5;
  border: 1px solid rgba(220,38,38,0.3);
}
.btn-danger:hover {
  background: rgba(220,38,38,0.22);
  border-color: rgba(220,38,38,0.5);
}

/* ===== ALERTS ===== */
.alert {
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.alert-error {
  background: rgba(220,38,38,0.12);
  border: 1px solid rgba(220,38,38,0.3);
  color: #fca5a5;
}
.alert-success {
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.3);
  color: #6ee7b7;
}
.hidden { display: none !important; }

/* ===== AUTH FOOTER ===== */
.auth-footer {
  text-align: center;
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.auth-footer a {
  color: var(--p400);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.auth-footer a:hover { color: var(--p200); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  color: var(--muted2);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span { flex-shrink: 0; }

/* ===== KATEGORİ ÇUBUĞU ===== */
.category-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  background: rgba(8,6,18,0.9);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
  position: sticky;
  top: 57px;
  z-index: 99;
}
.category-bar::-webkit-scrollbar { display: none; }

.cat-btn {
  flex-shrink: 0;
  background: rgba(139,92,246,0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cat-btn:hover {
  border-color: var(--p500);
  color: var(--p300);
  background: rgba(139,92,246,0.12);
}
.cat-btn.active {
  background: linear-gradient(135deg, var(--p600), var(--p700));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 12px rgba(109,40,217,0.45);
}

/* ===== SHOP ===== */
.shop-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 5rem;
}

/* ===== ÜRÜN KARTLARI ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 540px) {
  .products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 800px) {
  .products-grid { grid-template-columns: repeat(4, 1fr); }
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139,92,246,0.4);
  box-shadow: 0 12px 40px rgba(109,40,217,0.25), 0 0 0 1px rgba(139,92,246,0.15);
}

.product-image {
  background: linear-gradient(135deg, rgba(76,29,149,0.5), rgba(46,16,101,0.8));
  height: 85px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(139,92,246,0.15), transparent 70%);
}

.product-icon {
  font-size: 2.4rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 8px rgba(196,181,253,0.5));
  transition: transform 0.2s;
}
.product-card:hover .product-icon {
  transform: scale(1.12);
}

.product-info {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
  line-height: 1.35;
}

.product-desc {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.6rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 1.05rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--p300), var(--p500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.6rem;
}

.product-card .btn-full {
  font-size: 0.75rem;
  padding: 0.5rem 0.5rem;
  margin-top: 0;
  border-radius: 0.6rem;
}

/* Boş/Yükleme */
.loading-msg {
  color: var(--muted);
  padding: 3rem;
  font-size: 0.9rem;
  grid-column: 1/-1;
  text-align: center;
}
.empty-category {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--muted);
}
.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.5;
}
.empty-category p { font-size: 0.9rem; }

/* ===== ADMİN ===== */
.admin-badge {
  background: linear-gradient(135deg, var(--p600), var(--p700));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.875rem;
  margin-bottom: 2rem;
}

.stat-card {
  border-radius: 1rem;
  padding: 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon { font-size: 1.8rem; line-height: 1; }

.stat-number {
  font-size: 2rem;
  font-weight: 900;
  background: linear-gradient(135deg, #f0e6ff, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
  border-radius: 0.4rem 0.4rem 0 0;
}
.tab-btn:hover { color: var(--p400); background: rgba(139,92,246,0.05); }
.tab-btn.active {
  color: var(--p300);
  border-bottom-color: var(--p500);
  background: rgba(139,92,246,0.08);
}

.tab-content {}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.panel-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.count-badge {
  background: rgba(139,92,246,0.12);
  color: var(--p400);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.products-admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-admin-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.1rem;
  border-radius: 1rem;
}

.product-admin-icon {
  font-size: 2rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(109,40,217,0.3), rgba(46,16,101,0.4));
  border-radius: 0.75rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.product-admin-info { flex: 1; min-width: 0; }
.product-admin-name { font-weight: 700; font-size: 0.95rem; color: var(--text); margin-bottom: 0.2rem; }
.product-admin-desc { font-size: 0.78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.product-admin-price { font-weight: 800; color: var(--p400); font-size: 0.95rem; margin-top: 0.25rem; }

.product-admin-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

.table-wrapper { border-radius: 1rem; overflow: hidden; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.admin-table thead { background: rgba(139,92,246,0.08); }
.admin-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--p400);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.admin-table td {
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--text);
}
.admin-table tr:hover td { background: rgba(139,92,246,0.04); }

.settings-card { border-radius: 1rem; padding: 1.75rem; max-width: 500px; }

.empty-msg {
  text-align: center;
  color: var(--muted);
  padding: 3rem;
  font-size: 0.875rem;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,2,12,0.8);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.modal {
  width: 100%;
  max-width: 480px;
  border-radius: 1.25rem;
  padding: 2rem;
  animation: scaleIn 0.25s ease;
}
@keyframes scaleIn {
  from { opacity:0; transform: scale(0.95); }
  to   { opacity:1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(135deg, #f0e6ff, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  background: rgba(139,92,246,0.1);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
  line-height: 1;
}
.modal-close:hover {
  background: rgba(139,92,246,0.2);
  color: var(--text);
  border-color: var(--p500);
}

.modal textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 80px;
}
.modal textarea:focus {
  border-color: var(--p500);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}
.modal textarea::placeholder { color: var(--muted2); }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ===== LOGO ===== */
.nav-logo { height: 32px; width: auto; display: block; }
.hero-logo-img {
  height: 56px; width: auto; display: block;
  margin: 0 auto 1.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .auth-card { padding: 2rem 1.25rem; }
  .hero-content { padding: 2.25rem 1.5rem; }
  .hero-content h1 { font-size: 1.85rem; }
  .btn-group { flex-direction: column; width: 100%; }
  .btn { width: 100%; }
  .navbar { padding: 0.75rem 1rem; }
  .product-admin-card { flex-wrap: wrap; }
  .product-admin-actions { width: 100%; justify-content: flex-end; }
  .admin-tabs { flex-wrap: wrap; }
  .product-admin-desc { max-width: 100%; }
}

/* ===== CHATBOT ===== */
#chat-bubble {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--p600), var(--p700));
  box-shadow: 0 4px 20px rgba(109,40,217,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s, box-shadow 0.2s;
}
#chat-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 25px rgba(139,92,246,0.6);
}

.chat-notif {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: #ef4444;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

.chat-window {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 340px;
  max-height: 500px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 1.25rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(139,92,246,0.1);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  animation: scaleIn 0.2s ease;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(109,40,217,0.3), rgba(76,29,149,0.2));
  border-bottom: 1px solid var(--border);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(139,92,246,0.2);
  border: 1.5px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.chat-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.chat-status {
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.chat-online-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

.chat-close {
  background: rgba(139,92,246,0.1);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.3rem 0.55rem;
  border-radius: 0.4rem;
  transition: all 0.2s;
}
.chat-close:hover {
  background: rgba(139,92,246,0.2);
  color: var(--text);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.chat-msg {
  display: flex;
  max-width: 85%;
}

.chat-msg.user {
  align-self: flex-end;
}

.chat-msg.bot {
  align-self: flex-start;
}

.chat-bubble-msg {
  padding: 0.6rem 0.9rem;
  border-radius: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.chat-msg.user .chat-bubble-msg {
  background: linear-gradient(135deg, var(--p600), var(--p700));
  color: #fff;
  border-bottom-right-radius: 0.2rem;
}

.chat-msg.bot .chat-bubble-msg {
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 0.2rem;
}

/* Yazıyor animasyonu */
.typing {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem !important;
  align-items: center;
}
.typing span {
  width: 6px;
  height: 6px;
  background: var(--p400);
  border-radius: 50%;
  animation: typingDot 1.2s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%,60%,100% { transform: translateY(0); opacity:0.4; }
  30%          { transform: translateY(-5px); opacity:1; }
}

.chat-input-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}

.chat-input-area input {
  flex: 1;
  padding: 0.6rem 0.9rem;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input-area input:focus {
  border-color: var(--p500);
}
.chat-input-area input::placeholder { color: var(--muted2); }

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, var(--p600), var(--p700));
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.chat-send-btn:hover {
  background: linear-gradient(135deg, var(--p500), var(--p600));
  transform: scale(1.05);
}

@media (max-width: 400px) {
  .chat-window {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }
}
