/* NotWasted Customer App - Editorial Style */
/* Inspired by Sutéra - minimalist, typography-driven */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --black: #0A0A0A;
  --white: #FFFFFF;
  --gray-100: #F5F5F5;
  --gray-200: #E5E5E5;
  --gray-400: #A3A3A3;
  --gray-600: #525252;
  --accent: #16A34A;
  --accent-light: #DCFCE7;
  --danger: #DC2626;
  --warning: #F59E0B;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
.font-display {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.font-mono {
  font-family: 'Space Grotesk', monospace;
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* Utility */
.hidden { display: none !important; }

/* ========== LOGIN SCREEN ========== */
#loginScreen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--white);
}

.login-header {
  padding: 60px 32px 40px;
  border-bottom: 1px solid var(--gray-200);
}

.login-year {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
  margin-bottom: 24px;
}

.login-logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 12px;
}

.login-logo-text span {
  color: var(--accent);
}

.login-etymology {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
}

.login-etymology .arrow {
  color: var(--accent);
  font-weight: 600;
}

.login-form {
  padding: 40px 32px;
  flex: 1;
}

.login-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.input {
  width: 100%;
  padding: 16px 0;
  border: none;
  border-bottom: 1px solid var(--gray-200);
  background: transparent;
  color: var(--black);
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  margin-bottom: 24px;
  transition: border-color 0.3s ease;
}

.input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.input::placeholder {
  color: var(--gray-400);
}

.btn-primary {
  width: 100%;
  padding: 18px 24px;
  background: var(--black);
  color: var(--white);
  border: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 8px;
}

.btn-primary:hover {
  background: var(--accent);
}

.btn-secondary {
  width: 100%;
  padding: 18px 24px;
  background: transparent;
  color: var(--black);
  border: 1.5px solid var(--gray-200);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.btn-secondary:hover {
  border-color: var(--black);
}

.login-divider {
  margin: 32px 0;
  border-top: 1px solid var(--gray-200);
}

.login-test-label {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.btn-test {
  width: 100%;
  padding: 14px 24px;
  background: transparent;
  color: var(--black);
  border: 1.5px solid var(--gray-200);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-test:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========== MAIN APP ========== */
#mainApp {
  min-height: 100vh;
  padding-bottom: 80px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  height: 36px;
  width: auto;
}

.location-text {
  display: flex;
  flex-direction: column;
}

.location-label {
  font-size: 11px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.location {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
}

.logout-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.3s ease;
}

.logout-btn:hover {
  color: var(--accent);
}

/* Screens */
.screen {
  display: none;
  padding: 24px;
}

.screen.active {
  display: block;
}

.screen-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

/* Search */
.search-bar {
  position: relative;
  margin-bottom: 24px;
}

.search-icon {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 14px;
}

.search-input {
  width: 100%;
  padding: 12px 0 12px 28px;
  border: none;
  border-bottom: 1px solid var(--gray-200);
  background: transparent;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.search-input::placeholder {
  color: var(--gray-400);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* Section Headers */
.section-header {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

/* Listings Grid */
.listings-grid {
  display: grid;
  gap: 1px;
  background: var(--gray-200);
}

.listing-card {
  background: var(--white);
  padding: 20px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 16px;
  align-items: center;
  cursor: pointer;
  transition: background 0.3s ease;
}

.listing-card:hover {
  background: var(--gray-100);
}

.listing-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.listing-info h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.listing-info .vendor {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.listing-info .distance {
  font-size: 12px;
  color: var(--gray-400);
}

.listing-price {
  text-align: right;
}

.listing-price .current {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.listing-price .original {
  font-size: 13px;
  color: var(--gray-400);
  text-decoration: line-through;
}

.listing-price .discount {
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  display: inline-block;
}

/* Inline favorite button on listing card */
.favorite-btn-inline {
  position: absolute;
  top: 4px;
  right: 4px;
  background: none;
  border: none;
  color: var(--gray-400);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s ease;
  z-index: 2;
}
.favorite-btn-inline .fas { color: var(--danger); }
.favorite-btn-inline:hover { color: var(--danger); }

/* Map Screen */
.map-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-select {
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--black);
  cursor: pointer;
}

.filter-btn-surprise {
  padding: 10px 16px;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 100px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-around;
  padding: 12px 0 16px;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  transition: color 0.3s ease;
}

.nav-item.active,
.nav-item:hover {
  color: var(--black);
}

.nav-icon {
  font-size: 18px;
}

.nav-item span:last-child {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 500;
}

/* Orders */
.orders-grid {
  display: grid;
  gap: 1px;
  background: var(--gray-200);
}

.order-card {
  background: var(--white);
  padding: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.order-card:last-child {
  border-bottom: none;
}

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

.order-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-400);
}

.order-status {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 100px;
}

.order-status.pending {
  background: var(--accent-light);
  color: var(--accent);
}

.order-status.confirmed {
  background: var(--gray-100);
  color: var(--gray-600);
}

.order-status.completed {
  background: var(--black);
  color: var(--white);
}

.order-details h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.order-details .vendor {
  font-size: 13px;
  color: var(--gray-600);
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

.order-total {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.order-date {
  font-size: 12px;
  color: var(--gray-400);
}

/* Profile */
.profile-header {
  text-align: center;
  padding: 40px 0;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 24px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: var(--gray-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
}

.profile-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-phone {
  font-size: 14px;
  color: var(--gray-600);
}

.profile-menu {
  list-style: none;
}

.profile-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-200);
  cursor: pointer;
  transition: padding 0.3s ease;
}

.profile-menu-item:hover {
  padding-left: 12px;
}

.profile-menu-item span {
  font-size: 15px;
}

.profile-menu-item .arrow {
  color: var(--gray-400);
  transition: transform 0.3s ease, color 0.3s ease;
}

.profile-menu-item:hover .arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  margin: 20px 0;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--gray-600);
}

/* No Deals Message */
.no-deals {
  padding: 40px 24px;
  text-align: center;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  margin: 20px 0;
}

.no-deals-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--gray-600);
}

.no-deals-subtext {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 8px;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--gray-400);
  font-size: 14px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--black);
  color: var(--white);
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}