/* css/theme.css — Ogani Food E-commerce */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #ffffff;
  color: #030213;
  -webkit-font-smoothing: antialiased;
}

/* ── Inputs ── */
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #030213;
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus {
  border-color: #030213;
  box-shadow: 0 0 0 3px rgba(3,2,19,.08);
}
.form-input::placeholder { color: #717182; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23717182' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea.form-input { resize: vertical; min-height: 80px; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #030213; color: #fff;
  padding: 10px 20px; border-radius: 8px; border: none;
  font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: opacity .2s; text-decoration: none;
}
.btn-primary:hover { opacity: .88; }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #ececf0; color: #030213;
  padding: 10px 20px; border-radius: 8px; border: none;
  font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background .2s; text-decoration: none;
}
.btn-secondary:hover { background: #dddde5; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: #030213;
  padding: 10px 20px; border-radius: 8px; border: 1px solid rgba(0,0,0,.15);
  font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: background .2s; text-decoration: none;
}
.btn-ghost:hover { background: #f5f5f7; }

.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #d4183d; color: #fff;
  padding: 10px 20px; border-radius: 8px; border: none;
  font-family: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: opacity .2s;
}
.btn-danger:hover { opacity: .88; }

.btn-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: #16a34a; color: #fff;
  padding: 12px 24px; border-radius: 8px; border: none;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background .2s; text-decoration: none; width: 100%;
}
.btn-wa:hover { background: #15803d; }

/* ── Cards ── */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
  overflow: hidden;
  transition: box-shadow .25s;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12), 0 12px 28px rgba(0,0,0,.08); }

/* ── Product card image ── */
.product-img { transition: transform .35s ease; }
.product-img-wrap:hover .product-img { transform: scale(1.08); }

/* ── Badges ── */
.badge-green { background: #dcfce7; color: #15803d; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge-red   { background: #fee2e2; color: #b91c1c; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.badge-blue  { background: #dbeafe; color: #1d4ed8; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; }

/* ── Admin sidebar ── */
.admin-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: #717182;
  text-decoration: none; cursor: pointer;
  background: transparent; border: none; font-family: inherit;
  transition: all .2s; width: 100%; text-align: left;
}
.admin-nav-link:hover { background: #ececf0; color: #030213; }
.admin-nav-link.active { background: #030213; color: #fff; }

/* ── Data table ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 12px 16px;
  font-size: 12px; font-weight: 600; color: #717182;
  text-transform: uppercase; letter-spacing: .06em;
  background: #f5f5f7; border-bottom: 1px solid rgba(0,0,0,.08);
}
.data-table td { padding: 14px 16px; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 14px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafafa; }

/* ── Toast ── */
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.toast { animation: toast-in .22s ease both; }

/* ── Tabs ── */
.tab-btn {
  padding: 10px 4px; border-bottom: 2px solid transparent;
  font-size: 14px; font-weight: 500; cursor: pointer;
  background: none; border-left: none; border-right: none; border-top: none;
  font-family: inherit; color: #717182; transition: color .2s, border-color .2s;
}
.tab-btn.active { border-bottom-color: #030213; color: #030213; }
.tab-btn:hover:not(.active) { color: #030213; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.5);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
@media(min-width:640px) { .modal-overlay { align-items: center; padding: 24px; } }
.modal-box {
  background: #fff; border-radius: 16px 16px 0 0;
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
}
@media(min-width:640px) { .modal-box { border-radius: 16px; } }

/* ── Scrollbar ── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 99px; }

/* ── Range & checkbox ── */
input[type=range]    { accent-color: #030213; }
input[type=radio]    { accent-color: #030213; }
input[type=checkbox] { accent-color: #030213; width: 16px; height: 16px; }

/* ── Lucide icons ── */
i[data-lucide] { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; flex-shrink: 0; }

/* ── Navbar ── */
.navbar { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08); }

/* ── Fade up anim ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .45s ease both; }
