* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  background-attachment: fixed;
  color: #333;
  line-height: 1.5;
}

/* ===== Glass ===== */
.glass {
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.glass-strong {
  background: rgba(255,255,255,0.42);
  backdrop-filter: blur(22px) saturate(200%);
  -webkit-backdrop-filter: blur(22px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 14px;
}

/* ===== Auth ===== */
.auth-page {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-card {
  width: 100%; max-width: 340px;
  padding: 28px 22px;
}
.auth-title {
  text-align: center; margin-bottom: 22px;
  font-size: 22px; color: #4a3f6b;
}
.auth-switch { text-align: center; margin-top: 14px; }
.auth-switch a {
  font-size: 14px; color: #667eea; cursor: pointer;
  text-decoration: none;
}

/* ===== Layout ===== */
.app {
  max-width: 768px; margin: 0 auto;
  padding: 12px; min-height: 100vh; min-height: 100dvh;
  padding-bottom: 80px;
}

/* ===== Header ===== */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; margin-bottom: 12px;
  min-height: 44px;
}
.app-header h1 {
  font-size: 17px; font-weight: 600; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
  white-space: nowrap;
}
.header-actions {
  display: flex; align-items: center; gap: 14px;
}
.notif-btn, .logout-btn {
  font-size: 14px; color: rgba(255,255,255,0.9);
  cursor: pointer; position: relative; line-height: 1;
  display: flex; align-items: center;
}

/* ===== Bottom Nav ===== */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: space-around; align-items: stretch;
  padding: 6px 0; padding-bottom: max(6px, env(safe-area-inset-bottom));
  z-index: 100; max-width: 768px; margin: 0 auto;
  border-radius: 14px 14px 0 0;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; font-size: 10px; color: rgba(255,255,255,0.65);
  cursor: pointer; padding: 4px 2px; border: none; background: none;
  min-height: 48px; line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: #fff; }
.nav-icon { font-size: 20px; margin-bottom: 1px; }
.nav-label { font-weight: 500; }

/* ===== Cards ===== */
.dish-card {
  padding: 14px; margin-bottom: 10px; cursor: pointer;
  transition: transform 0.15s;
}
.dish-card:active { transform: scale(0.985); }
.dish-name {
  font-size: 16px; font-weight: 600; margin-bottom: 6px;
  line-height: 1.3;
}
.dish-meta {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 4px;
}
.detail-meta { margin-bottom: 10px; }
.meta-item {
  font-size: 12px; color: rgba(0,0,0,0.55);
  display: flex; align-items: center; line-height: 1;
}
.dish-desc {
  font-size: 13px; color: rgba(0,0,0,0.6);
  margin-top: 4px; margin-bottom: 8px;
  line-height: 1.4;
}
.dish-tags {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px;
}

/* ===== Tags ===== */
.tag {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 500; line-height: 1.4;
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(255,255,255,0.4);
  color: #4a3f6b; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.tag.active { background: rgba(102,126,234,0.45); color: #fff; }
.tag-sm { padding: 2px 8px; font-size: 11px; }

/* Tag bar with button */
.tag-bar {
  display: flex; align-items: center; gap: 6px;
  overflow-x: auto; padding: 0 0 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tag-bar::-webkit-scrollbar { display: none; }
.tag-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.4);
  font-size: 11px; font-weight: 500; color: #4a3f6b;
  background: rgba(255,255,255,0.5); cursor: pointer;
  white-space: nowrap; line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}

/* ===== Images ===== */
.dish-images {
  display: flex; gap: 6px; overflow-x: auto;
  margin-bottom: 10px; padding: 2px 0;
  -webkit-overflow-scrolling: touch;
}
.dish-images::-webkit-scrollbar { display: none; }
.dish-images img {
  width: 72px; height: 72px; object-fit: cover;
  border-radius: 10px; border: 2px solid rgba(255,255,255,0.4);
  flex-shrink: 0;
}
.upload-preview { margin-top: 8px; }

/* ===== Forms ===== */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 500;
  margin-bottom: 5px; color: rgba(0,0,0,0.65);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 10px; background: rgba(255,255,255,0.28);
  font-size: 15px; color: #333; outline: none;
  font-family: inherit; line-height: 1.4;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: rgba(102,126,234,0.5);
  background: rgba(255,255,255,0.45);
}
.form-group select { padding-right: 30px; }
.form-row { display: flex; gap: 10px; margin-bottom: 14px; }
.form-row .form-group { margin-bottom: 0; }
.flex-1 { flex: 1; }

/* Checkbox label */
.checkbox-label {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: #667eea;
  flex-shrink: 0; margin: 0;
}
.checkbox-label span {
  font-size: 13px; color: rgba(0,0,0,0.55); line-height: 1.3;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; line-height: 1.4;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { opacity: 0.85; }
.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; box-shadow: 0 3px 12px rgba(102,126,234,0.35);
}
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 8px; }
.btn-white {
  background: rgba(255,255,255,0.45); color: #4a3f6b;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-block { display: flex; width: 100%; }
.btn-top { margin-top: 14px; }

.btn-back {
  display: inline-flex; align-items: center;
  padding: 8px 14px; margin-bottom: 10px;
  border: none; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  background: rgba(255,255,255,0.45); color: #4a3f6b;
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* ===== Detail ===== */
.dish-detail { padding: 16px; }
.detail-title {
  font-size: 20px; font-weight: 700; margin-bottom: 10px;
  line-height: 1.3;
}
.detail-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
.btn-fav {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.35);
  font-size: 12px; font-weight: 500; color: #4a3f6b;
  background: rgba(255,255,255,0.45); cursor: pointer;
  font-family: inherit; line-height: 1.3;
  -webkit-tap-highlight-color: transparent;
}

/* ===== Steps ===== */
.section { margin-top: 16px; }
.section-title {
  font-size: 15px; font-weight: 600; margin-bottom: 10px;
  line-height: 1.3;
}
.section-label {
  display: block; font-size: 13px; font-weight: 500;
  margin-bottom: 6px; color: rgba(0,0,0,0.65);
}
.step-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.step-item:last-child { border-bottom: none; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; border-radius: 50%;
  background: rgba(102,126,234,0.45); color: #fff;
  font-size: 12px; font-weight: 600; flex-shrink: 0;
  line-height: 1;
}
.step-text { font-size: 14px; line-height: 1.5; flex: 1; }

.step-input {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px;
}
.step-index {
  min-width: 22px; height: 22px; border-radius: 50%;
  background: rgba(102,126,234,0.35); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; flex-shrink: 0;
  line-height: 1;
}
.step-input input {
  flex: 1; padding: 8px 12px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.28); font-size: 14px;
  font-family: inherit; line-height: 1.4; outline: none;
  -webkit-appearance: none;
}
.step-del {
  width: 28px; height: 28px; border-radius: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(239,68,68,0.2);
  color: rgba(239,68,68,0.5);
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  flex-shrink: 0; padding: 0;
  transition: all 0.2s;
}
.step-del:hover {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.4);
  color: rgba(239,68,68,0.9);
}
.steps-section { margin-top: 14px; }

/* ===== Reviews ===== */
.review-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.review-item:last-child { border-bottom: none; }
.review-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 3px;
}
.review-user { font-size: 13px; font-weight: 500; line-height: 1.3; }
.stars { color: #f5a623; font-size: 14px; line-height: 1; }
.review-text { font-size: 13px; color: rgba(0,0,0,0.65); line-height: 1.4; }

.review-form {
  padding: 12px; margin-top: 10px; border-radius: 12px;
}
.review-form-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.review-form-row label {
  font-size: 13px; font-weight: 500; color: rgba(0,0,0,0.65);
  flex-shrink: 0; line-height: 1;
}
.review-form-row select {
  padding: 6px 10px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.3); font-size: 14px;
  font-family: inherit; line-height: 1.3; outline: none;
  -webkit-appearance: none;
}
.review-form textarea {
  width: 100%; padding: 8px 12px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.28); font-size: 14px;
  font-family: inherit; line-height: 1.4; outline: none;
  resize: vertical; min-height: 56px; margin-bottom: 8px;
  -webkit-appearance: none;
}

/* ===== Order ===== */
.order-card { padding: 14px; margin-bottom: 10px; }
.order-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.order-creator { font-size: 14px; font-weight: 500; line-height: 1.3; }
.order-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 0; font-size: 14px; line-height: 1.3;
}
.order-item-name { flex: 1; }
.order-item-note { color: rgba(0,0,0,0.45); font-size: 12px; margin-left: 8px; }
.order-actions {
  display: flex; gap: 8px; margin-top: 10px;
}

/* ===== Wishes ===== */
.wish-card { padding: 14px; margin-bottom: 10px; }
.wish-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
}
.wish-name { font-size: 15px; font-weight: 600; line-height: 1.3; flex: 1; }
.wish-desc { font-size: 13px; color: rgba(0,0,0,0.55); margin-top: 4px; line-height: 1.4; }
.wish-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
}
.wish-user { font-size: 12px; color: rgba(0,0,0,0.45); }

/* ===== Status ===== */
.status-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px; border-radius: 10px;
  font-size: 11px; font-weight: 500; line-height: 1.3;
  white-space: nowrap;
}
.status-pending { background: rgba(255,193,7,0.35); color: #7a5900; }
.status-cooking { background: rgba(255,107,107,0.35); color: #8b0000; }
.status-done { background: rgba(76,175,80,0.35); color: #1b5e20; }

/* ===== Notifications ===== */
.notif-btn { position: relative; }
.notif-dot {
  position: absolute; top: -2px; right: -4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #ff4757;
}
.list-item {
  display: flex; align-items: center;
  padding: 12px 14px; margin-bottom: 8px;
  transition: background 0.15s;
}
.list-item.unread { background: rgba(255,255,255,0.35); }
.notif-content { flex: 1; }
.notif-text { font-size: 14px; font-weight: 500; line-height: 1.3; }
.notif-time { font-size: 11px; color: rgba(0,0,0,0.45); margin-top: 2px; }
.unread-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #667eea; flex-shrink: 0; margin-left: 10px;
}

/* ===== Search ===== */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; margin-bottom: 10px;
}
.search-bar input {
  flex: 1; background: transparent; border: none;
  font-size: 15px; color: #fff; outline: none;
  font-family: inherit; line-height: 1.4;
  -webkit-appearance: none;
}
.search-bar input::placeholder { color: rgba(255,255,255,0.55); }
.search-icon { font-size: 16px; flex-shrink: 0; }

/* ===== Check items ===== */
.check-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.check-item:last-child { border-bottom: none; }
.check-item input[type="checkbox"] {
  width: 20px; height: 20px; accent-color: #667eea;
  flex-shrink: 0; margin: 0;
}
.check-info { flex: 1; }
.check-name { font-size: 14px; font-weight: 500; line-height: 1.3; }
.check-time { font-size: 12px; color: rgba(0,0,0,0.45); }

/* ===== Upload ===== */
.upload-area {
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed rgba(255,255,255,0.35); border-radius: 12px;
  padding: 18px; text-align: center; cursor: pointer;
  color: rgba(0,0,0,0.55); font-size: 14px;
  transition: background 0.15s;
}
.upload-area:active { background: rgba(255,255,255,0.15); }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-content {
  width: 100%; max-width: 768px; max-height: 85vh; overflow-y: auto;
  padding: 18px 16px;
  border-radius: 16px 16px 0 0;
  -webkit-overflow-scrolling: touch;
}
.modal-title {
  font-size: 17px; font-weight: 600;
  margin-bottom: 14px; color: #4a3f6b;
  text-align: center;
}

/* ===== Empty ===== */
.empty { text-align: center; padding: 48px 20px; }
.empty-icon { font-size: 44px; margin-bottom: 10px; }
.empty p { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.4; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 0; height: 0; }
