/* AG Cleaning app — mobile-first, clean professional look */
:root {
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1a2333;
  --muted: #6b7688;
  --line: #e3e8f0;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --green: #16a34a;
  --amber: #d97706;
  --red: #dc2626;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
header.topbar {
  position: sticky; top: 0; z-index: 50;
  background: #16233a; color: #fff;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
}
.brand { font-weight: 700; font-size: 17px; flex: 1; }
.brand small { display: block; font-weight: 400; font-size: 11px; opacity: .7; }
.lang-toggle {
  display: flex; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; overflow: hidden;
}
.lang-toggle button {
  background: transparent; color: #fff; border: 0; padding: 7px 12px;
  font-size: 13px; cursor: pointer;
}
.lang-toggle button.active { background: #fff; color: #16233a; font-weight: 700; }
.icon-btn {
  background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff;
  border-radius: 8px; padding: 7px 10px; font-size: 13px; cursor: pointer;
}
main { max-width: 860px; margin: 0 auto; padding: 16px 14px 90px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px;
}
.card h3 { margin: 0 0 8px; font-size: 16px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.btn {
  display: inline-block; border: 0; border-radius: 10px; cursor: pointer;
  padding: 12px 18px; font-size: 15px; font-weight: 600;
  background: var(--accent); color: #fff; min-height: 44px;
}
.btn:active { background: var(--accent-dark); }
.btn.secondary { background: #e8edf5; color: var(--text); }
.btn.danger { background: var(--red); }
.btn.small { padding: 8px 12px; font-size: 13px; min-height: 36px; }
.btn.block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: .5; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px;
  padding: 4px 10px; white-space: nowrap;
}
.badge.scheduled { background: #e0e7ff; color: #3730a3; }
.badge.in_progress { background: #fef3c7; color: #92400e; }
.badge.done { background: #dcfce7; color: #166534; }
.badge.type { background: #f1f5f9; color: var(--muted); }
.badge.problem { background: #fee2e2; color: #991b1b; }
.job-card { cursor: pointer; }
.job-card:active { background: #f8fafc; }
.progress { height: 8px; background: #e8edf5; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress > div { height: 100%; background: var(--accent); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; }
.tabs button {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 10px 16px; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.tabs button.active { background: #16233a; color: #fff; border-color: #16233a; }
form label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
form input, form select, form textarea {
  width: 100%; padding: 12px; font-size: 15px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff;
}
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10,18,32,.55); z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: #fff; border-radius: 18px 18px 0 0; width: 100%; max-width: 560px;
  max-height: 88vh; overflow-y: auto; padding: 18px 16px 30px;
}
@media (min-width: 640px) {
  .modal-backdrop { align-items: center; }
  .modal { border-radius: 18px; }
}
.check-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 4px; border-bottom: 1px solid var(--line); cursor: pointer;
  font-size: 15px; line-height: 1.35;
}
.check-item input { width: 24px; height: 24px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.check-item.done span { text-decoration: line-through; color: var(--muted); }
.section-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 4px 6px; font-weight: 700; font-size: 15px;
  position: sticky; top: 57px; background: var(--bg); z-index: 10;
}
.section-head .count { color: var(--muted); font-weight: 600; font-size: 13px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.comment { border-bottom: 1px solid var(--line); padding: 10px 2px; font-size: 14px; }
.comment .meta { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.login-wrap { max-width: 380px; margin: 8vh auto 0; }
.login-wrap .card { padding: 24px 20px; }
.login-wrap h1 { font-size: 22px; margin: 0 0 4px; }
.hint { font-size: 13px; color: var(--muted); background: #f1f5f9; border-radius: 8px; padding: 10px; margin-top: 14px; }
.hint code { background: #e2e8f0; padding: 1px 5px; border-radius: 4px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 14px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 4px 10px; font-size: 14px; margin: 8px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.file-label {
  display: inline-block; background: #e8edf5; border-radius: 10px; padding: 10px 14px;
  font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 8px;
}
input[type=file] { display: none; }
.alert { background: #fee2e2; color: #991b1b; border-radius: 10px; padding: 12px; font-size: 14px; margin-bottom: 12px; }
.fab {
  position: fixed; right: 16px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; border: 0;
  background: var(--accent); color: #fff; font-size: 30px; cursor: pointer;
  box-shadow: 0 6px 18px rgba(37,99,235,.4);
}
