/* RFC App — minimal v1 styles. Black/white. Big tap targets. */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fff;
  color: #000;
  font-size: 17px;
  line-height: 1.4;
  overscroll-behavior: none;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Screens */

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0;
}

.screen.active {
  display: flex;
}

/* Header */

.app-header {
  padding: 16px 20px 12px 20px;
  border-bottom: 1px solid #eee;
  position: relative;
}

.app-header h1, .app-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.user-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-bottom: 4px;
}

.back-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 15px;
  color: #666;
  margin-bottom: 8px;
  cursor: pointer;
}

/* Property list */

.property-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 24px 0;
  -webkit-overflow-scrolling: touch;
}

.property-section-header {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #999;
  padding: 16px 20px 6px 20px;
  border-top: 1px solid #f5f5f5;
}

.property-section-header:first-child {
  border-top: none;
}

.property-item {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  padding: 16px 20px;
  font-size: 17px;
  cursor: pointer;
  font-family: inherit;
  color: #000;
}

.property-item:active {
  background: #f0f0f0;
}

.property-code {
  font-weight: 700;
  margin-right: 10px;
  font-variant-numeric: tabular-nums;
}

.property-address {
  color: #444;
}

/* Camera screen */

.camera-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 24px;
}

.camera-btn {
  width: 100%;
  max-width: 360px;
  padding: 28px;
  font-size: 22px;
  font-weight: 600;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
}

.camera-btn:active {
  background: #333;
}

.camera-hint {
  color: #666;
  font-size: 15px;
  text-align: center;
  margin: 0;
}

/* Confirm screen */

.confirm-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px 24px 20px;
  gap: 16px;
}

#preview-image {
  flex: 1;
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
  background: #f5f5f5;
  border-radius: 8px;
}

.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.primary-btn {
  padding: 18px;
  font-size: 18px;
  font-weight: 600;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
}

.primary-btn:active {
  background: #333;
}

.secondary-btn {
  padding: 18px;
  font-size: 17px;
  font-weight: 500;
  background: #fff;
  color: #000;
  border: 2px solid #000;
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
}

.secondary-btn:active {
  background: #f0f0f0;
}

/* Done screen */

.done-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  gap: 16px;
  text-align: center;
}

.done-check {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  font-weight: 700;
  margin-bottom: 8px;
}

.done-container h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.done-container p {
  color: #666;
  font-size: 17px;
  margin: 0 0 24px 0;
}

.done-container .primary-btn {
  width: 100%;
  max-width: 360px;
}

/* Toast */

.toast {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 20px;
  right: 20px;
  background: #000;
  color: #fff;
  padding: 14px 18px;
  border-radius: 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  z-index: 1000;
  transition: opacity 0.3s;
}

.toast.hidden {
  opacity: 0;
  pointer-events: none;
}
