/* ==========================================
   LITTOS BURGUER ADMIN PREMIUM STYLESHEET
   ========================================== */

:root {
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-tertiary: #18181c;
  
  --accent-color: #e2b13c;
  --accent-glow: rgba(226, 177, 60, 0.15);
  --accent-hover: #f0c354;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --border-color: rgba(255, 255, 255, 0.06);
  --border-focus: rgba(226, 177, 60, 0.4);
  
  --success: #10b981;
  --danger: #ef4444;
  
  --sidebar-width: 280px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 8px 30px rgba(226, 177, 60, 0.12);
  
  --font-heading: 'Outfit', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
}

/* ==========================================
   LAYOUT SHELL
   ========================================== */

.admin-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

/* Sidebar styling */
.admin-sidebar {
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-brand .logo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #d4a017, #f3c64f);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 24px;
  box-shadow: 0 4px 15px rgba(212, 160, 23, 0.3);
}

.admin-brand h1 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.admin-brand p {
  font-size: 12px;
  color: var(--text-secondary);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-nav button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  font-family: var(--font-body);
  font-weight: 500;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-nav button i {
  font-size: 18px;
  color: var(--text-muted);
  transition: color 0.2s ease;
  width: 20px;
  text-align: center;
}

.sidebar-nav button:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: #fff;
}

.sidebar-nav button:hover i {
  color: var(--accent-color);
}

.sidebar-nav button.active {
  background-color: var(--accent-glow);
  color: var(--accent-color);
  font-weight: 600;
}

.sidebar-nav button.active i {
  color: var(--accent-color);
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.sidebar-footer p:first-of-type {
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  margin-bottom: 6px;
}

.sidebar-footer p:last-of-type {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Main Area styling */
.admin-main {
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow-y: auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.admin-header h2 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: #fff;
  margin-bottom: 6px;
}

.admin-header p {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 700px;
  line-height: 1.5;
}

/* ==========================================
   TABS SYSTEM
   ========================================== */

.tabs {
  display: none; /* Ocultamos los tabs de arriba porque ya tenemos el sidebar izquierdo */
}

/* Animaciones */
.tab-section {
  display: none;
  animation: tabFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tab-section.active {
  display: block;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  border: none;
  background-color: var(--accent-color);
  color: #0b0b0d;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn i {
  font-size: 16px;
}

.btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(226, 177, 60, 0.25);
}

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

.btn.secondary {
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn.secondary:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Alert styling */
.alert {
  padding: 16px 24px;
  border-radius: var(--radius-md);
  background-color: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
}

.alert i {
  color: var(--success);
  font-size: 18px;
}

/* ==========================================
   CARDS & GRIDS
   ========================================== */

.grid-2 {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}

.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.card h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.card-header h3 {
  margin-bottom: 0;
}

.card-header .badge {
  background-color: rgba(255, 255, 255, 0.04);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* ==========================================
   PRODUCTS TABLE
   ========================================== */

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.product-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.product-table th {
  background-color: rgba(255, 255, 255, 0.01);
  padding: 16px 20px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  font-family: var(--font-heading);
  color: var(--accent-color);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.product-table td {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.product-table tr:last-child td {
  border-bottom: none;
}

.product-table tbody tr {
  transition: background-color 0.2s ease;
}

.product-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.01);
}

.product-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.product-image {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-table tr:hover .product-image img {
  transform: scale(1.06);
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-info strong {
  font-size: 15.5px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.product-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.product-badge i {
  color: var(--accent-color);
  font-size: 12px;
}

.category-pill {
  display: inline-block;
  padding: 6px 12px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.price-text {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.btn-action {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action i {
  font-size: 14px;
}

.btn-action.edit:hover {
  background-color: rgba(226, 177, 60, 0.1);
  color: var(--accent-color);
  border-color: rgba(226, 177, 60, 0.3);
}

.btn-action.delete:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ==========================================
   FORMS & INPUTS
   ========================================== */

.modern-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group > span {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

input[type=text],
input[type=number],
input[type=url],
textarea,
select {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.25s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

input:hover,
textarea:hover,
select:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px var(--accent-glow);
  background-color: rgba(24, 24, 28, 0.8);
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

/* Select wrapper for arrow styling */
.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 44px;
}

.select-wrapper::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 12px;
  color: var(--text-secondary);
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  transition: color 0.2s ease;
}

.select-wrapper:hover::after {
  color: #fff;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

/* ==========================================
   CUSTOM INTERACTIVE DROPZONE
   ========================================== */

.upload-dropzone {
  position: relative;
  width: 100%;
  min-height: 180px;
  border: 2px dashed rgba(226, 177, 60, 0.2);
  border-radius: var(--radius-lg);
  background-color: rgba(255, 255, 255, 0.01);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.upload-dropzone:hover {
  border-color: var(--accent-color);
  background-color: rgba(226, 177, 60, 0.03);
}

.upload-dropzone.dragover {
  border-color: var(--accent-hover);
  background-color: rgba(226, 177, 60, 0.08);
  transform: scale(0.99);
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  transition: all 0.2s ease;
}

.upload-content i {
  font-size: 40px;
  color: var(--accent-color);
  margin-bottom: 4px;
  transition: transform 0.2s ease;
}

.upload-dropzone:hover .upload-content i {
  transform: translateY(-4px);
}

.upload-content .main-text {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.upload-content .main-text span {
  color: var(--accent-color);
  font-weight: 700;
  text-decoration: underline;
}

.upload-content .sub-text {
  font-size: 12px;
  color: var(--text-muted);
}

/* Image preview styling in dropzone */
.upload-dropzone img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #0d0d0f;
  z-index: 2;
  border-radius: var(--radius-lg);
}

.upload-dropzone.has-image {
  border-style: solid;
  border-color: var(--border-color);
}

/* Remove button */
.btn-remove-preview {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background-color: rgba(0, 0, 0, 0.7);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.2s ease;
}

.btn-remove-preview:hover {
  background-color: var(--danger);
  color: #fff;
  transform: scale(1.1);
}

.btn-remove-preview i {
  font-size: 20px;
}

/* ==========================================
   CONFIG CARD EXTRA
   ========================================== */

.config-card .card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 28px;
  padding-bottom: 20px;
}

.config-card .card-header h3 i {
  color: var(--accent-color);
  margin-right: 8px;
}

.config-card .card-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ==========================================
   ORDERS LOGS
   ========================================== */

.order-card .card-header {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 30px;
}

.order-card .card-header h3 i {
  color: var(--accent-color);
  margin-right: 8px;
}

.order-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  background-color: rgba(255, 255, 255, 0.01);
  text-align: center;
}

.order-empty i {
  font-size: 56px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.order-empty h4 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.order-empty p {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 440px;
  line-height: 1.5;
}

/* ==========================================
   GLASSMORPHIC MODAL OVERLAY
   ========================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-card {
  width: 100%;
  max-width: 650px;
  background-color: var(--bg-secondary) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--radius-xl) !important;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7) !important;
  display: flex;
  flex-direction: column;
  padding: 36px !important;
  animation: modalSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.modal-header h3 {
  margin-bottom: 0;
}

.modal-header h3 i {
  color: var(--accent-color);
  margin-right: 8px;
}

.btn-close-modal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close-modal:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: rotate(90deg);
}

.btn-close-modal i {
  font-size: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 28px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* ==========================================
   RESPONSIVENESS
   ========================================== */

@media (max-width: 1200px) {
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 992px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  
  .admin-sidebar {
    height: auto;
    position: relative;
    padding: 24px;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  
  .sidebar-nav {
    flex-direction: row;
    width: auto;
    gap: 8px;
  }
  
  .sidebar-nav button {
    width: auto;
    padding: 10px 16px;
    font-size: 13.5px;
  }
  
  .sidebar-footer {
    display: none;
  }
  
  .admin-main {
    padding: 30px 24px;
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    justify-content: center;
    gap: 16px;
  }
  
  .admin-brand {
    width: 100%;
    justify-content: center;
  }
  
  .sidebar-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .admin-header .header-actions {
    width: 100%;
  }
  
  .admin-header .header-actions .btn {
    width: 100%;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* Visually Hidden Class for Accessible and Active Form Inputs */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

