
/* =====================================================
   MUST FOOD MARKETPLACE
   Responsive design: Mobile, Tablet and Desktop
   ===================================================== */

* {
  box-sizing: border-box;
}

:root {
  --brand-dark: #104b30;
  --brand-green: #187746;
  --brand-light: #e6f5eb;
  --brand-pale: #f3f7f4;
  --orange: #ffbd35;
  --white: #ffffff;
  --text: #1c2b22;
  --muted: #718078;
  --border: #e0e9e2;
  --danger: #b42318;
  --success: #187746;
  --shadow: 0 5px 18px rgba(16, 75, 48, 0.07);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 20px;
}

body {
  margin: 0;
  background: var(--brand-pale);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

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

button {
  cursor: pointer;
}

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

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

[hidden] {
  display: none !important;
}

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

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 5%;
  background: var(--brand-dark);
  color: var(--white);
  border-bottom: 3px solid var(--orange);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--white);
  text-decoration: none;
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-icon {
  font-size: 25px;
}

.brand b {
  color: var(--orange);
}

.campus-label {
  color: #d7e9dd;
  font-size: 12px;
}

#accountBar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

#signedInLabel {
  max-width: 220px;
  overflow-wrap: anywhere;
  color: var(--white);
  font-size: 12px;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.primary-button {
  background: var(--orange);
  color: #183522;
}

.primary-button:hover {
  background: #ffd16b;
}

.secondary-button {
  background: var(--white);
  color: var(--brand-dark);
  border-color: var(--border);
}

.secondary-button:hover {
  background: var(--brand-light);
}

.primary-button:active,
.secondary-button:active {
  transform: scale(0.98);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* ================= GENERAL SECTIONS ================= */

main {
  width: 100%;
  min-height: 60vh;
}

.section {
  width: 100%;
  padding: 34px 5%;
  margin: 0 auto 18px;
}

section h2 {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.3;
}

section h3 {
  color: var(--brand-dark);
  line-height: 1.35;
}

section p {
  overflow-wrap: anywhere;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--brand-green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.3px;
}

.demo-note {
  color: var(--muted);
  font-size: 12px;
}

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

.demo-badge {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--brand-green);
  border-radius: 7px;
  color: var(--brand-green);
  font-size: 10px;
  font-weight: 700;
}

/* ================= HERO ================= */

.hero {
  padding: 55px 6% 62px;
  background: linear-gradient(
    135deg,
    #104b30,
    #187746 75%,
    #246f48
  );
  color: var(--white);
}

.hero .eyebrow {
  color: var(--orange);
}

.hero h1 {
  max-width: 760px;
  margin: 16px 0;
  color: var(--white);
  font-size: clamp(34px, 7vw, 58px);
  line-height: 1.12;
}

.hero h1 span {
  color: var(--orange);
}

.hero-text {
  max-width: 600px;
  margin: 0 0 20px;
  color: #e2f2e8;
  font-size: 16px;
}

/* ================= ROLE CARDS ================= */

#accountTypes {
  padding-top: 42px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.role-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 23px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.role-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(16, 75, 48, 0.12);
}

.role-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 12px;
  background: var(--brand-light);
  border-radius: 16px;
  font-size: 34px;
}

.role-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.role-card p {
  flex: 1;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.role-card .primary-button,
.role-card .secondary-button {
  width: 100%;
  margin-top: 9px;
}

/* ================= AUTHENTICATION ================= */

.auth-panel {
  max-width: 700px;
  margin: 20px auto;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

#backToRolesButton {
  margin-bottom: 22px;
}

#authTitle {
  margin-top: 8px;
}

#authDescription {
  color: var(--muted);
}

.filters {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 5px 0 16px;
}

.filter {
  flex-shrink: 0;
  min-height: 42px;
  padding: 9px 15px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 25px;
  color: var(--brand-dark);
  font-size: 13px;
}

.filter.active {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: var(--white);
  font-weight: 700;
}

#loginForm,
#registerForm,
#clientProfileForm {
  display: grid;
  gap: 10px;
}

label {
  display: block;
  margin-top: 5px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  background: var(--white);
  color: var(--text);
  border: 1px solid #d7dfd5;
  border-radius: 10px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #8bc49b;
  outline-offset: 1px;
}

input[readonly] {
  background: #f0f3f0;
  color: var(--muted);
}

textarea {
  resize: vertical;
}

#authMessage,
#orderMessage,
#myOrdersMessage,
#clientProfileMessage {
  overflow-wrap: anywhere;
  font-size: 13px;
}

#authMessage:empty,
#orderMessage:empty,
#myOrdersMessage:empty,
#clientProfileMessage:empty {
  display: none;
}

/* ================= CLIENT DASHBOARD ================= */

#clientDashboard {
  padding-top: 35px;
}

#clientWelcomeName {
  color: var(--brand-green);
  overflow-wrap: anywhere;
}

.dashboard-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 22px 0;
  padding: 4px 1px 12px;
}

.dashboard-tab {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 11px 15px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--brand-dark);
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-tab:hover {
  background: var(--brand-light);
}

.dashboard-tab.active {
  background: var(--brand-green);
  border-color: var(--brand-green);
  color: var(--white);
}

.client-panel {
  min-width: 0;
  margin-top: 18px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 17px;
  box-shadow: var(--shadow);
}

.client-panel > p:not(.eyebrow) {
  color: var(--muted);
}

/* ================= FOOD MENU ================= */

.meal-search {
  max-width: 520px;
  margin: 14px 0;
}

#mealList {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  margin-top: 15px;
}

.meal-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.meal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 9px 24px rgba(25, 55, 30, 0.12);
}

.meal-image {
  width: 100%;
  height: 185px;
  object-fit: cover;
  background: var(--brand-light);
}

.meal-emoji {
  display: grid;
  place-items: center;
  min-height: 135px;
  background: var(--brand-light);
  font-size: 58px;
}

.meal-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 16px;
}

.meal-type {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  background: var(--brand-light);
  border-radius: 20px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 700;
}

.meal-info h3 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.meal-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.meal-info strong {
  margin-top: auto;
  color: var(--brand-green);
  font-size: 19px;
  font-weight: 800;
}

.meal-info .primary-button {
  width: 100%;
  margin-top: 5px;
  background: var(--brand-green);
  color: var(--white);
}

.meal-info .primary-button:hover {
  background: var(--brand-dark);
}

/* ================= ORDER FORM ================= */

.order-panel,
#trackOrderSection {
  margin-top: 22px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

#orderForm,
#trackOrderForm {
  display: grid;
  gap: 11px;
}

#selectedMeal {
  padding: 12px;
  background: var(--brand-light);
  border-radius: 10px;
  color: var(--brand-dark);
  overflow-wrap: anywhere;
}

#orderMessage {
  overflow-wrap: anywhere;
}

/* ================= CLIENT ORDERS ================= */

.order-date-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  margin: 18px 0;
}

.order-date-filter label {
  grid-column: 1 / -1;
}

.order-date-filter input {
  min-width: 0;
}

.my-orders-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.order-card {
  min-width: 0;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow-wrap: anywhere;
}

.order-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.order-card p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 13px;
}

.order-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: var(--brand-light);
  border-radius: 20px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}

/* ================= PROFILE FORM ================= */

#clientProfileForm {
  max-width: 600px;
}

#clientProfileForm .primary-button {
  margin-top: 10px;
}

/* ================= FEATURES ================= */

.features {
  background: #e8f3eb;
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px 0;
  border-bottom: 1px solid #d5e5d9;
}

.feature-card:last-child {
  border-bottom: 0;
}

.feature-card > span {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: var(--white);
  border-radius: 14px;
  font-size: 27px;
}

.feature-card h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 16px;
}

.feature-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* ================= TRACKING ================= */

#trackOrderSection {
  max-width: 760px;
}

#trackOrderResult {
  margin-top: 16px;
  overflow-wrap: anywhere;
}

#trackOrderResult p {
  margin: 8px 0;
  padding: 10px 12px;
  background: var(--brand-light);
  border-radius: 8px;
  color: var(--brand-dark);
}

/* ================= FOOTER ================= */

footer {
  padding: 25px 5%;
  background: var(--brand-dark);
  border-top: 3px solid var(--orange);
  color: #d7e9dd;
  text-align: center;
  font-size: 12px;
}

footer p {
  margin: 5px;
}

/* ================= RESPONSIVE ================= */

@media (min-width: 1200px) {
  .section,
  .hero {
    padding-left: max(5%, calc((100% - 1150px) / 2));
    padding-right: max(5%, calc((100% - 1150px) / 2));
  }

  #mealList {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #mealList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  .topbar {
    padding: 12px 4%;
    gap: 9px;
  }

  .brand {
    font-size: 16px;
  }

  .brand-icon {
    font-size: 22px;
  }

  .campus-label {
    font-size: 10px;
  }

  #accountBar {
    gap: 5px;
  }

  #signedInLabel {
    max-width: 120px;
    font-size: 10px;
  }

  #accountBar .primary-button {
    min-height: 39px;
    padding: 8px 10px;
    font-size: 12px;
  }

  .hero {
    padding: 42px 5% 48px;
  }

  .hero h1 {
    font-size: clamp(32px, 9vw, 45px);
  }

  .hero-text {
    font-size: 14px;
  }

  .section {
    padding: 25px 4%;
  }

  .role-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .role-card {
    padding: 18px;
  }

  .role-card p {
    margin-bottom: 10px;
  }

  .auth-panel {
    width: 92%;
    padding: 19px;
  }

  .client-panel {
    padding: 15px;
  }

  .dashboard-nav {
    gap: 8px;
    margin: 15px 0;
  }

  .dashboard-tab {
    min-height: 43px;
    padding: 9px 12px;
    font-size: 12px;
  }

  #mealList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .meal-image {
    height: 115px;
  }

  .meal-emoji {
    min-height: 95px;
    font-size: 43px;
  }

  .meal-info {
    gap: 7px;
    padding: 10px;
  }

  .meal-info h3 {
    font-size: 15px;
  }

  .meal-info p {
    font-size: 12px;
  }

  .meal-info strong {
    font-size: 16px;
  }

  .meal-info .primary-button {
    min-height: 42px;
    padding: 8px 5px;
    font-size: 12px;
  }

  .order-panel,
  #trackOrderSection {
    padding: 15px;
  }

  .order-date-filter {
    grid-template-columns: 1fr 1fr;
  }

  .order-date-filter label,
  .order-date-filter input {
    grid-column: 1 / -1;
  }

  .order-date-filter button {
    width: 100%;
    padding: 9px;
    font-size: 12px;
  }

  .my-orders-list {
    grid-template-columns: 1fr;
  }

  .feature-card {
    gap: 11px;
  }

  footer {
    padding: 22px 4%;
  }
}

@media (max-width: 360px) {
  .campus-label {
    display: none;
  }

  #mealList {
    grid-template-columns: 1fr;
  }

  .meal-image {
    height: 180px;
  }

  .meal-info {
    padding: 14px;
  }

  .meal-info h3 {
    font-size: 17px;
  }

  .meal-info p {
    font-size: 13px;
  }
}

/* =====================================================
   AZAM MAX STYLE SPLASH SCREEN FOR BONGOFOODS
   ===================================================== */

.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #0e3b24 0%, #05160d 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 1;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.splash-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
}

/* Logo Zoom & Fade-in Animation */
.splash-logo-wrapper {
  margin-bottom: 18px;
  animation: splashZoomIn 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.6));
}

.splash-brand-title {
  color: #ffffff;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 2px;
  margin: 5px 0 0 0;
  opacity: 0;
  animation: splashFadeUp 0.7s ease forwards 0.4s;
}

.splash-brand-title span {
  color: #f59e0b;
}

.splash-subtitle {
  color: #a7f3d0;
  font-size: 15px;
  font-weight: 500;
  margin: 6px 0 0 0;
  letter-spacing: 0.5px;
  opacity: 0;
  animation: splashFadeUp 0.7s ease forwards 0.6s;
}

.splash-tagline {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  margin: 18px 0 0 0;
  letter-spacing: 1px;
  opacity: 0;
  animation: splashFadeUp 0.7s ease forwards 0.8s;
}

/* Azam Max Style Loading Spinner */
.splash-spinner {
  width: 32px;
  height: 32px;
  margin-top: 35px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #f59e0b;
  border-radius: 50%;
  opacity: 0;
  animation: splashSpin 0.9s linear infinite, splashFadeUp 0.5s ease forwards 1s;
}

/* Animations Keyframes */
@keyframes splashZoomIn {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes splashFadeUp {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splashSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
