:root {
  --bg: #faf7f2; --card: #fff; --ink: #25302a; --muted: #6b746e; --line: #e8e1d6;
  --green: #2f5240; --green-d: #223c2f; --rose: #c0506a; --rose-l: #f7e4e9; --warn: #b7791f; --danger: #c0392b;
  --radius: 14px; --shadow: 0 6px 24px rgba(37, 48, 42, .08);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  background: var(--green); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; }
.btn:hover { background: var(--green-d); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: #f1ece3; }
.btn.rose { background: var(--rose); } .btn.rose:hover { background: #a63f57; }
.btn.danger { background: transparent; color: var(--danger); border-color: #efc9c4; } .btn.danger:hover { background: #fbeceb; }
.btn.sm { padding: 6px 14px; font-size: .85rem; }
.btn.block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span, .field > label { font-size: .84rem; font-weight: 600; color: var(--muted); }
.field small { color: var(--muted); font-weight: 400; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password], input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(47, 82, 64, .12); }
textarea { resize: vertical; min-height: 80px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: #eee; color: #444; white-space: nowrap; }
.badge.new { background: #e4eefb; color: #1f5fa8; } .badge.preparing { background: #fdf0d9; color: #96600c; }
.badge.shipping { background: #ece4f8; color: #6035a5; } .badge.delivered { background: #dff3e5; color: #1d7a3d; }
.badge.cancelled { background: #f6e0dd; color: #a3342a; } .badge.paid { background: #dff3e5; color: #1d7a3d; } .badge.pending { background: #fdf0d9; color: #96600c; }

/* Modal / çekmece */
.overlay { position: fixed; inset: 0; background: rgba(20, 28, 23, .5); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--card); border-radius: 18px; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; box-shadow: var(--shadow); position: relative; }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 1; }
.modal-head h3 { margin: 0; font-family: var(--serif); font-size: 1.3rem; }
.modal-body { padding: 24px; }
.modal-foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: 0; background: var(--card); }
.x { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; }
@keyframes fade { from { opacity: 0; } }

#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--green-d); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); animation: fade .2s; max-width: 340px; }
.toast.err { background: var(--danger); }

@media (max-width: 600px) { .modal-body { padding: 18px; } .modal-head, .modal-foot { padding-left: 18px; padding-right: 18px; } }
