/* css/style.css */
:root {
  --bg-primary: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #334155;
  --accent-gold: #fbbf24;
  --accent-green: #10b981;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --danger: #ef4444;
  --border-color: #334155;
  --radius-lg: 16px;
  --radius-md: 10px;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif;
  line-height: 1.5;
  padding-bottom: 40px;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 20px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.app-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
}

.avatar-xs {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.badge-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #b45309);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-join {
  width: 100%;
  background: var(--accent-green);
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
}

.btn-join:disabled {
  background: #475569;
  cursor: not-allowed;
}

/* Compliance Banner */
.compliance-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}

.compliance-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 1px;
}

.compliance-text {
  flex: 1;
}

/* Multi-Filter Bar */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
}

.action-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.filter-select {
  width: 100%;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 6px 8px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  outline: none;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.filter-btn {
  font-size: 0.78rem !important;
  padding: 6px 8px !important;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}


/* Pagination */
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.page-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}


/* Room Cards */
.room-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
}

.room-card.merchant {
  border: 1px solid #c084fc;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.25);
  background: linear-gradient(180deg, rgba(192, 132, 252, 0.08) 0%, var(--bg-card) 100%);
}

.alarm-box {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--accent-gold);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  margin: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}


.room-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.tag-location {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-gold);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.room-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.room-body p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.host-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
  font-size: 0.85rem;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  width: 100%;
  max-width: 400px;
}

.modal-card h3 {
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.promise-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 12px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  font-size: 0.85rem;
  color: #fca5a5;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
