/* ==========================================================
   Login / Register modal  (no Bootstrap JS needed)
   Change the two colours below to match your brand.
   ========================================================== */
:root { --am-green: #33a23d; --am-green-dark: #2a8a33; --am-teal: #00595a; --am-blue: #0b97e8; --am-line: #d3d8de; }

html.am-lock { overflow: hidden; }

.am-overlay { position: fixed; inset: 0; z-index: 99999; display: none; padding: 16px; overflow-y: auto; background: rgba(15, 23, 20, .55); }
.am-overlay.open { display: flex; animation: amFade .2s ease; }
@keyframes amFade { from { opacity: 0; } }
@keyframes amUp { from { opacity: 0; transform: translateY(18px) scale(.98); } }

.am-box { position: relative; width: 100%; max-width: 480px; margin: auto; padding: 56px 28px 28px; background: #fff; border-radius: 14px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .5); font-family: inherit; color: #1a1f1d; animation: amUp .28s ease; }
.am-box * { box-sizing: border-box; }

/* close (login) and back (register) */
.am-close, .am-back { position: absolute; top: 14px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0; color: #333; background: transparent; border: 0; border-radius: 50%; cursor: pointer; transition: background .15s; }
.am-close { right: 14px; } .am-back { left: 14px; display: none; }
.am-close:hover, .am-back:hover { background: #f0f2f4; }
.am-box[data-view="register"] .am-close { display: none; }
.am-box[data-view="register"] .am-back { display: grid; }
.am-box[data-view="register"] { padding-top: 50px; }

/* message line */
.am-note { margin: 0 0 14px; padding: 10px 14px; font-size: .9rem; line-height: 1.4; border-radius: 8px; }
.am-note:empty { display: none; }
.am-note.info { color: #0b5a63; background: #e5f5f7; }
.am-note.ok { color: #1c6b25; background: #e6f6e8; }
.am-note.err { color: #b42318; background: #fdecea; }

/* social buttons */
.am-social { display: flex; align-items: center; justify-content: center; gap: 12px; height: 58px; margin-bottom: 14px; font-weight: 700; font-size: 1.02rem; color: var(--am-teal); text-decoration: none; background: #fff; border: 1px solid var(--am-green); border-radius: 8px; transition: background .15s, transform .15s; }
.am-social:hover { color: var(--am-teal); background: #f4fbf5; transform: translateY(-1px); }
.am-social svg { width: 26px; height: 26px; flex: none; }
.am-or { margin: 22px 0; text-align: center; font-weight: 700; letter-spacing: .06em; font-size: .95rem; }

/* fields */
.am-f { margin-bottom: 14px; }
.am-in { display: flex; align-items: center; gap: 6px; height: 58px; padding: 0 14px; background: #fff; border: 1px solid var(--am-line); border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
.am-in input { flex: 1; min-width: 0; height: 100%; padding: 0; font: inherit; font-size: 1rem; color: #111; background: transparent; border: 0; outline: 0; }
.am-in input::placeholder { color: #777; }
.am-f.has .am-in, .am-in:focus-within { border-color: var(--am-green); }
.am-in:focus-within { box-shadow: 0 0 0 3px rgba(51, 162, 61, .15); }
.am-f.err .am-in { border-color: #e5484d; box-shadow: none; }
.am-err { display: none; margin: 5px 2px 0; font-size: .8rem; color: #d92d20; }
.am-f.err .am-err { display: block; }
.am-ic { display: grid; place-items: center; padding: 4px; color: #666; background: transparent; border: 0; cursor: pointer; }
.am-ic:hover { color: #111; }
.am-clear { visibility: hidden; }
.am-f.has .am-clear { visibility: visible; }

/* phone */
.am-pre { display: flex; align-items: center; gap: 8px; padding-right: 10px; margin-right: 2px; font-weight: 600; color: #222; border-right: 1px solid var(--am-line); height: 60%; }

/* buttons */
.am-btn { display: block; width: 100%; height: 58px; font: inherit; font-weight: 800; font-size: 1.05rem; color: #fff; background: var(--am-green); border: 1px solid var(--am-green); border-radius: 8px; cursor: pointer; transition: background .15s, transform .15s; }
.am-btn:hover { background: var(--am-green-dark); transform: translateY(-1px); }
.am-btn:disabled { color: #888; background: #f1f2f3; border-color: #f1f2f3; cursor: not-allowed; transform: none; }
.am-out { color: var(--am-green); background: #fff; }
.am-out:hover { color: #fff; }

/* remember / forgot */
.am-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 6px; }
.am-chk { display: flex; align-items: flex-start; gap: 12px; font-size: .98rem; line-height: 1.35; cursor: pointer; user-select: none; }
.am-chk input { position: absolute; opacity: 0; pointer-events: none; }
.am-chk i { flex: none; width: 22px; height: 22px; margin-top: 1px; background: #fff; border: 2px solid #9aa3ab; border-radius: 4px; transition: .15s; }
.am-chk input:checked + i { background: var(--am-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/16px no-repeat; border-color: var(--am-green); }
.am-chk input:focus-visible + i { box-shadow: 0 0 0 3px rgba(51, 162, 61, .3); }
.am-link { font-weight: 700; color: var(--am-blue); text-decoration: none; }
.am-link:hover { text-decoration: underline; }
.am-terms a { font-weight: 600; color: var(--am-teal); }
.am-new { margin: 24px 0 14px; text-align: center; font-weight: 800; letter-spacing: .05em; font-size: .92rem; }

/* which pane is visible */
.am-box[data-view="login"] #amRegister, .am-box[data-view="register"] #amLogin, .am-box[data-view="register"] .am-foot { display: none; }
.am-reg-checks { display: grid; gap: 14px; margin: 18px 0; }

@media (max-width: 520px) {
  .am-box { padding: 54px 18px 22px; }
  .am-social, .am-in, .am-btn { height: 54px; }
}
@media (prefers-reduced-motion: reduce) { .am-overlay.open, .am-box { animation: none; } }

/* the template's magic cursor can hide the normal mouse pointer: show it inside the modal */
.am-overlay, .am-overlay * { cursor: auto; }
.am-overlay a, .am-overlay button, .am-overlay label, .am-overlay .am-chk { cursor: pointer; }
.am-overlay button:disabled { cursor: not-allowed; }
.am-overlay input { cursor: text; }
.am-overlay input[type="checkbox"] { cursor: pointer; }