
:root {
  --green: #126C46;
  --green2: #1f7a52;
  --bg: #f3f6f4;
  --card: #f8fbf8;
  --line: #d9e2dc;
  --text: #171b18;
  --muted: #8a928d;
  --danger: #b3261e;
  --warn: #9b6700;
  --ok: #3fac55;
  --blue: #2f6fb3;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { padding-bottom: env(safe-area-inset-bottom); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.appbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
  min-height: 64px;
}
.appbar h1 { font-size: 21px; font-weight: 600; margin: 0; letter-spacing: .3px; }
.appbar-actions { display: flex; gap: 8px; }
.icon-btn {
  border: 0; background: transparent; color: inherit;
  width: 44px; height: 44px; border-radius: 50%; font-size: 25px;
}
.icon-btn:hover { background: rgba(255,255,255,.12); }
.container { max-width: 760px; margin: 0 auto; padding: 18px; }
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: 24px 18px; }
.login-card, .card {
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 2px 5px rgba(0,0,0,.10); border-radius: 20px;
}
.login-card { width: min(100%, 440px); padding: 30px 24px; text-align: center; }
.logo-circle {
  width: 84px; height: 84px; border-radius: 50%; background: var(--green);
  color: white; display: grid; place-items: center; margin: 0 auto 18px;
  font-size: 48px;
}
.login-title { font-size: 27px; font-weight: 800; margin: 6px 0 3px; }
.login-sub { color: var(--muted); font-size: 18px; margin-bottom: 30px; }
.field { text-align: left; margin: 14px 0; }
.field label { display: block; font-size: 14px; margin: 0 0 6px 4px; color: #4f5752; }
.field input, .field select, .toolbar select, .toolbar input {
  width: 100%; border: 1px solid #8e9992; border-radius: 10px; background: #fff;
  padding: 14px 14px; min-height: 50px; outline: none;
}
.field input:focus, .field select:focus, .toolbar select:focus, .toolbar input:focus {
  border: 2px solid var(--green); padding: 13px;
}
.btn {
  border: 0; border-radius: 999px; min-height: 52px; padding: 12px 20px;
  font-weight: 750; letter-spacing: .2px;
}
.btn.primary { background: var(--green); color: #fff; }
.btn.outline { background: transparent; color: var(--green); border: 1.5px solid var(--green); }
.btn.secondary { background: #e8f1eb; color: var(--green); }
.btn.danger { background: #f8e9e7; color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.full { width: 100%; }
.card { padding: 20px; margin-bottom: 16px; }
.profile { display: flex; gap: 16px; align-items: center; }
.avatar {
  width: 66px; height: 66px; border-radius: 50%; background: var(--green);
  color: #fff; display: grid; place-items: center; font-size: 34px; flex: 0 0 auto;
}
.profile-name { font-size: 20px; font-weight: 800; line-height: 1.28; }
.profile-sub { color: #4e5851; margin-top: 4px; }
.muted { color: var(--muted); }
.schedule { text-align: center; padding: 28px 18px; }
.schedule-icon { font-size: 58px; color: var(--green); }
.schedule-title { font-size: 28px; font-weight: 800; margin-top: 8px; }
.schedule-time { color: var(--muted); font-size: 20px; margin-top: 6px; }
.status-pill {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  margin: 26px 0 18px; border-radius: 14px; padding: 15px; font-weight: 800; font-size: 18px;
}
.status-open { background: #dff0e1; color: var(--ok); }
.status-blue { background: #e5effa; color: var(--blue); }
.status-warn { background: #fff0d4; color: var(--warn); }
.status-closed { background: #fae7e5; color: var(--danger); }
.status-neutral { background: #edf0ee; color: #59615c; }
.section-head { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.divider { border-top: 1px solid var(--line); margin: 12px 0 16px; }
.info-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.info-row span:first-child { color: var(--muted); }
.info-row span:last-child { font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.actions { display: grid; gap: 12px; margin-bottom: 16px; }
.history-item, .person-item {
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.history-item:last-child, .person-item:last-child { border-bottom: 0; }
.item-title { font-weight: 800; }
.item-sub { color: #606963; font-size: 14px; margin-top: 3px; }
.toolbar { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat {
  border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 16px 12px; text-align: center;
}
.stat-icon { color: var(--green); font-size: 26px; }
.stat-value { font-weight: 850; font-size: 26px; margin: 4px 0; }
.stat-label { color: var(--muted); font-size: 14px; }
.progress-row { display: flex; justify-content: space-between; padding: 7px 0; }
.banner {
  background: #fff7db; border: 1px solid #e4cf83; color: #6e5800;
  border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px;
}
.install-banner {
  background: #e8f2ec; border: 1px solid #b9d2c2; color: #184d35;
  border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px;
}
.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%); width: min(92%, 680px); z-index: 60;
  background: #242a26; color: #fff; padding: 14px 16px; border-radius: 12px;
  opacity: 0; pointer-events: none; transition: .2s; white-space: pre-line;
}
.toast.show { opacity: 1; }
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 100;
  display: grid; place-items: center; padding: 22px;
}
.modal-card {
  width: min(100%, 430px); background: #fff; border-radius: 22px; padding: 24px; text-align: center;
  box-shadow: 0 10px 32px rgba(0,0,0,.22);
}
.modal-icon { font-size: 56px; color: var(--green); }
.modal-card h3 { margin: 6px 0 12px; font-size: 22px; }
.modal-text { white-space: pre-line; line-height: 1.5; margin-bottom: 20px; }
.loading { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.45); border-top-color: currentColor; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 560px) {
  .container { padding: 14px; }
  .card { padding: 17px; }
  .toolbar { grid-template-columns: 1fr; }
  .profile-name { font-size: 18px; }
}
