/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1.5rem;
  border: none; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

/* ── Modal & Dialog ────────────────────────────────── */
.modal-box-wrap {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 90vw;
  max-height: 90vh;
}

.modal-box-wrap::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-box {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-box h3 {
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--grad-btn);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.btn:active { transform: translateY(0); }
.btn-primary   { background: var(--grad-btn);  color: #fff; }
.btn-primary:hover { opacity: .92; }
.btn-accent    { background: var(--grad-accent);   color: #fff; }
.btn-accent:hover  { opacity: .92; }
.btn-success   { background: var(--success); color: #fff; }
.btn-warning   { background: var(--warning); color: #fff; }
.btn-outline   { background: transparent; color: var(--primary); border: 2px solid var(--primary); box-shadow: none; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-danger    { background: var(--danger);   color: #fff; }
.btn-info      { background: var(--info);   color: #fff; }
.btn-sm        { padding: .4rem .95rem; font-size: .85rem; }
.btn-lg        { padding: .85rem 2.25rem;   font-size: 1.1rem; font-weight: 700; }
.btn:disabled  { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Cards ──────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.card-img {
  width: 100%; height: 200px; object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  margin: -1.25rem -1.25rem 1rem;
  width: calc(100% + 2.5rem);
}

/* ── Forms ──────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .9rem; color: var(--text); }
.form-control {
  width: 100%; padding: .6rem .85rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 1rem; background: #fff; color: var(--text);
  transition: border-color .2s;
}
.form-control:focus { outline: none; border-color: var(--primary); }
.form-control.error { border-color: var(--danger); }
.form-error { color: var(--danger); font-size: .82rem; margin-top: .3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ── Badges ─────────────────────────────────────────── */
.badge {
  display: inline-block; padding: .2rem .55rem;
  border-radius: 99px; font-size: .75rem; font-weight: 700;
}
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger  { background: #fee2e2; color: #dc2626; }
.badge-info    { background: #dbeafe; color: #1d4ed8; }
.badge-muted   { background: var(--border); color: var(--text-muted); }

/* ── Alert ──────────────────────────────────────────── */
.alert {
  padding: .85rem 1rem; border-radius: var(--radius);
  margin-bottom: 1rem; font-size: .93rem;
}
.alert-success { background: #dcfce7; color: #15803d; border-left: 4px solid var(--success); }
.alert-danger  { background: #fee2e2; color: #b91c1c; border-left: 4px solid var(--danger); }
.alert-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid var(--info); }

/* ── Table ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: .65rem 1rem; text-align: left;
  border-bottom: 1px solid var(--border); font-size: .9rem;
}
th { background: var(--bg); font-weight: 700; color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
tr:hover td { background: #f1f5f9; }

/* ── Menu item card ─────────────────────────────────── */
.menu-item-card {
  display: flex; align-items: center; gap: 1rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: .85rem; background: var(--bg-card);
  transition: box-shadow .15s;
}
.menu-item-card:hover { box-shadow: var(--shadow-lg); }
.menu-item-card img {
  width: 70px; height: 70px; object-fit: cover;
  border-radius: var(--radius); flex-shrink: 0;
}
.menu-item-info { flex: 1; }
.menu-item-info h4 { font-size: 1rem; margin: 0 0 .2rem; }
.menu-item-price { font-weight: 700; color: var(--primary); font-size: 1.05rem; }
.menu-item-add   { margin-left: auto; }

/* ── Cart drawer ─────────────────────────────────────── */
.cart-btn {
  position: fixed; bottom: 2rem; right: 2rem;
  background: var(--primary); color: #fff;
  border: none; border-radius: 50%; width: 58px; height: 58px;
  font-size: 1.4rem; cursor: pointer; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; justify-content: center;
}
.cart-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--accent); color: #fff;
  border-radius: 50%; width: 20px; height: 20px;
  font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── Sidebar / Panel ─────────────────────────────────── */
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.dashboard-grid {
  display: grid; grid-template-columns: 1fr 2fr; gap: 1.5rem;
}
@media (max-width: 900px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* ── Activity feed ───────────────────────────────────── */
.activity-feed { display: flex; flex-direction: column; gap: .75rem; }
.activity-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .75rem 1rem;
  animation: fadeIn .3s ease;
}
.activity-card .meta { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ── Loader ──────────────────────────────────────────── */
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--primary);
  animation: spin .7s linear infinite; margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
