:root {
  --bg: #0e0e10;
  --card: #1a1a1d;
  --text: #f2f2f2;
  --muted: #8e8e93;
  --accent: #3dd68c;
  --border: #2c2c30;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh;
}
.screen { max-width: 520px; margin: 0 auto; padding: 20px 16px 40px; }
.hidden { display: none !important; }
h1 { font-size: 1.4rem; margin: 40px 0 16px; }
h2 { font-size: 1rem; margin: 18px 0 8px; color: var(--muted); font-weight: 600; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 1rem; margin-bottom: 10px;
}
textarea { resize: vertical; line-height: 1.4; }
label { display: block; font-size: .9rem; margin: 10px 0 4px; color: var(--muted); }
.btn {
  width: 100%; padding: 14px; border: none; border-radius: 12px;
  background: var(--accent); color: #0a1a12; font-weight: 700; font-size: 1rem; cursor: pointer;
  margin-top: 8px;
}
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.link { background: none; border: none; color: var(--muted); cursor: pointer; font-size: .95rem; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tab {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-weight: 600; cursor: pointer;
}
.tab.active { border-color: var(--accent); color: var(--accent); }
.preview {
  background: var(--card); border-radius: 12px; overflow: hidden; margin-bottom: 12px;
  border: 1px solid var(--border);
}
.preview img { width: 100%; height: 160px; object-fit: cover; display: block; }
.preview p { margin: 0; padding: 10px 12px; font-size: .9rem; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip {
  padding: 8px 12px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: .85rem; cursor: pointer;
}
.chip.active { border-color: var(--accent); color: var(--accent); }
.order {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px; margin-bottom: 10px; line-height: 1.45;
}
.order strong { font-size: 1.05rem; }
.order .meta { color: var(--muted); font-size: .88rem; }
.order .actions { display: flex; gap: 8px; margin-top: 10px; }
.order .actions button {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--border);
  background: #222; color: var(--text); font-weight: 600; cursor: pointer;
}
.order .actions .ok { background: rgba(61,214,140,.15); border-color: var(--accent); color: var(--accent); }
.order .actions .no { color: #ff8a8a; border-color: #553333; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #2a2a2e; padding: 12px 16px; border-radius: 12px; z-index: 20;
}
.toast.hidden { display: none; }
.logo-login { display:block; width:140px; height:140px; object-fit:contain; margin:24px auto 16px; border-radius:20px; }
.logo-head { height:56px; width:auto; border-radius:10px; }
.btn.secondary { background:#2a2a2e; color:var(--text); border:1px solid var(--border); }
.stats { background:var(--card); border:1px solid var(--border); border-radius:12px; padding:12px; margin:10px 0 14px; line-height:1.5; }
.dish-edit { background:var(--card); border:1px solid var(--border); border-radius:12px; padding:12px; margin-bottom:12px; }
.dish-edit img { width:100%; height:140px; object-fit:cover; border-radius:10px; margin-bottom:8px; }
.dish-edit .row { display:flex; gap:8px; margin-top:8px; }
.dish-edit .row button { flex:1; padding:10px; border-radius:10px; border:1px solid var(--border); background:#222; color:var(--text); font-weight:600; }
.dish-edit .del { color:#ff8a8a; border-color:#553333; }

.table-wrap { overflow-x: auto; margin: 12px 0 24px; }
table.stat { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.stat th, table.stat td { border-bottom: 1px solid #333; padding: 10px 8px; text-align: left; }
table.stat th { color: #9a9aa0; font-weight: 600; }
.schedule-card { background: #1c1c1e; border: 1px solid #333; border-radius: 14px; padding: 12px; margin-bottom: 10px; display: grid; grid-template-columns: 72px 1fr; gap: 12px; }
.schedule-card img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.schedule-card .meta { font-size: 0.9rem; color: #9a9aa0; }
.schedule-card strong { display: block; margin-bottom: 4px; }
.hint { color: #ffb340; font-size: 0.9rem; margin: 8px 0; }
.hint.hidden { display: none; }
.row-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.row-actions input { width: 90px; background: #252528; border: 1px solid #333; border-radius: 8px; color: #fff; padding: 8px; }
.row-actions button { padding: 8px 12px; border-radius: 8px; border: none; background: #3dd68c; color: #0a1a12; font-weight: 700; cursor: pointer; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.cal-day {
  background: #1c1c1e;
  border: 1px solid #333;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  padding: 0;
  color: inherit;
  font: inherit;
}
.cal-day:active { transform: scale(0.98); }
.cal-day.empty { opacity: 0.85; border-style: dashed; }
.cal-day img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
  background: #252528;
}
.cal-day .cal-ph {
  width: 100%;
  height: 72px;
  background: #252528;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 0.8rem;
}
.cal-day .cal-body { padding: 8px; }
.cal-day .cal-date { font-weight: 800; font-size: 0.85rem; }
.cal-day .cal-title {
  font-size: 0.75rem;
  color: #9a9aa0;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-day .cal-qty {
  font-size: 0.8rem;
  color: #3dd68c;
  font-weight: 700;
  margin-top: 4px;
}
.menu-editor {
  background: #1c1c1e;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 20px;
}
.menu-editor.hidden { display: none; }

.cal-day.past {
  opacity: 0.45;
  filter: grayscale(0.35);
}
.cal-day.past:hover { opacity: 0.7; }
