* { box-sizing: border-box; }
body { margin: 0; font-family: 'Poppins', sans-serif; background: #f5f2f8; color: #2b0f3a; }
.hidden { display: none !important; }

/* Passcode gate */
.gate { position: fixed; inset: 0; background: #4a1a6b; display: flex; align-items: center; justify-content: center; z-index: 100; }
.gate-box { background: #fff; padding: 40px; border-radius: 14px; text-align: center; width: 320px; }
.gate-box h2 { margin-top: 0; color: #4a1a6b; font-size: 20px; }
.gate-box input { width: 100%; padding: 10px; margin: 12px 0; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; }
.gate-box button { width: 100%; padding: 10px; background: #4a1a6b; color: #fff; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; }
.error-text { color: #b3273a; font-size: 13px; margin-top: 8px; min-height: 16px; }

/* Topbar */
.topbar { background: #4a1a6b; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 14px 26px; flex-wrap: wrap; gap: 10px; }
.topbar-title { font-weight: 800; font-size: 18px; }
.topbar nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-btn { background: transparent; border: 1px solid rgba(255,255,255,0.4); color: #fff; padding: 8px 14px; border-radius: 20px; cursor: pointer; font-weight: 600; font-size: 14px; }
.nav-btn.active { background: #fff; color: #4a1a6b; }

main { padding: 24px; max-width: 1500px; margin: 0 auto; }
.view h2 { color: #4a1a6b; }
.hint { color: #6b5b76; font-size: 14px; }
.hint-inline { color: #e08e2b; font-weight: 500; font-size: 12px; }

input[type="file"] { padding: 10px; background: #fff; border-radius: 8px; border: 1px dashed #a988c2; width: 100%; max-width: 420px; }

/* Review layout */
.day-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.day-tab { padding: 8px 16px; border-radius: 20px; border: 1px solid #a988c2; background: #fff; cursor: pointer; font-weight: 600; color: #4a1a6b; }
.day-tab.active { background: #4a1a6b; color: #fff; }

.review-grid { display: grid; grid-template-columns: 460px 1fr; gap: 24px; align-items: start; }
.review-editors { background: #fff; border-radius: 12px; padding: 18px; max-height: 82vh; overflow-y: auto; }
.editor-block { margin-bottom: 22px; }
.editor-block h3 { margin: 0 0 8px; color: #4a1a6b; font-size: 15px; }

.editor-row, .master-row, .thali-row { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.editor-row input, .master-row input { flex: 1; padding: 6px 8px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; min-width: 0; }
.editor-row .price-input, .master-row input[data-field="price"] { flex: 0 0 70px; }
.editor-row.needs-price { background: #fff4e0; border-radius: 6px; padding: 3px; }

.ref-box { background: #f5f2f8; border-radius: 8px; padding: 8px; margin-bottom: 8px; max-height: 140px; overflow-y: auto; }
.ref-label { font-size: 11px; color: #6b5b76; margin-bottom: 6px; }
.ref-chip { display: inline-block; margin: 2px; padding: 4px 8px; font-size: 12px; background: #e7e2ea; border: none; border-radius: 12px; cursor: pointer; color: #4a1a6b; }
.ref-chip:hover { background: #d6c6e5; }

.master-section { margin-bottom: 24px; background: #fff; padding: 14px; border-radius: 10px; }
.master-section h3 { margin-top: 0; color: #4a1a6b; }

.primary-btn { background: #4a1a6b; color: #fff; border: none; padding: 10px 18px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.secondary-btn { background: #e7e2ea; color: #4a1a6b; border: none; padding: 8px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.danger-btn { background: #fbe3e6; color: #b3273a; border: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.small { font-size: 12px; padding: 5px 10px; }
.action-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.status-text { color: #2f8a4b; font-size: 13px; font-weight: 600; }

.review-preview { background: #fff; border-radius: 12px; padding: 16px; overflow: auto; max-height: 82vh; }
.preview-scale-wrap { transform: scale(0.5); transform-origin: top left; width: 1400px; }

.logo-preview-img { display: block; max-height: 80px; margin-bottom: 10px; background: #f5f2f8; padding: 6px; border-radius: 8px; }

@media (max-width: 1100px) {
  .review-grid { grid-template-columns: 1fr; }
  .preview-scale-wrap { transform: scale(0.9); }
}
