﻿/* =========================================================
   Emsal Giyim - yonetim paneli stilleri
   ========================================================= */

.admin-body { background: #f4f1ec; }

.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }

.admin-side {
  background: #241f1c; color: #ddd3cb;
  padding: 1.4rem 1rem; display: flex; flex-direction: column; gap: 1.4rem;
  position: sticky; top: 0; height: 100vh;
}
.admin-brand { display: block; color: #fff; text-decoration: none; }
.admin-brand:hover { text-decoration: none; }
.admin-brand img {
  width: 100%; height: auto; display: block;
  background: #fbf8f4; border-radius: 10px; padding: .55rem .7rem;
}
.admin-brand small {
  display: block; margin-top: .5rem; text-align: center;
  color: #a1958c; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
}

.admin-nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.admin-nav a {
  color: #cdc2b9; padding: .6rem .8rem; border-radius: 9px;
  font-size: .92rem; text-decoration: none;
}
.admin-nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.admin-nav a.active { background: var(--plum); color: #fff; }

.admin-side-foot { display: grid; gap: .7rem; font-size: .85rem; }
.admin-side-foot a { color: #a1958c; }
.admin-side-foot .btn-ghost { background: transparent; border-color: rgba(255,255,255,.2); color: #ddd3cb; }
.admin-side-foot .btn-ghost:hover { background: rgba(255,255,255,.1); }

.admin-main { padding: 1.6rem clamp(1rem, 3vw, 2.2rem) 3rem; min-width: 0; }
.admin-topbar {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem;
}
.admin-topbar h1 { margin: 0; font-size: 1.6rem; }

/* --- Kartlar --- */

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem;
}
.stat .label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.stat .value { font-family: var(--serif); font-size: 1.85rem; color: var(--plum); line-height: 1.2; margin-top: .2rem; }

.admin-panel {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 1.3rem; margin-bottom: 1.3rem;
}
.admin-panel > h2, .admin-panel > h3 { margin-top: 0; }

.toolbar { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.toolbar form { display: flex; gap: .5rem; }
.toolbar input[type=search], .toolbar input[type=text] { min-width: 220px; }

/* --- Tablolar --- */

.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { padding: .65rem .55rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.admin-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.admin-table tbody tr:hover { background: #fbf9f7; }
.admin-table img.thumb { width: 46px; height: 60px; object-fit: cover; border-radius: 6px; }
.admin-table .nowrap { white-space: nowrap; }

.admin-table input.inline-price { width: 110px; }
.admin-table input.inline-stock { width: 74px; }

.stock-line { display: flex; align-items: center; gap: .35rem; margin-bottom: .25rem; }
.stock-line .size { min-width: 34px; font-weight: 600; font-size: .82rem; }
.stock-zero { color: var(--err); }

.pill-off { background: #f1ece7; color: #8a7f78; }

/* --- Formlar --- */

.variant-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.variant-row input[name=size] { width: 150px; flex: 0 0 auto; }
.variant-row input[name=stock] { width: 110px; flex: 0 0 auto; }

.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .8rem; }
.image-tile { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #faf7f4; }
.image-tile img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.image-tile form { padding: .4rem; }

.form-actions {
  display: flex; gap: .7rem; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 1.2rem;
}

/* --- Yasal metin düzenleyici --- */

.legal-editor {
  border: 1px solid var(--line); border-radius: 10px;
  padding: .8rem 1rem; margin-bottom: .7rem; background: #fdfbf9;
}
.legal-editor summary {
  cursor: pointer; font-weight: 600; font-size: .95rem;
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
}
.legal-editor summary::-webkit-details-marker { color: var(--muted); }
.legal-editor textarea { font-size: .85rem; line-height: 1.6; }

/* --- Giriş ekranı --- */

.login-page {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(135deg, #f3e9e2, #efe3ea 60%, #e8e5da);
  padding: 2rem 1rem;
}
.login-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 2rem; width: min(420px, 100%); box-shadow: var(--shadow);
}
.login-card .brand-mark { margin: 0 auto .8rem; }

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-side-foot { grid-template-columns: 1fr auto; align-items: center; }
}
