/* ===== Mochi Shop Management System ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 16px; color: #1f2937; background: #f9fafb; }
body { min-height: 100vh; }
a { color: #2563eb; text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

.container { max-width: 480px; margin: 0 auto; padding: 1rem; }
.container-wide { max-width: 800px; margin: 0 auto; padding: 1rem; }

.card { background: white; border-radius: 12px; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-bottom: 0.75rem; }
.card-header { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; display: flex; justify-content: space-between; align-items: center; }

.btn { display: inline-block; padding: 0.5rem 1rem; border: none; border-radius: 8px; font-size: 0.85rem; font-weight: 500; cursor: pointer; text-align: center; transition: opacity 0.15s; }
.btn:active { opacity: 0.8; }
.btn-primary { background: #2563eb; color: white; }
.btn-orange { background: #f97316; color: white; }
.btn-green { background: #16a34a; color: white; }
.btn-red { background: #ef4444; color: white; }
.btn-gray { background: #6b7280; color: white; }
.btn-sm { padding: 0.2rem 0.6rem; font-size: 0.75rem; }
.btn-block { display: block; width: 100%; }

.input { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.9rem; background: white; }
.input:focus { outline: 2px solid #93c5fd; border-color: transparent; }
.label { display: block; font-size: 0.8rem; font-weight: 500; margin-bottom: 0.3rem; color: #374151; }
.form-group { margin-bottom: 0.75rem; }

.tag { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.7rem; font-weight: 500; }
.tag-green { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.tag-yellow { background: #fef3c7; color: #92400e; border: 1px solid #fbbf24; }
.tag-red { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.tag-gray { background: #f3f4f6; color: #6b7280; }

.menu-item { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid #f3f4f6; }
.menu-item:last-child { border-bottom: none; }
.menu-item-name { font-weight: 600; font-size: 0.9rem; }
.menu-item-desc { font-size: 0.75rem; color: #6b7280; }
.menu-item-price { font-weight: 600; text-align: right; font-size: 0.95rem; }
.menu-item-left { font-size: 0.7rem; color: #6b7280; }
.menu-item-soldout { opacity: 0.4; pointer-events: none; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1rem; }
.stat-card { background: white; border-radius: 10px; padding: 0.7rem; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.stat-label { font-size: 0.7rem; color: #6b7280; }
.stat-value { font-size: 1.3rem; font-weight: 700; }
.stat-value-green { color: #16a34a; }
.stat-value-orange { color: #d97706; }
.stat-value-blue { color: #2563eb; }

.table-wrap { overflow-x: auto; }
table { width: 100%; font-size: 0.8rem; border-collapse: collapse; }
th { background: #f3f4f6; padding: 0.4rem 0.5rem; text-align: left; font-weight: 500; }
td { padding: 0.4rem 0.5rem; border-bottom: 1px solid #f3f4f6; }

.queue-number { font-size: 3rem; font-weight: 800; color: #2563eb; letter-spacing: 0.2rem; text-align: center; }
.queue-label { font-size: 0.85rem; color: #6b7280; text-align: center; }

.tabs { display: flex; gap: 0.3rem; margin-bottom: 1rem; font-size: 0.8rem; flex-wrap: wrap; }
.tab { padding: 0.35rem 0.8rem; border-radius: 20px; cursor: pointer; background: #f3f4f6; border: none; font-size: 0.8rem; white-space: nowrap; }
.tab.active { background: #2563eb; color: white; }

.crumb-options { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.crumb-chip { padding: 0.25rem 0.7rem; border-radius: 12px; font-size: 0.75rem; border: 1px solid #d1d5db; background: white; cursor: pointer; }
.crumb-chip.selected { background: #2563eb; color: white; border-color: #2563eb; }
.crumb-chip.unavailable { opacity: 0.4; cursor: not-allowed; }

.login-box { max-width: 360px; margin: 4rem auto; padding: 2rem; background: white; border-radius: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.login-box h1 { text-align: center; margin-bottom: 1.5rem; font-size: 1.3rem; }

.header { background: white; border-bottom: 1px solid #e5e7eb; padding: 0.6rem 1rem; display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.header-title { font-weight: 600; }
.header-user { display: flex; align-items: center; gap: 0.5rem; }

.alert { padding: 0.6rem; border-radius: 8px; font-size: 0.8rem; margin-bottom: 0.75rem; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.flavor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
.flavor-item { display: flex; align-items: center; gap: 0.3rem; background: white; padding: 0.4rem; border-radius: 8px; border: 1px solid #e5e7eb; font-size: 0.8rem; }
.flavor-item.soldout { background: #fef2f2; border-color: #fecaca; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; cursor: pointer; display: inline-block; }
.status-dot.available { background: #22c55e; }
.status-dot.unavailable { background: #ef4444; }

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
  .tabs { font-size: 0.75rem; }
  .tab { padding: 0.3rem 0.6rem; }
  .flavor-grid { grid-template-columns: 1fr; }
}
