/* ============================================================
   ResiNotes Login UI — single stylesheet
   Mobile-first, CSP-safe (no inline styling required)
============================================================ */

:root{
  --rn-brand: #00766c;         /* Teal */
  --rn-accent: #c2410c;        /* Orange-red */
  --rn-bg: #f6f8fa;
  --rn-card: #ffffff;
  --rn-text: #0f172a;
  --rn-muted: #64748b;
  --rn-border: #e2e8f0;
  --rn-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --rn-radius: 18px;
}

*{ box-sizing:border-box; }

html, body{
  margin:0;
  padding:0;
  width:100%;
  min-height:100vh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--rn-text);
  background: var(--rn-bg);
}

a{ color: var(--rn-brand); text-decoration:none; }
a:hover{ text-decoration:underline; }

.rn-auth{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}

.rn-card{
  width:100%;
  max-width: 420px;
  background: var(--rn-card);
  border: 1px solid var(--rn-border);
  border-radius: var(--rn-radius);
  box-shadow: var(--rn-shadow);
  overflow:hidden;
}

.rn-card__head{
  padding: 18px 18px 10px 18px;
  border-bottom: 1px solid var(--rn-border);
  background: linear-gradient(180deg, #ffffff, #fbfffe);
}

.rn-brand{
  display:flex;
  align-items:center;
  gap: 10px;
}

/* Brand logo */
.rn-brand__logo {
  max-width: 240px;
  width: 100%;
  height: auto;
  display: block;
}

/* Adjust header spacing when using image logo */
.rn-card__head {
  padding: 22px 18px 18px 18px;
  border-bottom: 1px solid var(--rn-border);
  background: linear-gradient(180deg, #ffffff, #fbfffe);
  text-align: center;
}

.rn-brand {
  display: flex;
  justify-content: center;
}

.rn-brand__text{
  line-height:1.05;
}

.rn-brand__title{
  margin:0;
  font-size: 18px;
  font-weight: 800;
}

.rn-brand__sub{
  margin:0;
  font-size: 12.5px;
  color: var(--rn-muted);
}

.rn-card__body{
  padding: 16px 18px 18px 18px;
}

.rn-h1{
  margin: 6px 0 12px 0;
  font-size: 18px;
  font-weight: 800;
}

.rn-note{
  margin: 10px 0 0 0;
  color: var(--rn-muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.rn-alert{
  margin: 10px 0 14px 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--rn-border);
  background: #f8fafc;
  font-size: 13.5px;
}

.rn-alert--error{
  border-color: #fecaca;
  background: #fff1f2;
  color: #9f1239;
}

.rn-alert--ok{
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.rn-form{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.rn-field label{
  display:block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.rn-input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--rn-border);
  background: #fff;
  font-size: 15px;
  outline:none;
}

.rn-input:focus{
  border-color: rgba(0,118,108,0.45);
  box-shadow: 0 0 0 4px rgba(0,118,108,0.12);
}

.rn-actions{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 6px;
}

.rn-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  width:100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor:pointer;
  font-weight: 800;
  font-size: 15px;
}

.rn-btn--primary{
  background: var(--rn-brand);
  color:#fff;
}

.rn-btn--primary:hover{
  filter: brightness(0.97);
}

.rn-btn--ghost{
  background: #fff;
  border-color: var(--rn-border);
  color: var(--rn-text);
}

.rn-foot{
  padding: 12px 18px;
  border-top: 1px solid var(--rn-border);
  background: #fff;
  color: var(--rn-muted);
  font-size: 12.5px;
  display:flex;
  justify-content:space-between;
  gap: 10px;
  flex-wrap:wrap;
}

.rn-geo{
  font-size: 13px;
  color: var(--rn-muted);
  margin: 0 0 10px 0;
}

/* Slightly wider screens */
@media (min-width: 640px){
  .rn-card{ max-width: 440px; }
}

/* QR container */
.rn-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 14px 0 18px 0;
}

.rn-qr-wrap img {
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 14px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--rn-border);
}

.rn-alert--danger {
  background: #fde8e8;
  border: 1px solid #f5c2c7;
  color: #7a1c1c;
}
