:root{
  --card-w: 404px;
  --text:#1b1b1b;
  --muted:#605e5c;
  --blue:#0067b8;
}

*{box-sizing:border-box}

html,body{
  width:100%;
  min-height:100%;
  margin:0;
  font-family:"Segoe UI","Segoe UI Web (West European)",Arial,sans-serif;
  color:var(--text);
}

body{
  min-height:100vh;
  background:
    linear-gradient(rgba(0,0,0,.58),rgba(0,0,0,.58)),
    url("thun-bg.jpg") center center/cover no-repeat fixed;
}

.page{
  min-height:100vh;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px 16px 68px;
}

.login-card{
  width:min(var(--card-w),calc(100vw - 32px));
  min-height:320px;
  background:#fff;
  padding:38px 44px 34px;
  box-shadow:0 2px 6px rgba(0,0,0,.20);
}

.brand{
  height:72px;
  display:flex;
  align-items:flex-start;
  margin:0 0 14px;
}

.tenant-logo{
  display:block;
  width:auto;
  height:72px;
  max-width:320px;
  object-fit:contain;
  object-position:left center;
}

h1{
  margin:0 0 16px;
  font-size:23px;
  line-height:28px;
  font-weight:600;
  letter-spacing:0;
}

.account-row{
  appearance:none;
  border:0;
  background:transparent;
  width:calc(100% + 20px);
  margin-left:-10px;
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
  padding:8px 10px;
  min-height:56px;
  cursor:pointer;
  color:inherit;
  font:inherit;
}

.account-row:hover,
.account-row:focus-visible{
  background:#f2f2f2;
  outline:none;
}

.avatar{
  width:40px;
  height:40px;
  border-radius:50%;
  background:#f2f2f2;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 40px;
  color:#4a4a4a;
}


.account-copy{
  display:flex;
  flex-direction:column;
  gap:0;
  min-width:0;
  line-height:15px;
}

.account-copy strong{
  font-size:14px;
  line-height:18px;
  font-weight:400;
  white-space:nowrap;
}

.account-copy small{
  font-size:11px;
  line-height:14px;
  color:#1b1b1b;
  white-space:nowrap;
}

.plus{
  font-size:28px;
  font-weight:200;
  line-height:1;
}

input{
  width:100%;
  font-family:inherit;
  font-size:15px;
  line-height:20px;
  border:0;
  border-bottom:1px solid #666;
  border-radius:0;
  padding:8px 0 7px;
  outline:none;
  background:#fff;
  color:#1b1b1b;
}

input:focus{
  border-bottom:2px solid var(--blue);
  padding-bottom:6px;
}

.actions{
  display:flex;
  justify-content:flex-end;
  margin-top:28px;
}

.primary{
  background:var(--blue);
  border:0;
  border-radius:0;
  color:#fff;
  min-width:108px;
  min-height:32px;
  padding:5px 12px;
  font-family:inherit;
  font-size:15px;
  cursor:pointer;
}

.primary:hover{background:#005a9e}

.back{
  border:0;
  background:transparent;
  font-size:22px;
  cursor:pointer;
  padding:0;
  margin:0 0 8px;
}

.selected-email{
  font-size:14px;
  margin:0 0 6px;
  color:#333;
}

.muted{
  color:var(--muted);
  font-size:15px;
  line-height:20px;
}

.error{
  font-size:13px;
  color:#a4262c;
  margin-top:14px;
  line-height:18px;
}

.hidden{display:none!important}

footer{
  position:fixed;
  right:14px;
  bottom:8px;
  display:flex;
  gap:16px;
  align-items:center;
  font-size:11px;
  line-height:20px;
  z-index:3;
}

footer a,
footer span{
  color:#fff;
  text-decoration:none;
  text-shadow:0 1px 2px rgba(0,0,0,.8);
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

@media(max-width:560px){
  body{
    background:#f2f2f2;
  }

  .page{
    align-items:flex-start;
    padding:0 0 60px;
  }

  .login-card{
    width:100%;
    min-height:auto;
    box-shadow:none;
    padding:36px 24px;
  }

  footer{
    left:12px;
    right:12px;
    justify-content:center;
    gap:13px;
    flex-wrap:wrap;
  }
}

.known-avatar{
  overflow:hidden;
}

.user-icon{
  width:40px;
  height:40px;
  display:block;
}


/* setup / presenter */
body.setup-bg{
  background:#eef1f5;
}

.setup-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px 16px;
}

.setup-card{
  width:min(530px, calc(100vw - 32px));
  background:#fff;
  padding:34px 32px;
  box-shadow:0 2px 8px rgba(0,0,0,.14);
}

.setup-card h1{
  font-size:20px;
  line-height:28px;
  margin:0 0 10px;
}

.setup-card p{
  margin:0 0 14px;
  color:#333;
}

.setup-card label{
  display:block;
  font-size:14px;
  line-height:20px;
  margin:0 0 14px;
}

.setup-card label input{
  display:block;
  margin-top:4px;
}

.setup-card hr{
  border:0;
  border-top:1px solid #e1dfdd;
  margin:22px 0;
}

.setup-card .plain-h2{
  margin:0 0 10px;
  font-size:16px;
  line-height:24px;
  font-weight:600;
}

.qr{
  width:168px;
  height:168px;
  display:block;
  object-fit:contain;
  background:#fff;
  border:1px solid #e1dfdd;
  padding:8px;
  margin:8px 0 12px;
}

.secret{
  font-family:Consolas, Monaco, monospace;
  font-size:13px;
  line-height:18px;
  background:#f5f5f5;
  padding:10px 12px;
  margin:0 0 14px;
  word-break:break-all;
}

/* real login / target */
body.target-bg{
  min-height:100vh;
}

.target-card{
  padding-top:28px;
}

.target-badge{
  display:inline-block;
  font-size:11px;
  line-height:16px;
  text-transform:uppercase;
  letter-spacing:.02em;
  background:#deecf9;
  color:#004578;
  border-radius:999px;
  padding:3px 10px;
  margin-bottom:14px;
  font-weight:600;
}

.plain-h2{
  margin:0 0 8px;
  font-size:18px;
  line-height:24px;
  font-weight:600;
}

.field-label{
  display:block;
  margin-top:12px;
  font-size:13px;
  line-height:18px;
}


/* authenticated demo target page */
body.target-page{
  margin:0;
  min-height:100vh;
  background:#f5f6f8;
  color:#1b1b1b;
}

.target-shell{
  width:min(980px, calc(100vw - 48px));
  margin:0 auto;
  padding:48px 0 72px;
}

.target-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
  background:#fff;
  border:1px solid #e2e5e9;
  border-radius:10px;
  padding:28px 32px;
  box-shadow:0 2px 8px rgba(0,0,0,.05);
}

.target-header h1{
  margin:8px 0 0;
  font-size:30px;
  line-height:38px;
}

.user-chip{
  background:#f1f3f5;
  border-radius:999px;
  padding:9px 14px;
  font-size:13px;
  white-space:nowrap;
}

.hero-panel{
  background:#fff;
  border:1px solid #e2e5e9;
  border-radius:10px;
  margin-top:22px;
  padding:30px 32px;
}

.hero-panel h2{
  margin:0 0 10px;
  font-size:24px;
}

.hero-panel p{
  margin:0;
  color:#555;
  font-size:16px;
  line-height:24px;
}

.target-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  margin-top:22px;
}

.target-box{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-height:120px;
  background:#fff;
  border:1px solid #e2e5e9;
  border-radius:10px;
  padding:22px;
}

.target-box strong{
  font-size:16px;
}

.target-box span{
  color:#666;
  font-size:14px;
}

@media(max-width:760px){
  .target-shell{
    width:min(100% - 24px,980px);
    padding-top:20px;
  }
  .target-header{
    flex-direction:column;
  }
  .target-grid{
    grid-template-columns:1fr;
  }
}
