* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f4f5f7;
  color: #1a1a1a;
}
#banner {
  background: #b91c1c;
  color: white;
  text-align: center;
  font-size: 12px;
  padding: 4px;
  font-weight: 600;
}
#offline-banner {
  background: #7f1d1d;
  color: white;
  text-align: center;
  font-size: 13px;
  padding: 6px;
}
.hidden { display: none !important; }

#app { max-width: 480px; margin: 0 auto; padding: 16px; padding-bottom: 80px; }

h1 { font-size: 20px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 16px 0 8px; }

.card {
  background: white;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card.tap { cursor: pointer; }
.card.tap:active { background: #eef2ff; }

.btn {
  display: block;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  background: #2563eb;
  color: white;
  margin: 8px 0;
  cursor: pointer;
}
.btn.secondary { background: #e5e7eb; color: #1a1a1a; }
.btn.danger { background: #b91c1c; }
.btn:disabled { opacity: 0.5; }

.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.badge.synced { background: #dcfce7; color: #166534; }
.badge.pending { background: #fef3c7; color: #92400e; }
.badge.group { background: #dbeafe; color: #1e40af; margin-left: 6px; }

label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 14px; }
textarea, select, input[type="date"], input[type="time"] {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 15px;
}
.checkbox-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid #eee; }
.checkbox-row input { width: 20px; height: 20px; }

#sig-pad, #sig-pad-worker {
  width: 100%;
  height: 260px;
  border: 2px dashed #999;
  border-radius: 10px;
  background: white;
  touch-action: none;
}

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.link-back { color: #2563eb; font-size: 14px; }

/* Savas pranešimų langas vietoje naršyklės alert()/prompt() - žr. app.js appAlert()/appPrompt() */
#dialog-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 1000;
}
#dialog-box {
  background: white; border-radius: 12px; padding: 20px;
  width: 100%; max-width: 360px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
#dialog-title { font-weight: 700; font-size: 12px; color: #b91c1c; letter-spacing: 0.04em; margin-bottom: 8px; }
#dialog-message { font-size: 15px; margin-bottom: 14px; white-space: pre-wrap; }
#dialog-input { margin-bottom: 14px; }
#dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }
#dialog-actions .btn { width: auto; margin: 0; padding: 10px 16px; }
