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

:root {
  --bg-color: #F9FAFB;
  --surface: #FFFFFF;
  --surface-hover: #F3F4F6;
  --primary: #90CD1D;
  --primary-hover: #7baf17;
  --text-main: #111827;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --success: #10B981;
  --danger: #ef4444;
  --radius: 16px;
}

[data-theme="dark"] {
  --bg-color: #111827;
  --surface: #1f2937;
  --surface-hover: #374151;
  --primary: #90CD1D;
  --primary-hover: #7baf17;
  --text-main: #F9FAFB;
  --text-muted: #9ca3af;
  --border: #4b5563;
  --success: #10B981;
  --danger: #ef4444;
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }
body { background: var(--bg-color); color: var(--text-main); display: flex; justify-content: center; min-height: 100vh; overflow-x: hidden; }

/* Toast */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--surface); color: var(--text-main); padding: 12px 20px; border-radius: 8px; font-weight: 500; display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5); transform: translateY(20px); opacity: 0; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-left: 4px solid var(--primary); }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.show { transform: translateY(0); opacity: 1; }

.app-container { width: 100%; max-width: 480px; padding: 20px; padding-bottom: 80px; margin: 0 auto; display: flex; flex-direction: column; transition: max-width 0.3s; }
.app-container.dashboard-view { max-width: 1000px; }

header { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--surface-hover); margin-bottom: 24px; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary); letter-spacing: -0.5px; }
header button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
header button:hover { color: var(--danger); }

/* Forms & Inputs */
.auth-box { background: var(--surface); padding: 32px 24px; border-radius: var(--radius); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.5); margin-top: 10vh; }
.auth-box h1 { font-size: 1.8rem; margin-bottom: 8px; }
.auth-box p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
input.input-control { width: 100%; padding: 14px 16px; background: rgba(0,0,0,0.2); border: 1px solid var(--surface-hover); border-radius: 8px; color: var(--text-main); font-size: 1rem; outline: none; transition: border-color 0.2s; }
input.input-control:focus { border-color: var(--primary); }

.radio-group { display: flex; gap: 12px; }
.radio-card { flex: 1; padding: 16px; border: 2px solid var(--surface-hover); border-radius: 12px; cursor: pointer; transition: all 0.2s; text-align: center; }
.radio-card input { display: none; }
.radio-card .title { display: block; font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.radio-card .desc { display: block; font-size: 0.75rem; color: var(--text-muted); }
.radio-card.selected { border-color: var(--primary); background: rgba(245, 158, 11, 0.1); }

/* Buttons */
.btn-primary { width: 100%; background: var(--primary); color: #fff; border: none; padding: 14px; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s, transform 0.1s; display: flex; justify-content: center; align-items: center; gap: 8px; }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary { width: 100%; background: transparent; color: var(--text-main); border: 1px solid var(--surface-hover); padding: 14px; border-radius: 8px; font-size: 1rem; font-weight: 500; cursor: pointer; transition: all 0.2s; margin-top: 12px; }
.btn-secondary:hover { background: var(--surface-hover); }

.btn-outline-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); padding: 12px; border-radius: 8px; font-weight: 600; cursor: pointer; width: 100%; transition: all 0.2s; }
.btn-outline-danger:hover { background: rgba(239, 68, 68, 0.1); }

/* Text Links */
.toggle-text { text-align: center; margin-top: 24px; color: var(--text-muted); font-size: 0.9rem; }
.toggle-text span { color: var(--primary); cursor: pointer; font-weight: 600; }
.toggle-text span:hover { text-decoration: underline; }

/* Dashboard Cards */
.dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.dashboard-grid.partner-layout { grid-template-columns: 1fr; }

@media (min-width: 768px) {
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid.partner-layout { grid-template-columns: 2fr 1fr; }
}
.card { background: var(--surface); padding: 24px; border-radius: var(--radius); margin-bottom: 20px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3); }
.card h2 { font-size: 1.2rem; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.badge { font-size: 0.75rem; padding: 4px 8px; border-radius: 4px; font-weight: 600; background: var(--surface-hover); }
.badge.success { background: rgba(16, 185, 129, 0.2); color: var(--success); }

/* Checkboxes */
.menu-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.menu-item-checkbox {
  position: relative;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--surface-hover);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.menu-item-checkbox input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.menu-item-checkbox:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-muted);
}

.menu-item-checkbox.checked {
  background: rgba(245, 158, 11, 0.05);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.menu-item-checkbox .checkbox-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s;
}

.menu-item-checkbox.checked .checkbox-icon {
  background: var(--primary);
  border-color: var(--primary);
}

.menu-item-checkbox.checked .checkbox-icon::after {
  content: '';
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.menu-item-label {
  font-size: 0.95rem;
  font-weight: 500;
  flex: 1;
}

.menu-item-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.menu-item-checkbox.checked .menu-item-badge {
  background: rgba(245, 158, 11, 0.2);
  color: var(--primary);
}

.add-item-form {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  border-top: 1px dashed var(--surface-hover);
  padding-top: 24px;
}

.add-item-form input { flex: 1; }
.add-item-form button { width: auto; padding: 0 20px; white-space: nowrap; }

.publish-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 20px;
  border-radius: var(--radius);
  margin-top: 24px;
}

.publish-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.publish-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.stat-box { background: var(--surface); padding: 20px; border-radius: 12px; text-align: center; }
.stat-box .num { font-size: 2rem; font-weight: 700; color: var(--text-main); line-height: 1; margin-bottom: 4px; }
.stat-box.accept .num { color: var(--success); }
.stat-box.skip .num { color: var(--text-muted); }
.stat-box .label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }

/* Customer UI */
.menu-display { background: rgba(0,0,0,0.2); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.menu-display ul { list-style: none; }
.menu-display li { padding: 8px 0; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--surface-hover); }
.menu-display li:last-child { border-bottom: none; }
.menu-display li svg { color: var(--primary); }

.decision-actions { display: flex; gap: 12px; }
.status-card { text-align: center; padding: 24px; border-radius: 12px; }
.status-card.accepted { background: rgba(16, 185, 129, 0.1); border: 1px solid var(--success); color: var(--success); }
.status-card.skipped { background: rgba(148, 163, 184, 0.1); border: 1px solid var(--text-muted); color: var(--text-muted); }

.history-item { display: flex; justify-content: space-between; align-items: center; padding: 16px; background: rgba(0,0,0,0.2); border-radius: 8px; margin-bottom: 8px; }
.history-item h4 { font-size: 1rem; margin-bottom: 4px; }
.history-item p { font-size: 0.8rem; color: var(--text-muted); }

[v-cloak] { display: none; }

.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  list-style: none;
  padding: 0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}
.suggestions-dropdown li {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.suggestions-dropdown li:last-child {
  border-bottom: none;
}
.suggestions-dropdown li:hover {
  background: rgba(255, 255, 255, 0.05);
}
