/* ============================= */
/* GLOBAL RESET */
/* ============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ============================= */
/* AUTHENTICATION PAGES (index.html & register.html) */
/* ============================= */
.auth-page {
  min-height: 100vh;
  /* Original ScannoKart Gradient Background */
  background: radial-gradient(900px 500px at 20% 10%, rgba(79, 70, 229, 0.35), transparent),
              radial-gradient(900px 500px at 85% 65%, rgba(34, 197, 94, 0.22), transparent),
              #0b0f19;
  color: #eef2ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 20px;
}

.brand-center {
  text-align: center;
  max-width: 500px;
}

.brand-logo {
  width: min(360px, 75vw);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45);
  margin-bottom: 15px;
}

.brand-logo img {
  width: 100%;
  height: auto;
  display: block;
}

.brand-title {
  font-size: 34px;
  margin-bottom: 8px;
}

.brand-subtitle {
  font-size: 14px;
  color: rgba(238, 242, 255, 0.7);
  margin-bottom: 20px;
}

/* The Login/Register Card */
.login-card {
  width: min(420px, 92vw);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

.login-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

.login-header .material-icons { color: #4db6ac; font-size: 28px; }
.login-header h2 { font-size: 20px; }
.login-header p { font-size: 13px; color: rgba(238, 242, 255, 0.6); }

.login-form { display: grid; gap: 16px; }

.login-form label {
  font-size: 13px;
  color: rgba(238, 242, 255, 0.8);
  display: grid;
  gap: 8px;
  text-align: left;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
}

.input-wrap .material-icons { font-size: 20px; color: rgba(238, 242, 255, 0.4); }

.input-wrap input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
}

.login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.link { color: #4db6ac; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Buttons */
.primary-btn, .secondary-btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 13px;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  transition: 0.2s;
}

.primary-btn { background: #4f46e5; color: white; }
.primary-btn:hover { background: #4338ca; }

.secondary-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #eef2ff;
  text-decoration: none;
}
.secondary-btn:hover { background: rgba(255, 255, 255, 0.1); }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: rgba(255, 255, 255, 0.2);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.1); }

/* ============================= */
/* DASHBOARD PAGE */
/* ============================= */
.dashboard-page { background-color: #f4f6f5; color: #222; min-height: 100vh; }

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
  background-color: #fff;
  border-bottom: 1px solid #eee;
}

.nav-left { display: flex; align-items: center; gap: 12px; }
.logo-circle {
  background-color: #2bb39a; color: white;
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-weight: bold;
}
.logo-text { font-size: 18px; font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 15px; }
.user-avatar {
  width: 38px; height: 38px; background-color: #cde8e3;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold;
}

.container { max-width: 900px; margin: 40px auto; padding: 0 20px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }

.filter { padding: 8px 12px; border-radius: 8px; border: 1px solid #ddd; }

/* Modal & FAB Logic */
.modal-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
  justify-content: center; align-items: center; z-index: 3000;
}
.modal-content {
  background: white; padding: 30px; border-radius: 18px; width: min(400px, 90vw); color: #333;
}
.modal-content label { color: #374151; font-weight: 700; margin-bottom: 8px; display: block; }
.modal-content input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 15px; }

.fab-container { position: fixed; bottom: 30px; right: 30px; display: flex; flex-direction: column; align-items: flex-end; z-index: 2000; }
.fab-menu {
  display: none; flex-direction: column; gap: 10px; margin-bottom: 15px; margin-right: 45px;
}
.fab-menu.show { display: flex; }
.menu-item {
  background: white; border: none; padding: 12px 18px; border-radius: 10px;
  cursor: pointer; display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1); font-weight: bold; transform: translateX(-40px);
}

.fab-add { width: 60px; height: 60px; background: #2bb39a; color: white; border: none; border-radius: 50%; font-size: 32px; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.fab-help { position: fixed; bottom: 110px; right: 35px; width: 50px; height: 50px; background: #e0f2f1; color: #00897b; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; text-decoration: none; }

/* Pantry Items */
.pantry-item {
  background: white; padding: 15px 20px; margin-bottom: 10px; border-radius: 12px;
  display: flex; justify-content: space-between; align-items: center; border: 1px solid #eee;
}
.pantry-item-name { font-weight: bold; color: #333; }
.btn-delete { background: none; border: none; color: #ff5252; cursor: pointer; font-size: 1.2rem; }
