@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;800;900&display=swap');

body {
  font-family: 'Nunito', ui-rounded, system-ui, sans-serif;
  background: #0a0f1c;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: 1rem;
  color: #94a3b8;
  font-size: 0.95rem;
  font-weight: 800;
  border: 2px solid transparent;
  transition: all 0.15s;
}
.nav-link svg:first-child {
  transition: transform 0.15s;
  display: inline-block;
}
.nav-link:hover {
  background: #1e293b;
  color: #e2e8f0;
}
.nav-link:hover svg:first-child {
  transform: scale(1.15);
}
.nav-link.active {
  background: linear-gradient(90deg, #082f49, #0c3a5c 130%);
  color: #7dd3fc;
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.15) inset;
}

.card {
  background: #101a2e;
  border: 3px solid #334155;
  border-radius: 1.25rem;
  box-shadow: 4px 4px 0 #020617;
}
.card.is-clickable, a.card, button.card {
  cursor: pointer;
}
.card.is-clickable:hover, a.card:hover {
  border-color: #38bdf8;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #020617;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(180deg, #5fd0ff, #38bdf8);
  color: #0f172a;
  font-weight: 800;
  font-size: 0.875rem;
  padding: 0.55rem 1rem;
  border-radius: 0.9rem;
  border: 3px solid #0ea5e9;
  box-shadow: 3px 3px 0 #082f49;
  transition: transform 0.1s, box-shadow 0.1s;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #7dd3fc, #5fd0ff);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #082f49;
}
.btn-primary:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #082f49;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #1e293b;
  color: #cbd5e1;
  font-weight: 800;
  font-size: 0.875rem;
  padding: 0.5rem 0.9rem;
  border-radius: 0.9rem;
  border: 2px solid #334155;
  transition: all 0.15s;
}
.btn-ghost:hover {
  background: #334155;
  color: #fff;
  border-color: #475569;
}
.btn-ghost:active {
  transform: translate(1px, 1px);
}

.input {
  width: 100%;
  background: #020617;
  border: 3px solid #334155;
  border-radius: 0.9rem;
  padding: 0.55rem 0.8rem;
  color: #f1f5f9;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56,189,248,0.18);
}
.input::placeholder {
  color: #64748b;
}

.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #94a3b8;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.period-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 800;
  border-radius: 0.8rem;
  background: #1e293b;
  color: #94a3b8;
  border: 2px solid #334155;
}
.period-btn:hover {
  background: #334155;
  color: #e2e8f0;
}
.period-btn.active {
  background: #082f49;
  color: #7dd3fc;
  border-color: #38bdf8;
}

.ctx-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.9rem;
  color: #e2e8f0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
}
.ctx-item:hover {
  background: #334155;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 8px; }

#modal-box {
  border-radius: 1.4rem !important;
  border-width: 3px !important;
}

/* ---- Status badges: one consistent color language across every page ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-ordered        { background: rgba(167,139,250,.16); color: #c4b5fd; border-color: rgba(167,139,250,.4); }
.badge-label_created  { background: rgba(129,140,248,.14); color: #a5b4fc; border-color: rgba(129,140,248,.35); }
.badge-shipped        { background: rgba(14,165,233,.16);  color: #7dd3fc; border-color: rgba(14,165,233,.4); }
.badge-out_for_delivery { background: rgba(251,191,36,.16); color: #fcd34d; border-color: rgba(251,191,36,.4); }
.badge-delivered      { background: rgba(52,211,153,.16);  color: #6ee7b7; border-color: rgba(52,211,153,.4); }
.badge-delayed        { background: rgba(251,146,60,.16);  color: #fdba74; border-color: rgba(251,146,60,.4); }
.badge-cancelled      { background: rgba(244,63,94,.16);   color: #fda4af; border-color: rgba(244,63,94,.4); }

/* ---- Toasts ---- */
.toast-item {
  animation: toast-in 0.2s ease-out;
}
.toast-item.toast-out {
  animation: toast-out 0.25s ease-in forwards;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateX(12px); }
}

/* ---- Small polish: buttons/cards feel a touch more alive ---- */
.card {
  transition: border-color 0.15s, transform 0.1s;
}
.btn-primary:disabled, .btn-primary.opacity-60 {
  cursor: not-allowed;
}
.section-title {
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

/* ---- Loading skeleton, used on first paint before data arrives ---- */
.skeleton {
  border-radius: 1.25rem;
  background: linear-gradient(100deg, #101c30 30%, #1c2b45 50%, #101c30 70%);
  background-size: 200% 100%;
  animation: skeleton-sheen 1.4s ease-in-out infinite;
  border: 3px solid #1e293b;
}
@keyframes skeleton-sheen {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Empty states ---- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #64748b;
}
.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

/* ---- Rounder, friendlier shapes everywhere ---- */
.card, .skeleton {
  border-radius: 1.75rem;
}
.btn-primary, .btn-ghost {
  border-radius: 1.4rem;
}
.input {
  border-radius: 1.15rem;
}
.period-btn {
  border-radius: 999px;
}
.nav-link {
  border-radius: 1.3rem;
  overflow: hidden;
}
#modal-box {
  border-radius: 1.85rem !important;
}
.badge {
  border-radius: 999px;
}

/* ---- Hover-to-reveal sidebar ----
   The page background is now one flat solid color, so the sidebar needs its
   own explicit, visibly different shade — otherwise an expanded sidebar
   would blend right into the page instead of reading as a distinct panel. */
.app-sidebar {
  width: 4.75rem;
  overflow: hidden;
  background: #131f38;
  border-top-right-radius: 1.75rem;
  border-bottom-right-radius: 1.75rem;
  outline: none;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.22s ease;
}
.app-sidebar:hover,
.app-sidebar:focus-within {
  width: 16rem;
  box-shadow: 14px 0 36px rgba(2, 6, 23, 0.55);
}
.sidebar-fade {
  opacity: 0;
  transition: opacity 0.15s ease 0.05s;
}
.app-sidebar:hover .sidebar-fade,
.app-sidebar:focus-within .sidebar-fade {
  opacity: 1;
}
/* The main content reserves space for the COLLAPSED rail only — the
   expanded sidebar overlays on top (it's position: fixed) so hovering
   never shifts the page around. */
.sidebar-content-offset {
  margin-left: 4.75rem;
}
