/* ============================================================
   Allina Juwelier · Yönetim Paneli — Shared Stylesheet
   ============================================================
   Web tabanlı admin paneli için ortak stil dosyası.
   • Sade B2B paleti, gradient yok, emoji yok
   • Sol sidebar + üst bar + içerik düzeni
   • Showcase: tarayıcı çerçevesi içinde, koyu BG üzerinde
   ============================================================ */

:root {
  /* Showcase (dış) */
  --bg-stage:       #16140F;
  --stage-muted:    #5A5141;

  /* Sayfa */
  --bg-page:        #F5F2EA;
  --bg-card:        #FFFFFF;
  --bg-subtle:      #F7F4EC;
  --bg-warm:        #F0EBD9;
  --bg-hover:       #FAF7EF;

  /* Borders */
  --border:         #E8E2D0;
  --border-soft:    #F0EBE0;
  --border-strong:  #C9C2AE;

  /* Text */
  --text:           #181612;
  --text-2:         #3A352C;
  --muted:          #807A6E;
  --faint:          #B8B2A4;

  /* Accents */
  --accent:         #181612;
  --warm:           #9C7B3F;

  /* Status (sade, B2B) */
  --st-new:         #6B6B6B;
  --st-prep:        #8B6B2A;
  --st-ship:        #3E5A7D;
  --st-done:        #2D7A4D;
  --st-cancel:      #B84A3D;
  --st-new-bg:      #EFEEEC;
  --st-prep-bg:     #F4EDDB;
  --st-ship-bg:     #E4EAF1;
  --st-done-bg:     #DDEBE2;
  --st-cancel-bg:   #F3E0DC;
}

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-stage);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  min-height: 100vh;
  padding: 40px 24px 64px;
  font-size: 13px;
  line-height: 1.5;
}

/* ============================================================
   SHOWCASE — tarayıcı çerçevesi içinde sayfa
   ============================================================ */
.showcase {
  max-width: 1280px;
  margin: 0 auto;
}

.browser {
  background: var(--bg-page);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #2A2620;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
}

.browser-bar {
  height: 36px;
  background: #ECE7DA;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 12px;
}
.browser-bar .dots { display: flex; gap: 6px; }
.browser-bar .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #C9C2AE;
}
.browser-bar .url {
  flex: 1;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 4px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
  font-family: 'Inter', monospace;
  letter-spacing: 0.02em;
}

.caption {
  text-align: center;
  margin-top: 24px;
}
.caption .tag {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stage-muted);
  font-weight: 500;
}
.caption .name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: #FFFFFF;
  margin-top: 4px;
  font-weight: 500;
}

.brand-sig {
  text-align: center;
  margin-top: 40px;
  color: var(--stage-muted);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ============================================================
   APP SHELL — sidebar + main
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 760px;
}

.sidebar {
  background: #FFFFFF;
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
}

.brand {
  padding: 4px 10px 24px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 14px;
}
.brand .mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  letter-spacing: 0.14em;
  color: var(--text);
  font-weight: 500;
}
.brand .sub {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.18em;
  margin-top: 2px;
  font-weight: 500;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .group {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 600;
  padding: 14px 10px 6px;
}
.nav .item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}
.nav .item:hover { background: var(--bg-hover); }
.nav .item.active {
  background: var(--accent);
  color: #FFFFFF;
}
.nav .item .ic { display: flex; width: 16px; flex-shrink: 0; }
.nav .item .count {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  background: var(--bg-warm);
  color: var(--text);
  padding: 1px 6px;
  border-radius: 9px;
  letter-spacing: 0.04em;
}
.nav .item.active .count {
  background: rgba(255,255,255,0.15);
  color: #FFFFFF;
}

.sidebar-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--border-soft); }
.sidebar-foot .me { display: flex; align-items: center; gap: 10px; }
.sidebar-foot .av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-warm);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.05em;
}
.sidebar-foot .info { flex: 1; min-width: 0; }
.sidebar-foot .info .name { font-size: 12px; font-weight: 600; color: var(--text); }
.sidebar-foot .info .role { font-size: 10px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; }

/* ============================================================
   MAIN AREA
   ============================================================ */
.main { display: flex; flex-direction: column; }

.topbar {
  height: 54px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar .search {
  flex: 1;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 0 12px;
  height: 34px;
}
.topbar .search input {
  border: none; background: transparent; flex: 1; outline: none;
  font-size: 12px; font-family: inherit; color: var(--text);
}
.topbar .search input::placeholder { color: var(--faint); }
.topbar .search .kbd {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 600;
  border: 1px solid var(--border);
  padding: 2px 5px;
  border-radius: 3px;
  background: #FFFFFF;
}
.topbar .actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar .icon-btn {
  width: 32px; height: 32px;
  border: none; background: transparent;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer; color: var(--text-2);
  position: relative;
}
.topbar .icon-btn:hover { background: var(--bg-subtle); }
.topbar .icon-btn .dot-badge {
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--st-prep);
}

.content { padding: 28px 32px 40px; flex: 1; background: var(--bg-page); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.page-head h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 28px;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.005em;
}
.page-head .sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.page-head .head-actions { display: flex; gap: 8px; }
.breadcrumb {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  background: var(--bg-card);
  color: var(--text);
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #FFFFFF; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost   { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-subtle); }
.btn-danger  { background: transparent; color: var(--st-cancel); border: 1px solid var(--st-cancel); }
.btn-sm      { height: 28px; padding: 0 10px; font-size: 11px; }
.btn-lg      { height: 40px; padding: 0 18px; font-size: 13px; }

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-card);
  outline: none;
}
.input, .select { height: 36px; }
.textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input-sm { height: 30px; font-size: 12px; padding: 6px 10px; }

.label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.help { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.45; }

.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }

.toggle {
  position: relative;
  width: 36px; height: 20px;
  background: var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: left 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle.on { background: var(--accent); }
.toggle.on::after { left: 18px; }

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}
.check .box {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 3px;
  background: #FFFFFF;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.check.checked .box { background: var(--accent); border-color: var(--accent); }
.check .box svg { color: #FFFFFF; display: none; }
.check.checked .box svg { display: block; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.card-pad { padding: 20px 22px; }
.card-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-head h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: 0.01em; }
.card-head .meta { font-size: 11px; color: var(--muted); }
.card-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

/* ============================================================
   KPI TILES
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
}
.kpi .l { font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.kpi .v { font-family: 'Cormorant Garamond', serif; font-size: 30px; color: var(--text); margin-top: 6px; line-height: 1; }
.kpi .d { font-size: 11px; color: var(--muted); margin-top: 6px; }
.kpi .d .up   { color: var(--st-done); font-weight: 600; }
.kpi .d .down { color: var(--st-cancel); font-weight: 600; }

/* ============================================================
   TABLE
   ============================================================ */
.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 13px 16px;
  font-size: 12px;
  color: var(--text);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.table tr:hover td { background: var(--bg-hover); }
.table tr:last-child td { border-bottom: none; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.center, .table th.center { text-align: center; }
.table td.action {
  text-align: right;
  white-space: nowrap;
}
.table td.action a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 12px;
  margin-left: 12px;
}
.table .ord-id { font-family: 'Inter', monospace; font-weight: 600; color: var(--text); letter-spacing: 0.01em; }
.table .muted-cell { color: var(--muted); }

/* ============================================================
   STATUS PILLS
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.new    { background: var(--st-new-bg);    color: var(--st-new); }
.pill.prep   { background: var(--st-prep-bg);   color: var(--st-prep); }
.pill.ship   { background: var(--st-ship-bg);   color: var(--st-ship); }
.pill.done   { background: var(--st-done-bg);   color: var(--st-done); }
.pill.cancel { background: var(--st-cancel-bg); color: var(--st-cancel); }

.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--bg-warm);
  color: var(--text);
}

/* ============================================================
   FILTER BAR (above tables)
   ============================================================ */
.filterbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.filterbar .tab {
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  gap: 6px;
}
.filterbar .tab.active { background: var(--accent); color: #FFFFFF; }
.filterbar .tab .n {
  font-size: 10px;
  background: var(--bg-warm);
  color: var(--text);
  padding: 1px 6px;
  border-radius: 9px;
  font-weight: 600;
}
.filterbar .tab.active .n { background: rgba(255,255,255,0.18); color: #FFFFFF; }
.filterbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pager { display: flex; align-items: center; gap: 6px; }
.pager .btn {
  height: 28px; padding: 0 10px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2); font-size: 12px;
}
.pager .btn.active { background: var(--accent); color: #FFFFFF; border-color: var(--accent); }
.pager .info { font-size: 12px; color: var(--muted); margin-right: 12px; }

/* ============================================================
   DRAWER / MODAL (for product edit)
   ============================================================ */
.drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(20,18,12,0.35);
  z-index: 10;
}
.drawer {
  position: absolute;
  top: 0; right: 0;
  width: 520px;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 20;
  display: flex;
  flex-direction: column;
}
.drawer-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.drawer-body { padding: 22px; flex: 1; overflow: auto; }
.drawer-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ============================================================
   IMAGE UPLOADER (product images)
   ============================================================ */
.img-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.img-tile {
  aspect-ratio: 1/1;
  border-radius: 4px;
  background: var(--bg-warm);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}
.img-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-tile.add {
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
  color: var(--muted);
  border-style: dashed;
  cursor: pointer;
  background: var(--bg-card);
}
.img-tile.add span { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.img-tile.cover::after {
  content: "KAPAK";
  position: absolute;
  top: 4px; left: 4px;
  background: var(--accent); color: #FFFFFF;
  font-size: 8px; padding: 2px 5px;
  letter-spacing: 0.08em; font-weight: 600;
  border-radius: 2px;
}

/* ============================================================
   TIMELINE (order detail status)
   ============================================================ */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-row {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding: 10px 0;
  position: relative;
}
.tl-row::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 24px;
  width: 1px;
  height: calc(100% - 16px);
  background: var(--border);
}
.tl-row:last-child::before { display: none; }
.tl-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--border-strong);
  margin: 6px;
  z-index: 1;
}
.tl-row.active .tl-dot { background: var(--accent); border-color: var(--accent); }
.tl-row.done .tl-dot { background: var(--st-done); border-color: var(--st-done); }
.tl-body .what { font-size: 13px; font-weight: 600; color: var(--text); }
.tl-body .when { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tl-row.future .tl-body .what { color: var(--faint); }

/* ============================================================
   DEFINITION LIST (key/value)
   ============================================================ */
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 10px 16px; }
.dl dt { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; padding: 4px 0; }
.dl dd { font-size: 13px; color: var(--text); margin: 0; padding: 4px 0; }

/* ============================================================
   AVATAR
   ============================================================ */
.av {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-warm);
  color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.av.sm { width: 24px; height: 24px; font-size: 10px; }
.av.lg { width: 56px; height: 56px; font-size: 20px; }
.av.dark { background: var(--accent); color: #FFFFFF; }

/* ============================================================
   UTILITY
   ============================================================ */
.muted    { color: var(--muted); }
.faint    { color: var(--faint); }
.flex     { display: flex; }
.ai-center{ align-items: center; }
.jc-between{ justify-content: space-between; }
.gap-4    { gap: 4px; }
.gap-8    { gap: 8px; }
.gap-12   { gap: 12px; }
.gap-16   { gap: 16px; }
.mt-0     { margin-top: 0; }
.mt-8     { margin-top: 8px; }
.mt-16    { margin-top: 16px; }
.mt-24    { margin-top: 24px; }
.mb-0     { margin-bottom: 0; }
.mb-8     { margin-bottom: 8px; }
.mb-16    { margin-bottom: 16px; }
.mb-24    { margin-bottom: 24px; }
.w-full   { width: 100%; }
.no-wrap  { white-space: nowrap; }
