/* ATM Luxury Rentals — renter app (dark + champagne gold) */
:root {
  --bg: #101014;
  --card: #1a1a21;
  --gold: #d4af6a;
  --gold-deep: #b8914f;
  --text: #f2ede3;
  --muted: #9a937f;
  --ok: #7bc98a;
  --warn: #e8b64c;
  --bad: #e06c5b;
  --line: #2a2a33;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: #000; color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: flex; justify-content: center; min-height: 100vh;
}
.phone { width: 100%; max-width: 480px; background: var(--bg); min-height: 100vh; padding: 0 16px 40px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 0 12px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #141414; font-weight: 800; display: flex; align-items: center; justify-content: center;
  letter-spacing: 1px;
}
.brand-name { font-weight: 700; font-size: 17px; }
.brand-sub { color: var(--muted); font-size: 13px; }
.brand .link { margin-left: auto; }
h1 { font-size: 24px; margin: 8px 0; }
h2 { font-size: 17px; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 12px 0 6px; color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.error { color: var(--bad); font-size: 14px; min-height: 20px; }
.warn {
  background: #3a2c12; border: 1px solid var(--warn); color: #f4d98c;
  border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 12px 0;
}
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; margin-bottom: 14px;
}
.card.highlight { border-color: var(--gold-deep); }
.kicker { color: var(--gold); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 4px; }
label { display: block; font-size: 14px; margin-bottom: 12px; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px;
  background: #101014; border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-size: 16px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); }
input[type="checkbox"], input[type="radio"] { width: auto; display: inline-block; margin-top: 0; padding: 0; flex: none; }
.btn {
  display: inline-block; text-align: center; text-decoration: none; cursor: pointer;
  background: #2a2a33; color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 18px; font-size: 15px; font-weight: 600; width: 100%;
}
.btn.gold { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #141414; border: none; }
.btn.big { font-size: 17px; padding: 14px 18px; margin: 10px 0; }
.link { background: none; border: none; color: var(--gold); font-size: 14px; cursor: pointer; padding: 4px; }
.tabs { display: flex; gap: 8px; margin: 16px 0; }
.tab {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--muted); font-size: 14px; cursor: pointer;
}
.tab.active { color: var(--gold); border-color: var(--gold-deep); }
.row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.row:last-child { border-bottom: none; }
.due { display: flex; gap: 24px; margin: 12px 0; }
.due div span { display: block; font-size: 12px; }
.due div b { font-size: 18px; color: var(--gold); }
.chip {
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px;
  background: #2a2a33; color: var(--muted); white-space: nowrap;
}
.chip.ok { background: #1d3325; color: var(--ok); }
.chip.warn { background: #3a2c12; color: var(--warn); }
.chip.bad { background: #3d211c; color: var(--bad); }
.bad-text { color: var(--bad); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.kpi span { display: block; font-size: 12px; margin-bottom: 4px; }
.kpi b { font-size: 20px; color: var(--gold); }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.insp-block { margin-bottom: 8px; }
.auth { padding-top: 8px; }
code { background: #2a2a33; padding: 2px 6px; border-radius: 6px; font-size: 12px; }
/* Info modal (e.g. "what's a declarations page?") */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; max-width: 430px; width: 100%; padding: 20px; }
.modal-card h3 { margin: 0 0 10px; }
.modal-card p, .modal-card li { font-size: 14px; line-height: 1.5; }
.modal-card ul { padding-left: 20px; margin: 8px 0; }
.modal-card.doc { max-width: 760px; height: 92vh; display: flex; flex-direction: column; }
.modal-card.doc iframe { flex: 1; width: 100%; border: 0; background: #fff; border-radius: 8px; display: block; touch-action: pan-y; overscroll-behavior: contain; }
.modal-backdrop { overscroll-behavior: none; }
.linklike { background: none; border: none; color: var(--gold); text-decoration: underline; font-size: 13px; padding: 0; margin-left: 6px; cursor: pointer; }

/* ---- Splash: brand intro (plays once per app launch, tap to skip) ---- */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(120% 90% at 50% 28%, #17171f 0%, #000 72%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 24px; opacity: 1; transition: opacity .45s ease;
}
#splash.done { opacity: 0; pointer-events: none; }
#splash .sp-mark {
  width: 92px; height: 92px; border-radius: 24px; flex: none;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #141414; font-weight: 800; font-size: 29px; letter-spacing: 2px;
  display: flex; align-items: center; justify-content: center;
  animation: sp-in .7s cubic-bezier(.2,.8,.25,1) both, sp-glow 1.5s ease .45s both;
}
#splash .sp-name {
  font-size: clamp(19px, 6vw, 27px); font-weight: 800; letter-spacing: 3px;
  color: var(--text); text-align: center; white-space: nowrap;
  animation: sp-up .6s ease .25s both;
}
#splash .sp-name .gold {
  background: linear-gradient(100deg, var(--gold-deep) 20%, #f6e3ae 42%, var(--gold) 58%, var(--gold-deep) 78%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: sp-shimmer 1.5s linear .35s both;
}
#splash .sp-sub {
  font-size: 11px; letter-spacing: 7px; color: var(--muted); text-transform: uppercase;
  margin-left: 7px; animation: sp-up .6s ease .45s both;
}
#splash .sp-line {
  width: 148px; height: 2px; background: #26262e; border-radius: 2px; overflow: hidden;
  animation: sp-up .6s ease .5s both;
}
#splash .sp-line i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold));
  animation: sp-fill 1s cubic-bezier(.3,.7,.3,1) .5s both;
}
@keyframes sp-in { from { transform: scale(.82); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes sp-glow { 0% { box-shadow: 0 0 0 rgba(212,175,106,0); } 55% { box-shadow: 0 0 46px rgba(212,175,106,.35); } 100% { box-shadow: 0 0 22px rgba(212,175,106,.16); } }
@keyframes sp-up { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes sp-shimmer { from { background-position: 110% 0; } to { background-position: -30% 0; } }
@keyframes sp-fill { from { width: 0; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) {
  #splash .sp-mark, #splash .sp-name, #splash .sp-sub, #splash .sp-line, #splash .sp-name .gold { animation: none; }
  #splash .sp-line i { animation: none; width: 100%; }
}

/* ---- fix22 polish: motion, loading states, overflow safety ---- */
html, body { overflow-x: hidden; }
body { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
#content > * { animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.btn, .tab { transition: transform .08s ease, filter .15s ease, border-color .15s ease, color .15s ease; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid #2a2a33; border-top-color: var(--gold);
  animation: spin .8s linear infinite; margin: 30px auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-note { text-align: center; color: var(--muted); font-size: 13.5px; margin: 0 0 30px; }
.row > div { min-width: 0; }
.row .muted, .row span, .row b, .row a { overflow-wrap: anywhere; }
.chip { overflow-wrap: normal; }
.modal-card { max-height: 92vh; overflow-y: auto; }
input, select, textarea { max-width: 100%; }
@media (prefers-reduced-motion: reduce) {
  #content > * { animation: none; }
  .spinner { animation-duration: 1.6s; }
}
