:root {
  --brand: #1D9E75;
  --brand-dark: #0F6E56;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --border: #e0e0e0;
  --bg: #fafafa;
  --danger: #d43e3e;
  --success: #1D9E75;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 20px;
}

header img { width: 32px; height: 32px; border-radius: 8px; }
header h1 { font-size: 17px; margin: 0; font-weight: 600; }

.lang-switch { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 8px; }
.lang-btn {
  width: auto;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-muted);
}
.lang-btn.active { background: var(--brand); color: white; border-color: var(--brand); }

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }

select, input[type="time"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  margin-bottom: 16px;
  background: white;
}

.checklist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.checklist label { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text); margin: 0; }
.checklist input { width: 20px; height: 20px; }

.stars { display: flex; gap: 4px; margin-bottom: 8px; }
.stars span {
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  color: #ccc;
  padding: 6px 4px;
  user-select: none;
  -webkit-user-select: none;
}
.stars span.active { color: #f0a500; }

button {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary { background: var(--brand); color: white; }
.btn-primary:active { background: var(--brand-dark); }
.btn-secondary { background: white; border: 1px solid var(--border); color: var(--text); }
.btn-link { background: none; color: var(--text-muted); font-weight: 400; font-size: 13px; width: auto; padding: 6px 10px; }

.row { display: flex; gap: 12px; }
.row button { flex: 1; }

.sig-pad {
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 100%;
  height: 140px;
  touch-action: none;
  background: white;
  margin-bottom: 6px;
}

.sig-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sig-label span { font-size: 14px; color: var(--text-muted); }

.geo-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--success); margin-bottom: 16px; }
.geo-status.pending { color: var(--text-muted); }

.error { font-size: 13px; color: var(--danger); margin: -8px 0 16px; }

.hidden { display: none !important; }

.center { text-align: center; padding: 40px 0; }
.center i { font-size: 40px; color: var(--success); }
.center p.title { font-size: 17px; font-weight: 600; margin: 14px 0 6px; }
.center p.sub { font-size: 13px; color: var(--text-muted); margin: 0; }

.sync-status {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  color: white;
  background: var(--text-muted);
}
.sync-status.offline { background: var(--danger); }
.sync-status.synced { background: var(--success); }

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.history-item .badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 20px;
  background: #f0f0f0;
  color: var(--text-muted);
}
.history-item .badge.synced { background: #e1f5ee; color: var(--brand-dark); }
