/* Вхід, вибір причини/нотатка, шпаргалка, зона скидання, тост, підказка жестів. */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; overflow-y: auto; }
.login-card { width: min(100%, 360px); display: grid; gap: 16px; padding: 28px 24px; border-radius: var(--r-lg);
  background: var(--panel); border: 1px solid var(--line-soft); }
.login-brand { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.01em; }
.login-sub { color: var(--text-3); font-size: var(--fs-sm); margin-top: -10px; }

/* Вибір причини / нотатка перерізки */
.picker {
  position: absolute; left: 50%; bottom: 66px; z-index: 6; width: min(420px, calc(100% - 24px)); transform: translateX(-50%);
  padding: 14px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line);
  display: grid; gap: 10px; animation: pick-in var(--t-mid) var(--ease);
}
@keyframes pick-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.picker-title { font-size: var(--fs-md); font-weight: 600; }
.picker-title.t-reject { color: var(--reject); }
.picker-title.t-recut { color: var(--recut); }
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.reason {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--raise); text-align: left; font-weight: 500;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.reason:hover, .reason.sel { background: var(--reject-soft); border-color: rgba(240, 87, 93, .5); }
.picker form { display: grid; gap: 8px; }
.picker .row { display: flex; gap: 8px; }
.picker .row input { flex: 1; min-width: 0; }
.picker .hint { font-size: var(--fs-xs); color: var(--text-3); }
.btn-reject { background: var(--reject); border-color: var(--reject); color: #22080a; font-weight: 600; }
.btn-reject:hover { background: #f37479; }
.btn-recut { background: var(--recut); border-color: var(--recut); color: #221c05; font-weight: 600; }
.btn-recut:hover { background: #f1da7c; }

/* Шпаргалка */
.help { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .6); }
.help-card { width: min(100%, 440px); padding: 8px 8px 16px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); }
.keys { margin: 0; padding: 4px 16px 0; display: grid; gap: 8px; }
.keys > div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: center; font-size: var(--fs-sm); }
.keys dt { color: var(--text-3); }
.keys dd { margin: 0; }

/* Перетягніть посилання */
.dropzone { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(15, 16, 17, .82);
  pointer-events: none; animation: fade var(--t-fast) ease-out; }
.dropzone-frame { width: min(100%, 720px); height: min(100%, 440px); display: grid; place-content: center; justify-items: center;
  gap: 10px; border: 2px dashed var(--accent); border-radius: 20px; color: var(--accent); text-align: center; }
.dropzone-frame p { font-size: 26px; font-weight: 600; color: var(--text); }
.dropzone-frame .dropzone-kind { font-size: var(--fs-md); font-weight: 500; color: var(--text-2); }
.dropzone-frame svg.ic { width: 40px; height: 40px; }
@keyframes fade { from { opacity: 0; } }

/* Тост */
.toast {
  position: fixed; left: 50%; top: calc(var(--top-h) + 12px); z-index: 80; transform: translateX(-50%); display: flex; align-items: center; gap: 14px;
  max-width: calc(100% - 24px); min-height: 48px; padding: 6px 6px 6px 16px; border-radius: var(--r-md); background: #f1efea;
  color: #1c1c1c; font-size: var(--fs-sm); font-weight: 500; animation: toast-in var(--t-mid) var(--ease);
}
.toast.err { background: #3a1416; color: #ffd9da; border: 1px solid var(--reject); }
.toast .toast-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.toast .toast-dot.ok { background: #2f9c67; }
.toast .toast-dot.reject { background: #d8373e; }
.toast .toast-dot.recut { background: #b89a17; }
.toast .toast-dot.info { background: #e0791f; }
.toast-msg { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.toast .toast-btn { min-height: 36px; padding: 0 12px; border-radius: 8px; border: 0; background: #1c1c1c; color: #fff; font-weight: 600;
  flex: none; }
.toast.err .toast-btn { background: var(--reject); color: #22080a; }
.toast .toast-btn:hover { background: #333; }
.toast:not(:has(.toast-btn)) { padding-right: 16px; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } }

/* Підказка жестів */
.swipe-hint { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; background: rgba(0, 0, 0, .62); padding: 24px; }
.swipe-hint-card { display: grid; gap: 14px; justify-items: center; text-align: center; max-width: 290px; }
.swipe-hint-card h2 { font-size: var(--fs-lg); font-weight: 600; }
.sh-rows { display: grid; gap: 10px; width: 100%; }
.sh-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-md); background: rgba(32, 33, 36, .92);
  font-weight: 500; }
.sh-row svg.ic { width: 22px; height: 22px; }
.sh-row.ok { color: var(--ok); }
.sh-row.reject { color: var(--reject); }
.sh-row.recut { color: var(--recut); }
.sh-row span { color: var(--text); }

@media (max-width: 899px) {
  .picker {
    position: fixed; left: 0; right: 0; bottom: 0; width: auto; transform: none; z-index: 50; border-radius: 16px 16px 0 0;
    padding: 14px 14px calc(14px + var(--safe-b)); animation: sheet-in var(--t-slow) var(--ease);
  }
  @keyframes sheet-in { from { transform: translateY(100%); } }
  .reason { min-height: 54px; }
  .reason kbd { display: none; }
  .picker .row { flex-direction: column; }
  .picker .row .btn { min-height: 48px; }
  .toast { top: auto; bottom: calc(var(--tab-h) + var(--act-h) + var(--safe-b) + 10px); }
  body.overlay-open .toast { top: calc(10px + var(--safe-t)); bottom: auto; }
  .keys > div { grid-template-columns: 140px 1fr; }
}
