/*
 * style.css — Shared Stylesheet
 * Percetakan Hasa Media
 * Digunakan oleh: index.html, order.html, admin.html, track.html
 */

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

/* ── DESIGN TOKENS ── */
:root {
  --primary:  #686D76;
  --accent:   #DC5F00;
  --light:    #f5f8fc;
  --text:     #2d2d2d;
  --muted:    #6b7280;
  --white:    #ffffff;
  --radius:   12px;
  --error:    #e53e3e;
  --success:  #16a34a;
  --wa-green: #25d366;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; color: var(--text); background: var(--white); min-height: 100vh; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── NAV (shared base) ── */
nav {
  background: var(--primary);
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
  color: var(--white);
  flex-shrink: 0;
}
.logo-img { height: 40px; width: auto; object-fit: contain; flex-shrink: 0; }
.nav-logo span { color: var(--white); font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.nav-logo small { color: rgba(255,255,255,.7); font-size: .75rem; display: block; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: rgba(255,255,255,.85); font-size: .9rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--accent); }
.nav-links a.active-link { color: var(--accent); }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--accent); color: var(--white);
  font-weight: 700; padding: 14px 30px;
  border-radius: 10px; font-size: 1rem;
  display: inline-block;
  transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(220,95,0,.4); }

.btn-outline {
  border: 2px solid rgba(255,255,255,.5);
  color: var(--white);
  padding: 13px 28px; border-radius: 10px;
  font-size: 1rem; font-weight: 600;
  display: inline-block;
  transition: border-color .2s, background .2s;
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.08); }

.btn-order {
  background: var(--accent); color: var(--white) !important;
  font-weight: 700; padding: 10px 22px;
  border-radius: 8px; font-size: .9rem;
  transition: opacity .2s !important;
}
.btn-order:hover { opacity: .85; }

.btn-cta {
  background: var(--primary); color: var(--white);
  font-weight: 700; padding: 15px 36px;
  border-radius: 10px; font-size: 1.05rem;
  display: inline-block;
  transition: transform .2s, box-shadow .2s;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(104,109,118,.3); }

/* ── SECTION SHARED ── */
.section-label {
  color: var(--accent); font-size: .82rem;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 8px;
}
.section-title { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 12px; }
.section-sub { color: var(--muted); font-size: .95rem; max-width: 520px; line-height: 1.7; }
.section-header { margin-bottom: 48px; }
.section-header.center { text-align: center; }
.section-header.center .section-sub { margin: 0 auto; }

/* ── FOOTER ── */
footer { background: #22252a; color: rgba(255,255,255,.6); padding: 30px 5%; text-align: center; font-size: .85rem; }
footer strong { color: var(--white); }

/* ── FLOATING WA BUTTON ── */
.wa-float {
  position: fixed; bottom: 28px; right: 28px;
  z-index: 200; display: flex; align-items: center; gap: 10px; cursor: pointer;
}
.wa-float-btn {
  width: 58px; height: 58px;
  background: var(--wa-green); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.4);
  transition: transform .2s, box-shadow .2s;
}
.wa-float-btn:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(37,211,102,.5); }
.wa-float-btn svg { width: 30px; height: 30px; fill: white; }
.wa-tooltip {
  background: var(--primary); color: var(--white);
  font-size: .82rem; font-weight: 600;
  padding: 8px 14px; border-radius: 8px;
  white-space: nowrap;
  opacity: 0; transform: translateX(10px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.wa-float:hover .wa-tooltip { opacity: 1; transform: translateX(0); }

/* ── SCROLL ANIMATION ── */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up-delay-1 { transition-delay: .1s; }
.fade-up-delay-2 { transition-delay: .2s; }
.fade-up-delay-3 { transition-delay: .3s; }
.fade-up-delay-4 { transition-delay: .4s; }

/* ── HAMBURGER ── */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; background: none; border: none;
}
.hamburger span { display: block; width: 24px; height: 2.5px; background: var(--white); border-radius: 2px; transition: all .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.mobile-menu {
  display: none; position: fixed; top: 70px; left: 0; right: 0;
  background: var(--primary); padding: 20px 5%;
  flex-direction: column; gap: 4px;
  z-index: 99; box-shadow: 0 8px 20px rgba(0,0,0,.2);
}
.mobile-menu a { color: rgba(255,255,255,.85); font-size: .95rem; font-weight: 500; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu .btn-order { border-bottom: none; text-align: center; margin-top: 8px; padding: 13px 20px; }
.mobile-menu.open { display: flex; }

/* ── TOAST ── */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--white); border-radius: 10px; padding: 14px 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
  display: flex; align-items: center; gap: 12px;
  font-size: .88rem; font-weight: 500;
  min-width: 260px; max-width: 360px;
  border-left: 4px solid;
  animation: toastIn .3s ease;
}
.toast.error   { border-color: var(--error); }
.toast.error   .toast-icon { color: var(--error); }
.toast.success { border-color: var(--success); }
.toast.success .toast-icon { color: var(--success); }
.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-close { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 1rem; padding: 0 4px; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(30px); } }
.toast.hiding { animation: toastOut .3s ease forwards; }

/* ── FORM SHARED ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .85rem; font-weight: 600; color: var(--text); }
.form-group label .req { color: var(--error); margin-left: 2px; }
.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid #e2e8f0; border-radius: 8px;
  padding: 11px 14px; font-size: .9rem;
  font-family: inherit; color: var(--text); background: var(--white);
  transition: border .2s, box-shadow .2s; outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(104,109,118,.1); }
.form-group input.is-error,
.form-group select.is-error,
.form-group textarea.is-error { border-color: var(--error); box-shadow: 0 0 0 3px rgba(229,62,62,.1); }
.form-group input.is-valid,
.form-group select.is-valid,
.form-group textarea.is-valid { border-color: var(--success); }
.field-error { font-size: .78rem; color: var(--error); margin-top: 2px; display: none; }
.field-error.show { display: block; }

/* ── STATUS BADGES ── */
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: .78rem; font-weight: 700; }
.status-Baru     { background: #dbeafe; color: #1d4ed8; }
.status-Diproses { background: #fef3c7; color: #d97706; }
.status-Selesai  { background: #d1fae5; color: #065f46; }
.status-Batal    { background: #fee2e2; color: #991b1b; }

/* ── MODAL OVERLAY (shared) ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }

/* ── RESPONSIVE HELPERS ── */
@media(max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links  { display: none; }
  .section-title { font-size: 1.6rem; }
  .wa-float-btn { width: 52px; height: 52px; }
}
