:root {
  --red: #E61A2E;      /* Digicel red (from the original MUI avatar/theme) */
  --red-dark: #c00f22;
  --ink: #1c1c1e;
  --muted: #6b6b70;
  --line: #d7d7db;
  --bg: #f4f4f6;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .08);
  padding: 32px 26px 22px;
  text-align: center;
}

.avatar {
  width: 60px; height: 60px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(230, 26, 46, .35);
}

h1 { font-size: 1.5rem; margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 22px; font-size: .95rem; }

.field { display: block; text-align: left; margin-bottom: 16px; }
.field > span { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }

input, select {
  width: 100%;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(230, 26, 46, .12);
}
input:disabled { background: #f7f7f8; color: #aaa; }

.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 34px; }
.chevron { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

.phone-row { display: flex; align-items: stretch; }
.prefix {
  display: flex; align-items: center; gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: #f7f7f8;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.phone-row input { border-radius: 0 10px 10px 0; }
.hint { display: block; margin-top: 5px; font-size: .78rem; color: var(--muted); min-height: 1em; }
.hint.error { color: var(--red); }

.btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: var(--red);
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--red-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: #f0f0f2; }

.copyright { margin: 24px 0 0; font-size: .75rem; color: var(--muted); }

/* PIN dialog */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; z-index: 50;
}
/* The author `display:flex` above beats the UA `[hidden]{display:none}`,
   so make hidden explicit or the dialog can't be closed / never hides. */
.overlay[hidden] { display: none; }
.dialog {
  width: 100%; max-width: 340px;
  background: #fff; border-radius: var(--radius);
  padding: 24px 22px; text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.dialog h2 { margin: 0 0 6px; font-size: 1.25rem; }
.dialog p { margin: 0 0 16px; color: var(--muted); font-size: .9rem; }
.pin-input {
  text-align: center;
  font-size: 1.8rem;
  letter-spacing: .5em;
  padding-left: .5em;
}
.dialog-actions { display: flex; gap: 10px; margin-top: 18px; }
.bar { height: 3px; background: linear-gradient(90deg, var(--red), #ff7a86, var(--red)); background-size: 200% 100%; border-radius: 3px; margin-bottom: 12px; animation: slide 1.1s linear infinite; }
@keyframes slide { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Snackbar */
.snackbar {
  position: fixed; left: 16px; bottom: 16px;
  background: #323232; color: #fff;
  padding: 13px 18px; border-radius: 8px;
  font-size: .9rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  z-index: 60; max-width: calc(100% - 32px);
}
