/* AgilZap Delivery — CSS Premium
 * Inspirado em Anota AI + ifood
 * Tema: emerald accent + dark refinado + cards premium
 */

:root {
  --accent: #10b981;
  --accent-hover: #34d399;
  --accent-glow: rgba(16, 185, 129, 0.25);
  --accent-dark: #059669;
  --amber: #f59e0b;
  --orange: #f97316;
  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --red: #ef4444;
  --blue: #3b82f6;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --bg-card-hover: rgba(16, 185, 129, 0.04);
}

/* ============ KANBAN PREMIUM ============ */
.del-kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(280px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

.del-kanban::-webkit-scrollbar { height: 8px; }
.del-kanban::-webkit-scrollbar-track { background: transparent; }
.del-kanban::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; opacity: .5; }

.del-kanban-col {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(17, 24, 39, 0.6) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: border-color .2s, box-shadow .2s;
}

.del-kanban-col.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-glow), 0 8px 24px rgba(16, 185, 129, 0.2);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, rgba(17, 24, 39, 0.6) 100%);
}

.del-kanban-header {
  padding: 14px 16px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-subtle);
}

.del-kanban-count {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  margin-left: 8px;
}

.del-kanban-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
}

.del-kanban-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 24px 12px;
  margin: 0;
  font-style: italic;
  opacity: .5;
}

/* ============ ORDER CARD ============ */
.del-order-card {
  background: #1a1f2e;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform .2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .2s, border-color .2s, background .2s;
  position: relative;
  overflow: hidden;
}

.del-order-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  opacity: 0;
  transition: opacity .2s;
}

.del-order-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.15), 0 4px 8px rgba(0,0,0,0.2);
  background: #1f2535;
}

.del-order-card:hover::before { opacity: 1; }

.del-order-card.del-order-canceled {
  opacity: .5;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.03);
}

.del-order-card.del-order-canceled:hover {
  opacity: .7;
  border-color: #ef4444;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.15);
}

.del-order-card[draggable="true"] { cursor: grab; }
.del-order-card[draggable="true"]:active { cursor: grabbing; transform: rotate(1deg) scale(1.02); }

/* ============ DASHBOARD CARDS PREMIUM ============ */
.card {
  background: #1a1f2e;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}

/* Dashboard stat cards — gradient accent glow */
.stat-card-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.02)) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}
.stat-card-amber {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.02)) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}
.stat-card-orange {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(249, 115, 22, 0.02)) !important;
  border-color: rgba(249, 115, 22, 0.3) !important;
}
.stat-card-cyan {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(6, 182, 212, 0.02)) !important;
  border-color: rgba(6, 182, 212, 0.3) !important;
}

/* ============ MENU ITEM CARDS (cardápio) ============ */
.menu-item-card {
  background: #1a1f2e;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.menu-item-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.15);
}

.menu-item-card-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.menu-item-card:hover .menu-item-card-photo { transform: scale(1.04); }

.menu-item-card-body { padding: 14px; }

.menu-item-card-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 54px;
  background: linear-gradient(135deg, #1f2535, #161a26);
  opacity: .6;
}

/* ============ BUTTONS PREMIUM ============ */
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
  letter-spacing: 0.2px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary, #9ca3af);
  border: 1px solid var(--border-subtle);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
}

.btn-ghost:hover {
  color: var(--text, #fff);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4); }

.btn-sm { padding: 6px 12px; font-size: 11px; }
.btn-icon { background: transparent; border: none; cursor: pointer; padding: 6px 8px; border-radius: 6px; transition: background .15s; }
.btn-icon:hover { background: rgba(255,255,255,.06); }

/* ============ BADGES PREMIUM ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.badge-success { background: rgba(16,185,129,.15); color: var(--accent); border: 1px solid rgba(16,185,129,.3); }
.badge-danger  { background: rgba(239,68,68,.15); color: #ef4444; border: 1px solid rgba(239,68,68,.3); }
.badge-warn    { background: rgba(245,158,11,.15); color: #f59e0b; border: 1px solid rgba(245,158,11,.3); }
.badge-info    { background: rgba(59,130,246,.15); color: #3b82f6; border: 1px solid rgba(59,130,246,.3); }

/* ============ MODAL PREMIUM ============ */
.modal-overlay {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  animation: fadeIn .2s ease-out;
}

.modal {
  background: #161a26;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
  animation: slideUp .25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.modal-header {
  border-bottom: 1px solid var(--border-subtle);
  padding: 18px 22px;
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 22px; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--border-subtle); display: flex; gap: 10px; justify-content: flex-end; }

/* ============ FORM INPUTS PREMIUM ============ */
.form-group input,
.form-group select,
.form-group textarea {
  background: #0f1320;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
  color: #e5e7eb;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ============ TABLE PREMIUM ============ */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #1a1f2e;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.table thead th {
  background: #0f1320;
  color: var(--text-muted);
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
}

.table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.table-wrap { border-radius: 12px; overflow-x: auto; }

/* ============ SIDEBAR PREMIUM ============ */
.sidebar {
  background: linear-gradient(180deg, #0f1320 0%, #0a0d17 100%);
  border-right: 1px solid var(--border-subtle);
}

.nav-item {
  padding: 10px 16px;
  border-radius: 10px;
  margin: 2px 8px;
  transition: all .15s;
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary, #9ca3af);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #fff);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.05));
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px var(--accent);
}

.nav-item .icon { font-size: 17px; }

/* ============ EMPTY STATE PREMIUM ============ */
.empty-state {
  text-align: center;
  padding: 60px 30px;
  color: var(--text-muted);
}
.empty-state .icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: .5;
}
.empty-state h3 { color: var(--text); font-size: 18px; margin-bottom: 8px; }
.empty-state p { font-size: 14px; line-height: 1.6; max-width: 420px; margin: 0 auto; }

/* ============ TOAST PREMIUM ============ */
.toast {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: toastIn .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 3px solid var(--accent);
  background: #1a1f2e;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-left-color: var(--accent); color: var(--accent); }
.toast-error { border-left-color: #ef4444; color: #fca5a5; }
.toast-warn { border-left-color: #f59e0b; color: #fcd34d; }

@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ============ PAGE HEADER PREMIUM ============ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}

/* ============ FADE IN ============ */
.fade-in { animation: fadeIn .25s ease-out; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .del-kanban { grid-template-columns: repeat(6, 75vw); }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .del-kanban { grid-template-columns: repeat(6, 85vw); gap: 10px; }
  .del-kanban-col { min-height: 300px; }
  .del-order-card { padding: 10px 12px; }
  .modal { border-radius: 12px 12px 0 0; }
}

/* ============ SCROLLBAR GLOBAL ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(16,185,129,.4); }
