:root {
  --forest: #1F4E3C;
  --forest-light: #2E6B54;
  --forest-lighter: #3F8067;
  --mint: #C8E6C9;
  --cream: #F8FAF8;
  --gold: #D4A058;
  --danger: #C84C4C;
  --warning: #E8A838;
  --text-dark: #2C332E;
  --shadow: 0 4px 20px rgba(31, 78, 60, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-light) 100%);
  min-height: 100vh;
  color: var(--text-dark);
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px;
  min-height: 100vh;
}

.hero {
  text-align: center;
  padding: 40px 20px 30px;
  color: white;
}

.logo {
  font-size: 48px;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 26px;
  font-weight: 700;
}

.tagline {
  opacity: 0.85;
  margin-top: 6px;
  font-size: 15px;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card h2, .card h3 {
  color: var(--forest);
  margin-bottom: 20px;
  text-align: center;
}

/* Tabs Auth */
.tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--mint);
}

.tab-btn {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 500;
  color: #777;
  cursor: pointer;
}

.tab-btn.active {
  color: var(--forest);
  border-bottom: 3px solid var(--forest);
  margin-bottom: -2px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--forest);
}

input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--mint);
  border-radius: 10px;
  font-size: 16px;
  transition: border 0.3s;
}

input:focus {
  outline: none;
  border-color: var(--forest);
}

input:disabled {
  background: #f0f0f0;
  cursor: not-allowed;
  color: #999;
}

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.btn:active { transform: scale(0.97); }
.btn:hover { opacity: 0.95; }

.btn-primary {
  background: linear-gradient(90deg, var(--forest) 0%, var(--forest-light) 100%);
  color: white;
}

.btn-secondary {
  background: var(--mint);
  color: var(--forest);
}

.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.error-msg {
  color: var(--danger);
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
}

.success-msg {
  color: var(--forest);
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
}

.link-primary {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
}

/* Dashboard Header */
.dashboard-header {
  color: white;
  margin-bottom: 20px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.logo-sm { font-size: 28px; }
.header-top h1 { font-size: 20px; }

.btn-login-link {
  color: white;
  background: rgba(255,255,255,0.2);
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-info span {
  font-size: 14px;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

/* Login Prompt */
.login-prompt {
  background: #FFF9E8;
  border: 1px solid var(--warning);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #856404;
  padding: 14px 18px;
}

.lock-icon-sm { font-size: 20px; }

.welcome-banner {
  background: #E8F5E9;
  border: 1px solid var(--forest-lighter);
  color: var(--forest);
  text-align: center;
  font-size: 14px;
  padding: 12px 18px;
}

/* Menu Grid */
.menu-card h3 { text-align: left; margin-bottom: 16px; }

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px;
  border-radius: 12px;
  background: var(--cream);
  border: 2px solid transparent;
  transition: all 0.25s;
  cursor: pointer;
  position: relative;
}

.menu-item.locked {
  opacity: 0.7;
}

.menu-item.locked:hover {
  background: #f0f0f0;
  border-color: #ddd;
}

.menu-item.unlocked {
  background: #E8F5E9;
  border-color: var(--forest-lighter);
  opacity: 1;
}

.menu-item.unlocked:hover {
  background: #C8E6C9;
  transform: translateY(-2px);
}

.menu-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.menu-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  text-align: center;
}

.menu-status {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 14px;
}

/* Store Card & Stats */
.store-card {
  text-align: center;
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-light) 100%);
  color: white;
}

.store-card h3 { color: white; font-size: 22px; margin-bottom: 6px; }
.store-id { opacity: 0.7; font-size: 13px; }

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

.stat-card { text-align: center; }
.stat-label { font-size: 13px; color: #666; margin-bottom: 6px; }
.stat-value { font-size: 20px; font-weight: 700; color: var(--forest); }

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h3 { margin-bottom: 0; }
.section-lock { font-size: 13px; color: var(--warning); font-weight: 500; }

.form-locked {
  opacity: 0.6;
  pointer-events: none;
}

.form-unlocked {
  opacity: 1;
  pointer-events: auto;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

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

.modal-content {
  background: white;
  padding: 32px 24px;
  border-radius: 16px;
  text-align: center;
  max-width: 340px;
  margin: 20px;
}

.modal-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.modal-content h3 {
  color: var(--forest);
  margin-bottom: 10px;
}

.modal-content p {
  color: #666;
  margin-bottom: 24px;
  font-size: 15px;
}

.modal-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-buttons .btn {
  font-size: 14px;
}

footer {
  text-align: center;
  color: rgba(255,255,255,0.7);
  padding: 30px 0 20px;
  font-size: 13px;
}
