/* === RÓ LANCHES — ADMIN.CSS === */

:root {
  --yellow: #F7C429;
  --red: #D42B2B;
  --green: #22C55E;
  --dark: #0C0C0C;
  --dark-2: #131313;
  --dark-3: #1A1A1A;
  --dark-4: #222;
  --dark-5: #2C2C2C;
  --white: #FFFFFF;
  --text-muted: #666;
  --text-dim: #999;
  --border: rgba(255,255,255,0.07);
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Nunito', sans-serif; background: var(--dark); color: var(--white); line-height: 1.6; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* ====== LOGIN ====== */
.login-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: radial-gradient(ellipse at top, rgba(247,196,41,0.08) 0%, transparent 60%), var(--dark);
}
.login-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 100%; max-width: 380px;
  display: flex; flex-direction: column; gap: 16px;
  text-align: center;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.login-logo { display: flex; justify-content: center; margin-bottom: 4px; }
.login-card h1 { font-size: 1.5rem; font-weight: 900; }
.login-card > p { color: var(--text-muted); font-size: 0.85rem; margin-top: -8px; }
.login-error {
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 700;
  display: none;
  background: rgba(212,43,43,0.1);
  padding: 8px;
  border-radius: 6px;
}

/* ====== LOGO ====== */
.logo-badge {
  display: flex; flex-direction: column; align-items: center;
  background: var(--yellow); color: var(--dark);
  padding: 4px 12px; border-radius: 8px; line-height: 1;
}
.logo-badge.small { padding: 3px 10px; }
.logo-ro { font-size: 1.3rem; font-weight: 900; }
.logo-lanches { font-size: 0.55rem; font-weight: 900; letter-spacing: 0.15em; text-transform: uppercase; }

/* ====== LAYOUT ====== */
.dashboard { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--dark-2);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 24px 0;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.sidebar-label { font-size: 0.7rem; font-weight: 900; color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 0 12px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-dim);
  text-align: left;
  transition: all 0.2s;
}
.nav-item:hover { background: var(--dark-3); color: var(--white); }
.nav-item.active { background: rgba(247,196,41,0.1); color: var(--yellow); }

.sidebar-footer {
  padding: 16px 12px 0;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.btn-site {
  display: block;
  text-align: center;
  padding: 8px;
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dim);
  transition: all 0.2s;
}
.btn-site:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-logout {
  padding: 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--red);
  background: rgba(212,43,43,0.08);
  transition: opacity 0.2s;
}
.btn-logout:hover { opacity: 0.7; }

.main { flex: 1; padding: 32px; overflow-y: auto; }

/* ====== PAGE HEADER ====== */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 28px; gap: 16px;
}
.page-header h2 { font-size: 1.5rem; font-weight: 900; }
.page-header > div > p { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }

/* ====== TABS ====== */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ====== FILTER BAR ====== */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-btn {
  padding: 6px 16px;
  border-radius: 50px;
  border: 1.5px solid var(--border);
  background: var(--dark-3);
  color: var(--text-dim);
  font-size: 0.82rem;
  font-weight: 800;
  transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover { background: var(--yellow); color: var(--dark); border-color: var(--yellow); }

/* ====== ITEMS GRID ====== */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.admin-item-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.admin-item-card:hover { border-color: rgba(247,196,41,0.25); }
.admin-item-card.disabled { opacity: 0.5; }

.admin-item-img {
  height: 100px;
  background: var(--dark-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.admin-item-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.admin-item-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--red); color: #fff;
  font-size: 0.6rem; font-weight: 900;
  padding: 2px 6px; border-radius: 4px;
}
.avail-dot {
  position: absolute; top: 8px; right: 8px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
}
.avail-dot.off { background: var(--red); }

.admin-item-body { padding: 12px; }
.admin-item-name { font-weight: 900; font-size: 0.9rem; margin-bottom: 4px; }
.admin-item-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 10px; min-height: 32px; }
.admin-item-price { color: var(--yellow); font-weight: 900; font-size: 1rem; margin-bottom: 10px; }
.admin-item-actions { display: flex; gap: 6px; }
.btn-edit {
  flex: 1; padding: 7px;
  background: var(--dark-4);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem; font-weight: 800;
  color: var(--white);
  transition: all 0.15s;
}
.btn-edit:hover { background: var(--yellow); color: var(--dark); border-color: var(--yellow); }
.btn-toggle {
  padding: 7px 10px;
  background: var(--dark-4);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem; font-weight: 800;
  transition: all 0.15s;
}
.btn-toggle.on { color: var(--green); }
.btn-toggle.off { color: var(--red); }
.btn-del {
  padding: 7px 10px;
  background: rgba(212,43,43,0.08);
  border: 1px solid rgba(212,43,43,0.15);
  border-radius: 6px;
  color: var(--red);
  font-size: 0.75rem; font-weight: 800;
  transition: all 0.15s;
}
.btn-del:hover { background: var(--red); color: #fff; }

/* ====== CONFIG ====== */
.config-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.config-card h3 { font-size: 1rem; font-weight: 900; margin-bottom: 16px; }
.config-info p { font-size: 0.88rem; color: var(--text-dim); margin-bottom: 6px; }
.config-info strong { color: var(--white); }
.danger-zone { border-color: rgba(212,43,43,0.2); }
.danger-zone h3 { color: var(--red); }
.danger-zone > p { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 16px; }

/* ====== HELP ====== */
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.help-card {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.help-icon { font-size: 2rem; margin-bottom: 10px; }
.help-card h3 { font-size: 0.95rem; font-weight: 900; margin-bottom: 8px; }
.help-card p { font-size: 0.82rem; color: var(--text-dim); line-height: 1.6; }

/* ====== FORMS ====== */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-group label { font-size: 0.78rem; font-weight: 800; color: var(--text-dim); letter-spacing: 0.02em; }
.form-group input, .form-group textarea, .form-group select {
  background: var(--dark-3);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--white);
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--yellow); }
.form-group select option { background: var(--dark-3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ====== BUTTONS ====== */
.btn-primary {
  background: var(--yellow); color: var(--dark);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 900; font-size: 0.9rem;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-cancel {
  background: var(--dark-4); color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700; font-size: 0.88rem;
  transition: all 0.2s;
}
.btn-cancel:hover { background: var(--dark-5); color: var(--white); }
.btn-danger {
  background: rgba(212,43,43,0.1);
  border: 1px solid rgba(212,43,43,0.3);
  color: var(--red);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 800; font-size: 0.88rem;
  transition: all 0.2s;
}
.btn-danger:hover { background: var(--red); color: #fff; }

/* ====== MODAL ====== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 16px;
  backdrop-filter: blur(6px);
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%; max-width: 520px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  animation: modalIn 0.25s ease;
}
.modal.modal-sm { max-width: 380px; }
@keyframes modalIn {
  from { transform: translateY(16px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1rem; font-weight: 900; }
.modal-body { flex: 1; overflow-y: auto; padding: 22px; }
.modal-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px;
}
.close-btn {
  width: 30px; height: 30px;
  background: var(--dark-4);
  border-radius: 6px; color: var(--text-dim);
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.close-btn:hover { background: var(--red); color: #fff; }

/* ====== TOAST ====== */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--dark-3);
  border: 1px solid rgba(247,196,41,0.3);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.85rem; font-weight: 700;
  z-index: 3000;
  animation: toastIn 0.25s ease;
}
@keyframes toastIn {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ====== IMG UPLOAD ====== */
.img-upload-area {
  position: relative;
  width: 100%;
  height: 140px;
  border: 2px dashed var(--border);
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s;
}
.img-upload-area:hover { border-color: rgba(247,196,41,0.4); }
#imgPlaceholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}
.img-remove-btn {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border-radius: 50%;
  width: 28px; height: 28px;
  font-size: 0.78rem;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  transition: background 0.2s;
}
.img-remove-btn:hover { background: var(--red); }

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { padding: 20px 16px; }
  .form-row { grid-template-columns: 1fr; }
}
