/* ============================================
   ADMIN PANEL STYLES
   ============================================ */

/* LOGIN SCREEN */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f4a460, #e08040);
  padding: 20px;
}

.login-container {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 100%;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h1 {
  font-size: 32px;
  color: #2c1810;
  margin-bottom: 10px;
}

.login-header p {
  color: #666;
  font-size: 14px;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c1810;
  font-size: 14px;
}

.login-form input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.login-form input:focus {
  outline: none;
  border-color: #f4a460;
}

.btn-login {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #f4a460, #e08040);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.btn-login:hover {
  background: linear-gradient(135deg, #e08040, #c06030);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(244, 164, 96, 0.4);
}

.login-hint {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: #666;
  padding: 12px;
  background: #f5f5f5;
  border-radius: 8px;
}

/* ADMIN PANEL */
.admin-panel {
  min-height: 100vh;
  background: #f5f7fa;
}

/* ADMIN HEADER */
.admin-header {
  background: white;
  border-bottom: 1px solid #e0e0e0;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.admin-nav h2 {
  font-size: 24px;
  color: #2c1810;
  margin: 0;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-user {
  font-size: 14px;
  color: #666;
}

.btn-logout {
  padding: 10px 20px;
  background: #e63946;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: #d62828;
}

/* ADMIN CONTENT */
.admin-content {
  display: flex;
  min-height: calc(100vh - 70px);
}

/* SIDEBAR */
.admin-sidebar {
  width: 250px;
  background: white;
  border-right: 1px solid #e0e0e0;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
}

.sidebar-nav {
  flex: 1;
  padding: 0 15px;
}

.nav-btn {
  width: 100%;
  padding: 15px 20px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: #f5f5f5;
  color: #2c1810;
}

.nav-btn.active {
  background: linear-gradient(135deg, #f4a460, #e08040);
  color: white;
}

.sidebar-footer {
  padding: 0 15px;
  margin-top: 20px;
}

.btn-view-site {
  display: block;
  width: 100%;
  padding: 12px;
  background: #f5f5f5;
  color: #2c1810;
  text-align: center;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-view-site:hover {
  background: #e0e0e0;
}

/* MAIN CONTENT */
.admin-main {
  flex: 1;
  padding: 30px;
}

.admin-section {
  display: none;
}

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

.admin-section h2 {
  font-size: 28px;
  color: #2c1810;
  margin-bottom: 25px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.btn-add {
  padding: 12px 24px;
  background: linear-gradient(135deg, #3cb371, #2e8b57);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-add:hover {
  background: linear-gradient(135deg, #2e8b57, #228b22);
  transform: translateY(-2px);
}

/* STATS SIMPLE - JUST HEADINGS */
.stats-simple {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-item {
  background: white;
  padding: 30px 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-top: 4px solid #f4a460;
}

.stat-item:nth-child(2) {
  border-top-color: #3cb371;
}

.stat-item:nth-child(3) {
  border-top-color: #4169e1;
}

.stat-item:nth-child(4) {
  border-top-color: #e63946;
}

.stat-item h3 {
  font-size: 36px;
  font-weight: bold;
  color: #2c1810;
  margin: 0 0 10px 0;
}

.stat-item p {
  font-size: 14px;
  color: #666;
  margin: 0;
  font-weight: 500;
}

/* RECENT ORDERS */
.recent-orders {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.recent-orders h3 {
  font-size: 20px;
  color: #2c1810;
  margin-bottom: 15px;
}

/* PRODUCT FORM */
.product-form-container {
  background: white;
  padding: 30px;
  border-radius: 15px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-form-container h3 {
  font-size: 20px;
  color: #2c1810;
  margin-bottom: 25px;
}

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

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c1810;
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #f4a460;
}

.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.btn-save {
  padding: 12px 30px;
  background: linear-gradient(135deg, #3cb371, #2e8b57);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-save:hover {
  background: linear-gradient(135deg, #2e8b57, #228b22);
}

.btn-cancel {
  padding: 12px 30px;
  background: #e0e0e0;
  color: #2c1810;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-cancel:hover {
  background: #d0d0d0;
}

/* TABLES */
.products-table-container,
.orders-table-container {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.products-table,
.orders-table {
  width: 100%;
  border-collapse: collapse;
}

.products-table th,
.products-table td,
.orders-table th,
.orders-table td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
}

.products-table th,
.orders-table th {
  background: #f5f7fa;
  font-weight: 600;
  color: #2c1810;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.products-table td,
.orders-table td {
  color: #666;
  font-size: 14px;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-name {
  font-weight: 600;
  color: #2c1810;
}

.product-desc {
  font-size: 13px;
  color: #999;
  margin-top: 3px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge.bestseller {
  background: #ffd700;
  color: #2c1810;
}

.badge.new {
  background: #3cb371;
  color: white;
}

.badge.popular {
  background: #ff6b6b;
  color: white;
}

.status-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.status-badge.pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.preparing {
  background: #cfe2ff;
  color: #084298;
}

.status-badge.ready {
  background: #d1e7dd;
  color: #0f5132;
}

.status-badge.completed {
  background: #d3d3d3;
  color: #2c1810;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-edit,
.btn-delete,
.btn-view {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-edit {
  background: #cfe2ff;
  color: #084298;
}

.btn-edit:hover {
  background: #9ec5fe;
}

.btn-delete {
  background: #f8d7da;
  color: #842029;
}

.btn-delete:hover {
  background: #f1aeb5;
}

.btn-view {
  background: #e2e3e5;
  color: #2c1810;
}

.btn-view:hover {
  background: #d3d4d5;
}

.no-data {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-style: italic;
}

/* FILTER BUTTONS */
.filter-buttons {
  display: flex;
  gap: 10px;
}

.filter-btn {
  padding: 8px 16px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: #f4a460;
  color: #f4a460;
}

.filter-btn.active {
  background: linear-gradient(135deg, #f4a460, #e08040);
  border-color: #f4a460;
  color: white;
}

/* ORDER MODAL */
.order-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.order-modal.active {
  display: flex;
}

.order-modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.order-modal .modal-content {
  position: relative;
  background: white;
  border-radius: 20px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  z-index: 10000;
}

.order-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 30px;
  border-bottom: 1px solid #e0e0e0;
}

.order-modal .modal-header h2 {
  margin: 0;
  font-size: 22px;
  color: #2c1810;
}

.order-modal .modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f5f5f5;
  border: none;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.order-modal .modal-close:hover {
  background: #e0e0e0;
  transform: rotate(90deg);
}

.order-modal .modal-body {
  padding: 30px;
}

/* NOTIFICATION */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #3cb371;
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 99999;
  font-weight: 600;
  animation: slideInRight 0.3s ease;
}

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

/* RESPONSIVE */
@media (max-width: 1024px) {
  .admin-sidebar {
    width: 200px;
  }
  
  .stats-simple {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-content {
    flex-direction: column;
  }
  
  .admin-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }
  
  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    padding: 0 15px;
  }
  
  .nav-btn {
    white-space: nowrap;
    margin-right: 8px;
  }
  
  .sidebar-footer {
    display: none;
  }
  
  .admin-main {
    padding: 20px;
  }
  
  .stats-simple {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .filter-buttons {
    flex-wrap: wrap;
  }
  
  .products-table-container,
  .orders-table-container {
    overflow-x: auto;
  }
}
