/* ==================================
   KITCHEN G - COMMON DESIGN
================================== */

:root {
  --primary: #e85d04;
  --primary-dark: #c94b00;
  --secondary: #263238;
  --background: #f5f6f8;
  --surface: #ffffff;
  --text: #263238;
  --muted: #70777d;
  --border: #e2e5e9;
  --success: #16803c;
  --danger: #c62828;
  --radius: 12px;
  --shadow: 0 3px 14px rgba(0, 0, 0, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, "Noto Sans Devanagari", sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

[hidden] {
  display: none !important;
}

/* ==================================
   HEADER
================================== */

header {
  background: var(--surface);
  box-shadow: var(--shadow);
}

.admin-header,
header:not(.admin-header) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 5%;
}

.admin-brand h1,
header h1 {
  margin: 0;
  color: var(--primary);
}

.admin-brand p {
  margin: 3px 0 0;
  color: var(--muted);
}

.back-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: bold;
}

/* ==================================
   PAGE CONTAINERS
================================== */

.admin-container,
main {
  width: min(1100px, 94%);
  margin: 25px auto;
}

.admin-card,
.admin-welcome,
.management-section,
.summary-card,
.product-card,
.cart-box,
.profile-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 18px;
}

.admin-card {
  max-width: 450px;
  margin: 35px auto;
}

.admin-card h2 {
  margin-top: 0;
  color: var(--secondary);
}

/* ==================================
   FORMS
================================== */

label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 600;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.12);
}

textarea {
  min-height: 90px;
  resize: vertical;
}

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

button,
.primary-button {
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  padding: 11px 17px;
  font-weight: 600;
  transition: background 0.2s ease;
}

button:hover,
.primary-button:hover {
  background: var(--primary-dark);
}

#adminLogoutBtn {
  background: var(--secondary);
}

#adminLogoutBtn:hover {
  background: #111b20;
}

/* ==================================
   ADMIN DASHBOARD
================================== */

.dashboard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
}

.dashboard-heading h2 {
  margin-bottom: 3px;
}

.dashboard-heading p {
  margin-top: 0;
  color: var(--muted);
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.summary-card {
  text-align: center;
  margin: 0;
  border-top: 4px solid var(--primary);
}

.summary-card h3 {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

.summary-card p {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary);
  margin: 8px 0 0;
}

/* ==================================
   ADMIN MODULE BUTTONS
================================== */

.admin-modules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 22px 0;
}

.admin-modules button {
  min-height: 65px;
  background: var(--surface);
  color: var(--secondary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.admin-modules button:hover {
  background: var(--primary);
  color: white;
}

.management-section {
  margin-top: 20px;
  min-height: 180px;
}

.management-section h3 {
  margin-top: 0;
  color: var(--primary);
}

/* ==================================
   MESSAGES
================================== */

.message {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
}

/* ==================================
   CUSTOMER PRODUCT GRID
================================== */

.product-grid,
#productList {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.product-card {
  overflow: hidden;
  padding: 12px;
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.product-card h3 {
  margin-bottom: 5px;
}

.product-card p {
  color: var(--muted);
}

/* ==================================
   CART AND CHECKOUT
================================== */

.cart-box {
  margin-top: 20px;
}

.cart-total {
  font-size: 22px;
  font-weight: bold;
  color: var(--primary);
}

/* ==================================
   TABLES AND LISTS
================================== */

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: #fff1e8;
}

/* ==================================
   RESPONSIVE MOBILE DESIGN
================================== */

@media (max-width: 768px) {
  .admin-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-modules {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid,
  #productList {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-container,
  main {
    width: 94%;
  }
}

@media (max-width: 480px) {
  .admin-header,
  header:not(.admin-header) {
    padding: 12px;
  }

  .dashboard-heading {
    align-items: flex-start;
  }

  .admin-modules {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .admin-modules button {
    padding: 10px 6px;
    font-size: 13px;
  }

  .product-grid,
  #productList {
    grid-template-columns: 1fr;
  }

  .summary-card {
    padding: 13px 8px;
  }

  .summary-card p {
    font-size: 23px;
  }
}
