/* AI Concierge Wireframe - Common Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, 'Helvetica Neue', sans-serif;
  background: #f5f5f5;
  color: #333;
  max-width: 375px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.admin {
  max-width: 1024px;
}

/* Header */
.header {
  background: #666;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.header h1 { font-size: 16px; font-weight: 600; }
.header .back { color: #fff; text-decoration: none; font-size: 20px; }

/* Content */
.content {
  flex: 1;
  padding: 16px;
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}
.card h3 { font-size: 14px; margin-bottom: 8px; }
.card p { font-size: 12px; color: #666; }

/* Form */
.form-group {
  margin-bottom: 12px;
}
.form-group label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: #555;
  color: #fff;
  width: 100%;
  display: block;
}
.btn-secondary {
  background: #e0e0e0;
  color: #333;
}
.btn-outline {
  background: transparent;
  border: 1px solid #999;
  color: #555;
}
.btn-danger {
  background: #c44;
  color: #fff;
}
.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}
.btn + .btn { margin-top: 8px; }

/* Tab Bar */
.tab-bar {
  display: flex;
  background: #fff;
  border-top: 1px solid #ddd;
  position: sticky;
  bottom: 0;
}
.tab-bar a {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 10px;
  color: #999;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.tab-bar a.active { color: #333; font-weight: 600; }
.tab-bar .tab-icon { font-size: 18px; }

/* Badge */
.badge {
  display: inline-block;
  background: #555;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
}
.badge-red { background: #c44; }
.badge-green { background: #4a4; }
.badge-orange { background: #c84; }
.badge-blue { background: #48c; }

/* List */
.list-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #fff;
  border-bottom: 1px solid #eee;
  text-decoration: none;
  color: #333;
  gap: 12px;
}
.list-item:first-child { border-radius: 8px 8px 0 0; }
.list-item:last-child { border-radius: 0 0 8px 8px; border-bottom: none; }
.list-item .avatar {
  width: 40px;
  height: 40px;
  background: #ddd;
  border-radius: 50%;
  flex-shrink: 0;
}
.list-item .info { flex: 1; }
.list-item .info .name { font-size: 14px; font-weight: 500; }
.list-item .info .sub { font-size: 12px; color: #999; }
.list-item .arrow { color: #ccc; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tag {
  background: #e8e8e8;
  color: #555;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
}
.tag.selected { background: #555; color: #fff; }

/* Section */
.section-title {
  font-size: 13px;
  font-weight: 600;
  color: #666;
  margin: 16px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #ddd;
}

/* Status */
.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

/* Placeholder */
.placeholder {
  background: #e0e0e0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 12px;
}
.placeholder-img {
  width: 100%;
  height: 150px;
}
.placeholder-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto;
}

/* Chat */
.chat-container {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.chat-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
}
.chat-bubble.ai {
  background: #e8e8e8;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-bubble.user {
  background: #555;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-input-bar {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
  border-top: 1px solid #ddd;
  align-items: center;
}
.chat-input-bar input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 14px;
}
.chat-input-bar button {
  background: #555;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 16px;
}

/* API Footer */
.api-footer {
  background: #e8e4d8;
  border-top: 2px dashed #c0b898;
  padding: 16px;
  margin-top: auto;
  font-size: 11px;
  line-height: 1.6;
}
.api-footer h4 {
  font-size: 12px;
  color: #665;
  margin: 8px 0 4px;
}
.api-footer h4:first-child { margin-top: 0; }
.api-footer code {
  background: #d8d4c8;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 11px;
}
.api-footer a {
  color: #557;
  text-decoration: underline;
}

/* Toggle */
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.toggle {
  width: 44px;
  height: 24px;
  background: #ccc;
  border-radius: 12px;
  position: relative;
}
.toggle.on { background: #555; }
.toggle::after {
  content: '';
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
}
.toggle.on::after { left: 22px; }

/* Table (admin) */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th, td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}
th { background: #e8e8e8; font-weight: 600; }

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 2px solid #ddd;
  margin-bottom: 12px;
}
.tabs a {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: #999;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.tabs a.active {
  color: #333;
  border-bottom-color: #333;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
}
.filter-bar a {
  white-space: nowrap;
  padding: 6px 12px;
  background: #e8e8e8;
  border-radius: 16px;
  font-size: 12px;
  color: #555;
  text-decoration: none;
}
.filter-bar a.active {
  background: #555;
  color: #fff;
}

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.text-sm { font-size: 12px; }
.text-muted { color: #999; }
.text-large { font-size: 24px; font-weight: 700; }
.text-xl { font-size: 32px; font-weight: 700; }
.p-16 { padding: 16px; }
